@evoscientist/webui 0.2.8 → 0.3.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.
Files changed (105) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/build-manifest.json +3 -3
  3. package/dist/.next/server/app/_global-error.html +1 -1
  4. package/dist/.next/server/app/_global-error.rsc +1 -1
  5. package/dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  8. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  9. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/dist/.next/server/app/_not-found.html +1 -1
  11. package/dist/.next/server/app/_not-found.rsc +2 -2
  12. package/dist/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  13. package/dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  14. package/dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  15. package/dist/.next/server/app/api/memory/executions/route.js +1 -1
  16. package/dist/.next/server/app/api/memory/executions/route.js.nft.json +1 -1
  17. package/dist/.next/server/app/api/memory/observations/route.js +1 -1
  18. package/dist/.next/server/app/api/memory/observations/route.js.nft.json +1 -1
  19. package/dist/.next/server/app/api/memory/route.js +1 -1
  20. package/dist/.next/server/app/api/memory/route.js.nft.json +1 -1
  21. package/dist/.next/server/app/api/skills/catalog/route.js +1 -1
  22. package/dist/.next/server/app/api/skills/catalog/route.js.nft.json +1 -1
  23. package/dist/.next/server/app/api/skills/detail/route.js +1 -1
  24. package/dist/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
  25. package/dist/.next/server/app/api/skills/install/route.js +1 -1
  26. package/dist/.next/server/app/api/skills/install/route.js.nft.json +1 -1
  27. package/dist/.next/server/app/api/skills/route.js +1 -1
  28. package/dist/.next/server/app/api/skills/route.js.nft.json +1 -1
  29. package/dist/.next/server/app/api/workspace/download/route.js +1 -1
  30. package/dist/.next/server/app/api/workspace/download/route.js.nft.json +1 -1
  31. package/dist/.next/server/app/api/workspace/file/route.js +1 -1
  32. package/dist/.next/server/app/api/workspace/file/route.js.nft.json +1 -1
  33. package/dist/.next/server/app/api/workspace/route.js +1 -1
  34. package/dist/.next/server/app/api/workspace/route.js.nft.json +1 -1
  35. package/dist/.next/server/app/api/workspace/upload/route.js +1 -1
  36. package/dist/.next/server/app/api/workspace/upload/route.js.nft.json +1 -1
  37. package/dist/.next/server/app/index.html +1 -1
  38. package/dist/.next/server/app/index.rsc +3 -3
  39. package/dist/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  40. package/dist/.next/server/app/index.segments/_full.segment.rsc +3 -3
  41. package/dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  42. package/dist/.next/server/app/page.js.nft.json +1 -1
  43. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  44. package/dist/.next/server/chunks/[root-of-the-server]__01e0ekn._.js +6 -0
  45. package/dist/.next/server/chunks/{[root-of-the-server]__0t923su._.js → [root-of-the-server]__08gtyud._.js} +1 -1
  46. package/dist/.next/server/chunks/{[root-of-the-server]__0key-2n._.js → [root-of-the-server]__0c_9zoh._.js} +1 -1
  47. package/dist/.next/server/chunks/{[root-of-the-server]__0zqsdzd._.js → [root-of-the-server]__0dsauq5._.js} +1 -1
  48. package/dist/.next/server/chunks/[root-of-the-server]__0om1fsa._.js +6 -0
  49. package/dist/.next/server/chunks/[root-of-the-server]__19l67fj._.js +6 -0
  50. package/dist/.next/server/chunks/[root-of-the-server]__1nb3ezt._.js +6 -0
  51. package/dist/.next/server/chunks/_13lro7d._.js +1 -1
  52. package/dist/.next/server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_mindmap-definition-YA3MSWOX_mjs_19k8byt._.js +6 -6
  53. package/dist/.next/server/chunks/ssr/[root-of-the-server]__1q-wcrf._.js +15 -0
  54. package/dist/.next/server/chunks/ssr/{node_modules_0a-3666._.js → node_modules_0265-rz._.js} +1 -1
  55. package/dist/.next/server/chunks/ssr/{[root-of-the-server]__11a1-4t._.js → node_modules_0653v7w._.js} +2 -2
  56. package/dist/.next/server/chunks/ssr/{node_modules_1f65-5g._.js → node_modules_09pkkps._.js} +2 -2
  57. package/dist/.next/server/chunks/ssr/{node_modules_0m7-ed8._.js → node_modules_0d4t5t-._.js} +1 -1
  58. package/dist/.next/server/chunks/ssr/{node_modules_20iziql._.js → node_modules_0e21i6_._.js} +1 -1
  59. package/dist/.next/server/chunks/ssr/{node_modules_1t626ye._.js → node_modules_0f1vz2j._.js} +2 -2
  60. package/dist/.next/server/chunks/ssr/{node_modules_1twjy-4._.js → node_modules_0fpr7k8._.js} +1 -1
  61. package/dist/.next/server/chunks/ssr/{node_modules_20oab__._.js → node_modules_0gq6n6w._.js} +2 -2
  62. package/dist/.next/server/chunks/ssr/{node_modules_10v96_9._.js → node_modules_0lb0yml._.js} +2 -2
  63. package/dist/.next/server/chunks/ssr/{node_modules_14xejkf._.js → node_modules_0mshgc0._.js} +1 -1
  64. package/dist/.next/server/chunks/ssr/{node_modules_13e524_._.js → node_modules_0r6hp0p._.js} +1 -1
  65. package/dist/.next/server/chunks/ssr/{node_modules_1a2dy76._.js → node_modules_0revk50._.js} +1 -1
  66. package/dist/.next/server/chunks/ssr/{node_modules_0lhl9_0._.js → node_modules_0sfdscp._.js} +2 -2
  67. package/dist/.next/server/chunks/ssr/{node_modules_1phops3._.js → node_modules_0snw7z_._.js} +1 -1
  68. package/dist/.next/server/chunks/ssr/{node_modules_002u7ir._.js → node_modules_0tbm7m-._.js} +1 -1
  69. package/dist/.next/server/chunks/ssr/{node_modules_0ybok7k._.js → node_modules_0tfd3hd._.js} +1 -1
  70. package/dist/.next/server/chunks/ssr/{node_modules_0fxlk06._.js → node_modules_0y4c6ao._.js} +1 -1
  71. package/dist/.next/server/chunks/ssr/{node_modules_1mcjw-y._.js → node_modules_0zinurw._.js} +2 -2
  72. package/dist/.next/server/chunks/ssr/{node_modules_0qeu828._.js → node_modules_0zz_c7x._.js} +1 -1
  73. package/dist/.next/server/chunks/ssr/{node_modules_0q44r64._.js → node_modules_10xlaeo._.js} +1 -1
  74. package/dist/.next/server/chunks/ssr/{node_modules_0urn1wt._.js → node_modules_11xf286._.js} +2 -2
  75. package/dist/.next/server/chunks/ssr/{node_modules_01wbayw._.js → node_modules_13418z5._.js} +1 -1
  76. package/dist/.next/server/chunks/ssr/{node_modules_208gr2-._.js → node_modules_16r2-d4._.js} +1 -1
  77. package/dist/.next/server/chunks/ssr/{node_modules_0p_8bfi._.js → node_modules_1_uze58._.js} +1 -1
  78. package/dist/.next/server/chunks/ssr/{node_modules_0gs9qjb._.js → node_modules_1di__7s._.js} +1 -1
  79. package/dist/.next/server/chunks/ssr/{node_modules_02l4ncm._.js → node_modules_1e3xu34._.js} +1 -1
  80. package/dist/.next/server/chunks/ssr/{node_modules_1owe5xv._.js → node_modules_1frmxq2._.js} +2 -2
  81. package/dist/.next/server/chunks/ssr/{node_modules_0tr3k8r._.js → node_modules_1ic3g8m._.js} +1 -1
  82. package/dist/.next/server/chunks/ssr/{node_modules_0plqukv._.js → node_modules_1nia3l1._.js} +1 -1
  83. package/dist/.next/server/chunks/ssr/{node_modules_17rfg58._.js → node_modules_1yw7dd6._.js} +2 -2
  84. package/dist/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_09ex6q5._.js → node_modules_katex_dist_katex_mjs_0rmimx0._.js} +1 -1
  85. package/dist/.next/server/middleware-build-manifest.js +3 -3
  86. package/dist/.next/server/pages/404.html +1 -1
  87. package/dist/.next/server/pages/500.html +1 -1
  88. package/dist/.next/static/chunks/357uypdcfkasu.js +13 -0
  89. package/dist/.next/static/chunks/3cmvtz1y1tcd1.css +3 -0
  90. package/dist/.next/static/chunks/{27vb_89qd7ag_.js → 3fg_vuz1xt14w.js} +1 -1
  91. package/dist/.next/static/chunks/3lnrl25cwsoyk.js +90 -0
  92. package/dist/.next/static/chunks/{1bzu587wut72w.js → 3s09ok8dc101_.js} +1 -1
  93. package/dist/package.json +4 -4
  94. package/package.json +4 -4
  95. package/dist/.next/server/chunks/[root-of-the-server]__0jsq76h._.js +0 -6
  96. package/dist/.next/server/chunks/[root-of-the-server]__0k-rs5f._.js +0 -6
  97. package/dist/.next/server/chunks/[root-of-the-server]__0nn8czk._.js +0 -6
  98. package/dist/.next/server/chunks/[root-of-the-server]__1alqt3_._.js +0 -6
  99. package/dist/.next/server/chunks/ssr/[root-of-the-server]__0owaq8w._.js +0 -12
  100. package/dist/.next/static/chunks/14b2ne-5dycww.js +0 -90
  101. package/dist/.next/static/chunks/15e7e4t3feyih.js +0 -10
  102. package/dist/.next/static/chunks/2dmr54jagfdwa.css +0 -3
  103. /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → GuE943tuTCMHEfFMDvjrJ}/_buildManifest.js +0 -0
  104. /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → GuE943tuTCMHEfFMDvjrJ}/_clientMiddlewareManifest.js +0 -0
  105. /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → GuE943tuTCMHEfFMDvjrJ}/_ssgManifest.js +0 -0
