@inkeep/open-knowledge 0.52.0-beta.2 → 0.52.0-beta.3
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/{acp-harness-probe-8Sj9j5_f.mjs → acp-harness-probe-Bc6NepxH.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-DorcCHBq.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-DyUOE5zl.mjs → init-B_8t-fZ2.mjs} +3 -3
- package/dist/init-i_HFkHSb.mjs +1 -0
- package/dist/{launch-json-removal-D4uxGOEd.mjs → launch-json-removal-BS4wigHF.mjs} +2 -2
- package/dist/{loader-DGh4bdW9.mjs → loader-9xTeZ4cp.mjs} +2 -2
- package/dist/loader-TDgeHCbB.mjs +1 -0
- package/dist/{preview-BbSnbtj5.mjs → preview-D2Fbfcsn.mjs} +2 -2
- package/dist/preview-_Mi4F-O_.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-82sBOezj.js → ActivityModeContent-DgOXZQPM.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CoeEE99v.js → AgentDiffPane-DxMmxvZ_.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DoXKRY3h.js → AgentThreadClientBinder-Dr4KCMFV.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-D047_w8_.js → ChangedOutsideBadge-ChinF2OV.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-AfI-A739.js → CodeMirrorPropInput-BG6vAU3f.js} +1 -1
- package/dist/public/assets/{DocumentContext-RfseIiCK.js → DocumentContext-dF2iyDoR.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-BFLOwOkQ.js → EditorModeToggle-v0ruFGAI.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DrKJd8P_.js → EnableSyncConfirmDialog-CoTYoRIg.js} +1 -1
- package/dist/public/assets/FeedbackForm-hMBuqLQh.js +1 -0
- package/dist/public/assets/{GraphPanel-CIsyWZZL.js → GraphPanel-ovwXA2NQ.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-R8BKwyCS.js → ImportSkillDialog-C4hZ7UL5.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CMXHDFZF.js → LintConfigEditor-Qiz8julD.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-16Q3Ko9H.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-BfpBSbt8.js → ManagedArtifactProperties-CNc3-2jZ.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-D6qWh37S.js → McpConsentDialogBody-BSCT3OvM.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-DbdolXNy.js → MermaidDocEditor-C4p4uQqN.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-0zuUulQL.js → ReportBugDialogBody-BicwB-J9.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-rEKhSqJM.js → SchemaConfigEditor-D6hcCq89.js} +1 -1
- package/dist/public/assets/{SessionsHost-CGV_FZVZ.js → SessionsHost-OteEtmPR.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-DPjbScQ8.js → SettingsDialogBody-eShyjwp_.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-BHZw8v-i.js → ShareBranchSwitchDialog-DDrNzFpA.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CA7GkSOU.js → ShareReceiveDialog-CXNvnUuO.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BVb9iCe7.js → ShareReceiveMissDialog-Bzfc6gmc.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-Dc5M38zl.js → SkillEditBanner-BAS_3XLj.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-B-wdZ-wi.js → SkillOriginInline-CLT-BIkT.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-B1VGCLbB.js → SkillToolbarControls-ChzkHlc2.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DpEF1_8n.js → SlidesToolbarControls-XPbdtH71.js} +1 -1
- package/dist/public/assets/{SourceEditor-BXsOQKW8.js → SourceEditor-GHoDb1-I.js} +1 -1
- package/dist/public/assets/{TerminalPanel-D4k0ePYg.js → TerminalPanel-DxlLFrrc.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-C1Ej4Kb1.js → TerminalWindowApp-CYIfwjHf.js} +1 -1
- package/dist/public/assets/{TextDocEditor-DxhziylX.js → TextDocEditor-DfWDVWNo.js} +1 -1
- package/dist/public/assets/{ThreadView-DlpPbPgC.js → ThreadView-CbGlUw2z.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-35Fhuse-.js → TimelineDiffPane-CPn64osU.js} +1 -1
- package/dist/public/assets/{agent-diff-store-BTtYfAZI.js → agent-diff-store-D6dVnd_h.js} +1 -1
- package/dist/public/assets/{auth-state-cache-j2uCE1rv.js → auth-state-cache-Cgyydfw6.js} +1 -1
- package/dist/public/assets/{client-version-UVydSM1_.js → client-version-CjhiC-Jt.js} +1 -1
- package/dist/public/assets/{comment-chips-CspvZbMA.js → comment-chips-msfGGi8U.js} +1 -1
- package/dist/public/assets/{config-provider-DAD08DXO.js → config-provider-D-VNxNBY.js} +1 -1
- package/dist/public/assets/{dist-CKFXiBrL.js → dist-8YlYwLg8.js} +1 -1
- package/dist/public/assets/{doc-paths-aGtYCY4p.js → doc-paths-78wumkT9.js} +1 -1
- package/dist/public/assets/{documents-events-BNjnUfCu.js → documents-events-DKMYe_0X.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-BnKrzDCF.js → file-tree-adapter-CGtSLM3V.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CPfKs0_W.js → file-tree-utils-CZ9kiPBg.js} +1 -1
- package/dist/public/assets/{folder-config-api-C00aXHgv.js → folder-config-api-fyPH9MBe.js} +1 -1
- package/dist/public/assets/{follow-file-ClUkwvTW.js → follow-file-BaVLq6cx.js} +1 -1
- package/dist/public/assets/i18n-gFEbQZNX.js +1 -0
- package/dist/public/assets/{index-DkaSwI0X.js → index-BSXrWulb.js} +8 -8
- package/dist/public/assets/{lint-config-client-CwpzRrsJ.js → lint-config-client-CedjssG2.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-DDivenan.js → markdownlint-rule-browser-BxyZeWyD.js} +1 -1
- package/dist/public/assets/{navigation-targets-BN-b0SwY.js → navigation-targets-BS-NLUXq.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-Dxiu79gQ.js → open-managed-artifact-tab-CVw5wiFN.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DTGiCG3P.js → pending-receive-nav-store-DyyFinN6.js} +1 -1
- package/dist/public/assets/{prop-types-RgJQCViX.js → prop-types-BKsu1Pla.js} +1 -1
- package/dist/public/assets/{receive-store-C7RBAUmu.js → receive-store-DbAkD4vm.js} +1 -1
- package/dist/public/assets/{selection-context-D_1ahjGj.js → selection-context-DJzHAfeZ.js} +1 -1
- package/dist/public/assets/{skill-actions-BKW-L6YY.js → skill-actions-ZS4T13Ax.js} +1 -1
- package/dist/public/assets/{skill-scope-D3fqbCKZ.js → skill-scope-CnsZQNOC.js} +1 -1
- package/dist/public/assets/{skills-api-BAB9Nk_K.js → skills-api-BYVWoHSe.js} +1 -1
- package/dist/public/assets/{src-Dfy4grTv.js → src-Kocvrol1.js} +1 -1
- package/dist/public/assets/{tag-pill-input-vgqgNkXB.js → tag-pill-input-CaySXFvi.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DEiFgbdU.js → target-navigation-intent-Djv7KQmO.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-Du0YYwUl.js → terminal-cli-display-DghW2MNw.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-C5JkD3Qb.js → terminal-launch-events-CBR70eGX.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-Cj_uo6eX.js → terminal-telemetry-C1pBFgq5.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-vxYjrFWQ.js → typing-burst-detector-mfCCGiI2.js} +1 -1
- package/dist/public/assets/{uninstall-C6wmbgyN.js → uninstall-DtIVpzW8.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DtCqiYlm.js → use-activity-panel-w209_TE7.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-DkVlJHc4.js → use-apply-config-color-theme-lxp6AFtt.js} +1 -1
- package/dist/public/assets/{use-collab-url-CpJYowg_.js → use-collab-url-B0illVqB.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DfHZqsch.js → use-live-xterm-theme-D4pfJFa6.js} +1 -1
- package/dist/public/assets/{use-open-skill-DdTYxJp4.js → use-open-skill-BF7e4PgL.js} +1 -1
- package/dist/public/assets/{use-popular-skills-C9TB91tU.js → use-popular-skills-D2yWnUy-.js} +1 -1
- package/dist/public/assets/{use-settings-route-D_8EQ_KO.js → use-settings-route-CSes8Uwx.js} +1 -1
- package/dist/public/assets/{use-skill-origin-BjB7AiHp.js → use-skill-origin-B7sZ5WC1.js} +1 -1
- package/dist/public/assets/{use-skills-DMV2hvXx.js → use-skills-BxzTRUh9.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-D2pvXg6e.js → use-terminal-enabled-DM8hVWf8.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-Do0ZBwge.js → use-timeline-entry-diff-DxEnQQVQ.js} +1 -1
- package/dist/public/assets/{use-workspace-e-krFmvC.js → use-workspace-DogmR2pu.js} +1 -1
- package/dist/public/index.html +44 -44
- package/dist/public/uninstall.html +3 -3
- package/dist/{repair-launch-json-D5bvpzmg.mjs → repair-launch-json-BlznlkBk.mjs} +2 -2
- package/dist/{repair-mcp-configs-CElx4zud.mjs → repair-mcp-configs-BDiFjXDX.mjs} +2 -2
- package/dist/src-CZf5WJMh.mjs +1 -0
- package/dist/{src-D3IYzczj.mjs → src-Cgko-Dkw.mjs} +2 -2
- package/dist/{start-BRLdH4Kk.mjs → start-EbZtu9nn.mjs} +2 -2
- package/dist/start-VyR6htyS.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-B_VMjNrS.mjs +0 -2
- package/dist/init-gTl1f87x.mjs +0 -1
- package/dist/loader-0WRtkHJU.mjs +0 -1
- package/dist/preview-D9IFuChZ.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CpyB0Ay7.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CaU-7RSA.js +0 -1
- package/dist/public/assets/i18n-DnAdj3V4.js +0 -1
- package/dist/src-BA5_eUW_.mjs +0 -1
- package/dist/start-Drc0EilO.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Tn as n,Wn as r,a as i,z as a}from"./DocumentContext-RfseIiCK.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./compiler-runtime-BfE3aGVn.js";import{s as u}from"./local-menu-action-bus-Cypryz6Z.js";import{t as d}from"./utils-CPqDy6Hr.js";import{a as f,g as p,h as m,i as h,m as g,n as _,t as v}from"./ChangedOutsideBadge-D047_w8_.js";import{t as y}from"./button-CA0dewJJ.js";import{i as b,n as x,t as S}from"./tooltip-DHXgxWLL.js";import{a as C,c as w,i as T,n as E,o as D,r as O,s as k,t as A}from"./dialog-DztIj-ZS.js";import{a as j,c as M,i as N,l as P,n as F,o as I,s as L,u as R}from"./context-menu-D1MgERPo.js";import{a as z,d as B,f as V,i as H,n as U,o as W,p as G,u as K}from"./dropdown-menu-CLgDYkh1.js";import{t as ee}from"./label-B5yNUINo.js";import{S as q,a as J,f as Y,h as te,i as X,m as ne,n as re,o as ie,p as ae,r as oe,s as se}from"./terminal-cli-display-Du0YYwUl.js";import{An as ce,Fn as le,Gt as ue,In as de,Kt as fe,Ln as pe,Lr as me,Nn as he,On as ge,Ot as _e,Rn as ve,Vt as ye,dn as be,jn as xe,ki as Se,kn as Ce,mn as we,mo as Te,on as Ee,ot as De,pn as Oe,so as ke,st as Ae,uo as je,za as Me}from"./dist-CKFXiBrL.js";import{i as Ne}from"./use-settings-route-D_8EQ_KO.js";import{t as Pe}from"./dist-DUfEoSbR.js";import{n as Z}from"./dist-B6jB2qbD2.js";import{c as Fe,n as Ie,o as Le}from"./documents-events-BNjnUfCu.js";import{h as Re}from"./use-apply-config-color-theme-DkVlJHc4.js";import{t as ze}from"./parse-api-error-DfesE4Y7.js";import{n as Be,t as Ve}from"./workspace-paths-CKUFX0v6.js";import{t as He}from"./use-workspace-e-krFmvC.js";import{t as Ue}from"./createLucideIcon-Bhw2PmPp.js";import{t as We}from"./RegisteredAgentIcon-gjOJZp_B.js";import{n as Ge,r as Ke}from"./ManagedArtifactProperties-BfpBSbt8.js";import{n as qe}from"./CopyButton-ByR_1gcU.js";import{t as Je}from"./folder-open-DUSc8NL8.js";import{t as Ye}from"./folder-CopDpuy5.js";import{t as Xe}from"./list-plus-DBdmIc6v.js";import{t as Ze}from"./trash-2-N0ilsnnr.js";import{t as Qe}from"./input-BYiOK210.js";import{J as $e,q as et,x as tt}from"./navigation-targets-BN-b0SwY.js";import{a as nt,c as rt,f as it,n as at,r as ot}from"./skill-scope-D3fqbCKZ.js";import{t as st}from"./badge-DFX4S3a5.js";import{A as ct,C as lt,M as ut,a as dt,b as ft,k as pt,m as mt,n as ht,r as gt,t as _t,u as vt,w as yt,x as bt,y as xt}from"./skills-api-BAB9Nk_K.js";import{t as St}from"./use-skills-DMV2hvXx.js";import{t as Ct}from"./use-open-skill-DdTYxJp4.js";import{n as wt}from"./clipboard-adapter-DqemxSWT.js";import{t as Tt}from"./DiffView-C-imhjB8.js";import{n as Et}from"./platform-labels-glrfxkSh.js";var Q=t(),$=e(o(),1),Dt=l();function Ot(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function kt(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=ze(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:Pe._({id:`1vn0CI`})}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:Pe._({id:`NoY1k4`})}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??Pe._({id:`MrUmCD`})}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function At(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?Ot(e):kt()}var jt=`ok:skill:cowork:installed`,Mt=`1`,Nt=250,Pt=`/api/skill/install-state`;function Ft(e){return`${jt}:v${e}`}var It=new Map;async function Lt(e={},t={}){let n=t.force?`__force__`:`__default__`,r=It.get(n);if(r)return r;let i=Rt(e,t);return It.set(n,i),i.finally(()=>{It.get(n)===i&&It.delete(n)}),i}async function Rt(e,t){let n=e.installer===void 0?At():e.installer,r=zt(e.storage),i=e.fetchSnapshot??Vt,a=e.serverTimeoutMs??Nt,o=null;if(!t.force){try{o=await Ht(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Ft(o?.currentVersion??e.fallbackSkillVersion??Bt());if(!t.force&&r?.getItem(s)===Mt)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,Mt)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function zt(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Bt(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Vt(){let e;try{e=await fetch(Pt,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Ht(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function Ut(e){return Lt({},e)}function Wt(){return Lt({},{force:!0})}async function Gt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function Kt(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return Gt({target:`claude-cowork`,url:be({mode:`cowork`},e)},n);case`claude-code`:return Gt({target:`claude-code`,url:be({mode:`code`},e)},n);case`codex`:return Gt({target:`codex`,url:Oe(e)},n);case`cursor`:return Gt({target:`cursor`,url:we(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function qt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var Jt=`open-knowledge:agent-thread-launch`;function Yt(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(Jt,{detail:e}))}function Xt(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(Jt,n),()=>t.removeEventListener(Jt,n)}function Zt(e){if(!e.docName||!e.workspace)return null;let t=Ve(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Be(n,t,r)}}function Qt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function $t(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function en(e){return te(e.installUrl).then(()=>void 0)}function tn(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function nn(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function rn(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??Ve(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:Be(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function an(e){return`Opened in ${e}.`}function on(e,t=1){return t>=3?Pe._({id:`bi2C2s`,values:{displayName:e}}):t===2?Pe._({id:`1J0c0X`,values:{displayName:e}}):Pe._({id:`Xs7IcT`,values:{displayName:e}})}function sn(e){return e>=3?null:e===2?Pe._({id:`Xp94R1`}):Pe._({id:`6gRgw8`})}function cn(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function ln(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function un(e,t,n,r){return e.compose?Ee(ln(e.compose,t,n,r)):e.selection?le({...e.selection,target:t,transport:r}):e.skill?de(e.skill.name,e.skill.scope,n):e.ask?ge(e.ask.relativePath,e.ask.instruction,n,t,r):Se(e.docContext===null?e.folderRelativePath?he(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?ce(n,e.instruction,r):Ce(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):xe(e.docContext.relativePath,n,e.instruction,r))}function dn(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${De} ${un(e,ue[t].handoffTarget,!1,`terminal`)}`:pe(e.docContext?.relativePath??null)}function fn(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${Ae} ${un(e,`claude-code`,!1,`terminal`)}`:ve(e.docContext?.relativePath??null)}function pn(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function mn(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function hn(e,t){Yt({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:fn(e),docName:pn(e),titleHint:mn(e)})}async function gn(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(Pe._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(Pe._({id:`PezM4_`})),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(Pe._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:un(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=cn(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(an(u));else{let i=sn(r),a=on(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{gn(e,t,n,r+1)}}})}return a}function _n(e){return ae.find(t=>t.id===e)?.displayName??e}function vn(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function yn(){return{dispatchHandoff:Kt,recordHandoff:qt,toast:{success:e=>{Z.success(e)},error:(e,t)=>{Z.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>vn(),getDisplayName:_n,ensureCoworkSkillInstalled:Ut,autoOpen:!0}}function bn(){let e=(0,Dt.c)(2),{merged:t}=Re(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>gn(e,t,{...yn(),autoOpen:n}),reinstallCoworkSkill:Wt},e[0]=n,e[1]=r),r}var xn=Ue(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Sn=Ue(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),Cn=Ue(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),wn=Ue(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);function Tn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(N,{...r}):(0,Q.jsx)(H,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function En(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(j,{...r}):(0,Q.jsx)(z,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Dn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(F,{...r}):(0,Q.jsx)(U,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function On(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(I,{...r}):(0,Q.jsx)(W,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function kn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(L,{...r}):(0,Q.jsx)(K,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function An(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(M,{...r}):(0,Q.jsx)(B,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function jn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(P,{...r}):(0,Q.jsx)(V,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Mn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(R,{...r}):(0,Q.jsx)(G,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var Nn=Object.freeze({hosts:null,source:null}),Pn=new Map,Fn=new Map;function In(e,t){return`${e}:${t}`}function Ln(e){return Pn.get(e)??Nn}function Rn(e,t){let n=Fn.get(e)??new Set;return Fn.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&Fn.delete(e)}}function zn(e,t){let n=Ln(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?Pn.delete(e):Pn.set(e,r);for(let t of Fn.get(e)??[])t()}}var Bn=ye.options,Vn=`min-w-[24rem]`;function Hn(e,t){let n=(0,Dt.c)(45),r=t.installingName===e.name,i=(0,$.useRef)(e),[a,o]=(0,$.useState)(!1),s=(0,$.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,$.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,$.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=In(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>Rn(m,e),g=()=>Ln(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,$.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&zn(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,$.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,$.useRef)(e.hosts),O,k;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},k=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=k):(O=n[21],k=n[22]),(0,$.useEffect)(O,k);let A;n[23]===e.hosts?A=n[24]:(A=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=A);let j=A,M,N;n[25]!==m||n[26]!==j?(M=()=>{let e=Ln(m).hosts;e&&[...e].sort().join(`,`)===j&&zn(m,{hosts:null})},N=[j,m],n[25]=m,n[26]=j,n[27]=M,n[28]=N):(M=n[27],N=n[28]),(0,$.useEffect)(M,N);let P=(0,$.useRef)(null),F=(0,$.useRef)(null),I,L;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{P.current&&clearTimeout(P.current),F.current?.(),F.current=null},L=[],n[29]=I,n[30]=L):(I=n[29],L=n[30]),(0,$.useEffect)(I,L);let R;n[31]!==t||n[32]!==m||n[33]!==e?(R=function(n,r){D.current=n,zn(m,{hosts:n}),P.current&&clearTimeout(P.current);let i=async()=>{F.current=null,P.current=null;let r=await t.install(e,n.filter(me));if(!r.ok){zn(m,{hosts:null});return}D.current=[...r.hosts],zn(m,{hosts:[...r.hosts]})};r?(F.current=()=>void i(),P.current=setTimeout(()=>void i(),350)):(F.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=R):R=n[34];let z=R,B;return n[35]!==t||n[36]!==z||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(B={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),z([...n],!0)},installAll(){let t=D.current.filter(Gn),n=e.installableEditors??Bn,r=Bn.filter(e=>n.includes(e)||D.current.includes(e));z([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>ft({scope:e.scope,name:e.name,dir:n,mode:r})).then(Wn)},unplaceAt(n){t.runLocationWrite(e,()=>ct({scope:e.scope,name:e.name,path:n})).then(Un)},setSource(n){zn(m,{source:n}),t.runLocationWrite(e,()=>pt({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(zn(m,{source:null}),Z.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=z,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=B):B=n[44],B}function Un(e){e.ok||Z.error(e.error)}function Wn(e){e.ok||Z.error(e.error)}function Gn(e){return!Bn.includes(e)}function Kn(e){let t=(0,Dt.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(b,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(x,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(S,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function qn(e){let t=(0,Dt.c)(165),{toggles:n,skill:r,onResolveFork:i,onRunStart:a,menuKind:o}=e,l=o===void 0?`dropdown`:o,{_:u}=c(),{hostSet:d,toggleEditor:f,installAll:p}=n,m;t[0]===r?m=t[1]:(m=e=>r?`${rt(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=m);let h=m,g=St(),b;t[2]!==g.data||t[3]!==g.status||t[4]!==r?(b=r!==void 0&&((r.hosts??[]).includes(`agents`)||g.status===`ready`&&g.data.some(ar)),t[2]=g.data,t[3]=g.status,t[4]=r,t[5]=b):b=t[5];let x=b,S;t[6]!==g.data||t[7]!==g.status||t[8]!==r?(S=r?.hostAliases??(r&&g.status===`ready`?Object.assign({},...g.data.filter(e=>e.scope===r.scope).map(ir)):{}),t[6]=g.data,t[7]=g.status,t[8]=r,t[9]=S):S=t[9];let C=S,w;t[10]!==g.data||t[11]!==g.status||t[12]!==r?(w=r?.installableEditors??(r&&g.status===`ready`?g.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=g.data,t[11]=g.status,t[12]=r,t[13]=w):w=t[13];let T=w,E,D,O,k,A,j,M;if(t[14]!==u||t[15]!==C||t[16]!==g.data||t[17]!==g.status||t[18]!==d||t[19]!==x||t[20]!==p||t[21]!==T||t[22]!==l||t[23]!==i||t[24]!==a||t[25]!==h||t[26]!==r||t[27]!==f||t[28]!==n){let e=T?new Set(T):null,o;t[36]===C?o=t[37]:(o=e=>!(e in C),t[36]=C,t[37]=o);let c=(x?[`agents`,...Bn]:Bn).filter(o).filter(t=>t===`agents`||e===null||e.has(t)||d.has(t)),m;t[38]===h?m=t[39]:(m=e=>h(e),t[38]=h,t[39]=m);let b=new Set(c.map(m)),S=r?.scope===`global`?`~/`:``,w;t[40]!==S||t[41]!==r?(w=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[40]=S,t[41]=r,t[42]=w):w=t[42];let N=w,P=N!==null&&!b.has(N)?N:null,F=P===null?n.sourceHost??r?.hosts?.[0]:void 0,I;t[43]===C?I=t[44]:(I=e=>at(C,e),t[43]=C,t[44]=I);let L=I,R=rr,z;t[45]!==u||t[46]!==L?(z=e=>{let t=L(e);return t.length===0?!0:window.confirm(u({id:`Uobeu9`,values:{0:t.map(R).join(`, `),rootRel:e}}))},t[45]=u,t[46]=L,t[47]=z):z=t[47];let B=z,V;t[48]!==u||t[49]!==r?(V=(e,t)=>{let n=e.includes(`/`)?e:rt(e,r?.scope??`project`);return(0,Q.jsx)(Kn,{hint:u({id:`0dslv8`,values:{0:R(e),1:R(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":u({id:`G6Lrs_`,values:{0:R(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(u({id:`iiqOKM`,values:{0:R(e),1:r.name,2:R(e),subRoot:n,poolRootRel:t}}))&&bt({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?Le():Z.error(u({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(_,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[48]=u,t[49]=r,t[50]=V):V=t[50];let H=V,U;t[51]===r?.conflictHosts?U=t[52]:(U=r?.conflictHosts??[],t[51]=r?.conflictHosts,t[52]=U);let W;t[53]===U?W=t[54]:(W=new Set(U),t[53]=U,t[54]=W);let G=W,K;t[55]===r?.driftPaths?K=t[56]:(K=r?.driftPaths??[],t[55]=r?.driftPaths,t[56]=K);let ee;t[57]===K?ee=t[58]:(ee=new Set(K),t[57]=K,t[58]=ee);let q=ee;E=n.installing;let J=nr,Y;t[59]===r?.symlinkedHosts?Y=t[60]:(Y=r?.symlinkedHosts??[],t[59]=r?.symlinkedHosts,t[60]=Y);let te;t[61]===Y?te=t[62]:(te=new Set(Y),t[61]=Y,t[62]=te);let X=te,ne=[...[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(tr)],re=ne.filter(er).length;O=ne.length===0?n.linkMode?`link`:`copy`:re*2>=ne.length?`link`:`copy`;let ie;t[63]!==C||t[64]!==G||t[65]!==d||t[66]!==X||t[67]!==h||t[68]!==F?(ie=[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:h(e)??R(e),mode:X.has(e)?`link`:`copy`})),t[63]=C,t[64]=G,t[65]=d,t[66]=X,t[67]=h,t[68]=F,t[69]=ie):ie=t[69];let ae;t[70]===r?.customPlacements?ae=t[71]:(ae=r?.customPlacements??[],t[70]=r?.customPlacements,t[71]=ae);let oe;if(t[72]!==S||t[73]!==ie||t[74]!==ae){let e;t[76]===S?e=t[77]:(e=e=>({target:ot(e),display:`${S}${e.path}`,mode:e.mode}),t[76]=S,t[77]=e),oe=[...ie,...ae.map(e)],t[72]=S,t[73]=ie,t[74]=ae,t[75]=oe}else oe=t[75];D=oe;let se;t[78]!==u||t[79]!==a||t[80]!==n?(se=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(Kn,{hint:u(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(u(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(s,{id:`uUCrBv`}):(0,Q.jsx)(s,{id:`iaPtht`})})})},t[78]=u,t[79]=a,t[80]=n,t[81]=se):se=t[81];let ce=se,le;t[82]===r?.customPlacements?le=t[83]:(le=r?.customPlacements??[],t[82]=r?.customPlacements,t[83]=le);let ue=new Map(le.map($n)),de=new Set(ue.keys());if(g.status===`ready`&&r){for(let e of g.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=ot(t);e!==``&&de.add(e)}}let fe=r===void 0?[]:[...de].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:ue.get(e)??null})).filter(e=>!b.has(e.display)&&e.display!==N&&!(e.root in C)),pe;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsx)(s,{id:`npcziF`}),t[84]=pe):pe=t[84];let me;t[85]===u?me=t[86]:(me=u({id:`6f_UX4`}),t[85]=u,t[86]=me);let he;t[87]===p?he=t[88]:(he=()=>p(),t[87]=p,t[88]=he);let ge;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Q.jsx)(s,{id:`N40H-G`}),t[89]=ge):ge=t[89];let _e;t[90]!==E||t[91]!==he?(_e=(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:E,onClick:he,"data-testid":`skill-install-all`,children:ge}),t[90]=E,t[91]=he,t[92]=_e):_e=t[92];let ve;t[93]!==me||t[94]!==_e?(ve=(0,Q.jsx)(Kn,{hint:me,children:_e}),t[93]=me,t[94]=_e,t[95]=ve):ve=t[95],t[96]!==l||t[97]!==ve?(k=(0,Q.jsxs)(On,{menuKind:l,className:`flex items-center justify-between gap-2`,children:[pe,ve]}),t[96]=l,t[97]=ve,t[98]=k):k=t[98],t[99]!==u||t[100]!==H||t[101]!==E||t[102]!==l||t[103]!==P||t[104]!==L?(A=P===null?null:(0,Q.jsx)(Kn,{hint:u({id:`pXB6SL`}),children:(0,Q.jsxs)(Dn,{menuKind:l,disabled:E,checked:!0,onSelect:Qn,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(Ye,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:P}),(()=>{let e=J(P).split(`/`).slice(0,-1).join(`/`),t=L(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>H(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})})]})]})}),t[99]=u,t[100]=H,t[101]=E,t[102]=l,t[103]=P,t[104]=L,t[105]=A):A=t[105];let ye;t[106]!==u||t[107]!==H||t[108]!==E||t[109]!==B||t[110]!==G||t[111]!==ce||t[112]!==q||t[113]!==O||t[114]!==d||t[115]!==X||t[116]!==l||t[117]!==i||t[118]!==h||t[119]!==r?.hosts||t[120]!==F||t[121]!==L||t[122]!==f||t[123]!==n?(ye=e=>{let t=h(e),a=e===`agents`?`.agents`:Me[e],o=J(t).split(`/`).slice(0,-1).join(`/`),c=L(o);return(0,Q.jsx)(Kn,{hint:G.has(e)?u({id:`8HvJlU`,values:{0:t??a}}):e===F?t?u({id:`ssk6rl`,values:{path:t}}):a:d.has(e)?u(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):u(t?O===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(Dn,{menuKind:l,disabled:E,checked:d.has(e),onCheckedChange:t=>{G.has(e)||t===!0&&!B(o)||f(e,t===!0)},onSelect:Zn,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(_,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),c.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:c.map(e=>H(e,o))}):null,G.has(e)?(0,Q.jsx)(Kn,{hint:u({id:`_O7dJS`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(s,{id:`jng7Ko`})})}):e===F?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})}):d.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!E&&(X.has(e)?`link`:`copy`)!==O?ce(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(Kn,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]}):null,!E&&q.has(J(t))?(0,Q.jsx)(Kn,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[106]=u,t[107]=H,t[108]=E,t[109]=B,t[110]=G,t[111]=ce,t[112]=q,t[113]=O,t[114]=d,t[115]=X,t[116]=l,t[117]=i,t[118]=h,t[119]=r?.hosts,t[120]=F,t[121]=L,t[122]=f,t[123]=n,t[124]=ye):ye=t[124],j=c.map(ye);let be;t[125]!==u||t[126]!==H||t[127]!==E||t[128]!==B||t[129]!==ce||t[130]!==q||t[131]!==O||t[132]!==l||t[133]!==L||t[134]!==n?(be=e=>(0,Q.jsx)(Kn,{hint:e.placed===null?u(O===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):u({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(Dn,{menuKind:l,disabled:E,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!B(e.root))return;n.placeAt(e.root,O)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:Xn,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(_,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(Ye,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),L(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:L(e.root).map(t=>H(t,e.root))}):null,!E&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(Kn,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!E&&e.placed.mode!==O?ce(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(Kn,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]})]})]})},e.root),t[125]=u,t[126]=H,t[127]=E,t[128]=B,t[129]=ce,t[130]=q,t[131]=O,t[132]=l,t[133]=L,t[134]=n,t[135]=be):be=t[135],M=fe.map(be),t[14]=u,t[15]=C,t[16]=g.data,t[17]=g.status,t[18]=d,t[19]=x,t[20]=p,t[21]=T,t[22]=l,t[23]=i,t[24]=a,t[25]=h,t[26]=r,t[27]=f,t[28]=n,t[29]=E,t[30]=D,t[31]=O,t[32]=k,t[33]=A,t[34]=j,t[35]=M}else E=t[29],D=t[30],O=t[31],k=t[32],A=t[33],j=t[34],M=t[35];let N;t[136]!==u||t[137]!==E||t[138]!==D||t[139]!==O||t[140]!==a||t[141]!==n?(N=D.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=O===`link`?`copy`:`link`,r=D.filter(e=>e.mode!==t);if(r.length===0)return;let i=u(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),o=u(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),s=r.map(Yn).join(`
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Tn as n,Wn as r,a as i,z as a}from"./DocumentContext-dF2iyDoR.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./compiler-runtime-BfE3aGVn.js";import{s as u}from"./local-menu-action-bus-Cypryz6Z.js";import{t as d}from"./utils-CPqDy6Hr.js";import{a as f,g as p,h as m,i as h,m as g,n as _,t as v}from"./ChangedOutsideBadge-ChinF2OV.js";import{t as y}from"./button-CA0dewJJ.js";import{i as b,n as x,t as S}from"./tooltip-DHXgxWLL.js";import{a as C,c as w,i as T,n as E,o as D,r as O,s as k,t as A}from"./dialog-DztIj-ZS.js";import{a as j,c as M,i as N,l as P,n as F,o as I,s as L,u as R}from"./context-menu-D1MgERPo.js";import{a as z,d as B,f as V,i as H,n as U,o as W,p as G,u as K}from"./dropdown-menu-CLgDYkh1.js";import{t as ee}from"./label-B5yNUINo.js";import{S as q,a as J,f as Y,h as te,i as X,m as ne,n as re,o as ie,p as ae,r as oe,s as se}from"./terminal-cli-display-DghW2MNw.js";import{An as ce,Fn as le,Gt as ue,In as de,Kt as fe,Ln as pe,Lr as me,Nn as he,On as ge,Ot as _e,Rn as ve,Vt as ye,dn as be,jn as xe,ki as Se,kn as Ce,mn as we,mo as Te,on as Ee,ot as De,pn as Oe,so as ke,st as Ae,uo as je,za as Me}from"./dist-8YlYwLg8.js";import{i as Ne}from"./use-settings-route-CSes8Uwx.js";import{t as Pe}from"./dist-DUfEoSbR.js";import{n as Z}from"./dist-B6jB2qbD2.js";import{c as Fe,n as Ie,o as Le}from"./documents-events-DKMYe_0X.js";import{h as Re}from"./use-apply-config-color-theme-lxp6AFtt.js";import{t as ze}from"./parse-api-error-DfesE4Y7.js";import{n as Be,t as Ve}from"./workspace-paths-CKUFX0v6.js";import{t as He}from"./use-workspace-DogmR2pu.js";import{t as Ue}from"./createLucideIcon-Bhw2PmPp.js";import{t as We}from"./RegisteredAgentIcon-gjOJZp_B.js";import{n as Ge,r as Ke}from"./ManagedArtifactProperties-CNc3-2jZ.js";import{n as qe}from"./CopyButton-ByR_1gcU.js";import{t as Je}from"./folder-open-DUSc8NL8.js";import{t as Ye}from"./folder-CopDpuy5.js";import{t as Xe}from"./list-plus-DBdmIc6v.js";import{t as Ze}from"./trash-2-N0ilsnnr.js";import{t as Qe}from"./input-BYiOK210.js";import{J as $e,q as et,x as tt}from"./navigation-targets-BS-NLUXq.js";import{a as nt,c as rt,f as it,n as at,r as ot}from"./skill-scope-CnsZQNOC.js";import{t as st}from"./badge-DFX4S3a5.js";import{A as ct,C as lt,M as ut,a as dt,b as ft,k as pt,m as mt,n as ht,r as gt,t as _t,u as vt,w as yt,x as bt,y as xt}from"./skills-api-BYVWoHSe.js";import{t as St}from"./use-skills-BxzTRUh9.js";import{t as Ct}from"./use-open-skill-BF7e4PgL.js";import{n as wt}from"./clipboard-adapter-DqemxSWT.js";import{t as Tt}from"./DiffView-C-imhjB8.js";import{n as Et}from"./platform-labels-glrfxkSh.js";var Q=t(),$=e(o(),1),Dt=l();function Ot(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function kt(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=ze(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:Pe._({id:`1vn0CI`})}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:Pe._({id:`NoY1k4`})}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??Pe._({id:`MrUmCD`})}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function At(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?Ot(e):kt()}var jt=`ok:skill:cowork:installed`,Mt=`1`,Nt=250,Pt=`/api/skill/install-state`;function Ft(e){return`${jt}:v${e}`}var It=new Map;async function Lt(e={},t={}){let n=t.force?`__force__`:`__default__`,r=It.get(n);if(r)return r;let i=Rt(e,t);return It.set(n,i),i.finally(()=>{It.get(n)===i&&It.delete(n)}),i}async function Rt(e,t){let n=e.installer===void 0?At():e.installer,r=zt(e.storage),i=e.fetchSnapshot??Vt,a=e.serverTimeoutMs??Nt,o=null;if(!t.force){try{o=await Ht(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Ft(o?.currentVersion??e.fallbackSkillVersion??Bt());if(!t.force&&r?.getItem(s)===Mt)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,Mt)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function zt(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Bt(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Vt(){let e;try{e=await fetch(Pt,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Ht(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function Ut(e){return Lt({},e)}function Wt(){return Lt({},{force:!0})}async function Gt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function Kt(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return Gt({target:`claude-cowork`,url:be({mode:`cowork`},e)},n);case`claude-code`:return Gt({target:`claude-code`,url:be({mode:`code`},e)},n);case`codex`:return Gt({target:`codex`,url:Oe(e)},n);case`cursor`:return Gt({target:`cursor`,url:we(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function qt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var Jt=`open-knowledge:agent-thread-launch`;function Yt(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(Jt,{detail:e}))}function Xt(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(Jt,n),()=>t.removeEventListener(Jt,n)}function Zt(e){if(!e.docName||!e.workspace)return null;let t=Ve(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Be(n,t,r)}}function Qt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function $t(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function en(e){return te(e.installUrl).then(()=>void 0)}function tn(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function nn(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function rn(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??Ve(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:Be(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function an(e){return`Opened in ${e}.`}function on(e,t=1){return t>=3?Pe._({id:`bi2C2s`,values:{displayName:e}}):t===2?Pe._({id:`1J0c0X`,values:{displayName:e}}):Pe._({id:`Xs7IcT`,values:{displayName:e}})}function sn(e){return e>=3?null:e===2?Pe._({id:`Xp94R1`}):Pe._({id:`6gRgw8`})}function cn(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function ln(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function un(e,t,n,r){return e.compose?Ee(ln(e.compose,t,n,r)):e.selection?le({...e.selection,target:t,transport:r}):e.skill?de(e.skill.name,e.skill.scope,n):e.ask?ge(e.ask.relativePath,e.ask.instruction,n,t,r):Se(e.docContext===null?e.folderRelativePath?he(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?ce(n,e.instruction,r):Ce(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):xe(e.docContext.relativePath,n,e.instruction,r))}function dn(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${De} ${un(e,ue[t].handoffTarget,!1,`terminal`)}`:pe(e.docContext?.relativePath??null)}function fn(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${Ae} ${un(e,`claude-code`,!1,`terminal`)}`:ve(e.docContext?.relativePath??null)}function pn(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function mn(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function hn(e,t){Yt({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:fn(e),docName:pn(e),titleHint:mn(e)})}async function gn(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(Pe._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(Pe._({id:`PezM4_`})),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(Pe._({id:`wbpoGe`,values:{message:t}})),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:un(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=cn(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(an(u));else{let i=sn(r),a=on(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{gn(e,t,n,r+1)}}})}return a}function _n(e){return ae.find(t=>t.id===e)?.displayName??e}function vn(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function yn(){return{dispatchHandoff:Kt,recordHandoff:qt,toast:{success:e=>{Z.success(e)},error:(e,t)=>{Z.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>vn(),getDisplayName:_n,ensureCoworkSkillInstalled:Ut,autoOpen:!0}}function bn(){let e=(0,Dt.c)(2),{merged:t}=Re(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>gn(e,t,{...yn(),autoOpen:n}),reinstallCoworkSkill:Wt},e[0]=n,e[1]=r),r}var xn=Ue(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Sn=Ue(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),Cn=Ue(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),wn=Ue(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);function Tn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(N,{...r}):(0,Q.jsx)(H,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function En(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(j,{...r}):(0,Q.jsx)(z,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Dn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(F,{...r}):(0,Q.jsx)(U,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function On(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(I,{...r}):(0,Q.jsx)(W,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function kn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(L,{...r}):(0,Q.jsx)(K,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function An(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(M,{...r}):(0,Q.jsx)(B,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function jn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(P,{...r}):(0,Q.jsx)(V,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function Mn(e){let t=(0,Dt.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,Q.jsx)(R,{...r}):(0,Q.jsx)(G,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var Nn=Object.freeze({hosts:null,source:null}),Pn=new Map,Fn=new Map;function In(e,t){return`${e}:${t}`}function Ln(e){return Pn.get(e)??Nn}function Rn(e,t){let n=Fn.get(e)??new Set;return Fn.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&Fn.delete(e)}}function zn(e,t){let n=Ln(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?Pn.delete(e):Pn.set(e,r);for(let t of Fn.get(e)??[])t()}}var Bn=ye.options,Vn=`min-w-[24rem]`;function Hn(e,t){let n=(0,Dt.c)(45),r=t.installingName===e.name,i=(0,$.useRef)(e),[a,o]=(0,$.useState)(!1),s=(0,$.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,$.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,$.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=In(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>Rn(m,e),g=()=>Ln(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,$.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&zn(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,$.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,$.useRef)(e.hosts),O,k;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},k=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=k):(O=n[21],k=n[22]),(0,$.useEffect)(O,k);let A;n[23]===e.hosts?A=n[24]:(A=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=A);let j=A,M,N;n[25]!==m||n[26]!==j?(M=()=>{let e=Ln(m).hosts;e&&[...e].sort().join(`,`)===j&&zn(m,{hosts:null})},N=[j,m],n[25]=m,n[26]=j,n[27]=M,n[28]=N):(M=n[27],N=n[28]),(0,$.useEffect)(M,N);let P=(0,$.useRef)(null),F=(0,$.useRef)(null),I,L;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{P.current&&clearTimeout(P.current),F.current?.(),F.current=null},L=[],n[29]=I,n[30]=L):(I=n[29],L=n[30]),(0,$.useEffect)(I,L);let R;n[31]!==t||n[32]!==m||n[33]!==e?(R=function(n,r){D.current=n,zn(m,{hosts:n}),P.current&&clearTimeout(P.current);let i=async()=>{F.current=null,P.current=null;let r=await t.install(e,n.filter(me));if(!r.ok){zn(m,{hosts:null});return}D.current=[...r.hosts],zn(m,{hosts:[...r.hosts]})};r?(F.current=()=>void i(),P.current=setTimeout(()=>void i(),350)):(F.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=R):R=n[34];let z=R,B;return n[35]!==t||n[36]!==z||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(B={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),z([...n],!0)},installAll(){let t=D.current.filter(Gn),n=e.installableEditors??Bn,r=Bn.filter(e=>n.includes(e)||D.current.includes(e));z([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>ft({scope:e.scope,name:e.name,dir:n,mode:r})).then(Wn)},unplaceAt(n){t.runLocationWrite(e,()=>ct({scope:e.scope,name:e.name,path:n})).then(Un)},setSource(n){zn(m,{source:n}),t.runLocationWrite(e,()=>pt({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(zn(m,{source:null}),Z.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=z,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=B):B=n[44],B}function Un(e){e.ok||Z.error(e.error)}function Wn(e){e.ok||Z.error(e.error)}function Gn(e){return!Bn.includes(e)}function Kn(e){let t=(0,Dt.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(b,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(x,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(S,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function qn(e){let t=(0,Dt.c)(165),{toggles:n,skill:r,onResolveFork:i,onRunStart:a,menuKind:o}=e,l=o===void 0?`dropdown`:o,{_:u}=c(),{hostSet:d,toggleEditor:f,installAll:p}=n,m;t[0]===r?m=t[1]:(m=e=>r?`${rt(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=m);let h=m,g=St(),b;t[2]!==g.data||t[3]!==g.status||t[4]!==r?(b=r!==void 0&&((r.hosts??[]).includes(`agents`)||g.status===`ready`&&g.data.some(ar)),t[2]=g.data,t[3]=g.status,t[4]=r,t[5]=b):b=t[5];let x=b,S;t[6]!==g.data||t[7]!==g.status||t[8]!==r?(S=r?.hostAliases??(r&&g.status===`ready`?Object.assign({},...g.data.filter(e=>e.scope===r.scope).map(ir)):{}),t[6]=g.data,t[7]=g.status,t[8]=r,t[9]=S):S=t[9];let C=S,w;t[10]!==g.data||t[11]!==g.status||t[12]!==r?(w=r?.installableEditors??(r&&g.status===`ready`?g.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=g.data,t[11]=g.status,t[12]=r,t[13]=w):w=t[13];let T=w,E,D,O,k,A,j,M;if(t[14]!==u||t[15]!==C||t[16]!==g.data||t[17]!==g.status||t[18]!==d||t[19]!==x||t[20]!==p||t[21]!==T||t[22]!==l||t[23]!==i||t[24]!==a||t[25]!==h||t[26]!==r||t[27]!==f||t[28]!==n){let e=T?new Set(T):null,o;t[36]===C?o=t[37]:(o=e=>!(e in C),t[36]=C,t[37]=o);let c=(x?[`agents`,...Bn]:Bn).filter(o).filter(t=>t===`agents`||e===null||e.has(t)||d.has(t)),m;t[38]===h?m=t[39]:(m=e=>h(e),t[38]=h,t[39]=m);let b=new Set(c.map(m)),S=r?.scope===`global`?`~/`:``,w;t[40]!==S||t[41]!==r?(w=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[40]=S,t[41]=r,t[42]=w):w=t[42];let N=w,P=N!==null&&!b.has(N)?N:null,F=P===null?n.sourceHost??r?.hosts?.[0]:void 0,I;t[43]===C?I=t[44]:(I=e=>at(C,e),t[43]=C,t[44]=I);let L=I,R=rr,z;t[45]!==u||t[46]!==L?(z=e=>{let t=L(e);return t.length===0?!0:window.confirm(u({id:`Uobeu9`,values:{0:t.map(R).join(`, `),rootRel:e}}))},t[45]=u,t[46]=L,t[47]=z):z=t[47];let B=z,V;t[48]!==u||t[49]!==r?(V=(e,t)=>{let n=e.includes(`/`)?e:rt(e,r?.scope??`project`);return(0,Q.jsx)(Kn,{hint:u({id:`0dslv8`,values:{0:R(e),1:R(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":u({id:`G6Lrs_`,values:{0:R(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(u({id:`iiqOKM`,values:{0:R(e),1:r.name,2:R(e),subRoot:n,poolRootRel:t}}))&&bt({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?Le():Z.error(u({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(_,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[48]=u,t[49]=r,t[50]=V):V=t[50];let H=V,U;t[51]===r?.conflictHosts?U=t[52]:(U=r?.conflictHosts??[],t[51]=r?.conflictHosts,t[52]=U);let W;t[53]===U?W=t[54]:(W=new Set(U),t[53]=U,t[54]=W);let G=W,K;t[55]===r?.driftPaths?K=t[56]:(K=r?.driftPaths??[],t[55]=r?.driftPaths,t[56]=K);let ee;t[57]===K?ee=t[58]:(ee=new Set(K),t[57]=K,t[58]=ee);let q=ee;E=n.installing;let J=nr,Y;t[59]===r?.symlinkedHosts?Y=t[60]:(Y=r?.symlinkedHosts??[],t[59]=r?.symlinkedHosts,t[60]=Y);let te;t[61]===Y?te=t[62]:(te=new Set(Y),t[61]=Y,t[62]=te);let X=te,ne=[...[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(tr)],re=ne.filter(er).length;O=ne.length===0?n.linkMode?`link`:`copy`:re*2>=ne.length?`link`:`copy`;let ie;t[63]!==C||t[64]!==G||t[65]!==d||t[66]!==X||t[67]!==h||t[68]!==F?(ie=[...d].filter(e=>e!==F&&!(e in C)&&!G.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:h(e)??R(e),mode:X.has(e)?`link`:`copy`})),t[63]=C,t[64]=G,t[65]=d,t[66]=X,t[67]=h,t[68]=F,t[69]=ie):ie=t[69];let ae;t[70]===r?.customPlacements?ae=t[71]:(ae=r?.customPlacements??[],t[70]=r?.customPlacements,t[71]=ae);let oe;if(t[72]!==S||t[73]!==ie||t[74]!==ae){let e;t[76]===S?e=t[77]:(e=e=>({target:ot(e),display:`${S}${e.path}`,mode:e.mode}),t[76]=S,t[77]=e),oe=[...ie,...ae.map(e)],t[72]=S,t[73]=ie,t[74]=ae,t[75]=oe}else oe=t[75];D=oe;let se;t[78]!==u||t[79]!==a||t[80]!==n?(se=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(Kn,{hint:u(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(u(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(s,{id:`uUCrBv`}):(0,Q.jsx)(s,{id:`iaPtht`})})})},t[78]=u,t[79]=a,t[80]=n,t[81]=se):se=t[81];let ce=se,le;t[82]===r?.customPlacements?le=t[83]:(le=r?.customPlacements??[],t[82]=r?.customPlacements,t[83]=le);let ue=new Map(le.map($n)),de=new Set(ue.keys());if(g.status===`ready`&&r){for(let e of g.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=ot(t);e!==``&&de.add(e)}}let fe=r===void 0?[]:[...de].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:ue.get(e)??null})).filter(e=>!b.has(e.display)&&e.display!==N&&!(e.root in C)),pe;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsx)(s,{id:`npcziF`}),t[84]=pe):pe=t[84];let me;t[85]===u?me=t[86]:(me=u({id:`6f_UX4`}),t[85]=u,t[86]=me);let he;t[87]===p?he=t[88]:(he=()=>p(),t[87]=p,t[88]=he);let ge;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Q.jsx)(s,{id:`N40H-G`}),t[89]=ge):ge=t[89];let _e;t[90]!==E||t[91]!==he?(_e=(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:E,onClick:he,"data-testid":`skill-install-all`,children:ge}),t[90]=E,t[91]=he,t[92]=_e):_e=t[92];let ve;t[93]!==me||t[94]!==_e?(ve=(0,Q.jsx)(Kn,{hint:me,children:_e}),t[93]=me,t[94]=_e,t[95]=ve):ve=t[95],t[96]!==l||t[97]!==ve?(k=(0,Q.jsxs)(On,{menuKind:l,className:`flex items-center justify-between gap-2`,children:[pe,ve]}),t[96]=l,t[97]=ve,t[98]=k):k=t[98],t[99]!==u||t[100]!==H||t[101]!==E||t[102]!==l||t[103]!==P||t[104]!==L?(A=P===null?null:(0,Q.jsx)(Kn,{hint:u({id:`pXB6SL`}),children:(0,Q.jsxs)(Dn,{menuKind:l,disabled:E,checked:!0,onSelect:Qn,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(Ye,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:P}),(()=>{let e=J(P).split(`/`).slice(0,-1).join(`/`),t=L(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>H(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})})]})]})}),t[99]=u,t[100]=H,t[101]=E,t[102]=l,t[103]=P,t[104]=L,t[105]=A):A=t[105];let ye;t[106]!==u||t[107]!==H||t[108]!==E||t[109]!==B||t[110]!==G||t[111]!==ce||t[112]!==q||t[113]!==O||t[114]!==d||t[115]!==X||t[116]!==l||t[117]!==i||t[118]!==h||t[119]!==r?.hosts||t[120]!==F||t[121]!==L||t[122]!==f||t[123]!==n?(ye=e=>{let t=h(e),a=e===`agents`?`.agents`:Me[e],o=J(t).split(`/`).slice(0,-1).join(`/`),c=L(o);return(0,Q.jsx)(Kn,{hint:G.has(e)?u({id:`8HvJlU`,values:{0:t??a}}):e===F?t?u({id:`ssk6rl`,values:{path:t}}):a:d.has(e)?u(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):u(t?O===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(Dn,{menuKind:l,disabled:E,checked:d.has(e),onCheckedChange:t=>{G.has(e)||t===!0&&!B(o)||f(e,t===!0)},onSelect:Zn,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(_,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),c.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:c.map(e=>H(e,o))}):null,G.has(e)?(0,Q.jsx)(Kn,{hint:u({id:`_O7dJS`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(s,{id:`jng7Ko`})})}):e===F?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(s,{id:`tiFPjk`})}):d.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!E&&(X.has(e)?`link`:`copy`)!==O?ce(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(Kn,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]}):null,!E&&q.has(J(t))?(0,Q.jsx)(Kn,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[106]=u,t[107]=H,t[108]=E,t[109]=B,t[110]=G,t[111]=ce,t[112]=q,t[113]=O,t[114]=d,t[115]=X,t[116]=l,t[117]=i,t[118]=h,t[119]=r?.hosts,t[120]=F,t[121]=L,t[122]=f,t[123]=n,t[124]=ye):ye=t[124],j=c.map(ye);let be;t[125]!==u||t[126]!==H||t[127]!==E||t[128]!==B||t[129]!==ce||t[130]!==q||t[131]!==O||t[132]!==l||t[133]!==L||t[134]!==n?(be=e=>(0,Q.jsx)(Kn,{hint:e.placed===null?u(O===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):u({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(Dn,{menuKind:l,disabled:E,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!B(e.root))return;n.placeAt(e.root,O)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:Xn,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(_,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(Ye,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),L(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:L(e.root).map(t=>H(t,e.root))}):null,!E&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(Kn,{hint:u({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!E&&e.placed.mode!==O?ce(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(Kn,{hint:u({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(s,{id:`VNNRfN`})})})]})]})]})},e.root),t[125]=u,t[126]=H,t[127]=E,t[128]=B,t[129]=ce,t[130]=q,t[131]=O,t[132]=l,t[133]=L,t[134]=n,t[135]=be):be=t[135],M=fe.map(be),t[14]=u,t[15]=C,t[16]=g.data,t[17]=g.status,t[18]=d,t[19]=x,t[20]=p,t[21]=T,t[22]=l,t[23]=i,t[24]=a,t[25]=h,t[26]=r,t[27]=f,t[28]=n,t[29]=E,t[30]=D,t[31]=O,t[32]=k,t[33]=A,t[34]=j,t[35]=M}else E=t[29],D=t[30],O=t[31],k=t[32],A=t[33],j=t[34],M=t[35];let N;t[136]!==u||t[137]!==E||t[138]!==D||t[139]!==O||t[140]!==a||t[141]!==n?(N=D.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=O===`link`?`copy`:`link`,r=D.filter(e=>e.mode!==t);if(r.length===0)return;let i=u(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),o=u(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),s=r.map(Yn).join(`
|
|
2
2
|
`);window.confirm(`${i}\n\n${o}\n\n${s}\n\n${u({id:`Cu6GXQ`})}`)&&(a?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:E,"data-testid":`skill-convert-all`,children:O===`link`?(0,Q.jsx)(s,{id:`rcJmK8`}):(0,Q.jsx)(s,{id:`LBv_TR`})}),(0,Q.jsx)(Kn,{hint:u({id:`0J6nhG`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,"aria-label":u({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:Jn,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[136]=u,t[137]=E,t[138]=D,t[139]=O,t[140]=a,t[141]=n,t[142]=N):N=t[142];let P;t[143]===l?P=t[144]:(P=(0,Q.jsx)(kn,{menuKind:l}),t[143]=l,t[144]=P);let F;t[145]===u?F=t[146]:(F=u({id:`jqe7Yq`}),t[145]=u,t[146]=F);let I;t[147]===r?.scope?I=t[148]:(I=()=>{window.location.hash=r?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[147]=r?.scope,t[148]=I);let L,R;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(wn,{"aria-hidden":!0}),R=(0,Q.jsx)(s,{id:`ZBF9fn`}),t[149]=L,t[150]=R):(L=t[149],R=t[150]);let z;t[151]!==l||t[152]!==I?(z=(0,Q.jsxs)(En,{menuKind:l,onSelect:I,children:[L,R]}),t[151]=l,t[152]=I,t[153]=z):z=t[153];let B;t[154]!==F||t[155]!==z?(B=(0,Q.jsx)(Kn,{hint:F,children:z}),t[154]=F,t[155]=z,t[156]=B):B=t[156];let V;return t[157]!==N||t[158]!==P||t[159]!==B||t[160]!==k||t[161]!==A||t[162]!==j||t[163]!==M?(V=(0,Q.jsxs)(Q.Fragment,{children:[k,A,j,M,N,P,B]}),t[157]=N,t[158]=P,t[159]=B,t[160]=k,t[161]=A,t[162]=j,t[163]=M,t[164]=V):V=t[164],V}function Jn(e){return e.preventDefault()}function Yn(e){return e.display}function Xn(e){return e.preventDefault()}function Zn(e){return e.preventDefault()}function Qn(e){return e.preventDefault()}function $n(e){return[ot(e),e]}function er(e){return e===`link`}function tr(e){return e.mode}function nr(e){return(e??``).replace(/^~\//,``)}function rr(e){return e===`agents`?`.agents`:Me[e]??e}function ir(e){return e.hostAliases??{}}function ar(e){return e.hosts.includes(`agents`)||e.path.startsWith(`.agents/`)}function or(e){let t=(0,Dt.c)(23),{onAddProperty:n,className:r,problemCount:i,problemMessages:a}=e,o=i===void 0?0:i,{_:l}=c(),u=o>0,f;t[0]!==l||t[1]!==u||t[2]!==o?(f=l(u?{id:`3KOHFt`,values:{problemCount:o}}:{id:`81H_23`}),t[0]=l,t[1]=u,t[2]=o,t[3]=f):f=t[3];let p=f,m;t[4]===r?m=t[5]:(m=d(`relative`,r),t[4]=r,t[5]=m);let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(Xe,{}),t[6]=h):h=t[6];let g;t[7]!==u||t[8]!==o?(g=u?(0,Q.jsx)(st,{variant:`notification`,"aria-hidden":`true`,"data-testid":`add-properties-problem-badge`,className:`pointer-events-none absolute -top-0.5 -right-0.5 size-3.5 rounded-full p-0 font-sans text-[9px] leading-none tabular-nums`,children:o>9?`9+`:o}):null,t[7]=u,t[8]=o,t[9]=g):g=t[9];let _;t[10]===g?_=t[11]:(_=(0,Q.jsxs)(b,{children:[h,g]}),t[10]=g,t[11]=_);let v;t[12]!==p||t[13]!==n||t[14]!==m||t[15]!==_?(v=(0,Q.jsx)(y,{variant:`ghost`,size:`icon`,"aria-label":p,onClick:n,"data-testid":`add-properties-button`,className:m,asChild:!0,children:_}),t[12]=p,t[13]=n,t[14]=m,t[15]=_,t[16]=v):v=t[16];let C;t[17]!==u||t[18]!==a?(C=(0,Q.jsx)(x,{side:`bottom`,children:u?(0,Q.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,Q.jsx)(`span`,{className:`font-medium`,children:(0,Q.jsx)(s,{id:`AwrGuz`})}),a?.map(sr),(0,Q.jsx)(`span`,{className:`pt-0.5 opacity-70`,children:(0,Q.jsx)(s,{id:`yh5-4s`})})]}):(0,Q.jsx)(s,{id:`81H_23`})}),t[17]=u,t[18]=a,t[19]=C):C=t[19];let w;return t[20]!==v||t[21]!==C?(w=(0,Q.jsxs)(S,{children:[v,C]}),t[20]=v,t[21]=C,t[22]=w):w=t[22],w}function sr(e,t){return(0,Q.jsx)(`span`,{className:`opacity-90`,children:e},t)}function cr(e){return e?Pe._({id:`wTcjov`}):null}function lr(e){let t=(0,Dt.c)(46),{_:r}=c(),i=a(),o=g(),l=q(),d=Y();if(i)return null;let{input:f,installStates:p,dispatch:m}=e,h=f===null,_,v,y,b,x,S,C,w,T,E,D;if(t[0]!==r||t[1]!==m||t[2]!==f||t[3]!==h||t[4]!==p||t[5]!==d||t[6]!==l||t[7]!==o){let e=cr(h),i;t[19]===d?i=t[20]:(i=e=>J(d,e.id),t[19]=d,t[20]=i);let a=ne.filter(i),c;t[21]===d?c=t[22]:(c=e=>ie(d,e.source,e.id,!0,e.supported),t[21]=d,t[22]=c);let u=l.filter(c),g=o?fe.filter(e=>se(d,e,o.installedClis)):[];y=a.length>0,b=o!==null&&g.length>0,x=u.length>0,v=M,t[23]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Q.jsxs)(R,{children:[(0,Q.jsx)(n,{"aria-hidden":`true`}),(0,Q.jsx)(s,{id:`O7_W_a`})]}),t[23]=D):D=t[23],_=P,S=`max-h-80`,C=x?(0,Q.jsxs)(N,{"aria-label":r({id:`vPKX2i`}),children:[(0,Q.jsxs)(I,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(s,{id:`RXEbZy`}),(0,Q.jsx)(X,{})]}),u.map(t=>{let n=t.name;return(0,Q.jsxs)(j,{onSelect:()=>{f!==null&&hn(f,{agent:{source:t.source,id:t.id}})},disabled:h,"data-testid":`empty-space-open-in-thread-${t.id}`,"aria-label":e?r({id:`gtGQ9S`,values:{agentName:n,hint:e}}):void 0,children:[(0,Q.jsx)(We,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`5PrrYw`,values:{agentName:n}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[24]!==y||t[25]!==b||t[26]!==x?(w=x&&(b||y)?(0,Q.jsx)(L,{}):null,t[24]=y,t[25]=b,t[26]=x,t[27]=w):w=t[27],T=b?(0,Q.jsxs)(N,{"aria-label":r({id:`ALhMYW`}),children:[(0,Q.jsx)(I,{children:(0,Q.jsx)(s,{id:`ALhMYW`})}),g.map(t=>{let{displayName:n}=ue[t];return(0,Q.jsxs)(j,{onSelect:()=>{f!==null&&o.launchInTerminal(f,t)},disabled:h,"data-testid":`empty-space-open-in-terminal-${t}`,"aria-label":r(e?{id:`AIn2Yv`,values:{displayName:n,hint:e}}:{id:`QYfQdv`,values:{displayName:n}}),children:[(0,Q.jsx)(oe,{id:re(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:n}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,E=y?(0,Q.jsxs)(Q.Fragment,{children:[b?(0,Q.jsx)(L,{}):null,(0,Q.jsxs)(N,{"aria-label":r({id:`BBqGS9`}),children:[(0,Q.jsx)(I,{children:(0,Q.jsx)(s,{id:`BBqGS9`})}),a.map(t=>{let n=!h,{displayName:i}=t,a=r(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Q.jsxs)(j,{disabled:!n,onSelect:()=>{if(f){if(p[t.id]?.installed!==!0){en(t);return}m(t.id,f)}},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(oe,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=r,t[1]=m,t[2]=f,t[3]=h,t[4]=p,t[5]=d,t[6]=l,t[7]=o,t[8]=_,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D}else _=t[8],v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18];let O;t[28]!==y||t[29]!==b||t[30]!==x?(O=x||b||y?(0,Q.jsx)(L,{}):null,t[28]=y,t[29]=b,t[30]=x,t[31]=O):O=t[31];let k;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(u,{"aria-hidden":`true`}),t[32]=k):k=t[32];let A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsxs)(j,{onSelect:Ne,"data-testid":`empty-space-open-in-settings`,children:[k,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`jRAGrQ`})})]}),t[33]=A):A=t[33];let F;t[34]!==_||t[35]!==S||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==O?(F=(0,Q.jsxs)(_,{className:S,children:[C,w,T,E,O,A]}),t[34]=_,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=O,t[41]=F):F=t[41];let z;return t[42]!==v||t[43]!==D||t[44]!==F?(z=(0,Q.jsxs)(v,{children:[D,F]}),t[42]=v,t[43]=D,t[44]=F,t[45]=z):z=t[45],z}function ur(e){return e?Pe._({id:`wTcjov`}):null}function dr(e){let t=(0,Dt.c)(47),{_:r}=c(),i=a(),o=g(),l=q(),d=Y();if(i)return null;let{input:f,installStates:p,dispatch:m,onBeforeLaunch:h}=e,_=f===null,v,y,b,x,S,C,w,T,E,D,O;if(t[0]!==r||t[1]!==m||t[2]!==f||t[3]!==_||t[4]!==p||t[5]!==h||t[6]!==d||t[7]!==l||t[8]!==o){let e=ur(_),i;t[20]===d?i=t[21]:(i=e=>J(d,e.id),t[20]=d,t[21]=i);let a=ne.filter(i),c;t[22]===d?c=t[23]:(c=e=>ie(d,e.source,e.id,!0,e.supported),t[22]=d,t[23]=c);let u=l.filter(c),g=o?fe.filter(e=>se(d,e,o.installedClis)):[];b=a.length>0,x=o!==null&&g.length>0,S=u.length>0,y=B,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Q.jsxs)(G,{children:[(0,Q.jsx)(n,{"aria-hidden":`true`}),(0,Q.jsx)(s,{id:`O7_W_a`})]}),t[24]=O):O=t[24],v=V,C=`max-h-80`,w=S?(0,Q.jsxs)(H,{"aria-label":r({id:`vPKX2i`}),children:[(0,Q.jsxs)(W,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(s,{id:`RXEbZy`}),(0,Q.jsx)(X,{})]}),u.map(t=>{let n=t.name;return(0,Q.jsxs)(z,{onSelect:()=>{f!==null&&(h?.(),hn(f,{agent:{source:t.source,id:t.id}}))},disabled:_,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?r({id:`gtGQ9S`,values:{agentName:n,hint:e}}):void 0,children:[(0,Q.jsx)(We,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`5PrrYw`,values:{agentName:n}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==b||t[26]!==x||t[27]!==S?(T=S&&(x||b)?(0,Q.jsx)(K,{}):null,t[25]=b,t[26]=x,t[27]=S,t[28]=T):T=t[28],E=x?(0,Q.jsxs)(H,{"aria-label":r({id:`ALhMYW`}),children:[(0,Q.jsx)(W,{children:(0,Q.jsx)(s,{id:`ALhMYW`})}),g.map(t=>{let{displayName:n}=ue[t];return(0,Q.jsxs)(z,{onSelect:()=>{f!==null&&(h?.(),o.launchInTerminal(f,t))},disabled:_,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":r(e?{id:`AIn2Yv`,values:{displayName:n,hint:e}}:{id:`QYfQdv`,values:{displayName:n}}),children:[(0,Q.jsx)(oe,{id:re(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:n}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,D=b?(0,Q.jsxs)(Q.Fragment,{children:[x?(0,Q.jsx)(K,{}):null,(0,Q.jsxs)(H,{"aria-label":r({id:`BBqGS9`}),children:[(0,Q.jsx)(W,{children:(0,Q.jsx)(s,{id:`BBqGS9`})}),a.map(t=>{let n=!_,{displayName:i}=t,a=r(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Q.jsxs)(z,{disabled:!n,onSelect:()=>{if(f){if(h?.(),p[t.id]?.installed!==!0){en(t);return}m(t.id,f)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(oe,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=r,t[1]=m,t[2]=f,t[3]=_,t[4]=p,t[5]=h,t[6]=d,t[7]=l,t[8]=o,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D,t[19]=O}else v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18],O=t[19];let k;t[29]!==b||t[30]!==x||t[31]!==S?(k=S||x||b?(0,Q.jsx)(K,{}):null,t[29]=b,t[30]=x,t[31]=S,t[32]=k):k=t[32];let A;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(u,{"aria-hidden":`true`}),t[33]=A):A=t[33];let j;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsxs)(z,{onSelect:Ne,"data-testid":`file-tree-open-in-settings`,children:[A,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(s,{id:`jRAGrQ`})})]}),t[34]=j):j=t[34];let M;t[35]!==v||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==k?(M=(0,Q.jsxs)(v,{className:C,children:[w,T,E,D,k,j]}),t[35]=v,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=k,t[42]=M):M=t[42];let N;return t[43]!==y||t[44]!==O||t[45]!==M?(N=(0,Q.jsxs)(y,{children:[O,M]}),t[43]=y,t[44]=O,t[45]=M,t[46]=N):N=t[46],N}function fr(e){let t=je(e);if(t)return{scope:`project`,name:t.name,rel:t.rel};let n=ke(e);return n?{scope:`global`,name:n.name,rel:n.rel}:null}function pr(e,t,n){return e.filter(e=>{let r=tt(e);if(r.kind===`skill-file`)return r.scope===t&&r.name===n;if(r.kind!==`doc`)return!1;let i=fr(r.docName);return i?.scope===t&&i.name===n})}function mr(e,t,n){let r=et(t,n);return e.filter(e=>{let i=tt(e);return i.kind===`skill-file`?i.scope===t.scope&&i.name===t.name&&i.path===n:i.kind===`doc`&&i.docName===r})}function hr(e,t,n){let r=fr(e);if(!r||r.rel===null)return null;let i=t.find(e=>e.scope===r.scope&&e.name===r.name);if(!i||i.managed)return null;let a=`references/${r.rel}${n}`;return et(i,a)===e?{skill:i,filePath:a}:null}function gr(e,t){let n=new Map(t.map(e=>[`${e.scope}\u0000${e.name}`,e])),r=[];for(let t of e){let e=fr(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`,a=n.get(`${i}\u0000${e.name}`);e.rel===null&&a!==void 0?r.push({kind:`retarget`,fromDocName:t,toDocName:$e(a)}):r.push({kind:`close`,docName:t})}return r}function _r(){let e=(0,Dt.c)(15),{openTabs:t,closeDocument:n}=i(),r=Ge(),a;e[0]===t?a=e[1]:(a=t.some(yr),e[0]=t,e[1]=a);let o=a,s;e[2]===o?s=e[3]:(s={enabled:o},e[2]=o,e[3]=s);let c=St(s),l=(0,$.useRef)(null),u;e[4]!==n||e[5]!==t||e[6]!==r||e[7]!==c.data||e[8]!==c.status?(u=()=>{if(c.status!==`ready`)return;let e=c.data,i=`${t.join(``)}\u0002${e.map(vr).sort().join(``)}`;if(l.current===i)return;l.current=i;let a=gr(t,e);for(let e of a)e.kind===`retarget`?r(e.fromDocName,e.toDocName):n(e.docName)},e[4]=n,e[5]=t,e[6]=r,e[7]=c.data,e[8]=c.status,e[9]=u):u=e[9];let d;e[10]!==n||e[11]!==t||e[12]!==r||e[13]!==c?(d=[c,t,r,n],e[10]=n,e[11]=t,e[12]=r,e[13]=c,e[14]=d):d=e[14],(0,$.useEffect)(u,d)}function vr(e){return`${e.scope}\u0000${e.name}`}function yr(e){return fr(e)!==null}function br(e){let t=(0,Dt.c)(19),{skill:n,onOpenChange:r,onDeleted:a}=e,{_:o}=c(),{setSkillsSidebar:s,closeTabs:l,openTabs:u}=i(),[d,p]=(0,$.useState)(!1),m;t[0]!==o||t[1]!==l||t[2]!==a||t[3]!==r||t[4]!==u||t[5]!==s?(m=async function(e){s(!0),p(!0);let t=await ht(e.scope,e.name);if(p(!1),!t.ok){let{error:e}=t;Z.error(o({id:`AtBdnD`,values:{error:e}}));return}Z.success(o({id:`h9QFb9`,values:{0:e.name}})),l(pr(u,e.scope,e.name),{force:!0}),a(),r(!1)},t[0]=o,t[1]=l,t[2]=a,t[3]=r,t[4]=u,t[5]=s,t[6]=m):m=t[6];let g=m,_=n!==null,v;t[7]!==d||t[8]!==r?(v=e=>{!e&&!d&&r(!1)},t[7]=d,t[8]=r,t[9]=v):v=t[9];let y;t[10]!==o||t[11]!==d||t[12]!==g||t[13]!==n?(y=n?(0,Q.jsx)(h,{itemName:o({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:d,onDelete:()=>g(n),customDescription:n.origin?.source&&/\/plugins\/(?:cache|marketplaces)\//.test(n.origin.source)?o({id:`WnsbUT`,values:{0:n.path}}):o({id:`E1Da_b`,values:{0:n.path}})}):null,t[10]=o,t[11]=d,t[12]=g,t[13]=n,t[14]=y):y=t[14];let b;return t[15]!==_||t[16]!==v||t[17]!==y?(b=(0,Q.jsx)(f,{open:_,onOpenChange:v,children:y}),t[15]=_,t[16]=v,t[17]=y,t[18]=b):b=t[18],b}function xr(e){let t=e.split(`/`);return t.some(e=>e===``||e===`.`||e===`..`)||t.length===0||t.length===1&&t[0].toLowerCase()===`skill.md`?!1:!/\s/.test(e)}function Sr(e){let t=(0,Dt.c)(66),{target:n,onOpenChange:r}=e,{_:a}=c(),{openTarget:o}=i(),l=(0,$.useId)(),[u,d]=(0,$.useState)(``),[f,p]=(0,$.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.prefix??`references/`)},t[0]=n,t[1]=m);let h=n?.skill.scope,g=n?.skill.name,_=n?.prefix,v;if(t[2]!==h||t[3]!==g||t[4]!==_?(v=[h,g,_],t[2]=h,t[3]=g,t[4]=_,t[5]=v):v=t[5],(0,$.useEffect)(m,v),!n)return null;let b,x,S,E;t[6]!==u||t[7]!==f?(E=u.trim(),x=E===``||!xr(E),b=!x&&!f,S=E.includes(`/`)?E.split(`/`).slice(0,-1).join(`/`):null,t[6]=u,t[7]=f,t[8]=b,t[9]=x,t[10]=S,t[11]=E):(b=t[8],x=t[9],S=t[10],E=t[11]);let O=S,j;t[12]!==a||t[13]!==b||t[14]!==r||t[15]!==o||t[16]!==n||t[17]!==E?(j=async function(){if(!n||!b)return;p(!0);let e=/\.mdx?$/i.test(E),t=await ut({scope:n.skill.scope,name:n.skill.name,path:E,content:e?`# ${E.split(`/`).pop()?.replace(/\.mdx?$/i,``)??``}\n`:``});if(p(!1),!t.ok){Z.error(a({id:`a_2_uB`,values:{0:t.error,trimmed:E}}));return}if(Z.success(a({id:`MXSt4t`,values:{0:t.path}})),e){let e=et(n.skill,E);o({kind:`doc`,target:e,docName:e})}r(!1)},t[12]=a,t[13]=b,t[14]=r,t[15]=o,t[16]=n,t[17]=E,t[18]=j):j=t[18];let M=j,N;t[19]!==r||t[20]!==f?(N=e=>{!e&&!f&&r(!1)},t[19]=r,t[20]=f,t[21]=N):N=t[21];let P;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(w,{children:(0,Q.jsx)(s,{id:`wQvvZY`})}),t[22]=P):P=t[22];let F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsxs)(k,{children:[P,(0,Q.jsx)(C,{children:(0,Q.jsx)(s,{id:`lM4c-I`})})]}),t[23]=F):F=t[23];let I;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(s,{id:`I6gXOa`}),t[24]=I):I=t[24];let L;t[25]===l?L=t[26]:(L=(0,Q.jsx)(ee,{htmlFor:l,children:I}),t[25]=l,t[26]=L);let R;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>d(e.target.value),t[27]=R):R=t[27];let z=x&&E!==``,B;t[28]===M?B=t[29]:(B=e=>{e.key===`Enter`&&M()},t[28]=M,t[29]=B);let V;t[30]!==l||t[31]!==u||t[32]!==z||t[33]!==B?(V=(0,Q.jsx)(Qe,{id:l,value:u,onChange:R,placeholder:`references/notes.md`,"aria-invalid":z,onKeyDown:B}),t[30]=l,t[31]=u,t[32]=z,t[33]=B,t[34]=V):V=t[34];let H;t[35]!==O||t[36]!==x||t[37]!==E?(H=x&&E!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(s,{id:`fVzizW`})}):O?(0,Q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:(0,Q.jsx)(s,{id:`9lso1Y`,values:{folderPart:O},components:{0:(0,Q.jsx)(`span`,{className:`font-mono text-foreground/80`})}})}):null,t[35]=O,t[36]=x,t[37]=E,t[38]=H):H=t[38];let U;t[39]!==L||t[40]!==V||t[41]!==H?(U=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[L,V,H]}),t[39]=L,t[40]=V,t[41]=H,t[42]=U):U=t[42];let W;t[43]===r?W=t[44]:(W=()=>r(!1),t[43]=r,t[44]=W);let G;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsx)(s,{id:`dEgA5A`}),t[45]=G):G=t[45];let K;t[46]!==f||t[47]!==W?(K=(0,Q.jsx)(y,{variant:`outline`,onClick:W,disabled:f,children:G}),t[46]=f,t[47]=W,t[48]=K):K=t[48];let q;t[49]===M?q=t[50]:(q=()=>void M(),t[49]=M,t[50]=q);let J=!b,Y;t[51]===f?Y=t[52]:(Y=f?(0,Q.jsx)(s,{id:`E9bKSA`}):(0,Q.jsx)(s,{id:`hYgDIe`}),t[51]=f,t[52]=Y);let te;t[53]!==q||t[54]!==J||t[55]!==Y?(te=(0,Q.jsx)(y,{onClick:q,disabled:J,children:Y}),t[53]=q,t[54]=J,t[55]=Y,t[56]=te):te=t[56];let X;t[57]!==K||t[58]!==te?(X=(0,Q.jsxs)(D,{children:[K,te]}),t[57]=K,t[58]=te,t[59]=X):X=t[59];let ne;t[60]!==U||t[61]!==X?(ne=(0,Q.jsxs)(T,{className:`sm:max-w-md`,children:[F,U,X]}),t[60]=U,t[61]=X,t[62]=ne):ne=t[62];let re;return t[63]!==ne||t[64]!==N?(re=(0,Q.jsx)(A,{open:!0,onOpenChange:N,children:ne}),t[63]=ne,t[64]=N,t[65]=re):re=t[65],re}function Cr(e){let t=(0,Dt.c)(18),{target:n,onOpenChange:r}=e,{_:a}=c(),{setSkillsSidebar:o,closeTabs:s,openTabs:l}=i(),[u,d]=(0,$.useState)(!1),p;t[0]!==a||t[1]!==s||t[2]!==r||t[3]!==l||t[4]!==o?(p=async function(e){let{skill:t,filePath:n}=e;o(!0),d(!0);let i=await gt({scope:t.scope,name:t.name,path:n});if(d(!1),!i.ok){Z.error(a({id:`CBT70t`,values:{0:i.error}}));return}if(!i.existed){Z.error(a({id:`q4efaG`,values:{filePath:n}})),r(!1);return}Z.success(a({id:`gOmloS`,values:{filePath:n}})),s(mr(l,t,n),{force:!0}),r(!1)},t[0]=a,t[1]=s,t[2]=r,t[3]=l,t[4]=o,t[5]=p):p=t[5];let m=p,g=n!==null,_;t[6]!==u||t[7]!==r?(_=e=>{!e&&!u&&r(!1)},t[6]=u,t[7]=r,t[8]=_):_=t[8];let v;t[9]!==a||t[10]!==u||t[11]!==m||t[12]!==n?(v=n?(0,Q.jsx)(h,{itemName:a({id:`wZPUJx`,values:{0:n.filePath}}),isSubmitting:u,onDelete:()=>m(n),customDescription:a({id:`ppzof_`,values:{0:nt(n.skill.path),1:n.filePath,2:n.skill.name}})}):null,t[9]=a,t[10]=u,t[11]=m,t[12]=n,t[13]=v):v=t[13];let y;return t[14]!==g||t[15]!==_||t[16]!==v?(y=(0,Q.jsx)(f,{open:g,onOpenChange:_,children:v}),t[14]=g,t[15]=_,t[16]=v,t[17]=y):y=t[17],y}function wr(e){let t=(0,Dt.c)(64),{target:n,onOpenChange:r}=e,{_:i}=c(),a=Ge(),o=(0,$.useId)(),[l,u]=(0,$.useState)(``),[d,f]=(0,$.useState)(!1),p;t[0]===n?p=t[1]:(p=()=>{n&&u(n.filePath)},t[0]=n,t[1]=p);let m=n?.skill.scope,h=n?.skill.name,g=n?.filePath,_;if(t[2]!==m||t[3]!==h||t[4]!==g?(_=[m,h,g],t[2]=m,t[3]=h,t[4]=g,t[5]=_):_=t[5],(0,$.useEffect)(p,_),!n)return null;let v,b,x;t[6]!==l||t[7]!==n.filePath?(b=l.trim(),x=b===n.filePath,v=b===``||!xr(b),t[6]=l,t[7]=n.filePath,t[8]=v,t[9]=b,t[10]=x):(v=t[8],b=t[9],x=t[10]);let S=v,E=!S&&!x&&!d,O;t[11]!==i||t[12]!==E||t[13]!==r||t[14]!==a||t[15]!==n||t[16]!==b?(O=async function(){if(!n||!E)return;f(!0);let e=await lt({scope:n.skill.scope,name:n.skill.name,from:n.filePath,to:b});if(f(!1),!e.ok){Z.error(i({id:`11ukmX`,values:{0:e.error}}));return}e.fromDocName!==void 0&&e.toDocName!==void 0&&a(e.fromDocName,e.toDocName),Z.success(i({id:`XszXjc`,values:{0:e.to}})),r(!1)},t[11]=i,t[12]=E,t[13]=r,t[14]=a,t[15]=n,t[16]=b,t[17]=O):O=t[17];let j=O,M;t[18]!==r||t[19]!==d?(M=e=>{!e&&!d&&r(!1)},t[18]=r,t[19]=d,t[20]=M):M=t[20];let N;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsx)(w,{children:(0,Q.jsx)(s,{id:`yckias`})}),t[21]=N):N=t[21];let P;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsxs)(k,{children:[N,(0,Q.jsx)(C,{children:(0,Q.jsx)(s,{id:`HzVAoz`})})]}),t[22]=P):P=t[22];let F;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(s,{id:`I6gXOa`}),t[23]=F):F=t[23];let I;t[24]===o?I=t[25]:(I=(0,Q.jsx)(ee,{htmlFor:o,children:F}),t[24]=o,t[25]=I);let L;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>u(e.target.value),t[26]=L):L=t[26];let R=S&&b!==``,z;t[27]===j?z=t[28]:(z=e=>{e.key===`Enter`&&j()},t[27]=j,t[28]=z);let B;t[29]!==o||t[30]!==l||t[31]!==R||t[32]!==z?(B=(0,Q.jsx)(Qe,{id:o,value:l,onChange:L,"aria-invalid":R,onKeyDown:z}),t[29]=o,t[30]=l,t[31]=R,t[32]=z,t[33]=B):B=t[33];let V;t[34]!==S||t[35]!==b?(V=S&&b!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(s,{id:`fVzizW`})}):null,t[34]=S,t[35]=b,t[36]=V):V=t[36];let H;t[37]!==I||t[38]!==B||t[39]!==V?(H=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[I,B,V]}),t[37]=I,t[38]=B,t[39]=V,t[40]=H):H=t[40];let U;t[41]===r?U=t[42]:(U=()=>r(!1),t[41]=r,t[42]=U);let W;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(s,{id:`dEgA5A`}),t[43]=W):W=t[43];let G;t[44]!==d||t[45]!==U?(G=(0,Q.jsx)(y,{variant:`outline`,onClick:U,disabled:d,children:W}),t[44]=d,t[45]=U,t[46]=G):G=t[46];let K;t[47]===j?K=t[48]:(K=()=>void j(),t[47]=j,t[48]=K);let q=!E,J;t[49]===d?J=t[50]:(J=d?(0,Q.jsx)(s,{id:`tHKQ6j`}):(0,Q.jsx)(s,{id:`2wxgft`}),t[49]=d,t[50]=J);let Y;t[51]!==K||t[52]!==q||t[53]!==J?(Y=(0,Q.jsx)(y,{onClick:K,disabled:q,children:J}),t[51]=K,t[52]=q,t[53]=J,t[54]=Y):Y=t[54];let te;t[55]!==G||t[56]!==Y?(te=(0,Q.jsxs)(D,{children:[G,Y]}),t[55]=G,t[56]=Y,t[57]=te):te=t[57];let X;t[58]!==H||t[59]!==te?(X=(0,Q.jsxs)(T,{className:`sm:max-w-md`,children:[P,H,te]}),t[58]=H,t[59]=te,t[60]=X):X=t[60];let ne;return t[61]!==X||t[62]!==M?(ne=(0,Q.jsx)(A,{open:!0,onOpenChange:M,children:X}),t[61]=X,t[62]=M,t[63]=ne):ne=t[63],ne}function Tr(e){let t=(0,Dt.c)(59),{target:n,onOpenChange:r}=e,{_:i}=c(),a=(0,$.useId)(),[o,l]=(0,$.useState)(null),[u,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(!1),[m,h]=(0,$.useState)(!1),[g,_]=(0,$.useState)(``),[v,b]=(0,$.useState)(!1),x;t[0]===n?x=t[1]:(x=()=>{if(l(null),d(null),p(!1),h(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){p(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${rt(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,d],[a,l]])vt({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):p(!0))}).catch(()=>{o.signal.aborted||p(!0)});return()=>o.abort()},t[0]=n,t[1]=x);let S=n?.skill.scope,O=n?.skill.name,j=n?.editor,M;if(t[2]!==S||t[3]!==O||t[4]!==j?(M=[S,O,j],t[2]=S,t[3]=O,t[4]=j,t[5]=M):M=t[5],(0,$.useEffect)(x,M),!n)return null;let{skill:N,editor:P}=n,F;t[6]!==i||t[7]!==P||t[8]!==r||t[9]!==N.name||t[10]!==N.scope||t[11]!==n||t[12]!==g?(F=async function(e){if(!n)return;b(!0);let t=await yt({scope:N.scope,name:N.name,editor:P,action:e,...e===`rename`?{toName:g.trim()}:{}});if(b(!1),!t.ok){Z.error(i({id:`MIF36T`,values:{0:t.error}}));return}Z.success(i(e===`align`?{id:`QKgePK`,values:{editor:P}}:e===`make-source`?{id:`It9oAP`,values:{editor:P}}:{id:`b2ezG_`,values:{0:g.trim()}})),r(!1)},t[6]=i,t[7]=P,t[8]=r,t[9]=N.name,t[10]=N.scope,t[11]=n,t[12]=g,t[13]=F):F=t[13];let I=F,L,R;t[14]!==N.name||t[15]!==g?(R=g.trim(),L=R===``||!_e.test(R)||R===N.name,t[14]=N.name,t[15]=g,t[16]=L,t[17]=R):(L=t[16],R=t[17]);let z=L,B;t[18]!==v||t[19]!==r?(B=e=>{!e&&!v&&r(!1)},t[18]=v,t[19]=r,t[20]=B):B=t[20];let V;t[21]!==P||t[22]!==N.name?(V=(0,Q.jsx)(w,{children:(0,Q.jsx)(s,{id:`q8aCbb`,values:{0:N.name,editor:P}})}),t[21]=P,t[22]=N.name,t[23]=V):V=t[23];let H;t[24]===P?H=t[25]:(H=(0,Q.jsx)(C,{children:(0,Q.jsx)(s,{id:`QASTNu`,values:{editor:P}})}),t[24]=P,t[25]=H);let U;t[26]!==H||t[27]!==V?(U=(0,Q.jsxs)(k,{children:[V,H]}),t[26]=H,t[27]=V,t[28]=U):U=t[28];let W;t[29]!==u||t[30]!==o||t[31]!==f?(W=u!==null&&o!==null?(0,Q.jsx)(Tt,{oldContent:u,newContent:o,layout:`unified`}):f?(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,Q.jsx)(s,{id:`5BlXTD`})}):(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,Q.jsx)(s,{id:`1V17kO`})}),t[29]=u,t[30]=o,t[31]=f,t[32]=W):W=t[32];let G;t[33]!==I||t[34]!==P||t[35]!==a||t[36]!==z||t[37]!==m||t[38]!==N.name||t[39]!==g||t[40]!==R?(G=m?(0,Q.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,Q.jsx)(ee,{htmlFor:a,children:(0,Q.jsx)(s,{id:`pSimwP`,values:{editor:P}})}),(0,Q.jsx)(Qe,{id:a,value:g,onChange:e=>_(e.target.value),placeholder:`${N.name}-${P}`,"aria-invalid":z&&R!==``,onKeyDown:e=>{e.key===`Enter`&&!z&&I(`rename`)}})]}):null,t[33]=I,t[34]=P,t[35]=a,t[36]=z,t[37]=m,t[38]=N.name,t[39]=g,t[40]=R,t[41]=G):G=t[41];let K;t[42]!==W||t[43]!==G?(K=(0,Q.jsxs)(E,{className:`min-h-0 flex-1 overflow-auto`,children:[W,G]}),t[42]=W,t[43]=G,t[44]=K):K=t[44];let q;t[45]!==I||t[46]!==v||t[47]!==P||t[48]!==z||t[49]!==m||t[50]!==N.name?(q=(0,Q.jsx)(D,{children:m?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(y,{variant:`outline`,onClick:()=>h(!1),disabled:v,children:(0,Q.jsx)(s,{id:`iH8pgl`})}),(0,Q.jsx)(y,{onClick:()=>void I(`rename`),disabled:v||z,children:(0,Q.jsx)(s,{id:`AT0e50`})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(y,{variant:`outline`,onClick:()=>{_(`${N.name}-${P}`),h(!0)},disabled:v,children:(0,Q.jsx)(s,{id:`AT0e50`})}),(0,Q.jsx)(y,{variant:`outline`,onClick:()=>void I(`make-source`),disabled:v,children:(0,Q.jsx)(s,{id:`xWomUD`,values:{editor:P}})}),(0,Q.jsx)(y,{onClick:()=>void I(`align`),disabled:v,children:(0,Q.jsx)(s,{id:`PZn2LP`})})]})}),t[45]=I,t[46]=v,t[47]=P,t[48]=z,t[49]=m,t[50]=N.name,t[51]=q):q=t[51];let J;t[52]!==U||t[53]!==K||t[54]!==q?(J=(0,Q.jsxs)(T,{className:`flex max-h-[85vh] w-full max-w-3xl flex-col`,children:[U,K,q]}),t[52]=U,t[53]=K,t[54]=q,t[55]=J):J=t[55];let Y;return t[56]!==J||t[57]!==B?(Y=(0,Q.jsx)(A,{open:!0,onOpenChange:B,children:J}),t[56]=J,t[57]=B,t[58]=Y):Y=t[58],Y}function Er(e){let t=(0,Dt.c)(75),{skill:n,existingNames:r,onOpenChange:i,onRenamed:a}=e,o=Ke(),c=n!==null,l=(0,$.useId)(),[u,d]=(0,$.useState)(``),[f,p]=(0,$.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.name)},t[0]=n,t[1]=m);let h=n?.scope,g=n?.name,_;if(t[2]!==h||t[3]!==g?(_=[h,g],t[2]=h,t[3]=g,t[4]=_):_=t[4],(0,$.useEffect)(m,_),!n)return null;let v,b,x,S,E,O;if(t[5]!==r||t[6]!==u||t[7]!==n.name){E=u.trim(),O=E===n.name;let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\s/,t[14]=e):e=t[14];let i;t[15]===u?i=t[16]:(i=e.test(u),t[15]=u,t[16]=i),v=i,S=E.length>64,b=E===``||!_e.test(E)||S,x=!b&&!O&&r.has(E),t[5]=r,t[6]=u,t[7]=n.name,t[8]=v,t[9]=b,t[10]=x,t[11]=S,t[12]=E,t[13]=O}else v=t[8],b=t[9],x=t[10],S=t[11],E=t[12],O=t[13];let j=x,M=!b&&!j&&!O&&!f,N;t[17]!==M||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==n||t[22]!==E?(N=async function(){if(!n||!M)return;p(!0);let e=await o({scope:n.scope,name:n.name},E);p(!1),e.ok&&(a?.(E),i(!1))},t[17]=M,t[18]=i,t[19]=a,t[20]=o,t[21]=n,t[22]=E,t[23]=N):N=t[23];let P=N,F;t[24]===i?F=t[25]:(F=e=>e?null:i(!1),t[24]=i,t[25]=F);let I;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(w,{children:(0,Q.jsx)(s,{id:`dw_3cv`})}),t[26]=I):I=t[26];let L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsxs)(k,{children:[I,(0,Q.jsx)(C,{children:(0,Q.jsx)(s,{id:`R9IDFz`})})]}),t[27]=L):L=t[27];let R;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Q.jsx)(s,{id:`6YtxFj`}),t[28]=R):R=t[28];let z;t[29]===l?z=t[30]:(z=(0,Q.jsx)(ee,{htmlFor:l,children:R}),t[29]=l,t[30]=z);let B;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>d(e.target.value),t[31]=B):B=t[31];let V;t[32]===P?V=t[33]:(V=e=>{e.key===`Enter`&&P()},t[32]=P,t[33]=V);let H=b||j,U=b&&E!==``||j?`${l}-error`:void 0,W;t[34]!==l||t[35]!==u||t[36]!==V||t[37]!==H||t[38]!==U?(W=(0,Q.jsx)(Qe,{id:l,value:u,onChange:B,onKeyDown:V,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:64,"aria-invalid":H,"aria-describedby":U,className:`font-mono`}),t[34]=l,t[35]=u,t[36]=V,t[37]=H,t[38]=U,t[39]=W):W=t[39];let G;t[40]!==j||t[41]!==v||t[42]!==l||t[43]!==b||t[44]!==S||t[45]!==E?(G=b&&E!==``?(0,Q.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-destructive`,children:v?(0,Q.jsx)(s,{id:`iUwpZI`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}}):S?(0,Q.jsx)(s,{id:`lK9c4T`}):(0,Q.jsx)(s,{id:`A50vr3`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}):j?(0,Q.jsx)(`p`,{id:`${l}-error`,className:`text-xs text-destructive`,children:(0,Q.jsx)(s,{id:`YJ1BTp`})}):null,t[40]=j,t[41]=v,t[42]=l,t[43]=b,t[44]=S,t[45]=E,t[46]=G):G=t[46];let K;t[47]!==z||t[48]!==W||t[49]!==G?(K=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[z,W,G]}),t[47]=z,t[48]=W,t[49]=G,t[50]=K):K=t[50];let q;t[51]===i?q=t[52]:(q=()=>i(!1),t[51]=i,t[52]=q);let J;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Q.jsx)(s,{id:`dEgA5A`}),t[53]=J):J=t[53];let Y;t[54]!==f||t[55]!==q?(Y=(0,Q.jsx)(y,{variant:`outline`,className:`font-mono uppercase`,onClick:q,disabled:f,children:J}),t[54]=f,t[55]=q,t[56]=Y):Y=t[56];let te;t[57]===P?te=t[58]:(te=()=>void P(),t[57]=P,t[58]=te);let X=!M,ne;t[59]===f?ne=t[60]:(ne=f?(0,Q.jsx)(s,{id:`tHKQ6j`}):(0,Q.jsx)(s,{id:`2wxgft`}),t[59]=f,t[60]=ne);let re;t[61]!==te||t[62]!==X||t[63]!==ne?(re=(0,Q.jsx)(y,{onClick:te,disabled:X,children:ne}),t[61]=te,t[62]=X,t[63]=ne,t[64]=re):re=t[64];let ie;t[65]!==Y||t[66]!==re?(ie=(0,Q.jsxs)(D,{children:[Y,re]}),t[65]=Y,t[66]=re,t[67]=ie):ie=t[67];let ae;t[68]!==K||t[69]!==ie?(ae=(0,Q.jsxs)(T,{children:[L,K,ie]}),t[68]=K,t[69]=ie,t[70]=ae):ae=t[70];let oe;return t[71]!==c||t[72]!==ae||t[73]!==F?(oe=(0,Q.jsx)(A,{open:c,onOpenChange:F,children:ae}),t[71]=c,t[72]=ae,t[73]=F,t[74]=oe):oe=t[74],oe}function Dr(){let e=(0,Dt.c)(5),{_:t}=c(),n=it(),r=Ge(),i=St(),a;return e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==i?(a=async(e,a)=>{if(a===e.scope)return!1;Ie(e.scope,e.name);let o=await xt({name:e.name,fromScope:e.scope,toScope:a});if(Fe(e.scope,e.name),!o.ok)return Z.error(t({id:`07eGJB`,values:{0:o.error}})),!1;Z.success(t({id:`yhI6P0`,values:{0:e.name,1:n[a]}}));let s=i.status===`ready`?i.data.find(t=>t.scope===e.scope&&t.name===e.name):void 0;return r(s?$e(s):Te(e.scope,e.name),a===`project`&&o.path!==void 0?`${o.path.replace(/\/+$/,``)}/SKILL`:Te(a,e.name)),!0},e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Or(e){let t=(0,Dt.c)(38),{target:n,onOpenChange:r}=e,i=it(),a=Dr(),[o,c]=(0,$.useState)(!1);if(!n)return null;let{scope:l,name:u,toScope:d}=n,f;t[0]!==o||t[1]!==r?(f=e=>!e&&!o&&r(!1),t[0]=o,t[1]=r,t[2]=f):f=t[2];let p=i[d],m;t[3]===p?m=t[4]:(m=(0,Q.jsx)(w,{children:(0,Q.jsx)(s,{id:`SXEdCq`,values:{0:p}})}),t[3]=p,t[4]=m);let h=i[l],g=i[d],_=i[d],v;t[5]!==u||t[6]!==h||t[7]!==g||t[8]!==_?(v={0:h,1:g,2:_,name:u},t[5]=u,t[6]=h,t[7]=g,t[8]=_,t[9]=v):v=t[9];let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b={0:(0,Q.jsx)(`code`,{className:`font-mono`})},t[10]=b):b=t[10];let x;t[11]===v?x=t[12]:(x=(0,Q.jsx)(C,{children:(0,Q.jsx)(s,{id:`7bIiJ7`,values:v,components:b})}),t[11]=v,t[12]=x);let S;t[13]!==m||t[14]!==x?(S=(0,Q.jsxs)(k,{children:[m,x]}),t[13]=m,t[14]=x,t[15]=S):S=t[15];let E;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(s,{id:`dEgA5A`}),t[16]=E):E=t[16];let j;t[17]===o?j=t[18]:(j=(0,Q.jsx)(O,{asChild:!0,children:(0,Q.jsx)(y,{variant:`outline`,disabled:o,children:E})}),t[17]=o,t[18]=j);let M;t[19]!==a||t[20]!==u||t[21]!==r||t[22]!==l||t[23]!==d?(M=async()=>{c(!0),await a({scope:l,name:u},d),c(!1),r(!1)},t[19]=a,t[20]=u,t[21]=r,t[22]=l,t[23]=d,t[24]=M):M=t[24];let N;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsx)(s,{id:`QWdKwH`}),t[25]=N):N=t[25];let P;t[26]!==o||t[27]!==M?(P=(0,Q.jsx)(y,{"data-testid":`skill-scope-move-confirm`,disabled:o,onClick:M,children:N}),t[26]=o,t[27]=M,t[28]=P):P=t[28];let F;t[29]!==j||t[30]!==P?(F=(0,Q.jsxs)(D,{children:[j,P]}),t[29]=j,t[30]=P,t[31]=F):F=t[31];let I;t[32]!==S||t[33]!==F?(I=(0,Q.jsxs)(T,{className:`sm:max-w-md`,children:[S,F]}),t[32]=S,t[33]=F,t[34]=I):I=t[34];let L;return t[35]!==f||t[36]!==I?(L=(0,Q.jsx)(A,{open:!0,onOpenChange:f,children:I}),t[35]=f,t[36]=I,t[37]=L):L=t[37],L}function kr(){let e=(0,Dt.c)(50),{_:t}=c(),n=Ct(),[r,i]=(0,$.useState)(null),[a,o]=(0,$.useState)(null),[s,l]=(0,$.useState)(null),[u,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(null),[m,h]=(0,$.useState)(null),[g,_]=(0,$.useState)(null),[v,y]=(0,$.useState)(null),b;e[0]===t?b=e[1]:(b=async function(e,n,r){y(e.name);let i=await mt({scope:e.scope,name:e.name,...n?{targets:[...n]}:{},...r?.linkMode===void 0?{}:{linkMode:r.linkMode}});if(y(null),!i.ok)return Z.error(t({id:`Mj8R8K`,values:{0:i.error}})),i;let a=Ar,o=new Set(i.hosts),s=i.hosts.filter(t=>!e.hosts.includes(t)),c=e.hosts.filter(e=>!o.has(e)),l=e=>{let t=i.warningCodes.indexOf(e);return t>=0?i.warnings[t]:void 0},u=l(`no-targets`);if(u)return Z.warning(u),i;if(s.length>0){let e=l(`scripts-present`);e&&Z.warning(e);let t=l(`no-description`);t&&Z.warning(t)}return i.hosts.length===0?Z.success(t({id:`4pDZ2N`,values:{0:e.name}})):s.length>0&&c.length===0?Z.success(t({id:`PPFQ3o`,values:{0:e.name,1:a(s)}})):c.length>0&&s.length===0?Z.success(t({id:`OOIVJo`,values:{0:e.name,1:a(c)}})):s.length>0&&c.length>0?Z.success(t({id:`OxplNM`,values:{0:e.name,1:a(s),2:a(c)}})):Z.success(t({id:`wDgmsr`,values:{0:e.name,1:a(i.hosts)}})),i},e[0]=t,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=async function(e,t){if(t.length!==0){y(e.name);for(let{target:n,mode:r}of t){let t=await _t({scope:e.scope,name:e.name,target:n,mode:r});if(!t.ok){Z.error(t.error);break}}y(null)}},e[2]=S):S=e[2];let C=S,w;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=async function(e,t){y(e.name);let n=await t();return y(null),n},e[3]=w):w=e[3];let T=w,E;e[4]!==t||e[5]!==n?(E=async function(e,r){let i=await dt({scope:e.scope,name:e.name,existingNames:r});if(!i.ok){Z.error(t({id:`UPjaXD`,values:{0:e.name,1:i.error}}));return}Z.success(t({id:`0g7rCZ`,values:{0:i.name}})),n(e.scope,i.name)},e[4]=t,e[5]=n,e[6]=E):E=e[6];let D=E,O,k;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e||i(null)},k=()=>i(null),e[7]=O,e[8]=k):(O=e[7],k=e[8]);let A;e[9]===r?A=e[10]:(A=(0,Q.jsx)(br,{skill:r,onOpenChange:O,onDeleted:k}),e[9]=r,e[10]=A);let j=a?.skill??null,M=a?.existingNames??Mr,N,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{e||o(null)},N=()=>o(null),e[11]=N,e[12]=P):(N=e[11],P=e[12]);let F;e[13]!==j||e[14]!==M?(F=(0,Q.jsx)(Er,{skill:j,existingNames:M,onOpenChange:P,onRenamed:N}),e[13]=j,e[14]=M,e[15]=F):F=e[15];let I;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{e||l(null)},e[16]=I):I=e[16];let L;e[17]===s?L=e[18]:(L=(0,Q.jsx)(Or,{target:s,onOpenChange:I}),e[17]=s,e[18]=L);let R;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{e||d(null)},e[19]=R):R=e[19];let z;e[20]===u?z=e[21]:(z=(0,Q.jsx)(wr,{target:u,onOpenChange:R}),e[20]=u,e[21]=z);let B;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>{e||p(null)},e[22]=B):B=e[22];let V;e[23]===f?V=e[24]:(V=(0,Q.jsx)(Cr,{target:f,onOpenChange:B}),e[23]=f,e[24]=V);let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{e||h(null)},e[25]=H):H=e[25];let U;e[26]===m?U=e[27]:(U=(0,Q.jsx)(Sr,{target:m,onOpenChange:H}),e[26]=m,e[27]=U);let W;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>{e||_(null)},e[28]=W):W=e[28];let G;e[29]===g?G=e[30]:(G=(0,Q.jsx)(Tr,{target:g,onOpenChange:W}),e[29]=g,e[30]=G);let K;e[31]!==F||e[32]!==L||e[33]!==z||e[34]!==V||e[35]!==U||e[36]!==G||e[37]!==A?(K=(0,Q.jsxs)(Q.Fragment,{children:[A,F,L,z,V,U,G]}),e[31]=F,e[32]=L,e[33]=z,e[34]=V,e[35]=U,e[36]=G,e[37]=A,e[38]=K):K=e[38];let ee=K,q,J,Y,te,X,ne;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(q=(e,t)=>o({skill:e,existingNames:t}),J=(e,t)=>l({scope:e.scope,name:e.name,toScope:t}),Y=(e,t)=>d({skill:e,filePath:t}),te=(e,t)=>p({skill:e,filePath:t}),X=(e,t)=>h(t===void 0?{skill:e}:{skill:e,prefix:t}),ne=(e,t)=>_({skill:e,editor:t}),e[39]=q,e[40]=J,e[41]=Y,e[42]=te,e[43]=X,e[44]=ne):(q=e[39],J=e[40],Y=e[41],te=e[42],X=e[43],ne=e[44]);let re;return e[45]!==ee||e[46]!==D||e[47]!==x||e[48]!==v?(re={installingName:v,install:x,convertLocations:C,runLocationWrite:T,duplicate:D,requestDelete:i,requestRename:q,requestScopeMove:J,requestFileRename:Y,requestFileDelete:te,requestFileCreate:X,requestForkResolve:ne,dialogs:ee},e[45]=ee,e[46]=D,e[47]=x,e[48]=v,e[49]=re):re=e[49],re}function Ar(e){return e.map(jr).join(`, `)}function jr(e){return Me[e]??e}var Mr=new Set;function Nr(e){let t=(0,Dt.c)(7),{absolutePath:n,menuKind:r}=e,i=r===void 0?`dropdown`:r,a=typeof window<`u`?window.okDesktop:void 0;if(!a||!n)return null;let o;t[0]===n?o=t[1]:(o=()=>void a.shell.showItemInFolder(n),t[0]=n,t[1]=o);let s,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(Je,{"aria-hidden":!0}),c=Et(a.platform),t[2]=s,t[3]=c):(s=t[2],c=t[3]);let l;return t[4]!==i||t[5]!==o?(l=(0,Q.jsxs)(En,{menuKind:i,onSelect:o,children:[s,c]}),t[4]=i,t[5]=o,t[6]=l):l=t[6],l}function Pr(e){let t=(0,Dt.c)(68),{skill:n,filePath:r,actions:i,menuKind:a}=e,o=a===void 0?`dropdown`:a,{_:l}=c(),u;t[0]!==r||t[1]!==n.absolutePath?(u=n.absolutePath?`${nt(n.absolutePath)}/${r}`:void 0,t[0]=r,t[1]=n.absolutePath,t[2]=u):u=t[2];let d=u,f;t[3]===n.path?f=t[4]:(f=nt(n.path),t[3]=n.path,t[4]=f);let p=`${f}/${r}`,m;t[5]===l?m=t[6]:(m=async function(e){try{await wt(e),Z.success(l({id:`SXCSQd`}))}catch{Z.error(l({id:`cRHuuI`}))}},t[5]=l,t[6]=m);let h=m,g;t[7]!==i||t[8]!==r||t[9]!==n?(g=()=>i.requestFileRename(n,r),t[7]=i,t[8]=r,t[9]=n,t[10]=g):g=t[10];let _,v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(Cn,{"aria-hidden":!0}),v=(0,Q.jsx)(s,{id:`2wxgft`}),t[11]=_,t[12]=v):(_=t[11],v=t[12]);let y;t[13]!==o||t[14]!==g?(y=(0,Q.jsxs)(En,{menuKind:o,onSelect:g,children:[_,v]}),t[13]=o,t[14]=g,t[15]=y):y=t[15];let b;t[16]!==d||t[17]!==o?(b=(0,Q.jsx)(Nr,{absolutePath:d,menuKind:o}),t[16]=d,t[17]=o,t[18]=b):b=t[18];let x,S;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(qe,{"aria-hidden":!0}),S=(0,Q.jsx)(s,{id:`zd00pH`}),t[19]=x,t[20]=S):(x=t[19],S=t[20]);let C;t[21]===o?C=t[22]:(C=(0,Q.jsxs)(Mn,{menuKind:o,children:[x,S]}),t[21]=o,t[22]=C);let w;t[23]!==d||t[24]!==h||t[25]!==o?(w=d?(0,Q.jsx)(En,{menuKind:o,onSelect:()=>void h(d),children:(0,Q.jsx)(s,{id:`z2funE`})}):null,t[23]=d,t[24]=h,t[25]=o,t[26]=w):w=t[26];let T;t[27]!==h||t[28]!==p?(T=()=>void h(p),t[27]=h,t[28]=p,t[29]=T):T=t[29];let E;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(s,{id:`xloBjn`}),t[30]=E):E=t[30];let D;t[31]!==o||t[32]!==T?(D=(0,Q.jsx)(En,{menuKind:o,onSelect:T,children:E}),t[31]=o,t[32]=T,t[33]=D):D=t[33];let O;t[34]!==o||t[35]!==w||t[36]!==D?(O=(0,Q.jsxs)(Tn,{menuKind:o,children:[w,D]}),t[34]=o,t[35]=w,t[36]=D,t[37]=O):O=t[37];let k;t[38]!==o||t[39]!==O?(k=(0,Q.jsx)(jn,{menuKind:o,children:O}),t[38]=o,t[39]=O,t[40]=k):k=t[40];let A;t[41]!==o||t[42]!==C||t[43]!==k?(A=(0,Q.jsxs)(An,{menuKind:o,children:[C,k]}),t[41]=o,t[42]=C,t[43]=k,t[44]=A):A=t[44];let j;t[45]!==o||t[46]!==A||t[47]!==y||t[48]!==b?(j=(0,Q.jsxs)(Tn,{menuKind:o,children:[y,b,A]}),t[45]=o,t[46]=A,t[47]=y,t[48]=b,t[49]=j):j=t[49];let M;t[50]===o?M=t[51]:(M=(0,Q.jsx)(kn,{menuKind:o}),t[50]=o,t[51]=M);let N;t[52]!==i||t[53]!==r||t[54]!==n?(N=()=>i.requestFileDelete(n,r),t[52]=i,t[53]=r,t[54]=n,t[55]=N):N=t[55];let P,F;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(Ze,{"aria-hidden":!0}),F=(0,Q.jsx)(s,{id:`cnGeoo`}),t[56]=P,t[57]=F):(P=t[56],F=t[57]);let I;t[58]!==o||t[59]!==N?(I=(0,Q.jsxs)(En,{menuKind:o,variant:`destructive`,onSelect:N,children:[P,F]}),t[58]=o,t[59]=N,t[60]=I):I=t[60];let L;t[61]!==o||t[62]!==I?(L=(0,Q.jsx)(Tn,{menuKind:o,children:I}),t[61]=o,t[62]=I,t[63]=L):L=t[63];let R;return t[64]!==j||t[65]!==M||t[66]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[j,M,L]}),t[64]=j,t[65]=M,t[66]=L,t[67]=R):R=t[67],R}function Fr(e){let t=(0,Dt.c)(15),{skill:n,actions:r,existingNames:i,menuKind:a}=e,o=a===void 0?`dropdown`:a,s=He(),c=m().states,{dispatch:l}=bn(),u=typeof window<`u`?window.okDesktop:void 0,d;t[0]!==n.name||t[1]!==n.scope||t[2]!==s?(d=nn({skillName:n.name,scope:n.scope,workspace:s}),t[0]=n.name,t[1]=n.scope,t[2]=s,t[3]=d):d=t[3];let f=d,p;t[4]!==l||t[5]!==f||t[6]!==c||t[7]!==o?(p=o===`context`?(0,Q.jsx)(lr,{input:f,installStates:c,dispatch:l}):(0,Q.jsx)(dr,{input:f,installStates:c,isElectronHost:u!=null,dispatch:l}),t[4]=l,t[5]=f,t[6]=c,t[7]=o,t[8]=p):p=t[8];let h;return t[9]!==r||t[10]!==i||t[11]!==o||t[12]!==n||t[13]!==p?(h=(0,Q.jsx)(Ir,{actions:r,existingNames:i,menuKind:o,skill:n,openWithAi:p}),t[9]=r,t[10]=i,t[11]=o,t[12]=n,t[13]=p,t[14]=h):h=t[14],h}function Ir(e){let t=(0,Dt.c)(124),{actions:n,existingNames:i,menuKind:a,openWithAi:o,skill:l}=e,{_:u}=c(),d=it(),f=Hn(l,n),m=l.absolutePath,h;t[0]===u?h=t[1]:(h=async function(e){try{await wt(e),Z.success(u({id:`SXCSQd`}))}catch{Z.error(u({id:`cRHuuI`}))}},t[0]=u,t[1]=h);let g=h,_;t[2]!==m||t[3]!==a?(_=(0,Q.jsx)(Nr,{absolutePath:m,menuKind:a}),t[2]=m,t[3]=a,t[4]=_):_=t[4];let v,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Q.jsx)(qe,{"aria-hidden":!0}),y=(0,Q.jsx)(s,{id:`zd00pH`}),t[5]=v,t[6]=y):(v=t[5],y=t[6]);let b;t[7]===a?b=t[8]:(b=(0,Q.jsxs)(Mn,{menuKind:a,children:[v,y]}),t[7]=a,t[8]=b);let x;t[9]!==m||t[10]!==g||t[11]!==a?(x=m?(0,Q.jsx)(En,{menuKind:a,onSelect:()=>void g(m),children:(0,Q.jsx)(s,{id:`z2funE`})}):null,t[9]=m,t[10]=g,t[11]=a,t[12]=x):x=t[12];let S;t[13]!==g||t[14]!==l.path?(S=()=>void g(l.path),t[13]=g,t[14]=l.path,t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(s,{id:`xloBjn`}),t[16]=C):C=t[16];let w;t[17]!==a||t[18]!==S?(w=(0,Q.jsx)(En,{menuKind:a,onSelect:S,children:C}),t[17]=a,t[18]=S,t[19]=w):w=t[19];let T;t[20]!==a||t[21]!==x||t[22]!==w?(T=(0,Q.jsxs)(Tn,{menuKind:a,children:[x,w]}),t[20]=a,t[21]=x,t[22]=w,t[23]=T):T=t[23];let E;t[24]!==a||t[25]!==T?(E=(0,Q.jsx)(jn,{menuKind:a,children:T}),t[24]=a,t[25]=T,t[26]=E):E=t[26];let D;t[27]!==a||t[28]!==E||t[29]!==b?(D=(0,Q.jsxs)(An,{menuKind:a,children:[b,E]}),t[27]=a,t[28]=E,t[29]=b,t[30]=D):D=t[30];let O;t[31]!==a||t[32]!==o||t[33]!==D||t[34]!==_?(O=(0,Q.jsxs)(Tn,{menuKind:a,children:[_,o,D]}),t[31]=a,t[32]=o,t[33]=D,t[34]=_,t[35]=O):O=t[35];let k;t[36]===a?k=t[37]:(k=(0,Q.jsx)(kn,{menuKind:a}),t[36]=a,t[37]=k);let A;t[38]!==n||t[39]!==i||t[40]!==l?(A=()=>void n.duplicate(l,i),t[38]=n,t[39]=i,t[40]=l,t[41]=A):A=t[41];let j,M;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(r,{"aria-hidden":!0}),M=(0,Q.jsx)(s,{id:`euc6Ns`}),t[42]=j,t[43]=M):(j=t[42],M=t[43]);let N;t[44]!==a||t[45]!==A?(N=(0,Q.jsxs)(En,{menuKind:a,onSelect:A,children:[j,M]}),t[44]=a,t[45]=A,t[46]=N):N=t[46];let P;t[47]!==n||t[48]!==i||t[49]!==l?(P=()=>n.requestRename(l,i),t[47]=n,t[48]=i,t[49]=l,t[50]=P):P=t[50];let F,I;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(Cn,{"aria-hidden":!0}),I=(0,Q.jsx)(s,{id:`2wxgft`}),t[51]=F,t[52]=I):(F=t[51],I=t[52]);let L;t[53]!==a||t[54]!==P?(L=(0,Q.jsxs)(En,{menuKind:a,onSelect:P,children:[F,I]}),t[53]=a,t[54]=P,t[55]=L):L=t[55];let R;t[56]!==n||t[57]!==l?(R=()=>n.requestFileCreate(l),t[56]=n,t[57]=l,t[58]=R):R=t[58];let z,B;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsx)(p,{"aria-hidden":!0}),B=(0,Q.jsx)(s,{id:`HdkSiO`}),t[59]=z,t[60]=B):(z=t[59],B=t[60]);let V;t[61]!==a||t[62]!==R?(V=(0,Q.jsxs)(En,{menuKind:a,onSelect:R,children:[z,B]}),t[61]=a,t[62]=R,t[63]=V):V=t[63];let H,U;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Q.jsx)(Sn,{"aria-hidden":!0}),U=(0,Q.jsx)(s,{id:`TKQ7K-`}),t[64]=H,t[65]=U):(H=t[64],U=t[65]);let W;t[66]===a?W=t[67]:(W=(0,Q.jsxs)(Mn,{menuKind:a,children:[H,U]}),t[66]=a,t[67]=W);let G;t[68]!==n||t[69]!==l?(G=e=>n.requestForkResolve(l,e),t[68]=n,t[69]=l,t[70]=G):G=t[70];let K;t[71]!==f||t[72]!==a||t[73]!==l||t[74]!==G?(K=(0,Q.jsx)(qn,{toggles:f,skill:l,menuKind:a,onResolveFork:G}),t[71]=f,t[72]=a,t[73]=l,t[74]=G,t[75]=K):K=t[75];let ee;t[76]!==a||t[77]!==K?(ee=(0,Q.jsx)(Tn,{menuKind:a,children:K}),t[76]=a,t[77]=K,t[78]=ee):ee=t[78];let q;t[79]!==a||t[80]!==ee?(q=(0,Q.jsx)(jn,{menuKind:a,className:Vn,children:ee}),t[79]=a,t[80]=ee,t[81]=q):q=t[81];let J;t[82]!==a||t[83]!==W||t[84]!==q?(J=(0,Q.jsxs)(An,{menuKind:a,children:[W,q]}),t[82]=a,t[83]=W,t[84]=q,t[85]=J):J=t[85];let Y;t[86]!==n||t[87]!==l?(Y=()=>n.requestScopeMove(l,l.scope===`project`?`global`:`project`),t[86]=n,t[87]=l,t[88]=Y):Y=t[88];let te;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(xn,{"aria-hidden":!0}),t[89]=te):te=t[89];let X;t[90]!==d.global||t[91]!==d.project||t[92]!==l.scope?(X=l.scope===`project`?(0,Q.jsx)(s,{id:`bpytj4`,values:{0:d.global}}):(0,Q.jsx)(s,{id:`bpytj4`,values:{0:d.project}}),t[90]=d.global,t[91]=d.project,t[92]=l.scope,t[93]=X):X=t[93];let ne;t[94]!==a||t[95]!==Y||t[96]!==X?(ne=(0,Q.jsxs)(En,{menuKind:a,onSelect:Y,children:[te,X]}),t[94]=a,t[95]=Y,t[96]=X,t[97]=ne):ne=t[97];let re;t[98]!==a||t[99]!==N||t[100]!==L||t[101]!==V||t[102]!==J||t[103]!==ne?(re=(0,Q.jsxs)(Tn,{menuKind:a,children:[N,L,V,J,ne]}),t[98]=a,t[99]=N,t[100]=L,t[101]=V,t[102]=J,t[103]=ne,t[104]=re):re=t[104];let ie;t[105]===a?ie=t[106]:(ie=(0,Q.jsx)(kn,{menuKind:a}),t[105]=a,t[106]=ie);let ae;t[107]!==n||t[108]!==l?(ae=()=>n.requestDelete(l),t[107]=n,t[108]=l,t[109]=ae):ae=t[109];let oe,se;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,Q.jsx)(Ze,{"aria-hidden":!0}),se=(0,Q.jsx)(s,{id:`cnGeoo`}),t[110]=oe,t[111]=se):(oe=t[110],se=t[111]);let ce;t[112]!==a||t[113]!==ae?(ce=(0,Q.jsxs)(En,{menuKind:a,variant:`destructive`,onSelect:ae,children:[oe,se]}),t[112]=a,t[113]=ae,t[114]=ce):ce=t[114];let le;t[115]!==a||t[116]!==ce?(le=(0,Q.jsx)(Tn,{menuKind:a,children:ce}),t[115]=a,t[116]=ce,t[117]=le):le=t[117];let ue;return t[118]!==O||t[119]!==k||t[120]!==re||t[121]!==ie||t[122]!==le?(ue=(0,Q.jsxs)(Q.Fragment,{children:[O,k,re,ie,le]}),t[118]=O,t[119]=k,t[120]=re,t[121]=ie,t[122]=le,t[123]=ue):ue=t[123],ue}export{_n as C,Xt as D,bn as E,dn as S,hn as T,rn as _,Or as a,Zt as b,dr as c,Bn as d,Vn as f,xn as g,wn as h,kr as i,lr as l,Hn as m,Pr as n,hr as o,qn as p,Nr as r,_r as s,Fr as t,or as u,$t as v,en as w,Qt as x,tn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./dist-Nvb76hAm.js";import{Ba as t,Ha as n,Ka as r,Vt as i}from"./dist-
|
|
1
|
+
import{r as e}from"./dist-Nvb76hAm.js";import{Ba as t,Ha as n,Ka as r,Vt as i}from"./dist-8YlYwLg8.js";function a(e){return e.path.split(`/`).slice(0,-1).join(`/`)}var o=[`project`,`global`];function s(e){return{project:new Set(e.filter(e=>e.scope===`project`).map(e=>e.name)),global:new Set(e.filter(e=>e.scope===`global`).map(e=>e.name))}}function c(e){return e.startsWith(`open-knowledge-pack-`)?e.slice(r.length):e}function l(e){let t=e.path.replace(/\/SKILL\.mdx?$/i,``);return e.scope===`global`?`~/${t}`:t}function u(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,`~`).replace(/^\/root/,`~`)}function d(e){let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):e}function f(){let{_:t}=e();return{project:t({id:`e0NrBM`}),global:t({id:`2GT3Hf`})}}function p(){let{_:t}=e();return{project:t({id:`Es3G-g`}),global:t({id:`fvrHin`})}}function m(e,r){if(e.includes(`/`))return r===`global`?`~/${e}`:e;let i=e===`agents`?`.agents/skills`:(r===`global`?n:t)[e]??`.${e}/skills`;return r===`global`?`~/${i}`:i}function h(e,t){return!e||t===``?[]:Object.keys(e).filter(n=>e[n]===t)}function g(e){let t=e.hostAliases??{},n=e=>e.split(`/`).slice(0,-1).join(`/`),r=new Set(e.hosts),i=new Set([...e.hosts.filter(e=>!e.includes(`/`)).map(t=>m(t,e.scope).replace(/^~\//,``)),...(e.customPlacements??[]).map(e=>n(e.path)),...e.path.includes(`/`)?[n(e.path.replace(/\/SKILL\.mdx?$/i,``))]:[]]);return Object.entries(t).filter(([e,t])=>!r.has(e)&&i.has(t)).map(([e])=>e)}function _(e){let t=new Set(e.symlinkedHosts??[]),n=[],r=new Set,i=(e,t)=>{r.has(e)||(r.add(e),n.push({dir:e,symlink:t}))};i(l(e),t.has(e.hosts[0]??``));for(let n of e.hosts)i(`${m(n,e.scope)}/${e.name}`,t.has(n));for(let t of e.customPlacements??[])i(t.path,t.mode===`link`);return n}function v(e,t=e.hosts){let n=i.options,r=g(e);return[...t.includes(`agents`)?[`agents`]:[],...n.filter(e=>t.includes(e)||r.includes(e)),...(e.customPlacements??[]).map(e=>a(e))]}export{d as a,m as c,p as d,f,v as i,s as l,h as n,c as o,a as r,_ as s,o as t,u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ut as e}from"./dist-CKFXiBrL.js";import{t}from"./dist-DUfEoSbR.js";import{o as n}from"./documents-events-BNjnUfCu.js";import{t as r}from"./parse-api-error-DfesE4Y7.js";async function i(e){return r(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e,t,n){try{let r=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return r.ok?{ok:!0,...await r.json().catch(()=>null)??{}}:{ok:!1,error:await i(r)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:a(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function c(){return a(`/api/skills/popular?limit=24`)}async function l(n,r){let i=await a(n?`/api/skills?scope=${n}`:`/api/skills`,r);if(!i.ok)return i;let{ok:o,...s}=i,c=e.safeParse(s);return c.success?{ok:!0,skills:c.data.skills}:{ok:!1,error:t._({id:`iXs0kt`})}}async function u(e){return a(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function d(e,t){return a(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function f(e,t){return a(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function p(e){return a(`/api/skills/publisher?source=${encodeURIComponent(e)}`)}async function m(e,t){return a(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function h(){return a(`/api/skills/installed`)}async function g(e){try{let n=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return!r||typeof r.docName!=`string`?{ok:!1,error:t._({id:`iBVgIQ`})}:{ok:!0,docName:r.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[],...typeof r?.path==`string`?{path:r.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e){try{let i=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!i.ok){let e=await i.json().catch(()=>null),t=r(e)??`HTTP ${i.status}`,n=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return n?{ok:!1,error:t,skills:n}:{ok:!1,error:t}}let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function y(e){try{let r=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return!a||!Array.isArray(a.results)?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,...a})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function b(e,r){try{let a=await fetch(`/api/skill-upload?scope=${encodeURIComponent(r)}`,{method:`POST`,body:e});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return!o||typeof o.name!=`string`?{ok:!1,error:t._({id:`iodl3p`})}:(n(),{ok:!0,name:o.name,alreadyImported:o?.alreadyImported??!1,collisionRenamedFrom:o?.collisionRenamedFrom,warnings:o?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function x(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function S(e){try{let r=x(e.name,e.existingNames),a=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:r})});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return typeof o?.name==`string`?(n(),{ok:!0,name:o.name}):{ok:!1,error:t._({id:`emMrXQ`})}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e){let{name:t,fromScope:r,toScope:a}=e;if(r===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:r,toScope:a})});if(!e.ok)return{ok:!1,error:await i(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1,...typeof r?.to==`string`?{to:r.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function T(e,t){try{let r=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function D(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,path:r?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,from:r?.from??e.from,to:r?.to??e.to,...r?.fromDocName===void 0?{}:{fromDocName:r.fromDocName},...r?.toDocName===void 0?{}:{toDocName:r.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function k(e){try{let t=new URLSearchParams({scope:e.scope,name:e.name,path:e.path}),r=await fetch(`/api/skill-file?${t.toString()}`,{method:`DELETE`});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return n(),{ok:!0,existed:a?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function A(e,t,n){try{let r=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${r.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await i(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function j(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await i(n)};let r=await n.json().catch(()=>null);return typeof r?.text==`string`?{ok:!0,text:r.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function M(e,t){return j({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function N(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,hosts:r?.hosts??[],scripts:r?.scripts??!1,warnings:r?.warnings??[],warningCodes:r?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function P(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:r?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function F(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function I(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function L(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function R(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await i(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function z(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:r?.updated??!1,source:r?.source??``,localBody:r?.localBody,upstreamBody:r?.upstreamBody,...r?.gitTracked===void 0?{}:{gitTracked:r.gitTracked},warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function B(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{F as A,O as C,_ as D,B as E,D as M,s as O,z as S,f as T,M as _,S as a,P as b,p as c,A as d,v as f,l as g,h,m as i,b as j,I as k,u as l,N as m,T as n,g as o,y as p,k as r,c as s,L as t,d as u,w as v,E as w,R as x,C as y};
|
|
1
|
+
import{Ut as e}from"./dist-8YlYwLg8.js";import{t}from"./dist-DUfEoSbR.js";import{o as n}from"./documents-events-DKMYe_0X.js";import{t as r}from"./parse-api-error-DfesE4Y7.js";async function i(e){return r(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e,t,n){try{let r=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return r.ok?{ok:!0,...await r.json().catch(()=>null)??{}}:{ok:!1,error:await i(r)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:a(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function c(){return a(`/api/skills/popular?limit=24`)}async function l(n,r){let i=await a(n?`/api/skills?scope=${n}`:`/api/skills`,r);if(!i.ok)return i;let{ok:o,...s}=i,c=e.safeParse(s);return c.success?{ok:!0,skills:c.data.skills}:{ok:!1,error:t._({id:`iXs0kt`})}}async function u(e){return a(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function d(e,t){return a(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function f(e,t){return a(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function p(e){return a(`/api/skills/publisher?source=${encodeURIComponent(e)}`)}async function m(e,t){return a(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function h(){return a(`/api/skills/installed`)}async function g(e){try{let n=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return!r||typeof r.docName!=`string`?{ok:!1,error:t._({id:`iBVgIQ`})}:{ok:!0,docName:r.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[],...typeof r?.path==`string`?{path:r.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e){try{let i=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!i.ok){let e=await i.json().catch(()=>null),t=r(e)??`HTTP ${i.status}`,n=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return n?{ok:!1,error:t,skills:n}:{ok:!1,error:t}}let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function y(e){try{let r=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return!a||!Array.isArray(a.results)?{ok:!1,error:t._({id:`HLoO-Z`})}:(n(),{ok:!0,...a})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function b(e,r){try{let a=await fetch(`/api/skill-upload?scope=${encodeURIComponent(r)}`,{method:`POST`,body:e});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return!o||typeof o.name!=`string`?{ok:!1,error:t._({id:`iodl3p`})}:(n(),{ok:!0,name:o.name,alreadyImported:o?.alreadyImported??!1,collisionRenamedFrom:o?.collisionRenamedFrom,warnings:o?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function x(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function S(e){try{let r=x(e.name,e.existingNames),a=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:r})});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return typeof o?.name==`string`?(n(),{ok:!0,name:o.name}):{ok:!1,error:t._({id:`emMrXQ`})}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e){let{name:t,fromScope:r,toScope:a}=e;if(r===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:r,toScope:a})});if(!e.ok)return{ok:!1,error:await i(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,committed:r?.committed??!1,...typeof r?.to==`string`?{to:r.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function T(e,t){try{let r=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function D(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,path:r?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,from:r?.from??e.from,to:r?.to??e.to,...r?.fromDocName===void 0?{}:{fromDocName:r.fromDocName},...r?.toDocName===void 0?{}:{toDocName:r.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function k(e){try{let t=new URLSearchParams({scope:e.scope,name:e.name,path:e.path}),r=await fetch(`/api/skill-file?${t.toString()}`,{method:`DELETE`});if(!r.ok)return{ok:!1,error:await i(r)};let a=await r.json().catch(()=>null);return n(),{ok:!0,existed:a?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function A(e,t,n){try{let r=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${r.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await i(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function j(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await i(n)};let r=await n.json().catch(()=>null);return typeof r?.text==`string`?{ok:!0,text:r.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function M(e,t){return j({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function N(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,hosts:r?.hosts??[],scripts:r?.scripts??!1,warnings:r?.warnings??[],warningCodes:r?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function P(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:r?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function F(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function I(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function L(e){let t=await o(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function R(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await i(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function z(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:r?.updated??!1,source:r?.source??``,localBody:r?.localBody,upstreamBody:r?.upstreamBody,...r?.gitTracked===void 0?{}:{gitTracked:r.gitTracked},warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function B(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await i(t)};let r=await t.json().catch(()=>null);return n(),{ok:!0,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{F as A,O as C,_ as D,B as E,D as M,s as O,z as S,f as T,M as _,S as a,P as b,p as c,A as d,v as f,l as g,h,m as i,b as j,I as k,u as l,N as m,T as n,g as o,y as p,k as r,c as s,L as t,d as u,w as v,E as w,R as x,C as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as e}from"./CodeMirrorPropInput-
|
|
1
|
+
import{B as e}from"./CodeMirrorPropInput-BG6vAU3f.js";import{C as t,D as n,E as r,G as i,L as a,S as o,U as s,W as c,g as l,it as u,rt as d}from"./config-provider-D-VNxNBY.js";import{$ as f,At as p,Ct as m,Nt as h,Ot as g,Y as _,Z as v,et as y}from"./dist-DAqA-GDU.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:a(this.yanchor),yhead:a(this.yhead)}}static fromJSON(t){return new e(r(t.yanchor),r(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new l(e)}toYPos(e,t=0){return n(this.ytext,e,t)}fromYPos(e){let n=t(r(e),this.ytext.doc);if(n==null||n.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:n.index,assoc:n.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?g.cursor(n.pos,n.assoc):g.range(t.pos,n.pos)}},S=p.define({combine(e){return e[e.length-1]}}),C=m.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
|
|
2
2
|
`);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},T=f.fromClass(w),E=v.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),D=m.define(),O=class extends y{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return s(`span`,[i(`class`,`cm-ySelectionCaret`),i(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[c(``),s(`div`,[i(`class`,`cm-ySelectionCaretDot`)]),c(``),s(`div`,[i(`class`,`cm-ySelectionInfo`)],[c(this.name)]),c(``)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},k=class{constructor(e){this.conf=e.state.facet(S),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[D.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=h.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let i=this.conf.ytext,a=i.doc,s=this.conf.awareness,c=[],l=this.conf.awareness.getLocalState();if(l!=null){let t=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),a=t?e.state.selection.main:null,c=l.cursor==null?null:r(l.cursor.anchor),u=l.cursor==null?null:r(l.cursor.head);if(a!=null){let e=n(i,a.anchor),t=n(i,a.head);(l.cursor==null||!o(c,e)||!o(u,t))&&s.setLocalStateField(`cursor`,{anchor:e,head:t})}else l.cursor!=null&&t&&s.setLocalStateField(`cursor`,null)}s.getStates().forEach((n,r)=>{if(r===s.doc.clientID)return;let o=n.cursor;if(o==null||o.anchor==null||o.head==null)return;let l=t(o.anchor,a),f=t(o.head,a);if(l==null||f==null||l.type!==i||f.type!==i)return;let{color:p=`#30bced`,name:m=`Anonymous`}=n.user||{},h=n.user&&n.user.colorLight||p+`33`,g=u(l.index,f.index),v=d(l.index,f.index),y=e.view.state.doc.lineAt(g),b=e.view.state.doc.lineAt(v);if(y.number===b.number)c.push({from:g,to:v,value:_.mark({attributes:{style:`background-color: ${h}`},class:`cm-ySelection`})});else{c.push({from:g,to:y.from+y.length,value:_.mark({attributes:{style:`background-color: ${h}`},class:`cm-ySelection`})}),c.push({from:b.from,to:v,value:_.mark({attributes:{style:`background-color: ${h}`},class:`cm-ySelection`})});for(let t=y.number+1;t<b.number;t++){let n=e.view.state.doc.line(t).from;c.push({from:n,to:n,value:_.line({attributes:{style:`background-color: ${h}`,class:`cm-yLineSelection`}})})}}c.push({from:f.index,to:f.index,value:_.widget({side:f.index-l.index>0?-1:1,block:!1,widget:new O(p,m)})})}),this.decorations=_.set(c,!0)}},A=f.fromClass(k,{decorations:e=>e.decorations}),j=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},M=p.define({combine(e){return e[e.length-1]}});m.define();var N=class{constructor(t){this.view=t,this.conf=t.state.facet(M),this._undoManager=this.conf.undoManager,this.syncConf=t.state.facet(S),this._beforeChangeSelection=null,this._mux=e(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:e})=>{let n=e.meta.get(this);if(n){let e=this.syncConf.fromYRange(n);t.dispatch(t.state.update({selection:e,effects:[v.scrollIntoView(e)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(C)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},P=f.fromClass(N),F=({state:e,dispatch:t})=>e.facet(M).undo()||!0,I=({state:e,dispatch:t})=>e.facet(M).redo()||!0,L=[{key:`Mod-z`,run:F,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:I,preventDefault:!0},{key:`Mod-Shift-z`,run:I,preventDefault:!0}],R=(e,t,{undoManager:n=new l(e)}={})=>{let r=new x(e,t),i=[S.of(r),T];return t&&i.push(E,A),n!==!1&&i.push(M.of(new j(n)),P,v.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?F(t):e.inputType===`historyRedo`?I(t):!1}})),i};export{L as n,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-DHXgxWLL.js";import{Rr as ne}from"./dist-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-DHXgxWLL.js";import{Rr as ne}from"./dist-8YlYwLg8.js";import{t as re}from"./x-DS57FvHW.js";import{t as ie}from"./badge-DFX4S3a5.js";var s=i(),c=e(n(),1),l=t();function u(e){let t=(0,s.c)(96),{value:n,onChange:i,onBlur:u,placeholder:d,id:f,disabled:p,grammar:ae,entryProblems:m,"aria-describedby":oe,"aria-invalid":se,ref:h}=e,ce=ae===void 0?`frontmatter-tag`:ae,{_:g}=r(),[_,le]=(0,c.useState)(``),[v,ue]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),de=(0,c.useRef)(null),x;t[0]===h?x=t[1]:(x=e=>{de.current=e,typeof h==`function`?h(e):h&&(h.current=e)},t[0]=h,t[1]=x);let fe=x,[S,C]=(0,c.useState)(!1),pe=(0,c.useId)(),w=`${f??pe}-grammar-hint`,T=`${f??pe}-pill`,E;t[2]!==g||t[3]!==d?(E=d??g({id:`M5mfAe`}),t[2]=g,t[3]=d,t[4]=E):E=t[4];let me=E,D=ce===`frontmatter-tag`,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{le(``),C(!1),ue(null)},t[5]=O):O=t[5];let k=O,A;t[6]!==v||t[7]!==i||t[8]!==D||t[9]!==n?(A=e=>{let t=e.trim(),r=v===null?-1:n.indexOf(v);if(!t)return r!==-1&&i(n.filter((e,t)=>t!==r)),v!==null&&k(),!0;if(D&&!ne(t))return C(!0),!1;let a=D&&t.startsWith(`#`)?t.slice(1):t,o=n.indexOf(a);if(r===-1)return o===-1&&i([...n,a]),k(),!0;let ee=n.map((e,t)=>t===r?a:e);return i(o===-1||o===r?ee:ee.filter((e,t)=>t!==r)),k(),!0},t[6]=v,t[7]=i,t[8]=D,t[9]=n,t[10]=A):A=t[10];let j=A,M;t[11]!==i||t[12]!==n?(M=e=>{i(n.filter((t,n)=>n!==e))},t[11]=i,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==j||t[15]!==p||t[16]!==_?(P=e=>{p||(_.trim()!==``&&j(_),le(e),C(!1),b(null),ue(e))},t[14]=j,t[15]=p,t[16]=_,t[17]=P):P=t[17];let F=P,I;t[18]!==y||t[19]!==n?(I=y===null?-1:n.indexOf(y),t[18]=y,t[19]=n,t[20]=I):I=t[20];let L=I,R;t[21]===n?R=t[22]:(R=e=>{b(e===null?null:n[e]??null)},t[21]=n,t[22]=R);let z=R,B,V;t[23]===v?(B=t[24],V=t[25]):(B=()=>{v!==null&&(de.current?.focus(),de.current?.select())},V=[v],t[23]=v,t[24]=B,t[25]=V),(0,c.useEffect)(B,V);let H=S?`true`:se,he=p&&`pointer-events-none opacity-60`,U;t[26]===he?U=t[27]:(U=a(`flex min-h-8 w-full flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent px-2 py-1 text-sm transition-colors`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,he),t[26]=he,t[27]=U);let W;if(t[28]!==g||t[29]!==F||t[30]!==p||t[31]!==v||t[32]!==m||t[33]!==y||t[34]!==T||t[35]!==N||t[36]!==D||t[37]!==n){let e;t[39]!==g||t[40]!==F||t[41]!==p||t[42]!==v||t[43]!==m||t[44]!==y||t[45]!==T||t[46]!==N||t[47]!==D?(e=(e,t)=>{if(e===v)return null;let n=D&&!ne(e),r=m?.get(e),i=n||r!==void 0,s=r??(n?`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`:void 0),c=e===y,u=(0,l.jsxs)(ie,{id:`${T}-${t}`,variant:i?`destructive`:`secondary`,"data-tag-invalid":n?`true`:void 0,"data-tag-problem":r===void 0?void 0:`true`,"data-highlighted":c?`true`:void 0,className:a(`gap-1 pl-2 pr-1 normal-case`,i&&`ring-1 ring-destructive/40`,c&&`ring-2 ring-ring/70`),children:[(0,l.jsx)(`button`,{type:`button`,tabIndex:-1,className:`cursor-pointer rounded-sm font-mono`,onDoubleClick:()=>F(e),disabled:p,"aria-label":g({id:`NkNfSr`,values:{tag:e}}),title:s===void 0?g({id:`vHlhDc`}):void 0,children:e}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>N(t),"aria-label":g({id:`D4H2N6`,values:{tag:e}}),className:`rounded-sm p-0.5 hover:bg-background/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,disabled:p,children:(0,l.jsx)(re,{className:`size-3`,"aria-hidden":`true`})})]},e);return s===void 0?u:(0,l.jsxs)(te,{children:[(0,l.jsx)(o,{asChild:!0,children:u}),(0,l.jsx)(ee,{children:s})]},e)},t[39]=g,t[40]=F,t[41]=p,t[42]=v,t[43]=m,t[44]=y,t[45]=T,t[46]=N,t[47]=D,t[48]=e):e=t[48],W=n.map(e),t[28]=g,t[29]=F,t[30]=p,t[31]=v,t[32]=m,t[33]=y,t[34]=T,t[35]=N,t[36]=D,t[37]=n,t[38]=W}else W=t[38];let G;t[49]!==S||t[50]!==y?(G=e=>{le(e.target.value),S&&C(!1),y!==null&&b(null)},t[49]=S,t[50]=y,t[51]=G):G=t[51];let K;t[52]!==j||t[53]!==F||t[54]!==_||t[55]!==S||t[56]!==v||t[57]!==z||t[58]!==L||t[59]!==N||t[60]!==n?(K=e=>{let t=e.currentTarget,r=t.selectionStart===0&&t.selectionEnd===0;if(v===null&&n.length>0){if(e.key===`ArrowLeft`&&(L!==-1||r)){e.preventDefault(),z(L===-1?n.length-1:Math.max(0,L-1));return}if(e.key===`ArrowRight`&&L!==-1){e.preventDefault(),z(L===n.length-1?null:L+1);return}if((e.key===`Home`||e.key===`End`)&&L!==-1){e.preventDefault(),z(e.key===`Home`?0:n.length-1);return}}if(L!==-1&&v===null){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=n[L];t!==void 0&&F(t);return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let t=n[L-1]??null,r=n[L+1]??null;N(L),b(e.key===`Backspace`?t??r:r??t);return}}e.key===`Enter`?(_.trim()||v!==null)&&(e.preventDefault(),j(_)):e.key===`,`?(e.preventDefault(),_.trim()&&j(_)):e.key===`Tab`?_.trim()&&(e.preventDefault(),j(_)):e.key===`Backspace`&&_===``&&n.length>0&&v===null?(e.preventDefault(),N(n.length-1)):e.key===`Escape`&&(v!==null||S?(e.preventDefault(),k(),b(null)):L!==-1&&(e.preventDefault(),b(null)))},t[52]=j,t[53]=F,t[54]=_,t[55]=S,t[56]=v,t[57]=z,t[58]=L,t[59]=N,t[60]=n,t[61]=K):K=t[61];let q;t[62]!==j||t[63]!==_||t[64]!==v||t[65]!==u?(q=()=>{(_.trim()||v!==null)&&!j(_)&&v!==null&&k(),b(null),u?.()},t[62]=j,t[63]=_,t[64]=v,t[65]=u,t[66]=q):q=t[66];let ge=n.length===0?me:``,_e=S?`true`:void 0,J;t[67]!==oe||t[68]!==S||t[69]!==w?(J=[S?w:void 0,oe].filter(Boolean).join(` `)||void 0,t[67]=oe,t[68]=S,t[69]=w,t[70]=J):J=t[70];let ve=S?`true`:se,ye=L===-1?void 0:`${T}-${L}`,Y=S&&`text-destructive placeholder:text-destructive/60`,X;t[71]===Y?X=t[72]:(X=a(`min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed`,Y),t[71]=Y,t[72]=X);let Z;t[73]!==fe||t[74]!==p||t[75]!==_||t[76]!==f||t[77]!==G||t[78]!==K||t[79]!==q||t[80]!==ge||t[81]!==_e||t[82]!==J||t[83]!==ve||t[84]!==ye||t[85]!==X?(Z=(0,l.jsx)(`input`,{id:f,ref:fe,type:`text`,value:_,onChange:G,onKeyDown:K,onBlur:q,placeholder:ge,"data-tag-invalid":_e,"aria-describedby":J,"aria-invalid":ve,"aria-activedescendant":ye,disabled:p,className:X}),t[73]=fe,t[74]=p,t[75]=_,t[76]=f,t[77]=G,t[78]=K,t[79]=q,t[80]=ge,t[81]=_e,t[82]=J,t[83]=ve,t[84]=ye,t[85]=X,t[86]=Z):Z=t[86];let Q;t[87]!==S||t[88]!==w?(Q=S&&(0,l.jsx)(`span`,{id:w,role:`alert`,"data-testid":`tag-pill-input-error`,className:`w-full px-1 pt-0.5 text-xs text-destructive`,children:`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`}),t[87]=S,t[88]=w,t[89]=Q):Q=t[89];let $;return t[90]!==H||t[91]!==U||t[92]!==W||t[93]!==Z||t[94]!==Q?($=(0,l.jsxs)(`div`,{"data-slot":`tag-pill-input`,"aria-invalid":H,className:U,children:[W,Z,Q]}),t[90]=H,t[91]=U,t[92]=W,t[93]=Z,t[94]=Q,t[95]=$):$=t[95],$}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./doc-paths-
|
|
1
|
+
import{m as e}from"./doc-paths-78wumkT9.js";import{s as t}from"./navigation-targets-BS-NLUXq.js";function n(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`skill-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function r(r,i){let a=t(r,i);return{resolvedTarget:a,hashDocName:a.target,hash:a.kind===`skill-file`?e({scope:a.scope,name:a.name,path:a.path,...a.host?{host:a.host}:{}}):null,displayState:n(a)}}export{r as t};
|
package/dist/public/assets/{terminal-cli-display-Du0YYwUl.js → terminal-cli-display-DghW2MNw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r}from"./dist-Nvb76hAm.js";import{n as i}from"./dist-PQ5KMVDh.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import"./dropdown-menu-CLgDYkh1.js";import{Gt as s,Kt as c,n as l,t as ee}from"./dist-CKFXiBrL.js";import{t as u}from"./badge-DFX4S3a5.js";import{i as d,n as f,t as p}from"./cursor-B6reg1lS.js";import{t as te}from"./copilot-Dh1BU6kS.js";var m=e(n(),1),h=`ok-acp-registered-agents-v1`,g={agents:[],defaultKey:null};function _(e){return`${e.source}:${e.id}`}function v(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.source===`registry`||t.source===`custom`)&&typeof t.id==`string`&&t.id!==``&&typeof t.name==`string`&&t.name!==``&&(t.iconUrl===void 0||typeof t.iconUrl==`string`)&&(t.lastUsedAt===void 0||typeof t.lastUsedAt==`number`)&&(t.featured===void 0||typeof t.featured==`boolean`)}function y(){let e;try{e=localStorage.getItem(h)}catch{return g}if(e===null)return g;try{let t=JSON.parse(e),n=Array.isArray(t.agents)?t.agents.filter(v):[];return{agents:n,defaultKey:typeof t.defaultKey==`string`&&n.some(e=>_(e)===t.defaultKey)?t.defaultKey:null}}catch(e){return console.warn(`[registered-agents] discarding corrupt localStorage payload`,e),g}}function b(e){try{localStorage.setItem(h,JSON.stringify(e))}catch(e){console.warn(`[registered-agents] failed to persist registration`,e)}}var x=null,S=[],C=null,w=new Set;function T(){return x===null&&(x=y()),x}function E(e){x=e,C=M(e.agents,S);for(let e of w)e()}function ne(){E(y())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===h||e.key===null)&&ne()});function D(e){return w.add(e),()=>w.delete(e)}var O=()=>(C===null&&(C=M(T().agents,S)),C),k=()=>{let{agents:e,defaultKey:t}=T();return t===null?null:e.find(e=>_(e)===t)??null};function A(e,t={}){let{makeDefault:n=!0}=t,r=_(e),i=T();if(!n){let t={agents:i.agents.some(e=>_(e)===r)?i.agents.map(t=>_(t)===r?{...e,...t.lastUsedAt===void 0?{}:{lastUsedAt:t.lastUsedAt}}:t):[...i.agents,e],defaultKey:i.defaultKey};b(t),E(t);return}let a=i.agents.filter(e=>_(e)!==r),o={agents:[{...e,lastUsedAt:Date.now()},...a],defaultKey:r};b(o),E(o)}function j(e,t){let n=e.lastUsedAt??0,r=t.lastUsedAt??0;if(n!==r)return r-n;let i=e.featured===!0?0:1,a=t.featured===!0?0:1;return i===a?e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}):i-a}function M(e,t){let n=new Set(e.map(_));return[...e,...t.filter(e=>!n.has(_(e)))].sort(j)}function N(e){S=[...e],C=M(T().agents,S);for(let e of w)e()}function P(e,t){let n=T();if(n.defaultKey!==e)return;let r=n.agents.find(n=>_(n)!==e&&t(n))??null,i={agents:n.agents,defaultKey:r?_(r):null};b(i),E(i)}function re(e,t){return t!==null&&e.some(e=>e.source===t.source&&e.id===t.id)?t:e[0]??null}function ie(e){let t=new Map(e.map(e=>[_(e),e])),n=T(),r=!1,i=n.agents.map(e=>{let n=t.get(_(e));if(n===void 0)return e;let i=n.name??e.name,a=n.iconUrl??e.iconUrl,o=n.supported??e.supported,s=n.featured??e.featured;return i===e.name&&a===e.iconUrl&&o===e.supported&&s===e.featured?e:(r=!0,{...e,name:i,...a===void 0?{}:{iconUrl:a},...o===void 0?{}:{supported:o},...s===void 0?{}:{featured:s}})});if(!r)return;let a={agents:i,defaultKey:n.defaultKey};b(a),E(a)}function ae(){return(0,m.useSyncExternalStore)(D,O,O)}function oe(){return(0,m.useSyncExternalStore)(D,k,k)}var F=t(),I=a();async function se(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}}function L(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var R=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,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.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."},{id:`openclaw`,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`},{id:`hermes`,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`}],z=R.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`&&e.id!==`openclaw`&&e.id!==`hermes`),B=`ok-acp-enabled-agents-v1`,V={};function H(e,t){return`in-app:${e}:${t}`}function U(e){return`terminal:${e}`}function W(e){return`desktop:${e}`}function G(e,t){return e??t}function K(){let e;try{e=localStorage.getItem(B)}catch(e){return console.warn(`[enabled-agents] localStorage unavailable; treating overrides as empty`,e),V}if(e===null)return V;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return V;let n={};for(let[e,r]of Object.entries(t))typeof r==`boolean`&&(n[e]=r);return n}catch(e){return console.warn(`[enabled-agents] discarding corrupt localStorage payload`,e),V}}function q(e){try{localStorage.setItem(B,JSON.stringify(e))}catch(e){console.warn(`[enabled-agents] failed to persist override`,e)}}var J=null,Y=new Set;function X(){return J===null&&(J=K()),J}function Z(e){J=e;for(let e of Y)e()}function ce(){Z(K())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===B||e.key===null)&&ce()});function le(e){return Y.add(e),()=>Y.delete(e)}var Q=()=>X();function ue(e,t){let n=X();if(t===void 0){if(!(e in n))return;let{[e]:t,...r}=n;q(r),Z(r);return}if(n[e]===t)return;let r={...n,[e]:t};q(r),Z(r)}function de(){return(0,m.useSyncExternalStore)(le,Q,Q)}function fe(e,t,n,r,i){return i===!1?!1:G(e[H(t,n)],r)}function pe(e,t,n){return G(e[U(t)],n[t]!==!1)}function $(e,t){return G(e[W(t)],!1)}function me(e){let t=(0,I.c)(5),{className:n}=e,i;t[0]===n?i=t[1]:(i=o(`h-4 px-1 text-[10px]`,n),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsx)(r,{id:`YBt9YP`}),t[2]=a):a=t[2];let s;return t[3]===i?s=t[4]:(s=(0,F.jsx)(u,{variant:`gray`,className:i,children:a}),t[3]=i,t[4]=s),s}function he(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Antigravity icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ge(e){let t=(0,I.c)(6),n,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Hermes icon`}),r=(0,F.jsx)(`path`,{d:`M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z`}),i=(0,F.jsx)(`path`,{d:`M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z`}),a=(0,F.jsx)(`path`,{clipRule:`evenodd`,d:`M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z`}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):(n=t[0],r=t[1],i=t[2],a=t[3]);let o;return t[4]===e?o=t[5]:(o=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Hermes icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,...e,children:[n,r,i,a]}),t[4]=e,t[5]=o),o}function _e(e){let t=(0,I.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenClaw icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,F.jsxs)(`mask`,{id:`openclaw-eyes`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:120,height:120,children:[(0,F.jsx)(`rect`,{width:120,height:120,fill:`white`}),(0,F.jsx)(`circle`,{cx:45,cy:35,r:6,fill:`black`}),(0,F.jsx)(`circle`,{cx:75,cy:35,r:6,fill:`black`})]}),t[1]=r):r=t[1];let i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(`g`,{fill:`currentColor`,mask:`url(#openclaw-eyes)`,children:[(0,F.jsx)(`path`,{d:`M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z`}),(0,F.jsx)(`path`,{d:`M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z`}),(0,F.jsx)(`path`,{d:`M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z`})]}),a=(0,F.jsx)(`path`,{d:`M45 15 Q35 5 30 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),o=(0,F.jsx)(`path`,{d:`M75 15 Q85 5 90 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),t[2]=i,t[3]=a,t[4]=o):(i=t[2],a=t[3],o=t[4]);let s;return t[5]===e?s=t[6]:(s=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenClaw icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 120 120`,...e,children:[n,r,i,a,o]}),t[5]=e,t[6]=s),s}function ve(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenCode icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ye(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Pi icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var be={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`,openclaw:`openclaw`,hermes:`hermes`};function xe(e){let t=(0,I.c)(47),n,r,a,s;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4]):({id:r,style:s,className:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s);let{resolvedTheme:c}=i(),u=be[r],m=u?(c===`dark`?l[u]:void 0)??ee[u]:void 0,h;t[5]!==m||t[6]!==s?(h=m?{...s,"--ok-brand-color":m}:s,t[5]=m,t[6]=s,t[7]=h):h=t[7];let g=h,_=m&&`[&_*]:![color:var(--ok-brand-color)]`,v;t[8]!==n||t[9]!==_?(v=o(_,n),t[8]=n,t[9]=_,t[10]=v):v=t[10];let y=v;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==y||t[12]!==g||t[13]!==a?(e=(0,F.jsx)(d,{style:g,className:y,...a}),t[11]=y,t[12]=g,t[13]=a,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==y||t[16]!==g||t[17]!==a?(e=(0,F.jsx)(f,{style:g,className:y,...a}),t[15]=y,t[16]=g,t[17]=a,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==y||t[20]!==g||t[21]!==a?(e=(0,F.jsx)(p,{style:g,className:y,...a}),t[19]=y,t[20]=g,t[21]=a,t[22]=e):e=t[22],e}if(r===`copilot`){let e;return t[23]!==y||t[24]!==g||t[25]!==a?(e=(0,F.jsx)(te,{style:g,className:y,...a}),t[23]=y,t[24]=g,t[25]=a,t[26]=e):e=t[26],e}if(r===`opencode`){let e;return t[27]!==y||t[28]!==g||t[29]!==a?(e=(0,F.jsx)(ve,{style:g,className:y,...a}),t[27]=y,t[28]=g,t[29]=a,t[30]=e):e=t[30],e}if(r===`pi`){let e;return t[31]!==y||t[32]!==g||t[33]!==a?(e=(0,F.jsx)(ye,{style:g,className:y,...a}),t[31]=y,t[32]=g,t[33]=a,t[34]=e):e=t[34],e}if(r===`antigravity`){let e;return t[35]!==y||t[36]!==g||t[37]!==a?(e=(0,F.jsx)(he,{style:g,className:y,...a}),t[35]=y,t[36]=g,t[37]=a,t[38]=e):e=t[38],e}if(r===`openclaw`){let e;return t[39]!==y||t[40]!==g||t[41]!==a?(e=(0,F.jsx)(_e,{style:g,className:y,...a}),t[39]=y,t[40]=g,t[41]=a,t[42]=e):e=t[42],e}if(r===`hermes`){let e;return t[43]!==y||t[44]!==g||t[45]!==a?(e=(0,F.jsx)(ge,{style:g,className:y,...a}),t[43]=y,t[44]=g,t[45]=a,t[46]=e):e=t[46],e}return null}var Se=c;function Ce(e){return s[e].handoffTarget}export{ae as S,re as _,$ as a,N as b,W as c,U as d,de as f,ie as g,se as h,me as i,H as l,z as m,Ce as n,fe as o,R as p,xe as r,pe as s,Se as t,ue as u,P as v,oe as x,A as y};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r}from"./dist-Nvb76hAm.js";import{n as i}from"./dist-PQ5KMVDh.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import"./dropdown-menu-CLgDYkh1.js";import{Gt as s,Kt as c,n as l,t as ee}from"./dist-8YlYwLg8.js";import{t as u}from"./badge-DFX4S3a5.js";import{i as d,n as f,t as p}from"./cursor-B6reg1lS.js";import{t as te}from"./copilot-Dh1BU6kS.js";var m=e(n(),1),h=`ok-acp-registered-agents-v1`,g={agents:[],defaultKey:null};function _(e){return`${e.source}:${e.id}`}function v(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.source===`registry`||t.source===`custom`)&&typeof t.id==`string`&&t.id!==``&&typeof t.name==`string`&&t.name!==``&&(t.iconUrl===void 0||typeof t.iconUrl==`string`)&&(t.lastUsedAt===void 0||typeof t.lastUsedAt==`number`)&&(t.featured===void 0||typeof t.featured==`boolean`)}function y(){let e;try{e=localStorage.getItem(h)}catch{return g}if(e===null)return g;try{let t=JSON.parse(e),n=Array.isArray(t.agents)?t.agents.filter(v):[];return{agents:n,defaultKey:typeof t.defaultKey==`string`&&n.some(e=>_(e)===t.defaultKey)?t.defaultKey:null}}catch(e){return console.warn(`[registered-agents] discarding corrupt localStorage payload`,e),g}}function b(e){try{localStorage.setItem(h,JSON.stringify(e))}catch(e){console.warn(`[registered-agents] failed to persist registration`,e)}}var x=null,S=[],C=null,w=new Set;function T(){return x===null&&(x=y()),x}function E(e){x=e,C=M(e.agents,S);for(let e of w)e()}function ne(){E(y())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===h||e.key===null)&&ne()});function D(e){return w.add(e),()=>w.delete(e)}var O=()=>(C===null&&(C=M(T().agents,S)),C),k=()=>{let{agents:e,defaultKey:t}=T();return t===null?null:e.find(e=>_(e)===t)??null};function A(e,t={}){let{makeDefault:n=!0}=t,r=_(e),i=T();if(!n){let t={agents:i.agents.some(e=>_(e)===r)?i.agents.map(t=>_(t)===r?{...e,...t.lastUsedAt===void 0?{}:{lastUsedAt:t.lastUsedAt}}:t):[...i.agents,e],defaultKey:i.defaultKey};b(t),E(t);return}let a=i.agents.filter(e=>_(e)!==r),o={agents:[{...e,lastUsedAt:Date.now()},...a],defaultKey:r};b(o),E(o)}function j(e,t){let n=e.lastUsedAt??0,r=t.lastUsedAt??0;if(n!==r)return r-n;let i=e.featured===!0?0:1,a=t.featured===!0?0:1;return i===a?e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}):i-a}function M(e,t){let n=new Set(e.map(_));return[...e,...t.filter(e=>!n.has(_(e)))].sort(j)}function N(e){S=[...e],C=M(T().agents,S);for(let e of w)e()}function P(e,t){let n=T();if(n.defaultKey!==e)return;let r=n.agents.find(n=>_(n)!==e&&t(n))??null,i={agents:n.agents,defaultKey:r?_(r):null};b(i),E(i)}function re(e,t){return t!==null&&e.some(e=>e.source===t.source&&e.id===t.id)?t:e[0]??null}function ie(e){let t=new Map(e.map(e=>[_(e),e])),n=T(),r=!1,i=n.agents.map(e=>{let n=t.get(_(e));if(n===void 0)return e;let i=n.name??e.name,a=n.iconUrl??e.iconUrl,o=n.supported??e.supported,s=n.featured??e.featured;return i===e.name&&a===e.iconUrl&&o===e.supported&&s===e.featured?e:(r=!0,{...e,name:i,...a===void 0?{}:{iconUrl:a},...o===void 0?{}:{supported:o},...s===void 0?{}:{featured:s}})});if(!r)return;let a={agents:i,defaultKey:n.defaultKey};b(a),E(a)}function ae(){return(0,m.useSyncExternalStore)(D,O,O)}function oe(){return(0,m.useSyncExternalStore)(D,k,k)}var F=t(),I=a();async function se(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:L(e)}}}function L(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var R=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,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.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."},{id:`openclaw`,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`},{id:`hermes`,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`}],z=R.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`&&e.id!==`openclaw`&&e.id!==`hermes`),B=`ok-acp-enabled-agents-v1`,V={};function H(e,t){return`in-app:${e}:${t}`}function U(e){return`terminal:${e}`}function W(e){return`desktop:${e}`}function G(e,t){return e??t}function K(){let e;try{e=localStorage.getItem(B)}catch(e){return console.warn(`[enabled-agents] localStorage unavailable; treating overrides as empty`,e),V}if(e===null)return V;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return V;let n={};for(let[e,r]of Object.entries(t))typeof r==`boolean`&&(n[e]=r);return n}catch(e){return console.warn(`[enabled-agents] discarding corrupt localStorage payload`,e),V}}function q(e){try{localStorage.setItem(B,JSON.stringify(e))}catch(e){console.warn(`[enabled-agents] failed to persist override`,e)}}var J=null,Y=new Set;function X(){return J===null&&(J=K()),J}function Z(e){J=e;for(let e of Y)e()}function ce(){Z(K())}typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`storage`,e=>{(e.key===B||e.key===null)&&ce()});function le(e){return Y.add(e),()=>Y.delete(e)}var Q=()=>X();function ue(e,t){let n=X();if(t===void 0){if(!(e in n))return;let{[e]:t,...r}=n;q(r),Z(r);return}if(n[e]===t)return;let r={...n,[e]:t};q(r),Z(r)}function de(){return(0,m.useSyncExternalStore)(le,Q,Q)}function fe(e,t,n,r,i){return i===!1?!1:G(e[H(t,n)],r)}function pe(e,t,n){return G(e[U(t)],n[t]!==!1)}function $(e,t){return G(e[W(t)],!1)}function me(e){let t=(0,I.c)(5),{className:n}=e,i;t[0]===n?i=t[1]:(i=o(`h-4 px-1 text-[10px]`,n),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsx)(r,{id:`YBt9YP`}),t[2]=a):a=t[2];let s;return t[3]===i?s=t[4]:(s=(0,F.jsx)(u,{variant:`gray`,className:i,children:a}),t[3]=i,t[4]=s),s}function he(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Antigravity icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ge(e){let t=(0,I.c)(6),n,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Hermes icon`}),r=(0,F.jsx)(`path`,{d:`M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z`}),i=(0,F.jsx)(`path`,{d:`M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z`}),a=(0,F.jsx)(`path`,{clipRule:`evenodd`,d:`M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z`}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):(n=t[0],r=t[1],i=t[2],a=t[3]);let o;return t[4]===e?o=t[5]:(o=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Hermes icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,...e,children:[n,r,i,a]}),t[4]=e,t[5]=o),o}function _e(e){let t=(0,I.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenClaw icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,F.jsxs)(`mask`,{id:`openclaw-eyes`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:120,height:120,children:[(0,F.jsx)(`rect`,{width:120,height:120,fill:`white`}),(0,F.jsx)(`circle`,{cx:45,cy:35,r:6,fill:`black`}),(0,F.jsx)(`circle`,{cx:75,cy:35,r:6,fill:`black`})]}),t[1]=r):r=t[1];let i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(`g`,{fill:`currentColor`,mask:`url(#openclaw-eyes)`,children:[(0,F.jsx)(`path`,{d:`M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z`}),(0,F.jsx)(`path`,{d:`M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z`}),(0,F.jsx)(`path`,{d:`M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z`})]}),a=(0,F.jsx)(`path`,{d:`M45 15 Q35 5 30 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),o=(0,F.jsx)(`path`,{d:`M75 15 Q85 5 90 8`,fill:`none`,stroke:`currentColor`,strokeWidth:3,strokeLinecap:`round`}),t[2]=i,t[3]=a,t[4]=o):(i=t[2],a=t[3],o=t[4]);let s;return t[5]===e?s=t[6]:(s=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenClaw icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 120 120`,...e,children:[n,r,i,a,o]}),t[5]=e,t[6]=s),s}function ve(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`OpenCode icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function ye(e){let t=(0,I.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(`title`,{children:`Pi icon`}),r=(0,F.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,F.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,F.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var be={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`,openclaw:`openclaw`,hermes:`hermes`};function xe(e){let t=(0,I.c)(47),n,r,a,s;t[0]===e?(n=t[1],r=t[2],a=t[3],s=t[4]):({id:r,style:s,className:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=s);let{resolvedTheme:c}=i(),u=be[r],m=u?(c===`dark`?l[u]:void 0)??ee[u]:void 0,h;t[5]!==m||t[6]!==s?(h=m?{...s,"--ok-brand-color":m}:s,t[5]=m,t[6]=s,t[7]=h):h=t[7];let g=h,_=m&&`[&_*]:![color:var(--ok-brand-color)]`,v;t[8]!==n||t[9]!==_?(v=o(_,n),t[8]=n,t[9]=_,t[10]=v):v=t[10];let y=v;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==y||t[12]!==g||t[13]!==a?(e=(0,F.jsx)(d,{style:g,className:y,...a}),t[11]=y,t[12]=g,t[13]=a,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==y||t[16]!==g||t[17]!==a?(e=(0,F.jsx)(f,{style:g,className:y,...a}),t[15]=y,t[16]=g,t[17]=a,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==y||t[20]!==g||t[21]!==a?(e=(0,F.jsx)(p,{style:g,className:y,...a}),t[19]=y,t[20]=g,t[21]=a,t[22]=e):e=t[22],e}if(r===`copilot`){let e;return t[23]!==y||t[24]!==g||t[25]!==a?(e=(0,F.jsx)(te,{style:g,className:y,...a}),t[23]=y,t[24]=g,t[25]=a,t[26]=e):e=t[26],e}if(r===`opencode`){let e;return t[27]!==y||t[28]!==g||t[29]!==a?(e=(0,F.jsx)(ve,{style:g,className:y,...a}),t[27]=y,t[28]=g,t[29]=a,t[30]=e):e=t[30],e}if(r===`pi`){let e;return t[31]!==y||t[32]!==g||t[33]!==a?(e=(0,F.jsx)(ye,{style:g,className:y,...a}),t[31]=y,t[32]=g,t[33]=a,t[34]=e):e=t[34],e}if(r===`antigravity`){let e;return t[35]!==y||t[36]!==g||t[37]!==a?(e=(0,F.jsx)(he,{style:g,className:y,...a}),t[35]=y,t[36]=g,t[37]=a,t[38]=e):e=t[38],e}if(r===`openclaw`){let e;return t[39]!==y||t[40]!==g||t[41]!==a?(e=(0,F.jsx)(_e,{style:g,className:y,...a}),t[39]=y,t[40]=g,t[41]=a,t[42]=e):e=t[42],e}if(r===`hermes`){let e;return t[43]!==y||t[44]!==g||t[45]!==a?(e=(0,F.jsx)(ge,{style:g,className:y,...a}),t[43]=y,t[44]=g,t[45]=a,t[46]=e):e=t[46],e}return null}var Se=c;function Ce(e){return s[e].handoffTarget}export{ae as S,re as _,$ as a,N as b,W as c,U as d,de as f,ie as g,se as h,me as i,H as l,z as m,Ce as n,fe as o,R as p,xe as r,pe as s,Se as t,ue as u,P as v,oe as x,A as y};
|