UNPKG

@jjdenhertog/ai-driven-development

Version:

AI-driven development workflow with learning capabilities for Claude

2 lines 40.2 kB
(()=>{var a={};a.id=8838,a.ids=[8838],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},871:(a,b,c)=>{"use strict";c.d(b,{B:()=>k});var d=c(60687),e=c(43210),f=c(30036),g=c(11486),h=c.n(g);let i=({value:a,onChange:b,language:c="plaintext",readOnly:f=!1,height:g="100%"})=>{let i=(0,e.useCallback)(a=>{b(a.target.value)},[b]);return(0,d.jsxs)("div",{className:h().container,style:{height:g},children:[(0,d.jsx)("div",{className:h().header,children:(0,d.jsx)("span",{className:h().language,children:c})}),(0,d.jsx)("textarea",{value:a,onChange:i,readOnly:f,className:h().editor,spellCheck:!1})]})},j=(0,f.default)(async()=>{},{loadableGenerated:{modules:["components/common/CodeEditor.tsx -> @monaco-editor/react"]},ssr:!1,loading:()=>(0,d.jsx)("div",{style:{padding:"1rem"},children:"Loading editor..."})}),k=({value:a,onChange:b,language:c="plaintext",readOnly:f=!1,height:g="100%",minHeight:h=200,maxHeight:k=800,fontSize:l=14})=>{let m=(0,e.useRef)(null),[n,o]=(0,e.useState)(h),p="auto"===g,q=(0,e.useCallback)(a=>{if(m.current=a,p){let b=()=>{o(Math.max(h,Math.min(k,a.getContentHeight()+40)))};b(),a.onDidContentSizeChange(b)}},[p,h,k]),r=(0,e.useMemo)(()=>({readOnly:f,minimap:{enabled:!1},fontSize:l,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,insertSpaces:!0,formatOnPaste:!0,formatOnType:!0,renderWhitespace:"selection",scrollbar:{vertical:p?"hidden":"visible",horizontal:"auto",verticalScrollbarSize:10,horizontalScrollbarSize:10,alwaysConsumeMouseWheel:!1}}),[f,p,l]),s=(a=>{switch(a.split(".").pop()?.toLowerCase()){case"ts":case"tsx":return"typescript";case"js":case"jsx":return"javascript";case"json":return"json";case"md":return"markdown";case"css":case"scss":return"css";case"html":return"html";case"yaml":case"yml":return"yaml";default:return c}})(c),t=p?`${n}px`:g,u=(0,e.useCallback)(a=>{b?.(a||"")},[b]);return(0,d.jsx)("div",{style:{height:t,width:"100%",border:"1px solid var(--border-color)",borderRadius:"0.5rem",overflow:"hidden"},children:(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)(i,{value:a,onChange:b||(()=>{}),language:c,readOnly:f,height:t}),children:(0,d.jsx)(j,{value:a,onChange:b?u:void 0,language:s,theme:"vs-dark",height:t,options:r,onMount:q})})})}},1733:(a,b,c)=>{"use strict";function d({children:a}){return a}c.r(b),c.d(b,{default:()=>d})},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6290:(a,b,c)=>{"use strict";c.d(b,{T:()=>i});var d=c(60687),e=c(43210),f=c(83568),g=c(57921),h=c.n(g);let i=({isOpen:a,title:b,message:c,confirmText:g="Confirm",cancelText:i="Cancel",onConfirm:j,onCancel:k})=>{let l=(0,e.useCallback)(a=>{a.target===a.currentTarget&&k()},[k]);return a?(0,d.jsx)("div",{className:h().overlay,onClick:l,children:(0,d.jsxs)("div",{className:h().dialog,children:[(0,d.jsx)("h3",{className:h().title,children:b}),(0,d.jsx)("p",{className:h().message,children:c}),(0,d.jsxs)("div",{className:h().actions,children:[(0,d.jsx)(f.$,{type:"button",variant:"secondary",onClick:k,children:i}),(0,d.jsx)(f.$,{type:"button",variant:"danger",onClick:j,children:g})]})]})}):null}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11486:a=>{a.exports={container:"SimpleEditor_container__LmH4_",header:"SimpleEditor_header__lR43V",language:"SimpleEditor_language__4pI2b",editor:"SimpleEditor_editor__EXn9P"}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},24343:(a,b,c)=>{Promise.resolve().then(c.bind(c,62104))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29071:(a,b,c)=>{Promise.resolve().then(c.bind(c,78959))},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30829:(a,b,c)=>{"use strict";c.d(b,{a:()=>i,o:()=>j});var d=c(60687);c(43210);var e=c(85814),f=c.n(e),g=c(57376),h=c.n(g);function i({children:a,className:b}){return(0,d.jsx)("div",{className:`${h().tabs} ${b||""}`,children:a})}function j({children:a,active:b=!1,onClick:c,href:e,className:g}){let i=`${h().tab} ${b?h().active:""} ${g||""}`;return e?(0,d.jsx)(f(),{href:e,className:i,children:a}):(0,d.jsx)("button",{type:"button",onClick:c,className:i,children:a})}},33873:a=>{"use strict";a.exports=require("path")},34392:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>C.a,__next_app__:()=>I,handler:()=>K,pages:()=>H,routeModule:()=>J,tree:()=>G});var d=c(65239),e=c(48088),f=c(47220),g=c(81289),h=c(26191),i=c(14823),j=c(71998),k=c(92603),l=c(54649),m=c(32781),n=c(82602),o=c(61268),p=c(4853),q=c(261),r=c(5052),s=c(9977),t=c(26713),u=c(43365),v=c(71454),w=c(67778),x=c(46143),y=c(39105),z=c(38171),A=c(86439),B=c(16133),C=c.n(B),D=c(30893),E=c(52836),F={};for(let a in D)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(F[a]=()=>D[a]);c.d(b,F);let G={children:["",{children:["plan",{children:["features",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,62104)),"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/features/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,56223)),"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,94431)),"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,16133,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,80849,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,29868,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,79615,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,H=["/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/features/page.tsx"],I={require:c,loadChunk:()=>Promise.resolve()},J=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/plan/features/page",pathname:"/plan/features",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:G},distDir:".next",projectDir:""});async function K(a,b,c){var d;let B="/plan/features/page";"/index"===B&&(B="/");let F="false",L=(0,h.getRequestMeta)(a,"postponed"),M=(0,h.getRequestMeta)(a,"minimalMode"),N=await J.prepare(a,b,{srcPage:B,multiZoneDraftMode:F});if(!N)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:O,query:P,params:Q,parsedUrl:R,pageIsDynamic:S,buildManifest:T,nextFontManifest:U,reactLoadableManifest:V,serverActionsManifest:W,clientReferenceManifest:X,subresourceIntegrityManifest:Y,prerenderManifest:Z,isDraftMode:$,resolvedPathname:_,revalidateOnlyGenerated:aa,routerServerContext:ab,nextConfig:ac}=N,ad=R.pathname||"/",ae=(0,q.normalizeAppPath)(B),{isOnDemandRevalidate:af}=N,ag=Z.dynamicRoutes[ae],ah=Z.routes[_],ai=!!(ag||ah||Z.routes[ae]),aj=a.headers["user-agent"]||"",ak=(0,t.getBotType)(aj),al=(0,o.isHtmlBotRequest)(a),am=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??!!a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],an=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],ao=(0,r.getIsPossibleServerAction)(a),ap=(0,l.checkIsAppPPREnabled)(ac.experimental.ppr)&&(null==(d=Z.routes[ae]??Z.dynamicRoutes[ae])?void 0:d.renderingMode)==="PARTIALLY_STATIC",aq=!1,ar=!1,as=ap?L:void 0,at=ap&&an&&!am,au=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),av=!aj||(0,o.shouldServeStreamingMetadata)(aj,ac.htmlLimitedBots);al&&ap&&(ai=!1,av=!1);let aw=!0===J.isDev||!ai||"string"==typeof L||at,ax=al&&ap,ay=null;$||!ai||aw||ao||as||at||(ay=_);let az=ay;!az&&J.isDev&&(az=_);let aA={...D,tree:G,pages:H,GlobalError:C(),handler:K,routeModule:J,__next_app__:I};W&&X&&(0,n.setReferenceManifestsSingleton)({page:B,clientReferenceManifest:X,serverActionsManifest:W,serverModuleMap:(0,p.createServerModuleMap)({serverActionsManifest:W})});let aB=a.method||"GET",aC=(0,g.getTracer)(),aD=aC.getActiveScopeSpan();try{let d=async(c,d)=>{let e=new k.NodeNextRequest(a),f=new k.NodeNextResponse(b);return J.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aC.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aB} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aB} ${a.url}`)})},f=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:P,params:Q,page:ae,sharedContext:{buildId:O},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aA,Component:(0,j.T)(aA),params:Q,routeModule:J,page:B,postponed:f,shouldWaitOnAllReady:ax,serveStreamingMetadata:av,supportsDynamicResponse:"string"==typeof f||aw,buildManifest:T,nextFontManifest:U,reactLoadableManifest:V,subresourceIntegrityManifest:Y,serverActionsManifest:W,clientReferenceManifest:X,setIsrStatus:null==ab?void 0:ab.setIsrStatus,dir:J.projectDir,isDraftMode:$,isRevalidate:ai&&!f&&!at,botType:ak,isOnDemandRevalidate:af,isPossibleServerAction:ao,assetPrefix:ac.assetPrefix,nextConfigOutput:ac.output,crossOrigin:ac.crossOrigin,trailingSlash:ac.trailingSlash,previewProps:Z.preview,deploymentId:ac.deploymentId,enableTainting:ac.experimental.taint,htmlLimitedBots:ac.htmlLimitedBots,devtoolSegmentExplorer:ac.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ac.reactMaxHeadersLength,multiZoneDraftMode:F,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ac.experimental.cacheLife,basePath:ac.basePath,serverActions:ac.experimental.serverActions,...aq?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:aq}:{},experimental:{isRoutePPREnabled:ap,expireTime:ac.expireTime,staleTimes:ac.experimental.staleTimes,dynamicIO:!!ac.experimental.dynamicIO,clientSegmentCache:!!ac.experimental.clientSegmentCache,dynamicOnHover:!!ac.experimental.dynamicOnHover,inlineCss:!!ac.experimental.inlineCss,authInterrupts:!!ac.experimental.authInterrupts,clientTraceMetadata:ac.experimental.clientTraceMetadata||[]},waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>J.onRequestError(a,b,d,ab),err:(0,h.getRequestMeta)(a,"invokeError"),dev:J.isDev}},k=await d(e,i),{metadata:l}=k,{cacheControl:m,headers:n={},fetchTags:o}=l;if(o&&(n[x.NEXT_CACHE_TAGS_HEADER]=o),a.fetchMetrics=l.fetchMetrics,ai&&(null==m?void 0:m.revalidate)===0&&!J.isDev&&!ap){let a=l.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${_}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""} see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:k,headers:n,rscData:l.flightData,postponed:l.postponed,status:l.statusCode,segmentData:l.segmentData},cacheControl:m}},l=async({hasResolved:d,previousCacheEntry:g,isRevalidating:i,span:j})=>{let k,l=!1===J.isDev,n=d||b.writableEnded;if(af&&aa&&!g&&!M)return(null==ab?void 0:ab.render404)?await ab.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ag&&(k=(0,v.parseFallbackField)(ag.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(aj)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(af=!0),af&&(k!==v.FallbackMode.NOT_FOUND||g)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!M&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&az&&!n&&!$&&S&&(l||!ah)){let b;if((l||ag)&&k===v.FallbackMode.NOT_FOUND)throw new A.NoFallbackError;if(ap&&!an){if(b=await J.handleResponse({cacheKey:l?ae:null,req:a,nextConfig:ac,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:Z,isRoutePPREnabled:ap,responseGenerator:async()=>f({span:j,postponed:void 0,fallbackRouteParams:l||ar?(0,m.u)(ae):null}),waitUntil:c.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let o=af||i||!as?void 0:as;if(aq&&void 0!==o)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.fromStatic(""),pageData:{},headers:void 0,status:void 0}};let p=S&&ap&&((0,h.getRequestMeta)(a,"renderFallbackShell")||ar)?(0,m.u)(ad):null;return f({span:j,postponed:o,fallbackRouteParams:p})},n=async d=>{var g,i,j,k,m;let n,o=await J.handleResponse({cacheKey:ay,responseGenerator:a=>l({span:d,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:af,isRoutePPREnabled:ap,req:a,nextConfig:ac,prerenderManifest:Z,waitUntil:c.waitUntil});if($&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),J.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(ay)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(g=o.value)?void 0:g.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(j=o.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;ai&&!at&&(!p||am)&&(M||b.setHeader("x-nextjs-cache",af?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(as)n={revalidate:0,expire:void 0};else if(M&&an&&!am&&ap)n={revalidate:0,expire:void 0};else if(!J.isDev)if($)n={revalidate:0,expire:void 0};else if(ai){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});n={revalidate:o.cacheControl.revalidate,expire:(null==(k=o.cacheControl)?void 0:k.expire)??ac.expireTime}}else n={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(n={revalidate:0,expire:void 0});if(o.cacheControl=n,"string"==typeof au&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(m=q.headers)?void 0:m[x.NEXT_CACHE_TAGS_HEADER];M&&ai&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(au);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(d),cacheControl:o.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(""),cacheControl:o.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&as)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(M&&ai||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(i=q.headers)?void 0:i[x.NEXT_CACHE_TAGS_HEADER];if(M&&ai&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||an&&ap||(b.statusCode=q.status),!M&&q.status&&E.RedirectStatusCode[q.status]&&an&&(b.statusCode=200),p&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),an&&!$){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:q.html,cacheControl:at?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(q.rscData),cacheControl:o.cacheControl})}let v=q.html;if(!p||M)return(0,z.sendRenderResult)({req:a,res:b,type:"html",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:o.cacheControl});if(aq)return v.chain(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,type:"html",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.chain(A.readable),f({span:d,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,type:"html",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aD)return await aC.withPropagatedContext(a.headers,()=>aC.trace(i.BaseServerSpan.handleRequest,{spanName:`${aB} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aB,"http.target":a.url}},n));await n(aD)}catch(b){throw aD||await J.onRequestError(a,b,{routerKind:"App Router",routePath:B,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:ai,isOnDemandRevalidate:af})},ab),b}}},35325:(a,b,c)=>{"use strict";c.d(b,{a:()=>j});var d=c(60687),e=c(43210),f=c.n(e),g=c(35885),h=c(97e3),i=c(83568);let j=({isOpen:a,onClose:b,title:c,children:e,footer:j,width:k="600px"})=>{let l=f().useCallback(a=>{a.stopPropagation()},[]);return a?(0,d.jsx)("div",{className:"modal-overlay",onClick:b,children:(0,d.jsxs)("div",{className:"modal-container",style:{maxWidth:k},onClick:l,children:[(0,d.jsxs)("div",{className:"modal-header",children:[(0,d.jsx)("h2",{children:c}),(0,d.jsx)(i.$,{variant:"ghost",size:"small",onClick:b,"aria-label":"Close",children:(0,d.jsx)(g.g,{icon:h.GRI})})]}),(0,d.jsx)("div",{className:"modal-content",children:e}),!!j&&(0,d.jsx)("div",{className:"modal-footer",children:j})]})}):null}},40354:a=>{a.exports={container:"ConceptFeatureEditor_container__ZGaLU",header:"ConceptFeatureEditor_header__N7D_O",featureTitle:"ConceptFeatureEditor_featureTitle__ktAf8",statusSelect:"ConceptFeatureEditor_statusSelect__8XijW","status-draft":"ConceptFeatureEditor_status-draft__btrcX","status-ready":"ConceptFeatureEditor_status-ready__jGOf7","status-reviewing":"ConceptFeatureEditor_status-reviewing__PuXlw","status-questions":"ConceptFeatureEditor_status-questions___ZCWp","status-reviewed":"ConceptFeatureEditor_status-reviewed__RbLDx","status-approved":"ConceptFeatureEditor_status-approved__lt0eV",unsaved:"ConceptFeatureEditor_unsaved__JFYqx",headerActions:"ConceptFeatureEditor_headerActions__ASUnJ",form:"ConceptFeatureEditor_form__TgpS0",metadata:"ConceptFeatureEditor_metadata__sCLRM",metadataItem:"ConceptFeatureEditor_metadataItem__pz9dj",metadataLabel:"ConceptFeatureEditor_metadataLabel__7XbJj",imagesSection:"ConceptFeatureEditor_imagesSection__WKUsJ",imagesList:"ConceptFeatureEditor_imagesList__PlEQe",imageItem:"ConceptFeatureEditor_imageItem__sKjoP",imageWrapper:"ConceptFeatureEditor_imageWrapper__9qPe9",imageThumbnail:"ConceptFeatureEditor_imageThumbnail__EYwjF",removeImageButton:"ConceptFeatureEditor_removeImageButton__3ZBVW",uploadSection:"ConceptFeatureEditor_uploadSection__jgXiw",uploadInput:"ConceptFeatureEditor_uploadInput__1AoKs",imageDescription:"ConceptFeatureEditor_imageDescription__s0Smb",descriptionText:"ConceptFeatureEditor_descriptionText__TlPK_",placeholderText:"ConceptFeatureEditor_placeholderText__Ppxoa",descriptionInput:"ConceptFeatureEditor_descriptionInput__apiB_"}},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},42942:(a,b,c)=>{Promise.resolve().then(c.bind(c,1733))},46004:a=>{a.exports={notification:"ErrorNotification_notification__PIYEQ",slideIn:"ErrorNotification_slideIn__jwlJu",message:"ErrorNotification_message__IvsVI",closeButton:"ErrorNotification_closeButton__nbrYx"}},47670:(a,b,c)=>{Promise.resolve().then(c.bind(c,56223))},51316:a=>{a.exports={imagesSection:"NewFeatureModal_imagesSection__dqMBO",imagesList:"NewFeatureModal_imagesList__QmRzx",imageItem:"NewFeatureModal_imageItem__s_BaU",imageWrapper:"NewFeatureModal_imageWrapper__8oVTt",imageThumbnail:"NewFeatureModal_imageThumbnail__yvQ0q",removeImageButton:"NewFeatureModal_removeImageButton__v9naY",uploadSection:"NewFeatureModal_uploadSection__kG0Fl",uploadInput:"NewFeatureModal_uploadInput__PWyF9",dragging:"NewFeatureModal_dragging__dHjHB",uploadButton:"NewFeatureModal_uploadButton__g0Vpj"}},51490:(a,b,c)=>{"use strict";c.d(b,{H:()=>h});var d=c(60687);c(43210);var e=c(35885),f=c(92803),g=c.n(f);function h({icon:a,title:b,description:c,selected:f=!1,onClick:h,className:i="",children:j}){return(0,d.jsxs)("button",{type:"button",onClick:h,className:`${g().fileButton} ${f?g().selected:""} ${i}`,children:[(0,d.jsx)(e.g,{icon:a,className:g().icon}),(0,d.jsxs)("div",{className:g().content,children:[(0,d.jsx)("div",{className:g().title,children:b}),!!c&&(0,d.jsx)("div",{className:g().description,children:c}),j]})]})}},53289:(a,b,c)=>{"use strict";c.d(b,{M:()=>i});var d=c(60687),e=c(43210),f=c(83568),g=c(46004),h=c.n(g);let i=({message:a,onClose:b,duration:c=5e3})=>((0,e.useEffect)(()=>{let a=setTimeout(b,c);return()=>clearTimeout(a)},[c,b]),(0,d.jsxs)("div",{className:h().notification,children:[(0,d.jsx)("p",{className:h().message,children:a}),(0,d.jsx)(f.$,{type:"button",variant:"ghost",size:"small",className:h().closeButton,onClick:b,"aria-label":"Close notification",children:"\xd7"})]}))},56223:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(61369).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/layout.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/layout.tsx","default")},57376:a=>{a.exports={tabs:"TabNavigation_tabs__Z9wJ3",tab:"TabNavigation_tab___eQB7",active:"TabNavigation_active__gvfW5"}},57921:a=>{a.exports={overlay:"ConfirmDialog_overlay__4_jrM",dialog:"ConfirmDialog_dialog__5ONIt",title:"ConfirmDialog_title__gfTIJ",message:"ConfirmDialog_message__tIhPr",actions:"ConfirmDialog_actions__r_ePM",button:"ConfirmDialog_button__m_xFA",cancelButton:"ConfirmDialog_cancelButton__wv_al",confirmButton:"ConfirmDialog_confirmButton__hVajg"}},62104:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(61369).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/features/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/jjdenhertog/Projects/ai-driven-development/src/web/src/app/plan/features/page.tsx","default")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78959:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>E});var d=c(60687),e=c(43210),f=c(30474),g=c(35885),h=c(97e3),i=c(871),j=c(6290),k=c(53289),l=c(83568),m=c(40354),n=c.n(m);let o=a=>{let{feature:b,onUpdate:c,onDelete:m}=a,[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)("draft"),[u,v]=(0,e.useState)([]),[w,x]=(0,e.useState)([]),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)([]),[M,N]=(0,e.useState)(null);(0,e.useEffect)(()=>{b&&(p(b.title),r(b.description),t(b.state),v(b.images||[]),B(!1),x([]))},[b]);let O=(0,e.useCallback)(async()=>{if(b&&A){z(!0);try{for(let a of w)try{(await fetch(`/api/concept-features/upload?filename=${encodeURIComponent(a)}`,{method:"DELETE"})).ok}catch(a){}let{id:a}=b;await c(a,{title:o,description:q,state:s,images:u}),B(!1),x([])}catch(a){}finally{z(!1)}}},[b,A,c,o,q,s,u,w]),P=(0,e.useCallback)(async()=>{if(!b)return;let{id:a}=b;await m(a),F(!1)},[b,m]),Q=(0,e.useCallback)(a=>{p(a.target.value),B(!0)},[]),R=(0,e.useCallback)(a=>{t(a.target.value),B(!0)},[]),S=(0,e.useCallback)(a=>{r(a||""),B(!0)},[]),T=(0,e.useCallback)(()=>{O().catch(()=>{})},[O]),U=(0,e.useCallback)(()=>{F(!0)},[]),V=(0,e.useCallback)(async a=>{let{files:b}=a.target;if(!b||0===b.length)return;let[c]=b;L([c]),J(!0),a.target.value=""},[]),W=(0,e.useCallback)(async a=>{D(!0);let b=[];try{for(let c of K){let d=new FormData;d.append("file",c);let e=a.get(c.name);e&&d.append("description",e);let f=await fetch("/api/uploads",{method:"POST",body:d});if(!f.ok){let a=await f.json();throw Error(a.error||"Failed to upload image")}let g=await f.json();b.push({path:g.path,description:g.description||void 0})}v([...u,...b]),B(!0)}catch(a){H(`Failed to upload images: ${a.message}`)}finally{D(!1),L([]),J(!1)}},[K,u]),X=(0,e.useCallback)(a=>()=>{let b=u[a].path.split("/").pop();b&&(x(a=>[...a,b]),v(u.filter((b,c)=>c!==a)),B(!0))},[u]),Y=(0,e.useCallback)((a,b)=>{let c=[...u];c[a]={...c[a],description:b},v(c),B(!0),N(null)},[u]),Z=(0,e.useCallback)(a=>b=>{N({index:a,description:b.target.value})},[]),$=(0,e.useCallback)(a=>()=>{M&&M.index===a&&Y(a,M.description)},[M,Y]),_=(0,e.useCallback)(a=>b=>{"Enter"===b.key&&M&&M.index===a?Y(a,M.description):"Escape"===b.key&&N(null)},[M,Y]),aa=(0,e.useCallback)((a,b)=>()=>{N({index:a,description:b})},[]),ab=(0,e.useCallback)(a=>{V(a).catch(a=>{})},[V]),ac=(0,e.useCallback)(()=>{let a=new Map;K.forEach((b,c)=>{let d=document.getElementById(`file-desc-${c}`);d?.value&&a.set(b.name,d.value)}),W(a)},[K,W]),ad=(0,e.useCallback)(()=>{J(!1),L([])},[]),ae=(0,e.useCallback)(()=>{P().catch(a=>{})},[P]),af=(0,e.useCallback)(()=>{F(!1)},[]),ag=(0,e.useCallback)(()=>{H("")},[]);return b?(0,d.jsxs)("div",{className:n().container,children:[(0,d.jsxs)("div",{className:n().header,children:[(0,d.jsx)("h2",{className:n().featureTitle,children:b.title||o||"Untitled Feature"}),(0,d.jsxs)("select",{id:"state",value:s,onChange:R,className:`${n().statusSelect} ${n()[`status-${s}`]}`,disabled:"reviewing"===s,children:[(0,d.jsx)("option",{value:"draft",children:"Draft"}),(0,d.jsx)("option",{value:"ready",children:"Ready"}),"reviewing"===s&&(0,d.jsx)("option",{value:"reviewing",disabled:!0,children:"Reviewing (AI processing...)"}),"questions"===s&&(0,d.jsx)("option",{value:"questions",disabled:!0,children:"Questions (AI set)"}),"reviewed"===s&&(0,d.jsx)("option",{value:"reviewed",disabled:!0,children:"Reviewed (AI set)"}),"reviewed"===s&&(0,d.jsx)("option",{value:"approved",children:"Approved"}),"approved"===s&&(0,d.jsx)("option",{value:"approved",children:"Approved"})]}),!!A&&(0,d.jsx)("span",{className:n().unsaved,children:"• Unsaved"}),(0,d.jsxs)("div",{className:n().headerActions,children:[(0,d.jsxs)(l.$,{type:"button",onClick:T,disabled:y||!A,variant:"primary",children:[(0,d.jsx)(g.g,{icon:h.hSh}),(0,d.jsx)("span",{children:y?"Saving...":"Save"})]}),(0,d.jsx)(l.$,{type:"button",onClick:U,variant:"danger",size:"medium",title:"Delete feature",children:(0,d.jsx)(g.g,{icon:h.yLS})})]})]}),(0,d.jsxs)("div",{className:n().form,children:[(0,d.jsxs)("div",{className:n().field,children:[(0,d.jsx)("label",{htmlFor:"title",children:"Title"}),(0,d.jsx)("input",{id:"title",type:"text",value:o,onChange:Q,className:n().input,placeholder:"Enter feature title"})]}),(0,d.jsxs)("div",{className:n().field,children:[(0,d.jsx)("label",{children:"Images"}),(0,d.jsxs)("div",{className:n().imagesSection,children:[(0,d.jsx)("div",{className:n().imagesList,children:u.map((a,b)=>(0,d.jsxs)("div",{className:n().imageItem,children:[(0,d.jsx)("div",{className:n().imageWrapper,children:(0,d.jsx)(f.default,{src:`/api/${a.path}`,alt:a.description||`Feature image ${b+1}`,width:150,height:150,className:n().imageThumbnail})}),(0,d.jsx)(l.$,{type:"button",onClick:X(b),variant:"ghost",size:"small",className:n().removeImageButton,title:"Remove image",children:(0,d.jsx)(g.g,{icon:h.GRI})}),(0,d.jsx)("div",{className:n().imageDescription,children:M?.index===b?(0,d.jsx)("input",{type:"text",value:M.description,onChange:Z(b),onBlur:$(b),onKeyDown:_(b),className:n().descriptionInput,placeholder:"Add description...",autoFocus:!0}):(0,d.jsx)("div",{className:n().descriptionText,onClick:aa(b,a.description||""),title:"Click to edit description",children:a.description||(0,d.jsx)("span",{className:n().placeholderText,children:"Click to add description"})})})]},b))}),(0,d.jsxs)("div",{className:n().uploadSection,children:[(0,d.jsxs)("label",{htmlFor:"image-upload",className:n().uploadButton,children:[(0,d.jsx)(g.g,{icon:h.Cyq}),C?"Uploading...":"Add Image"]}),(0,d.jsx)("input",{id:"image-upload",type:"file",accept:"image/*",onChange:ab,disabled:C,className:n().uploadInput})]})]})]}),(0,d.jsxs)("div",{className:n().field,children:[(0,d.jsx)("label",{children:"Description"}),(0,d.jsx)("div",{className:n().editorWrapper,children:(0,d.jsx)(i.B,{value:q,onChange:S,language:"markdown",height:"auto",minHeight:300,maxHeight:1e3})})]}),(0,d.jsxs)("div",{className:n().metadata,children:[(0,d.jsxs)("div",{className:n().metadataItem,children:[(0,d.jsx)("span",{className:n().metadataLabel,children:"Created:"}),(0,d.jsx)("span",{children:new Date(b.createdAt).toLocaleString()})]}),(0,d.jsxs)("div",{className:n().metadataItem,children:[(0,d.jsx)("span",{className:n().metadataLabel,children:"Updated:"}),(0,d.jsx)("span",{children:new Date(b.updatedAt).toLocaleString()})]})]})]}),(0,d.jsx)(j.T,{isOpen:E,title:"Delete Feature",message:`Are you sure you want to delete "${b.title}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",onConfirm:ae,onCancel:af}),G.length>0&&(0,d.jsx)(k.M,{message:G,onClose:ag}),I?(0,d.jsx)("div",{className:n().modal,children:(0,d.jsxs)("div",{className:n().modalContent,children:[(0,d.jsx)("h3",{children:"Add Image Descriptions"}),(0,d.jsx)("p",{className:n().modalDescription,children:"Provide descriptions for the images to help AI understand their context and purpose."}),(0,d.jsx)("div",{className:n().fileList,children:K.map((a,b)=>(0,d.jsxs)("div",{className:n().fileItem,children:[(0,d.jsx)("div",{className:n().fileName,children:a.name}),(0,d.jsx)("input",{type:"text",placeholder:"Describe what this image shows and why it's relevant...",className:n().fileDescriptionInput,id:`file-desc-${b}`})]},b))}),(0,d.jsxs)("div",{className:n().modalActions,children:[(0,d.jsx)(l.$,{type:"button",onClick:ac,variant:"primary",disabled:C,children:C?"Uploading...":"Upload Images"}),(0,d.jsx)(l.$,{type:"button",onClick:ad,variant:"secondary",disabled:C,children:"Cancel"})]})]})}):null]}):(0,d.jsx)("div",{className:n().loading,children:"Loading feature..."})};var p=c(91026),q=c.n(p),r=c(35325),s=c(51316),t=c.n(s);let u=a=>{let{onClose:b,onCreate:c}=a,[j,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)("draft"),[s,u]=(0,e.useState)([]),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(""),B=(0,e.useCallback)(async a=>{if(a.preventDefault(),!j.trim()||!n.trim())return void A("Please provide both title and description");w(!0);try{await c({title:j.trim(),description:n.trim(),state:p,images:s})}catch(a){A("Failed to create feature")}finally{w(!1)}},[j,n,p,s,c]),C=(0,e.useCallback)(a=>{B(a)},[B]),D=(0,e.useCallback)(a=>{m(a.target.value)},[]),E=(0,e.useCallback)(a=>{o(a||"")},[]),F=(0,e.useCallback)(a=>{q(a.target.value)},[]),G=(0,e.useCallback)(async a=>{let{files:b}=a.target;if(!b||0===b.length)return;y(!0);let c=[];try{for(let a of Array.from(b)){let b=new FormData;b.append("file",a);let d=await fetch("/api/concept-features/upload",{method:"POST",body:b});if(!d.ok){let a=await d.json();throw Error(a.error||"Failed to upload image")}let e=await d.json();c.push({path:e.path,description:e.description||void 0})}u([...s,...c])}catch(a){A(`Failed to upload images: ${a.message}`)}finally{y(!1),a.target.value=""}},[s]),H=(0,e.useCallback)(async a=>{try{let b=s[a].path.split("/").pop();if(!b)return;if(!(await fetch(`/api/concept-features/upload?filename=${encodeURIComponent(b)}`,{method:"DELETE"})).ok)throw Error("Failed to delete image");u(s.filter((b,c)=>c!==a))}catch(a){A("Failed to remove image")}},[s]),I=(0,e.useCallback)(a=>()=>{H(a)},[H]),J=(0,e.useCallback)(a=>{G(a).catch(()=>{})},[G]),K=(0,e.useCallback)(()=>{A("")},[]),L=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.$,{type:"button",onClick:b,variant:"secondary",children:"Cancel"}),(0,d.jsx)(l.$,{type:"submit",form:"new-feature-form",disabled:v,variant:"primary",children:v?"Creating...":"Create Feature"})]});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.a,{isOpen:!0,onClose:b,title:"New Feature",footer:L,width:"700px",children:(0,d.jsx)("form",{id:"new-feature-form",onSubmit:C,children:(0,d.jsxs)("div",{className:"form-content",children:[(0,d.jsxs)("div",{className:"form-field",children:[(0,d.jsx)("label",{htmlFor:"title",children:"Title"}),(0,d.jsx)("input",{id:"title",type:"text",value:j,onChange:D,placeholder:"Brief feature title (e.g., User Authentication)",autoFocus:!0})]}),(0,d.jsxs)("div",{className:"form-field",children:[(0,d.jsx)("label",{htmlFor:"description",children:"Description"}),(0,d.jsx)("div",{className:"editor-wrapper",children:(0,d.jsx)(i.B,{value:n,onChange:E,language:"markdown",height:"auto",minHeight:300,maxHeight:1e3})})]}),(0,d.jsxs)("div",{className:"form-field",children:[(0,d.jsx)("label",{htmlFor:"state",children:"Initial State"}),(0,d.jsxs)("select",{id:"state",value:p,onChange:F,children:[(0,d.jsx)("option",{value:"draft",children:"Draft"}),(0,d.jsx)("option",{value:"ready",children:"Let AI evaluate the feature"})]})]}),(0,d.jsxs)("div",{className:"form-field",children:[(0,d.jsx)("label",{children:"Images"}),(0,d.jsxs)("div",{className:t().imagesSection,children:[(0,d.jsx)("div",{className:t().imagesList,children:s.map((a,b)=>(0,d.jsxs)("div",{className:t().imageItem,children:[(0,d.jsx)("div",{className:t().imageWrapper,children:(0,d.jsx)(f.default,{src:`/api/${a.path}`,alt:a.description||`Feature image ${b+1}`,width:150,height:150,className:t().imageThumbnail})}),(0,d.jsx)(l.$,{type:"button",onClick:I(b),variant:"ghost",size:"small",className:t().removeImageButton,title:"Remove image",children:(0,d.jsx)(g.g,{icon:h.GRI})})]},b))}),(0,d.jsxs)("div",{className:t().uploadSection,children:[(0,d.jsxs)("label",{htmlFor:"new-image-upload",className:"btn-upload",children:[(0,d.jsx)(g.g,{icon:h.Cyq}),x?" Uploading...":" Add Image"]}),(0,d.jsx)("input",{id:"new-image-upload",type:"file",accept:"image/*",onChange:J,disabled:x,className:t().uploadInput})]})]})]})]})})}),!!z&&(0,d.jsx)(k.M,{message:z,onClose:K})]})};var v=c(14247),w=c(27165),x=c(16189),y=c(25995),z=c(70899),A=c(3039),B=c(30829),C=c(51490);function D(){let a=(0,x.useRouter)(),b=(0,x.useSearchParams)().get("id"),{enqueueSnackbar:c}=(0,z.dh)(),{data:f,error:i,mutate:j}=(0,y.Ay)("concept-features",v.FH.getConceptFeatures),[k,m]=(0,e.useState)(!1),n=(0,e.useCallback)(b=>{a.push(`/plan/features?id=${b}`)},[a]),p=(0,e.useCallback)(()=>{m(!0)},[]),r=(0,e.useCallback)(()=>{m(!1)},[]),s=(0,e.useCallback)(async b=>{try{let d=await v.FH.createConceptFeature(b);c("Feature created successfully",{variant:"success"}),m(!1),await j(),a.push(`/plan/features?id=${d.id}`)}catch(a){c(a instanceof Error?a.message:"Failed to create feature",{variant:"error"})}},[j,a,c]),t=(0,e.useCallback)(async(a,b)=>{try{await v.FH.updateConceptFeature(a,b),c("Feature updated successfully",{variant:"success"}),await j()}catch(a){c(a instanceof Error?a.message:"Failed to update feature",{variant:"error"})}},[j,c]),D=(0,e.useCallback)(async d=>{try{await v.FH.deleteConceptFeature(d),c("Feature deleted successfully",{variant:"success"}),await j(),b===d&&a.push("/plan/features")}catch(a){c(a instanceof Error?a.message:"Failed to delete feature",{variant:"error"})}},[j,b,a,c]),E=(0,e.useCallback)(a=>()=>{n(a)},[n]);if(i)return(0,d.jsx)("div",{className:"error-state",children:"Failed to load features"});if(!f)return(0,d.jsx)("div",{className:"loading-state",children:"Loading features..."});let F=(0,d.jsxs)(B.a,{children:[(0,d.jsx)(B.o,{href:"/plan/concepts",children:"Concepts"}),(0,d.jsx)(B.o,{href:"/plan/features",active:!0,children:"Features"})]}),G=(0,d.jsx)("div",{className:q().featureList,children:0===f.length?(0,d.jsxs)("div",{className:"empty-state",children:[(0,d.jsx)("p",{children:"No features yet"}),(0,d.jsxs)(l.$,{onClick:p,variant:"secondary",size:"small",style:{width:"100%"},children:[(0,d.jsx)(g.g,{icon:h.QLR}),"Create new feature"]})]}):(0,d.jsxs)(d.Fragment,{children:[f.map(a=>(0,d.jsx)(C.H,{icon:w.A4h,title:a.title,description:a.state,selected:b===a.id,onClick:E(a.id)},a.id)),(0,d.jsxs)(l.$,{onClick:p,variant:"secondary",size:"small",style:{width:"100%"},children:[(0,d.jsx)(g.g,{icon:h.QLR}),"Create new feature"]})]})});return(0,d.jsxs)(A.M,{title:"Plan",subtitle:"Manage your concept features",variant:"sidebar",sidebarHeader:F,sidebarContent:G,children:[b&&f?(0,d.jsx)(o,{feature:f.find(a=>a.id===b),onUpdate:t,onDelete:D}):(0,d.jsx)("div",{className:q().placeholder,children:(0,d.jsx)("p",{children:"Select a feature to view details"})}),k?(0,d.jsx)(u,{onClose:r,onCreate:s}):null]})}function E(){return(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)("div",{children:"Loading..."}),children:(0,d.jsx)(D,{})})}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91026:a=>{a.exports={container:"ConceptFeatures_container__JAdWc",sidebar:"ConceptFeatures_sidebar__qZRJt",sidebarActions:"ConceptFeatures_sidebarActions__bMARz",newButton:"ConceptFeatures_newButton__ojJ3B",featureList:"ConceptFeatures_featureList__7Licr",empty:"ConceptFeatures_empty__Hfm_v",emptyActionButton:"ConceptFeatures_emptyActionButton__BGZwo",emptyButton:"ConceptFeatures_emptyButton__SyYQA","status-draft":"ConceptFeatures_status-draft__iyfD_","status-ready":"ConceptFeatures_status-ready__uAZ24","status-reviewing":"ConceptFeatures_status-reviewing__1tPlk","status-questions":"ConceptFeatures_status-questions__TSZ3V","status-reviewed":"ConceptFeatures_status-reviewed__rjrQY","status-approved":"ConceptFeatures_status-approved__QW9Jo",main:"ConceptFeatures_main__2_Ejc",placeholder:"ConceptFeatures_placeholder__Y2Y6l",loading:"ConceptFeatures_loading___RcPi",error:"ConceptFeatures_error__FfTLe"}},92803:a=>{a.exports={fileButton:"FileButton_fileButton__kTT3K",selected:"FileButton_selected___mDUt",icon:"FileButton_icon__CrF0d",content:"FileButton_content__Bp_Mt",title:"FileButton_title__TDjuR",description:"FileButton_description__ZT_ko"}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4985,4310,5995,246,474,1536],()=>b(b.s=34392));module.exports=c})();