@@ -0,0 +1,6 @@
1
+ module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},915908,e=>{"use strict";var t=e.i(89171),r=e.i(904937),i=e.i(17883);async function a(e){try{if((0,i.isCrossOrigin)(e))return t.NextResponse.json({error:"Cross-origin installs are not allowed."},{status:403});let a=await e.json().catch(()=>null),s=a?.name;if("string"!=typeof s||!s)return t.NextResponse.json({error:"Missing skill name."},{status:400});let n=await (0,r.installSkill)(s);return t.NextResponse.json({ok:!0,...n})}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to install skill."},{status:400})}}e.s(["POST",0,a,"runtime",0,"nodejs"])},810900,e=>{"use strict";var t=e.i(747909),r=e.i(174017),i=e.i(996250),a=e.i(759756),s=e.i(561916),n=e.i(174677),o=e.i(869741),l=e.i(316795),c=e.i(487718),u=e.i(995169),p=e.i(47587),d=e.i(666012),h=e.i(570101),f=e.i(626937),m=e.i(10372),w=e.i(193695);e.i(52474);var y=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/skills/install/route",pathname:"/api/skills/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/install/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(915908),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:x,serverHooks:E}=v;async function R(e,t,i){i.requestMeta&&(0,a.setRequestMeta)(e,i.requestMeta),v.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/skills/install/route";g=g.replace(/\/index$/,"")||"/";let x=await v.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:E,deploymentId:R,params:k,nextConfig:b,parsedUrl:$,isDraftMode:S,prerenderManifest:C,routerServerContext:j,isOnDemandRevalidate:A,revalidateOnlyGenerated:T,resolvedPathname:_,clientReferenceManifest:I,serverActionsManifest:O}=x,P=(0,o.normalizeAppPath)(g),N=!!(C.dynamicRoutes[P]||C.routes[_]),q=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,$,!1):t.end("This page could not be found"),null);if(N&&!S){let e=!!C.routes[_],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await q();throw new w.NoFallbackError}}let D=null;!N||v.isDev||S||(D="/index"===(D=_)?"/":D);let U=!0===v.isDev||!N,M=N&&!U;O&&I&&(0,n.setManifestsSingleton)({page:g,clientReferenceManifest:I,serverActionsManifest:O});let F=e.method||"GET",H=(0,s.getTracer)(),L=H.getActiveScopeSpan(),W=!!(null==j?void 0:j.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,b,C,K);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let z={params:k,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts,useCacheTimeout:b.experimental.useCacheTimeout},cacheComponents:!!b.cacheComponents,validationLevel:b.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:b.cacheLife,staticPageGenerationTimeout:b.staticPageGenerationTimeout,waitUntil:i.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,a)=>v.onRequestError(e,t,i,a,j)},sharedContext:{buildId:E,deploymentId:R}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=c.NextRequestAdapter.fromNodeNextRequest(G,(0,c.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!K&&A&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await v.handle(X,z);e.fetchMetrics=z.renderOpts.fetchMetrics;let s=z.renderOpts.pendingWaitUntil;s&&i.waitUntil&&(i.waitUntil(s),s=void 0);let n=z.renderOpts.collectedTags;if(!N)return await (0,d.sendResponse)(G,V,a,s),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);n&&(t[m.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,i=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==r&&r>0?b.expireTime:void 0:z.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:i}}}}catch(t){throw(null==r?void 0:r.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:A})},!1,j),t}},J=async(a,n)=>{try{var o,l;let a=await v.handleResponse({req:e,nextConfig:b,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:T,responseGenerator:Z,waitUntil:i.waitUntil,isMinimalMode:K});if(!N)return;if((null==a||null==(o=a.value)?void 0:o.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==a||null==(l=a.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",A?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(a.value.headers);K&&N||s.delete(m.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,f.getCacheControlHeader)(a.cacheControl)),await (0,d.sendResponse)(G,V,new Response(a.value.body,{headers:s,status:a.value.status||200}));return}catch(t){if(t instanceof w.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:A})},!1,j),N)throw t;await (0,d.sendResponse)(G,V,new Response(null,{status:500}));return}finally{(()=>{if(!a)return;let e=t.statusCode;a.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(a.setStatus({code:s.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=r.get("next.route")||P,o=`${F} ${i}`;a.setAttributes({"next.route":i,"http.route":i,"next.span_name":o}),a.updateName(o),n&&n!==a&&(n.setAttribute("http.route",i),n.updateName(o))})()}};if(W&&L)await J(L,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!W)}}e.s(["handler",0,R,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:x})},"routeModule",0,v,"serverHooks",0,E,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,x])},904937,e=>{"use strict";let t;var r=e.i(446786),i=e.i(814747),a=e.i(522734),s=e.i(254799);let n="EvoScientist/EvoSkills",o="main",l="skills/",c=(0,i.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,i.join)((0,r.homedir)(),t.slice(1)):(0,i.resolve)(t):(0,i.join)((0,r.homedir)(),".evoscientist"),"skills"),u=[c,(0,i.join)((0,r.homedir)(),".config","evoscientist","skills")],p={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"},d="EXPERT.md";async function h(e,t,r){try{let s=await a.promises.realpath((0,i.join)(e,t,r)),n=await a.promises.realpath(e);if(s!==n&&!s.startsWith(n+i.sep))return null;return await a.promises.readFile(s,"utf-8")}catch{return null}}function f(e){let t,{frontmatter:r}=y(e);if(!r)return!0;let i=r.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!i)return!0;let a=i[1],s=a.split("\n").find(e=>e.trim()),n=s?.match(/^[ \t]+/)?.[0]??" ",o=a.match(RegExp(`^${n}type\\s*:[ \\t]*(.*)$`,"m"));if(!o)return!0;let l=o[1].trim();if(""===l||"|"===l||">"===l)for(let e of(t=[],a.slice(a.indexOf(o[0])+o[0].length).split("\n"))){if(!e.trim())continue;let r=e.match(/^[ \t]+-[ \t]*(.+?)[ \t]*$/);if(!r||!e.startsWith(n))break;t.push(r[1])}else t=l.replace(/^\[|\]$/g,"").split(",");return t.map(e=>e.trim().replace(/^["']|["']$/g,"").toLowerCase()).filter(Boolean).includes("skill")}async function m(e){try{return(await a.promises.stat((0,i.join)(e,d))).isFile()}catch{return!1}}function w(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function y(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function v(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function g(e){let{frontmatter:t}=y(e);return t?v(t):{}}async function x(e){for(let t of u)try{let r=await a.promises.readFile((0,i.join)(t,e,"SKILL.md"),"utf-8"),s=g(r).version;if(s)return s}catch{}}function E(e,t){return`https://raw.githubusercontent.com/${n}/${e}/${t}`}let R=/^[0-9a-f]{7,40}$/,k=null;async function b(){try{let e=await fetch(`https://api.github.com/repos/${n}/commits/${o}`,{headers:p});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&R.test(t.sha))return t.sha}}catch{}return o}async function $(e=!1){if(!e&&k&&Date.now()-k.at<3e5)return{ref:k.ref,tree:k.tree};let t=await b(),r=await fetch(`https://api.github.com/repos/${n}/git/trees/${t}?recursive=1`,{headers:p});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let i=await r.json();if(!Array.isArray(i.tree))throw Error("Unexpected response from the skills catalog.");return k={at:Date.now(),ref:t,tree:i.tree},{ref:t,tree:i.tree}}function S(){return(0,i.join)(c,".installed.yaml")}async function C(){try{return function(e){let t={},r=null;for(let i of e.split("\n"))if(!(!i.trim()||i.trimStart().startsWith("#"))){if(/^\S/.test(i)){let e=i.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=i.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let i=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=i:"commit"===e[1]&&(t[r].commit=i)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await a.promises.readFile(S(),"utf-8"))}catch{return{}}}async function j(e){let t=S(),r=`${t}.${(0,s.randomUUID)()}.tmp`;await a.promises.mkdir(c,{recursive:!0}),await a.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let i of t)r+=`${i}:
2
+ `,e[i].commit&&(r+=` commit: ${e[i].commit}
3
+ `),r+=` source: ${e[i].source}
4
+ `;return r}(e),{mode:384}),await a.promises.rename(r,t)}async function A(e,t){let r=await C(),i=`${n}@${l}${e}`;r[e]=t?{source:i,commit:t}:{source:i},await j(r)}async function T(e){let t=await C();e in t&&(delete t[e],await j(t))}async function _(){let e=new Set;for(let t of u)try{for(let r of(await a.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function I(e=!1){let[{ref:t,tree:r},i]=await Promise.all([$(e),_()]),a=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),i=e.indexOf("/");if(i<=0)continue;let a=e.slice(0,i);(t.get(a)??t.set(a,[]).get(a)).push(r)}return t}(r);return(await Promise.all([...a.entries()].map(async([e,r])=>{let a,s,n=e,o="",c=!0,u=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(u)try{let r=await fetch(E(t,u.path),{headers:p}).then(e=>e.ok?e.text():""),i=g(r);n=i.name||e,o=i.description||"",s=i.version,c=f(r)}catch{}let h=i.has(e),m=h?await x(e):void 0,w=h&&!!s&&!!m&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),i=t.split(".").map(e=>parseInt(e,10)),a=Math.max(r.length,i.length);for(let e=0;e<a;e+=1){let t=r[e]??0,a=i[e]??0;if(Number.isNaN(t)||Number.isNaN(a))break;if(t!==a)return t>a?1:-1}return 0}(s,m)>0;return{name:e,title:n,description:o,fileCount:r.length,installed:h,latestVersion:s,installedVersion:m,updateAvailable:w,isExpert:(a=`${l}${e}/${d}`,r.some(e=>e.path===a)),isSkill:c}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function O(e){if(!w(e))throw Error("Invalid skill name.");let t=null,r=null,i=!1;for(let a of u){let s=await h(a,e,"SKILL.md");if(null!==s){t=s,i=!0,r=await h(a,e,d);break}}if(null===t){let{ref:i,tree:a}=await $(),s=async e=>{let t=await fetch(E(i,e),{headers:p});if(!t.ok)throw Error(`Failed to load skill (${t.status}).`);return t.text()},n=e=>a.some(t=>"blob"===t.type&&t.path===e),o=`${l}${e}/SKILL.md`;if(!n(o))throw Error(`Skill "${e}" was not found.`);t=await s(o);let c=`${l}${e}/${d}`;if(n(c))try{r=await s(c)}catch{}}let{frontmatter:a,body:s}=y(t),n=a?v(a):{},o=null!==a&&(null!=n.name||null!=n.description||null!=n.version);return{name:e,title:n.name||e,description:n.description||"",version:n.version,body:o?s:t.trim(),installed:i,expertBody:null===r?void 0:function(e){let{frontmatter:t,body:r}=y(e);return(null===t?e:r).trim()}(r)}}async function P(e){if(!w(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await $(),n=`${l}${e}/`,u=r.filter(e=>"blob"===e.type&&e.path.startsWith(n));if(0===u.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(u.length>300)throw Error("This skill has too many files to install.");if(u.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let d=(0,i.resolve)(c),h=(0,i.resolve)(d,e);if(h!==(0,i.join)(d,e))throw Error("Invalid skill name.");let f=(0,i.join)(d,`.installing-${e}-${(0,s.randomUUID)()}`);try{for(let e of(await a.promises.mkdir(f,{recursive:!0}),u)){let r=e.path.slice(n.length),s=(0,i.resolve)(f,r);if(s!==f&&!s.startsWith(f+i.sep))throw Error("Invalid file path in skill.");let o=await fetch(E(t,e.path),{headers:p});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await a.promises.mkdir((0,i.dirname)(s),{recursive:!0}),await a.promises.writeFile(s,l)}await a.promises.rm(h,{recursive:!0,force:!0}),await a.promises.mkdir(d,{recursive:!0}),await a.promises.rename(f,h)}catch(e){throw await a.promises.rm(f,{recursive:!0,force:!0}).catch(()=>{}),e}try{await A(e,t!==o&&R.test(t)?t:null)}catch{}return{files:u.length}}e.s(["SKILL_DIRS",0,u,"declaresSkillType",0,f,"getCatalog",0,I,"getSkillDetail",0,O,"installSkill",0,P,"isInstalledExpert",0,m,"isValidSkillName",0,w,"recordUninstall",0,T])},17883,e=>{"use strict";var t=e.i(522734),r=e.i(446786),i=e.i(814747),a=e.i(254799);let s=(0,i.join)((0,r.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function n(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r<32||127===r||r>=128&&r<=159||8232===r||8233===r)return!0}return!1}let o=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||o.has(e))||l.some(t=>e.endsWith(t))}async function u(){let e;try{let r=JSON.parse(await t.promises.readFile(s,"utf-8")),i=r.workspace,a=r.pid;"string"==typeof i&&i.trim()&&(!("number"==typeof a&&a>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(a))&&(e=i)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let r=(0,i.resolve)(e);if(!(await t.promises.stat(r)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return t.promises.realpath(r)}function p(e,t){if(n(t))throw Error("Invalid path.");let r=t.replaceAll("\\","/").replace(/^\/+/,"");if(r.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let a=(0,i.resolve)(e,r);if(a!==e&&!a.startsWith(e+i.sep))throw Error("Path is outside the workspace.");return a}async function d(e,r){let a,s=p(e,r);try{a=await t.promises.realpath(s)}catch{throw Error("Path is not accessible.")}if(a!==e&&!a.startsWith(e+i.sep))throw Error("Path is not accessible.");let n=(0,i.relative)(e,a);if(n&&n.split(i.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return a}let h=new Set(["txt","text","md","markdown","log","csv","tsv","json","jsonl","yaml","yml","toml","xml","ini","cfg","conf","env","py","js","jsx","ts","tsx","sh","bash","zsh","r","jl","cpp","cc","c","h","hpp","java","go","rs","rb","php","swift","kt","cs","sql","tex","bib","rst","css","scss","html"]);async function f(e,r){let a;try{a=await t.promises.realpath((0,i.dirname)(r))}catch{throw Error("Path is not accessible.")}if(a!==e&&!a.startsWith(e+i.sep))throw Error("Path is not accessible.")}function m(e){let t;return h.has((t=e.lastIndexOf("."))>=0?e.slice(t+1).toLowerCase():"")}async function w(e,r,s){let n;if("string"!=typeof s)throw Error("Content must be a string.");if(Buffer.byteLength(s,"utf-8")>5242880)throw Error("This file is too large to save.");if(!m(r.replaceAll("\\","/").split("/").pop()||r))throw Error("Only text/code files can be edited.");let o=p(e,r);try{n=await t.promises.lstat(o)}catch{throw Error("Only files can be edited.")}if(n.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await d(e,r);if(!m((0,i.basename)(l)))throw Error("Only text/code files can be edited.");let c=await t.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let u=`${l}.${(0,a.randomUUID)()}.tmp`;try{await f(e,l),await t.promises.writeFile(u,s,{encoding:"utf-8",mode:511&c.mode}),await f(e,l),await t.promises.rename(u,l)}catch(e){throw await t.promises.rm(u,{force:!0}).catch(()=>{}),e}let h=await t.promises.stat(l);return{path:r.replaceAll("\\","/").replace(/^\/+/,""),size:h.size,mtime:h.mtimeMs}}async function y(e,r){await d(e,r);let i=p(e,r);if((await t.promises.lstat(i)).isDirectory())throw Error("Only files can be deleted.");await f(e,i),await t.promises.rm(i,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,y,"getWorkspaceDir",0,u,"hasControlChar",0,n,"isCrossOrigin",0,function(e){let t=e.headers.get("host");if(!t)return!0;let r=e.headers.get("sec-fetch-site");if(r)return"same-origin"!==r&&"same-site"!==r&&"none"!==r;let i=e.headers.get("origin");if(!i)return!1;try{return new URL(i).host!==t}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,d,"writeWorkspaceFile",0,w,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let t of o)e.push(`${t}/*`,`*/${t}/*`,t,`*/${t}`);for(let t of l)e.push(`*${t}`);return e.flatMap(e=>["-x",e])}])}];
5
+
6
+ //# sourceMappingURL=%5Broot-of-the-server%5D__01e0ekn._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},85678,e=>{"use strict";var t=e.i(522734),r=e.i(446786),i=e.i(814747),s=e.i(254799),a=e.i(17883);function o(e){return e.startsWith("~")?(0,i.join)((0,r.homedir)(),e.slice(1)):(0,i.resolve)(e)}function n(){let e,t=process.env.EVOSCIENTIST_MEMORIES_DIR||process.env.EVOSCIENTIST_MEMORY_DIR;return t&&t.trim()?o(t):(0,i.join)((e=process.env.EVOSCIENTIST_DATA_DIR)&&e.trim()?o(e):(0,i.join)((0,r.homedir)(),".evoscientist"),"memories")}async function l(){try{let e=await t.promises.realpath(n());return(await t.promises.stat(e)).isDirectory()?e:null}catch{return null}}async function c(){let e=n();return await t.promises.mkdir(e,{recursive:!0}),t.promises.realpath(e)}let p=new Set(["__pycache__","node_modules","__MACOSX"]),m=[".pyc",".pyo"];function h(e){return!!(e.startsWith(".")||p.has(e))||m.some(t=>e.endsWith(t))}let f=new Set(["md","markdown","txt","text","json","yaml","yml","csv","tsv","log","tex","bib","rst"]);function u(e){let t;return f.has((t=e.lastIndexOf("."))>=0?e.slice(t+1).toLowerCase():"")}function d(e,t){if((0,a.hasControlChar)(t))throw Error("Invalid path.");let r=t.replaceAll("\\","/").replace(/^\/+/,"");if(!r)throw Error("A file path is required.");if(r.split("/").some(e=>""!==e&&h(e)))throw Error("Path is not accessible.");let s=(0,i.resolve)(e,r);if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is outside the memory directory.");return s}async function w(e,r){let s,a=d(e,r);try{s=await t.promises.realpath(a)}catch{throw Error("Path is not accessible.")}if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is not accessible.");let o=(0,i.relative)(e,s);if(o&&o.split(i.sep).some(e=>""!==e&&h(e)))throw Error("Path is not accessible.");return s}async function y(e,r){let s=d(e,r),a=(0,i.dirname)(s);for(;;)try{let r=await t.promises.realpath(a);if(r!==e&&!r.startsWith(e+i.sep))throw Error("Path is outside the memory directory.");break}catch(t){if(t instanceof Error&&t.message.includes("outside"))throw t;let e=(0,i.dirname)(a);if(e===a)break;a=e}return s}async function x(){let e=n(),r=await l();if(!r)return{dir:e,exists:!1,entries:[],truncated:!1};let s=[],a=!1;async function o(e,n){let l;if(n>8||s.length>=2e3){s.length>=2e3&&(a=!0);return}try{l=await t.promises.readdir(e,{withFileTypes:!0})}catch{return}for(let c of(l.sort((e,t)=>e.name.localeCompare(t.name)),l)){if(h(c.name))continue;if(s.length>=2e3){a=!0;return}let l=(0,i.join)(e,c.name);if(c.isDirectory())await o(l,n+1);else if(c.isFile()){let e=0,a=0;try{let r=await t.promises.stat(l);e=r.size,a=r.mtimeMs}catch{continue}s.push({path:(0,i.relative)(r,l).split(i.sep).join("/"),size:e,mtime:a,editable:u(c.name)&&e<=2097152})}}}return await o(r,0),{dir:e,exists:!0,entries:s,truncated:a}}async function g(e){let r=await l();if(!r)throw Error("No memory directory found.");if(!u(e))throw Error("This file type can't be edited.");let i=await w(r,e),s=await t.promises.stat(i);if(!s.isFile())throw Error("Not a file.");if(s.size>2097152)throw Error("This file is too large to open.");let a=await t.promises.readFile(i,"utf-8");return{path:e.replaceAll("\\","/").replace(/^\/+/,""),content:a,size:s.size,mtime:s.mtimeMs}}async function E(e,r){if("string"!=typeof r)throw Error("Content must be a string.");if(Buffer.byteLength(r,"utf-8")>1048576)throw Error("This file is too large to save.");if(!u(e))throw Error("Only text/markdown memory files can be saved.");let a=await c(),o=await y(a,e);await t.promises.mkdir((0,i.dirname)(o),{recursive:!0});let n=`${o}.${(0,s.randomUUID)()}.tmp`;try{await t.promises.writeFile(n,r,{encoding:"utf-8",mode:384}),await t.promises.rename(n,o)}catch(e){throw await t.promises.rm(n,{force:!0}).catch(()=>{}),e}let l=await t.promises.stat(o);return{path:e.replaceAll("\\","/").replace(/^\/+/,""),content:r,size:l.size,mtime:l.mtimeMs}}function v(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---/);return t?t[1]:""}function b(e,t){let r=RegExp(`^${t}:\\s*(.+)`,"m"),i=e.match(r);return i?i[1].trim().replace(/^'(.*)'$/,"$1").replace(/^"(.*)"$/,"$1"):""}function _(e,t){let r=RegExp(`\\b${t}:\\s*(.+)`,"m"),i=e.match(r);return i?i[1].trim().replace(/^'(.*)'$/,"$1").replace(/^"(.*)"$/,"$1"):""}async function j(){let e=await l();if(!e)return{nodes:[],edges:[]};let r=(0,i.join)(e,"observations");try{await t.promises.access(r)}catch{return{nodes:[],edges:[]}}let s=new Map,a=[];async function o(r){let n;try{n=await t.promises.readdir(r,{withFileTypes:!0})}catch{return}for(let l of(n.sort((e,t)=>e.name.localeCompare(t.name)),n)){if(h(l.name))continue;let n=(0,i.join)(r,l.name);if(l.isDirectory())await o(n);else if(l.isFile()&&l.name.endsWith(".md")){let r=await t.promises.readFile(n,"utf-8").catch(()=>null);if(!r)continue;let o=v(r),c=b(o,"id")||l.name.replace(/\.md$/,""),p=b(o,"summary")||c,m=b(o,"memory_type")||"semantic",h=b(o,"scope")||"global",f=b(o,"created_at")||"",u=function(e){let t,r=e.indexOf("related_observations:");if(-1===r)return[];let i=e.slice(r+21),s=[],a=/^- id:\s*(.+)$/gm;for(;null!==(t=a.exec(i));){let e=t.index,r=i.slice(e+1),a=r.match(/^(?:- |[a-z_])/m),o=i.slice(e,e+1+(a?.index??r.length)),n=t[1].trim().replace(/^['"]|['"]$/g,""),l=o.match(/^\s+relation:\s*(.+)$/m),c=l?.[1]?.trim()??"";n&&c&&s.push({id:n,relation:c})}return s}(o),d=(0,i.relative)(e,n).split(i.sep).join("/");for(let e of(s.set(c,{id:c,path:d,summary:p,memory_type:m,scope:h,created_at:f,degree:0}),u))a.push({source:c,target:e.id,relation:e.relation})}}}await o(r);let n=a.filter(e=>s.has(e.source)&&s.has(e.target));for(let e of n)s.get(e.source).degree++,s.get(e.target).degree++;return{nodes:Array.from(s.values()),edges:n}}async function S(){let e=await l();if(!e)return{entries:[],truncated:!1};let r=(0,i.join)(e,"executions");try{await t.promises.access(r)}catch{return{entries:[],truncated:!1}}let s=[],a=!1;async function o(r){let n;if(s.length>=2e3){a=!0;return}try{n=await t.promises.readdir(r,{withFileTypes:!0})}catch{return}for(let a of(n.sort((e,t)=>e.name.localeCompare(t.name)),n)){if(h(a.name))continue;let n=(0,i.join)(r,a.name);if(a.isDirectory())await o(n);else if(a.isFile()&&a.name.endsWith(".md")){let r=await t.promises.readFile(n,"utf-8").catch(()=>null);if(!r)continue;let o=v(r),l=b(o,"id")||a.name.replace(/\.md$/,""),c=b(o,"created_at")||"",p=b(o,"project_id")||"",m=_(o,"agent"),h=_(o,"session_id"),f=r.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,"").trim(),u=f.match(/^##\s+Summary\s*\r?\n([\s\S]*?)(?=\n##\s|\s*$)/m),d=u?u[1].trim():f.slice(0,500),w=[...new Set(f.match(/\bO-[0-9a-f]{16}\b/g)??[])];s.push({id:l,created_at:c,agent:m,session_id:h,project_id:p,summary:d,obs_ids:w,path:(0,i.relative)(e,n).split(i.sep).join("/")})}}}return await o(r),s.sort((e,t)=>t.created_at.localeCompare(e.created_at)),{entries:s,truncated:a}}async function k(e){let r=await l();if(!r)throw Error("No memory directory found.");let i=await w(r,e);if(!(await t.promises.stat(i)).isFile())throw Error("Only files can be deleted.");await t.promises.rm(i,{force:!0})}e.s(["deleteMemory",0,k,"listExecutions",0,S,"listMemory",0,x,"listObservations",0,j,"readMemory",0,g,"writeMemory",0,E])},17883,e=>{"use strict";var t=e.i(522734),r=e.i(446786),i=e.i(814747),s=e.i(254799);let a=(0,i.join)((0,r.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function o(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r<32||127===r||r>=128&&r<=159||8232===r||8233===r)return!0}return!1}let n=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||n.has(e))||l.some(t=>e.endsWith(t))}async function p(){let e;try{let r=JSON.parse(await t.promises.readFile(a,"utf-8")),i=r.workspace,s=r.pid;"string"==typeof i&&i.trim()&&(!("number"==typeof s&&s>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(s))&&(e=i)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let r=(0,i.resolve)(e);if(!(await t.promises.stat(r)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return t.promises.realpath(r)}function m(e,t){if(o(t))throw Error("Invalid path.");let r=t.replaceAll("\\","/").replace(/^\/+/,"");if(r.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let s=(0,i.resolve)(e,r);if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is outside the workspace.");return s}async function h(e,r){let s,a=m(e,r);try{s=await t.promises.realpath(a)}catch{throw Error("Path is not accessible.")}if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is not accessible.");let o=(0,i.relative)(e,s);if(o&&o.split(i.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return s}let f=new Set(["txt","text","md","markdown","log","csv","tsv","json","jsonl","yaml","yml","toml","xml","ini","cfg","conf","env","py","js","jsx","ts","tsx","sh","bash","zsh","r","jl","cpp","cc","c","h","hpp","java","go","rs","rb","php","swift","kt","cs","sql","tex","bib","rst","css","scss","html"]);async function u(e,r){let s;try{s=await t.promises.realpath((0,i.dirname)(r))}catch{throw Error("Path is not accessible.")}if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is not accessible.")}function d(e){let t;return f.has((t=e.lastIndexOf("."))>=0?e.slice(t+1).toLowerCase():"")}async function w(e,r,a){let o;if("string"!=typeof a)throw Error("Content must be a string.");if(Buffer.byteLength(a,"utf-8")>5242880)throw Error("This file is too large to save.");if(!d(r.replaceAll("\\","/").split("/").pop()||r))throw Error("Only text/code files can be edited.");let n=m(e,r);try{o=await t.promises.lstat(n)}catch{throw Error("Only files can be edited.")}if(o.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await h(e,r);if(!d((0,i.basename)(l)))throw Error("Only text/code files can be edited.");let c=await t.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let p=`${l}.${(0,s.randomUUID)()}.tmp`;try{await u(e,l),await t.promises.writeFile(p,a,{encoding:"utf-8",mode:511&c.mode}),await u(e,l),await t.promises.rename(p,l)}catch(e){throw await t.promises.rm(p,{force:!0}).catch(()=>{}),e}let f=await t.promises.stat(l);return{path:r.replaceAll("\\","/").replace(/^\/+/,""),size:f.size,mtime:f.mtimeMs}}async function y(e,r){await h(e,r);let i=m(e,r);if((await t.promises.lstat(i)).isDirectory())throw Error("Only files can be deleted.");await u(e,i),await t.promises.rm(i,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,y,"getWorkspaceDir",0,p,"hasControlChar",0,o,"isCrossOrigin",0,function(e){let t=e.headers.get("host");if(!t)return!0;let r=e.headers.get("sec-fetch-site");if(r)return"same-origin"!==r&&"same-site"!==r&&"none"!==r;let i=e.headers.get("origin");if(!i)return!1;try{return new URL(i).host!==t}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,h,"writeWorkspaceFile",0,w,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let t of n)e.push(`${t}/*`,`*/${t}/*`,t,`*/${t}`);for(let t of l)e.push(`*${t}`);return e.flatMap(e=>["-x",e])}])}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0t923su._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__08gtyud._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[254799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},270406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},814747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},688947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},17883,e=>{"use strict";var r=e.i(522734),t=e.i(446786),s=e.i(814747),i=e.i(254799);let o=(0,s.join)((0,t.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function a(e){for(let r=0;r<e.length;r+=1){let t=e.charCodeAt(r);if(t<32||127===t||t>=128&&t<=159||8232===t||8233===t)return!0}return!1}let n=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||n.has(e))||l.some(r=>e.endsWith(r))}async function p(){let e;try{let t=JSON.parse(await r.promises.readFile(o,"utf-8")),s=t.workspace,i=t.pid;"string"==typeof s&&s.trim()&&(!("number"==typeof i&&i>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(i))&&(e=s)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let t=(0,s.resolve)(e);if(!(await r.promises.stat(t)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return r.promises.realpath(t)}function d(e,r){if(a(r))throw Error("Invalid path.");let t=r.replaceAll("\\","/").replace(/^\/+/,"");if(t.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let i=(0,s.resolve)(e,t);if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is outside the workspace.");return i}async function h(e,t){let i,o=d(e,t);try{i=await r.promises.realpath(o)}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.");let a=(0,s.relative)(e,i);if(a&&a.split(s.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return i}let x=new Set(["txt","text","md","markdown","log","csv","tsv","json","jsonl","yaml","yml","toml","xml","ini","cfg","conf","env","py","js","jsx","ts","tsx","sh","bash","zsh","r","jl","cpp","cc","c","h","hpp","java","go","rs","rb","php","swift","kt","cs","sql","tex","bib","rst","css","scss","html"]);async function f(e,t){let i;try{i=await r.promises.realpath((0,s.dirname)(t))}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.")}function u(e){let r;return x.has((r=e.lastIndexOf("."))>=0?e.slice(r+1).toLowerCase():"")}async function m(e,t,o){let a;if("string"!=typeof o)throw Error("Content must be a string.");if(Buffer.byteLength(o,"utf-8")>5242880)throw Error("This file is too large to save.");if(!u(t.replaceAll("\\","/").split("/").pop()||t))throw Error("Only text/code files can be edited.");let n=d(e,t);try{a=await r.promises.lstat(n)}catch{throw Error("Only files can be edited.")}if(a.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await h(e,t);if(!u((0,s.basename)(l)))throw Error("Only text/code files can be edited.");let c=await r.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let p=`${l}.${(0,i.randomUUID)()}.tmp`;try{await f(e,l),await r.promises.writeFile(p,o,{encoding:"utf-8",mode:511&c.mode}),await f(e,l),await r.promises.rename(p,l)}catch(e){throw await r.promises.rm(p,{force:!0}).catch(()=>{}),e}let x=await r.promises.stat(l);return{path:t.replaceAll("\\","/").replace(/^\/+/,""),size:x.size,mtime:x.mtimeMs}}async function w(e,t){await h(e,t);let s=d(e,t);if((await r.promises.lstat(s)).isDirectory())throw Error("Only files can be deleted.");await f(e,s),await r.promises.rm(s,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,w,"getWorkspaceDir",0,p,"hasControlChar",0,a,"isCrossOrigin",0,function(e){let r=e.headers.get("host");if(!r)return!0;let t=e.headers.get("sec-fetch-site");if(t)return"same-origin"!==t&&"same-site"!==t&&"none"!==t;let s=e.headers.get("origin");if(!s)return!1;try{return new URL(s).host!==r}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,h,"writeWorkspaceFile",0,m,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let r of n)e.push(`${r}/*`,`*/${r}/*`,r,`*/${r}`);for(let r of l)e.push(`*${r}`);return e.flatMap(e=>["-x",e])}])}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0key-2n._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0c_9zoh._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[254799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},270406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},814747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},17883,e=>{"use strict";var r=e.i(522734),t=e.i(446786),s=e.i(814747),i=e.i(254799);let o=(0,s.join)((0,t.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function a(e){for(let r=0;r<e.length;r+=1){let t=e.charCodeAt(r);if(t<32||127===t||t>=128&&t<=159||8232===t||8233===t)return!0}return!1}let n=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||n.has(e))||l.some(r=>e.endsWith(r))}async function p(){let e;try{let t=JSON.parse(await r.promises.readFile(o,"utf-8")),s=t.workspace,i=t.pid;"string"==typeof s&&s.trim()&&(!("number"==typeof i&&i>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(i))&&(e=s)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let t=(0,s.resolve)(e);if(!(await r.promises.stat(t)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return r.promises.realpath(t)}function d(e,r){if(a(r))throw Error("Invalid path.");let t=r.replaceAll("\\","/").replace(/^\/+/,"");if(t.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let i=(0,s.resolve)(e,t);if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is outside the workspace.");return i}async function h(e,t){let i,o=d(e,t);try{i=await r.promises.realpath(o)}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.");let a=(0,s.relative)(e,i);if(a&&a.split(s.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return i}let f=new Set(["txt","text","md","markdown","log","csv","tsv","json","jsonl","yaml","yml","toml","xml","ini","cfg","conf","env","py","js","jsx","ts","tsx","sh","bash","zsh","r","jl","cpp","cc","c","h","hpp","java","go","rs","rb","php","swift","kt","cs","sql","tex","bib","rst","css","scss","html"]);async function x(e,t){let i;try{i=await r.promises.realpath((0,s.dirname)(t))}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.")}function u(e){let r;return f.has((r=e.lastIndexOf("."))>=0?e.slice(r+1).toLowerCase():"")}async function m(e,t,o){let a;if("string"!=typeof o)throw Error("Content must be a string.");if(Buffer.byteLength(o,"utf-8")>5242880)throw Error("This file is too large to save.");if(!u(t.replaceAll("\\","/").split("/").pop()||t))throw Error("Only text/code files can be edited.");let n=d(e,t);try{a=await r.promises.lstat(n)}catch{throw Error("Only files can be edited.")}if(a.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await h(e,t);if(!u((0,s.basename)(l)))throw Error("Only text/code files can be edited.");let c=await r.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let p=`${l}.${(0,i.randomUUID)()}.tmp`;try{await x(e,l),await r.promises.writeFile(p,o,{encoding:"utf-8",mode:511&c.mode}),await x(e,l),await r.promises.rename(p,l)}catch(e){throw await r.promises.rm(p,{force:!0}).catch(()=>{}),e}let f=await r.promises.stat(l);return{path:t.replaceAll("\\","/").replace(/^\/+/,""),size:f.size,mtime:f.mtimeMs}}async function w(e,t){await h(e,t);let s=d(e,t);if((await r.promises.lstat(s)).isDirectory())throw Error("Only files can be deleted.");await x(e,s),await r.promises.rm(s,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,w,"getWorkspaceDir",0,p,"hasControlChar",0,a,"isCrossOrigin",0,function(e){let r=e.headers.get("host");if(!r)return!0;let t=e.headers.get("sec-fetch-site");if(t)return"same-origin"!==t&&"same-site"!==t&&"none"!==t;let s=e.headers.get("origin");if(!s)return!1;try{return new URL(s).host!==r}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,h,"writeWorkspaceFile",0,m,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let r of n)e.push(`${r}/*`,`*/${r}/*`,r,`*/${r}`);for(let r of l)e.push(`*${r}`);return e.flatMap(e=>["-x",e])}])}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0zqsdzd._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0dsauq5._.js.map
@@ -0,0 +1,6 @@
1
+ module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},854032,e=>{"use strict";var t=e.i(89171),r=e.i(904937);async function a(e){try{let a="1"===e.nextUrl.searchParams.get("refresh"),i=await (0,r.getCatalog)(a);return t.NextResponse.json({skills:i})}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to load the skills catalog."},{status:502})}}e.s(["GET",0,a,"runtime",0,"nodejs"])},863384,e=>{"use strict";var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),w=e.i(193695);e.i(52474);var x=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/skills/catalog/route",pathname:"/api/skills/catalog",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/catalog/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(854032),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:y,serverHooks:R}=g;async function E(e,t,a){a.requestMeta&&(0,i.setRequestMeta)(e,a.requestMeta),g.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/skills/catalog/route";v=v.replace(/\/index$/,"")||"/";let y=await g.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:E,params:k,nextConfig:$,parsedUrl:b,isDraftMode:C,prerenderManifest:S,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,resolvedPathname:I,clientReferenceManifest:N,serverActionsManifest:q}=y,P=(0,o.normalizeAppPath)(v),_=!!(S.dynamicRoutes[P]||S.routes[I]),O=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,b,!1):t.end("This page could not be found"),null);if(_&&!C){let e=!!S.routes[I],t=S.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if($.adapterPath)return await O();throw new w.NoFallbackError}}let U=null;!_||g.isDev||C||(U="/index"===(U=I)?"/":U);let D=!0===g.isDev||!_,H=_&&!D;q&&N&&(0,s.setManifestsSingleton)({page:v,clientReferenceManifest:N,serverActionsManifest:q});let F=e.method||"GET",L=(0,n.getTracer)(),M=L.getActiveScopeSpan(),K=!!(null==A?void 0:A.isWrappedByNextServer),B=!!(0,i.getRequestMeta)(e,"minimalMode"),W=(0,i.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,$,S,B);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let G={params:k,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!$.experimental.authInterrupts,useCacheTimeout:$.experimental.useCacheTimeout},cacheComponents:!!$.cacheComponents,validationLevel:$.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:W,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:$.cacheLife,staticPageGenerationTimeout:$.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,i)=>g.onRequestError(e,t,a,i,A)},sharedContext:{buildId:R,deploymentId:E}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!B&&j&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await g.handle(X,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let n=G.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let s=G.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(z,V,i,n),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);s&&(t[f.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==r&&r>0?$.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),t}},J=async(i,s)=>{try{var o,l;let i=await g.handleResponse({req:e,nextConfig:$,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:B});if(!_)return;if((null==i||null==(o=i.value)?void 0:o.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",j?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);B&&_||n.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(z,V,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(t){if(t instanceof w.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),_)throw t;await (0,p.sendResponse)(z,V,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||P,o=`${F} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),i.updateName(o),s&&s!==i&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(K&&M)await J(M,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(c.BaseServerSpan.handleRequest,{spanName:`${F} ${v}`,kind:n.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!K)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:y})},"routeModule",0,g,"serverHooks",0,R,"workAsyncStorage",0,v,"workUnitAsyncStorage",0,y])},904937,e=>{"use strict";let t;var r=e.i(446786),a=e.i(814747),i=e.i(522734),n=e.i(254799);let s="EvoScientist/EvoSkills",o="main",l="skills/",u=(0,a.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,a.join)((0,r.homedir)(),t.slice(1)):(0,a.resolve)(t):(0,a.join)((0,r.homedir)(),".evoscientist"),"skills"),c=[u,(0,a.join)((0,r.homedir)(),".config","evoscientist","skills")],d={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"},p="EXPERT.md";async function h(e,t,r){try{let n=await i.promises.realpath((0,a.join)(e,t,r)),s=await i.promises.realpath(e);if(n!==s&&!n.startsWith(s+a.sep))return null;return await i.promises.readFile(n,"utf-8")}catch{return null}}function m(e){let t,{frontmatter:r}=x(e);if(!r)return!0;let a=r.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!a)return!0;let i=a[1],n=i.split("\n").find(e=>e.trim()),s=n?.match(/^[ \t]+/)?.[0]??" ",o=i.match(RegExp(`^${s}type\\s*:[ \\t]*(.*)$`,"m"));if(!o)return!0;let l=o[1].trim();if(""===l||"|"===l||">"===l)for(let e of(t=[],i.slice(i.indexOf(o[0])+o[0].length).split("\n"))){if(!e.trim())continue;let r=e.match(/^[ \t]+-[ \t]*(.+?)[ \t]*$/);if(!r||!e.startsWith(s))break;t.push(r[1])}else t=l.replace(/^\[|\]$/g,"").split(",");return t.map(e=>e.trim().replace(/^["']|["']$/g,"").toLowerCase()).filter(Boolean).includes("skill")}async function f(e){try{return(await i.promises.stat((0,a.join)(e,p))).isFile()}catch{return!1}}function w(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function x(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function g(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function v(e){let{frontmatter:t}=x(e);return t?g(t):{}}async function y(e){for(let t of c)try{let r=await i.promises.readFile((0,a.join)(t,e,"SKILL.md"),"utf-8"),n=v(r).version;if(n)return n}catch{}}function R(e,t){return`https://raw.githubusercontent.com/${s}/${e}/${t}`}let E=/^[0-9a-f]{7,40}$/,k=null;async function $(){try{let e=await fetch(`https://api.github.com/repos/${s}/commits/${o}`,{headers:d});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&E.test(t.sha))return t.sha}}catch{}return o}async function b(e=!1){if(!e&&k&&Date.now()-k.at<3e5)return{ref:k.ref,tree:k.tree};let t=await $(),r=await fetch(`https://api.github.com/repos/${s}/git/trees/${t}?recursive=1`,{headers:d});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let a=await r.json();if(!Array.isArray(a.tree))throw Error("Unexpected response from the skills catalog.");return k={at:Date.now(),ref:t,tree:a.tree},{ref:t,tree:a.tree}}function C(){return(0,a.join)(u,".installed.yaml")}async function S(){try{return function(e){let t={},r=null;for(let a of e.split("\n"))if(!(!a.trim()||a.trimStart().startsWith("#"))){if(/^\S/.test(a)){let e=a.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=a.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let a=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=a:"commit"===e[1]&&(t[r].commit=a)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await i.promises.readFile(C(),"utf-8"))}catch{return{}}}async function A(e){let t=C(),r=`${t}.${(0,n.randomUUID)()}.tmp`;await i.promises.mkdir(u,{recursive:!0}),await i.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let a of t)r+=`${a}:
2
+ `,e[a].commit&&(r+=` commit: ${e[a].commit}
3
+ `),r+=` source: ${e[a].source}
4
+ `;return r}(e),{mode:384}),await i.promises.rename(r,t)}async function j(e,t){let r=await S(),a=`${s}@${l}${e}`;r[e]=t?{source:a,commit:t}:{source:a},await A(r)}async function T(e){let t=await S();e in t&&(delete t[e],await A(t))}async function I(){let e=new Set;for(let t of c)try{for(let r of(await i.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function N(e=!1){let[{ref:t,tree:r},a]=await Promise.all([b(e),I()]),i=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),a=e.indexOf("/");if(a<=0)continue;let i=e.slice(0,a);(t.get(i)??t.set(i,[]).get(i)).push(r)}return t}(r);return(await Promise.all([...i.entries()].map(async([e,r])=>{let i,n,s=e,o="",u=!0,c=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(c)try{let r=await fetch(R(t,c.path),{headers:d}).then(e=>e.ok?e.text():""),a=v(r);s=a.name||e,o=a.description||"",n=a.version,u=m(r)}catch{}let h=a.has(e),f=h?await y(e):void 0,w=h&&!!n&&!!f&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),a=t.split(".").map(e=>parseInt(e,10)),i=Math.max(r.length,a.length);for(let e=0;e<i;e+=1){let t=r[e]??0,i=a[e]??0;if(Number.isNaN(t)||Number.isNaN(i))break;if(t!==i)return t>i?1:-1}return 0}(n,f)>0;return{name:e,title:s,description:o,fileCount:r.length,installed:h,latestVersion:n,installedVersion:f,updateAvailable:w,isExpert:(i=`${l}${e}/${p}`,r.some(e=>e.path===i)),isSkill:u}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function q(e){if(!w(e))throw Error("Invalid skill name.");let t=null,r=null,a=!1;for(let i of c){let n=await h(i,e,"SKILL.md");if(null!==n){t=n,a=!0,r=await h(i,e,p);break}}if(null===t){let{ref:a,tree:i}=await b(),n=async e=>{let t=await fetch(R(a,e),{headers:d});if(!t.ok)throw Error(`Failed to load skill (${t.status}).`);return t.text()},s=e=>i.some(t=>"blob"===t.type&&t.path===e),o=`${l}${e}/SKILL.md`;if(!s(o))throw Error(`Skill "${e}" was not found.`);t=await n(o);let u=`${l}${e}/${p}`;if(s(u))try{r=await n(u)}catch{}}let{frontmatter:i,body:n}=x(t),s=i?g(i):{},o=null!==i&&(null!=s.name||null!=s.description||null!=s.version);return{name:e,title:s.name||e,description:s.description||"",version:s.version,body:o?n:t.trim(),installed:a,expertBody:null===r?void 0:function(e){let{frontmatter:t,body:r}=x(e);return(null===t?e:r).trim()}(r)}}async function P(e){if(!w(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await b(),s=`${l}${e}/`,c=r.filter(e=>"blob"===e.type&&e.path.startsWith(s));if(0===c.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(c.length>300)throw Error("This skill has too many files to install.");if(c.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let p=(0,a.resolve)(u),h=(0,a.resolve)(p,e);if(h!==(0,a.join)(p,e))throw Error("Invalid skill name.");let m=(0,a.join)(p,`.installing-${e}-${(0,n.randomUUID)()}`);try{for(let e of(await i.promises.mkdir(m,{recursive:!0}),c)){let r=e.path.slice(s.length),n=(0,a.resolve)(m,r);if(n!==m&&!n.startsWith(m+a.sep))throw Error("Invalid file path in skill.");let o=await fetch(R(t,e.path),{headers:d});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await i.promises.mkdir((0,a.dirname)(n),{recursive:!0}),await i.promises.writeFile(n,l)}await i.promises.rm(h,{recursive:!0,force:!0}),await i.promises.mkdir(p,{recursive:!0}),await i.promises.rename(m,h)}catch(e){throw await i.promises.rm(m,{recursive:!0,force:!0}).catch(()=>{}),e}try{await j(e,t!==o&&E.test(t)?t:null)}catch{}return{files:c.length}}e.s(["SKILL_DIRS",0,c,"declaresSkillType",0,m,"getCatalog",0,N,"getSkillDetail",0,q,"installSkill",0,P,"isInstalledExpert",0,f,"isValidSkillName",0,w,"recordUninstall",0,T])}];
5
+
6
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0om1fsa._.js.map
@@ -0,0 +1,6 @@
1
+ module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},713149,e=>{"use strict";var t=e.i(89171),r=e.i(904937);async function a(e){try{let a=e.nextUrl.searchParams.get("name");if(!a)return t.NextResponse.json({error:"Missing skill name."},{status:400});let i=await (0,r.getSkillDetail)(a);return t.NextResponse.json(i)}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to load skill detail."},{status:400})}}e.s(["GET",0,a,"runtime",0,"nodejs"])},562441,e=>{"use strict";var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),w=e.i(193695);e.i(52474);var x=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/skills/detail/route",pathname:"/api/skills/detail",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/detail/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(713149),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:R}=v;async function E(e,t,a){a.requestMeta&&(0,i.setRequestMeta)(e,a.requestMeta),v.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/skills/detail/route";g=g.replace(/\/index$/,"")||"/";let y=await v.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:E,params:k,nextConfig:$,parsedUrl:b,isDraftMode:S,prerenderManifest:C,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,resolvedPathname:I,clientReferenceManifest:N,serverActionsManifest:q}=y,P=(0,o.normalizeAppPath)(g),_=!!(C.dynamicRoutes[P]||C.routes[I]),O=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,b,!1):t.end("This page could not be found"),null);if(_&&!S){let e=!!C.routes[I],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if($.adapterPath)return await O();throw new w.NoFallbackError}}let D=null;!_||v.isDev||S||(D="/index"===(D=I)?"/":D);let U=!0===v.isDev||!_,H=_&&!U;q&&N&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:N,serverActionsManifest:q});let M=e.method||"GET",F=(0,n.getTracer)(),L=F.getActiveScopeSpan(),K=!!(null==A?void 0:A.isWrappedByNextServer),B=!!(0,i.getRequestMeta)(e,"minimalMode"),W=(0,i.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,$,C,B);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let G={params:k,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!$.experimental.authInterrupts,useCacheTimeout:$.experimental.useCacheTimeout},cacheComponents:!!$.cacheComponents,validationLevel:$.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:W,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:$.cacheLife,staticPageGenerationTimeout:$.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,i)=>v.onRequestError(e,t,a,i,A)},sharedContext:{buildId:R,deploymentId:E}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!B&&j&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await v.handle(X,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let n=G.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let s=G.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(z,V,i,n),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);s&&(t[f.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==r&&r>0?$.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),t}},J=async(i,s)=>{try{var o,l;let i=await v.handleResponse({req:e,nextConfig:$,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:B});if(!_)return;if((null==i||null==(o=i.value)?void 0:o.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",j?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);B&&_||n.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(z,V,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(t){if(t instanceof w.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),_)throw t;await (0,p.sendResponse)(z,V,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||P,o=`${M} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),i.updateName(o),s&&s!==i&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(K&&L)await J(L,void 0);else{let t=F.getActiveScopeSpan();await F.withPropagatedContext(e.headers,()=>F.trace(c.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:n.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},e=>J(e,t)),void 0,!K)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,v,"serverHooks",0,R,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])},904937,e=>{"use strict";let t;var r=e.i(446786),a=e.i(814747),i=e.i(522734),n=e.i(254799);let s="EvoScientist/EvoSkills",o="main",l="skills/",u=(0,a.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,a.join)((0,r.homedir)(),t.slice(1)):(0,a.resolve)(t):(0,a.join)((0,r.homedir)(),".evoscientist"),"skills"),c=[u,(0,a.join)((0,r.homedir)(),".config","evoscientist","skills")],d={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"},p="EXPERT.md";async function h(e,t,r){try{let n=await i.promises.realpath((0,a.join)(e,t,r)),s=await i.promises.realpath(e);if(n!==s&&!n.startsWith(s+a.sep))return null;return await i.promises.readFile(n,"utf-8")}catch{return null}}function m(e){let t,{frontmatter:r}=x(e);if(!r)return!0;let a=r.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!a)return!0;let i=a[1],n=i.split("\n").find(e=>e.trim()),s=n?.match(/^[ \t]+/)?.[0]??" ",o=i.match(RegExp(`^${s}type\\s*:[ \\t]*(.*)$`,"m"));if(!o)return!0;let l=o[1].trim();if(""===l||"|"===l||">"===l)for(let e of(t=[],i.slice(i.indexOf(o[0])+o[0].length).split("\n"))){if(!e.trim())continue;let r=e.match(/^[ \t]+-[ \t]*(.+?)[ \t]*$/);if(!r||!e.startsWith(s))break;t.push(r[1])}else t=l.replace(/^\[|\]$/g,"").split(",");return t.map(e=>e.trim().replace(/^["']|["']$/g,"").toLowerCase()).filter(Boolean).includes("skill")}async function f(e){try{return(await i.promises.stat((0,a.join)(e,p))).isFile()}catch{return!1}}function w(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function x(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function v(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function g(e){let{frontmatter:t}=x(e);return t?v(t):{}}async function y(e){for(let t of c)try{let r=await i.promises.readFile((0,a.join)(t,e,"SKILL.md"),"utf-8"),n=g(r).version;if(n)return n}catch{}}function R(e,t){return`https://raw.githubusercontent.com/${s}/${e}/${t}`}let E=/^[0-9a-f]{7,40}$/,k=null;async function $(){try{let e=await fetch(`https://api.github.com/repos/${s}/commits/${o}`,{headers:d});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&E.test(t.sha))return t.sha}}catch{}return o}async function b(e=!1){if(!e&&k&&Date.now()-k.at<3e5)return{ref:k.ref,tree:k.tree};let t=await $(),r=await fetch(`https://api.github.com/repos/${s}/git/trees/${t}?recursive=1`,{headers:d});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let a=await r.json();if(!Array.isArray(a.tree))throw Error("Unexpected response from the skills catalog.");return k={at:Date.now(),ref:t,tree:a.tree},{ref:t,tree:a.tree}}function S(){return(0,a.join)(u,".installed.yaml")}async function C(){try{return function(e){let t={},r=null;for(let a of e.split("\n"))if(!(!a.trim()||a.trimStart().startsWith("#"))){if(/^\S/.test(a)){let e=a.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=a.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let a=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=a:"commit"===e[1]&&(t[r].commit=a)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await i.promises.readFile(S(),"utf-8"))}catch{return{}}}async function A(e){let t=S(),r=`${t}.${(0,n.randomUUID)()}.tmp`;await i.promises.mkdir(u,{recursive:!0}),await i.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let a of t)r+=`${a}:
2
+ `,e[a].commit&&(r+=` commit: ${e[a].commit}
3
+ `),r+=` source: ${e[a].source}
4
+ `;return r}(e),{mode:384}),await i.promises.rename(r,t)}async function j(e,t){let r=await C(),a=`${s}@${l}${e}`;r[e]=t?{source:a,commit:t}:{source:a},await A(r)}async function T(e){let t=await C();e in t&&(delete t[e],await A(t))}async function I(){let e=new Set;for(let t of c)try{for(let r of(await i.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function N(e=!1){let[{ref:t,tree:r},a]=await Promise.all([b(e),I()]),i=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),a=e.indexOf("/");if(a<=0)continue;let i=e.slice(0,a);(t.get(i)??t.set(i,[]).get(i)).push(r)}return t}(r);return(await Promise.all([...i.entries()].map(async([e,r])=>{let i,n,s=e,o="",u=!0,c=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(c)try{let r=await fetch(R(t,c.path),{headers:d}).then(e=>e.ok?e.text():""),a=g(r);s=a.name||e,o=a.description||"",n=a.version,u=m(r)}catch{}let h=a.has(e),f=h?await y(e):void 0,w=h&&!!n&&!!f&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),a=t.split(".").map(e=>parseInt(e,10)),i=Math.max(r.length,a.length);for(let e=0;e<i;e+=1){let t=r[e]??0,i=a[e]??0;if(Number.isNaN(t)||Number.isNaN(i))break;if(t!==i)return t>i?1:-1}return 0}(n,f)>0;return{name:e,title:s,description:o,fileCount:r.length,installed:h,latestVersion:n,installedVersion:f,updateAvailable:w,isExpert:(i=`${l}${e}/${p}`,r.some(e=>e.path===i)),isSkill:u}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function q(e){if(!w(e))throw Error("Invalid skill name.");let t=null,r=null,a=!1;for(let i of c){let n=await h(i,e,"SKILL.md");if(null!==n){t=n,a=!0,r=await h(i,e,p);break}}if(null===t){let{ref:a,tree:i}=await b(),n=async e=>{let t=await fetch(R(a,e),{headers:d});if(!t.ok)throw Error(`Failed to load skill (${t.status}).`);return t.text()},s=e=>i.some(t=>"blob"===t.type&&t.path===e),o=`${l}${e}/SKILL.md`;if(!s(o))throw Error(`Skill "${e}" was not found.`);t=await n(o);let u=`${l}${e}/${p}`;if(s(u))try{r=await n(u)}catch{}}let{frontmatter:i,body:n}=x(t),s=i?v(i):{},o=null!==i&&(null!=s.name||null!=s.description||null!=s.version);return{name:e,title:s.name||e,description:s.description||"",version:s.version,body:o?n:t.trim(),installed:a,expertBody:null===r?void 0:function(e){let{frontmatter:t,body:r}=x(e);return(null===t?e:r).trim()}(r)}}async function P(e){if(!w(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await b(),s=`${l}${e}/`,c=r.filter(e=>"blob"===e.type&&e.path.startsWith(s));if(0===c.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(c.length>300)throw Error("This skill has too many files to install.");if(c.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let p=(0,a.resolve)(u),h=(0,a.resolve)(p,e);if(h!==(0,a.join)(p,e))throw Error("Invalid skill name.");let m=(0,a.join)(p,`.installing-${e}-${(0,n.randomUUID)()}`);try{for(let e of(await i.promises.mkdir(m,{recursive:!0}),c)){let r=e.path.slice(s.length),n=(0,a.resolve)(m,r);if(n!==m&&!n.startsWith(m+a.sep))throw Error("Invalid file path in skill.");let o=await fetch(R(t,e.path),{headers:d});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await i.promises.mkdir((0,a.dirname)(n),{recursive:!0}),await i.promises.writeFile(n,l)}await i.promises.rm(h,{recursive:!0,force:!0}),await i.promises.mkdir(p,{recursive:!0}),await i.promises.rename(m,h)}catch(e){throw await i.promises.rm(m,{recursive:!0,force:!0}).catch(()=>{}),e}try{await j(e,t!==o&&E.test(t)?t:null)}catch{}return{files:c.length}}e.s(["SKILL_DIRS",0,c,"declaresSkillType",0,m,"getCatalog",0,N,"getSkillDetail",0,q,"installSkill",0,P,"isInstalledExpert",0,f,"isValidSkillName",0,w,"recordUninstall",0,T])}];
5
+
6
+ //# sourceMappingURL=%5Broot-of-the-server%5D__19l67fj._.js.map
@@ -0,0 +1,6 @@
1
+ module.exports=[254799,(t,e,r)=>{e.exports=t.x("crypto",()=>require("crypto"))},522734,(t,e,r)=>{e.exports=t.x("fs",()=>require("fs"))},270406,(t,e,r)=>{e.exports=t.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(t,e,r)=>{e.exports=t.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(t,e,r)=>{e.exports=t.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(t,e,r)=>{e.exports=t.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(t,e,r)=>{e.exports=t.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(t,e,r)=>{e.exports=t.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(t,e,r)=>{e.exports=t.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(t,e,r)=>{e.exports=t.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(t,e,r)=>{e.exports=t.x("node:stream",()=>require("node:stream"))},446786,(t,e,r)=>{e.exports=t.x("os",()=>require("os"))},814747,(t,e,r)=>{e.exports=t.x("path",()=>require("path"))},904937,t=>{"use strict";let e;var r=t.i(446786),i=t.i(814747),a=t.i(522734),s=t.i(254799);let n="EvoScientist/EvoSkills",o="main",l="skills/",c=(0,i.join)((e=process.env.EVOSCIENTIST_DATA_DIR)&&e.trim()?e.startsWith("~")?(0,i.join)((0,r.homedir)(),e.slice(1)):(0,i.resolve)(e):(0,i.join)((0,r.homedir)(),".evoscientist"),"skills"),u=[c,(0,i.join)((0,r.homedir)(),".config","evoscientist","skills")],p={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"},m="EXPERT.md";async function f(t,e,r){try{let s=await a.promises.realpath((0,i.join)(t,e,r)),n=await a.promises.realpath(t);if(s!==n&&!s.startsWith(n+i.sep))return null;return await a.promises.readFile(s,"utf-8")}catch{return null}}function d(t){let e,{frontmatter:r}=x(t);if(!r)return!0;let i=r.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!i)return!0;let a=i[1],s=a.split("\n").find(t=>t.trim()),n=s?.match(/^[ \t]+/)?.[0]??" ",o=a.match(RegExp(`^${n}type\\s*:[ \\t]*(.*)$`,"m"));if(!o)return!0;let l=o[1].trim();if(""===l||"|"===l||">"===l)for(let t of(e=[],a.slice(a.indexOf(o[0])+o[0].length).split("\n"))){if(!t.trim())continue;let r=t.match(/^[ \t]+-[ \t]*(.+?)[ \t]*$/);if(!r||!t.startsWith(n))break;e.push(r[1])}else e=l.replace(/^\[|\]$/g,"").split(",");return e.map(t=>t.trim().replace(/^["']|["']$/g,"").toLowerCase()).filter(Boolean).includes("skill")}async function h(t){try{return(await a.promises.stat((0,i.join)(t,m))).isFile()}catch{return!1}}function w(t){return t.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(t)&&!t.includes("..")}function x(t){let e=t.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return e?{frontmatter:e[1],body:t.slice(e[0].length).trim()}:{frontmatter:null,body:t.trim()}}function y(t){let e=e=>{let r=t.match(RegExp(`^${e}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:e("name"),description:e("description"),version:function(t){let e=t.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!e)return;let r=e[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(t)}}function $(t){let{frontmatter:e}=x(t);return e?y(e):{}}async function g(t){for(let e of u)try{let r=await a.promises.readFile((0,i.join)(e,t,"SKILL.md"),"utf-8"),s=$(r).version;if(s)return s}catch{}}function v(t,e){return`https://raw.githubusercontent.com/${n}/${t}/${e}`}let k=/^[0-9a-f]{7,40}$/,b=null;async function j(){try{let t=await fetch(`https://api.github.com/repos/${n}/commits/${o}`,{headers:p});if(t.ok){let e=await t.json();if("string"==typeof e.sha&&k.test(e.sha))return e.sha}}catch{}return o}async function E(t=!1){if(!t&&b&&Date.now()-b.at<3e5)return{ref:b.ref,tree:b.tree};let e=await j(),r=await fetch(`https://api.github.com/repos/${n}/git/trees/${e}?recursive=1`,{headers:p});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let i=await r.json();if(!Array.isArray(i.tree))throw Error("Unexpected response from the skills catalog.");return b={at:Date.now(),ref:e,tree:i.tree},{ref:e,tree:i.tree}}function S(){return(0,i.join)(c,".installed.yaml")}async function I(){try{return function(t){let e={},r=null;for(let i of t.split("\n"))if(!(!i.trim()||i.trimStart().startsWith("#"))){if(/^\S/.test(i)){let t=i.match(/^(\S[^:]*?):\s*$/);(r=t?t[1].trim():null)&&(e[r]={source:""})}else if(r){let t=i.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(t){let i=t[2].replace(/^["']|["']$/g,"").trim();"source"===t[1]?e[r].source=i:"commit"===t[1]&&(e[r].commit=i)}}}for(let t of Object.keys(e))e[t].source||delete e[t];return e}(await a.promises.readFile(S(),"utf-8"))}catch{return{}}}async function q(t){let e=S(),r=`${e}.${(0,s.randomUUID)()}.tmp`;await a.promises.mkdir(c,{recursive:!0}),await a.promises.writeFile(r,function(t){let e=Object.keys(t).sort();if(0===e.length)return"{}\n";let r="";for(let i of e)r+=`${i}:
2
+ `,t[i].commit&&(r+=` commit: ${t[i].commit}
3
+ `),r+=` source: ${t[i].source}
4
+ `;return r}(t),{mode:384}),await a.promises.rename(r,e)}async function L(t,e){let r=await I(),i=`${n}@${l}${t}`;r[t]=e?{source:i,commit:e}:{source:i},await q(r)}async function A(t){let e=await I();t in e&&(delete e[t],await q(e))}async function D(){let t=new Set;for(let e of u)try{for(let r of(await a.promises.readdir(e,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&t.add(r.name)}catch{}return t}async function F(t=!1){let[{ref:e,tree:r},i]=await Promise.all([E(t),D()]),a=function(t){let e=new Map;for(let r of t){if("blob"!==r.type||!r.path.startsWith(l))continue;let t=r.path.slice(l.length),i=t.indexOf("/");if(i<=0)continue;let a=t.slice(0,i);(e.get(a)??e.set(a,[]).get(a)).push(r)}return e}(r);return(await Promise.all([...a.entries()].map(async([t,r])=>{let a,s,n=t,o="",c=!0,u=r.find(e=>e.path===`${l}${t}/SKILL.md`);if(u)try{let r=await fetch(v(e,u.path),{headers:p}).then(t=>t.ok?t.text():""),i=$(r);n=i.name||t,o=i.description||"",s=i.version,c=d(r)}catch{}let f=i.has(t),h=f?await g(t):void 0,w=f&&!!s&&!!h&&function(t,e){let r=t.split(".").map(t=>parseInt(t,10)),i=e.split(".").map(t=>parseInt(t,10)),a=Math.max(r.length,i.length);for(let t=0;t<a;t+=1){let e=r[t]??0,a=i[t]??0;if(Number.isNaN(e)||Number.isNaN(a))break;if(e!==a)return e>a?1:-1}return 0}(s,h)>0;return{name:t,title:n,description:o,fileCount:r.length,installed:f,latestVersion:s,installedVersion:h,updateAvailable:w,isExpert:(a=`${l}${t}/${m}`,r.some(t=>t.path===a)),isSkill:c}}))).sort((t,e)=>t.title.localeCompare(e.title))}async function N(t){if(!w(t))throw Error("Invalid skill name.");let e=null,r=null,i=!1;for(let a of u){let s=await f(a,t,"SKILL.md");if(null!==s){e=s,i=!0,r=await f(a,t,m);break}}if(null===e){let{ref:i,tree:a}=await E(),s=async t=>{let e=await fetch(v(i,t),{headers:p});if(!e.ok)throw Error(`Failed to load skill (${e.status}).`);return e.text()},n=t=>a.some(e=>"blob"===e.type&&e.path===t),o=`${l}${t}/SKILL.md`;if(!n(o))throw Error(`Skill "${t}" was not found.`);e=await s(o);let c=`${l}${t}/${m}`;if(n(c))try{r=await s(c)}catch{}}let{frontmatter:a,body:s}=x(e),n=a?y(a):{},o=null!==a&&(null!=n.name||null!=n.description||null!=n.version);return{name:t,title:n.name||t,description:n.description||"",version:n.version,body:o?s:e.trim(),installed:i,expertBody:null===r?void 0:function(t){let{frontmatter:e,body:r}=x(t);return(null===e?t:r).trim()}(r)}}async function T(t){if(!w(t))throw Error("Invalid skill name.");let{ref:e,tree:r}=await E(),n=`${l}${t}/`,u=r.filter(t=>"blob"===t.type&&t.path.startsWith(n));if(0===u.length)throw Error(`Skill "${t}" was not found in the catalog.`);if(u.length>300)throw Error("This skill has too many files to install.");if(u.reduce((t,e)=>t+(e.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let m=(0,i.resolve)(c),f=(0,i.resolve)(m,t);if(f!==(0,i.join)(m,t))throw Error("Invalid skill name.");let d=(0,i.join)(m,`.installing-${t}-${(0,s.randomUUID)()}`);try{for(let t of(await a.promises.mkdir(d,{recursive:!0}),u)){let r=t.path.slice(n.length),s=(0,i.resolve)(d,r);if(s!==d&&!s.startsWith(d+i.sep))throw Error("Invalid file path in skill.");let o=await fetch(v(e,t.path),{headers:p});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await a.promises.mkdir((0,i.dirname)(s),{recursive:!0}),await a.promises.writeFile(s,l)}await a.promises.rm(f,{recursive:!0,force:!0}),await a.promises.mkdir(m,{recursive:!0}),await a.promises.rename(d,f)}catch(t){throw await a.promises.rm(d,{recursive:!0,force:!0}).catch(()=>{}),t}try{await L(t,e!==o&&k.test(e)?e:null)}catch{}return{files:u.length}}t.s(["SKILL_DIRS",0,u,"declaresSkillType",0,d,"getCatalog",0,F,"getSkillDetail",0,N,"installSkill",0,T,"isInstalledExpert",0,h,"isValidSkillName",0,w,"recordUninstall",0,A])}];
5
+
6
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1nb3ezt._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[856042,e=>{"use strict";var t=e.i(89171),a=e.i(814747),r=e.i(522734),n=e.i(904937);async function i(){let e=[],t=new Set;for(let i of n.SKILL_DIRS){let n,s=[];try{s=await r.promises.readdir(i),n=await r.promises.realpath(i)}catch{continue}for(let o of s){if(o.startsWith("."))continue;let s=(0,a.join)(i,o);try{let i=await r.promises.realpath(s);if(i!==n&&!i.startsWith(n+a.sep)||!(await r.promises.stat(i)).isDirectory())continue;let l=await r.promises.readFile((0,a.join)(i,"SKILL.md"),"utf-8"),{name:u,description:c}=function(e){let t=e.match(/^---\s*\n([\s\S]*?)\n---/);if(!t)return{};let a=t[1],r=e=>{let t=a.match(RegExp(`^${e}\\s*:\\s*(.+?)\\s*$`,"m"));if(t)return t[1].replace(/^["']|["']$/g,"").trim()};return{name:r("name"),description:r("description")}}(l);if(t.has(o))continue;t.add(o),e.push({name:o,title:u||o,description:c||"",dir:s})}catch{}}}return e.sort((e,t)=>e.name.localeCompare(t.name))}async function s(){try{let e=await i();return t.NextResponse.json({skills:e})}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to read skills"},{status:500})}}async function o(e){let i=e.nextUrl.searchParams.get("name");if(!i||!(0,n.isValidSkillName)(i))return t.NextResponse.json({error:"Invalid skill name"},{status:400});for(let e of n.SKILL_DIRS){let s=(0,a.resolve)((0,a.join)(e,i));if(s===(0,a.resolve)(e)||s.startsWith((0,a.resolve)(e)+a.sep)){try{if(!(await r.promises.stat(s)).isDirectory())continue}catch{continue}return await r.promises.rm(s,{recursive:!0,force:!0}),await (0,n.recordUninstall)(i).catch(()=>{}),t.NextResponse.json({ok:!0})}}return t.NextResponse.json({error:"Skill not found"},{status:404})}e.s(["DELETE",0,o,"GET",0,s])},987542,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),n=e.i(759756),i=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),h=e.i(570101),R=e.i(626937),m=e.i(10372),f=e.i(193695);e.i(52474);var v=e.i(600220);let w=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(856042),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:E,serverHooks:x}=w;async function C(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/skills/route";g=g.replace(/\/index$/,"")||"/";let E=await w.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:C,params:y,nextConfig:S,parsedUrl:A,isDraftMode:T,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:b,revalidateOnlyGenerated:_,resolvedPathname:I,clientReferenceManifest:k,serverActionsManifest:O}=E,q=(0,o.normalizeAppPath)(g),H=!!(N.dynamicRoutes[q]||N.routes[I]),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,A,!1):t.end("This page could not be found"),null);if(H&&!T){let e=!!N.routes[I],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await D();throw new f.NoFallbackError}}let U=null;!H||w.isDev||T||(U="/index"===(U=I)?"/":U);let M=!0===w.isDev||!H,j=H&&!M;O&&k&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:k,serverActionsManifest:O});let L=e.method||"GET",K=(0,i.getTracer)(),F=K.getActiveScopeSpan(),$=!!(null==P?void 0:P.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,S,N,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let W={params:y,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts,useCacheTimeout:S.experimental.useCacheTimeout},cacheComponents:!!S.cacheComponents,validationLevel:S.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:S.cacheLife,staticPageGenerationTimeout:S.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>w.onRequestError(e,t,r,n,P)},sharedContext:{buildId:x,deploymentId:C}},V=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!B&&b&&_&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await w.handle(z,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let s=W.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,X,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);s&&(t[m.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?S.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:b})},!1,P),t}},J=async(n,s)=>{try{var o,l;let n=await w.handleResponse({req:e,nextConfig:S,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:_,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:B});if(!H)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",b?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&H||i.delete(m.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(V,X,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof f.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:b})},!1,P),H)throw t;await (0,p.sendResponse)(V,X,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=K.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||q,o=`${L} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":o}),n.updateName(o),s&&s!==n&&(s.setAttribute("http.route",r),s.updateName(o))})()}};if($&&F)await J(F,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(c.BaseServerSpan.handleRequest,{spanName:`${L} ${g}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>J(e,t)),void 0,!$)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:E})},"routeModule",0,w,"serverHooks",0,x,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,E])}];
1
+ module.exports=[856042,e=>{"use strict";var t=e.i(89171),a=e.i(814747),r=e.i(522734),n=e.i(904937);async function i(){let e=[],t=new Set;for(let i of n.SKILL_DIRS){let s,o=[];try{o=await r.promises.readdir(i),s=await r.promises.realpath(i)}catch{continue}for(let l of o){if(l.startsWith("."))continue;let o=(0,a.join)(i,l);try{let i=await r.promises.realpath(o);if(i!==s&&!i.startsWith(s+a.sep)||!(await r.promises.stat(i)).isDirectory())continue;let u=await r.promises.readFile((0,a.join)(i,"SKILL.md"),"utf-8"),{name:d,description:c}=function(e){let t=e.match(/^---\s*\n([\s\S]*?)\n---/);if(!t)return{};let a=t[1],r=e=>{let t=a.match(RegExp(`^${e}\\s*:\\s*(.+?)\\s*$`,"m"));if(t)return t[1].replace(/^["']|["']$/g,"").trim()};return{name:r("name"),description:r("description")}}(u);if(t.has(l))continue;t.add(l),e.push({name:l,title:d||l,description:c||"",dir:o,isExpert:await (0,n.isInstalledExpert)(i),isSkill:(0,n.declaresSkillType)(u)})}catch{}}}return e.sort((e,t)=>e.name.localeCompare(t.name))}async function s(){try{let e=await i();return t.NextResponse.json({skills:e})}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to read skills"},{status:500})}}async function o(e){let i=e.nextUrl.searchParams.get("name");if(!i||!(0,n.isValidSkillName)(i))return t.NextResponse.json({error:"Invalid skill name"},{status:400});for(let e of n.SKILL_DIRS){let s=(0,a.resolve)((0,a.join)(e,i));if(s===(0,a.resolve)(e)||s.startsWith((0,a.resolve)(e)+a.sep)){try{if(!(await r.promises.stat(s)).isDirectory())continue}catch{continue}return await r.promises.rm(s,{recursive:!0,force:!0}),await (0,n.recordUninstall)(i).catch(()=>{}),t.NextResponse.json({ok:!0})}}return t.NextResponse.json({error:"Skill not found"},{status:404})}e.s(["DELETE",0,o,"GET",0,s])},987542,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),n=e.i(759756),i=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),R=e.i(626937),m=e.i(10372),f=e.i(193695);e.i(52474);var v=e.i(600220);let w=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(856042),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:g,serverHooks:x}=w;async function C(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/skills/route";E=E.replace(/\/index$/,"")||"/";let g=await w.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:C,params:y,nextConfig:S,parsedUrl:T,isDraftMode:A,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:b,revalidateOnlyGenerated:k,resolvedPathname:I,clientReferenceManifest:_,serverActionsManifest:O}=g,q=(0,o.normalizeAppPath)(E),H=!!(N.dynamicRoutes[q]||N.routes[I]),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,T,!1):t.end("This page could not be found"),null);if(H&&!A){let e=!!N.routes[I],t=N.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await D();throw new f.NoFallbackError}}let U=null;!H||w.isDev||A||(U="/index"===(U=I)?"/":U);let M=!0===w.isDev||!H,j=H&&!M;O&&_&&(0,s.setManifestsSingleton)({page:E,clientReferenceManifest:_,serverActionsManifest:O});let L=e.method||"GET",K=(0,i.getTracer)(),F=K.getActiveScopeSpan(),$=!!(null==P?void 0:P.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,S,N,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let W={params:y,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts,useCacheTimeout:S.experimental.useCacheTimeout},cacheComponents:!!S.cacheComponents,validationLevel:S.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:S.cacheLife,staticPageGenerationTimeout:S.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>w.onRequestError(e,t,r,n,P)},sharedContext:{buildId:x,deploymentId:C}},V=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!B&&b&&k&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await w.handle(z,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let i=W.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let s=W.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(V,X,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);s&&(t[m.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?S.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:b})},!1,P),t}},J=async(n,s)=>{try{var o,l;let n=await w.handleResponse({req:e,nextConfig:S,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:k,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:B});if(!H)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",b?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&H||i.delete(m.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(V,X,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof f.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:b})},!1,P),H)throw t;await (0,p.sendResponse)(V,X,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=K.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||q,o=`${L} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":o}),n.updateName(o),s&&s!==n&&(s.setAttribute("http.route",r),s.updateName(o))})()}};if($&&F)await J(F,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${E}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>J(e,t)),void 0,!$)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:g})},"routeModule",0,w,"serverHooks",0,x,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,g])}];
2
2
 
3
3
  //# sourceMappingURL=_13lro7d._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(882458);a.i(416635),a.i(43429),a.i(428212),a.i(916573),a.i(789676),a.i(956864),a.i(166292),a.i(887370);var e=a.i(261234),f=a.i(875117),g=a.i(539110);let h=new Uint8Array(16),i=[];for(let a=0;a<256;++a)i.push((a+256).toString(16).slice(1));var j=a.i(21288),k=a.i(526987),l=a.i(524703),m=function(){var a=(0,g.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],h=[1,20],i=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,6,13,15,16,19,22],p=[1,33],q=[1,34],r=[1,6,7,11,13,15,16,19,22],s={trace:(0,g.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,g.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 16:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 17:case 21:d.decorateNode({class:f[h]});break;case 18:d.getLogger().trace("SPACELIST");break;case 19:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 20:d.decorateNode({icon:f[h]});break;case 25:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 26:this.$={id:f[h],descr:f[h],type:d.nodeType.DEFAULT};break;case 27:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:c,9:22,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:k,7:l,10:23,11:m},a(n,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:i}),a(n,[2,18]),a(n,[2,19]),a(n,[2,20]),a(n,[2,21]),a(n,[2,23]),a(n,[2,24]),a(n,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:l,10:32,11:m},{1:[2,7],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(o,[2,14],{7:p,11:q}),a(r,[2,8]),a(r,[2,9]),a(r,[2,10]),a(n,[2,15]),a(n,[2,16]),a(n,[2,17]),{20:[1,35]},{21:[1,36]},a(o,[2,13],{7:p,11:q}),a(r,[2,11]),a(r,[2,12]),{21:[1,37]},a(n,[2,25]),a(n,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,g.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.__name)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function t(){this.yy={}}return s.lexer={EOF:1,parseError:(0,g.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.__name)(function(){return this._more=!0,this},"more"),reject:(0,g.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,g.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.__name)(function(a,b,c,d){switch(c){case 0:return a.getLogger().trace("Found comment",b.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return a.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:a.getLogger().trace("end icon"),this.popState();break;case 10:return a.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return a.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 27:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return a.getLogger().trace("Long description:",b.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,g.__name)(t,"Parser"),t.prototype=s,s.Parser=t,new t}();m.parser=m;var n={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},o=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=n,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,g.__name)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(a){for(let b=this.nodes.length-1;b>=0;b--)if(this.nodes[b].level<a)return this.nodes[b];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(a,b,c,d){f.log.info("addNode",a,b,c,d);let g=!1;0===this.nodes.length?(this.baseLevel=a,a=0,g=!0):void 0!==this.baseLevel&&(a-=this.baseLevel,g=!1);let h=(0,e.getConfig2)(),i=h.mindmap?.padding??e.defaultConfig_default.mindmap.padding;switch(d){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:i*=2}let j={id:this.count++,nodeId:(0,e.sanitizeText)(b,h),level:a,descr:(0,e.sanitizeText)(c,h),type:d,children:[],width:h.mindmap?.maxNodeWidth??e.defaultConfig_default.mindmap.maxNodeWidth,padding:i,isRoot:g},k=this.getParent(a);if(k)k.children.push(j),this.nodes.push(j);else if(g)this.nodes.push(j);else throw Error(`There can be only one root. No parent could be found for ("${j.descr}")`)}getType(a,b){switch(f.log.debug("In get type",a,b),a){case"[":return this.nodeType.RECT;case"(":return")"===b?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}decorateNode(a){if(!a)return;let b=(0,e.getConfig2)(),c=this.nodes[this.nodes.length-1];a.icon&&(c.icon=(0,e.sanitizeText)(a.icon,b)),a.class&&(c.class=(0,e.sanitizeText)(a.class,b))}type2Str(a){switch(a){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(a,b){if(0===a.level?a.section=void 0:a.section=b,a.children)for(let[c,d]of a.children.entries()){let e=0===a.level?c%11:b;this.assignSections(d,e)}}flattenNodes(a,b){let c=(0,e.getConfig2)(),d=["mindmap-node"];!0===a.isRoot?d.push("section-root","section--1"):void 0!==a.section&&d.push(`section-${a.section}`),a.class&&d.push(a.class);let f=d.join(" "),h=(0,g.__name)(a=>{let b=(c.theme?.toLowerCase()??"").includes("redux");switch(a){case n.CIRCLE:return"mindmapCircle";case n.RECT:return"rect";case n.ROUNDED_RECT:return"rounded";case n.CLOUD:return"cloud";case n.BANG:return"bang";case n.HEXAGON:return"hexagon";case n.DEFAULT:return b?"rounded":"defaultMindmapNode";case n.NO_BORDER:default:return"rect"}},"getShapeFromType"),i={id:a.id.toString(),domId:"node_"+a.id.toString(),label:a.descr,labelType:"markdown",isGroup:!1,shape:h(a.type),width:a.width,height:a.height??0,padding:a.padding,cssClasses:f,cssStyles:[],look:c.look,icon:a.icon,x:a.x,y:a.y,level:a.level,nodeId:a.nodeId,type:a.type,section:a.section};if(b.push(i),a.children)for(let c of a.children)this.flattenNodes(c,b)}generateEdges(a,b){if(!a.children)return;let c=(0,e.getConfig2)();for(let d of a.children){let e="edge";void 0!==d.section&&(e+=` section-edge-${d.section}`);let f=a.level+1;e+=` edge-depth-${f}`;let g={id:`edge_${a.id}_${d.id}`,start:a.id.toString(),end:d.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:c.look,classes:e,depth:a.level,section:d.section};b.push(g),this.generateEdges(d,b)}}getData(){let a=this.getMindmap(),b=(0,e.getConfig2)();if(void 0!==(0,e.getUserDefinedConfig)().layout||(b.layout="cose-bilkent"),!a)return{nodes:[],edges:[],config:b};f.log.debug("getData: mindmapRoot",a,b),this.assignSections(a);let c=[],d=[];this.flattenNodes(a,c),this.generateEdges(a,d),f.log.debug(`getData: processed ${c.length} nodes and ${d.length} edges`);let g=new Map;for(let a of c)g.set(a.id,{shape:a.shape,width:a.width,height:a.height,padding:a.padding});return{nodes:c,edges:d,config:b,rootNode:a,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(g),type:"mindmap",diagramId:"mindmap-"+(crypto.randomUUID?crypto.randomUUID():function(a,b,c){let d=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(h);if(d.length<16)throw Error("Random bytes length must be >= 16");if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=d[a];return b}return function(a,b=0){return(i[a[b+0]]+i[a[b+1]]+i[a[b+2]]+i[a[b+3]]+"-"+i[a[b+4]]+i[a[b+5]]+"-"+i[a[b+6]]+i[a[b+7]]+"-"+i[a[b+8]]+i[a[b+9]]+"-"+i[a[b+10]]+i[a[b+11]]+i[a[b+12]]+i[a[b+13]]+i[a[b+14]]+i[a[b+15]]).toLowerCase()}(d)}(void 0,void 0,void 0))}}getLogger(){return f.log}},p=(0,g.__name)(async(a,g,h,i)=>{f.log.debug("Rendering mindmap diagram\n"+a);let j=i.db,k=j.getData(),l=(0,b.getDiagramElement)(g,k.config.securityLevel);if(k.type=i.type,k.layoutAlgorithm=(0,d.getRegisteredLayoutAlgorithm)(k.config.layout,{fallback:"cose-bilkent"}),k.diagramId=g,!j.getMindmap())return;k.nodes.forEach(a=>{"rounded"===a.shape?(a.radius=15,a.taper=15,a.stroke="none",a.width=0,a.padding=15):"circle"===a.shape?a.padding=10:"rect"===a.shape?(a.width=0,a.padding=10):"hexagon"===a.shape&&(a.width=0,a.height=0)}),await (0,d.render)(k,l);let{themeVariables:m}=(0,e.getConfig)(),{useGradient:n,gradientStart:o,gradientStop:p}=m;if(n&&o&&p){let a=l.attr("id"),b=l.append("defs").append("linearGradient").attr("id",`${a}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,c.setupViewPortForSVG)(l,k.config.mindmap?.padding??e.defaultConfig_default.mindmap.padding,"mindmapDiagram",k.config.mindmap?.useMaxWidth??e.defaultConfig_default.mindmap.useMaxWidth)},"draw"),q=(0,g.__name)(a=>{let{theme:b,look:c}=a,d="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,l.isDark)(a["lineColor"+b])?a["lineColor"+b]=(0,k.lighten)(a["lineColor"+b],20):a["lineColor"+b]=(0,j.darken)(a["lineColor"+b],20);for(let e=0;e<a.THEME_COLOR_LIMIT;e++){let f=""+("neo"===c?Math.max(10-(e-1)*2,2):17-3*e);d+=`
1
+ module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(882458);a.i(416635),a.i(43429),a.i(428212),a.i(916573),a.i(789676),a.i(956864),a.i(166292),a.i(887370);var e=a.i(261234),f=a.i(875117),g=a.i(539110),h=a.i(849666),i=a.i(21288),j=a.i(526987),k=a.i(524703),l=function(){var a=(0,g.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],h=[1,20],i=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,6,13,15,16,19,22],p=[1,33],q=[1,34],r=[1,6,7,11,13,15,16,19,22],s={trace:(0,g.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,g.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 16:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 17:case 21:d.decorateNode({class:f[h]});break;case 18:d.getLogger().trace("SPACELIST");break;case 19:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 20:d.decorateNode({icon:f[h]});break;case 25:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 26:this.$={id:f[h],descr:f[h],type:d.nodeType.DEFAULT};break;case 27:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:c,9:22,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:k,7:l,10:23,11:m},a(n,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:i}),a(n,[2,18]),a(n,[2,19]),a(n,[2,20]),a(n,[2,21]),a(n,[2,23]),a(n,[2,24]),a(n,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:l,10:32,11:m},{1:[2,7],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(o,[2,14],{7:p,11:q}),a(r,[2,8]),a(r,[2,9]),a(r,[2,10]),a(n,[2,15]),a(n,[2,16]),a(n,[2,17]),{20:[1,35]},{21:[1,36]},a(o,[2,13],{7:p,11:q}),a(r,[2,11]),a(r,[2,12]),{21:[1,37]},a(n,[2,25]),a(n,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,g.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.__name)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function t(){this.yy={}}return s.lexer={EOF:1,parseError:(0,g.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.__name)(function(){return this._more=!0,this},"more"),reject:(0,g.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,g.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.__name)(function(a,b,c,d){switch(c){case 0:return a.getLogger().trace("Found comment",b.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return a.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:a.getLogger().trace("end icon"),this.popState();break;case 10:return a.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return a.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 27:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return a.getLogger().trace("Long description:",b.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,g.__name)(t,"Parser"),t.prototype=s,s.Parser=t,new t}();l.parser=l;var m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},n=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=m,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,g.__name)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(a){for(let b=this.nodes.length-1;b>=0;b--)if(this.nodes[b].level<a)return this.nodes[b];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(a,b,c,d){f.log.info("addNode",a,b,c,d);let g=!1;0===this.nodes.length?(this.baseLevel=a,a=0,g=!0):void 0!==this.baseLevel&&(a-=this.baseLevel,g=!1);let h=(0,e.getConfig2)(),i=h.mindmap?.padding??e.defaultConfig_default.mindmap.padding;switch(d){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:i*=2}let j={id:this.count++,nodeId:(0,e.sanitizeText)(b,h),level:a,descr:(0,e.sanitizeText)(c,h),type:d,children:[],width:h.mindmap?.maxNodeWidth??e.defaultConfig_default.mindmap.maxNodeWidth,padding:i,isRoot:g},k=this.getParent(a);if(k)k.children.push(j),this.nodes.push(j);else if(g)this.nodes.push(j);else throw Error(`There can be only one root. No parent could be found for ("${j.descr}")`)}getType(a,b){switch(f.log.debug("In get type",a,b),a){case"[":return this.nodeType.RECT;case"(":return")"===b?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}decorateNode(a){if(!a)return;let b=(0,e.getConfig2)(),c=this.nodes[this.nodes.length-1];a.icon&&(c.icon=(0,e.sanitizeText)(a.icon,b)),a.class&&(c.class=(0,e.sanitizeText)(a.class,b))}type2Str(a){switch(a){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(a,b){if(0===a.level?a.section=void 0:a.section=b,a.children)for(let[c,d]of a.children.entries()){let e=0===a.level?c%11:b;this.assignSections(d,e)}}flattenNodes(a,b){let c=(0,e.getConfig2)(),d=["mindmap-node"];!0===a.isRoot?d.push("section-root","section--1"):void 0!==a.section&&d.push(`section-${a.section}`),a.class&&d.push(a.class);let f=d.join(" "),h=(0,g.__name)(a=>{let b=(c.theme?.toLowerCase()??"").includes("redux");switch(a){case m.CIRCLE:return"mindmapCircle";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexagon";case m.DEFAULT:return b?"rounded":"defaultMindmapNode";case m.NO_BORDER:default:return"rect"}},"getShapeFromType"),i={id:a.id.toString(),domId:"node_"+a.id.toString(),label:a.descr,labelType:"markdown",isGroup:!1,shape:h(a.type),width:a.width,height:a.height??0,padding:a.padding,cssClasses:f,cssStyles:[],look:c.look,icon:a.icon,x:a.x,y:a.y,level:a.level,nodeId:a.nodeId,type:a.type,section:a.section};if(b.push(i),a.children)for(let c of a.children)this.flattenNodes(c,b)}generateEdges(a,b){if(!a.children)return;let c=(0,e.getConfig2)();for(let d of a.children){let e="edge";void 0!==d.section&&(e+=` section-edge-${d.section}`);let f=a.level+1;e+=` edge-depth-${f}`;let g={id:`edge_${a.id}_${d.id}`,start:a.id.toString(),end:d.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:c.look,classes:e,depth:a.level,section:d.section};b.push(g),this.generateEdges(d,b)}}getData(){let a=this.getMindmap(),b=(0,e.getConfig2)();if(void 0!==(0,e.getUserDefinedConfig)().layout||(b.layout="cose-bilkent"),!a)return{nodes:[],edges:[],config:b};f.log.debug("getData: mindmapRoot",a,b),this.assignSections(a);let c=[],d=[];this.flattenNodes(a,c),this.generateEdges(a,d),f.log.debug(`getData: processed ${c.length} nodes and ${d.length} edges`);let g=new Map;for(let a of c)g.set(a.id,{shape:a.shape,width:a.width,height:a.height,padding:a.padding});return{nodes:c,edges:d,config:b,rootNode:a,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(g),type:"mindmap",diagramId:"mindmap-"+(0,h.v4)()}}getLogger(){return f.log}},o=(0,g.__name)(async(a,g,h,i)=>{f.log.debug("Rendering mindmap diagram\n"+a);let j=i.db,k=j.getData(),l=(0,b.getDiagramElement)(g,k.config.securityLevel);if(k.type=i.type,k.layoutAlgorithm=(0,d.getRegisteredLayoutAlgorithm)(k.config.layout,{fallback:"cose-bilkent"}),k.diagramId=g,!j.getMindmap())return;k.nodes.forEach(a=>{"rounded"===a.shape?(a.radius=15,a.taper=15,a.stroke="none",a.width=0,a.padding=15):"circle"===a.shape?a.padding=10:"rect"===a.shape?(a.width=0,a.padding=10):"hexagon"===a.shape&&(a.width=0,a.height=0)}),await (0,d.render)(k,l);let{themeVariables:m}=(0,e.getConfig)(),{useGradient:n,gradientStart:o,gradientStop:p}=m;if(n&&o&&p){let a=l.attr("id"),b=l.append("defs").append("linearGradient").attr("id",`${a}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,c.setupViewPortForSVG)(l,k.config.mindmap?.padding??e.defaultConfig_default.mindmap.padding,"mindmapDiagram",k.config.mindmap?.useMaxWidth??e.defaultConfig_default.mindmap.useMaxWidth)},"draw"),p=(0,g.__name)(a=>{let{theme:b,look:c}=a,d="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,k.isDark)(a["lineColor"+b])?a["lineColor"+b]=(0,j.lighten)(a["lineColor"+b],20):a["lineColor"+b]=(0,i.darken)(a["lineColor"+b],20);for(let e=0;e<a.THEME_COLOR_LIMIT;e++){let f=""+("neo"===c?Math.max(10-(e-1)*2,2):17-3*e);d+=`
2
2
  .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
3
3
  fill: ${a["cScale"+e]};
4
4
  }
@@ -40,18 +40,18 @@ module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(88
40
40
  [data-look="neo"].mindmap-node.section-${e-1} text {
41
41
  fill: ${"redux"===b||"redux-dark"===b?a.nodeBorder:a["cScaleLabel"+("neutral"===b?1:e)]};
42
42
  }
43
- `}return d},"genSections"),r=(0,g.__name)((a,b,c)=>{let d="";for(let e=0;e<a;e++)d+=`
43
+ `}return d},"genSections"),q=(0,g.__name)((a,b,c)=>{let d="";for(let e=0;e<a;e++)d+=`
44
44
  [data-look="neo"].mindmap-node.section-${e-1} rect, [data-look="neo"].mindmap-node.section-${e-1} path, [data-look="neo"].mindmap-node.section-${e-1} circle, [data-look="neo"].mindmap-node.section-${e-1} polygon {
45
45
  stroke: url(${b}-gradient);
46
46
  fill: ${c};
47
47
  }
48
48
  .section-${e-1} line {
49
49
  stroke-width: 0;
50
- }`;return d},"genGradient"),s=(0,g.__name)(a=>{let{theme:b}=a,c=a.svgId,d=a.dropShadow?a.dropShadow.replace("url(#drop-shadow)",`url(${c}-drop-shadow)`):"none";return`
50
+ }`;return d},"genGradient"),r=(0,g.__name)(a=>{let{theme:b}=a,c=a.svgId,d=a.dropShadow?a.dropShadow.replace("url(#drop-shadow)",`url(${c}-drop-shadow)`):"none";return`
51
51
  .edge {
52
52
  stroke-width: 3;
53
53
  }
54
- ${q(a)}
54
+ ${p(a)}
55
55
  .section-root rect, .section-root path, .section-root circle, .section-root polygon {
56
56
  fill: ${a.git0};
57
57
  }
@@ -86,7 +86,7 @@ module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(88
86
86
  [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
87
87
  fill: ${b?.includes("redux")?a.nodeBorder:a["cScaleLabel"+ +("neutral"===b)]};
88
88
  }
89
- ${a.useGradient&&c&&a.mainBkg?r(a.THEME_COLOR_LIMIT,c,a.mainBkg):""}
90
- `},"getStyles");a.s(["diagram",0,{get db(){return new o},renderer:{draw:p},parser:m,styles:s}],790158)}];
89
+ ${a.useGradient&&c&&a.mainBkg?q(a.THEME_COLOR_LIMIT,c,a.mainBkg):""}
90
+ `},"getStyles");a.s(["diagram",0,{get db(){return new n},renderer:{draw:o},parser:l,styles:r}])}];
91
91
 
92
92
  //# sourceMappingURL=1daa_mermaid_dist_chunks_mermaid_core_mindmap-definition-YA3MSWOX_mjs_19k8byt._.js.map