panoma 0.1.3 → 0.1.5
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/app/BUILD-INFO.json +2 -2
- package/app/apps/web/.next-bundle/BUILD_ID +1 -1
- package/app/apps/web/.next-bundle/app-build-manifest.json +128 -128
- package/app/apps/web/.next-bundle/app-path-routes-manifest.json +33 -33
- package/app/apps/web/.next-bundle/build-manifest.json +2 -2
- package/app/apps/web/.next-bundle/prerender-manifest.json +9 -9
- package/app/apps/web/.next-bundle/server/app/(app)/agents/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/ai/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/ai/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/bridge/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/bridge/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/copies/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/copies/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/credentials/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/credentials/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/disk/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/disk/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/hidden/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/hidden/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/packages/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/packages/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/[id]/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/runs/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/search/page.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/search/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/twin/look/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/twin/look/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/twin/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/twin/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/unsaved/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/unsaved/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/accounts/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/consult/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/journal/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/keys/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/log/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/mcp/route.js +2 -2
- package/app/apps/web/.next-bundle/server/app/api/agent/mcp/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/notes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ai/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assets/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/launch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/catalog/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/check/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/consultations/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/describe/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/disk/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/enrich/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/environment/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ingest/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ingest/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/apply/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/inspect/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/repair/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/review/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/north/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/notes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/open/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/project/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/rescan/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/roots/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/roots/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/scale/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/secrets/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/today/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/today/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/assign/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/classify/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/critique/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/design/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/distill/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/look/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/look/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/mine/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/score/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/shot/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/shot/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/sources/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/synthesize/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/taste/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/verdicts/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/watch/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/watch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/icon/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app-paths-manifest.json +33 -33
- package/app/apps/web/.next-bundle/server/chunks/2930.js +1 -1
- package/app/apps/web/.next-bundle/server/chunks/3677.js +1 -1
- package/app/apps/web/.next-bundle/server/chunks/5358.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/6462.js +2 -2
- package/app/apps/web/.next-bundle/server/functions-config-manifest.json +6 -6
- package/app/apps/web/.next-bundle/server/middleware-manifest.json +5 -5
- package/app/apps/web/.next-bundle/server/pages/500.html +1 -1
- package/app/apps/web/.next-bundle/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next-bundle/static/chunks/7911-b575e8d05b4ac98f.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/agents/page-f663ded897871800.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/layout-2ee40fbf22eee90a.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/{page-f4dd3e5acee2bfb4.js → page-bd415d39f80a6370.js} +1 -1
- package/dist/{ai-command-U5V5SDJW.js → ai-command-ICITNELE.js} +1 -1
- package/dist/{check-command-64DBJGYM.js → check-command-W52TXOPN.js} +3 -3
- package/dist/{chunk-KNPE4SJG.js → chunk-FN63LYZH.js} +9 -0
- package/dist/{chunk-3WPD5CHL.js → chunk-HFFASR7D.js} +57 -57
- package/dist/{chunk-JMXXTMGV.js → chunk-MU4KCYKO.js} +2 -2
- package/dist/{chunk-FJATGEPD.js → chunk-RX4GQLU2.js} +2 -2
- package/dist/index.js +26 -11
- package/dist/{md-command-73QAVNOP.js → md-command-PBOLZO5S.js} +2 -2
- package/dist/{next-command-OQWKUMAH.js → next-command-3J7F27RT.js} +3 -3
- package/dist/{north-command-7AVYNCB4.js → north-command-VZKU3BBM.js} +3 -3
- package/dist/{review-command-A6V3A5XG.js → review-command-PWW276HI.js} +1 -1
- package/dist/{twin-command-WSVMZWGC.js → twin-command-OA2R6OUW.js} +3 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/app/apps/web/.next-bundle/server/chunks/3750.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/7911-d549c69e290b1f96.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/agents/page-cdb332736d2b75f9.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/layout-20c619e7c3b1eb97.js +0 -1
- /package/app/apps/web/.next-bundle/static/{D8knSMGGk6yOk_0w3z22h → vtPdQvozkVLEPGtv2JvKc}/_buildManifest.js +0 -0
- /package/app/apps/web/.next-bundle/static/{D8knSMGGk6yOk_0w3z22h → vtPdQvozkVLEPGtv2JvKc}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4944],{179:(e,a,l)=>{"use strict";l.d(a,{I18nProvider:()=>o,Ym:()=>c,Zs:()=>d,kj:()=>u});var t=l(9763),n=l(4963),s=l(7911);let r=(0,n.createContext)("en"),i=(0,n.createContext)("panoma");function o(e){let{locale:a,cli:l,children:n}=e;return(0,t.jsx)(r.Provider,{value:a,children:(0,t.jsx)(i.Provider,{value:l,children:n})})}function c(){return(0,n.useContext)(r)}function d(){return(0,n.useContext)(i)}function u(){let e=(0,n.useContext)(r),a=(0,n.useContext)(i);return(0,n.useCallback)((l,t)=>(0,s.t)(e,l,{cli:a,...t}),[e,a])}},660:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},2500:()=>{},3731:(e,a,l)=>{"use strict";l.d(a,{AppShell:()=>y});var t=l(9763),n=l(1723),s=l.n(n),r=l(7244),i=l(4963),o=l(5595),c=l(7911),d=l(179),u=l(8384),h=l(7558),p=l(8337);let m=[{href:"/",label:"nav.projects",icon:o.ENP},{href:"/bridge",label:"dest.bridge",icon:o.YT$},{href:"/unsaved",label:"dest.unsaved",icon:o.YUE},{href:"/disk",label:"dest.disk",icon:o.o7e},{href:"/search",label:"dest.searchCode",icon:o.JJh},{href:"/credentials",label:"dest.credentials",icon:o.JPZ},{href:"/agents",label:"dest.agents",icon:o.gj5},{href:"/twin",label:"dest.twin",icon:o.YL0},{href:"/twin/look",label:"dest.look",icon:o.bZk},{href:"/ai",label:"dest.ai",icon:o.K8V},{href:"/packages",label:"nav.packages",icon:o.XVA},{href:"/runs",label:"nav.activity",icon:o.G7A},{href:"/copies",label:"nav.copies",icon:o.Zs_},{href:"/hidden",label:"dest.hidden",icon:o.B3U}];function b(){let e=(0,r.useRouter)(),a=(0,d.kj)(),[l,n]=(0,i.useState)(!1),[s,c]=(0,i.useState)(""),[b,v]=(0,i.useState)(null),[j,x]=(0,i.useState)(0),[k,y]=(0,i.useState)(null),N=(0,i.useRef)(null),w=(0,i.useRef)(null),_=(0,i.useRef)(null);(0,i.useEffect)(()=>{l&&!b&&fetch("/api/catalog").then(e=>e.json()).then(e=>v(e.projects)).catch(()=>v([]))},[l,b]),(0,i.useEffect)(()=>{function e(e){if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),n(e=>!e);return}"Escape"===e.key&&n(!1)}window.addEventListener("keydown",e);let a=()=>n(!0);return window.addEventListener("panoma:palette",a),()=>{window.removeEventListener("keydown",e),window.removeEventListener("panoma:palette",a)}},[]),(0,i.useEffect)(()=>{l&&(c(""),x(0),y(null),requestAnimationFrame(()=>{var e;return null==(e=N.current)?void 0:e.focus()}))},[l]);let{remote:E}=(0,u.b)(l),C=(0,i.useCallback)(async(e,l)=>{y(a("palette.opening",{name:e.name}));try{var t;let s=await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,tool:l})}),r=await s.json();y(s.ok?null:null!=(t=r.error)?t:a("palette.openFailed")),s.ok&&n(!1)}catch(e){y(a("palette.unreachable"))}},[a]),S=(0,i.useCallback)(a=>{n(!1),e.push(a)},[e]),P=(0,i.useMemo)(()=>{let e=(0,p.A)(s.trim()),a=(null!=b?b:[]).filter(a=>{var l,t,n;return!e||(l=a,t=e,(0,p.A)([l.name,l.root,null!=(n=l.language)?n:""].join(" ")).includes(t))});return e&&a.sort((a,l)=>f(l.name,e)-f(a.name,e)),a.slice(0,8)},[b,s]),[A,L]=(0,i.useState)(0);(0,i.useEffect)(()=>{j<P.length&&L(j)},[j,P.length]);let J=P[Math.min(A,P.length-1)],R=(0,i.useMemo)(()=>{let e=(0,p.A)(s.trim()),l=P.map(e=>({key:"p:".concat(e.id),label:e.name,hint:g(e.root),enter:a(E?"palette.enterCard":"palette.enterEditor"),icon:E?o.wl$:o.KQe,group:"palette.groupProjects",run:()=>E?S("/p/".concat(e.slug)):C(e,"editor")}));for(let t of(J&&(E||(l.push({key:"folder:".concat(J.id),label:a("palette.openFolderOf",{name:J.name}),hint:g(J.root),icon:o.gBk,group:"palette.groupActions",run:()=>C(J,"folder")}),l.push({key:"terminal:".concat(J.id),label:a("palette.openTerminalOf",{name:J.name}),hint:g(J.root),icon:o.Jhl,group:"palette.groupActions",run:()=>C(J,"terminal")})),l.push({key:"card:".concat(J.id),label:a("palette.openCardOf",{name:J.name}),icon:o.wl$,group:"palette.groupActions",run:()=>S("/p/".concat(J.slug))})),e.length>=2&&l.push({key:"search-code",label:a("palette.searchEverywhere",{query:s.trim()}),icon:o.JJh,group:"palette.groupActions",run:()=>S("/search?q=".concat(encodeURIComponent(s.trim())))}),m))(!e||(0,p.A)(a(t.label)).includes(e))&&l.push({key:"go:".concat(t.href),label:a(t.label),icon:t.icon,group:"palette.groupGoTo",run:()=>S(t.href)});return l},[S,P,C,s,E,a,J]);(0,i.useEffect)(()=>{x(e=>Math.min(e,Math.max(0,R.length-1)))},[R.length]);let F=null!==b&&R.length>0;if((0,h.r)(_,l),(0,i.useEffect)(()=>{var e;if(!l)return;let a=null==(e=w.current)?void 0:e.querySelector('[aria-selected="true"]');null==a||a.scrollIntoView({block:"nearest",behavior:"instant"})},[j,l,R.length]),!l)return null;let I="";return(0,t.jsx)("div",{className:"palette-backdrop",role:"presentation",onClick:e=>{e.target===e.currentTarget&&n(!1)},children:(0,t.jsxs)("div",{className:"palette",role:"dialog","aria-modal":"true","aria-label":a("palette.aria"),ref:_,children:[(0,t.jsxs)("div",{className:"palette__search",children:[(0,t.jsx)(o.JJh,{"aria-hidden":!0}),(0,t.jsx)("input",{ref:N,value:s,onChange:e=>{c(e.target.value),x(0)},onKeyDown:function(e){if(null!==b){if("ArrowDown"===e.key)e.preventDefault(),x(e=>(e+1)%Math.max(1,R.length));else if("ArrowUp"===e.key)e.preventDefault(),x(e=>(e-1+R.length)%Math.max(1,R.length));else if("Enter"===e.key){var a;e.preventDefault(),null==(a=R[j])||a.run()}}},placeholder:a("palette.placeholder"),"aria-label":a("palette.searchAria"),role:"combobox","aria-autocomplete":"list","aria-expanded":F,"aria-controls":"palette-results","aria-activedescendant":F?"palette-option-".concat(j):void 0}),(0,t.jsx)("kbd",{children:"esc"})]}),(0,t.jsx)("p",{className:"sr-only",role:"status",children:null===b?a("palette.loading"):a("palette.results",{n:R.length})}),null===b?(0,t.jsx)("p",{className:"palette__empty",children:a("palette.loading")}):0===R.length?(0,t.jsx)("p",{className:"palette__empty",children:a("palette.noMatch",{query:s})}):(0,t.jsx)("ul",{className:"palette__list",id:"palette-results",ref:w,role:"listbox","aria-label":a("palette.aria"),children:R.map((e,l)=>{let n=e.icon,s=e.group!==I?e.group:null;return I=e.group,(0,t.jsxs)(i.Fragment,{children:[s&&(0,t.jsx)("li",{role:"presentation","aria-hidden":!0,children:(0,t.jsx)("p",{className:"palette__group",children:a(s)})}),(0,t.jsx)("li",{role:"presentation",children:(0,t.jsxs)("button",{id:"palette-option-".concat(l),type:"button",role:"option",tabIndex:-1,"aria-selected":l===j,className:l===j?"is-active":void 0,onMouseEnter:()=>x(l),onClick:()=>void e.run(),children:[(0,t.jsx)(n,{"aria-hidden":!0}),(0,t.jsx)("span",{children:e.label}),e.hint&&(0,t.jsx)("span",{className:"palette__hint",children:e.hint}),l===j&&e.enter&&(0,t.jsx)("kbd",{className:"palette__enter",children:e.enter})]})})]},e.key)})}),k&&(0,t.jsx)("p",{className:"palette__notice",role:"status",children:k}),(0,t.jsxs)("p",{className:"palette__footer",children:[(0,t.jsx)("span",{children:a("palette.keysMove")}),(0,t.jsx)("span",{children:a("palette.keysOpen")}),(0,t.jsx)("span",{children:a("palette.keysClose")})]})]})})}function f(e,a){let l=(0,p.A)(e);return l===a?3:l.startsWith(a)?2:+!!l.includes(a)}function g(e){let a=e.split("/");return a.length<=3?e:"…/".concat(a.slice(-2).join("/"))}var v=l(5018),j=l(8010);let x=[{href:"/",label:"nav.projects",icon:o.ENP,exact:!0},{href:"/bridge",label:"nav.bridge",icon:o.YT$,badge:"bridgePending",badgeLabel:"shell.setupLeft"},{href:"/runs",label:"nav.activity",icon:o.G7A,badge:"proposedRuns"},{href:"/unsaved",label:"nav.unsaved",icon:o.YUE,badge:"unsaved"},{href:"/agents",label:"nav.agents",icon:o.gj5},{href:"/twin",label:"nav.twin",icon:o.YL0},{href:"/ai",label:"nav.ai",icon:o.K8V},{href:"/packages",label:"nav.packages",icon:o.XVA},{href:"/search",label:"nav.searchCode",icon:o.JJh},{href:"/credentials",label:"nav.credentials",icon:o.JPZ},{href:"/copies",label:"nav.copies",icon:o.Zs_},{href:"/disk",label:"nav.disk",icon:o.o7e}],k="https://github.com/PanomaAI/panoma";function y(e){let{stats:a,ephemeral:l}=e,n=(0,r.usePathname)(),u=(0,r.useRouter)(),h=(0,d.kj)(),p=(0,d.Ym)(),{query:m,setQuery:f}=(0,v.S)(),[g,j]=(0,i.useState)(!0);function y(e){e!==p&&(document.cookie="".concat(c.CL,"=").concat(e,"; path=/; max-age=31536000; samesite=lax"),u.refresh())}return(0,i.useLayoutEffect)(()=>{"hidden"===window.localStorage.getItem("panoma-shell-sidebar")&&j(!1)},[]),(0,i.useLayoutEffect)(()=>(document.documentElement.classList.toggle("sidebar-collapsed",!g),()=>document.documentElement.classList.remove("sidebar-collapsed")),[g]),(0,i.useEffect)(()=>{let e=window.requestAnimationFrame(()=>{document.documentElement.classList.add("sidebar-ready")});return()=>{window.cancelAnimationFrame(e),document.documentElement.classList.remove("sidebar-ready")}},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{}),(0,t.jsxs)("header",{className:"app-topbar",children:[(0,t.jsxs)("div",{className:"brand-cluster",children:[(0,t.jsx)("button",{type:"button",className:"sidebar-toggle",onClick:function(){j(e=>{let a=!e;return window.localStorage.setItem("panoma-shell-sidebar",a?"open":"hidden"),a})},"aria-expanded":g,"aria-controls":"app-sidebar","aria-label":h(g?"shell.hideSidebar":"shell.showSidebar"),title:h(g?"shell.hideSidebar":"shell.showSidebar"),children:g?(0,t.jsx)(o.Y48,{"aria-hidden":!0}):(0,t.jsx)(o.ngD,{"aria-hidden":!0})}),(0,t.jsxs)(s(),{href:"/",className:"brand-lockup","aria-label":h("shell.brandHome"),children:[(0,t.jsx)("img",{src:"/assets/brand/panoma.svg",alt:"",width:38,height:38}),(0,t.jsx)("span",{children:"Panoma"})]})]}),(0,t.jsxs)("form",{className:"global-search",role:"search",onSubmit:function(e){e.preventDefault();let a=new URLSearchParams;m.trim()&&a.set("q",m.trim()),u.push(a.size>0?"/?".concat(a.toString()):"/")},children:[(0,t.jsx)(o.JJh,{"aria-hidden":!0}),(0,t.jsx)("input",{value:m,onChange:e=>f(e.target.value),placeholder:h("shell.searchPlaceholder"),"aria-label":h("shell.searchPlaceholder")}),(0,t.jsx)("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("panoma:palette")),"aria-label":h("shell.openPalette"),children:(0,t.jsx)("kbd",{children:"⌘ K"})})]}),(0,t.jsx)(N,{ephemeral:l})]}),(0,t.jsxs)("aside",{id:"app-sidebar",className:"app-sidebar","aria-label":h("shell.sections"),children:[(0,t.jsxs)("div",{className:"sidebar-scroll",children:[(0,t.jsx)("nav",{children:x.map(e=>{var l;let r=e.icon,i=e.exact?n===e.href:n.startsWith(e.href),o=e.badge?null==a?void 0:a[e.badge]:void 0;return(0,t.jsxs)(s(),{href:e.href,className:i?"is-active":void 0,title:g?void 0:h(e.label),children:[(0,t.jsx)(r,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"nav-label",children:h(e.label)}),"number"==typeof o&&o>0&&(0,t.jsx)("span",{className:"nav-badge","aria-label":h(null!=(l=e.badgeLabel)?l:"shell.pending",{n:o}),children:o}),(0,t.jsx)(_,{})]},e.label)})}),a&&(0,t.jsxs)("div",{className:"catalog-summary","aria-label":h("shell.summary"),children:[(0,t.jsxs)("div",{className:"catalog-summary__title",children:[(0,t.jsx)(o.ENP,{"aria-hidden":!0}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:h("shell.summaryProjects",{n:a.projects})}),(0,t.jsx)("span",{children:h("shell.summaryScope")})]}),(0,t.jsx)("strong",{className:"catalog-summary__count",title:"".concat(h("shell.summaryProjects",{n:a.projects})," \xb7 ").concat(h("shell.summaryScope")),"aria-hidden":!0,children:a.projects})]}),(0,t.jsxs)("dl",{children:[(0,t.jsx)(w,{label:h("shell.live"),value:a.live,tone:"live"}),(0,t.jsx)(w,{label:h("shell.paused"),value:a.paused,tone:"paused"}),(0,t.jsx)(w,{label:h("shell.dormant"),value:a.dormant,tone:"dormant"}),(0,t.jsx)(w,{label:h("shell.noGit"),value:a.noGit,tone:"muted"})]}),(0,t.jsxs)("dl",{className:"catalog-summary__aside",children:[(0,t.jsx)(w,{label:h("shell.copies"),value:a.copies,tone:"muted"}),a.hidden>0&&(0,t.jsx)(w,{label:h("shell.hidden"),value:a.hidden,tone:"muted"})]})]})]}),(0,t.jsxs)("div",{className:"sidebar-foot",children:[(0,t.jsxs)("p",{className:"sidebar-update",children:[(0,t.jsx)("span",{children:h("shell.footerLocal")}),(0,t.jsx)("span",{children:h("shell.footerPrivate")}),(0,t.jsx)("a",{href:k,target:"_blank",rel:"noreferrer",children:h("shell.footerSource")})]}),(0,t.jsxs)("div",{className:"lang-toggle",role:"group","aria-label":h("shell.language"),children:[(0,t.jsx)("button",{type:"button",onClick:()=>y("es"),className:"es"===p?"is-active":void 0,"aria-pressed":"es"===p,title:"Espa\xf1ol",children:"ES"}),(0,t.jsx)("button",{type:"button",onClick:()=>y("en"),className:"en"===p?"is-active":void 0,"aria-pressed":"en"===p,title:"English",children:"EN"})]})]})]})]})}function N(e){let{ephemeral:a}=e,l=(0,d.kj)(),[n,s]=(0,i.useState)(!1),r=(0,i.useRef)(null),c=(0,i.useRef)(null);return(0,j.y)(r,n,e=>{var a;s(!1),"escape"===e&&(null==(a=c.current)||a.focus())}),(0,t.jsxs)("div",{className:"account-holder",ref:r,children:[(0,t.jsx)("button",{ref:c,type:"button",className:"account-button","aria-expanded":n,"aria-label":l("shell.localAccount"),title:l("shell.localAccount"),onClick:()=>s(e=>!e),children:(0,t.jsx)(o.vsK,{"aria-hidden":!0})}),n&&(0,t.jsxs)("div",{className:"account-card",role:"dialog","aria-label":l("shell.localAccount"),children:[(0,t.jsx)("strong",{children:l("shell.footerLocal")}),(0,t.jsx)("p",{children:l("shell.accountNone")}),a&&(0,t.jsxs)("p",{className:"account-ephemeral",children:[(0,t.jsx)("strong",{children:l("shell.ephemeral")}),(0,t.jsx)("br",{}),l("shell.ephemeralDetail")]}),(0,t.jsx)("a",{href:k,target:"_blank",rel:"noreferrer",children:l("shell.footerSource")})]})]})}function w(e){let{label:a,value:l,tone:n}=e;return(0,t.jsx)("div",{children:(0,t.jsxs)("dt",{title:a,children:[(0,t.jsx)("span",{className:"summary-dot summary-dot--".concat(n),"aria-hidden":!0}),(0,t.jsxs)("span",{className:"summary-figure",children:[l," ",(0,t.jsx)("span",{className:"summary-label",children:a})]})]})})}function _(){let{pending:e}=(0,n.useLinkStatus)();return e?(0,t.jsx)("span",{className:"nav-pending","aria-hidden":!0}):null}},3866:(e,a,l)=>{Promise.resolve().then(l.t.bind(l,2500,23)),Promise.resolve().then(l.bind(l,3731)),Promise.resolve().then(l.bind(l,179)),Promise.resolve().then(l.bind(l,5018)),Promise.resolve().then(l.t.bind(l,660,23))},8384:(e,a,l)=>{"use strict";let t;l.d(a,{R:()=>o,b:()=>r});var n=l(4963);let s={remote:!1,editor:null,editors:[],apps:[],agents:[]};function r(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],[a,l]=(0,n.useState)(s);return(0,n.useEffect)(()=>{if(!e)return;null!=t||(t=fetch("/api/open").then(e=>e.json()).catch(()=>s));let a=!0;return t.then(e=>{a&&l(e)}),()=>{a=!1}},[e]),a}let i={cursor:"cursor",code:"vscode",windsurf:"windsurf",zed:"zed"};function o(e,a,l,t){let n=i[null!=e?e:"code"];if(!n)return null;let s=encodeURI("".concat(a.replace(/\/$/,""),"/").concat(l)).replace(/#/g,"%23").replace(/\?/g,"%3F");return"".concat(n,"://file").concat(s.startsWith("/")?"":"/").concat(s,":").concat(t)}}},e=>{e.O(0,[4237,9010,6587,1723,7911,5465,9643,4737,7358],()=>e(e.s=3866)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9415],{236:(e,t,a)=>{"use strict";a.d(t,{K:()=>o,t:()=>r});var n=a(9763),s=a(4963),i=a(5595),l=a(179);function r(){let[e,t]=(0,s.useState)();return(0,s.useEffect)(()=>{let e=!0;return fetch("/api/watch").then(e=>e.json()).then(a=>{e&&t(a)}).catch(()=>void 0),()=>{e=!1}},[]),e}function o(e){let{failure:t}=e,a=(0,l.kj)();return(0,n.jsxs)("section",{className:"catalog-down",role:"alert",children:[(0,n.jsxs)("h2",{children:[(0,n.jsx)(i.z1N,{"aria-hidden":!0}),a("catalog.down.title")]}),(0,n.jsx)("p",{children:a("catalog.down.body",{path:t.path})}),(0,n.jsx)("p",{className:"catalog-down__detail",children:(0,n.jsx)("code",{children:a("catalog.down.detail",{detail:t.detail})})})]})}},2922:(e,t,a)=>{"use strict";a.d(t,{q:()=>u});var n=a(9763),s=a(4963),i=a(5595),l=a(2574),r=a(7911),o=a(6859),c=a(8010),d=a(8384),h=a(5035);function u(e){var t,a;let{projectId:u,path:p,locale:f,onOpenChange:x,closed:j,compact:g}=e,{remote:b,editors:y,apps:v,agents:w}=(0,d.b)(),[k,N]=(0,s.useState)(!1),[_,S]=(0,s.useState)("ready"),[C,M]=(0,s.useState)(null),[T,O]=(0,h.F)("open:preferred-destination","app:claude-app"),P=(0,s.useRef)(null);if((0,s.useEffect)(()=>{j&&N(!1)},[j]),(0,c.y)(P,k,()=>N(!1)),b)return null;async function A(e){N(!1),S("opening"),M(null);let t=await (0,o.A)({id:u,tool:e.tool,with:e.target},(0,r.t)(f,"open.unreachable"));t.ok?(S("open"),setTimeout(()=>S("ready"),2e3)):(S("ready"),M(t.message))}let I=[...y.map(e=>{var t;return{key:"editor:".concat(e.id),tool:"editor",target:e.id,name:e.name,icon:null!=(t=l.L[e.id])?t:i.mUU}}),...v.map(e=>{var t;return{key:"app:".concat(e.id),tool:"app",target:e.id,name:e.name,sub:"catalog.appSub",icon:null!=(t=l.L[e.id])?t:i.mUU}}),...w.filter(e=>!e.broken).map(e=>{var t;return{key:"agent:".concat(e.id),tool:"agent",target:e.id,name:e.name,sub:"catalog.agentSub",icon:null!=(t=l.L[e.id])?t:i.Jhl}}),{key:"terminal",tool:"terminal",name:(0,r.t)(f,"catalog.terminal"),sub:"catalog.terminalSub",icon:i.Jhl},{key:"folder",tool:"folder",name:(0,r.t)(f,"catalog.folder"),sub:"catalog.folderSub",icon:i.mUU}],R=null!=(a=null!=(t=I.find(e=>e.key===T))?t:I.find(e=>"app:claude-app"===e.key))?a:I[0],D=R.icon;return(0,n.jsxs)("div",{className:g?"open-menu open-menu--compact":"open-menu",ref:P,children:[(0,n.jsxs)("div",{className:"open-menu__split",children:[(0,n.jsxs)("button",{type:"button",className:"open-menu__primary",onClick:()=>void A(R),disabled:"opening"===_,title:"".concat(R.name," \xb7 ").concat(p),children:[(0,n.jsx)(D,{"aria-hidden":!0}),"opening"===_?(0,r.t)(f,"open.busy"):"open"===_?(0,r.t)(f,"open.done"):(0,r.t)(f,"open.openWith",{name:R.name})]}),I.length>1&&(0,n.jsx)("button",{type:"button",className:"open-menu__toggle","aria-label":(0,r.t)(f,"open.moreDestinations"),"aria-expanded":k,"aria-haspopup":"menu",onClick:()=>{let e=!k;N(e),null==x||x(e)},children:(0,n.jsx)(i.zKo,{"aria-hidden":!0})})]}),k&&(0,n.jsx)("div",{className:"open-menu__list",role:"menu",children:I.map((e,t)=>{let a=e.icon,s=e.key===R.key,l=I[t-1],o=void 0!==l&&m(l)!==m(e);return(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":s,className:"open-menu__item".concat(o?" is-first-of-group":"").concat(s?" is-default":""),onClick:()=>{O(e.key),A(e)},children:[(0,n.jsx)(a,{"aria-hidden":!0}),(0,n.jsxs)("span",{className:"open-menu__item-copy",children:[(0,n.jsx)("span",{children:e.name}),(e.sub||s)&&(0,n.jsxs)("small",{children:[e.sub&&(0,r.t)(f,e.sub),e.sub&&s&&" \xb7 ",s&&(0,n.jsx)("b",{children:(0,r.t)(f,"open.defaultDestination")})]})]}),s&&(0,n.jsx)(i.mmf,{className:"open-menu__default-check","aria-hidden":!0})]},e.key)})}),C&&(0,n.jsx)("span",{className:"open-menu__error",children:C})]})}function m(e){return"editor"===e.tool||"app"===e.tool?"app":"folder"===e.tool?"finder":"terminal"}},3385:(e,t,a)=>{"use strict";a.d(t,{ProjectStore:()=>el});var n=a(9763),s=a(1723),i=a.n(s),l=a(7244),r=a(4963),o=a(5595),c=a(3570),d=a(7911);let h=new Set(["flutter","react native","expo","android","ios","swift","kotlin","dart"]),u=new Set(["next.js","react","vue","nuxt","svelte","sveltekit","angular","astro","remix / react router","solidjs","vite","tailwind css","shadcn/ui","electron","tauri"]),m=new Set(["express","fastify","nestjs","hono","django","flask","fastapi","ruby on rails","laravel","symfony","sinatra","gin","echo","fiber","axum","actix web"]),p=new Set(["mcp"]),f=new Set(["html","css","scss"]),x=new Set(["python","go","rust","ruby","php","java","c#","elixir"]),j=new Set(["dart","swift","kotlin","objective-c"]),g=new Set(["postgresql","mysql","mongodb","redis","mariadb"]),b=new Set(["vercel","netlify","cloudflare workers"]);var y=a(179),v=a(4204);function w(e){let{id:t,name:a}=e,s=(0,y.kj)(),[i,l]=(0,r.useState)("ready");async function o(){l("opening");try{let e=await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,tool:"editor"})});l(e.ok?"ready":"error")}catch(e){l("error")}}return(0,n.jsx)("button",{type:"button",onClick:o,disabled:"opening"===i,title:s("today.openNamed",{name:a}),className:"shrink-0 rounded-md border border-edge bg-surface px-2.5 py-1 text-xs font-semibold text-chalk transition hover:border-edge-bright hover:bg-raised disabled:opacity-60",children:s("opening"===i?"today.opening":"error"===i?"today.openFailed":"today.resume")})}function k(e){var t,a,s,l;let{report:c}=e,d=(0,y.kj)(),h=(0,y.Ym)(),{summary:u}=c,[m,p]=(0,r.useState)(!1),f=c.critic,x=(null!=(a=null==f?void 0:f.lookFindings)?a:0)+(null!=(s=null==f?void 0:f.reviewFindings)?s:0),j=u.commits>0||u.proposals>0||u.born>0||u.touchedProjects>0||x>0,g=c.since?d("today.since",{when:(0,v.KW)(c.since,h)}):d("today.last24h");return j?(0,n.jsxs)("section",{className:"brief","aria-label":d("today.title"),children:[(0,n.jsxs)("button",{type:"button",className:"brief__line",onClick:()=>p(!m),"aria-expanded":m,children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("strong",{children:d("today.title")}),(0,n.jsxs)("span",{className:"brief__facts",children:[u.proposals>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===u.proposals?"today.waitingOne":"today.waitingMany",{n:u.proposals})}),u.commits>0&&(0,n.jsxs)("span",{children:[d(1===u.touchedProjects?"today.inProjectsOne":"today.inProjectsMany",{c:d(1===u.commits?"today.commitOne":"today.commitMany",{n:u.commits}),n:u.touchedProjects}),u.byAgents>0&&" ".concat(d("today.fromAgents",{n:u.byAgents}))]}),u.born>0&&(0,n.jsx)("span",{children:d(1===u.born?"today.bornOne":"today.bornMany",{n:u.born})}),x>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===x?"today.criticOne":"today.criticMany",{n:x})})]}),(0,n.jsx)("span",{className:"brief__when",children:g}),(0,n.jsx)(o.bv7,{className:"brief__arrow","aria-hidden":!0})]}),m&&(0,n.jsxs)("div",{className:"brief__detail",children:[c.proposals.length>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("proposals.waiting")}),(0,n.jsx)("ul",{children:c.proposals.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)(i(),{href:"/runs/".concat(e.id),children:[e.pkgName,e.a?" → ".concat(e.a):""]}),(0,n.jsx)("span",{className:"brief__where",children:d("today.inProject",{project:e.project})}),e.repeats>1&&(0,n.jsx)("span",{className:"brief__attempts",children:d("today.attempts",{n:e.repeats})}),(0,n.jsxs)("span",{className:"brief__meta",children:[d(e.verified?"proposals.testsGreen":"proposals.unverified")," \xb7 ",(0,v.KW)(e.when,h)]})]},e.id))})]}),(null!=(l=null==f||null==(t=f.where)?void 0:t.length)?l:0)>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("today.criticWhere")}),(0,n.jsx)("ul",{children:f.where.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug,"#assignments"),children:e.name}),(0,n.jsx)("span",{className:"brief__meta",children:d(1===e.findings?"today.criticFindingOne":"today.criticFindingMany",{n:e.findings})})]},e.slug))})]}),c.projects.length>0&&(0,n.jsx)("ul",{className:"brief__projects",children:c.projects.slice(0,5).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name}),e.commits[0]&&(0,n.jsxs)("p",{className:"brief__subject",children:[e.commits[0].subject,e.commits[0].agent&&(0,n.jsx)("span",{className:"brief__agent",children:e.commits[0].agent})]}),(0,n.jsxs)("p",{className:"brief__meta",children:[e.commits.length>0&&(0,n.jsxs)(n.Fragment,{children:[d(1===e.commits.length?"today.commitOne":"today.commitMany",{n:e.commits.length})," \xb7 ",(0,v.KW)(e.commits[0].at,h)]}),e.agents.length>0&&(0,n.jsxs)(n.Fragment,{children:[e.commits.length>0&&" \xb7 ",e.agents.map(e=>d("today.agentNoted",{name:e.name,n:e.activities})).join(", ")]})]})]}),(0,n.jsx)(w,{id:e.id,name:e.name})]},e.slug))}),c.born.length>0&&(0,n.jsxs)("p",{className:"brief__born",children:[d("today.born")," ",c.born.slice(0,4).map((e,t)=>(0,n.jsxs)("span",{children:[t>0&&", ",(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name})]},e.slug))]})]})]}):(0,n.jsxs)("p",{className:"brief brief--quiet",children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("span",{children:d("today.nothing",{period:g})})]})}var N=a(236);function _(){let e=(0,y.kj)(),t=(0,N.t)();return(null==t?void 0:t.catalog)?(0,n.jsx)(N.K,{failure:t.catalog}):(null==t?void 0:t.active)!==!1?null:(0,n.jsxs)("p",{className:"brief brief--alert",role:"status",children:[(0,n.jsx)(o.z1N,{"aria-hidden":!0}),(0,n.jsx)("span",{children:e("watch.off")})]})}function S(e){let{total:t}=e,a=(0,y.kj)(),s=(0,l.useRouter)(),[,i]=(0,r.useTransition)(),[c,d]=(0,r.useState)(null),[h,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),[f,x]=(0,r.useState)(!1),[j,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(null),[w,k]=(0,r.useState)(null),N=(0,r.useCallback)(async()=>{try{var e;let t=await fetch("/api/roots"),a=await t.json();d(null!=(e=a.roots)?e:[])}catch(e){d([])}},[]);(0,r.useEffect)(()=>{N()},[N]);let[_,S]=(0,r.useState)(null);async function M(e,t){if(!f&&t.trim()){x(!0),k(null);try{var n,l,r;let o=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,path:t.trim()})}),c=await o.json().catch(()=>({}));if(!o.ok)return void k({text:null!=(n=c.error)?n:a("sites.failed"),bad:!0});if(p(""),await N(),"add"===e){let e=null!=(l=c.found)?l:0;k({text:a(1===e?"sites.addedOne":"sites.addedMany",{n:e}),bad:!1}),i(()=>s.refresh())}else k({text:a("sites.removed",{n:null!=(r=c.removed)?r:0}),bad:!1}),i(()=>s.refresh())}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{x(!1)}}}async function T(){if(!j&&!f){g(!0),k(null);try{var e,t;let n=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"search"})}),s=await n.json();v(null!=(e=s.candidates)?e:[]),0===(null!=(t=s.candidates)?t:[]).length&&k({text:a("sites.searchNone"),bad:!1})}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{g(!1)}}}if(!c||0===c.length)return null;let O=c.map(e=>C(e.path));return(0,n.jsxs)("div",{className:"sites",children:[(0,n.jsxs)("button",{type:"button",className:"sites__line",onClick:()=>u(!h),"aria-expanded":h,children:[(0,n.jsx)(o.gBk,{"aria-hidden":!0}),(0,n.jsx)("span",{children:a(1===t?"sites.summaryOne":"sites.summaryMany",{n:t,where:O.slice(0,2).join(", "),extra:O.length>2?" ".concat(a("sites.andMore",{n:O.length-2})):""})}),(0,n.jsx)("span",{className:"sites__action",children:a(h?"sites.close":"sites.manage")})]}),h&&(0,n.jsxs)("div",{className:"sites__detail",children:[(0,n.jsx)("ul",{children:c.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsxs)("span",{children:[a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects}),!e.exists&&" \xb7 ".concat(a("sites.missing"))]}),_===e.path?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>{S(null),M("remove",e.path)},disabled:f,className:"text-fail",children:a("sites.removeConfirm",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>S(null),disabled:f,children:a("accounts.cancel")})]}):(0,n.jsx)("button",{type:"button",onClick:()=>S(e.path),disabled:f,children:a("sites.remove")})]},e.path))}),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),M("add",m)},children:[(0,n.jsx)("input",{value:m,onChange:e=>p(e.target.value),placeholder:a("sites.placeholder"),"aria-label":a("sites.fieldLabel"),spellCheck:!1}),(0,n.jsxs)("button",{type:"submit",disabled:f||!m.trim(),children:[(0,n.jsx)(o.K0m,{"aria-hidden":!0}),a(f?"sites.adding":"sites.add")]})]}),(0,n.jsxs)("div",{className:"sites__search",children:[(0,n.jsxs)("button",{type:"button",onClick:T,disabled:j||f,children:[(0,n.jsx)(o.JJh,{"aria-hidden":!0}),a(j?"sites.searching":"sites.search")]}),(0,n.jsx)("span",{children:a("sites.searchHint")})]}),b&&b.length>0&&(0,n.jsx)("ul",{className:"sites__candidates",children:b.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsx)("span",{children:a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>{v(t=>(null!=t?t:[]).filter(t=>t.path!==e.path)),M("add",e.path)},disabled:f,children:a("sites.add")})]},e.path))}),(0,n.jsx)("p",{className:"sites__note",children:a("sites.note")}),w&&(0,n.jsx)("p",{className:w.bad?"sites__error":"sites__note",children:w.text})]})]})}function C(e){return e.replace(/^\/Users\/[^/]+/,"~")}var M=a(5035),T=a(8010),O=a(7558);let P="#0e0f11",A="#5c6169",I="#8b9098",R="#e7e8ea",D="#ffffff",E='"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';function F(e){return String(Math.max(0,Math.trunc(e)))}function U(e){return e>=75?"#2eaa63":e>=50?"#e4a30b":"#ea5a58"}function W(e,t,a,n,s,i){e.beginPath(),e.moveTo(t+i,a),e.arcTo(t+n,a,t+n,a+s,i),e.arcTo(t+n,a+s,t,a+s,i),e.arcTo(t,a+s,t,a,i),e.arcTo(t,a,t+n,a,i),e.closePath()}function L(e){return new Promise(t=>{let a=new Image;a.onload=()=>t(a),a.onerror=()=>t(null),a.src=e})}function H(e){let{data:t,discreet:a,onClose:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),h=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,T.y)(u,!0,s),(0,O.r)(u,!0),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>{var e;return null==(e=m.current)?void 0:e.focus()});return()=>cancelAnimationFrame(e)},[]);let[p,f]=(0,M.F)("share:user","","compartir:usuario"),[x,j]=(0,M.F)("share:language",l,"compartir:idioma"),[g,b]=(0,r.useState)(!a),[v,w]=(0,r.useState)(!1),[k,N]=(0,r.useState)("idle"),[_,S]=(0,r.useState)("idle"),C=(0,r.useCallback)((e,t)=>(0,d.t)(x,e,t),[x]),H=(0,r.useCallback)(async()=>{let e=h.current;if(!e)return;let a=await L("/assets/brand/panoma.svg"),n=function(e,t,a){let n=Math.max(0,Math.trunc(t));if(n<=8&&e.length>=n)return e.slice(0,n);let s=e.slice(0,Math.min(7,n)),i=Math.max(0,n-s.length);return i>0?[...s,a(i)]:s}(g?(await Promise.all(t.featuredProjects.slice(0,8).map(async e=>({...e,loadedIcon:await L(e.icon)})))).flatMap(e=>{let{loadedIcon:t,...a}=e;return t?[{...a,icon:t}]:[]}):t.featuredProjects.slice(0,8).map((e,t)=>({name:C("store.hidden",{n:t+1}),health:e.health,icon:null,concealed:!0})),t.projects,e=>({name:C("share.more",{n:e}),health:0,icon:a,panomaMark:!0,summary:!0}));!function(e,t){var a,n,s;let i=e.getContext("2d");if(!i)return;e.width=1600,e.height=900,i.fillStyle=D,i.fillRect(0,0,1600,900),i.strokeStyle=R,i.lineWidth=2,i.strokeRect(1,1,1598,898),function(e,t,a,n){if(t)try{e.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),82,66,60,66)}catch(e){}e.fillStyle=P,e.font="650 42px ".concat(E),e.fillText("panoma",a+66+22,n+48)}(i,t.logo,82,66),i.font="500 25px ".concat(E),i.fillStyle=I,i.textAlign="right",i.fillText(t.domain,1518,105),i.textAlign="left",i.fillStyle=P,function(e,t,a,n){let s=n;for(e.font="650 ".concat(s,"px ").concat(E);s>62&&e.measureText(t).width>1436;)s-=2,e.font="650 ".concat(s,"px ").concat(E)}(i,t.texts.title,1436,t.featuredProjects.length>0?86:102),i.fillText(t.texts.title,82,t.featuredProjects.length>0?278:350),t.featuredProjects.length>0&&function(e,t,a,n,s){let i=t.slice(0,8),l=1436/i.length,r=398,o=Math.min(122,l-28);e.fillStyle=I,e.font="600 18px ".concat(E),e.fillText(s.health.toUpperCase(),a,n),function(e,t,a,n){let s=[[n.healthGood,"#2eaa63"],[n.healthReview,"#e4a30b"],[n.healthAttention,"#ea5a58"]];e.font="550 17px ".concat(E);let i=t-(s.map(t=>{let[a]=t;return 14+e.measureText(a).width}).reduce((e,t)=>e+t,0)+28*(s.length-1));for(let[t,n]of s)e.fillStyle=n,e.beginPath(),e.arc(i+5,a-6,5,0,2*Math.PI),e.fill(),e.fillStyle=A,e.fillText(t,i+16,a),i+=14+e.measureText(t).width+28}(e,1600-a,n,s),i.forEach((t,n)=>{let s=a+l*n+l/2,i=s-37;if(e.save(),W(e,i,r,74,74,18),e.clip(),e.fillStyle=D,e.fill(),t.concealed){var c,d=e,h=i,u=r,m=74,p=n;d.fillStyle="#111316",d.fillRect(h,u,74,m),d.save(),d.strokeStyle="rgba(255, 255, 255, 0.085)",d.lineWidth=1.5;let t=null!=(c=[0,7,-5,12][p%4])?c:0;for(let e=-m;e<2*m;e+=17)d.beginPath(),d.moveTo(h+e+t,u+m),d.lineTo(h+e+m+t,u),d.stroke();d.restore(),d.save(),d.shadowColor="rgba(255, 255, 255, 0.12)",d.shadowBlur=6,d.fillStyle="#f4f4f2",W(d,h+(m-44)/2,u+(m-10)/2,44,10,6),d.fill(),d.restore(),d.fillStyle="rgba(77, 81, 88, 0.7)";for(let e=0;e<4;e+=1)W(d,h+m/2-11+7*e,u+m/2-2,2,4,1),d.fill()}else if(t.icon)try{t.panomaMark&&t.icon instanceof HTMLImageElement?function(e,t,a,n,s,i,l){let r=document.createElement("canvas");r.width=Math.round(88),r.height=Math.round(100);let o=r.getContext("2d");o&&(o.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),0,0,r.width,r.height),o.globalCompositeOperation="source-in",o.fillStyle=l,o.fillRect(0,0,r.width,r.height),e.drawImage(r,a,n,s,i))}(e,t.icon,i+15,r+11,44,50,t.summary?P:U(t.health)):e.drawImage(t.icon,i,r,74,74)}catch(e){}if(e.restore(),e.strokeStyle=R,e.lineWidth=1.5,W(e,i,r,74,74,18),e.stroke(),e.fillStyle=P,e.font="600 21px ".concat(E),e.textAlign="center",e.fillText(function(e,t,a){if(e.measureText(t).width<=a)return t;let n=t;for(;n.length>1&&e.measureText("".concat(n,"…")).width>a;)n=n.slice(0,-1);return"".concat(n,"…")}(e,t.name,l-16),s,r+104),t.summary){e.textAlign="left";return}let f=s-o/2,x=r+128;e.fillStyle=R,W(e,f,x,o,10,5),e.fill(),e.fillStyle=U(t.health),W(e,f,x,Math.max(10,o*(Math.min(100,Math.max(0,t.health))/100)),10,5),e.fill(),e.fillStyle=U(t.health),e.font="650 19px ".concat(E),e.fillText("".concat(t.health,"/100"),s,r+171),e.textAlign="left"})}(i,t.featuredProjects,82,348,t.texts);let l=t.featuredProjects.length>0?655:505;a=i,n=82,s=l,a.strokeStyle=R,a.lineWidth=1.5,a.beginPath(),a.moveTo(82,s),a.lineTo(n+1436,s),a.stroke(),function(e,t,a,n){let s=[[F(t.projects),t.texts.projects],[F(t.commits),t.texts.commits],[F(t.technologies),t.texts.technologies]];null!==t.agents&&s.push(["".concat(t.agents,"%"),t.texts.agents]);let i=1436/s.length;s.forEach((t,s)=>{let[l,r]=t,o=a+i*s;s>0&&(e.strokeStyle=R,e.lineWidth=1.5,e.beginPath(),e.moveTo(o-34,n-10),e.lineTo(o-34,n+79),e.stroke()),e.fillStyle=P,e.font="650 54px ".concat(E),e.fillText(l,o,n+45),e.fillStyle=I,e.font="500 22px ".concat(E),e.fillText(r,o,n+78)})}(i,t,82,l+51),t.user&&(i.fillStyle=A,i.font="550 27px ".concat(E),i.fillText(t.user,82,839)),i.fillStyle=I,i.font="500 23px ".concat(E),i.textAlign="right",i.fillText(t.texts.localFirst,1518,839),i.textAlign="left"}(e,{...t,logo:a,featuredProjects:n,user:p.trim()?p.trim().replace(/^@?/,"@"):void 0,domain:K,texts:{title:C("share.titulo",{n:t.projects}),projects:C("share.proyectos"),technologies:C("share.tecnologias"),commits:C("share.commits"),agents:C("share.agentes"),health:C("share.salud"),healthGood:C("share.saludBien"),healthReview:C("share.saludRevisar"),healthAttention:C("share.saludAtencion"),localFirst:C("share.local")}})},[g,t,C,p]);async function G(){let e=await z(h.current);e&&J(e)}async function Z(){try{await navigator.clipboard.writeText(V(t,C)),w(!0),setTimeout(()=>w(!1),1800)}catch(e){}}async function Y(){N("preparing");let e=await z(h.current);if(!e)return void N("failed");let a=V(t,C),n=new File([e],B,{type:"image/png"});if(function(e){if("function"!=typeof navigator.share||"function"!=typeof navigator.canShare)return!1;try{return navigator.canShare({files:[e]})}catch(e){return!1}}(n))try{await navigator.share({files:[n],text:a,title:"Panoma"}),N("idle");return}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return void N("idle")}let s=await q(e);s||J(e),N(s?"copied":"downloaded"),window.setTimeout(()=>N("idle"),2600)}async function $(){S("preparing");let e=function(e){if(!e)return null;try{let t=e.toDataURL("image/png"),a=t.slice(t.indexOf(",")+1),n=window.atob(a),s=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)s[e]=n.charCodeAt(e);return new Blob([s],{type:"image/png"})}catch(e){return null}}(h.current);if(!e)return void S("failed");let a=q(e);var n=V(t,C);let s=document.createElement("a");s.href="https://x.com/intent/post?text=".concat(encodeURIComponent(n)),s.target="_blank",s.rel="noreferrer noopener",s.click();let i=await a;i||J(e),S(i?"copied":"downloaded"),window.setTimeout(()=>S("idle"),2600)}return(0,r.useEffect)(()=>{H()},[H]),(0,n.jsxs)("div",{className:"share",role:"dialog","aria-modal":"true","aria-label":i("share.abrir"),children:[(0,n.jsxs)("div",{className:"share__box",ref:u,children:[(0,n.jsxs)("header",{children:[(0,n.jsx)("h2",{children:i("share.abrir")}),(0,n.jsx)("button",{ref:m,type:"button",onClick:s,"aria-label":i("share.cerrar"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("canvas",{ref:h,className:"share__canvas",width:1600,height:900,role:"img","aria-label":i("share.preview")}),(0,n.jsxs)("div",{className:"share__options",children:[(0,n.jsxs)("div",{className:"share__language",children:[(0,n.jsx)("span",{children:i("share.idioma")}),(0,n.jsxs)("div",{role:"group","aria-label":i("share.idioma"),children:[(0,n.jsx)("button",{type:"button",className:"es"===x?"is-active":void 0,"aria-pressed":"es"===x,onClick:()=>j("es"),children:"Espa\xf1ol"}),(0,n.jsx)("button",{type:"button",className:"en"===x?"is-active":void 0,"aria-pressed":"en"===x,onClick:()=>j("en"),children:"English"})]})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("span",{children:i("share.usuario")}),(0,n.jsx)("input",{value:p,onChange:e=>f(e.target.value),placeholder:i("share.usuarioVacio"),spellCheck:!1,maxLength:40})]}),(0,n.jsx)("button",{type:"button",className:"share__visibility".concat(g?"":" is-private"),onClick:()=>b(e=>!e),"aria-pressed":!g,"aria-label":i(g?"store.hideNames":"store.showNames"),title:i(g?"store.hideNames":"store.showNames"),children:g?(0,n.jsx)(o.bZk,{"aria-hidden":!0}):(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]}),(0,n.jsx)("p",{className:"share__note",children:i("share.nota")}),(0,n.jsxs)("footer",{children:[(0,n.jsxs)("button",{type:"button",className:"share__primary",onClick:G,children:[(0,n.jsx)(o.Dho,{"aria-hidden":!0}),i("share.descargar")]}),(0,n.jsx)("button",{type:"button",onClick:Z,children:i(v?"share.textoCopiado":"share.copiarTexto")}),(0,n.jsxs)("button",{type:"button",onClick:Y,disabled:"preparing"===k,children:[(0,n.jsx)(o.XcM,{"aria-hidden":!0}),i("share.image.".concat(k))]}),(0,n.jsxs)("button",{type:"button",onClick:$,disabled:"preparing"===_,children:[(0,n.jsx)(c.vIh,{"aria-hidden":!0}),i("share.x.".concat(_))]})]})]}),(0,n.jsx)("button",{type:"button",className:"share__backdrop",onClick:s,"aria-label":i("share.cerrar")})]})}let K="panoma.ai",B="panoma-projects.png";function z(e){return new Promise(t=>{if(!e)return void t(null);e.toBlob(t,"image/png")})}function J(e){let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=B,a.click(),URL.revokeObjectURL(t)}async function q(e){var t;if("undefined"==typeof ClipboardItem||"function"!=typeof(null==(t=navigator.clipboard)?void 0:t.write))return!1;try{return await navigator.clipboard.write([new ClipboardItem({"image/png":e})]),!0}catch(e){return!1}}function V(e,t){return t("share.texto",{n:e.projects,domain:K})}var G=a(2922),Z=a(5018),Y=a(8337);let $={typescript:{icon:c.cyb,color:"#3178c6"},"next.js":{icon:c.wlC,color:"#111111"},nextjs:{icon:c.wlC,color:"#111111"},react:{icon:c.GWR,color:"#149eca"},flutter:{icon:c.FuR,color:"#02569b"},dart:{icon:c.A7B,color:"#0175c2"},"node.js":{icon:c.h$$,color:"#5fa04e"},nodejs:{icon:c.h$$,color:"#5fa04e"},python:{icon:c.ptC,color:"#3776ab"},rust:{icon:c.xZd,color:"#111111"},go:{icon:c.ZRx,color:"#00add8"},vue:{icon:c.Zmg,color:"#42b883"},"vue.js":{icon:c.Zmg,color:"#42b883"},svelte:{icon:c.Qmm,color:"#ff3e00"},swift:{icon:c.cp,color:"#f05138"},kotlin:{icon:c.sjH,color:"#7f52ff"},ruby:{icon:c.LfU,color:"#cc342d"},php:{icon:c.XeU,color:"#777bb4"},express:{icon:c.t5I,color:"#111111"},tailwind:{icon:c.IR8,color:"#06b6d4"},tailwindcss:{icon:c.IR8,color:"#06b6d4"},docker:{icon:c.tih,color:"#2496ed"},postgresql:{icon:c.$Wy,color:"#4169e1"},supabase:{icon:c.lLb,color:"#3ecf8e"},firebase:{icon:c.iWE,color:"#ffca28"}},X=["all","attention","favorites","not-mine","web","mobile","backend","tools","ai","other"],Q={all:"filter.all",attention:"filter.attention",favorites:"filter.favorites","not-mine":"filter.notMine",web:"filter.web",mobile:"filter.mobile",backend:"filter.backend",tools:"filter.tools",ai:"filter.ai",other:"filter.other"};function ee(e){let{name:t,onOpen:a}=e,s=(0,y.kj)();return(0,n.jsx)("button",{type:"button",className:"open-handle",title:s("catalog.openHandle",{name:t}),"aria-label":s("catalog.openHandle",{name:t}),onClick:e=>{e.stopPropagation(),a()},onDoubleClick:e=>e.stopPropagation(),children:(0,n.jsx)(o.OvC,{"aria-hidden":!0})})}function et(){let e=(0,y.kj)();return(0,n.jsx)("span",{className:"opening-spinner",role:"status","aria-label":e("catalog.opening")})}function ea(e){var t;return null!=(t=e.proposedRuns)?t:0}function en(e){return ea(e)>0||e.risks.length>0||e.vulnCount>0||e.outdatedDeps>0||!!e.depsUnresolved}function es(e){return"A"===e||"B"===e?"good":"C"===e?"warn":"bad"}function ei(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function el(e){var t,a;let{projects:s,report:c}=e,d=(0,l.useRouter)(),v=(0,y.kj)(),{query:w,setQuery:N}=(0,Z.S)(),[C,T]=(0,M.F)("filter","all","filtro"),O=X.includes(C)?C:"all",[P,A]=(0,M.F)("sort","recent","orden"),[I,R]=(0,M.F)("view","grid","vista"),[D,E]=(0,M.F)("discreet",!1,"discreto"),[F,U]=(0,r.useState)(!1),[W,L]=(0,M.F)("favorites",[],"favoritos"),K=(0,r.useMemo)(()=>new Set(W),[W]),[B,z]=(0,r.useState)(null!=(a=null==(t=s[0])?void 0:t.id)?a:null),J=(0,r.useRef)(!1),q=(0,r.useRef)(null),[V,G]=(0,r.useState)(null),[$,ee]=(0,r.useState)(null),et=s[0],ea=(0,r.useMemo)(()=>s.filter(en).length,[s]),es=(0,r.useMemo)(()=>s.filter(e=>K.has(e.id)).length,[K,s]),ei=(0,r.useMemo)(()=>{let e=(0,Y.A)(w.trim());return s.filter(t=>{let a=!e||(0,Y.A)([t.name,t.description,t.primaryLanguage,...t.technologies.flatMap(e=>[e.name,e.version]),...t.agents.map(e=>e.name)].filter(Boolean).join(" ")).includes(e),n="all"===O||("attention"===O?en(t):"favorites"===O?K.has(t.id):"not-mine"===O?"foreign"===t.originKind||"forked"===t.originKind||"template"===t.originKind:(function(e){var t;let a=new Set,n=(null!=(t=e.primaryLanguage)?t:"").toLowerCase();for(let t of e.technologies){let e=t.name.toLowerCase();"model"===t.kind&&a.add("ai"),h.has(e)&&a.add("mobile"),(u.has(e)||b.has(e))&&a.add("web"),(m.has(e)||g.has(e))&&a.add("backend"),p.has(e)&&a.add("tools")}return j.has(n)&&a.add("mobile"),f.has(n)&&a.add("web"),x.has(n)&&a.add("backend"),0===a.size&&/\b(cli|tool|tools|runner|script|scripts|terminal|bot|daemon|agent)\b/.test(e.name.toLowerCase())&&a.add("tools"),0===a.size&&e.technologies.some(e=>"runtime"===e.kind&&["node.js","deno","bun"].includes(e.name.toLowerCase()))&&a.add("backend"),0===a.size&&a.add("other"),a})(t).has(O));return a&&n}).sort((e,t)=>{let a=Number(K.has(t.id))-Number(K.has(e.id));return 0!==a?a:"name"===P?e.name.localeCompare(t.name,"es"):"health"===P?t.healthScore-e.healthScore:(t.lastCommitAt?Date.parse(t.lastCommitAt):0)-(e.lastCommitAt?Date.parse(e.lastCommitAt):0)})},[K,O,s,w,P]),el=(0,r.useMemo)(()=>ei.findIndex(e=>e.id===B),[ei,B]),ed=-1===el?null:ei[el];(0,r.useEffect)(()=>{if(J.current)return;let e=ei[0];e&&e.id!==B&&z(e.id)},[ei,B]);let eh=(0,r.useCallback)(e=>{J.current=!0,z(e),G(null)},[]),[eu,em]=(0,r.useTransition)(),[ef,ex]=(0,r.useState)(null),ej=(0,r.useCallback)(e=>{ex(e.id),em(()=>d.push("/p/".concat(e.slug)))},[d]),eg=(0,r.useCallback)(()=>{var e;let t=null==(e=q.current)?void 0:e.querySelectorAll("[data-index]"),a=null==t?void 0:t[0];if(!a)return 1;let n=a.offsetTop,s=0;for(let e of t){if(e.offsetTop!==n)break;s+=1}return Math.max(1,s)},[]);function eb(e){var t,a;if(0===ei.length)return;let n=ei.findIndex(e=>e.id===B),s=-1===n?0:Math.min(ei.length-1,Math.max(0,n+e)),i=ei[s];i&&(eh(i.id),null==(a=q.current)||null==(t=a.querySelector('[data-index="'.concat(s,'"]')))||t.focus())}async function ey(e){var t,a,n;let i;G(null);try{i=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ocultar",id:e})})}catch(e){G(v("project.unreachable"));return}if(!i.ok)return void G(null!=(a=(await i.json().catch(()=>({}))).error)?a:v("project.actionFailed"));B===e&&eh(null),ee({id:e,name:null!=(n=null==(t=s.find(t=>t.id===e))?void 0:t.name)?n:""}),d.refresh()}async function ev(e){G(null);try{let a=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mostrar",id:e})});if(!a.ok){var t;let e=await a.json().catch(()=>({}));G(null!=(t=e.error)?t:v("project.actionFailed"));return}}catch(e){G(v("project.unreachable"));return}ee(null),d.refresh()}let ew={attention:ea,favorites:es};return et?(0,n.jsx)("main",{id:"app-main",tabIndex:-1,className:"app-main catalog-screen",children:(0,n.jsxs)("div",{className:"catalog-screen__inner",children:[(0,n.jsx)(k,{report:c}),(0,n.jsx)(_,{}),$&&(0,n.jsxs)("p",{className:"brief brief--dismissed",role:"status",children:[(0,n.jsx)(o.EgV,{"aria-hidden":!0}),(0,n.jsx)("span",{children:v("store.justHidden",{name:$.name})}),(0,n.jsx)("button",{type:"button",onClick:()=>void ev($.id),children:v("store.undoHide")}),(0,n.jsx)(i(),{href:"/hidden",children:v("store.seeHidden")})]}),(0,n.jsxs)("div",{className:"catalog-bar",children:[(0,n.jsxs)("h1",{children:[v("catalog.title"),(0,n.jsx)("span",{children:ei.length===s.length?v(1===s.length?"catalog.countOne":"catalog.count",{n:s.length}):"".concat(ei.length," / ").concat(s.length)})]}),(0,n.jsxs)("div",{className:"catalog-bar__tools",children:[(0,n.jsx)("p",{className:"catalog-hint",children:v("catalog.hint")}),(0,n.jsxs)("label",{className:"catalog-sort",children:[(0,n.jsx)("span",{className:"sr-only",children:v("store.sortLabel")}),(0,n.jsxs)("select",{value:P,onChange:e=>A(e.target.value),children:[(0,n.jsx)("option",{value:"recent",children:v("store.sortRecent")}),(0,n.jsx)("option",{value:"name",children:v("store.sortName")}),(0,n.jsx)("option",{value:"health",children:v("store.sortHealth")})]})]}),(0,n.jsx)("button",{type:"button",className:"catalog-tool".concat(D?" is-active":""),onClick:()=>E(!D),"aria-pressed":D,title:v(D?"store.showNames":"store.hideNames"),children:D?(0,n.jsx)(o.EgV,{"aria-hidden":!0}):(0,n.jsx)(o.bZk,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",className:"catalog-tool",onClick:()=>U(!0),"aria-label":v("share.abrir"),title:v("share.abrir"),children:(0,n.jsx)(o.XcM,{"aria-hidden":!0})}),(0,n.jsxs)("div",{className:"view-switch",role:"group","aria-label":v("store.viewAria"),children:[(0,n.jsx)("button",{type:"button",onClick:()=>R("list"),className:"list"===I?"is-active":void 0,"aria-label":v("store.viewList"),"aria-pressed":"list"===I,children:(0,n.jsx)(o.$mg,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:()=>R("grid"),className:"grid"===I?"is-active":void 0,"aria-label":v("store.viewGrid"),"aria-pressed":"grid"===I,children:(0,n.jsx)(o.ENP,{"aria-hidden":!0})})]})]})]}),(0,n.jsx)("div",{className:"catalog-filters",role:"group","aria-label":v("store.filterAria"),children:X.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>T(e),className:O===e?"is-active":void 0,"aria-pressed":O===e,children:[v(Q[e]),ew[e]?(0,n.jsx)("span",{children:ew[e]}):null]},e))}),(0,n.jsx)(er,{project:et,discreet:D,index:Math.max(0,s.findIndex(e=>e.id===et.id))}),(0,n.jsx)(S,{total:s.length}),F&&(0,n.jsx)(H,{data:function(e){let t=e.reduce((e,t)=>{var a;return e+(null!=(a=t.gitCommitCount)?a:0)},0),a=new Set(e.flatMap(e=>e.technologies.map(e=>e.name))),n=e.reduce((e,t)=>e+t.agents.reduce((e,t)=>e+t.commits,0),0);return{projects:e.length,technologies:a.size,commits:t,agents:t>0&&n>0?Math.min(100,Math.round(n/t*100)):null,featuredProjects:e.filter(e=>e.hasIcon).slice(0,8).map(e=>({name:e.name,health:e.healthScore,icon:"/icon/".concat(e.id)}))}}(s),discreet:D,onClose:()=>U(!1)}),(0,n.jsxs)("div",{className:"catalog-split","data-open":ed?"true":"false",children:[(0,n.jsx)("div",{className:"catalog-body",children:ei.length>0?(0,n.jsxs)(n.Fragment,{children:["list"===I&&(0,n.jsxs)("div",{className:"catalog-columns","aria-hidden":!0,children:[(0,n.jsx)("span",{children:v("catalog.colProject")}),(0,n.jsx)("span",{children:v("catalog.colHealth")}),(0,n.jsx)("span",{children:v("catalog.colStack")}),(0,n.jsx)("span",{children:v("catalog.colActivity")})]}),(0,n.jsx)("div",{ref:q,role:"listbox","aria-label":v("catalog.rowsAria"),className:"catalog-rows catalog-rows--".concat(I),onKeyDown:function(e){let t="grid"===I?eg():1,a={ArrowDown:t,ArrowUp:-t,..."grid"===I?{ArrowRight:1,ArrowLeft:-1}:{}}[e.key];if(void 0!==a){e.preventDefault(),eb(a);return}if("Home"===e.key||"End"===e.key){e.preventDefault(),eb("Home"===e.key?-ei.length:ei.length);return}"Escape"===e.key&&B&&(e.preventDefault(),eh(null))},children:ei.map((e,t)=>{let a={project:e,index:t,selected:e.id===B,tabbable:t===(-1===el?0:el),favorite:K.has(e.id),opening:eu&&ef===e.id,discreet:D,onSelect:()=>eh(e.id),onOpen:()=>ej(e)};return"list"===I?(0,n.jsx)(eo,{...a},e.id):(0,n.jsx)(ec,{...a},e.id)})})]}):(0,n.jsxs)("div",{className:"catalog-empty",role:"status",children:[(0,n.jsx)(o.ENP,{"aria-hidden":!0}),(0,n.jsx)("h2",{children:v("store.noResults")}),(0,n.jsx)("p",{children:v("store.noResultsBody")}),(0,n.jsx)("button",{type:"button",onClick:()=>{T("all"),N(""),window.location.search&&d.replace("/",{scroll:!1})},children:v("store.clearFilters")})]})}),ed&&(0,n.jsx)(ep,{project:ed,discreet:D,index:Math.max(0,ei.findIndex(e=>e.id===ed.id)),favorite:K.has(ed.id),onFavorite:()=>{var e;return e=ed.id,void L(K.has(e)?W.filter(t=>t!==e):[...W,e])},onHide:()=>ey(ed.id),onClose:()=>eh(null),error:V},ed.id)]})]})}):null}function er(e){let{project:t,discreet:a,index:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),r=a?i("store.hidden",{n:s+1}):t.name;return(0,n.jsxs)("section",{className:"resume-strip","aria-label":i("store.resume"),children:[(0,n.jsx)(o.cyc,{"aria-hidden":!0}),(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:r}),(0,n.jsx)("span",{children:t.lastCommitSubject||function(e,t){if(e.description)return e.description;let a=e.technologies.find(e=>"framework"===e.kind||"language"===e.kind);return a?t("store.builtWith",{tech:a.name}):t("store.detected")}(t,i)})]}),(0,n.jsx)("span",{className:"resume-strip__when",children:(0,v.Pp)(t.lastCommitAt,l)}),(0,n.jsx)(G.q,{projectId:t.id,path:t.root,locale:l,compact:!0})]})}function eo(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.kj)(),p=(0,y.Ym)(),f=ea(t);return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-row",title:c?m("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsxs)("span",{className:"catalog-row__identity",children:[c?(0,n.jsx)(ed,{size:"row",variant:a}):(0,n.jsx)(v.hV,{locale:p,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:40,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-row__names",children:[(0,n.jsxs)("span",{className:"catalog-row__name",children:[(0,n.jsx)("span",{children:c?m("store.hidden",{n:a+1}):t.name}),l&&(0,n.jsx)(o.K7t,{className:"catalog-row__star","aria-hidden":!0}),f>0&&(0,n.jsxs)("span",{className:"waiting-badge",title:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f}),children:[(0,n.jsx)("span",{"aria-hidden":!0,children:f}),(0,n.jsx)("span",{className:"sr-only",children:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f})})]}),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(m,e)).join(" \xb7 ")})]}),!c&&(0,n.jsxs)("span",{className:"catalog-row__path",children:[ei(t.root),t.copyCount>0&&(0,n.jsxs)("span",{title:m("store.alsoCopiesTitle"),children:[" ",m("store.alsoCopies",{n:t.copyCount})]})]})]})]}),(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)(eu,{technologies:t.technologies}),(0,n.jsxs)("span",{className:"catalog-row__activity",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,p)]}),(0,n.jsx)("span",{className:"catalog-row__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?m("store.hidden",{n:a+1}):t.name,onOpen:u})})]})}function ec(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.Ym)(),p=(0,y.kj)();return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-tile",title:c?p("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)("span",{className:"catalog-tile__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?p("store.hidden",{n:a+1}):t.name,onOpen:u})}),c?(0,n.jsx)(ed,{size:"tile",variant:a}):(0,n.jsx)(v.hV,{locale:m,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:54,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-tile__name",children:[l&&(0,n.jsx)(o.K7t,{"aria-hidden":!0}),(0,n.jsx)("span",{children:c?p("store.hidden",{n:a+1}):t.name})]}),(0,n.jsxs)("span",{className:"catalog-tile__meta",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,m),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(p,e)).join(" \xb7 ")})]})]})}function ed(e){let{size:t,variant:a}=e;return(0,n.jsx)("span",{className:"catalog-private-mark catalog-private-mark--".concat(t),"data-variant":a%4,"aria-hidden":!0,children:(0,n.jsx)("span",{className:"catalog-private-mark__seal"})})}function eh(e){let{score:t,grade:a}=e,s=(0,y.kj)(),i=2*Math.PI*11,l=Math.max(0,Math.min(100,t))/100*i;return(0,n.jsxs)("span",{className:"health-dial health-dial--".concat(es(a)),title:s("catalog.healthOf",{n:t}),children:[(0,n.jsxs)("svg",{viewBox:"0 0 26 26","aria-hidden":!0,children:[(0,n.jsx)("circle",{className:"health-dial__track",cx:"13",cy:"13",r:11}),(0,n.jsx)("circle",{className:"health-dial__arc",cx:"13",cy:"13",r:11,strokeDasharray:"".concat(l," ").concat(i)})]}),(0,n.jsx)("span",{children:t})]})}function eu(e){let{technologies:t}=e,a=t.find(e=>"framework"===e.kind||"language"===e.kind);if(!a)return(0,n.jsx)("span",{className:"stack-mark stack-mark--empty",children:"—"});let s=$[a.name.toLowerCase()],i=null==s?void 0:s.icon;return(0,n.jsxs)("span",{className:"stack-mark",children:[i?(0,n.jsx)(i,{"aria-hidden":!0,style:{color:s.color}}):null,(0,n.jsx)("span",{children:a.name})]})}function em(e){let{state:t}=e,a=(0,y.kj)();return(0,n.jsx)("span",{className:"state-dot state-dot--".concat(t),title:a(ef(t)),children:(0,n.jsx)("span",{className:"sr-only",children:a(ef(t))})})}function ep(e){var t,a;let{project:s,discreet:l,index:r,favorite:c,onFavorite:h,onHide:u,onClose:m,error:p}=e,f=(0,y.kj)(),x=(0,y.Ym)(),j=ea(s),g=es(s.healthGrade),b=l?f("store.hidden",{n:r+1}):s.name,w=!1===s.gitVersioned?f("catalog.noGit"):s.gitRemoteUrl?f("catalog.remote"):f("catalog.localOnly"),k="foreign"===s.originKind?f("origin.foreign"):"forked"===s.originKind?f("origin.forked"):"template"===s.originKind?f("origin.template"):null;return(0,n.jsxs)("aside",{className:"detail-panel","aria-label":f("catalog.detailsOf",{name:b}),children:[(0,n.jsxs)("header",{className:"detail-panel__head",children:[l?(0,n.jsx)(ed,{size:"row",variant:r}):(0,n.jsx)(v.hV,{locale:x,name:s.name,src:s.hasIcon?"/icon/".concat(s.id):null,size:38,tone:"neutral"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{children:b}),!l&&(0,n.jsx)("p",{title:s.root,children:ei(s.root)})]}),(0,n.jsx)("button",{type:"button",onClick:m,"aria-label":f("catalog.close"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("div",{className:"detail-panel__open",children:(0,n.jsx)(G.q,{projectId:s.id,path:s.root,locale:x})}),(0,n.jsxs)("section",{className:"detail-health detail-health--".concat(g),children:[(0,n.jsxs)("p",{children:[(0,n.jsx)(em,{state:s.state}),f("catalog.colHealth")]}),(0,n.jsxs)("p",{className:"detail-health__score",children:[(0,n.jsx)("strong",{children:s.healthScore}),(0,n.jsx)("span",{children:"/100"})]}),(0,n.jsx)("span",{className:"detail-health__meter",children:(0,n.jsx)("span",{style:{width:"".concat(Math.max(0,Math.min(100,s.healthScore)),"%")}})})]}),(0,n.jsxs)("dl",{className:"detail-facts",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colStack")}),(0,n.jsx)("dd",{children:(0,n.jsx)(eu,{technologies:s.technologies})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colActivity")}),(0,n.jsx)("dd",{children:(0,v.Pp)(s.lastCommitAt,x)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.commits")}),(0,n.jsx)("dd",{children:null!=(t=s.gitCommitCount)?t:"—"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.repository")}),(0,n.jsx)("dd",{children:w})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.size")}),(0,n.jsx)("dd",{children:(0,v.z3)(s.sourceBytes)})]}),k&&(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.origin")}),(0,n.jsx)("dd",{title:null!=(a=s.originStartedBy)?a:void 0,children:k})]})]}),en(s)&&(0,n.jsxs)("section",{className:"detail-review",children:[(0,n.jsx)("h3",{children:f("catalog.needsReview")}),j>0&&(0,n.jsxs)(i(),{href:"/p/".concat(s.slug,"#propuestas"),className:"detail-review__waiting",children:[(0,n.jsx)(o.V83,{"aria-hidden":!0}),(0,n.jsx)("span",{children:f(1===j?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:j})})]}),(0,n.jsxs)("ul",{children:[s.risks.map(e=>(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#unsaved"),title:f("catalog.reviewUnsaved"),children:(0,d.P3)(f,e)})},e.code)),s.vulnCount>0&&(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#security"),title:f("catalog.reviewSecurity"),children:1===s.vulnCount?f("store.noticeOne"):f("store.noticesMany",{n:s.vulnCount})})}),s.outdatedDeps>0&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("catalog.reviewDeps"),children:f("store.depsBehindRatio",{n:s.outdatedDeps,total:s.directDeps||0})})}),s.depsUnresolved&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("project.depsUncheckedWhy",{file:s.depsUnresolved}),children:f("store.depsUnchecked")})})]})]}),p&&(0,n.jsx)("p",{className:"detail-panel__error",role:"alert",children:p}),(0,n.jsxs)("footer",{className:"detail-panel__foot",children:[(0,n.jsxs)(i(),{href:"/p/".concat(s.slug),children:[f("catalog.fullDetail")," ",(0,n.jsx)(o.OvC,{"aria-hidden":!0})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{type:"button",onClick:h,"aria-label":c?f("store.favoriteRemove",{name:s.name}):f("store.favoriteAdd",{name:s.name}),"aria-pressed":c,children:c?(0,n.jsx)(o.K7t,{"aria-hidden":!0}):(0,n.jsx)(o.sdO,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:u,"aria-label":f("store.hideNamed",{name:s.name}),children:(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]})]})]})}function ef(e){return"active"===e?"state.active":"paused"===e?"state.paused":"dormant"===e?"state.dormant":"state.no-git"}},5035:(e,t,a)=>{"use strict";a.d(t,{F:()=>s});var n=a(4963);function s(e,t,a){let[s,i]=(0,n.useState)(t);return(0,n.useEffect)(()=>{try{let t=window.localStorage.getItem("panoma:".concat(e));if(null!==t)return void i(JSON.parse(t));if(!a)return;let n=window.localStorage.getItem("panoma:".concat(a));if(null===n)return;i(JSON.parse(n)),window.localStorage.setItem("panoma:".concat(e),n),window.localStorage.removeItem("panoma:".concat(a))}catch(e){}},[e,a]),[s,function(t){i(t);try{window.localStorage.setItem("panoma:".concat(e),JSON.stringify(t))}catch(e){}}]}},5805:(e,t,a)=>{Promise.resolve().then(a.bind(a,3385))},6859:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(9733);async function s(e,t){let a=await (0,n.B)("/api/open",{id:e.id,tool:e.tool,...e.with?{with:e.with}:{}},t,e=>[e.error,e.hint].filter(Boolean).join(" "));return a.ok?{ok:!0}:{ok:!1,message:a.message}}}},e=>{e.O(0,[6587,3052,2583,1723,7911,4517,5465,9643,4737,7358],()=>e(e.s=5805)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9415],{236:(e,t,a)=>{"use strict";a.d(t,{K:()=>o,t:()=>r});var n=a(9763),s=a(4963),i=a(5595),l=a(179);function r(){let[e,t]=(0,s.useState)();return(0,s.useEffect)(()=>{let e=!0;return fetch("/api/watch").then(e=>e.json()).then(a=>{e&&t(a)}).catch(()=>void 0),()=>{e=!1}},[]),e}function o(e){let{failure:t}=e,a=(0,l.kj)();return(0,n.jsxs)("section",{className:"catalog-down",role:"alert",children:[(0,n.jsxs)("h2",{children:[(0,n.jsx)(i.z1N,{"aria-hidden":!0}),a("catalog.down.title")]}),(0,n.jsx)("p",{children:a("catalog.down.body",{path:t.path})}),(0,n.jsx)("p",{className:"catalog-down__detail",children:(0,n.jsx)("code",{children:a("catalog.down.detail",{detail:t.detail})})})]})}},2922:(e,t,a)=>{"use strict";a.d(t,{q:()=>u});var n=a(9763),s=a(4963),i=a(5595),l=a(2574),r=a(7911),o=a(6859),c=a(8010),d=a(8384),h=a(5035);function u(e){var t,a;let{projectId:u,path:p,locale:f,onOpenChange:x,closed:j,compact:g}=e,{remote:b,editors:y,apps:v,agents:w}=(0,d.b)(),[k,N]=(0,s.useState)(!1),[_,S]=(0,s.useState)("ready"),[C,M]=(0,s.useState)(null),[T,O]=(0,h.F)("open:preferred-destination","app:claude-app"),P=(0,s.useRef)(null);if((0,s.useEffect)(()=>{j&&N(!1)},[j]),(0,c.y)(P,k,()=>N(!1)),b)return null;async function A(e){N(!1),S("opening"),M(null);let t=await (0,o.A)({id:u,tool:e.tool,with:e.target},(0,r.t)(f,"open.unreachable"));t.ok?(S("open"),setTimeout(()=>S("ready"),2e3)):(S("ready"),M(t.message))}let I=[...y.map(e=>{var t;return{key:"editor:".concat(e.id),tool:"editor",target:e.id,name:e.name,icon:null!=(t=l.L[e.id])?t:i.mUU}}),...v.map(e=>{var t;return{key:"app:".concat(e.id),tool:"app",target:e.id,name:e.name,sub:"catalog.appSub",icon:null!=(t=l.L[e.id])?t:i.mUU}}),...w.filter(e=>!e.broken).map(e=>{var t;return{key:"agent:".concat(e.id),tool:"agent",target:e.id,name:e.name,sub:"catalog.agentSub",icon:null!=(t=l.L[e.id])?t:i.Jhl}}),{key:"terminal",tool:"terminal",name:(0,r.t)(f,"catalog.terminal"),sub:"catalog.terminalSub",icon:i.Jhl},{key:"folder",tool:"folder",name:(0,r.t)(f,"catalog.folder"),sub:"catalog.folderSub",icon:i.mUU}],R=null!=(a=null!=(t=I.find(e=>e.key===T))?t:I.find(e=>"app:claude-app"===e.key))?a:I[0],D=R.icon;return(0,n.jsxs)("div",{className:g?"open-menu open-menu--compact":"open-menu",ref:P,children:[(0,n.jsxs)("div",{className:"open-menu__split",children:[(0,n.jsxs)("button",{type:"button",className:"open-menu__primary",onClick:()=>void A(R),disabled:"opening"===_,title:"".concat(R.name," \xb7 ").concat(p),children:[(0,n.jsx)(D,{"aria-hidden":!0}),"opening"===_?(0,r.t)(f,"open.busy"):"open"===_?(0,r.t)(f,"open.done"):(0,r.t)(f,"open.openWith",{name:R.name})]}),I.length>1&&(0,n.jsx)("button",{type:"button",className:"open-menu__toggle","aria-label":(0,r.t)(f,"open.moreDestinations"),"aria-expanded":k,"aria-haspopup":"menu",onClick:()=>{let e=!k;N(e),null==x||x(e)},children:(0,n.jsx)(i.zKo,{"aria-hidden":!0})})]}),k&&(0,n.jsx)("div",{className:"open-menu__list",role:"menu",children:I.map((e,t)=>{let a=e.icon,s=e.key===R.key,l=I[t-1],o=void 0!==l&&m(l)!==m(e);return(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":s,className:"open-menu__item".concat(o?" is-first-of-group":"").concat(s?" is-default":""),onClick:()=>{O(e.key),A(e)},children:[(0,n.jsx)(a,{"aria-hidden":!0}),(0,n.jsxs)("span",{className:"open-menu__item-copy",children:[(0,n.jsx)("span",{children:e.name}),(e.sub||s)&&(0,n.jsxs)("small",{children:[e.sub&&(0,r.t)(f,e.sub),e.sub&&s&&" \xb7 ",s&&(0,n.jsx)("b",{children:(0,r.t)(f,"open.defaultDestination")})]})]}),s&&(0,n.jsx)(i.mmf,{className:"open-menu__default-check","aria-hidden":!0})]},e.key)})}),C&&(0,n.jsx)("span",{className:"open-menu__error",children:C})]})}function m(e){return"editor"===e.tool||"app"===e.tool?"app":"folder"===e.tool?"finder":"terminal"}},3385:(e,t,a)=>{"use strict";a.d(t,{ProjectStore:()=>el});var n=a(9763),s=a(1723),i=a.n(s),l=a(7244),r=a(4963),o=a(5595),c=a(3570),d=a(7911);let h=new Set(["flutter","react native","expo","android","ios","swift","kotlin","dart"]),u=new Set(["next.js","react","vue","nuxt","svelte","sveltekit","angular","astro","remix / react router","solidjs","vite","tailwind css","shadcn/ui","electron","tauri"]),m=new Set(["express","fastify","nestjs","hono","django","flask","fastapi","ruby on rails","laravel","symfony","sinatra","gin","echo","fiber","axum","actix web"]),p=new Set(["mcp"]),f=new Set(["html","css","scss"]),x=new Set(["python","go","rust","ruby","php","java","c#","elixir"]),j=new Set(["dart","swift","kotlin","objective-c"]),g=new Set(["postgresql","mysql","mongodb","redis","mariadb"]),b=new Set(["vercel","netlify","cloudflare workers"]);var y=a(179),v=a(4204);function w(e){let{id:t,name:a}=e,s=(0,y.kj)(),[i,l]=(0,r.useState)("ready");async function o(){l("opening");try{let e=await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,tool:"editor"})});l(e.ok?"ready":"error")}catch(e){l("error")}}return(0,n.jsx)("button",{type:"button",onClick:o,disabled:"opening"===i,title:s("today.openNamed",{name:a}),className:"shrink-0 rounded-md border border-edge bg-surface px-2.5 py-1 text-xs font-semibold text-chalk transition hover:border-edge-bright hover:bg-raised disabled:opacity-60",children:s("opening"===i?"today.opening":"error"===i?"today.openFailed":"today.resume")})}function k(e){var t,a,s,l;let{report:c}=e,d=(0,y.kj)(),h=(0,y.Ym)(),{summary:u}=c,[m,p]=(0,r.useState)(!1),f=c.critic,x=(null!=(a=null==f?void 0:f.lookFindings)?a:0)+(null!=(s=null==f?void 0:f.reviewFindings)?s:0),j=u.commits>0||u.proposals>0||u.born>0||u.touchedProjects>0||x>0,g=c.since?d("today.since",{when:(0,v.KW)(c.since,h)}):d("today.last24h");return j?(0,n.jsxs)("section",{className:"brief","aria-label":d("today.title"),children:[(0,n.jsxs)("button",{type:"button",className:"brief__line",onClick:()=>p(!m),"aria-expanded":m,children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("strong",{children:d("today.title")}),(0,n.jsxs)("span",{className:"brief__facts",children:[u.proposals>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===u.proposals?"today.waitingOne":"today.waitingMany",{n:u.proposals})}),u.commits>0&&(0,n.jsxs)("span",{children:[d(1===u.touchedProjects?"today.inProjectsOne":"today.inProjectsMany",{c:d(1===u.commits?"today.commitOne":"today.commitMany",{n:u.commits}),n:u.touchedProjects}),u.byAgents>0&&" ".concat(d("today.fromAgents",{n:u.byAgents}))]}),u.born>0&&(0,n.jsx)("span",{children:d(1===u.born?"today.bornOne":"today.bornMany",{n:u.born})}),x>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===x?"today.criticOne":"today.criticMany",{n:x})})]}),(0,n.jsx)("span",{className:"brief__when",children:g}),(0,n.jsx)(o.bv7,{className:"brief__arrow","aria-hidden":!0})]}),m&&(0,n.jsxs)("div",{className:"brief__detail",children:[c.proposals.length>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("proposals.waiting")}),(0,n.jsx)("ul",{children:c.proposals.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)(i(),{href:"/runs/".concat(e.id),children:[e.pkgName,e.a?" → ".concat(e.a):""]}),(0,n.jsx)("span",{className:"brief__where",children:d("today.inProject",{project:e.project})}),e.repeats>1&&(0,n.jsx)("span",{className:"brief__attempts",children:d("today.attempts",{n:e.repeats})}),(0,n.jsxs)("span",{className:"brief__meta",children:[d(e.verified?"proposals.testsGreen":"proposals.unverified")," \xb7 ",(0,v.KW)(e.when,h)]})]},e.id))})]}),(null!=(l=null==f||null==(t=f.where)?void 0:t.length)?l:0)>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("today.criticWhere")}),(0,n.jsx)("ul",{children:f.where.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug,"#assignments"),children:e.name}),(0,n.jsx)("span",{className:"brief__meta",children:d(1===e.findings?"today.criticFindingOne":"today.criticFindingMany",{n:e.findings})})]},e.slug))})]}),c.projects.length>0&&(0,n.jsx)("ul",{className:"brief__projects",children:c.projects.slice(0,5).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name}),e.commits[0]&&(0,n.jsxs)("p",{className:"brief__subject",children:[e.commits[0].subject,e.commits[0].agent&&(0,n.jsx)("span",{className:"brief__agent",children:e.commits[0].agent})]}),(0,n.jsxs)("p",{className:"brief__meta",children:[e.commits.length>0&&(0,n.jsxs)(n.Fragment,{children:[d(1===e.commits.length?"today.commitOne":"today.commitMany",{n:e.commits.length})," \xb7 ",(0,v.KW)(e.commits[0].at,h)]}),e.agents.length>0&&(0,n.jsxs)(n.Fragment,{children:[e.commits.length>0&&" \xb7 ",e.agents.map(e=>d("today.agentNoted",{name:e.name,n:e.activities})).join(", ")]})]})]}),(0,n.jsx)(w,{id:e.id,name:e.name})]},e.slug))}),c.born.length>0&&(0,n.jsxs)("p",{className:"brief__born",children:[d("today.born")," ",c.born.slice(0,4).map((e,t)=>(0,n.jsxs)("span",{children:[t>0&&", ",(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name})]},e.slug))]})]})]}):(0,n.jsxs)("p",{className:"brief brief--quiet",children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("span",{children:d("today.nothing",{period:g})})]})}var N=a(236);function _(){let e=(0,y.kj)(),t=(0,N.t)();return(null==t?void 0:t.catalog)?(0,n.jsx)(N.K,{failure:t.catalog}):(null==t?void 0:t.active)!==!1?null:(0,n.jsxs)("p",{className:"brief brief--alert",role:"status",children:[(0,n.jsx)(o.z1N,{"aria-hidden":!0}),(0,n.jsx)("span",{children:e("watch.off")})]})}function S(e){let{total:t}=e,a=(0,y.kj)(),s=(0,l.useRouter)(),[,i]=(0,r.useTransition)(),[c,d]=(0,r.useState)(null),[h,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),[f,x]=(0,r.useState)(!1),[j,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(null),[w,k]=(0,r.useState)(null),N=(0,r.useCallback)(async()=>{try{var e;let t=await fetch("/api/roots"),a=await t.json();d(null!=(e=a.roots)?e:[])}catch(e){d([])}},[]);(0,r.useEffect)(()=>{N()},[N]);let[_,S]=(0,r.useState)(null);async function M(e,t){if(!f&&t.trim()){x(!0),k(null);try{var n,l,r;let o=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,path:t.trim()})}),c=await o.json().catch(()=>({}));if(!o.ok)return void k({text:null!=(n=c.error)?n:a("sites.failed"),bad:!0});if(p(""),await N(),"add"===e){let e=null!=(l=c.found)?l:0;k({text:a(1===e?"sites.addedOne":"sites.addedMany",{n:e}),bad:!1}),i(()=>s.refresh())}else k({text:a("sites.removed",{n:null!=(r=c.removed)?r:0}),bad:!1}),i(()=>s.refresh())}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{x(!1)}}}async function T(){if(!j&&!f){g(!0),k(null);try{var e,t;let n=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"search"})}),s=await n.json();v(null!=(e=s.candidates)?e:[]),0===(null!=(t=s.candidates)?t:[]).length&&k({text:a("sites.searchNone"),bad:!1})}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{g(!1)}}}if(!c||0===c.length)return null;let O=c.map(e=>C(e.path));return(0,n.jsxs)("div",{className:"sites",children:[(0,n.jsxs)("button",{type:"button",className:"sites__line",onClick:()=>u(!h),"aria-expanded":h,children:[(0,n.jsx)(o.gBk,{"aria-hidden":!0}),(0,n.jsx)("span",{children:a(1===t?"sites.summaryOne":"sites.summaryMany",{n:t,where:O.slice(0,2).join(", "),extra:O.length>2?" ".concat(a("sites.andMore",{n:O.length-2})):""})}),(0,n.jsx)("span",{className:"sites__action",children:a(h?"sites.close":"sites.manage")})]}),h&&(0,n.jsxs)("div",{className:"sites__detail",children:[(0,n.jsx)("ul",{children:c.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsxs)("span",{children:[a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects}),!e.exists&&" \xb7 ".concat(a("sites.missing"))]}),_===e.path?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>{S(null),M("remove",e.path)},disabled:f,className:"text-fail",children:a("sites.removeConfirm",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>S(null),disabled:f,children:a("accounts.cancel")})]}):(0,n.jsx)("button",{type:"button",onClick:()=>S(e.path),disabled:f,children:a("sites.remove")})]},e.path))}),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),M("add",m)},children:[(0,n.jsx)("input",{value:m,onChange:e=>p(e.target.value),placeholder:a("sites.placeholder"),"aria-label":a("sites.fieldLabel"),spellCheck:!1}),(0,n.jsxs)("button",{type:"submit",disabled:f||!m.trim(),children:[(0,n.jsx)(o.K0m,{"aria-hidden":!0}),a(f?"sites.adding":"sites.add")]})]}),(0,n.jsxs)("div",{className:"sites__search",children:[(0,n.jsxs)("button",{type:"button",onClick:T,disabled:j||f,children:[(0,n.jsx)(o.JJh,{"aria-hidden":!0}),a(j?"sites.searching":"sites.search")]}),(0,n.jsx)("span",{children:a("sites.searchHint")})]}),b&&b.length>0&&(0,n.jsx)("ul",{className:"sites__candidates",children:b.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsx)("span",{children:a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>{v(t=>(null!=t?t:[]).filter(t=>t.path!==e.path)),M("add",e.path)},disabled:f,children:a("sites.add")})]},e.path))}),(0,n.jsx)("p",{className:"sites__note",children:a("sites.note")}),w&&(0,n.jsx)("p",{className:w.bad?"sites__error":"sites__note",children:w.text})]})]})}function C(e){return e.replace(/^\/Users\/[^/]+/,"~")}var M=a(5035),T=a(8010),O=a(7558);let P="#0e0f11",A="#5c6169",I="#8b9098",R="#e7e8ea",D="#ffffff",E='"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';function F(e){return String(Math.max(0,Math.trunc(e)))}function U(e){return e>=75?"#2eaa63":e>=50?"#e4a30b":"#ea5a58"}function W(e,t,a,n,s,i){e.beginPath(),e.moveTo(t+i,a),e.arcTo(t+n,a,t+n,a+s,i),e.arcTo(t+n,a+s,t,a+s,i),e.arcTo(t,a+s,t,a,i),e.arcTo(t,a,t+n,a,i),e.closePath()}function L(e){return new Promise(t=>{let a=new Image;a.onload=()=>t(a),a.onerror=()=>t(null),a.src=e})}function H(e){let{data:t,discreet:a,onClose:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),h=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,T.y)(u,!0,s),(0,O.r)(u,!0),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>{var e;return null==(e=m.current)?void 0:e.focus()});return()=>cancelAnimationFrame(e)},[]);let[p,f]=(0,M.F)("share:user","","compartir:usuario"),[x,j]=(0,M.F)("share:language",l,"compartir:idioma"),[g,b]=(0,r.useState)(!a),[v,w]=(0,r.useState)(!1),[k,N]=(0,r.useState)("idle"),[_,S]=(0,r.useState)("idle"),C=(0,r.useCallback)((e,t)=>(0,d.t)(x,e,t),[x]),H=(0,r.useCallback)(async()=>{let e=h.current;if(!e)return;let a=await L("/assets/brand/panoma.svg"),n=function(e,t,a){let n=Math.max(0,Math.trunc(t));if(n<=8&&e.length>=n)return e.slice(0,n);let s=e.slice(0,Math.min(7,n)),i=Math.max(0,n-s.length);return i>0?[...s,a(i)]:s}(g?(await Promise.all(t.featuredProjects.slice(0,8).map(async e=>({...e,loadedIcon:await L(e.icon)})))).flatMap(e=>{let{loadedIcon:t,...a}=e;return t?[{...a,icon:t}]:[]}):t.featuredProjects.slice(0,8).map((e,t)=>({name:C("store.hidden",{n:t+1}),health:e.health,icon:null,concealed:!0})),t.projects,e=>({name:C("share.more",{n:e}),health:0,icon:a,panomaMark:!0,summary:!0}));!function(e,t){var a,n,s;let i=e.getContext("2d");if(!i)return;e.width=1600,e.height=900,i.fillStyle=D,i.fillRect(0,0,1600,900),i.strokeStyle=R,i.lineWidth=2,i.strokeRect(1,1,1598,898),function(e,t,a,n){if(t)try{e.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),82,66,60,66)}catch(e){}e.fillStyle=P,e.font="650 42px ".concat(E),e.fillText("panoma",a+66+22,n+48)}(i,t.logo,82,66),i.font="500 25px ".concat(E),i.fillStyle=I,i.textAlign="right",i.fillText(t.domain,1518,105),i.textAlign="left",i.fillStyle=P,function(e,t,a,n){let s=n;for(e.font="650 ".concat(s,"px ").concat(E);s>62&&e.measureText(t).width>1436;)s-=2,e.font="650 ".concat(s,"px ").concat(E)}(i,t.texts.title,1436,t.featuredProjects.length>0?86:102),i.fillText(t.texts.title,82,t.featuredProjects.length>0?278:350),t.featuredProjects.length>0&&function(e,t,a,n,s){let i=t.slice(0,8),l=1436/i.length,r=398,o=Math.min(122,l-28);e.fillStyle=I,e.font="600 18px ".concat(E),e.fillText(s.health.toUpperCase(),a,n),function(e,t,a,n){let s=[[n.healthGood,"#2eaa63"],[n.healthReview,"#e4a30b"],[n.healthAttention,"#ea5a58"]];e.font="550 17px ".concat(E);let i=t-(s.map(t=>{let[a]=t;return 14+e.measureText(a).width}).reduce((e,t)=>e+t,0)+28*(s.length-1));for(let[t,n]of s)e.fillStyle=n,e.beginPath(),e.arc(i+5,a-6,5,0,2*Math.PI),e.fill(),e.fillStyle=A,e.fillText(t,i+16,a),i+=14+e.measureText(t).width+28}(e,1600-a,n,s),i.forEach((t,n)=>{let s=a+l*n+l/2,i=s-37;if(e.save(),W(e,i,r,74,74,18),e.clip(),e.fillStyle=D,e.fill(),t.concealed){var c,d=e,h=i,u=r,m=74,p=n;d.fillStyle="#111316",d.fillRect(h,u,74,m),d.save(),d.strokeStyle="rgba(255, 255, 255, 0.085)",d.lineWidth=1.5;let t=null!=(c=[0,7,-5,12][p%4])?c:0;for(let e=-m;e<2*m;e+=17)d.beginPath(),d.moveTo(h+e+t,u+m),d.lineTo(h+e+m+t,u),d.stroke();d.restore(),d.save(),d.shadowColor="rgba(255, 255, 255, 0.12)",d.shadowBlur=6,d.fillStyle="#f4f4f2",W(d,h+(m-44)/2,u+(m-10)/2,44,10,6),d.fill(),d.restore(),d.fillStyle="rgba(77, 81, 88, 0.7)";for(let e=0;e<4;e+=1)W(d,h+m/2-11+7*e,u+m/2-2,2,4,1),d.fill()}else if(t.icon)try{t.panomaMark&&t.icon instanceof HTMLImageElement?function(e,t,a,n,s,i,l){let r=document.createElement("canvas");r.width=Math.round(88),r.height=Math.round(100);let o=r.getContext("2d");o&&(o.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),0,0,r.width,r.height),o.globalCompositeOperation="source-in",o.fillStyle=l,o.fillRect(0,0,r.width,r.height),e.drawImage(r,a,n,s,i))}(e,t.icon,i+15,r+11,44,50,t.summary?P:U(t.health)):e.drawImage(t.icon,i,r,74,74)}catch(e){}if(e.restore(),e.strokeStyle=R,e.lineWidth=1.5,W(e,i,r,74,74,18),e.stroke(),e.fillStyle=P,e.font="600 21px ".concat(E),e.textAlign="center",e.fillText(function(e,t,a){if(e.measureText(t).width<=a)return t;let n=t;for(;n.length>1&&e.measureText("".concat(n,"…")).width>a;)n=n.slice(0,-1);return"".concat(n,"…")}(e,t.name,l-16),s,r+104),t.summary){e.textAlign="left";return}let f=s-o/2,x=r+128;e.fillStyle=R,W(e,f,x,o,10,5),e.fill(),e.fillStyle=U(t.health),W(e,f,x,Math.max(10,o*(Math.min(100,Math.max(0,t.health))/100)),10,5),e.fill(),e.fillStyle=U(t.health),e.font="650 19px ".concat(E),e.fillText("".concat(t.health,"/100"),s,r+171),e.textAlign="left"})}(i,t.featuredProjects,82,348,t.texts);let l=t.featuredProjects.length>0?655:505;a=i,n=82,s=l,a.strokeStyle=R,a.lineWidth=1.5,a.beginPath(),a.moveTo(82,s),a.lineTo(n+1436,s),a.stroke(),function(e,t,a,n){let s=[[F(t.projects),t.texts.projects],[F(t.commits),t.texts.commits],[F(t.technologies),t.texts.technologies]];null!==t.agents&&s.push(["".concat(t.agents,"%"),t.texts.agents]);let i=1436/s.length;s.forEach((t,s)=>{let[l,r]=t,o=a+i*s;s>0&&(e.strokeStyle=R,e.lineWidth=1.5,e.beginPath(),e.moveTo(o-34,n-10),e.lineTo(o-34,n+79),e.stroke()),e.fillStyle=P,e.font="650 54px ".concat(E),e.fillText(l,o,n+45),e.fillStyle=I,e.font="500 22px ".concat(E),e.fillText(r,o,n+78)})}(i,t,82,l+51),t.user&&(i.fillStyle=A,i.font="550 27px ".concat(E),i.fillText(t.user,82,839)),i.fillStyle=I,i.font="500 23px ".concat(E),i.textAlign="right",i.fillText(t.texts.localFirst,1518,839),i.textAlign="left"}(e,{...t,logo:a,featuredProjects:n,user:p.trim()?p.trim().replace(/^@?/,"@"):void 0,domain:K,texts:{title:C("share.titulo",{n:t.projects}),projects:C("share.proyectos"),technologies:C("share.tecnologias"),commits:C("share.commits"),agents:C("share.agentes"),health:C("share.salud"),healthGood:C("share.saludBien"),healthReview:C("share.saludRevisar"),healthAttention:C("share.saludAtencion"),localFirst:C("share.local")}})},[g,t,C,p]);async function G(){let e=await z(h.current);e&&J(e)}async function Z(){try{await navigator.clipboard.writeText(V(t,C)),w(!0),setTimeout(()=>w(!1),1800)}catch(e){}}async function Y(){N("preparing");let e=await z(h.current);if(!e)return void N("failed");let a=V(t,C),n=new File([e],B,{type:"image/png"});if(function(e){if("function"!=typeof navigator.share||"function"!=typeof navigator.canShare)return!1;try{return navigator.canShare({files:[e]})}catch(e){return!1}}(n))try{await navigator.share({files:[n],text:a,title:"Panoma"}),N("idle");return}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return void N("idle")}let s=await q(e);s||J(e),N(s?"copied":"downloaded"),window.setTimeout(()=>N("idle"),2600)}async function $(){S("preparing");let e=function(e){if(!e)return null;try{let t=e.toDataURL("image/png"),a=t.slice(t.indexOf(",")+1),n=window.atob(a),s=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)s[e]=n.charCodeAt(e);return new Blob([s],{type:"image/png"})}catch(e){return null}}(h.current);if(!e)return void S("failed");let a=q(e);var n=V(t,C);let s=document.createElement("a");s.href="https://x.com/intent/post?text=".concat(encodeURIComponent(n)),s.target="_blank",s.rel="noreferrer noopener",s.click();let i=await a;i||J(e),S(i?"copied":"downloaded"),window.setTimeout(()=>S("idle"),2600)}return(0,r.useEffect)(()=>{H()},[H]),(0,n.jsxs)("div",{className:"share",role:"dialog","aria-modal":"true","aria-label":i("share.abrir"),children:[(0,n.jsxs)("div",{className:"share__box",ref:u,children:[(0,n.jsxs)("header",{children:[(0,n.jsx)("h2",{children:i("share.abrir")}),(0,n.jsx)("button",{ref:m,type:"button",onClick:s,"aria-label":i("share.cerrar"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("canvas",{ref:h,className:"share__canvas",width:1600,height:900,role:"img","aria-label":i("share.preview")}),(0,n.jsxs)("div",{className:"share__options",children:[(0,n.jsxs)("div",{className:"share__language",children:[(0,n.jsx)("span",{children:i("share.idioma")}),(0,n.jsxs)("div",{role:"group","aria-label":i("share.idioma"),children:[(0,n.jsx)("button",{type:"button",className:"es"===x?"is-active":void 0,"aria-pressed":"es"===x,onClick:()=>j("es"),children:"Espa\xf1ol"}),(0,n.jsx)("button",{type:"button",className:"en"===x?"is-active":void 0,"aria-pressed":"en"===x,onClick:()=>j("en"),children:"English"})]})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("span",{children:i("share.usuario")}),(0,n.jsx)("input",{value:p,onChange:e=>f(e.target.value),placeholder:i("share.usuarioVacio"),spellCheck:!1,maxLength:40})]}),(0,n.jsx)("button",{type:"button",className:"share__visibility".concat(g?"":" is-private"),onClick:()=>b(e=>!e),"aria-pressed":!g,"aria-label":i(g?"store.hideNames":"store.showNames"),title:i(g?"store.hideNames":"store.showNames"),children:g?(0,n.jsx)(o.bZk,{"aria-hidden":!0}):(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]}),(0,n.jsx)("p",{className:"share__note",children:i("share.nota")}),(0,n.jsxs)("footer",{children:[(0,n.jsxs)("button",{type:"button",className:"share__primary",onClick:G,children:[(0,n.jsx)(o.Dho,{"aria-hidden":!0}),i("share.descargar")]}),(0,n.jsx)("button",{type:"button",onClick:Z,children:i(v?"share.textoCopiado":"share.copiarTexto")}),(0,n.jsxs)("button",{type:"button",onClick:Y,disabled:"preparing"===k,children:[(0,n.jsx)(o.XcM,{"aria-hidden":!0}),i("share.image.".concat(k))]}),(0,n.jsxs)("button",{type:"button",onClick:$,disabled:"preparing"===_,children:[(0,n.jsx)(c.vIh,{"aria-hidden":!0}),i("share.x.".concat(_))]})]})]}),(0,n.jsx)("button",{type:"button",className:"share__backdrop",onClick:s,"aria-label":i("share.cerrar")})]})}let K="panoma.ai",B="panoma-projects.png";function z(e){return new Promise(t=>{if(!e)return void t(null);e.toBlob(t,"image/png")})}function J(e){let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=B,a.click(),URL.revokeObjectURL(t)}async function q(e){var t;if("undefined"==typeof ClipboardItem||"function"!=typeof(null==(t=navigator.clipboard)?void 0:t.write))return!1;try{return await navigator.clipboard.write([new ClipboardItem({"image/png":e})]),!0}catch(e){return!1}}function V(e,t){return t("share.texto",{n:e.projects,domain:K})}var G=a(2922),Z=a(5018),Y=a(8337);let $={typescript:{icon:c.cyb,color:"#3178c6"},"next.js":{icon:c.wlC,color:"#111111"},nextjs:{icon:c.wlC,color:"#111111"},react:{icon:c.GWR,color:"#149eca"},flutter:{icon:c.FuR,color:"#02569b"},dart:{icon:c.A7B,color:"#0175c2"},"node.js":{icon:c.h$$,color:"#5fa04e"},nodejs:{icon:c.h$$,color:"#5fa04e"},python:{icon:c.ptC,color:"#3776ab"},rust:{icon:c.xZd,color:"#111111"},go:{icon:c.ZRx,color:"#00add8"},vue:{icon:c.Zmg,color:"#42b883"},"vue.js":{icon:c.Zmg,color:"#42b883"},svelte:{icon:c.Qmm,color:"#ff3e00"},swift:{icon:c.cp,color:"#f05138"},kotlin:{icon:c.sjH,color:"#7f52ff"},ruby:{icon:c.LfU,color:"#cc342d"},php:{icon:c.XeU,color:"#777bb4"},express:{icon:c.t5I,color:"#111111"},tailwind:{icon:c.IR8,color:"#06b6d4"},tailwindcss:{icon:c.IR8,color:"#06b6d4"},docker:{icon:c.tih,color:"#2496ed"},postgresql:{icon:c.$Wy,color:"#4169e1"},supabase:{icon:c.lLb,color:"#3ecf8e"},firebase:{icon:c.iWE,color:"#ffca28"}},X=["all","attention","favorites","not-mine","web","mobile","backend","tools","ai","other"],Q={all:"filter.all",attention:"filter.attention",favorites:"filter.favorites","not-mine":"filter.notMine",web:"filter.web",mobile:"filter.mobile",backend:"filter.backend",tools:"filter.tools",ai:"filter.ai",other:"filter.other"};function ee(e){let{name:t,onOpen:a}=e,s=(0,y.kj)();return(0,n.jsx)("button",{type:"button",className:"open-handle",title:s("catalog.openHandle",{name:t}),"aria-label":s("catalog.openHandle",{name:t}),onClick:e=>{e.stopPropagation(),a()},onDoubleClick:e=>e.stopPropagation(),children:(0,n.jsx)(o.OvC,{"aria-hidden":!0})})}function et(){let e=(0,y.kj)();return(0,n.jsx)("span",{className:"opening-spinner",role:"status","aria-label":e("catalog.opening")})}function ea(e){var t;return null!=(t=e.proposedRuns)?t:0}function en(e){return ea(e)>0||e.risks.length>0||e.vulnCount>0||e.outdatedDeps>0||!!e.depsUnresolved}function es(e){return"A"===e||"B"===e?"good":"C"===e?"warn":"bad"}function ei(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function el(e){var t,a;let{projects:s,report:c}=e,d=(0,l.useRouter)(),v=(0,y.kj)(),{query:w,setQuery:N}=(0,Z.S)(),[C,T]=(0,M.F)("filter","all","filtro"),O=X.includes(C)?C:"all",[P,A]=(0,M.F)("sort","recent","orden"),[I,R]=(0,M.F)("view","grid","vista"),[D,E]=(0,M.F)("discreet",!1,"discreto"),[F,U]=(0,r.useState)(!1),[W,L]=(0,M.F)("favorites",[],"favoritos"),K=(0,r.useMemo)(()=>new Set(W),[W]),[B,z]=(0,r.useState)(null!=(a=null==(t=s[0])?void 0:t.id)?a:null),J=(0,r.useRef)(!1),q=(0,r.useRef)(null),[V,G]=(0,r.useState)(null),[$,ee]=(0,r.useState)(null),et=s[0],ea=(0,r.useMemo)(()=>s.filter(en).length,[s]),es=(0,r.useMemo)(()=>s.filter(e=>K.has(e.id)).length,[K,s]),ei=(0,r.useMemo)(()=>{let e=(0,Y.A)(w.trim());return s.filter(t=>{let a=!e||(0,Y.A)([t.name,t.description,t.primaryLanguage,...t.technologies.flatMap(e=>[e.name,e.version]),...t.agents.map(e=>e.name)].filter(Boolean).join(" ")).includes(e),n="all"===O||("attention"===O?en(t):"favorites"===O?K.has(t.id):"not-mine"===O?"foreign"===t.originKind||"forked"===t.originKind||"template"===t.originKind:(function(e){var t;let a=new Set,n=(null!=(t=e.primaryLanguage)?t:"").toLowerCase();for(let t of e.technologies){let e=t.name.toLowerCase();"model"===t.kind&&a.add("ai"),h.has(e)&&a.add("mobile"),(u.has(e)||b.has(e))&&a.add("web"),(m.has(e)||g.has(e))&&a.add("backend"),p.has(e)&&a.add("tools")}return j.has(n)&&a.add("mobile"),f.has(n)&&a.add("web"),x.has(n)&&a.add("backend"),0===a.size&&/\b(cli|tool|tools|runner|script|scripts|terminal|bot|daemon|agent)\b/.test(e.name.toLowerCase())&&a.add("tools"),0===a.size&&e.technologies.some(e=>"runtime"===e.kind&&["node.js","deno","bun"].includes(e.name.toLowerCase()))&&a.add("backend"),0===a.size&&a.add("other"),a})(t).has(O));return a&&n}).sort((e,t)=>{let a=Number(K.has(t.id))-Number(K.has(e.id));return 0!==a?a:"name"===P?e.name.localeCompare(t.name,"es"):"health"===P?t.healthScore-e.healthScore:(t.lastCommitAt?Date.parse(t.lastCommitAt):0)-(e.lastCommitAt?Date.parse(e.lastCommitAt):0)})},[K,O,s,w,P]),el=(0,r.useMemo)(()=>ei.findIndex(e=>e.id===B),[ei,B]),ed=-1===el?null:ei[el];(0,r.useEffect)(()=>{if(J.current)return;let e=ei[0];e&&e.id!==B&&z(e.id)},[ei,B]);let eh=(0,r.useCallback)(e=>{J.current=!0,z(e),G(null)},[]),[eu,em]=(0,r.useTransition)(),[ef,ex]=(0,r.useState)(null),ej=(0,r.useCallback)(e=>{ex(e.id),em(()=>d.push("/p/".concat(e.slug)))},[d]),eg=(0,r.useCallback)(()=>{var e;let t=null==(e=q.current)?void 0:e.querySelectorAll("[data-index]"),a=null==t?void 0:t[0];if(!a)return 1;let n=a.offsetTop,s=0;for(let e of t){if(e.offsetTop!==n)break;s+=1}return Math.max(1,s)},[]);function eb(e){var t,a;if(0===ei.length)return;let n=ei.findIndex(e=>e.id===B),s=-1===n?0:Math.min(ei.length-1,Math.max(0,n+e)),i=ei[s];i&&(eh(i.id),null==(a=q.current)||null==(t=a.querySelector('[data-index="'.concat(s,'"]')))||t.focus())}async function ey(e){var t,a,n;let i;G(null);try{i=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ocultar",id:e})})}catch(e){G(v("project.unreachable"));return}if(!i.ok)return void G(null!=(a=(await i.json().catch(()=>({}))).error)?a:v("project.actionFailed"));B===e&&eh(null),ee({id:e,name:null!=(n=null==(t=s.find(t=>t.id===e))?void 0:t.name)?n:""}),d.refresh()}async function ev(e){G(null);try{let a=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mostrar",id:e})});if(!a.ok){var t;let e=await a.json().catch(()=>({}));G(null!=(t=e.error)?t:v("project.actionFailed"));return}}catch(e){G(v("project.unreachable"));return}ee(null),d.refresh()}let ew={attention:ea,favorites:es};return et?(0,n.jsx)("main",{id:"app-main",tabIndex:-1,className:"app-main catalog-screen",children:(0,n.jsxs)("div",{className:"catalog-screen__inner",children:[(0,n.jsx)(k,{report:c}),(0,n.jsx)(_,{}),$&&(0,n.jsxs)("p",{className:"brief brief--dismissed",role:"status",children:[(0,n.jsx)(o.EgV,{"aria-hidden":!0}),(0,n.jsx)("span",{children:v("store.justHidden",{name:$.name})}),(0,n.jsx)("button",{type:"button",onClick:()=>void ev($.id),children:v("store.undoHide")}),(0,n.jsx)(i(),{href:"/hidden",children:v("store.seeHidden")})]}),(0,n.jsxs)("div",{className:"catalog-bar",children:[(0,n.jsxs)("h1",{children:[v("catalog.title"),(0,n.jsx)("span",{children:ei.length===s.length?v(1===s.length?"catalog.countOne":"catalog.count",{n:s.length}):"".concat(ei.length," / ").concat(s.length)})]}),(0,n.jsxs)("div",{className:"catalog-bar__tools",children:[(0,n.jsx)("p",{className:"catalog-hint",children:v("catalog.hint")}),(0,n.jsxs)("label",{className:"catalog-sort",children:[(0,n.jsx)("span",{className:"sr-only",children:v("store.sortLabel")}),(0,n.jsxs)("select",{value:P,onChange:e=>A(e.target.value),children:[(0,n.jsx)("option",{value:"recent",children:v("store.sortRecent")}),(0,n.jsx)("option",{value:"name",children:v("store.sortName")}),(0,n.jsx)("option",{value:"health",children:v("store.sortHealth")})]})]}),(0,n.jsx)("button",{type:"button",className:"catalog-tool".concat(D?" is-active":""),onClick:()=>E(!D),"aria-pressed":D,title:v(D?"store.showNames":"store.hideNames"),children:D?(0,n.jsx)(o.EgV,{"aria-hidden":!0}):(0,n.jsx)(o.bZk,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",className:"catalog-tool",onClick:()=>U(!0),"aria-label":v("share.abrir"),title:v("share.abrir"),children:(0,n.jsx)(o.XcM,{"aria-hidden":!0})}),(0,n.jsxs)("div",{className:"view-switch",role:"group","aria-label":v("store.viewAria"),children:[(0,n.jsx)("button",{type:"button",onClick:()=>R("list"),className:"list"===I?"is-active":void 0,"aria-label":v("store.viewList"),"aria-pressed":"list"===I,children:(0,n.jsx)(o.$mg,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:()=>R("grid"),className:"grid"===I?"is-active":void 0,"aria-label":v("store.viewGrid"),"aria-pressed":"grid"===I,children:(0,n.jsx)(o.ENP,{"aria-hidden":!0})})]})]})]}),(0,n.jsx)("div",{className:"catalog-filters",role:"group","aria-label":v("store.filterAria"),children:X.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>T(e),className:O===e?"is-active":void 0,"aria-pressed":O===e,children:[v(Q[e]),ew[e]?(0,n.jsx)("span",{children:ew[e]}):null]},e))}),(0,n.jsx)(er,{project:et,discreet:D,index:Math.max(0,s.findIndex(e=>e.id===et.id))}),(0,n.jsx)(S,{total:s.length}),F&&(0,n.jsx)(H,{data:function(e){let t=e.reduce((e,t)=>{var a;return e+(null!=(a=t.gitCommitCount)?a:0)},0),a=new Set(e.flatMap(e=>e.technologies.map(e=>e.name))),n=e.reduce((e,t)=>e+t.agents.reduce((e,t)=>e+t.commits,0),0);return{projects:e.length,technologies:a.size,commits:t,agents:t>0&&n>0?Math.min(100,Math.round(n/t*100)):null,featuredProjects:e.filter(e=>e.hasIcon).slice(0,8).map(e=>({name:e.name,health:e.healthScore,icon:"/icon/".concat(e.id)}))}}(s),discreet:D,onClose:()=>U(!1)}),(0,n.jsxs)("div",{className:"catalog-split","data-open":ed?"true":"false",children:[(0,n.jsx)("div",{className:"catalog-body",children:ei.length>0?(0,n.jsxs)(n.Fragment,{children:["list"===I&&(0,n.jsxs)("div",{className:"catalog-columns","aria-hidden":!0,children:[(0,n.jsx)("span",{children:v("catalog.colProject")}),(0,n.jsx)("span",{children:v("catalog.colHealth")}),(0,n.jsx)("span",{children:v("catalog.colStack")}),(0,n.jsx)("span",{children:v("catalog.colActivity")})]}),(0,n.jsx)("div",{ref:q,role:"listbox","aria-label":v("catalog.rowsAria"),className:"catalog-rows catalog-rows--".concat(I),onKeyDown:function(e){let t="grid"===I?eg():1,a={ArrowDown:t,ArrowUp:-t,..."grid"===I?{ArrowRight:1,ArrowLeft:-1}:{}}[e.key];if(void 0!==a){e.preventDefault(),eb(a);return}if("Home"===e.key||"End"===e.key){e.preventDefault(),eb("Home"===e.key?-ei.length:ei.length);return}"Escape"===e.key&&B&&(e.preventDefault(),eh(null))},children:ei.map((e,t)=>{let a={project:e,index:t,selected:e.id===B,tabbable:t===(-1===el?0:el),favorite:K.has(e.id),opening:eu&&ef===e.id,discreet:D,onSelect:()=>eh(e.id),onOpen:()=>ej(e)};return"list"===I?(0,n.jsx)(eo,{...a},e.id):(0,n.jsx)(ec,{...a},e.id)})})]}):(0,n.jsxs)("div",{className:"catalog-empty",role:"status",children:[(0,n.jsx)(o.ENP,{"aria-hidden":!0}),(0,n.jsx)("h2",{children:v("store.noResults")}),(0,n.jsx)("p",{children:v("store.noResultsBody")}),(0,n.jsx)("button",{type:"button",onClick:()=>{T("all"),N(""),window.location.search&&d.replace("/",{scroll:!1})},children:v("store.clearFilters")})]})}),ed&&(0,n.jsx)(ep,{project:ed,discreet:D,index:Math.max(0,ei.findIndex(e=>e.id===ed.id)),favorite:K.has(ed.id),onFavorite:()=>{var e;return e=ed.id,void L(K.has(e)?W.filter(t=>t!==e):[...W,e])},onHide:()=>ey(ed.id),onClose:()=>eh(null),error:V},ed.id)]})]})}):null}function er(e){let{project:t,discreet:a,index:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),r=a?i("store.hidden",{n:s+1}):t.name;return(0,n.jsxs)("section",{className:"resume-strip","aria-label":i("store.resume"),children:[(0,n.jsx)(o.cyc,{"aria-hidden":!0}),(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:r}),(0,n.jsx)("span",{children:t.lastCommitSubject||function(e,t){if(e.description)return e.description;let a=e.technologies.find(e=>"framework"===e.kind||"language"===e.kind);return a?t("store.builtWith",{tech:a.name}):t("store.detected")}(t,i)})]}),(0,n.jsx)("span",{className:"resume-strip__when",children:(0,v.Pp)(t.lastCommitAt,l)}),(0,n.jsx)(G.q,{projectId:t.id,path:t.root,locale:l,compact:!0})]})}function eo(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.kj)(),p=(0,y.Ym)(),f=ea(t);return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-row",title:c?m("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsxs)("span",{className:"catalog-row__identity",children:[c?(0,n.jsx)(ed,{size:"row",variant:a}):(0,n.jsx)(v.hV,{locale:p,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:40,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-row__names",children:[(0,n.jsxs)("span",{className:"catalog-row__name",children:[(0,n.jsx)("span",{children:c?m("store.hidden",{n:a+1}):t.name}),l&&(0,n.jsx)(o.K7t,{className:"catalog-row__star","aria-hidden":!0}),f>0&&(0,n.jsxs)("span",{className:"waiting-badge",title:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f}),children:[(0,n.jsx)("span",{"aria-hidden":!0,children:f}),(0,n.jsx)("span",{className:"sr-only",children:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f})})]}),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(m,e)).join(" \xb7 ")})]}),!c&&(0,n.jsxs)("span",{className:"catalog-row__path",children:[ei(t.root),t.copyCount>0&&(0,n.jsxs)("span",{title:m("store.alsoCopiesTitle"),children:[" ",m("store.alsoCopies",{n:t.copyCount})]})]})]})]}),(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)(eu,{technologies:t.technologies}),(0,n.jsxs)("span",{className:"catalog-row__activity",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,p)]}),(0,n.jsx)("span",{className:"catalog-row__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?m("store.hidden",{n:a+1}):t.name,onOpen:u})})]})}function ec(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.Ym)(),p=(0,y.kj)();return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-tile",title:c?p("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)("span",{className:"catalog-tile__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?p("store.hidden",{n:a+1}):t.name,onOpen:u})}),c?(0,n.jsx)(ed,{size:"tile",variant:a}):(0,n.jsx)(v.hV,{locale:m,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:54,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-tile__name",children:[l&&(0,n.jsx)(o.K7t,{"aria-hidden":!0}),(0,n.jsx)("span",{children:c?p("store.hidden",{n:a+1}):t.name}),!c&&t.copyCount>0&&(0,n.jsx)(o.Zs_,{title:p("store.alsoCopiesMark",{n:t.copyCount})})]}),(0,n.jsxs)("span",{className:"catalog-tile__meta",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,m),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(p,e)).join(" \xb7 ")})]})]})}function ed(e){let{size:t,variant:a}=e;return(0,n.jsx)("span",{className:"catalog-private-mark catalog-private-mark--".concat(t),"data-variant":a%4,"aria-hidden":!0,children:(0,n.jsx)("span",{className:"catalog-private-mark__seal"})})}function eh(e){let{score:t,grade:a}=e,s=(0,y.kj)(),i=2*Math.PI*11,l=Math.max(0,Math.min(100,t))/100*i;return(0,n.jsxs)("span",{className:"health-dial health-dial--".concat(es(a)),title:s("catalog.healthOf",{n:t}),children:[(0,n.jsxs)("svg",{viewBox:"0 0 26 26","aria-hidden":!0,children:[(0,n.jsx)("circle",{className:"health-dial__track",cx:"13",cy:"13",r:11}),(0,n.jsx)("circle",{className:"health-dial__arc",cx:"13",cy:"13",r:11,strokeDasharray:"".concat(l," ").concat(i)})]}),(0,n.jsx)("span",{children:t})]})}function eu(e){let{technologies:t}=e,a=t.find(e=>"framework"===e.kind||"language"===e.kind);if(!a)return(0,n.jsx)("span",{className:"stack-mark stack-mark--empty",children:"—"});let s=$[a.name.toLowerCase()],i=null==s?void 0:s.icon;return(0,n.jsxs)("span",{className:"stack-mark",children:[i?(0,n.jsx)(i,{"aria-hidden":!0,style:{color:s.color}}):null,(0,n.jsx)("span",{children:a.name})]})}function em(e){let{state:t}=e,a=(0,y.kj)();return(0,n.jsx)("span",{className:"state-dot state-dot--".concat(t),title:a(ef(t)),children:(0,n.jsx)("span",{className:"sr-only",children:a(ef(t))})})}function ep(e){var t,a;let{project:s,discreet:l,index:r,favorite:c,onFavorite:h,onHide:u,onClose:m,error:p}=e,f=(0,y.kj)(),x=(0,y.Ym)(),j=ea(s),g=es(s.healthGrade),b=l?f("store.hidden",{n:r+1}):s.name,w=!1===s.gitVersioned?f("catalog.noGit"):s.gitRemoteUrl?f("catalog.remote"):f("catalog.localOnly"),k="foreign"===s.originKind?f("origin.foreign"):"forked"===s.originKind?f("origin.forked"):"template"===s.originKind?f("origin.template"):null;return(0,n.jsxs)("aside",{className:"detail-panel","aria-label":f("catalog.detailsOf",{name:b}),children:[(0,n.jsxs)("header",{className:"detail-panel__head",children:[l?(0,n.jsx)(ed,{size:"row",variant:r}):(0,n.jsx)(v.hV,{locale:x,name:s.name,src:s.hasIcon?"/icon/".concat(s.id):null,size:38,tone:"neutral"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{children:b}),!l&&(0,n.jsx)("p",{title:s.root,children:ei(s.root)})]}),(0,n.jsx)("button",{type:"button",onClick:m,"aria-label":f("catalog.close"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("div",{className:"detail-panel__open",children:(0,n.jsx)(G.q,{projectId:s.id,path:s.root,locale:x})}),(0,n.jsxs)("section",{className:"detail-health detail-health--".concat(g),children:[(0,n.jsxs)("p",{children:[(0,n.jsx)(em,{state:s.state}),f("catalog.colHealth")]}),(0,n.jsxs)("p",{className:"detail-health__score",children:[(0,n.jsx)("strong",{children:s.healthScore}),(0,n.jsx)("span",{children:"/100"})]}),(0,n.jsx)("span",{className:"detail-health__meter",children:(0,n.jsx)("span",{style:{width:"".concat(Math.max(0,Math.min(100,s.healthScore)),"%")}})})]}),(0,n.jsxs)("dl",{className:"detail-facts",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colStack")}),(0,n.jsx)("dd",{children:(0,n.jsx)(eu,{technologies:s.technologies})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colActivity")}),(0,n.jsx)("dd",{children:(0,v.Pp)(s.lastCommitAt,x)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.commits")}),(0,n.jsx)("dd",{children:null!=(t=s.gitCommitCount)?t:"—"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.repository")}),(0,n.jsx)("dd",{children:w})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.size")}),(0,n.jsx)("dd",{children:(0,v.z3)(s.sourceBytes)})]}),k&&(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.origin")}),(0,n.jsx)("dd",{title:null!=(a=s.originStartedBy)?a:void 0,children:k})]})]}),en(s)&&(0,n.jsxs)("section",{className:"detail-review",children:[(0,n.jsx)("h3",{children:f("catalog.needsReview")}),j>0&&(0,n.jsxs)(i(),{href:"/p/".concat(s.slug,"#propuestas"),className:"detail-review__waiting",children:[(0,n.jsx)(o.V83,{"aria-hidden":!0}),(0,n.jsx)("span",{children:f(1===j?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:j})})]}),(0,n.jsxs)("ul",{children:[s.risks.map(e=>(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#unsaved"),title:f("catalog.reviewUnsaved"),children:(0,d.P3)(f,e)})},e.code)),s.vulnCount>0&&(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#security"),title:f("catalog.reviewSecurity"),children:1===s.vulnCount?f("store.noticeOne"):f("store.noticesMany",{n:s.vulnCount})})}),s.outdatedDeps>0&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("catalog.reviewDeps"),children:f("store.depsBehindRatio",{n:s.outdatedDeps,total:s.directDeps||0})})}),s.depsUnresolved&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("project.depsUncheckedWhy",{file:s.depsUnresolved}),children:f("store.depsUnchecked")})})]})]}),p&&(0,n.jsx)("p",{className:"detail-panel__error",role:"alert",children:p}),(0,n.jsxs)("footer",{className:"detail-panel__foot",children:[(0,n.jsxs)(i(),{href:"/p/".concat(s.slug),children:[f("catalog.fullDetail")," ",(0,n.jsx)(o.OvC,{"aria-hidden":!0})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{type:"button",onClick:h,"aria-label":c?f("store.favoriteRemove",{name:s.name}):f("store.favoriteAdd",{name:s.name}),"aria-pressed":c,children:c?(0,n.jsx)(o.K7t,{"aria-hidden":!0}):(0,n.jsx)(o.sdO,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:u,"aria-label":f("store.hideNamed",{name:s.name}),children:(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]})]})]})}function ef(e){return"active"===e?"state.active":"paused"===e?"state.paused":"dormant"===e?"state.dormant":"state.no-git"}},5035:(e,t,a)=>{"use strict";a.d(t,{F:()=>s});var n=a(4963);function s(e,t,a){let[s,i]=(0,n.useState)(t);return(0,n.useEffect)(()=>{try{let t=window.localStorage.getItem("panoma:".concat(e));if(null!==t)return void i(JSON.parse(t));if(!a)return;let n=window.localStorage.getItem("panoma:".concat(a));if(null===n)return;i(JSON.parse(n)),window.localStorage.setItem("panoma:".concat(e),n),window.localStorage.removeItem("panoma:".concat(a))}catch(e){}},[e,a]),[s,function(t){i(t);try{window.localStorage.setItem("panoma:".concat(e),JSON.stringify(t))}catch(e){}}]}},5805:(e,t,a)=>{Promise.resolve().then(a.bind(a,3385))},6859:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(9733);async function s(e,t){let a=await (0,n.B)("/api/open",{id:e.id,tool:e.tool,...e.with?{with:e.with}:{}},t,e=>[e.error,e.hint].filter(Boolean).join(" "));return a.ok?{ok:!0}:{ok:!1,message:a.message}}}},e=>{e.O(0,[6587,3052,2583,1723,7911,4517,5465,9643,4737,7358],()=>e(e.s=5805)),_N_E=e.O()}]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
search
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MU4KCYKO.js";
|
|
4
4
|
import {
|
|
5
5
|
catalogFetch,
|
|
6
6
|
unreachable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HFFASR7D.js";
|
|
8
8
|
import {
|
|
9
9
|
say
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FN63LYZH.js";
|
|
11
11
|
import "./chunk-K27F6QDR.js";
|
|
12
12
|
|
|
13
13
|
// src/check-command.ts
|
|
@@ -446,6 +446,15 @@ var MESSAGES = {
|
|
|
446
446
|
"npx.hooksRefused": "Hooks need a panoma that is still here tomorrow.",
|
|
447
447
|
"npx.hooksRefusedWhy": "This copy runs from npx, which keeps it for one command and then lets it go. A hook written\n now would call a command that stops existing the moment this one ends \u2014 and hooks stay quiet\n by design, so nothing would ever tell you.",
|
|
448
448
|
"npx.hooksRefusedHow": "Install it and try again: npm i -g panoma",
|
|
449
|
+
/*
|
|
450
|
+
And the same refusal for the MCP, which needed it for the same reason and did not have it.
|
|
451
|
+
`--install` writes a permanent file in somebody's agent that names a path inside npx's cache.
|
|
452
|
+
That path is alive today and gone whenever npm clears it, and an MCP server that fails to
|
|
453
|
+
start is not an error anyone sees: the agent simply comes up without the tools.
|
|
454
|
+
*/
|
|
455
|
+
"npx.mcpRefused": "An agent's configuration outlives the copy that would write it.",
|
|
456
|
+
"npx.mcpRefusedWhy": "This copy runs from npx, which keeps it for one command and then lets it go. The configuration\n written now would point inside that cache, so the agent would stop getting the tools the day it\n is cleared \u2014 and it would come up without them saying nothing, which is how MCP fails.",
|
|
457
|
+
"npx.mcpRefusedHow": "Install it and try again: npm i -g panoma",
|
|
449
458
|
"npx.upEphemeral": "running from npx \xB7 to keep the command: npm i -g panoma",
|
|
450
459
|
"cli.catalogUpdated": "Catalog updated: {projects} project{ps}, {technologies} technolog{ts}, {packages} package{ks}, {families} famil{fs}",
|
|
451
460
|
/*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLI_LANGUAGE,
|
|
3
3
|
say
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FN63LYZH.js";
|
|
5
5
|
import {
|
|
6
6
|
POSTGRES_DEL_PAQUETE,
|
|
7
7
|
avisoDeFormato,
|
|
@@ -15,6 +15,62 @@ import {
|
|
|
15
15
|
readLeases
|
|
16
16
|
} from "./chunk-K27F6QDR.js";
|
|
17
17
|
|
|
18
|
+
// src/environment.ts
|
|
19
|
+
import { execFile } from "child_process";
|
|
20
|
+
import { existsSync, readFileSync } from "fs";
|
|
21
|
+
import { basename, dirname, join } from "path";
|
|
22
|
+
import { fileURLToPath } from "url";
|
|
23
|
+
import { promisify } from "util";
|
|
24
|
+
var run = promisify(execFile);
|
|
25
|
+
function cliEntry() {
|
|
26
|
+
const here = fileURLToPath(import.meta.url);
|
|
27
|
+
const base = basename(here);
|
|
28
|
+
if (base === "index.js" || base === "index.ts") return here;
|
|
29
|
+
const sibling = join(dirname(here), here.endsWith(".ts") ? "index.ts" : "index.js");
|
|
30
|
+
return existsSync(sibling) ? sibling : here;
|
|
31
|
+
}
|
|
32
|
+
function runningFromNpx(entry = cliEntry()) {
|
|
33
|
+
return entry.split(/[\\/]/).includes("_npx");
|
|
34
|
+
}
|
|
35
|
+
function monorepoRoot(desde = dirname(cliEntry())) {
|
|
36
|
+
let dir = desde;
|
|
37
|
+
for (let i = 0; i < 8; i++) {
|
|
38
|
+
if (existsSync(join(dir, "pnpm-workspace.yaml")) && esElNuestro(dir)) return dir;
|
|
39
|
+
const padre = dirname(dir);
|
|
40
|
+
if (padre === dir) break;
|
|
41
|
+
dir = padre;
|
|
42
|
+
}
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
function esElNuestro(raiz) {
|
|
46
|
+
try {
|
|
47
|
+
const manifiesto = JSON.parse(
|
|
48
|
+
readFileSync(join(raiz, "apps", "web", "package.json"), "utf8")
|
|
49
|
+
);
|
|
50
|
+
return manifiesto.name === "@panoma/web";
|
|
51
|
+
} catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function panomaCommand() {
|
|
56
|
+
if (runningFromNpx()) return { argv: ["panoma"], efimero: true };
|
|
57
|
+
try {
|
|
58
|
+
await run("which", ["panoma"], { timeout: 4e3 });
|
|
59
|
+
return { argv: ["panoma"] };
|
|
60
|
+
} catch {
|
|
61
|
+
}
|
|
62
|
+
const root = monorepoRoot();
|
|
63
|
+
const built = root ? join(root, "apps", "cli", "dist", "index.js") : void 0;
|
|
64
|
+
if (built && existsSync(built)) {
|
|
65
|
+
return { argv: [process.execPath, built] };
|
|
66
|
+
}
|
|
67
|
+
const entry = cliEntry();
|
|
68
|
+
return {
|
|
69
|
+
argv: [process.execPath, entry],
|
|
70
|
+
aviso: entry.endsWith(".ts") ? say("env.notBuilt", { entry }) : void 0
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
18
74
|
// src/wait.ts
|
|
19
75
|
var NADA = { uno: () => {
|
|
20
76
|
}, fin: () => {
|
|
@@ -79,62 +135,6 @@ import { dirname as dirname2, join as join2 } from "path";
|
|
|
79
135
|
import { promisify as promisify2 } from "util";
|
|
80
136
|
import pc from "picocolors";
|
|
81
137
|
|
|
82
|
-
// src/environment.ts
|
|
83
|
-
import { execFile } from "child_process";
|
|
84
|
-
import { existsSync, readFileSync } from "fs";
|
|
85
|
-
import { basename, dirname, join } from "path";
|
|
86
|
-
import { fileURLToPath } from "url";
|
|
87
|
-
import { promisify } from "util";
|
|
88
|
-
var run = promisify(execFile);
|
|
89
|
-
function cliEntry() {
|
|
90
|
-
const here = fileURLToPath(import.meta.url);
|
|
91
|
-
const base = basename(here);
|
|
92
|
-
if (base === "index.js" || base === "index.ts") return here;
|
|
93
|
-
const sibling = join(dirname(here), here.endsWith(".ts") ? "index.ts" : "index.js");
|
|
94
|
-
return existsSync(sibling) ? sibling : here;
|
|
95
|
-
}
|
|
96
|
-
function runningFromNpx(entry = cliEntry()) {
|
|
97
|
-
return entry.split(/[\\/]/).includes("_npx");
|
|
98
|
-
}
|
|
99
|
-
function monorepoRoot(desde = dirname(cliEntry())) {
|
|
100
|
-
let dir = desde;
|
|
101
|
-
for (let i = 0; i < 8; i++) {
|
|
102
|
-
if (existsSync(join(dir, "pnpm-workspace.yaml")) && esElNuestro(dir)) return dir;
|
|
103
|
-
const padre = dirname(dir);
|
|
104
|
-
if (padre === dir) break;
|
|
105
|
-
dir = padre;
|
|
106
|
-
}
|
|
107
|
-
return void 0;
|
|
108
|
-
}
|
|
109
|
-
function esElNuestro(raiz) {
|
|
110
|
-
try {
|
|
111
|
-
const manifiesto = JSON.parse(
|
|
112
|
-
readFileSync(join(raiz, "apps", "web", "package.json"), "utf8")
|
|
113
|
-
);
|
|
114
|
-
return manifiesto.name === "@panoma/web";
|
|
115
|
-
} catch {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
async function panomaCommand() {
|
|
120
|
-
if (runningFromNpx()) return { argv: ["panoma"], efimero: true };
|
|
121
|
-
try {
|
|
122
|
-
await run("which", ["panoma"], { timeout: 4e3 });
|
|
123
|
-
return { argv: ["panoma"] };
|
|
124
|
-
} catch {
|
|
125
|
-
}
|
|
126
|
-
const root = monorepoRoot();
|
|
127
|
-
const built = root ? join(root, "apps", "cli", "dist", "index.js") : void 0;
|
|
128
|
-
if (built && existsSync(built)) {
|
|
129
|
-
return { argv: [process.execPath, built] };
|
|
130
|
-
}
|
|
131
|
-
const entry = cliEntry();
|
|
132
|
-
return {
|
|
133
|
-
argv: [process.execPath, entry],
|
|
134
|
-
aviso: entry.endsWith(".ts") ? say("env.notBuilt", { entry }) : void 0
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
138
|
// src/on-boot.ts
|
|
139
139
|
import { win32 } from "path";
|
|
140
140
|
var LAUNCHD_LABEL = "dev.panoma.web";
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
entryCommand,
|
|
4
4
|
helpText,
|
|
5
5
|
todayCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RX4GQLU2.js";
|
|
7
7
|
import {
|
|
8
8
|
openCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MU4KCYKO.js";
|
|
10
10
|
import {
|
|
11
11
|
catalogFetch,
|
|
12
12
|
cliEntry,
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
panomaCommand,
|
|
19
19
|
unreachable,
|
|
20
20
|
upCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HFFASR7D.js";
|
|
22
22
|
import {
|
|
23
23
|
plural,
|
|
24
24
|
riskText,
|
|
25
25
|
say
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FN63LYZH.js";
|
|
27
27
|
import {
|
|
28
28
|
HOOKS_BRAND,
|
|
29
29
|
MCP_FILE_MODE,
|
|
@@ -1025,11 +1025,11 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1025
1025
|
if (command === void 0) return conAviso(await entryCommand(parsed.api));
|
|
1026
1026
|
if (command === "today") return todayCommand(parsed.api);
|
|
1027
1027
|
if (command === "next") {
|
|
1028
|
-
const { nextCommand } = await import("./next-command-
|
|
1028
|
+
const { nextCommand } = await import("./next-command-3J7F27RT.js");
|
|
1029
1029
|
return nextCommand(parsed.api, parsed.positionals.slice(1));
|
|
1030
1030
|
}
|
|
1031
1031
|
if (command === "north") {
|
|
1032
|
-
const { northCommand } = await import("./north-command-
|
|
1032
|
+
const { northCommand } = await import("./north-command-VZKU3BBM.js");
|
|
1033
1033
|
return northCommand(parsed);
|
|
1034
1034
|
}
|
|
1035
1035
|
if (command === "open") {
|
|
@@ -1049,7 +1049,7 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1049
1049
|
`));
|
|
1050
1050
|
return 1;
|
|
1051
1051
|
}
|
|
1052
|
-
const { checkCommand } = await import("./check-command-
|
|
1052
|
+
const { checkCommand } = await import("./check-command-W52TXOPN.js");
|
|
1053
1053
|
return checkCommand(parsed.api, query);
|
|
1054
1054
|
}
|
|
1055
1055
|
let escanear = command === "scan";
|
|
@@ -1077,14 +1077,14 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1077
1077
|
);
|
|
1078
1078
|
}
|
|
1079
1079
|
if (command === "ai") {
|
|
1080
|
-
const { aiCommand } = await import("./ai-command-
|
|
1080
|
+
const { aiCommand } = await import("./ai-command-ICITNELE.js");
|
|
1081
1081
|
return aiCommand(parsed);
|
|
1082
1082
|
}
|
|
1083
1083
|
if (command === "md") {
|
|
1084
1084
|
const target2 = resolve3(
|
|
1085
1085
|
expandTilde(parsed.positionals[2] ?? ".")
|
|
1086
1086
|
);
|
|
1087
|
-
const { mdCommand } = await import("./md-command-
|
|
1087
|
+
const { mdCommand } = await import("./md-command-PBOLZO5S.js");
|
|
1088
1088
|
return mdCommand(parsed.positionals[1], target2, parsed.api);
|
|
1089
1089
|
}
|
|
1090
1090
|
if (command === "disk") return reportDisk(parsed.api);
|
|
@@ -1135,12 +1135,12 @@ ${pc3.dim(say("error.seeHelp"))}
|
|
|
1135
1135
|
return createAgentKey(parsed.api, name, parsed.install);
|
|
1136
1136
|
}
|
|
1137
1137
|
if (command === "twin") {
|
|
1138
|
-
const { twinCommand } = await import("./twin-command-
|
|
1138
|
+
const { twinCommand } = await import("./twin-command-OA2R6OUW.js");
|
|
1139
1139
|
return twinCommand(parsed);
|
|
1140
1140
|
}
|
|
1141
1141
|
if (command === "review") {
|
|
1142
1142
|
const target2 = resolve3(expandTilde(parsed.positionals[1] ?? "."));
|
|
1143
|
-
const { reviewCommand } = await import("./review-command-
|
|
1143
|
+
const { reviewCommand } = await import("./review-command-PWW276HI.js");
|
|
1144
1144
|
return reviewCommand(target2);
|
|
1145
1145
|
}
|
|
1146
1146
|
if (!escanear) {
|
|
@@ -1609,6 +1609,21 @@ async function enrichCatalog(api, force) {
|
|
|
1609
1609
|
return 0;
|
|
1610
1610
|
}
|
|
1611
1611
|
async function createAgentKey(api, name, install) {
|
|
1612
|
+
if (install) {
|
|
1613
|
+
const { efimero } = await panomaCommand();
|
|
1614
|
+
if (efimero) {
|
|
1615
|
+
process.stderr.write(
|
|
1616
|
+
`
|
|
1617
|
+
${pc3.yellow(say("npx.mcpRefused"))}
|
|
1618
|
+
${pc3.dim(say("npx.mcpRefusedWhy"))}
|
|
1619
|
+
|
|
1620
|
+
${pc3.cyan(say("npx.mcpRefusedHow"))}
|
|
1621
|
+
|
|
1622
|
+
`
|
|
1623
|
+
);
|
|
1624
|
+
return 1;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1612
1627
|
let response;
|
|
1613
1628
|
try {
|
|
1614
1629
|
response = await catalogFetch(new URL("/api/agent/keys", api), {
|