reflex-agent 0.13.4 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +102 -95
- package/.next/app-path-routes-manifest.json +8 -7
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/agents/[agentId]/page.js +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route.js +53 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/install-archive/route.js +1 -0
- package/.next/server/app/api/utilities/install-archive/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/install-archive/route_client-reference-manifest.js +1 -0
- package/.next/server/app/audit/page.js +2 -2
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page.js +2 -2
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/memory/page.js +1 -1
- package/.next/server/app/roots/[id]/memory/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/page.js +6 -6
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/new/page.js +4 -4
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +5 -5
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/file/page.js +2 -2
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/page.js +2 -2
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/page.js +2 -2
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +8 -7
- package/.next/server/chunks/1105.js +1 -1
- package/.next/server/chunks/1358.js +1 -1
- package/.next/server/chunks/285.js +9 -6
- package/.next/server/chunks/3091.js +1 -0
- package/.next/server/chunks/3332.js +1 -1
- package/.next/server/chunks/3795.js +3 -0
- package/.next/server/chunks/{2688.js → 4299.js} +2 -2
- package/.next/server/chunks/4812.js +1 -1
- package/.next/server/chunks/4925.js +1 -1
- package/.next/server/chunks/{8425.js → 6648.js} +1 -1
- package/.next/server/chunks/7300.js +56 -4
- package/.next/server/chunks/7358.js +3 -0
- package/.next/server/chunks/9098.js +1 -1
- package/.next/server/chunks/969.js +1 -0
- package/.next/server/chunks/9809.js +1 -1
- package/.next/server/chunks/9861.js +57 -5
- package/.next/server/functions-config-manifest.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/1y4wPze4yO8DprxGKwSXQ/_buildManifest.js +1 -0
- package/.next/static/chunks/{5596-93b53c14a2d5c59a.js → 2608-755e5d9ca79c19dc.js} +1 -1
- package/.next/static/chunks/4108.17cd7704e88bcb32.js +1 -0
- package/.next/static/chunks/{9001-6f38a673a3868871.js → 4442-79daa48fe7845771.js} +1 -1
- package/.next/static/chunks/6226-819ec17660994a7d.js +1 -0
- package/.next/static/chunks/7922-9a16eb68adcc7498.js +1 -0
- package/.next/static/chunks/9624-7dc547ab202a1d82.js +1 -0
- package/.next/static/chunks/app/api/agents/[agentId]/respond/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/images/[rootId]/[file]/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/oauth/callback/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/oauth/start/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/attachments/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/send/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stop/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/dashboard/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/suggestions/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/iframe/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/install-archive/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/layout-5caae9e60f5d6d42.js +1 -0
- package/.next/static/chunks/app/onboarding/page-3bb8ad02f9c88fdf.js +1 -0
- package/.next/static/chunks/app/{page-0c090eba51732036.js → page-6e32890e646e50aa.js} +1 -1
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/{page-292bc4cdceb6ea1d.js → page-ac00a7a8d6a16da8.js} +1 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/{page-5e4f7b893c02c2bd.js → page-14cb4b8a24e40dc7.js} +1 -1
- package/.next/static/chunks/app/roots/[id]/layout-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/roots/[id]/memory/page-7bbe675652b7f9e8.js +1 -0
- package/.next/static/chunks/app/roots/[id]/page-2080ede443a668d2.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-c744450355558209.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/page-8175a0fbbc465472.js +1 -0
- package/.next/static/chunks/app/roots/new/page-3d83b5dfb0a8f869.js +1 -0
- package/.next/static/chunks/app/settings/page-550fab06213d866c.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-c290e46d1beba1ff.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/{page-ea8352712b521f75.js → page-5aaa4731a5ab783d.js} +1 -1
- package/.next/static/chunks/app/utilities/page-0e362fd622574297.js +1 -0
- package/.next/static/chunks/{webpack-a4eadc02863be5eb.js → webpack-e60c7ddfa84db519.js} +1 -1
- package/.next/trace +90 -90
- package/.next/types/app/api/utilities/install-archive/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/lib/reflex/prompts/defaults.js +3 -0
- package/dist/lib/reflex/prompts/defaults.js.map +1 -1
- package/package.json +2 -1
- package/.next/server/chunks/2678.js +0 -3
- package/.next/server/chunks/491.js +0 -1
- package/.next/server/chunks/6238.js +0 -1
- package/.next/static/chunks/3717-339a6fc5e3b929f9.js +0 -1
- package/.next/static/chunks/4108.58294dcccaecb2f1.js +0 -1
- package/.next/static/chunks/4179-847dcd61bef8c59f.js +0 -1
- package/.next/static/chunks/4273-0b053f2035ad088d.js +0 -1
- package/.next/static/chunks/app/api/agents/[agentId]/respond/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/images/[rootId]/[file]/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/oauth/callback/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/oauth/start/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/attachments/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/send/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stop/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/dashboard/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/suggestions/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/iframe/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/layout-5e042e4e97dcea31.js +0 -1
- package/.next/static/chunks/app/onboarding/page-97aa4ad99276380f.js +0 -1
- package/.next/static/chunks/app/roots/[id]/layout-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/roots/[id]/memory/page-b1fd919707f00c99.js +0 -1
- package/.next/static/chunks/app/roots/[id]/page-da97fb20eef9677c.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-932edf8ce73b23bc.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/page-7339062dee577728.js +0 -1
- package/.next/static/chunks/app/roots/new/page-c96a333c1ef53fba.js +0 -1
- package/.next/static/chunks/app/settings/page-75c61dd145bed57e.js +0 -1
- package/.next/static/chunks/app/share/[id]/page-e4b74cf795d4e211.js +0 -1
- package/.next/static/chunks/app/utilities/page-b5514f6c3291e23f.js +0 -1
- package/.next/static/my3C6nd2vY80TaiBNwet5/_buildManifest.js +0 -1
- /package/.next/static/{my3C6nd2vY80TaiBNwet5 → 1y4wPze4yO8DprxGKwSXQ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{3024:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},3747:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},9598:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},15523:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var s=r(4624);r(99356);var i=r(13506);function a(e){let{className:t,type:r,...a}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",className:(0,i.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...a})}},20706:(e,t,r)=>{"use strict";r.d(t,{ManifestPanel:()=>U});var s=r(4624),i=r(99356),a=r(45804);let n=(0,a.A)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var l=r(76974),o=r(3239);let d=(0,a.A)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);var c=r(3747),u=r(56221),h=r(69285),m=r(49411),v=r(28310),x=r(85253),p=r(71651),f=r(7911);let b=(0,f.createServerReference)("70d1c2f0dd4bccdf2ee363f5391b9bd9d3865f2258",f.callServer,void 0,f.findSourceMapURL,"rebuildUtilityAction"),y=(0,f.createServerReference)("705c45defdcfc763350e0e6c804a2fd535fea9c2f5",f.callServer,void 0,f.findSourceMapURL,"checkUpdateAction"),g=(0,f.createServerReference)("400a588ca0b2b376960c3967ea8eb57be0958e121a",f.callServer,void 0,f.findSourceMapURL,"editUtilityAction");var k=r(94151),j=r(43153),w=r(41280),N=r(84784),A=r(46972),S=r(15523),P=r(78825);let R=(0,f.createServerReference)("401166e7b45fd936569f517845c829ea28e241f8ff",f.callServer,void 0,f.findSourceMapURL,"listUtilitySecretsAction"),M=(0,f.createServerReference)("40a23e703427b1c14ba80b9784bdde3d73eb672d85",f.callServer,void 0,f.findSourceMapURL,"setUtilitySecretAction"),C=(0,f.createServerReference)("40e13b992c5195a1492922fef59fc02fb0c1ba36cb",f.callServer,void 0,f.findSourceMapURL,"deleteUtilitySecretAction");function L(e){let{scope:t,id:r,rootId:a,declared:n}=e,l=(0,m.c)("app"),[d,c]=(0,i.useState)(()=>{let e={};for(let t of n)e[t.key]={set:!1,draft:"",reveal:!1};return e}),[h,p]=(0,i.useState)(null),[,f]=(0,i.useTransition)();(0,i.useEffect)(()=>{f(async()=>{let e=await R({scope:t,id:r,...a?{rootId:a}:{}});if(!e.ok)return void u.oR.error(e.error);c(t=>{let r={};for(let a of e.secrets){var s,i;r[a.key]={set:a.set,draft:"",reveal:null!=(i=null==(s=t[a.key])?void 0:s.reveal)&&i}}return r})})},[t,r,a]);let b=async e=>{let s=d[e];if(!s||!s.draft)return void u.oR.error(l("utilities.secrets.enterValue"));p(e);try{let i=await M({scope:t,id:r,...a?{rootId:a}:{},key:e,value:s.draft});if(!i.ok)return void u.oR.error(i.error);u.oR.success(l("utilities.secrets.saved",{key:e})),c(t=>({...t,[e]:{set:!0,draft:"",reveal:!1}}))}finally{p(null)}},y=async e=>{p(e);try{let s=await C({scope:t,id:r,...a?{rootId:a}:{},key:e});if(!s.ok)return void u.oR.error(s.error);u.oR.success(l("utilities.secrets.deleted",{key:e})),c(t=>({...t,[e]:{set:!1,draft:"",reveal:!1}}))}finally{p(null)}};return 0===n.length?null:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(k.A,{className:"h-3 w-3"})," ",l("utilities.secrets.title")]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[l("utilities.secrets.description1"),(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/secrets/"}),l("utilities.secrets.description2")," ",(0,s.jsx)("code",{className:"font-mono",children:"reflex.secrets.get"}),"."]}),(0,s.jsx)("ul",{className:"space-y-3",children:n.map(e=>{var t;let r=null!=(t=d[e.key])?t:{set:!1,draft:"",reveal:!1},i=h===e.key;return(0,s.jsxs)("li",{className:"space-y-1.5",children:[(0,s.jsxs)(P.J,{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono",children:e.key}),r.set?(0,s.jsxs)(v.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(j.A,{className:"h-2.5 w-2.5"})," set"]}):e.required?(0,s.jsx)(v.E,{variant:"destructive",children:l("utilities.secrets.missingRequired")}):(0,s.jsx)(v.E,{variant:"outline",children:l("utilities.secrets.empty")})]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[e.label,e.description?" \xb7 ".concat(e.description):""]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(S.p,{type:r.reveal?"text":"password",value:r.draft,onChange:t=>c(s=>({...s,[e.key]:{...r,draft:t.target.value}})),placeholder:r.set?l("utilities.secrets.placeholderSet"):l("utilities.secrets.placeholderEmpty"),className:"font-mono text-xs flex-1 h-8",disabled:i}),(0,s.jsx)(x.$,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0",onClick:()=>c(t=>({...t,[e.key]:{...r,reveal:!r.reveal}})),title:r.reveal?l("utilities.secrets.hide"):l("utilities.secrets.show"),children:r.reveal?(0,s.jsx)(w.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(N.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(x.$,{type:"button",size:"sm",variant:"default",className:"h-7 text-xs flex-1",onClick:()=>void b(e.key),disabled:i||!r.draft,children:i?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):l("utilities.secrets.save")}),r.set&&(0,s.jsx)(x.$,{type:"button",size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>void y(e.key),disabled:i,children:(0,s.jsx)(A.A,{className:"h-3 w-3"})})]})]},e.key)})})]})}function U(e){var t,r,a,f,k,j,w,N,A;let{scope:S,id:P,rootId:R,manifest:M,dir:C}=e,U=(0,m.c)("app"),[T,E]=(0,i.useTransition)(),[V,I]=(0,i.useTransition)(),[_,$]=(0,i.useTransition)(),q=(0,h.useRouter)(),[O,B]=(0,i.useState)(null),[D,F]=(0,i.useState)(""),H=null==(r=M.source)||null==(t=r.origin)?void 0:t.startsWith("github:");return(0,s.jsxs)("div",{className:"space-y-4 text-xs",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:U("utilities.manifest.sourceTitle")}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(v.E,{variant:"secondary",className:"capitalize",children:null!=(w=null==(a=M.source)?void 0:a.type)?w:"unknown"}),(null==(f=M.source)?void 0:f.origin)&&(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:M.source.origin}),(null==(k=M.source)?void 0:k.fetchedAt)&&(0,s.jsx)("div",{className:"text-muted-foreground",children:new Date(M.source.fetchedAt).toLocaleString()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:U("utilities.manifest.filesTitle")}),(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:C})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(n,{className:"h-3 w-3"})," Permissions"]}),(0,s.jsx)(z,{manifest:M})]}),(null!=(N=null==(j=M.secrets)?void 0:j.length)?N:0)>0&&(0,s.jsx)("div",{className:"pt-2 border-t",children:(0,s.jsx)(L,{scope:S,id:P,...R?{rootId:R}:{},declared:null!=(A=M.secrets)?A:[]})}),M.serverActions.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:U("utilities.manifest.serverActions")}),(0,s.jsx)("ul",{className:"space-y-1",children:M.serverActions.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)(v.E,{variant:"outline",className:"font-mono mr-1",children:e.name}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:["→ ",e.entry]})]},e.name))})]}),(0,s.jsxs)("div",{className:"pt-2 border-t space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"})," ",U("utilities.manifest.editTitle")]}),(0,s.jsx)(p.T,{value:D,onChange:e=>F(e.target.value),placeholder:U("utilities.manifest.editPlaceholder"),className:"text-xs min-h-[80px]",disabled:_}),(0,s.jsxs)(x.$,{type:"button",size:"sm",className:"w-full",onClick:()=>{let e=D.trim();if(!e)return void u.oR.error(U("utilities.manifest.editEmpty"));$(async()=>{let t=await g({scope:S,id:P,...R?{rootId:R}:{},instruction:e});if(!t.ok)return void u.oR.error(t.error);u.oR.success(U("utilities.manifest.topicStarted")),F(""),q.push("/roots/".concat(t.rootId,"/chat/").concat(t.topicId))})},disabled:_||!D.trim(),children:[_?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l.A,{className:"mr-2 h-3.5 w-3.5"}),U("utilities.manifest.editButton")]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t",children:[(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"outline",onClick:()=>E(async()=>{var e;let t=await b(S,P,R);t.ok?(u.oR.success(U("utilities.manifest.bundleRebuilt")),q.refresh()):u.oR.error(null!=(e=t.error)?e:"fail")}),disabled:T,children:[T?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(d,{className:"mr-2 h-3.5 w-3.5"}),U("utilities.manifest.rebuildButton")]}),H&&(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"outline",onClick:()=>I(async()=>{let e=await y(S,P,R);if(!e.ok)return void u.oR.error(e.error);if(e.upToDate)B(null),u.oR.success(U("utilities.manifest.upToDate"));else{var t,r;B(U("utilities.manifest.newShaAvailable",{sha:null!=(r=null==(t=e.latestSha)?void 0:t.slice(0,7))?r:""}))}}),disabled:V,children:[V?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.A,{className:"mr-2 h-3.5 w-3.5"}),U("utilities.manifest.checkUpdates")]}),O&&(0,s.jsxs)("div",{className:"rounded border border-emerald-400 bg-emerald-50 px-2 py-1 text-emerald-900",children:[O,U("utilities.manifest.updateBannerSuffix")]})]})]})}function z(e){var t,r,i,a,n,l,o,d,c,u,h,v,x,p;let{manifest:f}=e,b=(0,m.c)("app"),y=f.permissions,g=[];return((null==(r=y.llm)||null==(t=r.tasks)?void 0:t.length)&&g.push("llm.tasks = [".concat(y.llm.tasks.join(", "),"]")),(null==(i=y.kb)?void 0:i.read)&&g.push("kb.read"),(null==(a=y.kb)?void 0:a.write)&&g.push("kb.write"),(null==(l=y.kb)||null==(n=l.kinds)?void 0:n.length)&&g.push("kb.kinds = [".concat(y.kb.kinds.join(", "),"]")),(null==(o=y.fs)?void 0:o.sandbox)&&g.push("fs (sandboxed in data/)"),(null==(u=y.web)||null==(c=u.fetch)||null==(d=c.domains)?void 0:d.length)&&g.push("web.fetch = [".concat(y.web.fetch.domains.join(", "),"]")),(null==(h=y.web)?void 0:h.search)&&g.push("web.search"),(null==(v=y.audit)?void 0:v.write)&&g.push("audit.write"),(null==(x=y.workers)?void 0:x.enabled)&&g.push("workers (max ".concat(null!=(p=y.workers.maxConcurrent)?p:1,")")),0===g.length)?(0,s.jsx)("p",{className:"text-muted-foreground italic",children:b("utilities.manifest.noPermissions")}):(0,s.jsx)("ul",{className:"space-y-0.5 font-mono",children:g.map(e=>(0,s.jsx)("li",{children:e},e))})}},28310:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var s=r(4624);r(99356);var i=r(60621),a=r(50362),n=r(13506);let l=(0,i.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r="default",asChild:i=!1,...o}=e,d=i?a.bL:"span";return(0,s.jsx)(d,{"data-slot":"badge","data-variant":r,className:(0,n.cn)(l({variant:r}),t),...o})}},30441:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},41280:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},43153:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},46972:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},49833:(e,t,r)=>{"use strict";r.d(t,{UtilityFrame:()=>a});var s=r(4624),i=r(4273);function a(e){let{scope:t,id:r,rootId:a,agentChat:n,utilityName:l}=e;return(0,s.jsx)(i.UtilityIframe,{scope:t,id:r,...a?{rootId:a}:{},...n?{agentChat:!0}:{},...l?{utilityName:l}:{}})}},53931:(e,t,r)=>{Promise.resolve().then(r.bind(r,62084)),Promise.resolve().then(r.bind(r,20706)),Promise.resolve().then(r.bind(r,49833)),Promise.resolve().then(r.bind(r,91074)),Promise.resolve().then(r.bind(r,96253)),Promise.resolve().then(r.bind(r,28050)),Promise.resolve().then(r.bind(r,94904)),Promise.resolve().then(r.bind(r,13270)),Promise.resolve().then(r.bind(r,99730)),Promise.resolve().then(r.bind(r,89146)),Promise.resolve().then(r.bind(r,19078)),Promise.resolve().then(r.bind(r,67854)),Promise.resolve().then(r.bind(r,69050)),Promise.resolve().then(r.bind(r,63739)),Promise.resolve().then(r.bind(r,33976)),Promise.resolve().then(r.bind(r,12537)),Promise.resolve().then(r.bind(r,97485)),Promise.resolve().then(r.bind(r,41923)),Promise.resolve().then(r.bind(r,73868)),Promise.resolve().then(r.bind(r,53511)),Promise.resolve().then(r.bind(r,2018)),Promise.resolve().then(r.bind(r,18487)),Promise.resolve().then(r.bind(r,98346)),Promise.resolve().then(r.bind(r,14884)),Promise.resolve().then(r.bind(r,85314)),Promise.resolve().then(r.bind(r,17280)),Promise.resolve().then(r.bind(r,8855)),Promise.resolve().then(r.bind(r,86631)),Promise.resolve().then(r.bind(r,2604)),Promise.resolve().then(r.bind(r,27237)),Promise.resolve().then(r.bind(r,49455)),Promise.resolve().then(r.bind(r,39211)),Promise.resolve().then(r.bind(r,56360)),Promise.resolve().then(r.t.bind(r,54400,23))},62084:(e,t,r)=>{"use strict";r.d(t,{ShareButton:()=>x});var s=r(4624),i=r(99356),a=r(30441),n=r(43153),l=r(9598),o=r(13561),d=r(3024),c=r(56221),u=r(49411),h=r(7911);let m=(0,h.createServerReference)("40338023fcb3ec9056f1e81a812fa4f269cee69243",h.callServer,void 0,h.findSourceMapURL,"createShareAction");var v=r(91315);function x(e){let t=(0,u.c)("app"),[r,h]=(0,i.useState)(!1),[x,p]=(0,i.useState)(""),[f,b]=(0,i.useTransition)(),[y,g]=(0,i.useState)(null);return r?y?(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-700",children:[(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"font-medium",children:t("share.button.createdTitle")})]}),(0,s.jsx)("a",{href:y.url,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-[11px] text-violet-700 hover:underline break-all",children:y.url}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(y.url).then(()=>c.oR.success(t("share.button.copied"))),className:"inline-flex items-center gap-1 rounded border px-2 py-0.5 hover:bg-accent",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"}),t("share.button.copy")]}),(0,s.jsx)("button",{type:"button",onClick:()=>{g(null),h(!1),p("")},className:"text-muted-foreground hover:text-foreground",children:t("share.button.done")})]})]}):(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 text-violet-600"}),(0,s.jsx)("span",{className:"font-medium",children:t("share.button.newLink")}),(0,s.jsx)("button",{type:"button",onClick:()=>h(!1),className:"ml-auto text-muted-foreground hover:text-foreground",children:(0,s.jsx)(o.A,{className:"h-3 w-3"})})]}),(0,s.jsx)("label",{className:"block text-[10px] text-muted-foreground",children:t("share.button.passwordLabel")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(d.A,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground pointer-events-none"}),(0,s.jsx)("input",{type:"password",value:x,onChange:e=>p(e.target.value),autoFocus:!0,placeholder:t("share.button.passwordPlaceholder"),className:"w-full rounded border bg-background pl-6 pr-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{b(async()=>{var r;let s=await (0,v.N)(),i=await m({kind:e.kind,...e.rootId?{rootId:e.rootId}:{},...e.utilityScope?{utilityScope:e.utilityScope}:{},...e.utilityId?{utilityId:e.utilityId}:{},...e.kbRelPath?{kbRelPath:e.kbRelPath}:{},...e.label?{label:e.label}:{},...x.trim()?{password:x.trim()}:{}});if(!i.ok)return void c.oR.error(i.error);let a=null!=(r=s.status.publicUrl)?r:window.location.origin,n=new URL("/share/".concat(i.share.id),a).toString();g({share:i.share,url:n}),navigator.clipboard.writeText(n).catch(()=>null),c.oR.success(s.status.running?t("share.button.created"):t("share.button.createdNoTunnel"))})},disabled:f,className:"w-full rounded bg-violet-600 text-white px-2 py-1 hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-1",children:f?t("share.button.creating"):t("share.button.create")}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t("share.button.footer")})]}):(0,s.jsxs)("button",{type:"button",onClick:()=>h(!0),className:e.iconOnly?"p-1 rounded hover:bg-accent text-muted-foreground hover:text-violet-700":"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs hover:bg-accent",title:t("share.button.title"),children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5"}),!e.iconOnly&&t("share.button.label")]})}},69285:(e,t,r)=>{"use strict";var s=r(48849);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})},76974:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},78825:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});var s=r(4624);r(99356);var i=r(33976),a=r(13506);function n(e){let{className:t,...r}=e;return(0,s.jsx)(i.Root,{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},84784:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},91074:(e,t,r)=>{"use strict";r.d(t,{Separator:()=>n});var s=r(4624);r(99356);var i=r(44188),a=r(13506);function n(e){let{className:t,orientation:r="horizontal",decorative:n=!0,...l}=e;return(0,s.jsx)(i.b,{"data-slot":"separator",decorative:n,orientation:r,className:(0,a.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}},91315:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var s=r(7911);let i=(0,s.createServerReference)("005bcd722172d298deb64db825d20aa3b6dd70eb78",s.callServer,void 0,s.findSourceMapURL,"getTunnelStatusAction")},94151:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,4273,4933,146,7358],()=>e(e.s=53931)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{3024:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},3747:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},9598:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},15523:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var s=r(4624);r(99356);var i=r(13506);function a(e){let{className:t,type:r,...a}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",className:(0,i.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...a})}},27344:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var s=r(7911);let i=(0,s.createServerReference)("00bf2ed558954da84ef1a017e0c8acd1eff544205f",s.callServer,void 0,s.findSourceMapURL,"getTunnelStatusAction")},28310:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var s=r(4624);r(99356);var i=r(60621),a=r(50362),n=r(13506);let l=(0,i.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r="default",asChild:i=!1,...o}=e,d=i?a.bL:"span";return(0,s.jsx)(d,{"data-slot":"badge","data-variant":r,className:(0,n.cn)(l({variant:r}),t),...o})}},30441:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},41280:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},43153:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},44492:(e,t,r)=>{"use strict";r.d(t,{ManifestPanel:()=>U});var s=r(4624),i=r(99356),a=r(45804);let n=(0,a.A)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var l=r(76974),o=r(3239);let d=(0,a.A)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);var c=r(3747),u=r(56221),h=r(69285),m=r(49411),v=r(28310),x=r(85253),p=r(71651),f=r(7911);let b=(0,f.createServerReference)("70afad63c022ac4b0f7c0f237c0f73d294b98cf41a",f.callServer,void 0,f.findSourceMapURL,"rebuildUtilityAction"),y=(0,f.createServerReference)("70ae47a097b52f6bc7d7ec58360a53cdc8bda33c24",f.callServer,void 0,f.findSourceMapURL,"checkUpdateAction"),g=(0,f.createServerReference)("404dbc531a9a1f27d4a3afaab883a6d30c78fef4a3",f.callServer,void 0,f.findSourceMapURL,"editUtilityAction");var k=r(94151),j=r(43153),w=r(41280),N=r(84784),A=r(46972),S=r(15523),P=r(78825);let R=(0,f.createServerReference)("40dbddc0d998d1901560dd5d46f23cc8242e7d5b27",f.callServer,void 0,f.findSourceMapURL,"listUtilitySecretsAction"),M=(0,f.createServerReference)("40df23283b6908afd400b353fb297955c8ebdf75db",f.callServer,void 0,f.findSourceMapURL,"setUtilitySecretAction"),C=(0,f.createServerReference)("40fc87171996911f25f488243a47b998f7e9cb85c1",f.callServer,void 0,f.findSourceMapURL,"deleteUtilitySecretAction");function L(e){let{scope:t,id:r,rootId:a,declared:n}=e,l=(0,m.c)("app"),[d,c]=(0,i.useState)(()=>{let e={};for(let t of n)e[t.key]={set:!1,draft:"",reveal:!1};return e}),[h,p]=(0,i.useState)(null),[,f]=(0,i.useTransition)();(0,i.useEffect)(()=>{f(async()=>{let e=await R({scope:t,id:r,...a?{rootId:a}:{}});if(!e.ok)return void u.oR.error(e.error);c(t=>{let r={};for(let a of e.secrets){var s,i;r[a.key]={set:a.set,draft:"",reveal:null!=(i=null==(s=t[a.key])?void 0:s.reveal)&&i}}return r})})},[t,r,a]);let b=async e=>{let s=d[e];if(!s||!s.draft)return void u.oR.error(l("utilities.secrets.enterValue"));p(e);try{let i=await M({scope:t,id:r,...a?{rootId:a}:{},key:e,value:s.draft});if(!i.ok)return void u.oR.error(i.error);u.oR.success(l("utilities.secrets.saved",{key:e})),c(t=>({...t,[e]:{set:!0,draft:"",reveal:!1}}))}finally{p(null)}},y=async e=>{p(e);try{let s=await C({scope:t,id:r,...a?{rootId:a}:{},key:e});if(!s.ok)return void u.oR.error(s.error);u.oR.success(l("utilities.secrets.deleted",{key:e})),c(t=>({...t,[e]:{set:!1,draft:"",reveal:!1}}))}finally{p(null)}};return 0===n.length?null:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(k.A,{className:"h-3 w-3"})," ",l("utilities.secrets.title")]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[l("utilities.secrets.description1"),(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/secrets/"}),l("utilities.secrets.description2")," ",(0,s.jsx)("code",{className:"font-mono",children:"reflex.secrets.get"}),"."]}),(0,s.jsx)("ul",{className:"space-y-3",children:n.map(e=>{var t;let r=null!=(t=d[e.key])?t:{set:!1,draft:"",reveal:!1},i=h===e.key;return(0,s.jsxs)("li",{className:"space-y-1.5",children:[(0,s.jsxs)(P.J,{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono",children:e.key}),r.set?(0,s.jsxs)(v.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(j.A,{className:"h-2.5 w-2.5"})," set"]}):e.required?(0,s.jsx)(v.E,{variant:"destructive",children:l("utilities.secrets.missingRequired")}):(0,s.jsx)(v.E,{variant:"outline",children:l("utilities.secrets.empty")})]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[e.label,e.description?" \xb7 ".concat(e.description):""]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(S.p,{type:r.reveal?"text":"password",value:r.draft,onChange:t=>c(s=>({...s,[e.key]:{...r,draft:t.target.value}})),placeholder:r.set?l("utilities.secrets.placeholderSet"):l("utilities.secrets.placeholderEmpty"),className:"font-mono text-xs flex-1 h-8",disabled:i}),(0,s.jsx)(x.$,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0",onClick:()=>c(t=>({...t,[e.key]:{...r,reveal:!r.reveal}})),title:r.reveal?l("utilities.secrets.hide"):l("utilities.secrets.show"),children:r.reveal?(0,s.jsx)(w.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(N.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(x.$,{type:"button",size:"sm",variant:"default",className:"h-7 text-xs flex-1",onClick:()=>void b(e.key),disabled:i||!r.draft,children:i?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):l("utilities.secrets.save")}),r.set&&(0,s.jsx)(x.$,{type:"button",size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>void y(e.key),disabled:i,children:(0,s.jsx)(A.A,{className:"h-3 w-3"})})]})]},e.key)})})]})}function U(e){var t,r,a,f,k,j,w,N,A;let{scope:S,id:P,rootId:R,manifest:M,dir:C}=e,U=(0,m.c)("app"),[T,E]=(0,i.useTransition)(),[V,I]=(0,i.useTransition)(),[_,$]=(0,i.useTransition)(),q=(0,h.useRouter)(),[O,B]=(0,i.useState)(null),[D,F]=(0,i.useState)(""),H=null==(r=M.source)||null==(t=r.origin)?void 0:t.startsWith("github:");return(0,s.jsxs)("div",{className:"space-y-4 text-xs",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:U("utilities.manifest.sourceTitle")}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(v.E,{variant:"secondary",className:"capitalize",children:null!=(w=null==(a=M.source)?void 0:a.type)?w:"unknown"}),(null==(f=M.source)?void 0:f.origin)&&(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:M.source.origin}),(null==(k=M.source)?void 0:k.fetchedAt)&&(0,s.jsx)("div",{className:"text-muted-foreground",children:new Date(M.source.fetchedAt).toLocaleString()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:U("utilities.manifest.filesTitle")}),(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:C})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(n,{className:"h-3 w-3"})," Permissions"]}),(0,s.jsx)(z,{manifest:M})]}),(null!=(N=null==(j=M.secrets)?void 0:j.length)?N:0)>0&&(0,s.jsx)("div",{className:"pt-2 border-t",children:(0,s.jsx)(L,{scope:S,id:P,...R?{rootId:R}:{},declared:null!=(A=M.secrets)?A:[]})}),M.serverActions.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:U("utilities.manifest.serverActions")}),(0,s.jsx)("ul",{className:"space-y-1",children:M.serverActions.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)(v.E,{variant:"outline",className:"font-mono mr-1",children:e.name}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:["→ ",e.entry]})]},e.name))})]}),(0,s.jsxs)("div",{className:"pt-2 border-t space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"})," ",U("utilities.manifest.editTitle")]}),(0,s.jsx)(p.T,{value:D,onChange:e=>F(e.target.value),placeholder:U("utilities.manifest.editPlaceholder"),className:"text-xs min-h-[80px]",disabled:_}),(0,s.jsxs)(x.$,{type:"button",size:"sm",className:"w-full",onClick:()=>{let e=D.trim();if(!e)return void u.oR.error(U("utilities.manifest.editEmpty"));$(async()=>{let t=await g({scope:S,id:P,...R?{rootId:R}:{},instruction:e});if(!t.ok)return void u.oR.error(t.error);u.oR.success(U("utilities.manifest.topicStarted")),F(""),q.push("/roots/".concat(t.rootId,"/chat/").concat(t.topicId))})},disabled:_||!D.trim(),children:[_?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l.A,{className:"mr-2 h-3.5 w-3.5"}),U("utilities.manifest.editButton")]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t",children:[(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"outline",onClick:()=>E(async()=>{var e;let t=await b(S,P,R);t.ok?(u.oR.success(U("utilities.manifest.bundleRebuilt")),q.refresh()):u.oR.error(null!=(e=t.error)?e:"fail")}),disabled:T,children:[T?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(d,{className:"mr-2 h-3.5 w-3.5"}),U("utilities.manifest.rebuildButton")]}),H&&(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"outline",onClick:()=>I(async()=>{let e=await y(S,P,R);if(!e.ok)return void u.oR.error(e.error);if(e.upToDate)B(null),u.oR.success(U("utilities.manifest.upToDate"));else{var t,r;B(U("utilities.manifest.newShaAvailable",{sha:null!=(r=null==(t=e.latestSha)?void 0:t.slice(0,7))?r:""}))}}),disabled:V,children:[V?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.A,{className:"mr-2 h-3.5 w-3.5"}),U("utilities.manifest.checkUpdates")]}),O&&(0,s.jsxs)("div",{className:"rounded border border-emerald-400 bg-emerald-50 px-2 py-1 text-emerald-900",children:[O,U("utilities.manifest.updateBannerSuffix")]})]})]})}function z(e){var t,r,i,a,n,l,o,d,c,u,h,v,x,p;let{manifest:f}=e,b=(0,m.c)("app"),y=f.permissions,g=[];return((null==(r=y.llm)||null==(t=r.tasks)?void 0:t.length)&&g.push("llm.tasks = [".concat(y.llm.tasks.join(", "),"]")),(null==(i=y.kb)?void 0:i.read)&&g.push("kb.read"),(null==(a=y.kb)?void 0:a.write)&&g.push("kb.write"),(null==(l=y.kb)||null==(n=l.kinds)?void 0:n.length)&&g.push("kb.kinds = [".concat(y.kb.kinds.join(", "),"]")),(null==(o=y.fs)?void 0:o.sandbox)&&g.push("fs (sandboxed in data/)"),(null==(u=y.web)||null==(c=u.fetch)||null==(d=c.domains)?void 0:d.length)&&g.push("web.fetch = [".concat(y.web.fetch.domains.join(", "),"]")),(null==(h=y.web)?void 0:h.search)&&g.push("web.search"),(null==(v=y.audit)?void 0:v.write)&&g.push("audit.write"),(null==(x=y.workers)?void 0:x.enabled)&&g.push("workers (max ".concat(null!=(p=y.workers.maxConcurrent)?p:1,")")),0===g.length)?(0,s.jsx)("p",{className:"text-muted-foreground italic",children:b("utilities.manifest.noPermissions")}):(0,s.jsx)("ul",{className:"space-y-0.5 font-mono",children:g.map(e=>(0,s.jsx)("li",{children:e},e))})}},46972:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},49833:(e,t,r)=>{"use strict";r.d(t,{UtilityFrame:()=>a});var s=r(4624),i=r(79624);function a(e){let{scope:t,id:r,rootId:a,agentChat:n,utilityName:l}=e;return(0,s.jsx)(i.UtilityIframe,{scope:t,id:r,...a?{rootId:a}:{},...n?{agentChat:!0}:{},...l?{utilityName:l}:{}})}},53931:(e,t,r)=>{Promise.resolve().then(r.bind(r,86049)),Promise.resolve().then(r.bind(r,44492)),Promise.resolve().then(r.bind(r,49833)),Promise.resolve().then(r.bind(r,91074)),Promise.resolve().then(r.bind(r,96253)),Promise.resolve().then(r.bind(r,28050)),Promise.resolve().then(r.bind(r,94904)),Promise.resolve().then(r.bind(r,13270)),Promise.resolve().then(r.bind(r,99730)),Promise.resolve().then(r.bind(r,89146)),Promise.resolve().then(r.bind(r,19078)),Promise.resolve().then(r.bind(r,67854)),Promise.resolve().then(r.bind(r,69050)),Promise.resolve().then(r.bind(r,63739)),Promise.resolve().then(r.bind(r,33976)),Promise.resolve().then(r.bind(r,12537)),Promise.resolve().then(r.bind(r,97485)),Promise.resolve().then(r.bind(r,41923)),Promise.resolve().then(r.bind(r,73868)),Promise.resolve().then(r.bind(r,53511)),Promise.resolve().then(r.bind(r,2018)),Promise.resolve().then(r.bind(r,18487)),Promise.resolve().then(r.bind(r,98346)),Promise.resolve().then(r.bind(r,14884)),Promise.resolve().then(r.bind(r,85314)),Promise.resolve().then(r.bind(r,17280)),Promise.resolve().then(r.bind(r,8855)),Promise.resolve().then(r.bind(r,86631)),Promise.resolve().then(r.bind(r,2604)),Promise.resolve().then(r.bind(r,27237)),Promise.resolve().then(r.bind(r,49455)),Promise.resolve().then(r.bind(r,39211)),Promise.resolve().then(r.bind(r,56360)),Promise.resolve().then(r.t.bind(r,54400,23))},69285:(e,t,r)=>{"use strict";var s=r(48849);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})},76974:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},78825:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});var s=r(4624);r(99356);var i=r(33976),a=r(13506);function n(e){let{className:t,...r}=e;return(0,s.jsx)(i.Root,{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},84784:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},86049:(e,t,r)=>{"use strict";r.d(t,{ShareButton:()=>x});var s=r(4624),i=r(99356),a=r(30441),n=r(43153),l=r(9598),o=r(13561),d=r(3024),c=r(56221),u=r(49411),h=r(7911);let m=(0,h.createServerReference)("40e4d6691f4a6b81fe3319ae635d5d56fd16ed6b66",h.callServer,void 0,h.findSourceMapURL,"createShareAction");var v=r(27344);function x(e){let t=(0,u.c)("app"),[r,h]=(0,i.useState)(!1),[x,p]=(0,i.useState)(""),[f,b]=(0,i.useTransition)(),[y,g]=(0,i.useState)(null);return r?y?(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-700",children:[(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"font-medium",children:t("share.button.createdTitle")})]}),(0,s.jsx)("a",{href:y.url,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-[11px] text-violet-700 hover:underline break-all",children:y.url}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(y.url).then(()=>c.oR.success(t("share.button.copied"))),className:"inline-flex items-center gap-1 rounded border px-2 py-0.5 hover:bg-accent",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"}),t("share.button.copy")]}),(0,s.jsx)("button",{type:"button",onClick:()=>{g(null),h(!1),p("")},className:"text-muted-foreground hover:text-foreground",children:t("share.button.done")})]})]}):(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 text-violet-600"}),(0,s.jsx)("span",{className:"font-medium",children:t("share.button.newLink")}),(0,s.jsx)("button",{type:"button",onClick:()=>h(!1),className:"ml-auto text-muted-foreground hover:text-foreground",children:(0,s.jsx)(o.A,{className:"h-3 w-3"})})]}),(0,s.jsx)("label",{className:"block text-[10px] text-muted-foreground",children:t("share.button.passwordLabel")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(d.A,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground pointer-events-none"}),(0,s.jsx)("input",{type:"password",value:x,onChange:e=>p(e.target.value),autoFocus:!0,placeholder:t("share.button.passwordPlaceholder"),className:"w-full rounded border bg-background pl-6 pr-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{b(async()=>{var r;let s=await (0,v.N)(),i=await m({kind:e.kind,...e.rootId?{rootId:e.rootId}:{},...e.utilityScope?{utilityScope:e.utilityScope}:{},...e.utilityId?{utilityId:e.utilityId}:{},...e.kbRelPath?{kbRelPath:e.kbRelPath}:{},...e.label?{label:e.label}:{},...x.trim()?{password:x.trim()}:{}});if(!i.ok)return void c.oR.error(i.error);let a=null!=(r=s.status.publicUrl)?r:window.location.origin,n=new URL("/share/".concat(i.share.id),a).toString();g({share:i.share,url:n}),navigator.clipboard.writeText(n).catch(()=>null),c.oR.success(s.status.running?t("share.button.created"):t("share.button.createdNoTunnel"))})},disabled:f,className:"w-full rounded bg-violet-600 text-white px-2 py-1 hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-1",children:f?t("share.button.creating"):t("share.button.create")}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t("share.button.footer")})]}):(0,s.jsxs)("button",{type:"button",onClick:()=>h(!0),className:e.iconOnly?"p-1 rounded hover:bg-accent text-muted-foreground hover:text-violet-700":"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs hover:bg-accent",title:t("share.button.title"),children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5"}),!e.iconOnly&&t("share.button.label")]})}},91074:(e,t,r)=>{"use strict";r.d(t,{Separator:()=>n});var s=r(4624);r(99356);var i=r(44188),a=r(13506);function n(e){let{className:t,orientation:r="horizontal",decorative:n=!0,...l}=e;return(0,s.jsx)(i.b,{"data-slot":"separator",decorative:n,orientation:r,className:(0,a.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}},94151:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,9624,4933,146,7358],()=>e(e.s=53931)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8997],{3239:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},4959:(e,t,s)=>{"use strict";s.d(t,{BT:()=>o,Wu:()=>d,ZB:()=>n,Zp:()=>i,aR:()=>l,wL:()=>c});var r=s(4624);s(99356);var a=s(13506);function i(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...s})}function l(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...s})}function n(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",t),...s})}function o(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",t),...s})}function d(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",t),...s})}function c(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center px-6 [.border-t]:pt-6",t),...s})}},8096:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},9598:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},13506:(e,t,s)=>{"use strict";s.d(t,{cn:()=>i});var r=s(47989),a=s(55701);function i(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.QP)((0,r.$)(t))}},13561:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},13900:(e,t,s)=>{"use strict";s.d(t,{InstallFromMcpButton:()=>y});var r=s(4624),a=s(99356),i=s(69285),l=s(35687),n=s(13561),o=s(3239),d=s(56221),c=s(49411),u=s(28310),h=s(85253),m=s(4959),x=s(15523),v=s(78825),p=s(71651),g=s(22841),b=s(7911);let f=(0,b.createServerReference)("4089d88f9dbbcc2bed0e9c90cb928532014cc1346f",b.callServer,void 0,b.findSourceMapURL,"mcpPreviewAction"),j=(0,b.createServerReference)("4070dcf7516ffb403e3c9f4d281e3a5cbf0a85081c",b.callServer,void 0,b.findSourceMapURL,"mcpInstallAction");function y(){var e;let t=(0,c.c)("app"),[s,b]=(0,a.useState)(!1),[y,N]=(0,a.useState)("stdio"),[w,k]=(0,a.useState)(""),[A,S]=(0,a.useState)(""),[C,z]=(0,a.useState)(""),[P,R]=(0,a.useState)(""),[M,T]=(0,a.useState)(""),[V,B]=(0,a.useState)(""),[F,O]=(0,a.useState)(""),[L,_]=(0,a.useState)("global"),[J,$]=(0,a.useState)(null),[I,U]=(0,a.useTransition)(),[E,q]=(0,a.useTransition)(),H=(0,i.useRouter)(),Z=()=>{if("stdio"===y){if(!w.trim())return{ok:!1,error:"command required"};try{let e=C.trim()?JSON.parse(C):{};return{ok:!0,config:{transport:"stdio",command:w.trim(),args:A.trim()?A.trim().split(/\s+/).filter(Boolean):[],env:e}}}catch(e){return{ok:!1,error:"env must be JSON object"}}}if(!P.trim())return{ok:!1,error:"URL required"};try{let e=M.trim()?JSON.parse(M):{};return{ok:!0,config:{transport:y,url:P.trim(),headers:e}}}catch(e){return{ok:!1,error:"headers must be JSON object"}}},D=()=>{k(""),S(""),z(""),R(""),T(""),B(""),O(""),$(null)};return s?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/30 p-6",children:(0,r.jsxs)(m.Zp,{className:"w-full max-w-2xl",children:[(0,r.jsxs)(m.aR,{className:"flex flex-row items-start justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(l.A,{className:"h-5 w-5"}),"MCP server → Reflex utility"]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:t("utilities.mcp.subtitle")})]}),(0,r.jsx)(h.$,{variant:"ghost",size:"icon",onClick:()=>{b(!1),D()},children:(0,r.jsx)(n.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)(m.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Transport"}),(0,r.jsxs)(g.l6,{value:y,onValueChange:e=>N(e),children:[(0,r.jsx)(g.bq,{className:"w-48",children:(0,r.jsx)(g.yv,{})}),(0,r.jsxs)(g.gC,{children:[(0,r.jsx)(g.eb,{value:"stdio",children:"stdio (subprocess)"}),(0,r.jsx)(g.eb,{value:"http",children:"HTTP (Streamable)"}),(0,r.jsx)(g.eb,{value:"sse",children:"SSE (legacy)"})]})]})]}),"stdio"===y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Command"}),(0,r.jsx)(x.p,{value:w,onChange:e=>k(e.target.value),placeholder:"npx"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Args (space-separated)"}),(0,r.jsx)(x.p,{value:A,onChange:e=>S(e.target.value),placeholder:"-y @modelcontextprotocol/server-everything"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Env (JSON, optional)"}),(0,r.jsx)(p.T,{value:C,onChange:e=>z(e.target.value),placeholder:'{"FOO": "bar"}',className:"font-mono text-xs"})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"URL"}),(0,r.jsx)(x.p,{value:P,onChange:e=>R(e.target.value),placeholder:"https://example.com/mcp"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Headers (JSON, optional)"}),(0,r.jsx)(p.T,{value:M,onChange:e=>T(e.target.value),placeholder:'{"Authorization": "Bearer ..."}',className:"font-mono text-xs"})]})]}),(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(h.$,{onClick:()=>{let e=Z();if(!e.ok)return void d.oR.error(e.error);$(null),U(async()=>{var t,s;let r=await f(e.config);if(!r.ok)return void d.oR.error("Connect failed: "+r.error);$({...r.serverName?{serverName:r.serverName}:{},...r.serverVersion?{serverVersion:r.serverVersion}:{},tools:r.tools}),V||B((null!=(t=r.serverName)?t:"mcp-server").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||"mcp-server"),F||O(null!=(s=r.serverName)?s:"MCP server")})},disabled:I,children:I?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{className:"h-4 w-4 animate-spin mr-2"}),"Connecting…"]}):"Connect & list tools"})}),J&&(0,r.jsxs)("div",{className:"space-y-3 border-t pt-4",children:[(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"font-medium",children:"Server:"})," ",null!=(e=J.serverName)?e:"(anonymous)",J.serverVersion?" v".concat(J.serverVersion):"",(0,r.jsxs)(u.E,{variant:"outline",className:"ml-2",children:[J.tools.length," tools"]})]}),(0,r.jsx)("div",{className:"max-h-40 overflow-y-auto rounded border bg-slate-50 p-2 text-xs",children:0===J.tools.length?(0,r.jsx)("em",{className:"text-slate-500",children:"No tools advertised."}):(0,r.jsx)("ul",{className:"space-y-1",children:J.tools.map(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:"font-mono",children:e.name}),e.description&&(0,r.jsxs)("span",{className:"text-slate-500",children:[" — ",e.description]})]},e.name))})}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Utility id (kebab-case)"}),(0,r.jsx)(x.p,{value:V,onChange:e=>B(e.target.value),placeholder:"my-mcp-server",className:"font-mono"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Display name"}),(0,r.jsx)(x.p,{value:F,onChange:e=>O(e.target.value),placeholder:"My MCP Server"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Scope"}),(0,r.jsxs)(g.l6,{value:L,onValueChange:e=>_(e),children:[(0,r.jsx)(g.bq,{className:"w-48",children:(0,r.jsx)(g.yv,{})}),(0,r.jsxs)(g.gC,{children:[(0,r.jsx)(g.eb,{value:"global",children:"global (~/.reflex)"}),(0,r.jsx)(g.eb,{value:"project",children:"project"})]})]})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(h.$,{variant:"ghost",onClick:()=>{b(!1),D()},children:t("utilities.mcp.cancel")}),(0,r.jsx)(h.$,{onClick:()=>{let e=Z();return e.ok?J?V.trim()&&F.trim()?void q(async()=>{let t=await j({scope:L,id:V.trim(),name:F.trim(),config:e.config});if(!t.ok)return void d.oR.error(t.error);d.oR.success("installed ".concat(t.id)),b(!1),D(),H.refresh(),H.push("/utilities/".concat(t.scope,"/").concat(t.id))}):void d.oR.error("id and name required"):void d.oR.error("preview first"):void d.oR.error(e.error)},disabled:E,children:E?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{className:"h-4 w-4 animate-spin mr-2"}),"Installing…"]}):"Install"})]})]})]})]})}):(0,r.jsxs)(h.$,{onClick:()=>b(!0),variant:"outline",className:"gap-2",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),"From MCP"]})}},15523:(e,t,s)=>{"use strict";s.d(t,{p:()=>i});var r=s(4624);s(99356);var a=s(13506);function i(e){let{className:t,type:s,...i}=e;return(0,r.jsx)("input",{type:s,"data-slot":"input",className:(0,a.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...i})}},16256:(e,t,s)=>{"use strict";s.d(t,{B:()=>a});var r=s(7911);let a=(0,r.createServerReference)("00bfd42b1d960268fe98c533ae16efbd2a1602bb1b",r.callServer,void 0,r.findSourceMapURL,"listCuratedAction")},22841:(e,t,s)=>{"use strict";s.d(t,{bq:()=>u,eb:()=>m,gC:()=>h,l6:()=>d,yv:()=>c});var r=s(4624);s(99356);var a=s(69709),i=s(43153),l=s(59728),n=s(85314),o=s(13506);function d(e){let{...t}=e;return(0,r.jsx)(n.Root,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,r.jsx)(n.Value,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:s="default",children:i,...l}=e;return(0,r.jsxs)(n.Trigger,{"data-slot":"select-trigger","data-size":s,className:(0,o.cn)("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...l,children:[i,(0,r.jsx)(n.Icon,{asChild:!0,children:(0,r.jsx)(a.A,{className:"size-4 opacity-50"})})]})}function h(e){let{className:t,children:s,position:a="item-aligned",align:i="center",...l}=e;return(0,r.jsx)(n.Portal,{children:(0,r.jsxs)(n.Content,{"data-slot":"select-content",className:(0,o.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,align:i,...l,children:[(0,r.jsx)(x,{}),(0,r.jsx)(n.Viewport,{className:(0,o.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,r.jsx)(v,{})]})})}function m(e){let{className:t,children:s,...a}=e;return(0,r.jsxs)(n.Item,{"data-slot":"select-item",className:(0,o.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[(0,r.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(n.ItemIndicator,{children:(0,r.jsx)(i.A,{className:"size-4"})})}),(0,r.jsx)(n.ItemText,{children:s})]})}function x(e){let{className:t,...s}=e;return(0,r.jsx)(n.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,r.jsx)(l.A,{className:"size-4"})})}function v(e){let{className:t,...s}=e;return(0,r.jsx)(n.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,r.jsx)(a.A,{className:"size-4"})})}},23119:(e,t,s)=>{"use strict";s.d(t,{InstallViaAgentButton:()=>p});var r=s(4624),a=s(99356),i=s(50988),l=s(13561),n=s(43153),o=s(9598),d=s(56221),c=s(49411),u=s(85253),h=s(4959),m=s(15523),x=s(78825),v=s(71651);function p(){let e=(0,c.c)("app"),[t,s]=(0,a.useState)(!1),[p,g]=(0,a.useState)(""),[b,f]=(0,a.useState)(!1),j=e("utilities.viaAgent.promptBody",{url:p.trim()||"<github URL here>"}),y=async()=>{await navigator.clipboard.writeText(j),f(!0),d.oR.success(e("utilities.viaAgent.promptCopied")),setTimeout(()=>f(!1),1500)};return t?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/30 p-6",children:(0,r.jsxs)(h.Zp,{className:"w-full max-w-2xl",children:[(0,r.jsxs)(h.aR,{className:"flex flex-row items-start justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(h.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(i.A,{className:"h-5 w-5"}),e("utilities.viaAgent.cardTitle")]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e("utilities.viaAgent.cardSubtitle")})]}),(0,r.jsx)(u.$,{variant:"ghost",size:"icon",onClick:()=>s(!1),children:(0,r.jsx)(l.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)(h.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(x.J,{children:"GitHub URL"}),(0,r.jsx)(m.p,{value:p,onChange:e=>g(e.target.value),placeholder:"https://github.com/owner/repo"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(x.J,{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{children:e("utilities.viaAgent.promptLabel")}),(0,r.jsxs)(u.$,{size:"sm",variant:"ghost",onClick:y,className:"gap-1",children:[b?(0,r.jsx)(n.A,{className:"h-3 w-3"}):(0,r.jsx)(o.A,{className:"h-3 w-3"}),b?e("utilities.viaAgent.copied"):e("utilities.viaAgent.copy")]})]}),(0,r.jsx)(v.T,{value:j,readOnly:!0,className:"font-mono text-xs h-64"})]}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e("utilities.viaAgent.footer1"),(0,r.jsx)("code",{className:"font-mono mx-1",children:"<<reflex:utility>>"}),e("utilities.viaAgent.footer2")]})]})]})}):(0,r.jsxs)(u.$,{onClick:()=>s(!0),variant:"outline",className:"gap-2",children:[(0,r.jsx)(i.A,{className:"h-4 w-4"}),e("utilities.viaAgent.button")]})}},28310:(e,t,s)=>{"use strict";s.d(t,{E:()=>o});var r=s(4624);s(99356);var a=s(60621),i=s(50362),l=s(13506);let n=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:s="default",asChild:a=!1,...o}=e,d=a?i.bL:"span";return(0,r.jsx)(d,{"data-slot":"badge","data-variant":s,className:(0,l.cn)(n({variant:s}),t),...o})}},35687:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]])},36998:(e,t,s)=>{"use strict";s.d(t,{InstallFromArchiveButton:()=>c});var r=s(4624),a=s(99356),i=s(69285),l=s(3239);let n=(0,s(45804).A)("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);var o=s(56221),d=s(85253);function c(){let e=(0,a.useRef)(null),[t,s]=(0,a.useTransition)(),[,c]=(0,a.useState)(0),u=(0,i.useRouter)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{ref:e,type:"file",accept:".zip,application/zip",className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&s(async()=>{try{let t=new FormData;t.append("file",r),t.append("scope","global");let s=await fetch("/api/utilities/install-archive",{method:"POST",body:t}),a=await s.json().catch(()=>({}));if(!s.ok||!a.ok){var e;o.oR.error(null!=(e=a.error)?e:"HTTP ".concat(s.status));return}o.oR.success("Installed: ".concat(a.id)),u.refresh()}catch(e){o.oR.error(e instanceof Error?e.message:String(e))}finally{c(e=>e+1)}}),e.target.value=""}}),(0,r.jsxs)(d.$,{variant:"outline",disabled:t,onClick:()=>{var t;return null==(t=e.current)?void 0:t.click()},children:[t?(0,r.jsx)(l.A,{className:"mr-2 h-4 w-4 animate-spin"}):(0,r.jsx)(n,{className:"mr-2 h-4 w-4"}),"Install from zip"]})]})}},43153:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},46972:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},48572:(e,t,s)=>{"use strict";s.d(t,{RemoveUtilityButton:()=>h});var r=s(4624),a=s(99356),i=s(69285),l=s(3239),n=s(46972),o=s(56221),d=s(49411),c=s(85253),u=s(59564);function h(e){let{scope:t,id:s,name:h,rootId:m}=e,x=(0,d.c)("app"),[v,p]=(0,a.useTransition)(),g=(0,i.useRouter)();return(0,r.jsx)(c.$,{type:"button",size:"sm",variant:"ghost",disabled:v,onClick:()=>{confirm(x("utilities.removeConfirm",{name:h}))&&p(async()=>{var e;let r=await (0,u.j)(t,s,m);r.ok?(o.oR.success(x("utilities.removed")),g.refresh()):o.oR.error(null!=(e=r.error)?e:x("utilities.removeFailed"))})},children:v?(0,r.jsx)(l.A,{className:"h-4 w-4 animate-spin"}):(0,r.jsx)(n.A,{className:"h-4 w-4 text-muted-foreground"})})}},50988:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},57751:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},58297:(e,t,s)=>{Promise.resolve().then(s.bind(s,59487)),Promise.resolve().then(s.bind(s,36998)),Promise.resolve().then(s.bind(s,86570)),Promise.resolve().then(s.bind(s,13900)),Promise.resolve().then(s.bind(s,23119)),Promise.resolve().then(s.bind(s,48572)),Promise.resolve().then(s.bind(s,91074)),Promise.resolve().then(s.bind(s,96253)),Promise.resolve().then(s.bind(s,28050)),Promise.resolve().then(s.bind(s,94904)),Promise.resolve().then(s.bind(s,13270)),Promise.resolve().then(s.bind(s,99730)),Promise.resolve().then(s.bind(s,89146)),Promise.resolve().then(s.bind(s,19078)),Promise.resolve().then(s.bind(s,67854)),Promise.resolve().then(s.bind(s,69050)),Promise.resolve().then(s.bind(s,63739)),Promise.resolve().then(s.bind(s,33976)),Promise.resolve().then(s.bind(s,12537)),Promise.resolve().then(s.bind(s,97485)),Promise.resolve().then(s.bind(s,41923)),Promise.resolve().then(s.bind(s,73868)),Promise.resolve().then(s.bind(s,53511)),Promise.resolve().then(s.bind(s,2018)),Promise.resolve().then(s.bind(s,18487)),Promise.resolve().then(s.bind(s,98346)),Promise.resolve().then(s.bind(s,14884)),Promise.resolve().then(s.bind(s,85314)),Promise.resolve().then(s.bind(s,17280)),Promise.resolve().then(s.bind(s,8855)),Promise.resolve().then(s.bind(s,86631)),Promise.resolve().then(s.bind(s,2604)),Promise.resolve().then(s.bind(s,27237)),Promise.resolve().then(s.bind(s,49455)),Promise.resolve().then(s.bind(s,39211)),Promise.resolve().then(s.bind(s,56360)),Promise.resolve().then(s.t.bind(s,54400,23))},59487:(e,t,s)=>{"use strict";s.d(t,{CuratedGallery:()=>b});var r=s(4624),a=s(99356),i=s(69285),l=s(3239),n=s(8096),o=s(43153),d=s(69709),c=s(57751),u=s(56221),h=s(49411),m=s(4959),x=s(28310),v=s(16256),p=s(93783);let g={finance:"utilities.curated.catFinance",health:"utilities.curated.catHealth",productivity:"utilities.curated.catProductivity",travel:"utilities.curated.catTravel",study:"utilities.curated.catStudy",creative:"utilities.curated.catCreative",other:"utilities.curated.catOther"};function b(e){let{installedIds:t,spaces:s}=e,b=(0,i.useRouter)(),f=(0,h.c)("app"),[j,y]=(0,a.useState)([]),[N,w]=(0,a.useState)(!0),[k,A]=(0,a.useState)(null),[S,C]=(0,a.useState)("all"),[z,P]=(0,a.useTransition)(),[R,M]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await (0,v.B)();e||y(t.items)}catch(t){e||y([])}finally{e||w(!1)}})(),()=>{e=!0}},[]);let T=(0,a.useMemo)(()=>{let e=new Set;return j.forEach(t=>e.add(t.category)),["all",...Array.from(e).sort()]},[j]),V="all"===S?j:j.filter(e=>e.category===S),B=(e,t)=>{A(e.id),P(async()=>{var r,a;let i=null!=(a=e.suggestedScope)?a:"global",l=await (0,p.g)({github:e.github,scope:i,..."project"===i&&t?{rootId:t}:{}});if(A(null),M(null),!l.ok)return void u.oR.error(l.error);let n=t?null==(r=s.find(e=>e.id===t))?void 0:r.label:void 0;u.oR.success(n?f("utilities.curated.installedToastIn",{name:e.name,space:n}):f("utilities.curated.installedToast",{name:e.name})),b.refresh()})};return N?(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,r.jsx)(l.A,{className:"h-3 w-3 animate-spin"}),f("utilities.curated.loading")]}):0===j.length?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:f("utilities.curated.empty")}):(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)(n.A,{className:"h-3 w-3 text-violet-600"}),(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground mr-2",children:f("utilities.curated.categoryLabel")}),T.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>C(e),className:"rounded-full px-2 py-0.5 text-[11px] "+(S===e?"bg-violet-600 text-white":"border bg-card hover:bg-accent"),children:"all"===e?f("utilities.curated.categoryAll"):g[e]?f(g[e]):e},e))]}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:V.map(e=>{let a=t.has(e.id),i=k===e.id&&z;return(0,r.jsx)(m.Zp,{className:"group",children:(0,r.jsxs)(m.Wu,{className:"pt-4 pb-4 space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"text-2xl leading-none",children:e.emoji}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"font-medium truncate",children:e.name}),(0,r.jsxs)("div",{className:"text-[10px] text-muted-foreground font-mono truncate",children:[e.author?"".concat(e.author,"/"):"",e.id]})]}),(0,r.jsx)(x.E,{variant:"outline",className:"text-[10px]",children:g[e.category]?f(g[e.category]):e.category})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.description}),(0,r.jsxs)("div",{className:"pt-1",children:[a?(0,r.jsxs)("button",{type:"button",disabled:!0,className:"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs text-emerald-700 cursor-default",children:[(0,r.jsx)(o.A,{className:"h-3 w-3"}),f("utilities.curated.installed")]}):(0,r.jsxs)("button",{type:"button",onClick:()=>{var t;return"global"===(null!=(t=e.suggestedScope)?t:"global")?void B(e):0===s.length?void u.oR.error(f("utilities.curated.needSpace")):1===s.length?void B(e,s[0].id):void M(t=>t===e.id?null:e.id)},disabled:i||z,className:"inline-flex items-center gap-1 rounded bg-violet-600 px-2 py-1 text-xs text-white hover:bg-violet-700 disabled:opacity-50",children:[i?(0,r.jsx)(l.A,{className:"h-3 w-3 animate-spin"}):"project"===e.suggestedScope&&s.length>1?(0,r.jsx)(d.A,{className:"h-3 w-3"}):(0,r.jsx)(c.A,{className:"h-3 w-3"}),"project"===e.suggestedScope&&s.length>1?f("utilities.curated.intoSpace"):f("utilities.curated.install")]}),R===e.id&&(0,r.jsxs)("ul",{className:"mt-2 rounded-md border bg-popover shadow-sm divide-y",children:[s.map(t=>(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:()=>B(e,t.id),disabled:i||z,className:"w-full text-left px-2.5 py-1.5 text-xs hover:bg-accent disabled:opacity-50 inline-flex items-center gap-1.5",children:[(0,r.jsx)(c.A,{className:"h-3 w-3 text-violet-600"}),(0,r.jsx)("span",{className:"truncate",children:t.label})]})},t.id)),(0,r.jsx)("li",{children:(0,r.jsx)("button",{type:"button",onClick:()=>M(null),className:"w-full text-left px-2.5 py-1.5 text-[10px] text-muted-foreground hover:bg-accent",children:f("utilities.curated.cancel")})})]})]})]})},e.id)})})]})}},59564:(e,t,s)=>{"use strict";s.d(t,{j:()=>a});var r=s(7911);let a=(0,r.createServerReference)("706bccdf9a59e1e24328380cb605693693af6673d4",r.callServer,void 0,r.findSourceMapURL,"removeUtilityAction")},59728:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},60621:(e,t,s)=>{"use strict";s.d(t,{F:()=>l});var r=s(47989);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=r.$,l=(e,t)=>s=>{var r;if((null==t?void 0:t.variants)==null)return i(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:l,defaultVariants:n}=t,o=Object.keys(l).map(e=>{let t=null==s?void 0:s[e],r=null==n?void 0:n[e];if(null===t)return null;let i=a(t)||a(r);return l[e][i]}),d=s&&Object.entries(s).reduce((e,t)=>{let[s,r]=t;return void 0===r||(e[s]=r),e},{});return i(e,o,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:s,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,s]=e;return Array.isArray(s)?s.includes({...n,...d}[t]):({...n,...d})[t]===s})?[...e,s,r]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}},69285:(e,t,s)=>{"use strict";var r=s(48849);s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}})},69709:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},71651:(e,t,s)=>{"use strict";s.d(t,{T:()=>i});var r=s(4624);s(99356);var a=s(13506);function i(e){let{className:t,...s}=e;return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...s})}},78825:(e,t,s)=>{"use strict";s.d(t,{J:()=>l});var r=s(4624);s(99356);var a=s(33976),i=s(13506);function l(e){let{className:t,...s}=e;return(0,r.jsx)(a.Root,{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}},85253:(e,t,s)=>{"use strict";s.d(t,{$:()=>o});var r=s(4624);s(99356);var a=s(60621),i=s(50362),l=s(13506);let n=(0,a.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:s="default",size:a="default",asChild:o=!1,...d}=e,c=o?i.bL:"button";return(0,r.jsx)(c,{"data-slot":"button","data-variant":s,"data-size":a,className:(0,l.cn)(n({variant:s,size:a,className:t})),...d})}},85924:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},86295:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},86570:(e,t,s)=>{"use strict";s.d(t,{InstallFromGithubButton:()=>k});var r=s(4624),a=s(99356),i=s(69285),l=s(45804);let n=(0,l.A)("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var o=s(13561),d=s(3239);let c=(0,l.A)("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var u=s(86295),h=s(85924),m=s(56221),x=s(49411),v=s(28310),p=s(85253),g=s(4959),b=s(15523),f=s(78825),j=s(22841),y=s(7911);let N=(0,y.createServerReference)("402508bcbb8278733d9eb9b2eb3ecfa01564dedd3a",y.callServer,void 0,y.findSourceMapURL,"githubPreviewAction"),w=(0,y.createServerReference)("4020cd0b9c7dbfe8bdd30c53aa1c998a9864dea6c9",y.callServer,void 0,y.findSourceMapURL,"githubInstallAction");function k(){let e=(0,x.c)("app"),[t,s]=(0,a.useState)(!1),[l,y]=(0,a.useState)(""),[k,S]=(0,a.useState)(null),[C,z]=(0,a.useState)("global"),[P,R]=(0,a.useTransition)(),[M,T]=(0,a.useTransition)(),V=(0,i.useRouter)();return t?(0,r.jsxs)(g.Zp,{className:"fixed inset-x-4 top-16 z-50 mx-auto max-w-2xl shadow-2xl sm:inset-x-auto sm:right-6",children:[(0,r.jsxs)(g.aR,{className:"flex flex-row items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsxs)(g.ZB,{className:"flex items-center gap-2 text-base",children:[(0,r.jsx)(n,{className:"h-4 w-4"})," ",e("utilities.github.cardTitle")]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:e("utilities.github.cardSubtitle")})]}),(0,r.jsx)(p.$,{size:"icon",variant:"ghost",onClick:()=>{s(!1),S(null),y("")},children:(0,r.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)(g.Wu,{className:"space-y-4",children:[(0,r.jsxs)("form",{className:"flex gap-2",onSubmit:e=>{e.preventDefault(),l.trim()&&R(async()=>{let e=await N(l.trim());if(!e.ok)return void m.oR.error(e.error);S(e.preview)})},children:[(0,r.jsx)(b.p,{value:l,onChange:e=>y(e.target.value),placeholder:e("utilities.github.urlPlaceholder"),className:"font-mono text-xs"}),(0,r.jsx)(p.$,{type:"submit",disabled:P||!l.trim(),children:P?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"})," ",e("utilities.github.requesting")]}):e("utilities.github.getPreview")})]}),k&&(0,r.jsxs)("div",{className:"space-y-3 rounded-md border p-4 bg-muted/30",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-3 flex-wrap",children:[(0,r.jsx)("div",{className:"text-base font-semibold",children:k.manifest.name}),(0,r.jsxs)(v.E,{variant:"outline",className:"font-mono text-[10px]",children:["v",k.manifest.version]}),(0,r.jsxs)(v.E,{variant:"secondary",className:"font-mono text-[10px]",children:["github:",k.source.owner,"/",k.source.repo,"@",k.source.sha.slice(0,7)]})]}),k.manifest.author&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:e("utilities.github.author",{author:k.manifest.author})}),k.manifest.description&&(0,r.jsx)("p",{className:"text-sm",children:k.manifest.description}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground mb-1 flex items-center gap-1",children:[(0,r.jsx)(c,{className:"h-3 w-3"})," ",e("utilities.github.permissionsTitle")]}),(0,r.jsx)(A,{permissions:k.manifest.permissions})]}),k.manifest.dependencies&&Object.keys(k.manifest.dependencies).length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground mb-1",children:e("utilities.github.dependenciesTitle")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(k.manifest.dependencies).map(e=>{let[t,s]=e;return(0,r.jsxs)(v.E,{variant:"outline",className:"font-mono text-[10px]",children:[t,"@",s]},t)})})]}),(0,r.jsxs)("details",{className:"text-xs",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:e("utilities.github.filesInRepo",{count:Object.keys(k.files).length})}),(0,r.jsx)("ul",{className:"mt-1 font-mono text-[11px] space-y-0.5",children:Object.entries(k.sizes).map(e=>{var t;let[s,a]=e;return(0,r.jsxs)("li",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"truncate",children:s}),(0,r.jsx)("span",{className:"text-muted-foreground shrink-0",children:(t=a)<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(2)," MB")})]},s)})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 pt-2 border-t",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(f.J,{className:"text-xs",children:e("utilities.github.installInto")}),(0,r.jsxs)(j.l6,{value:C,onValueChange:e=>z(e),children:[(0,r.jsx)(j.bq,{className:"mt-1",children:(0,r.jsx)(j.yv,{})}),(0,r.jsxs)(j.gC,{children:[(0,r.jsx)(j.eb,{value:"global",children:e("utilities.github.globalOption")}),(0,r.jsx)(j.eb,{value:"project",disabled:!0,children:e("utilities.github.projectOption")})]})]})]}),(0,r.jsx)(p.$,{onClick:()=>{k&&T(async()=>{let t=await w({preview:k,scope:C});if(!t.ok)return void m.oR.error(t.error);m.oR.success(e("utilities.github.installedToast",{id:t.id})),s(!1),y(""),S(null),V.refresh()})},disabled:M,size:"lg",className:"self-end",children:M?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"})," ",e("utilities.github.installing")]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{className:"mr-2 h-4 w-4"})," ",e("utilities.github.installButtonShort")]})})]}),(0,r.jsxs)("div",{className:"flex items-start gap-2 text-[11px] text-muted-foreground rounded bg-amber-100/40 border border-amber-200 px-2 py-1.5",children:[(0,r.jsx)(h.A,{className:"h-3 w-3 mt-0.5 shrink-0 text-amber-700"}),(0,r.jsx)("span",{children:e("utilities.github.warning")})]})]})]})]}):(0,r.jsxs)(p.$,{onClick:()=>s(!0),children:[(0,r.jsx)(n,{className:"mr-2 h-4 w-4"})," ",e("utilities.github.installButton")]})}function A(e){var t,s,a,i,l,n,o,d,c,u,h;let{permissions:m}=e,p=(0,x.c)("app"),g=[];return((null==(s=m.llm)||null==(t=s.tasks)?void 0:t.length)&&g.push({label:"llm: ".concat(m.llm.tasks.join(", ")),severity:"info"}),(null==(a=m.kb)?void 0:a.read)&&g.push({label:"kb.read",severity:"info"}),(null==(i=m.kb)?void 0:i.write)&&g.push({label:"kb.write",severity:"warn"}),(null==(l=m.fs)?void 0:l.sandbox)&&g.push({label:"fs (sandbox)",severity:"info"}),(null==(d=m.web)||null==(o=d.fetch)||null==(n=o.domains)?void 0:n.length)&&g.push({label:"web.fetch → ".concat(m.web.fetch.domains.join(", ")),severity:"warn"}),(null==(c=m.web)?void 0:c.search)&&g.push({label:"web.search",severity:"warn"}),(null==(u=m.audit)?void 0:u.write)&&g.push({label:"audit.write",severity:"info"}),(null==(h=m.workers)?void 0:h.enabled)&&g.push({label:"workers (server actions)",severity:"danger"}),0===g.length)?(0,r.jsx)("span",{className:"text-xs italic text-muted-foreground",children:p("utilities.github.noPermissions")}):(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:g.map(e=>(0,r.jsx)(v.E,{variant:"outline",className:"danger"===e.severity?"border-destructive text-destructive":"warn"===e.severity?"border-amber-600 text-amber-700":"",children:e.label},e.label))})}},91074:(e,t,s)=>{"use strict";s.d(t,{Separator:()=>l});var r=s(4624);s(99356);var a=s(44188),i=s(13506);function l(e){let{className:t,orientation:s="horizontal",decorative:l=!0,...n}=e;return(0,r.jsx)(a.b,{"data-slot":"separator",decorative:l,orientation:s,className:(0,i.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...n})}},93783:(e,t,s)=>{"use strict";s.d(t,{g:()=>a});var r=s(7911);let a=(0,r.createServerReference)("40dbfa88cb050ef7eba3c82d8b7538fe6bf9057610",r.callServer,void 0,r.findSourceMapURL,"installCuratedAction")}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,4933,146,7358],()=>e(e.s=58297)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],l=!0,c=0;c<o.length;c++)(!1&a||u>=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a<u&&(u=a));if(l){e.splice(i--,1);var s=n();void 0!==s&&(t=s)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>"static/chunks/"+e+".
|
|
1
|
+
(()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],l=!0,c=0;c<o.length;c++)(!1&a||u>=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a<u&&(u=a));if(l){e.splice(i--,1);var s=n();void 0!==s&&(t=s)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>"static/chunks/"+e+".17cd7704e88bcb32.js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var d=c[s];if(d.getAttribute("src")==o||d.getAttribute("data-webpack")==t+a){u=d;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,r.nc&&u.setAttribute("nonce",r.nc),u.setAttribute("data-webpack",t+a),u.src=r.tu(o)),e[o]=[n];var f=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=f.bind(null,u.onerror),u.onload=f.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={8068:0,497:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(497|8068)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var s=l(r)}for(t&&t(o);c<i.length;c++)a=i[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(s)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r.nc=void 0})();
|