@kidlat-dakila/flightplan 0.1.8 → 0.1.9

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 (86) hide show
  1. package/backend/main.js +118 -980
  2. package/frontend/assets/_branchId-7x6qWn3I.js +1 -0
  3. package/frontend/assets/_branchId-OMHvVhfT.js +1 -0
  4. package/frontend/assets/_id-1eTNGJK9.js +1 -0
  5. package/frontend/assets/_id-CHxZrl-p.js +1 -0
  6. package/frontend/assets/agents-C9xHqVQD.js +1 -0
  7. package/frontend/assets/agents-KKXkUQ27.js +1 -0
  8. package/frontend/assets/create-B3JUVzoL.js +1 -0
  9. package/frontend/assets/create-CriuRRQV.js +1 -0
  10. package/frontend/assets/create-CsL8aMCo.js +1 -0
  11. package/frontend/assets/create-DhWyrgF0.js +1 -0
  12. package/frontend/assets/download-B00Se_e0.js +1 -0
  13. package/frontend/assets/forges-BMb9Pcn1.js +1 -0
  14. package/frontend/assets/forges-BOVWBO1B.js +1 -0
  15. package/frontend/assets/index-4USZJYGF.js +1 -0
  16. package/frontend/assets/index-B4xFHIrG.js +1 -0
  17. package/frontend/assets/index-BA8Qwprc.js +6 -0
  18. package/frontend/assets/index-BUcr0tJt.js +1 -0
  19. package/frontend/assets/index-Ba3RqmDE.js +1 -0
  20. package/frontend/assets/index-CFZ7PaJE.js +1 -0
  21. package/frontend/assets/index-COS3U9jZ.js +1 -0
  22. package/frontend/assets/index-COdzqD_M.js +1 -0
  23. package/frontend/assets/index-CZ3Rr8-h.js +1 -0
  24. package/frontend/assets/index-CikPFj0e.js +1 -0
  25. package/frontend/assets/index-Cl1Gcfks.js +1 -0
  26. package/frontend/assets/index-CmrDaRXW.js +1 -0
  27. package/frontend/assets/index-CrCss1qG.js +1 -0
  28. package/frontend/assets/index-D8-ze-TP.js +1 -0
  29. package/frontend/assets/index-DB42uFFk.js +1 -0
  30. package/frontend/assets/index-DGsH5lbQ.js +170 -0
  31. package/frontend/assets/index-DQyWuir1.js +1 -0
  32. package/frontend/assets/index-DRndyOxR.js +463 -0
  33. package/frontend/assets/index-DaFaImds.js +1 -0
  34. package/frontend/assets/index-DbJECumi.js +1 -0
  35. package/frontend/assets/index-DpY8OPAr.js +1 -0
  36. package/frontend/assets/index-DvuJKeYS.js +1 -0
  37. package/frontend/assets/index-paF1osGm.js +1 -0
  38. package/frontend/assets/repositories-AJnxH9f7.js +1 -0
  39. package/frontend/assets/repositories-Dy8KRYwV.js +1 -0
  40. package/frontend/assets/review-B9u6XA77.js +1 -0
  41. package/frontend/assets/review-M5J-BQx7.js +1 -0
  42. package/frontend/assets/route-BLz_XVsx.js +1 -0
  43. package/frontend/index.html +1 -1
  44. package/package.json +1 -1
  45. package/published-review/app.js +106 -98
  46. package/frontend/assets/_branchId-Caxyy__g.js +0 -1
  47. package/frontend/assets/_branchId-IJ4VEzEl.js +0 -1
  48. package/frontend/assets/_id-3L9ONe4W.js +0 -1
  49. package/frontend/assets/_id-CvORsoNj.js +0 -1
  50. package/frontend/assets/agents-DnjhKMUc.js +0 -1
  51. package/frontend/assets/agents-bla75JmI.js +0 -1
  52. package/frontend/assets/create-B82q7ZMu.js +0 -1
  53. package/frontend/assets/create-C9yw-thL.js +0 -1
  54. package/frontend/assets/create-CEpA1s8S.js +0 -1
  55. package/frontend/assets/create-D0h6PRxn.js +0 -1
  56. package/frontend/assets/download-CwWMZwNG.js +0 -1
  57. package/frontend/assets/forges-BH3uXIQL.js +0 -1
  58. package/frontend/assets/forges-uSh1-w20.js +0 -1
  59. package/frontend/assets/index--nj01XKS.js +0 -1
  60. package/frontend/assets/index-0VAWT0gs.js +0 -1
  61. package/frontend/assets/index-B0zuYONu.js +0 -1
  62. package/frontend/assets/index-BQaZ5gZR.js +0 -1
  63. package/frontend/assets/index-BZ6iL63Z.js +0 -1
  64. package/frontend/assets/index-Bar8NyIm.js +0 -1
  65. package/frontend/assets/index-BlTfCkr5.js +0 -1
  66. package/frontend/assets/index-BvuPClj3.js +0 -1
  67. package/frontend/assets/index-C9xsdcXo.js +0 -1
  68. package/frontend/assets/index-CJDNq1TA.js +0 -1
  69. package/frontend/assets/index-CJslcuJ0.js +0 -1
  70. package/frontend/assets/index-CXyB0ld0.js +0 -1
  71. package/frontend/assets/index-CcORd1N6.js +0 -1
  72. package/frontend/assets/index-CrAQ5_e4.js +0 -1
  73. package/frontend/assets/index-DG0FDX8u.js +0 -1
  74. package/frontend/assets/index-DKnoo-kT.js +0 -455
  75. package/frontend/assets/index-DKzDkR6v.js +0 -1
  76. package/frontend/assets/index-DfKNJbUM.js +0 -170
  77. package/frontend/assets/index-DlUHisPA.js +0 -1
  78. package/frontend/assets/index-Dv5cF6qF.js +0 -1
  79. package/frontend/assets/index-JPWJ3IiN.js +0 -1
  80. package/frontend/assets/index-V1avMli5.js +0 -6
  81. package/frontend/assets/index-iRAoFOv3.js +0 -1
  82. package/frontend/assets/repositories-DqGU7W63.js +0 -1
  83. package/frontend/assets/repositories-DuObN8PJ.js +0 -1
  84. package/frontend/assets/review-BbbMUFsk.js +0 -1
  85. package/frontend/assets/review-C3k0h5Vl.js +0 -1
  86. package/frontend/assets/route-D8s8AylJ.js +0 -1
@@ -0,0 +1 @@
1
+ import{a9 as r}from"./index-DRndyOxR.js";const e=r;export{e as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as l,aa as c,j as u,ab as m}from"./index-DRndyOxR.js";const R=()=>{const e=l.c(6),t=c.useNavigate(),r=c.useParams(),o=c.useSearch();let a;e[0]!==t?(a=n=>{t({search:i=>({...i,...n}),replace:!0,resetScroll:!1})},e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==r||e[3]!==o||e[4]!==a?(s=u.jsx(m,{params:r,search:o,onSearchChange:a}),e[2]=r,e[3]=o,e[4]=a,e[5]=s):s=e[5],s};export{R as component};
@@ -0,0 +1 @@
1
+ import{u as ae,r as K,c as F,j as n,Z as oe,B as w,s as H,z as se,E as re,h as ce,i as de,ac as ue,ae as ee,G as me,m as q}from"./index-DRndyOxR.js";import{T as fe}from"./index-DGsH5lbQ.js";function xe(t,e){if(t===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in t)return t;if(typeof t=="function")return{shouldBlockFn:async()=>await t(),enableBeforeUnload:!0,withResolver:!1};const i=!!(t.condition??!0),a=t.blockerFn;return{shouldBlockFn:async()=>i&&a!==void 0?await a():i,enableBeforeUnload:i,withResolver:a===void 0}}function he(t,e){const{shouldBlockFn:i,enableBeforeUnload:a=!0,disabled:l=!1,withResolver:x=!1}=xe(t),o=ae(),{history:u}=o,[s,m]=K.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return K.useEffect(()=>{const r=async h=>{function c(N){const y=o.parseLocation(N),[,E,S]=o.getMatchedRoutes(y.pathname);return S===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:E,search:o.options.parseSearch(N.search)}:{routeId:S.id,fullPath:S.fullPath,pathname:y.pathname,params:E,search:o.options.parseSearch(N.search)}}const g=c(h.currentLocation),f=c(h.nextLocation);if(g.routeId==="__notFound__"&&f.routeId!=="__notFound__")return!1;const b=await i({action:h.action,current:g,next:f});if(!x)return b;if(!b)return!1;const j=await new Promise(N=>{m({status:"blocked",current:g,next:f,action:h.action,proceed:()=>N(!1),reset:()=>N(!0)})});return m({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),j};return l?void 0:u.block({blockerFn:r,enableBeforeUnload:a})},[i,a,l,x,u,o]),s}const ge="All configurations",be="Rename",ve="Name",je="Save name",ke="Cancel",te="Delete",Ne="Keep",ye="text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",Le=t=>{const e=F.c(29),[i,a]=K.useState("none"),[l,x]=K.useState(t.name);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(se,{to:"/settings/profiles",className:"text-sm text-muted-foreground underline decoration-input underline-offset-[0.3em] hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:ge}),e[0]=o):o=e[0];let u;e[1]!==l||e[2]!==t||e[3]!==i?(u=i==="renaming"?n.jsxs("form",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",onSubmit:H(()=>{t.onRename(l),a("none")}),children:[n.jsx(oe,{value:l,"aria-label":ve,className:"max-w-sm flex-1",onChange:g=>{x(g.target.value)}}),n.jsx(w,{type:"submit",size:"sm",children:je}),n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{a("none")},children:ke})]}):n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("h2",{className:ye,children:t.name}),n.jsx("p",{className:"text-sm text-muted-foreground",children:t.originLabel})]}),e[1]=l,e[2]=t,e[3]=i,e[4]=u):u=e[4];let s;e[5]!==t.canDelete||e[6]!==t.canRename||e[7]!==t.duplicateLabel||e[8]!==t.isBusy||e[9]!==t.name||e[10]!==t.notice||e[11]!==t.onDelete||e[12]!==t.onDuplicate||e[13]!==i?(s=i==="deleting"?n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("p",{className:"text-sm",children:`Delete ${t.name}? This cannot be undone.`}),n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{a("none")},children:Ne}),n.jsx(w,{type:"button",variant:"destructive",size:"sm",disabled:t.isBusy,onClick:t.onDelete,children:te})]}):n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.canRename&&i==="none"?n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{x(t.name),a("renaming")},children:be}):null,t.canDelete?n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{a("deleting")},children:te}):null,t.notice===null?n.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:t.isBusy,onClick:t.onDuplicate,children:t.duplicateLabel}):null]}),e[5]=t.canDelete,e[6]=t.canRename,e[7]=t.duplicateLabel,e[8]=t.isBusy,e[9]=t.name,e[10]=t.notice,e[11]=t.onDelete,e[12]=t.onDuplicate,e[13]=i,e[14]=s):s=e[14];let m;e[15]!==u||e[16]!==s?(m=n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-3",children:[u,s]}),e[15]=u,e[16]=s,e[17]=m):m=e[17];let r;e[18]!==t.errorMessage?(r=t.errorMessage===null?null:n.jsx("p",{role:"alert",className:"pt-3 text-sm text-destructive",children:t.errorMessage}),e[18]=t.errorMessage,e[19]=r):r=e[19];let h;e[20]!==t.duplicateLabel||e[21]!==t.isBusy||e[22]!==t.notice||e[23]!==t.onDuplicate?(h=t.notice===null?null:n.jsxs("div",{role:"note",className:"mt-4 flex flex-wrap items-center gap-x-4 gap-y-2 border-y border-border py-2.5",children:[n.jsxs("p",{className:"min-w-0 flex-1 text-sm",children:[n.jsx("strong",{className:"font-bold",children:t.notice.lead}),` ${t.notice.advice}`]}),n.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:t.isBusy,onClick:t.onDuplicate,children:t.duplicateLabel})]}),e[20]=t.duplicateLabel,e[21]=t.isBusy,e[22]=t.notice,e[23]=t.onDuplicate,e[24]=h):h=e[24];let c;return e[25]!==m||e[26]!==r||e[27]!==h?(c=n.jsxs("header",{className:"pb-6",children:[o,m,r,h]}),e[25]=m,e[26]=r,e[27]=h,e[28]=c):c=e[28],c},Ee="cursor-pointer text-sm text-muted-foreground underline decoration-input underline-offset-[0.3em] hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",Se="mt-2 max-w-[75ch] border-l border-input pl-4 text-sm leading-6 whitespace-pre-wrap text-muted-foreground",we="You have not saved this field. Leave it and lose what you wrote?",Be="Not saved yet",pe="Keep editing",_e="Leave",Ae=t=>Object.fromEntries(t.map(e=>[e.key,e.value])),Ke=t=>{const e=F.c(45),{title:i,summary:a,path:l,offMessage:x,texts:o,renderActions:u,onSubmit:s}=t;let m;e[0]!==o?(m=()=>Ae(o),e[0]=o,e[1]=m):m=e[1];const[r,h]=K.useState(m);let c;if(e[2]!==r||e[3]!==o){let k;e[5]!==r?(k=L=>r[L.key]!==L.value,e[5]=r,e[6]=k):k=e[6],c=o.some(k),e[2]=r,e[3]=o,e[4]=c}else c=e[4];const g=c;let f;e[7]!==g?(f=()=>g,e[7]=g,e[8]=f):f=e[8];let b;e[9]!==g||e[10]!==f?(b={shouldBlockFn:f,enableBeforeUnload:g,withResolver:!0},e[9]=g,e[10]=f,e[11]=b):b=e[11];const j=he(b);let N;e[12]!==j.proceed||e[13]!==j.reset||e[14]!==j.status?(N=j.status==="blocked"?n.jsxs("div",{role:"alert",className:"flex flex-wrap items-center justify-end gap-2 pb-3",children:[n.jsx("p",{className:"text-sm",children:we}),n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:j.reset,children:pe}),n.jsx(w,{type:"button",variant:"destructive",size:"sm",onClick:j.proceed,children:_e})]}):null,e[12]=j.proceed,e[13]=j.reset,e[14]=j.status,e[15]=N):N=e[15];const y=N;let E;e[16]!==r||e[17]!==s||e[18]!==o?(E=H(()=>{s(o.map(k=>({key:k.key,text:r[k.key]??k.value})))}),e[16]=r,e[17]=s,e[18]=o,e[19]=E):E=e[19];let S;e[20]!==i?(S=n.jsx("h3",{className:"text-xl leading-7 font-bold",children:i}),e[20]=i,e[21]=S):S=e[21];let p;e[22]!==a?(p=n.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:a}),e[22]=a,e[23]=p):p=e[23];let _;e[24]!==l?(_=n.jsx("p",{className:"mt-1 font-mono text-[0.8125rem] wrap-anywhere text-muted-foreground",children:l}),e[24]=l,e[25]=_):_=e[25];let A;e[26]!==x?(A=x===null?null:n.jsx("p",{className:"mt-4 max-w-[62ch] border-y border-border py-2.5 text-sm",children:x}),e[26]=x,e[27]=A):A=e[27];let B;if(e[28]!==o||e[29]!==i){let k;e[31]!==i?(k=L=>n.jsxs("section",{className:"mt-6",children:[n.jsx("h4",{className:"pb-1.5 text-sm font-bold",children:L.label}),n.jsx(fe,{label:`${i}: ${L.label}`,value:L.value,errorMessage:null,onChange:D=>{h(M=>({...M,[L.key]:D}))}}),L.isChanged?n.jsxs("details",{className:"mt-2",children:[n.jsx("summary",{className:Ee,children:L.shippedLabel}),n.jsx("p",{className:Se,children:L.shippedValue})]}):null]},L.key),e[31]=i,e[32]=k):k=e[32],B=o.map(k),e[28]=o,e[29]=i,e[30]=B}else B=e[30];const R=g?Be:null;let d;e[33]!==y||e[34]!==u||e[35]!==R?(d=u(R,y),e[33]=y,e[34]=u,e[35]=R,e[36]=d):d=e[36];let C;return e[37]!==A||e[38]!==B||e[39]!==d||e[40]!==E||e[41]!==S||e[42]!==p||e[43]!==_?(C=n.jsxs("form",{onSubmit:E,children:[S,p,_,A,B,d]}),e[37]=A,e[38]=B,e[39]=d,e[40]=E,e[41]=S,e[42]=p,e[43]=_,e[44]=C):C=e[44],C},Re="Fields of this configuration",Ce="What the marks mean",De=[{mark:"changed",label:"Changed"},{mark:"unchanged",label:"Unchanged"},{mark:"off",label:"Not written"}],Me={changed:"border-foreground bg-foreground",unchanged:"border-muted-foreground",off:"border-dashed border-muted-foreground"},Te="group flex items-center gap-3 border-l-4 border-border py-1.5 pr-2 pl-4 transition-colors duration-[180ms] ease-out hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:border-(--line)",le=t=>{const e=F.c(4),{mark:i}=t,a=Me[i];let l;e[0]!==a?(l=re("size-2.5 shrink-0 rounded-[2px] border-[1.5px]",a),e[0]=a,e[1]=l):l=e[1];let x;return e[2]!==l?(x=n.jsx("span",{"aria-hidden":"true",className:l}),e[2]=l,e[3]=x):x=e[3],x},Fe=t=>{const e=F.c(10),{configurationId:i,groups:a}=t;let l;if(e[0]!==i||e[1]!==a){let s;e[3]!==i?(s=m=>n.jsxs("section",{children:[m.title===null?null:n.jsx("div",{className:"flex items-center gap-3 border-l-4 border-border pt-4 pr-2 pb-1 pl-4",children:n.jsx("h3",{className:"min-w-0 flex-1 text-xs leading-4 font-bold text-muted-foreground",children:m.title})}),n.jsx("ul",{children:m.entries.map(r=>n.jsx("li",{children:n.jsxs(se,{to:"/settings/profiles/$id",params:{id:i},search:{field:r.key},"aria-current":r.isOpen?"page":void 0,className:Te,children:[n.jsx("span",{className:"min-w-0 flex-1 text-sm leading-5 group-aria-[current=page]:font-bold group-aria-[current=page]:text-signal-text",children:r.label}),n.jsx(le,{mark:r.mark}),n.jsx("span",{className:"sr-only",children:r.markLabel})]})},r.key))})]},m.title??""),e[3]=i,e[4]=s):s=e[4],l=a.map(s),e[0]=i,e[1]=a,e[2]=l}else l=e[2];let x;e[5]!==l?(x=n.jsx("div",{className:"min-h-0 overflow-y-auto",children:l}),e[5]=l,e[6]=x):x=e[6];let o;e[7]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("ul",{"aria-label":Ce,className:"flex shrink-0 flex-wrap gap-x-4 gap-y-1 border-t border-border pt-3 text-xs text-muted-foreground",children:De.map($e)}),e[7]=o):o=e[7];let u;return e[8]!==x?(u=n.jsxs("nav",{"aria-label":Re,className:"flex flex-col lg:max-h-[calc(100dvh-7rem)]",children:[x,o]}),e[8]=x,e[9]=u):u=e[9],u};function $e(t){return n.jsxs("li",{className:"flex items-center gap-1.5",children:[n.jsx(le,{mark:t.mark}),t.label]},t.mark)}const Ie="Save",Pe="Saving…",ne=t=>{const e=F.c(17),{isPending:i,errorMessage:a,savedMessage:l,unsavedLabel:x,question:o,children:u}=t,s=x===void 0?null:x,m=o===void 0?null:o;let r;e[0]!==a?(r=a===null?null:n.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:a}),e[0]=a,e[1]=r):r=e[1];let h;e[2]!==i||e[3]!==l||e[4]!==s?(h=s===null?n.jsx("p",{role:"status",className:"ml-auto text-sm text-muted-foreground",children:i?null:l}):n.jsx("p",{className:"ml-auto text-sm font-bold",children:s}),e[2]=i,e[3]=l,e[4]=s,e[5]=h):h=e[5];const c=i?Pe:Ie;let g;e[6]!==i||e[7]!==c?(g=n.jsx(w,{type:"submit",disabled:i,children:c}),e[6]=i,e[7]=c,e[8]=g):g=e[8];let f;e[9]!==u||e[10]!==h||e[11]!==g?(f=n.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[u,h,g]}),e[9]=u,e[10]=h,e[11]=g,e[12]=f):f=e[12];let b;return e[13]!==m||e[14]!==r||e[15]!==f?(b=n.jsxs("footer",{className:"sticky bottom-0 z-10 mt-6 border-t border-border bg-background py-4 before:absolute before:-inset-x-1 before:inset-y-0 before:-z-10 before:bg-background",children:[m,r,f]}),e[13]=m,e[14]=r,e[15]=f,e[16]=b):b=e[16],b},ze=(t,e)=>t.includes(e)?t.filter(i=>i!==e):[...t,e],Oe=t=>{const e=F.c(17),{label:i,description:a,isChecked:l,onToggle:x}=t,o=K.useId(),u=K.useId();let s;e[0]!==u||e[1]!==o||e[2]!==l||e[3]!==x?(s=n.jsx("input",{id:o,type:"checkbox",checked:l,"aria-describedby":u,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:x}),e[0]=u,e[1]=o,e[2]=l,e[3]=x,e[4]=s):s=e[4];let m;e[5]!==o||e[6]!==i?(m=n.jsx("label",{htmlFor:o,className:"block cursor-pointer font-bold",children:i}),e[5]=o,e[6]=i,e[7]=m):m=e[7];let r;e[8]!==a||e[9]!==u?(r=n.jsx("p",{id:u,className:"max-w-[62ch] text-sm text-muted-foreground",children:a}),e[8]=a,e[9]=u,e[10]=r):r=e[10];let h;e[11]!==m||e[12]!==r?(h=n.jsxs("div",{className:"min-w-0",children:[m,r]}),e[11]=m,e[12]=r,e[13]=h):h=e[13];let c;return e[14]!==s||e[15]!==h?(c=n.jsxs("li",{className:"flex items-start gap-3 border-b border-border py-3",children:[s,h]}),e[14]=s,e[15]=h,e[16]=c):c=e[16],c},Ue=t=>{const e=F.c(30);let i;e[0]!==t.contextKinds?(i=()=>t.contextKinds.filter(qe).map(He),e[0]=t.contextKinds,e[1]=i):i=e[1];const[a,l]=K.useState(i);let x;e[2]!==t||e[3]!==a?(x=H(()=>{t.onSubmit(a)}),e[2]=t,e[3]=a,e[4]=x):x=e[4];let o;e[5]!==t.title?(o=n.jsx("h3",{className:"text-xl leading-7 font-bold",children:t.title}),e[5]=t.title,e[6]=o):o=e[6];let u;e[7]!==t.summary?(u=n.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:t.summary}),e[7]=t.summary,e[8]=u):u=e[8];let s;e[9]!==t.contextKindsTitle?(s=n.jsx("legend",{className:"text-sm font-bold",children:t.contextKindsTitle}),e[9]=t.contextKindsTitle,e[10]=s):s=e[10];let m;e[11]!==t.contextKindsHint?(m=n.jsx("p",{className:"max-w-[62ch] pb-2 text-sm text-muted-foreground",children:t.contextKindsHint}),e[11]=t.contextKindsHint,e[12]=m):m=e[12];let r;if(e[13]!==t.contextKinds||e[14]!==a){let f;e[16]!==a?(f=b=>n.jsx(Oe,{label:b.label,description:b.description,isChecked:a.includes(b.kind),onToggle:()=>{l(j=>ze(j,b.kind))}},b.kind),e[16]=a,e[17]=f):f=e[17],r=t.contextKinds.map(f),e[13]=t.contextKinds,e[14]=a,e[15]=r}else r=e[15];let h;e[18]!==r?(h=n.jsx("ul",{className:"border-t border-border",children:r}),e[18]=r,e[19]=h):h=e[19];let c;e[20]!==s||e[21]!==m||e[22]!==h?(c=n.jsxs("fieldset",{className:"mt-6",children:[s,m,h]}),e[20]=s,e[21]=m,e[22]=h,e[23]=c):c=e[23];let g;return e[24]!==t.children||e[25]!==x||e[26]!==o||e[27]!==u||e[28]!==c?(g=n.jsxs("form",{onSubmit:x,children:[o,u,c,t.children]}),e[24]=t.children,e[25]=x,e[26]=o,e[27]=u,e[28]=c,e[29]=g):g=e[29],g};function qe(t){return t.isRequired}function He(t){return t.kind}const Ve="Prompt configurations • Settings • Flight Plan",We=()=>{var V,G,Q,Y,X,W,Z,J;const t=F.c(78),e=ce(),i=de(),a=ue(),{id:l}=ee.useParams(),{field:x}=ee.useSearch(),o=x===void 0?null:x;let u;t[0]!==o||t[1]!==l||t[2]!==e.configuration.get?(u=e.configuration.get.queryOptions({id:l,field:o}),t[0]=o,t[1]=l,t[2]=e.configuration.get,t[3]=u):u=t[3];const{data:s}=me(u),[m,r]=K.useState(0);let h;t[4]!==i||t[5]!==e.configuration?(h=async()=>{await i.invalidateQueries(e.configuration.pathFilter())},t[4]=i,t[5]=e.configuration,t[6]=h):h=t[6];const c=h;let g;if(t[7]!==c||t[8]!==e.configuration.save){let v;t[10]!==c?(v=async(T,ie)=>{T.kind!=="rejected"&&(await c(),ie.change==="reset"&&r(Ge))},t[10]=c,t[11]=v):v=t[11],g=e.configuration.save.mutationOptions({onSuccess:v}),t[7]=c,t[8]=e.configuration.save,t[9]=g}else g=t[9];const f=q(g);let b;if(t[12]!==a||t[13]!==c||t[14]!==e.configuration.create){let v;t[16]!==a||t[17]!==c?(v=async T=>{T.kind!=="rejected"&&(await c(),await a({to:"/settings/profiles/$id",params:{id:T.id}}))},t[16]=a,t[17]=c,t[18]=v):v=t[18],b=e.configuration.create.mutationOptions({onSuccess:v}),t[12]=a,t[13]=c,t[14]=e.configuration.create,t[15]=b}else b=t[15];const j=q(b);let N;if(t[19]!==a||t[20]!==c||t[21]!==e.configuration.delete){let v;t[23]!==a||t[24]!==c?(v=async T=>{T.kind!=="rejected"&&(await a({to:"/settings/profiles"}),await c())},t[23]=a,t[24]=c,t[25]=v):v=t[25],N=e.configuration.delete.mutationOptions({onSuccess:v}),t[19]=a,t[20]=c,t[21]=e.configuration.delete,t[22]=N}else N=t[22];const y=q(N),E=((V=f.variables)==null?void 0:V.change)==="rename",S=((G=f.data)==null?void 0:G.kind)==="rejected"?f.data.message:((Q=f.error)==null?void 0:Q.message)??null,p=(E?S:null)??(((Y=j.data)==null?void 0:Y.kind)==="rejected"?j.data.message:(X=j.error)==null?void 0:X.message)??(((W=y.data)==null?void 0:W.kind)==="rejected"?y.data.message:(Z=y.error)==null?void 0:Z.message)??null,_=E?null:S,A=((J=f.data)==null?void 0:J.kind)==="saved"&&!E?f.data.message:null;let B;t[26]!==f.isPending||t[27]!==_||t[28]!==A?(B={isPending:f.isPending,errorMessage:_,savedMessage:A},t[26]=f.isPending,t[27]=_,t[28]=A,t[29]=B):B=t[29];const R=B,{panel:d}=s,C=`${s.name} • ${Ve}`;let k;t[30]!==C?(k=n.jsx("title",{children:C}),t[30]=C,t[31]=k):k=t[31];const L=j.isPending||y.isPending;let D;t[32]!==j||t[33]!==l?(D=()=>{j.mutate({name:null,sourceId:l})},t[32]=j,t[33]=l,t[34]=D):D=t[34];let M;t[35]!==l||t[36]!==f?(M=v=>{f.mutate({change:"rename",id:l,name:v})},t[35]=l,t[36]=f,t[37]=M):M=t[37];let $;t[38]!==l||t[39]!==y?($=()=>{y.mutate({id:l})},t[38]=l,t[39]=y,t[40]=$):$=t[40];let I;t[41]!==p||t[42]!==s.canDelete||t[43]!==s.canRename||t[44]!==s.duplicateLabel||t[45]!==s.name||t[46]!==s.notice||t[47]!==s.originLabel||t[48]!==L||t[49]!==D||t[50]!==M||t[51]!==$?(I=n.jsx(Le,{name:s.name,originLabel:s.originLabel,notice:s.notice,canRename:s.canRename,canDelete:s.canDelete,duplicateLabel:s.duplicateLabel,isBusy:L,errorMessage:p,onDuplicate:D,onRename:M,onDelete:$}),t[41]=p,t[42]=s.canDelete,t[43]=s.canRename,t[44]=s.duplicateLabel,t[45]=s.name,t[46]=s.notice,t[47]=s.originLabel,t[48]=L,t[49]=D,t[50]=M,t[51]=$,t[52]=I):I=t[52];let P;t[53]!==l||t[54]!==s.index?(P=n.jsx("div",{className:"self-start lg:sticky lg:top-22",children:n.jsx(Fe,{configurationId:l,groups:s.index})}),t[53]=l,t[54]=s.index,t[55]=P):P=t[55];let z;t[56]!==l||t[57]!==d.contextKinds||t[58]!==d.contextKindsHint||t[59]!==d.contextKindsTitle||t[60]!==d.kind||t[61]!==d.offMessage||t[62]!==d.path||t[63]!==d.resetLabel||t[64]!==d.summary||t[65]!==d.texts||t[66]!==d.title||t[67]!==R||t[68]!==m||t[69]!==f?(z=n.jsx("div",{className:"min-w-0",children:d.kind==="switches"?n.jsx(Ue,{title:d.title,summary:d.summary,contextKindsTitle:d.contextKindsTitle,contextKindsHint:d.contextKindsHint,contextKinds:d.contextKinds,onSubmit:v=>{f.mutate({change:"switches",id:l,contextCodeBlockKinds:v})},children:n.jsx(ne,{...R})},`${l}:${d.contextKinds.map(Qe).join()}`):n.jsx(Ke,{title:d.title,summary:d.summary,path:d.path,offMessage:d.offMessage,texts:d.texts,renderActions:(v,T)=>n.jsx(ne,{...R,unsavedLabel:v,question:T,children:d.resetLabel===null?null:n.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>{f.mutate({change:"reset",id:l,path:d.path})},children:d.resetLabel})}),onSubmit:v=>{f.mutate({change:"field",id:l,path:d.path,texts:v})}},`${l}:${d.path}:${String(m)}`)}),t[56]=l,t[57]=d.contextKinds,t[58]=d.contextKindsHint,t[59]=d.contextKindsTitle,t[60]=d.kind,t[61]=d.offMessage,t[62]=d.path,t[63]=d.resetLabel,t[64]=d.summary,t[65]=d.texts,t[66]=d.title,t[67]=R,t[68]=m,t[69]=f,t[70]=z):z=t[70];let O;t[71]!==P||t[72]!==z?(O=n.jsxs("div",{className:"grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)]",children:[P,z]}),t[71]=P,t[72]=z,t[73]=O):O=t[73];let U;return t[74]!==k||t[75]!==I||t[76]!==O?(U=n.jsxs(n.Fragment,{children:[k,I,O]}),t[74]=k,t[75]=I,t[76]=O,t[77]=U):U=t[77],U};function Ge(t){return t+1}function Qe(t){return String(t.isRequired)}export{We as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as E,h as j,N as w,G as v,r as y,l as F,j as n}from"./index-DRndyOxR.js";import{u as T,S as _}from"./index-CikPFj0e.js";import{A as B,a as C}from"./index-CFZ7PaJE.js";import{S as I}from"./index-DvuJKeYS.js";import"./index-BA8Qwprc.js";import"./index-COdzqD_M.js";const O="Agent integration • Settings • Flight Plan",N="Agent integration",U=()=>{var M;const e=E.c(26),r=j();let g;e[0]!==r.settings.get?(g=r.settings.get.queryOptions(w),e[0]=r.settings.get,e[1]=g):g=e[1];const{data:s}=v(g),t=T(),[i,x]=y.useState(null);let o;e[2]!==i||e[3]!==r.setup.browseFolders?(o=r.setup.browseFolders.queryOptions({path:i??"",purpose:"install-folder"}),e[2]=i,e[3]=r.setup.browseFolders,e[4]=o):o=e[4];const h=i!==null;let c;e[5]!==o||e[6]!==h?(c={...o,enabled:h},e[5]=o,e[6]=h,e[7]=c):c=e[7];const A=F(c);if(s.section!==w.section)return null;let u,d;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("title",{children:O}),d=n.jsx(I,{title:N,children:"Configure which agent you prefer and where Flight Plan installs the agent plugin and the MCP server."}),e[8]=u,e[9]=d):(u=e[8],d=e[9]);const S=i===null?null:A.data??null,b=((M=A.error)==null?void 0:M.message)??null;let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{x(null)},e[10]=m):m=e[10];let l;e[11]!==t?(l=P=>{t.save({...w,...P})},e[11]=t,e[12]=l):l=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(C,{}),e[13]=p):p=e[13];let a;e[14]!==t.errorMessage||e[15]!==t.isPending||e[16]!==t.savedMessage?(a=n.jsx(_,{isPending:t.isPending,errorMessage:t.errorMessage,savedMessage:t.savedMessage}),e[14]=t.errorMessage,e[15]=t.isPending,e[16]=t.savedMessage,e[17]=a):a=e[17];let f;return e[18]!==s.agents||e[19]!==s.defaultAgent||e[20]!==t.problem||e[21]!==a||e[22]!==S||e[23]!==b||e[24]!==l?(f=n.jsxs(n.Fragment,{children:[u,d,n.jsxs(B,{agents:s.agents,defaultAgent:s.defaultAgent,problem:t.problem,folderBrowser:S,folderBrowserErrorMessage:b,onBrowseFolder:x,onBrowseEnd:m,onSubmit:l,children:[p,a]})]}),e[18]=s.agents,e[19]=s.defaultAgent,e[20]=t.problem,e[21]=a,e[22]=S,e[23]=b,e[24]=l,e[25]=f):f=e[25],f};export{U as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as x,j as c,S as j,h as b,ac as P,r as Q,G as E,k as y,l as R,ad as $}from"./index-DRndyOxR.js";const q=t=>{const e=x.c(9),{creationForm:a,targetSearch:r,onTargetQueryChange:s,onTargetSelect:o}=t;let n;return e[0]!==a.target.hint||e[1]!==a.target.label||e[2]!==a.target.placeholder||e[3]!==s||e[4]!==o||e[5]!==r.message||e[6]!==r.options||e[7]!==r.value?(n=c.jsx("div",{className:"grid max-w-208 gap-4",children:c.jsx(j,{label:a.target.label,hint:a.target.hint,placeholder:a.target.placeholder,value:r.value,suggestions:r.options,message:r.message,errorMessage:null,className:"max-w-xl",onValueChange:s,onSelect:o})}),e[0]=a.target.hint,e[1]=a.target.label,e[2]=a.target.placeholder,e[3]=s,e[4]=o,e[5]=r.message,e[6]=r.options,e[7]=r.value,e[8]=n):n=e[8],n},k="Searching…",D="",G=t=>{var f,v,T,C;const e=x.c(22),a=b(),r=P(),[s,o]=Q.useState(D),n=Q.useDeferredValue(s);let l;e[0]!==t||e[1]!==a.review.creationForm?(l=a.review.creationForm.queryOptions({repositoryName:t}),e[0]=t,e[1]=a.review.creationForm,e[2]=l):l=e[2];const{data:F}=E(l);let i;e[3]!==n||e[4]!==t||e[5]!==a.review.searchTargets?(i=a.review.searchTargets.queryOptions({repositoryName:t,query:n}),e[3]=n,e[4]=t,e[5]=a.review.searchTargets,e[6]=i):i=e[6];let d;e[7]!==i?(d={...i,placeholderData:y},e[7]=i,e[8]=d):d=e[8];const m=R(d);let g;e[9]!==((f=m.data)==null?void 0:f.options)?(g=((v=m.data)==null?void 0:v.options)??[],e[9]=(T=m.data)==null?void 0:T.options,e[10]=g):g=e[10];const S=((C=m.data)==null?void 0:C.message)??(m.isPending?k:null);let u;e[11]!==s||e[12]!==g||e[13]!==S?(u={value:s,options:g,message:S},e[11]=s,e[12]=g,e[13]=S,e[14]=u):u=e[14];let h;e[15]!==r||e[16]!==t?(h=w=>{r({to:"/pr-reviews/$repoName/$branchId",params:{repoName:t,branchId:w}})},e[15]=r,e[16]=t,e[17]=h):h=e[17];let p;return e[18]!==F||e[19]!==u||e[20]!==h?(p={creationForm:F,targetSearch:u,onTargetQueryChange:o,onTargetSelect:h},e[18]=F,e[19]=u,e[20]=h,e[21]=p):p=e[21],p},N=()=>{const t=x.c(15),{repoName:e}=$.useParams(),a=G(e);let r;t[0]!==a.creationForm.title?(r=c.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:a.creationForm.title}),t[0]=a.creationForm.title,t[1]=r):r=t[1];let s;t[2]!==a.creationForm.description?(s=c.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:a.creationForm.description}),t[2]=a.creationForm.description,t[3]=s):s=t[3];let o;t[4]!==r||t[5]!==s?(o=c.jsxs("header",{className:"pb-6",children:[r,s]}),t[4]=r,t[5]=s,t[6]=o):o=t[6];let n;t[7]!==a.creationForm||t[8]!==a.onTargetQueryChange||t[9]!==a.onTargetSelect||t[10]!==a.targetSearch?(n=c.jsx(q,{creationForm:a.creationForm,targetSearch:a.targetSearch,onTargetQueryChange:a.onTargetQueryChange,onTargetSelect:a.onTargetSelect}),t[7]=a.creationForm,t[8]=a.onTargetQueryChange,t[9]=a.onTargetSelect,t[10]=a.targetSearch,t[11]=n):n=t[11];let l;return t[12]!==o||t[13]!==n?(l=c.jsxs(c.Fragment,{children:[o,n]}),t[12]=o,t[13]=n,t[14]=l):l=t[14],l};export{N as component};
@@ -0,0 +1 @@
1
+ import{c as B,r as F,s as O,j as s,Z as M,L as R,h as H,i as U,ac as Q,G as $,m as q,z,w as D,B as G}from"./index-DRndyOxR.js";import{S as V}from"./index-DvuJKeYS.js";const Y="Name",Z="How the configuration is listed when you create a Flight Plan.",J="Start from",K="The new configuration is a copy of the same instructions, yours to change.",W=t=>{const e=B.c(41),{sources:j,selectedSourceId:v,nameError:l,sourceError:o,children:g,onSubmit:n}=t,r=F.useId(),h=F.useId(),d=F.useId(),[u,T]=F.useState(""),[a,p]=F.useState(v);let i;e[0]!==u||e[1]!==n||e[2]!==a?(i=O(()=>{n(u,a)}),e[0]=u,e[1]=n,e[2]=a,e[3]=i):i=e[3];let f;e[4]!==r?(f=s.jsx("label",{htmlFor:r,className:"block text-sm font-bold",children:Y}),e[4]=r,e[5]=f):f=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"pb-2 text-sm text-muted-foreground",children:Z}),e[6]=c):c=e[6];const x=l!==null,b=l===null?void 0:h;let S;e[7]===Symbol.for("react.memo_cache_sentinel")?(S=w=>{T(w.target.value)},e[7]=S):S=e[7];let m;e[8]!==u||e[9]!==r||e[10]!==x||e[11]!==b?(m=s.jsx(M,{id:r,value:u,"aria-invalid":x,"aria-describedby":b,onChange:S}),e[8]=u,e[9]=r,e[10]=x,e[11]=b,e[12]=m):m=e[12];let N;e[13]!==l||e[14]!==h?(N=l===null?null:s.jsx("p",{id:h,role:"alert",className:"pt-1.5 text-sm text-destructive",children:l}),e[13]=l,e[14]=h,e[15]=N):N=e[15];let y;e[16]!==f||e[17]!==m||e[18]!==N?(y=s.jsxs("div",{className:"max-w-md",children:[f,c,m,N]}),e[16]=f,e[17]=m,e[18]=N,e[19]=y):y=e[19];let P,k;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("legend",{className:"text-sm font-bold",children:J}),k=s.jsx("p",{className:"max-w-[62ch] pb-2 text-sm text-muted-foreground",children:K}),e[20]=P,e[21]=k):(P=e[20],k=e[21]);let I;if(e[22]!==d||e[23]!==a||e[24]!==j){let w;e[26]!==d||e[27]!==a?(w=E=>s.jsx("li",{className:"border-b border-border py-3",children:s.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[s.jsx("input",{type:"radio",name:d,checked:a===E.id,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:()=>{p(E.id)}}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block font-bold",children:E.name}),E.summary===null?null:s.jsx("span",{className:"block max-w-[62ch] text-sm",children:E.summary}),s.jsx(R,{segments:E.details,className:"text-sm text-muted-foreground"})]})]})},E.id),e[26]=d,e[27]=a,e[28]=w):w=e[28],I=j.map(w),e[22]=d,e[23]=a,e[24]=j,e[25]=I}else I=e[25];let _;e[29]!==I?(_=s.jsx("ul",{className:"border-t border-border",children:I}),e[29]=I,e[30]=_):_=e[30];let C;e[31]!==o?(C=o===null?null:s.jsx("p",{role:"alert",className:"pt-2 text-sm text-destructive",children:o}),e[31]=o,e[32]=C):C=e[32];let L;e[33]!==_||e[34]!==C?(L=s.jsxs("fieldset",{className:"mt-8",children:[P,k,_,C]}),e[33]=_,e[34]=C,e[35]=L):L=e[35];let A;return e[36]!==g||e[37]!==i||e[38]!==L||e[39]!==y?(A=s.jsxs("form",{onSubmit:i,children:[y,L,g]}),e[36]=g,e[37]=i,e[38]=L,e[39]=y,e[40]=A):A=e[40],A},X="New configuration • Settings • Flight Plan",ee="New configuration",te="Create",se="Creating…",ne="Cancel",le=()=>{var S;const t=B.c(26),e=H(),j=U(),v=Q();let l;t[0]!==e.configuration.creationForm?(l=e.configuration.creationForm.queryOptions(),t[0]=e.configuration.creationForm,t[1]=l):l=t[1];const{data:o}=$(l);let g;t[2]!==v||t[3]!==j||t[4]!==e.configuration?(g=e.configuration.create.mutationOptions({onSuccess:async m=>{m.kind!=="rejected"&&(await j.invalidateQueries(e.configuration.pathFilter()),await v({to:"/settings/profiles/$id",params:{id:m.id}}))}}),t[2]=v,t[3]=j,t[4]=e.configuration,t[5]=g):g=t[5];const n=q(g),r=((S=n.data)==null?void 0:S.kind)==="rejected"?n.data:null;let h,d;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("title",{children:X}),d=s.jsx(V,{title:ee,children:"Name the configuration and choose what it starts from. You change its instructions on the next page."}),t[6]=h,t[7]=d):(h=t[6],d=t[7]);const u=(r==null?void 0:r.field)==="name"?r.message:null,T=(r==null?void 0:r.field)==="source"?r.message:null;let a;t[8]!==n?(a=(m,N)=>{n.mutate({name:m,sourceId:N})},t[8]=n,t[9]=a):a=t[9];let p;t[10]!==n.error?(p=n.error===null?null:s.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:n.error.message}),t[10]=n.error,t[11]=p):p=t[11];let i;t[12]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(z,{to:"/settings/profiles",className:D({variant:"ghost"}),children:ne}),t[12]=i):i=t[12];const f=n.isPending?se:te;let c;t[13]!==n.isPending||t[14]!==f?(c=s.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[i,s.jsx(G,{type:"submit",disabled:n.isPending,children:f})]}),t[13]=n.isPending,t[14]=f,t[15]=c):c=t[15];let x;t[16]!==c||t[17]!==p?(x=s.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[p,c]}),t[16]=c,t[17]=p,t[18]=x):x=t[18];let b;return t[19]!==o.selectedSourceId||t[20]!==o.sources||t[21]!==x||t[22]!==u||t[23]!==T||t[24]!==a?(b=s.jsxs(s.Fragment,{children:[h,d,s.jsx(W,{sources:o.sources,selectedSourceId:o.selectedSourceId,nameError:u,sourceError:T,onSubmit:a,children:x})]}),t[19]=o.selectedSourceId,t[20]=o.sources,t[21]=x,t[22]=u,t[23]=T,t[24]=a,t[25]=b):b=t[25],b};export{le as component};
@@ -0,0 +1 @@
1
+ import{c as x,u as p,j as r,B as f,z as u}from"./index-DRndyOxR.js";const h="The backend did not say what went wrong.",g=d=>{const e=x.c(11),{error:m}=d,i=p();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:"Could not open this page"}),e[0]=n):n=e[0];const c=m instanceof Error?m.message:h;let t;e[1]!==c?(t=r.jsx("p",{className:"mt-2 text-muted-foreground",children:c}),e[1]=c,e[2]=t):t=e[2];let s;e[3]!==i?(s=r.jsx(f,{onClick:()=>{i.invalidate()},children:"Try again"}),e[3]=i,e[4]=s):s=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(u,{to:"/",className:"underline",children:"Go to your repositories"}),e[5]=l):l=e[5];let o;e[6]!==s?(o=r.jsxs("div",{className:"mt-4 flex items-center gap-4",children:[s,l]}),e[6]=s,e[7]=o):o=e[7];let a;return e[8]!==t||e[9]!==o?(a=r.jsxs("section",{role:"alert",className:"max-w-prose",children:[n,t,o]}),e[8]=t,e[9]=o,e[10]=a):a=e[10],a},E=g;export{E as errorComponent};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as S,E as $,j as r,a5 as C,h as k,i as q,a6 as E,a7 as H,r as O,G as B,m as Q,a8 as z,B as D,z as M}from"./index-DRndyOxR.js";const T=e=>{const s=S.c(6),{label:l,className:i}=e;let n;s[0]!==i?(n=$("flex items-center gap-2 font-bold",i),s[0]=i,s[1]=n):n=s[1];let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(C,{"aria-hidden":"true",className:"size-4 motion-safe:animate-spin"}),s[2]=o):o=s[2];let c;return s[3]!==l||s[4]!==n?(c=r.jsxs("p",{role:"status",className:n,children:[o,l]}),s[3]=l,s[4]=n,s[5]=c):c=s[5],c},A=2e3,J=()=>{var F,R;const e=S.c(48),s=k(),l=q(),i=E.useSearch(),n=E.useLoaderData(),o=H(i),[c,w]=O.useState(n.importId),L=s.review.importForm.queryOptions(o);let v;e[0]!==L?(v={...L,refetchInterval:A},e[0]=L,e[1]=v):v=e[1];const{data:t}=B(v);let N;if(e[2]!==l||e[3]!==w||e[4]!==s.review.import||e[5]!==s.review.importForm){let m;e[7]!==l||e[8]!==w||e[9]!==s.review.importForm?(m=async P=>{const{importId:_}=P;w(_),await l.invalidateQueries(s.review.importForm.pathFilter())},e[7]=l,e[8]=w,e[9]=s.review.importForm,e[10]=m):m=e[10],N=s.review.import.mutationOptions({onSuccess:m}),e[2]=l,e[3]=w,e[4]=s.review.import,e[5]=s.review.importForm,e[6]=N}else N=e[6];const a=Q(N),j=((F=a.error)==null?void 0:F.message)??(((R=a.data)==null?void 0:R.importId)===null?a.data.message:n.refusal);if(t.isFinished&&t.importId!==null&&t.importId===c){let m;return e[11]!==i.repository||e[12]!==i.target?(m=r.jsx(z,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:i.repository,branchId:i.target},replace:!0}),e[11]=i.repository,e[12]=i.target,e[13]=m):m=e[13],m}let d;e[14]!==t.heading?(d=r.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:t.heading}),e[14]=t.heading,e[15]=d):d=e[15];let p;e[16]!==t.message?(p=r.jsx("p",{className:"mt-2 text-muted-foreground",children:t.message}),e[16]=t.message,e[17]=p):p=e[17];let u;e[18]!==t.details?(u=t.details.length===0?null:r.jsx("dl",{className:"mt-6 grid grid-cols-[auto_minmax(0,1fr)] gap-x-6 gap-y-1 text-sm",children:t.details.map(G)}),e[18]=t.details,e[19]=u):u=e[19];let g;e[20]!==t.warning?(g=t.warning===null?null:r.jsx("p",{className:"mt-6 font-bold text-signal-text",children:t.warning}),e[20]=t.warning,e[21]=g):g=e[21];let f;e[22]!==t.isImporting||e[23]!==t.pendingLabel||e[24]!==a.isPending?(f=t.isImporting||a.isPending?r.jsx(T,{label:t.pendingLabel,className:"mt-6"}):null,e[22]=t.isImporting,e[23]=t.pendingLabel,e[24]=a.isPending,e[25]=f):f=e[25];let x;e[26]!==t.isImporting||e[27]!==j?(x=j===null||t.isImporting?null:r.jsx("p",{role:"alert",className:"mt-6 text-destructive",children:j}),e[26]=t.isImporting,e[27]=j,e[28]=x):x=e[28];let h;e[29]!==t.isImporting||e[30]!==t.submitLabel||e[31]!==o||e[32]!==a?(h=t.submitLabel===null||t.isImporting?null:r.jsx(D,{disabled:a.isPending,onClick:()=>{a.mutate(o)},children:t.submitLabel}),e[29]=t.isImporting,e[30]=t.submitLabel,e[31]=o,e[32]=a,e[33]=h):h=e[33];let b;e[34]!==t.reviewHref||e[35]!==i?(b=t.reviewHref===null?null:r.jsx(M,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:i.repository,branchId:i.target},className:"underline",children:"Open the review page"}),e[34]=t.reviewHref,e[35]=i,e[36]=b):b=e[36];let I;e[37]!==b||e[38]!==h?(I=r.jsxs("div",{className:"mt-6 flex items-center gap-4",children:[h,b]}),e[37]=b,e[38]=h,e[39]=I):I=e[39];let y;return e[40]!==I||e[41]!==d||e[42]!==p||e[43]!==u||e[44]!==g||e[45]!==f||e[46]!==x?(y=r.jsxs("section",{className:"max-w-prose",children:[d,p,u,g,f,x,I]}),e[40]=I,e[41]=d,e[42]=p,e[43]=u,e[44]=g,e[45]=f,e[46]=x,e[47]=y):y=e[47],y};function G(e){return r.jsxs("div",{className:"contents",children:[r.jsx("dt",{className:"text-muted-foreground",children:e.label}),r.jsx("dd",{className:"font-mono break-all",children:e.value})]},e.label)}export{J as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as u,h as f,P as m,G as p,j as o}from"./index-DRndyOxR.js";import{u as h,S}from"./index-CikPFj0e.js";import{F as x}from"./index-DpY8OPAr.js";import{S as F}from"./index-DvuJKeYS.js";const b="Git integration • Settings • Flight Plan",M="Git integration",T=()=>{const e=u.c(16),l=f();let i;e[0]!==l.settings.get?(i=l.settings.get.queryOptions(m),e[0]=l.settings.get,e[1]=i):i=e[1];const{data:t}=p(i),s=h();if(t.section!==m.section)return null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("title",{children:b}),e[2]=a):a=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsxs(F,{title:M,children:["By default, Flight Plan uses the"," ",o.jsx("code",{className:"rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.875em]",children:"git"})," ","command to read and fetch your local and remote branches and their commits."]}),e[3]=g):g=e[3];let r;e[4]!==s?(r=d=>{s.save({...m,...d})},e[4]=s,e[5]=r):r=e[5];let n;e[6]!==s.errorMessage||e[7]!==s.isPending||e[8]!==s.savedMessage?(n=o.jsx(S,{isPending:s.isPending,errorMessage:s.errorMessage,savedMessage:s.savedMessage}),e[6]=s.errorMessage,e[7]=s.isPending,e[8]=s.savedMessage,e[9]=n):n=e[9];let c;return e[10]!==t.codeHostFeatures||e[11]!==t.forges||e[12]!==s.problem||e[13]!==r||e[14]!==n?(c=o.jsxs(o.Fragment,{children:[a,g,o.jsx(x,{codeHostFeatures:t.codeHostFeatures,forges:t.forges,problem:s.problem,onSubmit:r,children:n})]}),e[10]=t.codeHostFeatures,e[11]=t.forges,e[12]=s.problem,e[13]=r,e[14]=n,e[15]=c):c=e[15],c};export{T as component};
@@ -0,0 +1 @@
1
+ import{c as _,j as s,z as F,L as M,B as O,h as A,i as H,ac as Q,G as R,m as T,r as $,w as z}from"./index-DRndyOxR.js";import{S as B}from"./index-DvuJKeYS.js";const G="-mx-3 block min-w-0 flex-1 rounded-sm px-3 py-2.5 transition-colors duration-[180ms] ease-out hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring",q=e=>{const t=_.c(19),{title:r,rows:g,emptyMessage:m,defaultChoice:i,isDuplicating:d,onDuplicate:a}=e;let c;t[0]!==r?(c=s.jsx("h3",{className:"pb-2 text-xl leading-7 font-bold",children:r}),t[0]=r,t[1]=c):c=t[1];let n;t[2]!==m?(n=m===null?null:s.jsx("p",{className:"max-w-[62ch] text-sm text-muted-foreground",children:m}),t[2]=m,t[3]=n):n=t[3];let o;if(t[4]!==i||t[5]!==d||t[6]!==a||t[7]!==g){let p;t[9]!==i||t[10]!==d||t[11]!==a?(p=l=>s.jsxs("li",{className:"flex items-center gap-4 border-b border-border first:border-t",children:[s.jsxs(F,{to:"/settings/profiles/$id",params:{id:l.id},className:G,children:[s.jsx("span",{className:"font-bold underline decoration-input decoration-1 underline-offset-[0.3em]",children:l.name}),l.summary===null?null:s.jsx("span",{className:"block max-w-[62ch] text-sm",children:l.summary}),s.jsx(M,{segments:l.details,className:"text-sm text-muted-foreground"})]}),s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-sm has-disabled:cursor-default has-disabled:text-muted-foreground",children:[s.jsx("input",{type:"radio",name:i.groupName,checked:i.chosenId===l.id,disabled:i.isPending,className:"size-4 shrink-0 accent-primary",onChange:()=>{i.onChoose(l.id)}}),s.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:i.label}),s.jsx("span",{className:"sr-only",children:l.defaultChoiceLabel})]}),s.jsx(O,{type:"button",variant:"outline",size:"sm","aria-label":l.duplicateName,disabled:d,onClick:()=>{a(l.id)},children:l.duplicateLabel})]},l.id),t[9]=i,t[10]=d,t[11]=a,t[12]=p):p=t[12],o=g.map(p),t[4]=i,t[5]=d,t[6]=a,t[7]=g,t[8]=o}else o=t[8];let u;t[13]!==o?(u=s.jsx("ul",{children:o}),t[13]=o,t[14]=u):u=t[14];let f;return t[15]!==c||t[16]!==n||t[17]!==u?(f=s.jsxs("section",{className:"border-t-2 border-foreground pt-5 pb-6",children:[c,n,u]}),t[15]=c,t[16]=n,t[17]=u,t[18]=f):f=t[18],f},K="Prompt configurations • Settings • Flight Plan",U="Prompt configurations",V="New configuration",ee=()=>{var S,D,L,P,w;const e=_.c(36),t=A(),r=H(),g=Q();let m;e[0]!==t.configuration.list?(m=t.configuration.list.queryOptions(),e[0]=t.configuration.list,e[1]=m):m=e[1];const{data:i}=R(m);let d;e[2]!==g||e[3]!==r||e[4]!==t.configuration?(d=t.configuration.create.mutationOptions({onSuccess:async h=>{h.kind!=="rejected"&&(await r.invalidateQueries(t.configuration.pathFilter()),await g({to:"/settings/profiles/$id",params:{id:h.id}}))}}),e[2]=g,e[3]=r,e[4]=t.configuration,e[5]=d):d=e[5];const a=T(d);let c;e[6]!==r||e[7]!==t.configuration||e[8]!==t.settings?(c=t.settings.save.mutationOptions({onSuccess:async()=>{r.removeQueries({...t.settings.pathFilter(),type:"inactive"}),await r.invalidateQueries(t.configuration.pathFilter())}}),e[6]=r,e[7]=t.configuration,e[8]=t.settings,e[9]=c):c=e[9];const n=T(c),o=$.useId(),u=((S=a.data)==null?void 0:S.kind)==="rejected"?a.data.message:((D=a.error)==null?void 0:D.message)??null,f=((L=n.data)==null?void 0:L.kind)==="rejected"?n.data.message:((P=n.error)==null?void 0:P.message)??null;let p;e[10]!==i.groups?(p=((w=i.groups.flatMap(W).find(J))==null?void 0:w.id)??"",e[10]=i.groups,e[11]=p):p=e[11];const l=p,N=(n.isPending&&n.variables.section==="configuration"?n.variables.configurationId:null)??l;let y,C;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("title",{children:K}),C=s.jsx(B,{title:U,children:"A prompt configuration is the set of instructions the agent follows when it writes a review: the tone it writes in and how it words each part. A new Flight Plan uses the default unless you pick another. Open one to read or change its instructions, or duplicate one to make your own."}),e[12]=y,e[13]=C):(y=e[12],C=e[13]);let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"pb-6",children:s.jsx(F,{to:"/settings/profiles/create",className:z(),children:V})}),e[14]=v):v=e[14];let x;e[15]!==u?(x=u===null?null:s.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:u}),e[15]=u,e[16]=x):x=e[16];let b;e[17]!==f?(b=f===null?null:s.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:f}),e[17]=f,e[18]=b):b=e[18];let j;if(e[19]!==N||e[20]!==o||e[21]!==a||e[22]!==i.defaultChoiceHeading||e[23]!==i.groups||e[24]!==n){let h;e[26]!==N||e[27]!==o||e[28]!==a||e[29]!==i.defaultChoiceHeading||e[30]!==n?(h=k=>s.jsx(q,{title:k.title,rows:k.rows,emptyMessage:k.emptyMessage,defaultChoice:{groupName:o,label:i.defaultChoiceHeading,chosenId:N,isPending:n.isPending,onChoose:E=>{n.mutate({section:"configuration",configurationId:E})}},isDuplicating:a.isPending,onDuplicate:E=>{a.mutate({name:null,sourceId:E})}},k.title),e[26]=N,e[27]=o,e[28]=a,e[29]=i.defaultChoiceHeading,e[30]=n,e[31]=h):h=e[31],j=i.groups.map(h),e[19]=N,e[20]=o,e[21]=a,e[22]=i.defaultChoiceHeading,e[23]=i.groups,e[24]=n,e[25]=j}else j=e[25];let I;return e[32]!==x||e[33]!==b||e[34]!==j?(I=s.jsxs(s.Fragment,{children:[y,C,v,x,b,j]}),e[32]=x,e[33]=b,e[34]=j,e[35]=I):I=e[35],I};function W(e){return e.rows}function J(e){return e.isDefault}export{ee as component};
@@ -0,0 +1 @@
1
+ import{c as r,j as i}from"./index-DRndyOxR.js";import{T as m}from"./index-DGsH5lbQ.js";const l="font-sans text-sm [&_.tiptap]:min-h-20 [&_.tiptap]:text-sm [&_.tiptap]:leading-6",u=n=>{const t=r.c(4),{label:e,shouldFocus:o,onChange:a}=n;let s;return t[0]!==e||t[1]!==a||t[2]!==o?(s=i.jsx(m,{label:e,value:"",errorMessage:null,shouldFocus:o,className:l,onChange:a}),t[0]=e,t[1]=a,t[2]=o,t[3]=s):s=t[3],s};export{u as default};
@@ -0,0 +1,6 @@
1
+ import{a3 as p,c as f,E as u,j as n,a4 as m}from"./index-DRndyOxR.js";/**
2
+ * @license lucide-react v1.49.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const x={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};x.node;const g=p(x),v=m("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function h(r){const e=f.c(10);let t,a,s;e[0]!==r?({className:t,variant:s,...a}=r,e[0]=r,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);let l;e[4]!==t||e[5]!==s?(l=u(v({variant:s}),t),e[4]=t,e[5]=s,e[6]=l):l=e[6];let o;return e[7]!==a||e[8]!==l?(o=n.jsx("div",{"data-slot":"alert",role:"alert",className:l,...a}),e[7]=a,e[8]=l,e[9]=o):o=e[9],o}function b(r){const e=f.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=u("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=n.jsx("div",{"data-slot":"alert-title",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function _(r){const e=f.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=u("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=n.jsx("div",{"data-slot":"alert-description",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}const N=r=>{const e=f.c(11),{title:t,children:a,className:s}=r;let l;e[0]!==s?(l=u("border-line-blue/40 bg-line-blue/10 px-3 py-2.5 *:[svg]:text-line-blue",s),e[0]=s,e[1]=l):l=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(g,{"aria-hidden":"true"}),e[2]=o):o=e[2];let i;e[3]!==t?(i=n.jsx(b,{className:"font-bold",children:t}),e[3]=t,e[4]=i):i=e[4];let c;e[5]!==a?(c=n.jsx(_,{className:"text-foreground/80",children:a}),e[5]=a,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==i||e[9]!==c?(d=n.jsxs(h,{role:"note",className:l,children:[o,i,c]}),e[7]=l,e[8]=i,e[9]=c,e[10]=d):d=e[10],d};export{N as I};
@@ -0,0 +1 @@
1
+ import{c as R,j as l,E as T,A as L,I as _,B as E}from"./index-DRndyOxR.js";import{b as F}from"./index-COS3U9jZ.js";const O=(c,e)=>{const t=e.get(c.path)??null;return{path:c.path,name:c.name,stateLabel:t===null?c.stateLabel:null,followed:t}},I=c=>({path:c.path,name:c.name,stateLabel:null,followed:c}),D=(c,e)=>{const t=new Map(e.map(s=>[s.path,s])),r=new Set(c.map(s=>s.path));return[...c.map(s=>O(s,t)),...e.filter(s=>!r.has(s.path)).map(I)]},U="mt-1 size-4 shrink-0 accent-(--primary)",v="flex max-w-md items-center gap-2 py-1",P=[],H="Recent repositories",M="Can't find your repository?",Q=c=>{const e=R.c(19),{label:t,hint:r,placeholder:s,authorRole:a,repositoryName:i,authorSearch:o,onQueryChange:m,onSelect:d}=c,n=o.repositoryName===i&&o.role===a,h=n?o.options:P,y=n?o.query:"",N=n?o.message:null,g=n?o.errorMessage:null;let u;e[0]!==a||e[1]!==m?(u=x=>{m(a,x)},e[0]=a,e[1]=m,e[2]=u):u=e[2];let p;e[3]!==a||e[4]!==o.query||e[5]!==n||e[6]!==m?(p=()=>{m(a,n?o.query:"")},e[3]=a,e[4]=o.query,e[5]=n,e[6]=m,e[7]=p):p=e[7];let f;return e[8]!==h||e[9]!==r||e[10]!==t||e[11]!==d||e[12]!==s||e[13]!==y||e[14]!==N||e[15]!==g||e[16]!==u||e[17]!==p?(f=l.jsx(F,{label:t,hint:r,placeholder:s,query:y,options:h,message:N,errorMessage:g,onQueryChange:u,onOpen:p,onSelect:d}),e[8]=h,e[9]=r,e[10]=t,e[11]=d,e[12]=s,e[13]=y,e[14]=N,e[15]=g,e[16]=u,e[17]=p,e[18]=f):f=e[18],f},$=c=>{const e=R.c(11),{author:t}=c;let r;e[0]!==t.avatarUrl||e[1]!==t.monogram?(r=l.jsx(L,{imageUrl:t.avatarUrl,monogram:t.monogram}),e[0]=t.avatarUrl,e[1]=t.monogram,e[2]=r):r=e[2];let s;e[3]!==t.name?(s=l.jsx("span",{className:"min-w-0 truncate",children:t.name}),e[3]=t.name,e[4]=s):s=e[4];let a;e[5]!==t.detail?(a=l.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:t.detail}),e[5]=t.detail,e[6]=a):a=e[6];let i;return e[7]!==r||e[8]!==s||e[9]!==a?(i=l.jsxs("div",{className:v,children:[r,s,a]}),e[7]=r,e[8]=s,e[9]=a,e[10]=i):i=e[10],i},q=c=>{const e=R.c(19),{repository:t,authorSearch:r,onAuthorQueryChange:s,onAuthorTrackingChange:a}=c;let i;e[0]!==t.selfAuthor?(i=t.selfAuthor===null?null:l.jsx($,{author:t.selfAuthor}),e[0]=t.selfAuthor,e[1]=i):i=e[1];let o;e[2]!==a?(o=h=>{a(h,!0)},e[2]=a,e[3]=o):o=e[3];let m;e[4]!==r||e[5]!==s||e[6]!==t.authorSearchHint||e[7]!==t.authorSearchPlaceholder||e[8]!==t.name||e[9]!==o?(m=l.jsx(Q,{label:"Track branches from specific team members",hint:t.authorSearchHint,placeholder:t.authorSearchPlaceholder,authorRole:"tracked",repositoryName:t.name,authorSearch:r,onQueryChange:s,onSelect:o}),e[4]=r,e[5]=s,e[6]=t.authorSearchHint,e[7]=t.authorSearchPlaceholder,e[8]=t.name,e[9]=o,e[10]=m):m=e[10];let d;e[11]!==a||e[12]!==t.name||e[13]!==t.trackedAuthors?(d=t.trackedAuthors.length===0?null:l.jsx("ul",{"aria-label":`Tracked team members of ${t.name}`,children:t.trackedAuthors.map(h=>l.jsxs("li",{className:v,children:[l.jsx(L,{imageUrl:h.avatarUrl,monogram:h.monogram}),l.jsx("span",{className:"min-w-0 truncate",children:h.name}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:h.detail}),l.jsx(_,{icon:"close",label:`Stop tracking ${h.name}`,onClick:()=>{a(h.id,!1)}})]},h.id))}),e[11]=a,e[12]=t.name,e[13]=t.trackedAuthors,e[14]=d):d=e[14];let n;return e[15]!==i||e[16]!==m||e[17]!==d?(n=l.jsxs("div",{className:"grid max-w-xl gap-3 pt-3 pl-7",children:[i,m,d]}),e[15]=i,e[16]=m,e[17]=d,e[18]=n):n=e[18],n},B=c=>{const e=R.c(33),{row:t,isChanging:r,followedFooter:s,authorSearch:a,onFollow:i,onUnfollow:o,onAuthorQueryChange:m,onAuthorTrackingChange:d}=c,{followed:n}=t,h=n===null&&t.stateLabel!==null;let y;e[0]!==n||e[1]!==i||e[2]!==o?(y=()=>{n===null?i():o(n.name)},e[0]=n,e[1]=i,e[2]=o,e[3]=y):y=e[3];const N=y,g=h?"":"cursor-pointer";let u;e[4]!==g?(u=T("flex min-w-0 items-start gap-3",g),e[4]=g,e[5]=u):u=e[5];const p=n!==null||h,f=h||r;let x;e[6]!==N||e[7]!==p||e[8]!==f?(x=l.jsx("input",{type:"checkbox",checked:p,disabled:f,className:U,onChange:N}),e[6]=N,e[7]=p,e[8]=f,e[9]=x):x=e[9];let j;e[10]!==t.name?(j=l.jsx("span",{className:"font-bold",children:t.name}),e[10]=t.name,e[11]=j):j=e[11];let S;e[12]!==t.stateLabel?(S=t.stateLabel===null?null:l.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:t.stateLabel}),e[12]=t.stateLabel,e[13]=S):S=e[13];let b;e[14]!==t.path?(b=l.jsx("span",{className:"block font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:t.path}),e[14]=t.path,e[15]=b):b=e[15];let w;e[16]!==j||e[17]!==S||e[18]!==b?(w=l.jsxs("span",{className:"min-w-0",children:[j,S,b]}),e[16]=j,e[17]=S,e[18]=b,e[19]=w):w=e[19];let C;e[20]!==w||e[21]!==u||e[22]!==x?(C=l.jsxs("label",{className:u,children:[x,w]}),e[20]=w,e[21]=u,e[22]=x,e[23]=C):C=e[23];let A;e[24]!==a||e[25]!==n||e[26]!==s||e[27]!==m||e[28]!==d?(A=n===null?null:l.jsxs(l.Fragment,{children:[l.jsx(q,{repository:n,authorSearch:a,onAuthorQueryChange:m,onAuthorTrackingChange:d}),s===void 0?null:l.jsx("div",{className:"pt-3 pl-7",children:s(n)})]}),e[24]=a,e[25]=n,e[26]=s,e[27]=m,e[28]=d,e[29]=A):A=e[29];let k;return e[30]!==C||e[31]!==A?(k=l.jsxs("li",{className:"border-b border-border py-3 last:border-b-0",children:[C,A]}),e[30]=C,e[31]=A,e[32]=k):k=e[32],k},Y=c=>{const e=R.c(24),{rows:t,listMessage:r,repositoryErrorMessage:s,isChangingRepositories:a,authorSearch:i,followedFooter:o,onOpenAddRepository:m,onFollow:d,onUnfollow:n,onAuthorQueryChange:h,onAuthorTrackingChange:y}=c;let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx("h3",{className:"pb-2 text-sm font-bold",children:H}),e[0]=N):N=e[0];let g;e[1]!==r?(g=r===null?null:l.jsx("p",{className:"pb-3 text-sm text-muted-foreground",children:r}),e[1]=r,e[2]=g):g=e[2];let u;e[3]!==i||e[4]!==o||e[5]!==a||e[6]!==h||e[7]!==y||e[8]!==d||e[9]!==n||e[10]!==t?(u=t.length===0?null:l.jsx("ul",{"aria-label":"Repositories",className:"border-t border-border",children:t.map(b=>l.jsx(B,{row:b,isChanging:a,followedFooter:o,authorSearch:i,onFollow:()=>{d(b.path)},onUnfollow:n,onAuthorQueryChange:(w,C)=>{var A;h(((A=b.followed)==null?void 0:A.name)??b.name,w,C)},onAuthorTrackingChange:(w,C)=>{var A;y(((A=b.followed)==null?void 0:A.name)??b.name,w,C)}},b.path))}),e[3]=i,e[4]=o,e[5]=a,e[6]=h,e[7]=y,e[8]=d,e[9]=n,e[10]=t,e[11]=u):u=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx("p",{className:"text-sm text-muted-foreground",children:M}),e[12]=p):p=e[12];let f;e[13]!==m?(f=l.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[p,l.jsx(E,{type:"button",variant:"outline",onClick:m,children:"Add repository"})]}),e[13]=m,e[14]=f):f=e[14];let x;e[15]!==s?(x=s===null?null:l.jsx("p",{role:"alert",className:"pt-2 text-sm text-destructive",children:s}),e[15]=s,e[16]=x):x=e[16];let j;e[17]!==f||e[18]!==x?(j=l.jsxs("div",{className:"border-t border-border pt-4",children:[f,x]}),e[17]=f,e[18]=x,e[19]=j):j=e[19];let S;return e[20]!==g||e[21]!==u||e[22]!==j?(S=l.jsxs(l.Fragment,{children:[N,g,u,j]}),e[20]=g,e[21]=u,e[22]=j,e[23]=S):S=e[23],S};export{Y as R,D as t};
@@ -0,0 +1 @@
1
+ import{c as b,r as h,s as C,j as r,B as j}from"./index-DRndyOxR.js";import{T as E}from"./index-DGsH5lbQ.js";const B=v=>{const e=b.c(20),{label:d,markdown:o,isSaving:l,errorMessage:f,renderCodeLinkDialog:m,onSave:u,onCancel:x}=v,[p,S]=h.useState(o);let t;e[0]!==p||e[1]!==u?(t=C(()=>{u(p)}),e[0]=p,e[1]=u,e[2]=t):t=e[2];let s;e[3]!==f||e[4]!==d||e[5]!==o||e[6]!==m?(s=r.jsx(E,{label:d,value:o,errorMessage:f,canUseSections:!0,renderCodeLinkDialog:m,onChange:S}),e[3]=f,e[4]=d,e[5]=o,e[6]=m,e[7]=s):s=e[7];let a;e[8]!==x?(a=r.jsx(j,{type:"button",variant:"ghost",onClick:x,children:"Cancel"}),e[8]=x,e[9]=a):a=e[9];const g=l?"Saving…":"Save";let n;e[10]!==l||e[11]!==g?(n=r.jsx(j,{type:"submit",disabled:l,children:g}),e[10]=l,e[11]=g,e[12]=n):n=e[12];let i;e[13]!==a||e[14]!==n?(i=r.jsxs("div",{className:"flex justify-end gap-2",children:[a,n]}),e[13]=a,e[14]=n,e[15]=i):i=e[15];let c;return e[16]!==t||e[17]!==s||e[18]!==i?(c=r.jsxs("form",{onSubmit:t,className:"grid gap-3",children:[s,i]}),e[16]=t,e[17]=s,e[18]=i,e[19]=c):c=e[19],c};export{B as default};
@@ -0,0 +1 @@
1
+ import{c as z,j as s,W as se,C as le,X as ae,Y as ne,r as O,E as V,Z as oe,B as re,_ as ie}from"./index-DRndyOxR.js";import{I as ce}from"./index-BA8Qwprc.js";import{F as de}from"./index-COdzqD_M.js";const fe="How does Flight Plan interact with the agent?",ue="What Flight Plan builds and what your agent writes",he="Flight Plan builds the review artifact from the code. Your agent reads the same change and writes the explanations into it, through the Flight Plan plugin and its MCP server. Each time Flight Plan starts, it updates the plugin if its skills changed.",me="What Flight Plan does",ge="Flight Plan draws the Trace Diagram and the Blast Diagram, and arranges the Code Walkthrough based on your preferences. You can read a review before your agent writes anything.",xe="What the agent does",pe="How your agent starts",be="rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.875em]",je="Your agent explains why the change exists and how the code works, and points out potential issues as findings. It writes into the review Flight Plan built and cannot change its structure. While you read, you can ask it about the change and it can ask you questions back.",K=a=>{const e=z.c(7),{heading:t,text:i}=a;let l;e[0]!==t?(l=s.jsx("h3",{className:"font-bold",children:t}),e[0]=t,e[1]=l):l=e[1];let o;e[2]!==i?(o=s.jsx("p",{className:"mt-1 text-muted-foreground",children:i}),e[2]=i,e[3]=o):o=e[3];let r;return e[4]!==l||e[5]!==o?(r=s.jsxs("section",{children:[l,o]}),e[4]=l,e[5]=o,e[6]=r):r=e[6],r},Ne=()=>{const a=z.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(ce,{title:pe,children:["Flight Plan can open your terminal app and start your agent there. Or you can start it yourself by prompting your agent with"," ",s.jsx("code",{className:be,children:"/flightplan:live <repository>/<target>"}),"."]}),a[0]=e):e=a[0],e},Re=()=>{const a=z.c(2);let e;a[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(se,{className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-3 rounded-sm px-2 py-4 text-left transition-colors duration-180 ease-out outline-none hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-lg leading-7 font-bold",children:fe}),s.jsx("span",{className:"block text-sm text-muted-foreground",children:ue})]}),s.jsx(le,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground transition-transform duration-180 ease-out group-data-panel-open:rotate-180"})]}),a[0]=e):e=a[0];let t;return a[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs(ae,{children:[e,s.jsxs(ne,{className:"grid max-w-[62ch] gap-5 pb-2",children:[s.jsx("p",{children:he}),s.jsx(K,{heading:me,text:ge}),s.jsx(K,{heading:xe,text:je}),s.jsx(Ne,{})]})]}),a[1]=t):t=a[1],t},Ee=a=>{const e=z.c(19),{label:t,options:i,value:l,className:o,onChange:r}=a,g=O.useId();let u;e[0]!==o?(u=V("grid gap-1.5",o),e[0]=o,e[1]=u):u=e[1];let c;e[2]!==t?(c=s.jsx("legend",{className:"float-left text-sm font-bold",children:t}),e[2]=t,e[3]=c):c=e[3];let h;if(e[4]!==g||e[5]!==r||e[6]!==i||e[7]!==l){let d;e[9]!==g||e[10]!==r||e[11]!==l?(d=w=>s.jsxs("label",{className:"flex h-[calc(2rem-2px)] cursor-pointer items-center border-l border-input px-3 text-sm transition-colors duration-[180ms] ease-out first:border-l-0 hover:bg-muted has-checked:bg-foreground has-checked:font-bold has-checked:text-background has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring",children:[s.jsx("input",{type:"radio",name:g,className:"sr-only",checked:l===w.value,onChange:()=>{r(w.value)}}),s.jsx("span",{className:"text-box-cap",children:w.label})]},w.value),e[9]=g,e[10]=r,e[11]=l,e[12]=d):d=e[12],h=i.map(d),e[4]=g,e[5]=r,e[6]=i,e[7]=l,e[8]=h}else h=e[8];let m;e[13]!==h?(m=s.jsx("span",{className:"clear-left inline-flex w-fit overflow-hidden rounded-lg border border-input bg-card",children:h}),e[13]=h,e[14]=m):m=e[14];let x;return e[15]!==u||e[16]!==c||e[17]!==m?(x=s.jsxs("fieldset",{className:u,children:[c,m]}),e[15]=u,e[16]=c,e[17]=m,e[18]=x):x=e[18],x},Q="size-4 shrink-0 accent-(--primary)",we="Open folders until you reach the one to install into, then use it.",ee="model",te="effort",Ce=[ee,te],ve=()=>{},ye=a=>{const e=z.c(26),{option:t,model:i,effort:l,modelErrorMessage:o,effortErrorMessage:r,onModelChange:g,onEffortChange:u}=a;let c;if(e[0]!==l||e[1]!==i||e[2]!==o||e[3]!==u||e[4]!==g||e[5]!==t.label||e[6]!==t.modelOptions){let x;e[8]!==i?(x=C=>C.model===i,e[8]=i,e[9]=x):x=e[9];const d=t.modelOptions.find(x),w=`Model for ${t.label}`;let b;e[10]!==t.modelOptions?(b=t.modelOptions.map(Pe),e[10]=t.modelOptions,e[11]=b):b=e[11];let f;e[12]!==g||e[13]!==t.modelOptions?(f=C=>{const p=t.modelOptions.find(W=>W.model===C);p!==void 0&&g(p)},e[12]=g,e[13]=t.modelOptions,e[14]=f):f=e[14];let k;e[15]!==i||e[16]!==o||e[17]!==w||e[18]!==b||e[19]!==f?(k=s.jsx(ie,{label:w,options:b,value:i,errorMessage:o,className:"w-60",onChange:f}),e[15]=i,e[16]=o,e[17]=w,e[18]=b,e[19]=f,e[20]=k):k=e[20],c=s.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pt-3",children:[k,(d==null?void 0:d.hasEffortChoice)===!0?s.jsx(Ee,{label:`Effort for ${t.label}`,options:d.effortOptions.map(ke),value:l,onChange:u}):null]}),e[0]=l,e[1]=i,e[2]=o,e[3]=u,e[4]=g,e[5]=t.label,e[6]=t.modelOptions,e[7]=c}else c=e[7];let h;e[21]!==r?(h=r===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),e[21]=r,e[22]=h):h=e[22];let m;return e[23]!==c||e[24]!==h?(m=s.jsxs(s.Fragment,{children:[c,h]}),e[23]=c,e[24]=h,e[25]=m):m=e[25],m},Ie=a=>{const e=z.c(53),{option:t,groupName:i,isPicked:l,isDefault:o,installPath:r,model:g,effort:u,pathErrorMessage:c,modelErrorMessage:h,effortErrorMessage:m,onPickedChange:x,onDefaultChange:d,onInstallPathChange:w,onModelChange:b,onEffortChange:f,onBrowse:k}=a,C=O.useId(),p=O.useId(),W=O.useId(),D=c!==null,A=t.unavailableReason===null,_=A?"cursor-pointer":"";let j;e[0]!==_?(j=V("flex min-w-0 flex-1 items-start gap-3",_),e[0]=_,e[1]=j):j=e[1];const q=!A;let N;e[2]!==x?(N=E=>{x(E.target.checked)},e[2]=x,e[3]=N):N=e[3];let L;e[4]!==l||e[5]!==q||e[6]!==N?(L=s.jsx("input",{type:"checkbox",checked:l,disabled:q,className:`${Q} mt-0.5`,onChange:N}),e[4]=l,e[5]=q,e[6]=N,e[7]=L):L=e[7];let S;e[8]!==t.label?(S=s.jsx("span",{className:"font-bold",children:t.label}),e[8]=t.label,e[9]=S):S=e[9];let P;e[10]!==t.unavailableReason?(P=t.unavailableReason===null?null:s.jsxs("span",{className:"block max-w-[62ch] text-sm text-destructive",children:[s.jsx("span",{className:"font-bold",children:"Unavailable."}),` ${t.unavailableReason}`]}),e[10]=t.unavailableReason,e[11]=P):P=e[11];let F;e[12]!==S||e[13]!==P?(F=s.jsxs("span",{className:"min-w-0",children:[S,P]}),e[12]=S,e[13]=P,e[14]=F):F=e[14];let v;e[15]!==j||e[16]!==L||e[17]!==F?(v=s.jsxs("label",{className:j,children:[L,F]}),e[15]=j,e[16]=L,e[17]=F,e[18]=v):v=e[18];const Y=!l;let M;e[19]!==i||e[20]!==o||e[21]!==d||e[22]!==Y?(M=s.jsx("input",{type:"radio",name:i,checked:o,disabled:Y,className:Q,onChange:d}),e[19]=i,e[20]=o,e[21]=d,e[22]=Y,e[23]=M):M=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:"Default"}),e[24]=B):B=e[24];const R=`Default agent: ${t.label}`;let y;e[25]!==R?(y=s.jsx("span",{className:"sr-only",children:R}),e[25]=R,e[26]=y):y=e[26];let T;e[27]!==M||e[28]!==y?(T=s.jsxs("label",{className:"flex cursor-pointer items-center gap-2 pt-0.5 text-sm has-disabled:cursor-default has-disabled:text-muted-foreground",children:[M,B,y]}),e[27]=M,e[28]=y,e[29]=T):T=e[29];let $;e[30]!==T||e[31]!==v?($=s.jsxs("div",{className:"flex items-start gap-4",children:[v,T]}),e[30]=T,e[31]=v,e[32]=$):$=e[32];let I;e[33]!==u||e[34]!==m||e[35]!==W||e[36]!==D||e[37]!==p||e[38]!==r||e[39]!==l||e[40]!==g||e[41]!==h||e[42]!==k||e[43]!==f||e[44]!==w||e[45]!==b||e[46]!==t||e[47]!==c||e[48]!==C?(I=l?s.jsxs("div",{className:"mt-3 grid gap-1.5 pl-7",children:[s.jsx("label",{htmlFor:C,className:"text-sm font-bold",children:`Install folder for ${t.label}`}),s.jsx("p",{id:p,className:"text-sm text-muted-foreground",children:t.pathHint}),s.jsxs("div",{className:"flex max-w-xl items-center gap-2",children:[s.jsx(oe,{id:C,value:r,autoComplete:"off",spellCheck:!1,"aria-invalid":D,"aria-describedby":D?`${p} ${W}`:p,className:"min-w-0 flex-1 font-mono",onChange:E=>{w(E.target.value)}}),s.jsx(re,{type:"button",variant:"outline","aria-label":`Browse for the ${t.label} install folder`,onClick:k,children:"Browse"})]}),D?s.jsx("p",{id:W,role:"alert",className:"text-sm text-destructive",children:c}):null,s.jsx(ye,{option:t,model:g,effort:u,modelErrorMessage:h,effortErrorMessage:m,onModelChange:b,onEffortChange:f})]}):null,e[33]=u,e[34]=m,e[35]=W,e[36]=D,e[37]=p,e[38]=r,e[39]=l,e[40]=g,e[41]=h,e[42]=k,e[43]=f,e[44]=w,e[45]=b,e[46]=t,e[47]=c,e[48]=C,e[49]=I):I=e[49];let H;return e[50]!==$||e[51]!==I?(H=s.jsxs("li",{className:"border-b border-border py-3",children:[$,I]}),e[50]=$,e[51]=I,e[52]=H):H=e[52],H},Te=a=>{const e=z.c(58),{agents:t,defaultAgent:i,problem:l,children:o,folderBrowser:r,folderBrowserErrorMessage:g,onBrowseFolder:u,onBrowseEnd:c,onSubmit:h}=a,m=O.useId();let x;e[0]!==t?(x=()=>Object.fromEntries(t.map(Ae)),e[0]=t,e[1]=x):x=e[1];const[d,w]=O.useState(x);let b;e[2]!==t?(b=()=>Object.fromEntries(t.map(Se)),e[2]=t,e[3]=b):b=e[3];const[f,k]=O.useState(b);let C;e[4]!==t?(C=()=>Object.fromEntries(t.map(Fe)),e[4]=t,e[5]=C):C=e[5];const[p,W]=O.useState(C);let D;e[6]!==t?(D=()=>Object.fromEntries(t.map(Be)),e[6]=t,e[7]=D):D=e[7];const[A,_]=O.useState(D),[j,q]=O.useState(i),[N,L]=O.useState(null);let S;e[8]!==u||e[9]!==f?(S=E=>{L(E),u(f[E.agent]??"")},e[8]=u,e[9]=f,e[10]=S):S=e[10];const P=S;let F;e[11]!==c?(F=()=>{L(null),c()},e[11]=c,e[12]=F):F=e[12];const v=F;let Y;e[13]!==N||e[14]!==v?(Y=E=>{N!==null&&k(n=>({...n,[N.agent]:E})),v()},e[13]=N,e[14]=v,e[15]=Y):Y=e[15];const M=Y;let B;if(e[16]!==t||e[17]!==j||e[18]!==A||e[19]!==p||e[20]!==h||e[21]!==f||e[22]!==d){const E=()=>{h({agents:t.map(n=>({agent:n.agent,isPicked:d[n.agent]??!1,installPath:f[n.agent]??"",model:p[n.agent]??n.model,effort:A[n.agent]??n.effort})),defaultAgent:j})};B=n=>{n.preventDefault(),E()},e[16]=t,e[17]=j,e[18]=A,e[19]=p,e[20]=h,e[21]=f,e[22]=d,e[23]=B}else B=e[23];let R;if(e[24]!==t||e[25]!==j||e[26]!==m||e[27]!==A||e[28]!==P||e[29]!==p||e[30]!==f||e[31]!==d||e[32]!==l){let E;e[34]!==j||e[35]!==m||e[36]!==A||e[37]!==P||e[38]!==p||e[39]!==f||e[40]!==d||e[41]!==l?(E=n=>{var X,Z,J;return s.jsx(Ie,{option:n,groupName:m,isPicked:d[n.agent]??!1,isDefault:j===n.agent,installPath:f[n.agent]??"",model:p[n.agent]??n.model,effort:A[n.agent]??n.effort,pathErrorMessage:((X=l==null?void 0:l.field)==null?void 0:X.owner)===n.agent&&!Ce.includes(l.field.name)?l.message:null,modelErrorMessage:((Z=l==null?void 0:l.field)==null?void 0:Z.owner)===n.agent&&l.field.name===ee?l.message:null,effortErrorMessage:((J=l==null?void 0:l.field)==null?void 0:J.owner)===n.agent&&l.field.name===te?l.message:null,onPickedChange:U=>{w(G=>({...G,[n.agent]:U}))},onDefaultChange:()=>{q(n.agent)},onInstallPathChange:U=>{k(G=>({...G,[n.agent]:U}))},onModelChange:U=>{W(G=>({...G,[n.agent]:U.model})),_(G=>({...G,[n.agent]:U.selectedEffort}))},onEffortChange:U=>{_(G=>({...G,[n.agent]:U}))},onBrowse:()=>{P(n)}},n.agent)},e[34]=j,e[35]=m,e[36]=A,e[37]=P,e[38]=p,e[39]=f,e[40]=d,e[41]=l,e[42]=E):E=e[42],R=t.map(E),e[24]=t,e[25]=j,e[26]=m,e[27]=A,e[28]=P,e[29]=p,e[30]=f,e[31]=d,e[32]=l,e[33]=R}else R=e[33];let y;e[43]!==R?(y=s.jsx("ul",{className:"border-t border-border",children:R}),e[43]=R,e[44]=y):y=e[44];const T=N!==null,$=`Install folder for ${(N==null?void 0:N.label)??""}`;let I;e[45]!==r||e[46]!==g||e[47]!==v||e[48]!==M||e[49]!==u||e[50]!==T||e[51]!==$?(I=s.jsx(de,{isOpen:T,title:$,description:we,browser:r,errorMessage:g,onOpenFolder:u,onChooseRepository:ve,onChooseFolder:M,onClose:v}),e[45]=r,e[46]=g,e[47]=v,e[48]=M,e[49]=u,e[50]=T,e[51]=$,e[52]=I):I=e[52];let H;return e[53]!==o||e[54]!==y||e[55]!==I||e[56]!==B?(H=s.jsxs("form",{onSubmit:B,children:[y,o,I]}),e[53]=o,e[54]=y,e[55]=I,e[56]=B,e[57]=H):H=e[57],H};function Pe(a){return{value:a.model,label:a.label}}function ke(a){return{value:a.effort,label:a.label}}function Ae(a){return[a.agent,a.isPicked]}function Se(a){return[a.agent,a.installPath]}function Fe(a){return[a.agent,a.model]}function Be(a){return[a.agent,a.effort]}export{Te as A,Re as a};
@@ -0,0 +1 @@
1
+ import{c as T,h as le,r as M,k as I,l as Q,j as m,A as re,S as ae,I as ne,a as ie,d as ce,D as ue,b as de,s as he,B as G,e as me,f as fe,g as pe}from"./index-DRndyOxR.js";import{F as ge}from"./index-COdzqD_M.js";const ye="Searching…",be=[],xe=({id:c,name:e,detail:l,avatarUrl:n,monogram:a})=>({id:c,name:e,detail:l,avatarUrl:n,monogram:a}),qe=c=>{var X,z,J,K,W,Y,Z;const e=T.c(35),{isEnabled:l,folderPath:n,repositoryName:a,saved:o}=c,t=le(),[u,f]=M.useState(null),[s,i]=M.useState(null),h=M.useDeferredValue(s),d=M.useDeferredValue(n),r=u??(o==null?void 0:o.trackedAuthors)??be,p=r.map(Ae);let g;e[0]!==d||e[1]!==t.repository.authorForm?(g=t.repository.authorForm.queryOptions({path:d}),e[0]=d,e[1]=t.repository.authorForm,e[2]=g):g=e[2];const x=l&&a===null;let y;e[3]!==g||e[4]!==x?(y={...g,enabled:x,placeholderData:I},e[3]=g,e[4]=x,e[5]=y):y=e[5];const A=Q(y),w=t.repository.searchAuthors.queryOptions({path:d,repositoryName:a,role:(h==null?void 0:h.role)??"tracked",query:(h==null?void 0:h.query)??"",trackedAuthorIds:p}),D=l&&h!==null;let B;e[6]!==w||e[7]!==D?(B={...w,enabled:D,placeholderData:I},e[6]=w,e[7]=D,e[8]=B):B=e[8];const b=Q(B);let S;e[9]!==((X=b.data)==null?void 0:X.options)||e[10]!==r?(S=(L,$)=>{var se;const ee=(se=b.data)==null?void 0:se.options.find(V=>V.id===$);if(ee===void 0)return;const te=xe(ee);i(null),f([...r.filter(V=>V.id!==te.id),te])},e[9]=(z=b.data)==null?void 0:z.options,e[10]=r,e[11]=S):S=e[11];const F=S,O=(o==null?void 0:o.form)??A.data??null,R=(s==null?void 0:s.role)??null,_=(s==null?void 0:s.query)??"";let q;e[12]!==((J=b.data)==null?void 0:J.options)?(q=((K=b.data)==null?void 0:K.options)??[],e[12]=(W=b.data)==null?void 0:W.options,e[13]=q):q=e[13];const v=((Y=b.data)==null?void 0:Y.message)??(b.isPending?ye:null),N=((Z=b.error)==null?void 0:Z.message)??null;let j;e[14]!==_||e[15]!==q||e[16]!==v||e[17]!==N||e[18]!==R?(j={role:R,query:_,options:q,message:v,errorMessage:N},e[14]=_,e[15]=q,e[16]=v,e[17]=N,e[18]=R,e[19]=j):j=e[19];let C;e[20]!==j||e[21]!==O||e[22]!==r?(C={form:O,trackedAuthors:r,search:j},e[20]=j,e[21]=O,e[22]=r,e[23]=C):C=e[23];let k;e[24]!==p?(k={trackedAuthorIds:p},e[24]=p,e[25]=k):k=e[25];let P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=(L,$)=>{i({role:L,query:$})},e[26]=P):P=e[26];let H;e[27]!==r?(H=L=>{f(r.filter($=>$.id!==L))},e[27]=r,e[28]=H):H=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{f(null),i(null)},e[29]=E):E=e[29];let U;return e[30]!==F||e[31]!==C||e[32]!==k||e[33]!==H?(U={authors:C,selection:k,onAuthorQueryChange:P,onAuthorSelect:F,onTrackedAuthorRemove:H,reset:E},e[30]=F,e[31]=C,e[32]=k,e[33]=H,e[34]=U):U=e[34],U};function Ae(c){return c.id}const Se="Searching…",ve=c=>{var q,v,N,j,C;const e=T.c(29),l=le(),[n,a]=M.useState(""),[o,t]=M.useState(!1),[u,f]=M.useState(null),s=M.useDeferredValue(n);let i;e[0]!==s||e[1]!==l.setup.searchFolders?(i=l.setup.searchFolders.queryOptions({query:s}),e[0]=s,e[1]=l.setup.searchFolders,e[2]=i):i=e[2];let h;e[3]!==c||e[4]!==i?(h={...i,enabled:c,placeholderData:I},e[3]=c,e[4]=i,e[5]=h):h=e[5];const d=Q(h);let r;e[6]!==u||e[7]!==l.setup.browseFolders?(r=l.setup.browseFolders.queryOptions({path:u,purpose:"repository"}),e[6]=u,e[7]=l.setup.browseFolders,e[8]=r):r=e[8];const p=c&&o;let g;e[9]!==r||e[10]!==p?(g={...r,enabled:p,placeholderData:I},e[9]=r,e[10]=p,e[11]=g):g=e[11];const x=Q(g);let y;e[12]!==((q=d.data)==null?void 0:q.options)?(y=((v=d.data)==null?void 0:v.options)??[],e[12]=(N=d.data)==null?void 0:N.options,e[13]=y):y=e[13];const A=((j=d.data)==null?void 0:j.message)??(d.isPending?Se:null);let w;e[14]!==n||e[15]!==y||e[16]!==A?(w={query:n,options:y,message:A},e[14]=n,e[15]=y,e[16]=A,e[17]=w):w=e[17];const D=x.data??null,B=((C=x.error)==null?void 0:C.message)??null;let b;e[18]!==o||e[19]!==D||e[20]!==B?(b={isOpen:o,browser:D,errorMessage:B},e[18]=o,e[19]=D,e[20]=B,e[21]=b):b=e[21];let S,F;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=k=>{a(k),t(!1)},F=()=>{t(!0)},e[22]=S,e[23]=F):(S=e[22],F=e[23]);let O,R;e[24]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{t(!1)},R=()=>{a(""),f(null),t(!1)},e[24]=O,e[25]=R):(O=e[24],R=e[25]);let _;return e[26]!==b||e[27]!==w?(_={search:w,browse:b,onQueryChange:a,onChooseFolder:S,onBrowse:F,onBrowseFolder:f,onBrowseClose:O,reset:R},e[26]=b,e[27]=w,e[28]=_):_=e[28],_},je=c=>{const e=T.c(13),{label:l,hint:n,placeholder:a,query:o,options:t,message:u,errorMessage:f,onQueryChange:s,onOpen:i,onSelect:h}=c;let d;e[0]!==t?(d=t.map(Ce),e[0]=t,e[1]=d):d=e[1];let r;return e[2]!==f||e[3]!==n||e[4]!==l||e[5]!==u||e[6]!==i||e[7]!==s||e[8]!==h||e[9]!==a||e[10]!==o||e[11]!==d?(r=m.jsx(ae,{label:l,hint:n,placeholder:a,value:o,suggestions:d,message:u,errorMessage:f,className:"max-w-md",onValueChange:s,onOpen:i,onSelect:h}),e[2]=f,e[3]=n,e[4]=l,e[5]=u,e[6]=i,e[7]=s,e[8]=h,e[9]=a,e[10]=o,e[11]=d,e[12]=r):r=e[12],r};function Ce(c){return{id:c.id,label:c.name,detail:c.detail,stateLabel:c.stateLabel,isDisabled:c.isTaken,marker:m.jsx(re,{imageUrl:c.avatarUrl,monogram:c.monogram})}}const we=[],oe=c=>{const e=T.c(17),{author:l,stateLabel:n,removal:a}=c;let o;e[0]!==l.avatarUrl||e[1]!==l.monogram?(o=m.jsx(re,{imageUrl:l.avatarUrl,monogram:l.monogram}),e[0]=l.avatarUrl,e[1]=l.monogram,e[2]=o):o=e[2];let t;e[3]!==l.name?(t=m.jsx("span",{className:"min-w-0 truncate",children:l.name}),e[3]=l.name,e[4]=t):t=e[4];let u;e[5]!==l.detail?(u=m.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:l.detail}),e[5]=l.detail,e[6]=u):u=e[6];let f;e[7]!==n?(f=n===null?null:m.jsx("span",{className:"text-sm font-bold",children:n}),e[7]=n,e[8]=f):f=e[8];let s;e[9]!==a?(s=a===null?null:m.jsx(ne,{icon:"close",label:a.label,onClick:a.onRemove}),e[9]=a,e[10]=s):s=e[10];let i;return e[11]!==o||e[12]!==t||e[13]!==u||e[14]!==f||e[15]!==s?(i=m.jsxs("div",{className:"flex max-w-md items-center gap-2 py-1",children:[o,t,u,f,s]}),e[11]=o,e[12]=t,e[13]=u,e[14]=f,e[15]=s,e[16]=i):i=e[16],i},Fe=c=>{const e=T.c(22),{label:l,hint:n,placeholder:a,authorRole:o,search:t,onAuthorQueryChange:u,onAuthorSelect:f}=c,s=t.role===o,i=s?t.query:"",h=s?t.options:we,d=s?t.message:null,r=s?t.errorMessage:null;let p;e[0]!==o||e[1]!==u?(p=A=>{u(o,A)},e[0]=o,e[1]=u,e[2]=p):p=e[2];let g;e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==t.query?(g=()=>{u(o,s?t.query:"")},e[3]=o,e[4]=s,e[5]=u,e[6]=t.query,e[7]=g):g=e[7];let x;e[8]!==o||e[9]!==f?(x=A=>{f(o,A)},e[8]=o,e[9]=f,e[10]=x):x=e[10];let y;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==i||e[15]!==h||e[16]!==d||e[17]!==r||e[18]!==p||e[19]!==g||e[20]!==x?(y=m.jsx(je,{label:l,hint:n,placeholder:a,query:i,options:h,message:d,errorMessage:r,onQueryChange:p,onOpen:g,onSelect:x}),e[11]=n,e[12]=l,e[13]=a,e[14]=i,e[15]=h,e[16]=d,e[17]=r,e[18]=p,e[19]=g,e[20]=x,e[21]=y):y=e[21],y},Oe=c=>{const e=T.c(20),{authors:l,onAuthorQueryChange:n,onAuthorSelect:a,onTrackedAuthorRemove:o}=c,{form:t,trackedAuthors:u,search:f}=l;if(t===null){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the author settings…"}),e[0]=p):p=e[0],p}let s;e[1]!==t.gitSelfAuthor?(s=t.gitSelfAuthor===null?null:m.jsx(oe,{author:t.gitSelfAuthor.author,stateLabel:null,removal:null}),e[1]=t.gitSelfAuthor,e[2]=s):s=e[2];let i;e[3]!==t.searchHint||e[4]!==t.searchPlaceholder||e[5]!==n||e[6]!==a||e[7]!==f?(i=m.jsx(Fe,{label:"Track branches from specific team members",hint:t.searchHint,placeholder:t.searchPlaceholder,authorRole:"tracked",search:f,onAuthorQueryChange:n,onAuthorSelect:a}),e[3]=t.searchHint,e[4]=t.searchPlaceholder,e[5]=n,e[6]=a,e[7]=f,e[8]=i):i=e[8];let h;if(e[9]!==o||e[10]!==u){let p;e[12]!==o?(p=g=>m.jsx("li",{children:m.jsx(oe,{author:g,stateLabel:null,removal:{label:`Stop tracking ${g.name}`,onRemove:()=>{o(g.id)}}})},g.id),e[12]=o,e[13]=p):p=e[13],h=u.map(p),e[9]=o,e[10]=u,e[11]=h}else h=e[11];let d;e[14]!==h?(d=m.jsx("ul",{"aria-label":"Tracked team members",children:h}),e[14]=h,e[15]=d):d=e[15];let r;return e[16]!==s||e[17]!==i||e[18]!==d?(r=m.jsxs("div",{className:"grid gap-4",children:[s,i,d]}),e[16]=s,e[17]=i,e[18]=d,e[19]=r):r=e[19],r},Re="/Users/you/projects/storefront",Ne=c=>{const e=T.c(52),{isOpen:l,search:n,browse:a,authors:o,isAdding:t,errorMessage:u,onQueryChange:f,onChooseFolder:s,onAuthorQueryChange:i,onAuthorSelect:h,onTrackedAuthorRemove:d,onSubmit:r,onBrowse:p,onBrowseFolder:g,onBrowseClose:x,onClose:y}=c;let A;e[0]!==y?(A=ie(y),e[0]=y,e[1]=A):A=e[1];let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=m.jsxs(ce,{children:[m.jsx(ue,{children:"Add repository"}),m.jsx(de,{children:"Search this machine for a folder that holds a git repository, or type its full path. Then choose the users Flight Plan follows in it."})]}),e[2]=w):w=e[2];let D;e[3]!==r?(D=he(r),e[3]=r,e[4]=D):D=e[4];const B=n.query;let b;e[5]!==n.options?(b=n.options.map(_e),e[5]=n.options,e[6]=b):b=e[6];let S;e[7]!==s||e[8]!==f||e[9]!==r||e[10]!==n.message||e[11]!==n.query||e[12]!==b?(S=m.jsx(ae,{label:"Repository folder",hint:null,placeholder:Re,value:B,suggestions:b,message:n.message,errorMessage:null,isLiteral:!0,onValueChange:f,onSelect:s,onEnter:r}),e[7]=s,e[8]=f,e[9]=r,e[10]=n.message,e[11]=n.query,e[12]=b,e[13]=S):S=e[13];let F;e[14]!==o||e[15]!==i||e[16]!==h||e[17]!==d?(F=m.jsx(Oe,{authors:o,onAuthorQueryChange:i,onAuthorSelect:h,onTrackedAuthorRemove:d}),e[14]=o,e[15]=i,e[16]=h,e[17]=d,e[18]=F):F=e[18];let O;e[19]!==u?(O=u===null?null:m.jsx("p",{role:"alert",className:"text-sm text-destructive",children:u}),e[19]=u,e[20]=O):O=e[20];let R;e[21]!==p?(R=m.jsx(G,{type:"button",variant:"outline",className:"sm:mr-auto",onClick:p,children:"Browse folders"}),e[21]=p,e[22]=R):R=e[22];let _;e[23]!==y?(_=m.jsx(G,{type:"button",variant:"ghost",onClick:y,children:"Cancel"}),e[23]=y,e[24]=_):_=e[24];const q=t?"Adding…":"Add";let v;e[25]!==t||e[26]!==q?(v=m.jsx(G,{type:"submit",disabled:t,children:q}),e[25]=t,e[26]=q,e[27]=v):v=e[27];let N;e[28]!==_||e[29]!==v||e[30]!==R?(N=m.jsxs(me,{children:[R,_,v]}),e[28]=_,e[29]=v,e[30]=R,e[31]=N):N=e[31];let j;e[32]!==N||e[33]!==D||e[34]!==S||e[35]!==F||e[36]!==O?(j=m.jsxs("form",{onSubmit:D,className:"grid gap-4",children:[S,F,O,N]}),e[32]=N,e[33]=D,e[34]=S,e[35]=F,e[36]=O,e[37]=j):j=e[37];let C;e[38]!==a.browser||e[39]!==a.errorMessage||e[40]!==a.isOpen||e[41]!==x||e[42]!==g||e[43]!==s?(C=m.jsx(ge,{isOpen:a.isOpen,title:"Browse folders",description:"Open folders until you reach a repository, then choose it.",browser:a.browser,errorMessage:a.errorMessage,onOpenFolder:g,onChooseRepository:s,onChooseFolder:null,onClose:x}),e[38]=a.browser,e[39]=a.errorMessage,e[40]=a.isOpen,e[41]=x,e[42]=g,e[43]=s,e[44]=C):C=e[44];let k;e[45]!==j||e[46]!==C?(k=m.jsxs(fe,{className:"sm:max-w-lg",children:[w,j,C]}),e[45]=j,e[46]=C,e[47]=k):k=e[47];let P;return e[48]!==l||e[49]!==A||e[50]!==k?(P=m.jsx(pe,{open:l,onOpenChange:A,children:k}),e[48]=l,e[49]=A,e[50]=k,e[51]=P):P=e[51],P};function _e(c){return{id:c.path,label:c.path,detail:null,stateLabel:c.stateLabel,isDisabled:c.isAdded}}export{Ne as A,Oe as R,qe as a,je as b,ve as u};
@@ -0,0 +1 @@
1
+ import{c as N,j as s,D,b as F,d as w,e as O,B as y,f as v,g as R,E}from"./index-DRndyOxR.js";const P={repository:"font-bold","added-repository":"text-muted-foreground",folder:""},$=b=>{const e=N.c(6),{folder:t,onOpenFolder:o,onChooseRepository:n}=b;if(t.kind==="added-repository")return null;let l;return e[0]!==t.kind||e[1]!==t.name||e[2]!==t.path||e[3]!==n||e[4]!==o?(l=t.kind==="repository"?s.jsx(y,{type:"button",size:"sm","aria-label":`Choose ${t.name}`,onClick:()=>{n(t.path)},children:"Choose"}):s.jsx(y,{type:"button",variant:"outline",size:"sm","aria-label":`Open ${t.name}`,onClick:()=>{o(t.path)},children:"Open"}),e[0]=t.kind,e[1]=t.name,e[2]=t.path,e[3]=n,e[4]=o,e[5]=l):l=e[5],l},z=b=>{const e=N.c(16),{browser:t,onOpenFolder:o,onChooseRepository:n}=b;let l;e[0]!==t.path?(l=s.jsx("p",{className:"min-w-0 flex-1 font-mono text-[0.82rem] wrap-anywhere",children:t.path}),e[0]=t.path,e[1]=l):l=e[1];let r;e[2]!==t.parentPath||e[3]!==o?(r=t.parentPath===null?null:s.jsx(y,{type:"button",variant:"outline",size:"sm",onClick:()=>{t.parentPath!==null&&o(t.parentPath)},children:"Up one folder"}),e[2]=t.parentPath,e[3]=o,e[4]=r):r=e[4];let a;e[5]!==l||e[6]!==r?(a=s.jsxs("div",{className:"flex items-center gap-3",children:[l,r]}),e[5]=l,e[6]=r,e[7]=a):a=e[7];let i;e[8]!==t.folders||e[9]!==t.message||e[10]!==n||e[11]!==o?(i=t.message===null?s.jsx("ul",{className:"max-h-[calc(20rem+1px)] overflow-y-auto border-t border-border",children:t.folders.map(c=>s.jsxs("li",{className:"flex h-10 items-center gap-3 border-b border-border",children:[s.jsx("span",{className:E("min-w-0 flex-1 truncate",P[c.kind]),children:c.name}),s.jsx("span",{className:"text-muted-foreground",children:c.kindLabel}),s.jsx($,{folder:c,onOpenFolder:o,onChooseRepository:n})]},c.path))}):s.jsx("p",{className:"border-t border-border pt-3 text-muted-foreground",children:t.message}),e[8]=t.folders,e[9]=t.message,e[10]=n,e[11]=o,e[12]=i):i=e[12];let d;return e[13]!==a||e[14]!==i?(d=s.jsxs("div",{className:"grid gap-3",children:[a,i]}),e[13]=a,e[14]=i,e[15]=d):d=e[15],d},B=b=>{const e=N.c(27),{isOpen:t,title:o,description:n,browser:l,errorMessage:r,onOpenFolder:a,onChooseRepository:i,onChooseFolder:d,onClose:c}=b;let p;e[0]!==c?(p=k=>{k||c()},e[0]=c,e[1]=p):p=e[1];let h;e[2]!==o?(h=s.jsx(D,{children:o}),e[2]=o,e[3]=h):h=e[3];let m;e[4]!==n?(m=s.jsx(F,{children:n}),e[4]=n,e[5]=m):m=e[5];let x;e[6]!==h||e[7]!==m?(x=s.jsxs(w,{children:[h,m]}),e[6]=h,e[7]=m,e[8]=x):x=e[8];let u;e[9]!==l||e[10]!==i||e[11]!==a?(u=l===null?s.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the folder…"}):s.jsx(z,{browser:l,onOpenFolder:a,onChooseRepository:i}),e[9]=l,e[10]=i,e[11]=a,e[12]=u):u=e[12];let f;e[13]!==r?(f=r===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),e[13]=r,e[14]=f):f=e[14];let j;e[15]!==l||e[16]!==d?(j=l===null||d===null?null:s.jsx(O,{children:s.jsx(y,{type:"button",onClick:()=>{d(l.path)},children:"Use this folder"})}),e[15]=l,e[16]=d,e[17]=j):j=e[17];let g;e[18]!==x||e[19]!==u||e[20]!==f||e[21]!==j?(g=s.jsxs(v,{children:[x,u,f,j]}),e[18]=x,e[19]=u,e[20]=f,e[21]=j,e[22]=g):g=e[22];let C;return e[23]!==t||e[24]!==p||e[25]!==g?(C=s.jsx(R,{open:t,onOpenChange:p,children:g}),e[23]=t,e[24]=p,e[25]=g,e[26]=C):C=e[26],C};export{B as F};
@@ -0,0 +1 @@
1
+ import{c as b,r as p,U as K,j as l,Z as X,I as B,B as $,$ as q,d as V,D as J,b as Q,e as ee,a0 as te,g as se,f as le,s as ne,a1 as oe,a2 as ie,W as ae,C as re,Y as ce,X as de}from"./index-DRndyOxR.js";import{I as he}from"./index-BA8Qwprc.js";const ge="Add pattern",ue="**/*.stories.tsx",fe=d=>`Path pattern ${String(d+1)}`,me=(d,e,o)=>d.map((s,t)=>t===e?o:s),pe=(d,e)=>d.filter((o,s)=>s!==e),xe=d=>{const e=b.c(22),{pattern:o,position:s,problemMessage:t,onChange:n,onRemove:i}=d,a=p.useId();let r;e[0]!==s?(r=fe(s),e[0]=s,e[1]=r):r=e[1];const c=r,h=t!==null,g=t===null?void 0:a;let u;e[2]!==n?(u=C=>{n(C.target.value)},e[2]=n,e[3]=u):u=e[3];let f;e[4]!==o||e[5]!==c||e[6]!==h||e[7]!==g||e[8]!==u?(f=l.jsx(X,{"aria-label":c,"aria-invalid":h,"aria-describedby":g,value:o,placeholder:ue,spellCheck:!1,autoComplete:"off",className:"font-mono",onChange:u}),e[4]=o,e[5]=c,e[6]=h,e[7]=g,e[8]=u,e[9]=f):f=e[9];const j=`Remove ${o===""?c:o}`;let m;e[10]!==i||e[11]!==j?(m=l.jsx(B,{icon:"remove",label:j,onClick:i}),e[10]=i,e[11]=j,e[12]=m):m=e[12];let N;e[13]!==f||e[14]!==m?(N=l.jsxs("span",{className:"flex items-center gap-2",children:[f,m]}),e[13]=f,e[14]=m,e[15]=N):N=e[15];let x;e[16]!==a||e[17]!==t?(x=t===null?null:l.jsx("span",{id:a,className:"text-sm text-destructive",children:t}),e[16]=a,e[17]=t,e[18]=x):x=e[18];let T;return e[19]!==N||e[20]!==x?(T=l.jsxs("li",{className:"grid gap-1",children:[N,x]}),e[19]=N,e[20]=x,e[21]=T):T=e[21],T},be=d=>{const e=b.c(16),{labelledBy:o,value:s,problem:t,onChange:n}=d,i=p.useRef(null),a=p.useRef(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{var j,m;a.current&&(a.current=!1,(m=(j=i.current)==null?void 0:j.querySelector("li:last-child input"))==null||m.focus())},e[0]=r):r=e[0];let c;e[1]!==s.length?(c=[s.length],e[1]=s.length,e[2]=c):c=e[2],p.useEffect(r,c);let h;e[3]!==n||e[4]!==t||e[5]!==s?(h=K(s).map((j,m)=>{const{key:N,item:x}=j;return l.jsx(xe,{pattern:x,position:m,problemMessage:(t==null?void 0:t.position)===m?t.message:null,onChange:T=>{n(me(s,m,T))},onRemove:()=>{n(pe(s,m))}},N)}),e[3]=n,e[4]=t,e[5]=s,e[6]=h):h=e[6];let g;e[7]!==o||e[8]!==h?(g=l.jsx("ol",{ref:i,"aria-labelledby":o,className:"grid gap-2",children:h}),e[7]=o,e[8]=h,e[9]=g):g=e[9];let u;e[10]!==n||e[11]!==s?(u=l.jsx($,{type:"button",variant:"outline",className:"w-fit",onClick:()=>{a.current=!0,n([...s,""])},children:ge}),e[10]=n,e[11]=s,e[12]=u):u=e[12];let f;return e[13]!==g||e[14]!==u?(f=l.jsxs("div",{className:"grid max-w-md gap-3",children:[g,u]}),e[13]=g,e[14]=u,e[15]=f):f=e[15],f},je={context:"Context",traceDiagram:"Trace Diagram",blastDiagram:"Blast Diagram",walkthrough:"Code Walkthrough"},H=(d,e,o)=>{const s=e+o;return d.map((t,n)=>n===e?d[s]??t:n===s?d[e]??t:t)},Ne=d=>{const e=b.c(6),{labelledBy:o,value:s,onChange:t}=d;let n;e[0]!==t||e[1]!==s?(n=s.map((a,r)=>{const c=je[a];return l.jsxs("li",{className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5",children:[l.jsx("span",{className:"min-w-0 flex-1 font-semibold",children:c}),l.jsx(B,{icon:"previous",label:`Move ${c} up`,isDisabled:r===0,onClick:()=>{t(H(s,r,-1))}}),l.jsx(B,{icon:"next",label:`Move ${c} down`,isDisabled:r===s.length-1,onClick:()=>{t(H(s,r,1))}})]},a)}),e[0]=t,e[1]=s,e[2]=n):n=e[2];let i;return e[3]!==o||e[4]!==n?(i=l.jsx("ol",{"aria-labelledby":o,className:"grid max-w-md gap-1",children:n}),e[3]=o,e[4]=n,e[5]=i):i=e[5],i},Te="flex h-9 cursor-pointer items-center gap-2 rounded-lg border border-input bg-card pr-3.5 pl-3 text-sm transition-colors duration-[180ms] ease-out select-none hover:bg-muted has-checked:border-foreground has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ring",Ce="size-4 shrink-0 cursor-pointer accent-(--primary) focus-visible:outline-none",M=d=>{const e=b.c(15),{label:o,description:s,isChecked:t,onToggle:n}=d,i=p.useId(),a=s===null?void 0:i;let r;e[0]!==t||e[1]!==n||e[2]!==a?(r=l.jsx("input",{type:"checkbox",checked:t,"aria-describedby":a,className:Ce,onChange:n}),e[0]=t,e[1]=n,e[2]=a,e[3]=r):r=e[3];let c;e[4]!==o?(c=l.jsx("span",{className:"text-box-cap",children:o}),e[4]=o,e[5]=c):c=e[5];let h;e[6]!==r||e[7]!==c?(h=l.jsxs("label",{className:Te,children:[r,c]}),e[6]=r,e[7]=c,e[8]=h):h=e[8];let g;e[9]!==s||e[10]!==i?(g=s===null?null:l.jsx("span",{id:i,className:"sr-only",children:s}),e[9]=s,e[10]=i,e[11]=g):g=e[11];let u;return e[12]!==h||e[13]!==g?(u=l.jsxs(l.Fragment,{children:[h,g]}),e[12]=h,e[13]=g,e[14]=u):u=e[14],u},Ie=[{section:"context",label:"Context"},{section:"traceDiagram",label:"Trace Diagram"},{section:"blastDiagram",label:"Blast Diagram"},{section:"walkthrough",label:"Code Walkthrough"},{section:"findings",label:"Findings"}],Se=d=>d==="always"?"on-demand":"always",ye=d=>{const e=b.c(8),{labelledBy:o,value:s,onChange:t}=d;let n;e[0]!==t||e[1]!==s?(n=Ie.map(r=>{const{section:c,label:h}=r;return l.jsx("li",{children:l.jsx(M,{label:h,description:null,isChecked:s[c]==="always",onToggle:()=>{t({...s,[c]:Se(s[c])})}})},c)}),e[0]=t,e[1]=s,e[2]=n):n=e[2];let i;e[3]!==n?(i=l.jsx("ul",{className:"flex flex-wrap gap-2",children:n}),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==o||e[6]!==i?(a=l.jsx("div",{role:"group","aria-labelledby":o,children:i}),e[5]=o,e[6]=i,e[7]=a):a=e[7],a},ve="Show all topics",we="All topics",Oe="Pick as many as you like. Each topic says which code it covers.",_e="Done",Ee="size-4 shrink-0 cursor-pointer accent-(--primary) focus-visible:outline-none",ke="grid cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 rounded-sm px-2 py-2.5 transition-colors duration-[180ms] ease-out hover:bg-muted has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ring",Re=d=>d.flatMap(e=>e.choices),De=(d,e,o)=>{const s=e.includes(o);return d.map(t=>t.classification).filter(t=>t===o?!s:e.includes(t))},Ae=(d,e)=>d.map(o=>({...o,choices:o.choices.filter(s=>s.isFeatured||e.includes(s.classification))})).filter(o=>o.choices.length>0),Le=d=>{const e=b.c(13),{choice:o,isPicked:s,onToggle:t}=d,n=p.useId();let i;e[0]!==n||e[1]!==s||e[2]!==t?(i=l.jsx("input",{type:"checkbox",checked:s,"aria-describedby":n,className:`mt-0.5 ${Ee}`,onChange:t}),e[0]=n,e[1]=s,e[2]=t,e[3]=i):i=e[3];let a;e[4]!==o.label?(a=l.jsx("span",{className:"min-w-0 font-bold",children:o.label}),e[4]=o.label,e[5]=a):a=e[5];let r;e[6]!==o.description||e[7]!==n?(r=l.jsx("span",{id:n,className:"col-start-2 text-muted-foreground",children:o.description}),e[6]=o.description,e[7]=n,e[8]=r):r=e[8];let c;return e[9]!==i||e[10]!==a||e[11]!==r?(c=l.jsx("li",{className:"border-b border-border",children:l.jsxs("label",{className:ke,children:[i,a,r]})}),e[9]=i,e[10]=a,e[11]=r,e[12]=c):c=e[12],c},Pe=d=>{const e=b.c(16),{group:o,picked:s,onToggle:t}=d,n=p.useId();let i;e[0]!==o.label||e[1]!==n?(i=l.jsx("span",{id:n,className:"text-sm font-bold sm:pt-2",children:o.label}),e[0]=o.label,e[1]=n,e[2]=i):i=e[2];let a;if(e[3]!==o.choices||e[4]!==t||e[5]!==s){let h;e[7]!==t||e[8]!==s?(h=g=>l.jsx("li",{children:l.jsx(M,{label:g.label,description:g.description,isChecked:s.includes(g.classification),onToggle:()=>{t(g.classification)}})},g.classification),e[7]=t,e[8]=s,e[9]=h):h=e[9],a=o.choices.map(h),e[3]=o.choices,e[4]=t,e[5]=s,e[6]=a}else a=e[6];let r;e[10]!==a?(r=l.jsx("ul",{className:"flex flex-wrap gap-2",children:a}),e[10]=a,e[11]=r):r=e[11];let c;return e[12]!==n||e[13]!==i||e[14]!==r?(c=l.jsxs("li",{role:"group","aria-labelledby":n,className:"grid items-start gap-x-4 gap-y-2 border-b border-border py-3 sm:grid-cols-[7.5rem_minmax(0,1fr)]",children:[i,r]}),e[12]=n,e[13]=i,e[14]=r,e[15]=c):c=e[15],c},Fe=d=>{const e=b.c(16),{group:o,picked:s,onToggle:t}=d,n=p.useId();let i;e[0]!==o.label||e[1]!==n?(i=l.jsx("h4",{id:n,className:"border-b-2 border-foreground pb-2 font-bold",children:o.label}),e[0]=o.label,e[1]=n,e[2]=i):i=e[2];let a;if(e[3]!==o.choices||e[4]!==t||e[5]!==s){let h;e[7]!==t||e[8]!==s?(h=g=>l.jsx(Le,{choice:g,isPicked:s.includes(g.classification),onToggle:()=>{t(g.classification)}},g.classification),e[7]=t,e[8]=s,e[9]=h):h=e[9],a=o.choices.map(h),e[3]=o.choices,e[4]=t,e[5]=s,e[6]=a}else a=e[6];let r;e[10]!==a?(r=l.jsx("ul",{className:"grid gap-x-6 sm:grid-cols-2",children:a}),e[10]=a,e[11]=r):r=e[11];let c;return e[12]!==n||e[13]!==i||e[14]!==r?(c=l.jsxs("section",{"aria-labelledby":n,children:[i,r]}),e[12]=n,e[13]=i,e[14]=r,e[15]=c):c=e[15],c},We=d=>{const e=b.c(14),{groups:o,picked:s,onToggle:t}=d;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(q,{render:l.jsx($,{type:"button",variant:"outline"}),children:ve}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs(V,{children:[l.jsx(J,{children:we}),l.jsx(Q,{children:Oe})]}),e[1]=i):i=e[1];let a;if(e[2]!==o||e[3]!==t||e[4]!==s){let g;e[6]!==t||e[7]!==s?(g=u=>l.jsx(Fe,{group:u,picked:s,onToggle:t},u.label),e[6]=t,e[7]=s,e[8]=g):g=e[8],a=o.map(g),e[2]=o,e[3]=t,e[4]=s,e[5]=a}else a=e[5];let r;e[9]!==a?(r=l.jsx("div",{className:"-mr-2 grid max-h-[62dvh] gap-6 overflow-y-auto pr-2",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(ee,{children:l.jsx(te,{render:l.jsx($,{type:"button"}),children:_e})}),e[11]=c):c=e[11];let h;return e[12]!==r?(h=l.jsxs(se,{children:[n,l.jsxs(le,{className:"gap-5 sm:max-w-3xl",children:[i,r,c]})]}),e[12]=r,e[13]=h):h=e[13],h},Ge=d=>{const e=b.c(21),{labelledBy:o,groups:s,picked:t,onChange:n}=d;let i;e[0]!==s||e[1]!==n||e[2]!==t?(i=u=>{n(De(Re(s),t,u))},e[0]=s,e[1]=n,e[2]=t,e[3]=i):i=e[3];const a=i;let r;if(e[4]!==s||e[5]!==t||e[6]!==a){let u;e[8]!==t||e[9]!==a?(u=f=>l.jsx(Pe,{group:f,picked:t,onToggle:a},f.label),e[8]=t,e[9]=a,e[10]=u):u=e[10],r=Ae(s,t).map(u),e[4]=s,e[5]=t,e[6]=a,e[7]=r}else r=e[7];let c;e[11]!==r?(c=l.jsx("ul",{className:"border-t border-border",children:r}),e[11]=r,e[12]=c):c=e[12];let h;e[13]!==s||e[14]!==t||e[15]!==a?(h=l.jsx("div",{className:"pt-3",children:l.jsx(We,{groups:s,picked:t,onToggle:a})}),e[13]=s,e[14]=t,e[15]=a,e[16]=h):h=e[16];let g;return e[17]!==o||e[18]!==c||e[19]!==h?(g=l.jsxs("div",{role:"group","aria-labelledby":o,children:[c,h]}),e[17]=o,e[18]=c,e[19]=h,e[20]=g):g=e[20],g},Be="text-lg leading-7 font-semibold text-signal-text",$e="mt-1 max-w-[62ch] pb-4 text-muted-foreground",He="Which topics do you care about most in a code review?",Me="Selecting a topic helps Flight Plan organize the changes based on what you think are the most important bits when reviewing a pull request, and makes it easier for you to navigate the changes.",Ue="Which parts should the agent write for you by default?",ze="Pick the sections you want the agent to write in every review. For anything else, you can ask it to explain just the code you want, right from the review.",Ye="Which writing style should the agent use?",Ze="Each prompt configuration gives the agent a different way of writing, from short notes to explanations for someone new to the code. The structure of the review stays the same.",Ke="You can fully customize the prompt instructions",Xe="You can make your own prompt configuration in Settings > Prompt configurations and rewrite how the agent words each part of the review, down to its writing style. You can also pick a different configuration each time you create a Flight Plan.",qe="Review organization",Ve="Choose whether a review is split into segments.",Je="Code Walkthrough order",Qe="Choose the order the Code Walkthrough takes you through the changed files.",et="Split reviews into segments",tt="Flight Plan groups the changed files into segments, each with its own Context, Trace Diagram, Blast Diagram and Code Walkthrough. With segments off, a review is one segment with one Context for the whole change, and each Trace Diagram gets a tab of its own.",st="Display arrangement",lt="Choose the order of the four sections in each segment.",nt="Ignored files",ot="Flight Plan leaves the files these patterns match out of every review. Write each pattern from the root of the repository, as in a .gitignore. To start with, the list leaves out tests in TypeScript and Python, e2e tests included.",it="ignoredPaths",at="Advanced options",rt="Segments, section order and ignored files",ct=d=>{var e;return((e=d==null?void 0:d.field)==null?void 0:e.owner)===it?{position:Number(d.field.name),message:d.message}:null},S=d=>{const e=b.c(13),{title:o,intro:s,children:t}=d,n=p.useId();let i;e[0]!==n||e[1]!==o?(i=l.jsx("h3",{id:n,className:Be,children:o}),e[0]=n,e[1]=o,e[2]=i):i=e[2];let a;e[3]!==s?(a=l.jsx("p",{className:$e,children:s}),e[3]=s,e[4]=a):a=e[4];let r;e[5]!==t||e[6]!==n?(r=t(n),e[5]=t,e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==n||e[9]!==i||e[10]!==a||e[11]!==r?(c=l.jsxs("section",{"aria-labelledby":n,children:[i,a,r]}),e[8]=n,e[9]=i,e[10]=a,e[11]=r,e[12]=c):c=e[12],c},dt=d=>{const e=b.c(7),{isOpen:o,onOpenChange:s,children:t}=d;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsxs(ae,{className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-3 rounded-sm px-2 py-4 text-left transition-colors duration-[180ms] ease-out outline-none hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"block text-lg leading-7 font-bold",children:at}),l.jsx("span",{className:"block text-sm text-muted-foreground",children:rt})]}),l.jsx(re,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground transition-transform duration-[180ms] ease-out group-data-[panel-open]:rotate-180"})]}),e[0]=n):n=e[0];let i;e[1]!==t?(i=l.jsx(ce,{className:"grid gap-10 pt-6",children:t}),e[1]=t,e[2]=i):i=e[2];let a;return e[3]!==o||e[4]!==s||e[5]!==i?(a=l.jsxs(de,{open:o,onOpenChange:s,className:"border-t border-border",children:[n,i]}),e[3]=o,e[4]=s,e[5]=i,e[6]=a):a=e[6],a},ht=d=>{const e=b.c(12),{isSegmented:o,onChange:s}=d,t=p.useId();let n;e[0]!==s?(n=h=>{s(h.target.checked)},e[0]=s,e[1]=n):n=e[1];let i;e[2]!==t||e[3]!==o||e[4]!==n?(i=l.jsx("input",{type:"checkbox",checked:o,"aria-describedby":t,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:n}),e[2]=t,e[3]=o,e[4]=n,e[5]=i):i=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("span",{className:"font-bold",children:et}),e[6]=a):a=e[6];let r;e[7]!==t?(r=l.jsx("span",{id:t,className:"col-start-2 max-w-[62ch] text-sm text-muted-foreground",children:tt}),e[7]=t,e[8]=r):r=e[8];let c;return e[9]!==i||e[10]!==r?(c=l.jsxs("label",{className:"grid cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3",children:[i,a,r]}),e[9]=i,e[10]=r,e[11]=c):c=e[11],c},ft=d=>{const e=b.c(43),{presets:o,selectedConfigurationId:s,preferences:t,spotlightGroups:n,problem:i,children:a,onSubmit:r}=d,[c,h]=p.useState(s),[g,u]=p.useState(t.spotlight),[f,j]=p.useState(t.sectionWriteUps),[m,N]=p.useState(t.isSegmented),[x,T]=p.useState(t.walkthroughOrder),[C,U]=p.useState(t.sectionOrder),[y,z]=p.useState(t.ignoredPaths),[Y,Z]=p.useState(!1);let P;e[0]!==i?(P=ct(i),e[0]=i,e[1]=P):P=e[1];const F=P;let v;e[2]!==c||e[3]!==y||e[4]!==m||e[5]!==r||e[6]!==C||e[7]!==f||e[8]!==g||e[9]!==x?(v=ne(()=>{r({configurationId:c,preferences:{spotlight:g,sectionWriteUps:f,isSegmented:m,walkthroughOrder:x,sectionOrder:C,ignoredPaths:y}})}),e[2]=c,e[3]=y,e[4]=m,e[5]=r,e[6]=C,e[7]=f,e[8]=g,e[9]=x,e[10]=v):v=e[10];let w;e[11]!==g||e[12]!==n?(w=l.jsx(S,{title:He,intro:Me,children:I=>l.jsx(Ge,{labelledBy:I,groups:n,picked:g,onChange:u})}),e[11]=g,e[12]=n,e[13]=w):w=e[13];let O;e[14]!==f?(O=l.jsx(S,{title:Ue,intro:ze,children:I=>l.jsx(ye,{labelledBy:I,value:f,onChange:j})}),e[14]=f,e[15]=O):O=e[15];let _;e[16]!==c||e[17]!==o?(_=l.jsx(S,{title:Ye,intro:Ze,children:()=>l.jsxs(l.Fragment,{children:[l.jsx(oe,{options:o,value:c,onChange:h}),l.jsx(he,{title:Ke,className:"mt-4 max-w-xl",children:Xe})]})}),e[16]=c,e[17]=o,e[18]=_):_=e[18];let E;e[19]!==x?(E=l.jsx(S,{title:Je,intro:Qe,children:()=>l.jsx(ie,{value:x,onChange:T})}),e[19]=x,e[20]=E):E=e[20];const G=Y||F!==null;let k;e[21]!==m?(k=l.jsx(S,{title:qe,intro:Ve,children:()=>l.jsx(ht,{isSegmented:m,onChange:N})}),e[21]=m,e[22]=k):k=e[22];let R;e[23]!==C?(R=l.jsx(S,{title:st,intro:lt,children:I=>l.jsx(Ne,{labelledBy:I,value:C,onChange:U})}),e[23]=C,e[24]=R):R=e[24];let D;e[25]!==F||e[26]!==y?(D=l.jsx(S,{title:nt,intro:ot,children:I=>l.jsx(be,{labelledBy:I,value:y,problem:F,onChange:z})}),e[25]=F,e[26]=y,e[27]=D):D=e[27];let A;e[28]!==D||e[29]!==G||e[30]!==k||e[31]!==R?(A=l.jsxs(dt,{isOpen:G,onOpenChange:Z,children:[k,R,D]}),e[28]=D,e[29]=G,e[30]=k,e[31]=R,e[32]=A):A=e[32];let L;e[33]!==a?(L=l.jsx("div",{children:a}),e[33]=a,e[34]=L):L=e[34];let W;return e[35]!==A||e[36]!==L||e[37]!==v||e[38]!==w||e[39]!==O||e[40]!==_||e[41]!==E?(W=l.jsxs("form",{className:"grid gap-10",onSubmit:v,children:[w,O,_,E,A,L]}),e[35]=A,e[36]=L,e[37]=v,e[38]=w,e[39]=O,e[40]=_,e[41]=E,e[42]=W):W=e[42],W};export{ft as R};
@@ -0,0 +1 @@
1
+ import{c as p,h as x,i as v,m as j,j as m,B as S}from"./index-DRndyOxR.js";const P=()=>{var d,g;const t=p.c(12),e=x(),r=v();let o;t[0]!==r||t[1]!==e.settings?(o=e.settings.save.mutationOptions({onSuccess:async f=>{f.kind!=="rejected"&&(r.removeQueries({type:"inactive"}),await r.invalidateQueries(e.settings.pathFilter()))}}),t[0]=r,t[1]=e.settings,t[2]=o):o=t[2];const s=j(o),a=((d=s.data)==null?void 0:d.kind)==="rejected"?s.data:null;let c;t[3]!==a||t[4]!==s.error?(c=s.error===null?a:{message:s.error.message,field:null},t[3]=a,t[4]=s.error,t[5]=c):c=t[5];const n=c,u=n!==null&&n.field===null?n.message:null,l=((g=s.data)==null?void 0:g.kind)==="saved"?s.data.message:null;let i;return t[6]!==n||t[7]!==s.isPending||t[8]!==s.mutate||t[9]!==u||t[10]!==l?(i={problem:n,errorMessage:u,savedMessage:l,isPending:s.isPending,save:s.mutate},t[6]=n,t[7]=s.isPending,t[8]=s.mutate,t[9]=u,t[10]=l,t[11]=i):i=t[11],i},b="Save",h="Saving…",M=t=>{const e=p.c(13),{isPending:r,errorMessage:o,savedMessage:s}=t;let a;e[0]!==o?(a=o===null?null:m.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:o}),e[0]=o,e[1]=a):a=e[1];const c=r?null:s;let n;e[2]!==c?(n=m.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:c}),e[2]=c,e[3]=n):n=e[3];const u=r?h:b;let l;e[4]!==r||e[5]!==u?(l=m.jsx(S,{type:"submit",disabled:r,children:u}),e[4]=r,e[5]=u,e[6]=l):l=e[6];let i;e[7]!==n||e[8]!==l?(i=m.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-2",children:[n,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9];let d;return e[10]!==a||e[11]!==i?(d=m.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[a,i]}),e[10]=a,e[11]=i,e[12]=d):d=e[12],d};export{M as S,P as u};
@@ -0,0 +1 @@
1
+ import{c as m,u as d,j as n,B as x}from"./index-DRndyOxR.js";const u="The backend did not say what went wrong.",h=i=>{const e=m.c(8),{error:c}=i,a=d();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em]",children:"Could not load the settings"}),e[0]=o):o=e[0];const l=c instanceof Error?c.message:u;let t;e[1]!==l?(t=n.jsx("p",{className:"mt-2 text-muted-foreground",children:l}),e[1]=l,e[2]=t):t=e[2];let s;e[3]!==a?(s=n.jsx(x,{className:"mt-4",onClick:()=>{a.invalidate()},children:"Try again"}),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=n.jsxs("section",{role:"alert",className:"max-w-prose",children:[o,t,s]}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r};export{h as S};
@@ -0,0 +1 @@
1
+ import{c as B,j as n,z as Ie,w as Oe,B as Ee,y as Me,E as Be,U as qe,L as Ge,h as he,i as He,V as Fe,r as ie,H as $e,G as De,m as V,K as Ue,M as Ke,l as fe,k as Te}from"./index-DRndyOxR.js";import{P as Ve}from"./index-CqVakH8R.js";import{u as ze,a as We,A as Je}from"./index-COS3U9jZ.js";import{R as Xe,t as Ye}from"./index-BUcr0tJt.js";import{A as Ze,a as Qe}from"./index-CFZ7PaJE.js";import{R as et}from"./index-CZ3Rr8-h.js";import{F as tt}from"./index-DpY8OPAr.js";import"./index-COdzqD_M.js";import"./index-BA8Qwprc.js";const st="Back",nt="Skip for now",pe=t=>{const e=B.c(21),{backStep:s,submitLabel:r,pendingLabel:l,isPending:c,isReady:p,hint:m,errorMessage:o,onSkip:h}=t,i=p===void 0?!0:p,b=m===void 0?null:m,u=h===void 0?null:h;let x;e[0]!==o?(x=o===null?null:n.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:o}),e[0]=o,e[1]=x):x=e[1];let j;e[2]!==s?(j=s===null?null:n.jsx(Ie,{to:"/setup",search:{step:s},className:Oe({variant:"ghost"}),children:n.jsx("span",{className:"text-box-cap",children:st})}),e[2]=s,e[3]=j):j=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"flex-1"}),e[4]=d):d=e[4];let y;e[5]!==b?(y=b===null?null:n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),e[5]=b,e[6]=y):y=e[6];let S;e[7]!==c||e[8]!==u?(S=u===null?null:n.jsx(Ee,{type:"button",variant:"outline",disabled:c,onClick:u,children:nt}),e[7]=c,e[8]=u,e[9]=S):S=e[9];const g=c||!i,P=c?l:r;let R;e[10]!==P||e[11]!==g?(R=n.jsx(Ee,{type:"submit",disabled:g,children:P}),e[10]=P,e[11]=g,e[12]=R):R=e[12];let k;e[13]!==R||e[14]!==j||e[15]!==y||e[16]!==S?(k=n.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[j,d,y,S,R]}),e[13]=R,e[14]=j,e[15]=y,e[16]=S,e[17]=k):k=e[17];let C;return e[18]!==k||e[19]!==x?(C=n.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[x,k]}),e[18]=k,e[19]=x,e[20]=C):C=e[20],C},Se=t=>{const e=B.c(7),{title:s,children:r}=t;let l;e[0]!==s?(l=n.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==r?(c=n.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:r}),e[2]=r,e[3]=c):c=e[3];let p;return e[4]!==l||e[5]!==c?(p=n.jsxs("header",{className:"pb-6",children:[l,c]}),e[4]=l,e[5]=c,e[6]=p):p=e[6],p},ot="Agent integration",rt=t=>{const e=B.c(15);let s,r,l,c;e[0]!==t?({backStep:s,problem:c,isPending:l,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=c):(s=e[1],r=e[2],l=e[3],c=e[4]);let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Se,{title:ot,children:"Configure which agent you prefer and where Flight Plan installs the agent plugin and the MCP server."}),e[5]=p):p=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Qe,{}),e[6]=m):m=e[6];const o=c!==null&&c.field===null?c.message:null;let h;e[7]!==s||e[8]!==l||e[9]!==o?(h=n.jsx(pe,{backStep:s,submitLabel:"Save and continue",pendingLabel:"Saving…",isPending:l,errorMessage:o}),e[7]=s,e[8]=l,e[9]=o,e[10]=h):h=e[10];let i;return e[11]!==r||e[12]!==c||e[13]!==h?(i=n.jsxs(n.Fragment,{children:[p,n.jsxs(Ze,{...r,problem:c,children:[m,h]})]}),e[11]=r,e[12]=c,e[13]=h,e[14]=i):i=e[14],i},lt=t=>{const e=B.c(12),{presets:s,selectedConfigurationId:r,preferences:l,spotlightGroups:c,backStep:p,problem:m,isPending:o,onSubmit:h}=t,i=m!==null&&m.field===null?m.message:null;let b;e[0]!==p||e[1]!==o||e[2]!==i?(b=n.jsx(pe,{backStep:p,submitLabel:"Finish setup",pendingLabel:"Finishing…",isPending:o,errorMessage:i}),e[0]=p,e[1]=o,e[2]=i,e[3]=b):b=e[3];let u;return e[4]!==h||e[5]!==l||e[6]!==s||e[7]!==m||e[8]!==r||e[9]!==c||e[10]!==b?(u=n.jsx(et,{presets:s,selectedConfigurationId:r,preferences:l,spotlightGroups:c,problem:m,onSubmit:h,children:b}),e[4]=h,e[5]=l,e[6]=s,e[7]=m,e[8]=r,e[9]=c,e[10]=b,e[11]=u):u=e[11],u},it="Git integration",at=t=>{const e=B.c(16);let s,r,l,c,p;e[0]!==t?({backStep:s,problem:p,isPending:l,onSkip:c,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=c,e[5]=p):(s=e[1],r=e[2],l=e[3],c=e[4],p=e[5]);let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(Se,{title:it,children:["By default, Flight Plan uses the"," ",n.jsx("code",{className:"rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.875em]",children:"git"})," ","command to read and fetch your local and remote branches and their commits."]}),e[6]=m):m=e[6];const o=p!==null&&p.field===null?p.message:null;let h;e[7]!==s||e[8]!==l||e[9]!==c||e[10]!==o?(h=n.jsx(pe,{backStep:s,submitLabel:"Save and continue",pendingLabel:"Saving…",isPending:l,errorMessage:o,onSkip:c}),e[7]=s,e[8]=l,e[9]=c,e[10]=o,e[11]=h):h=e[11];let i;return e[12]!==r||e[13]!==p||e[14]!==h?(i=n.jsxs(n.Fragment,{children:[m,n.jsx(tt,{...r,problem:p,children:h})]}),e[12]=r,e[13]=p,e[14]=h,e[15]=i):i=e[15],i},ct="Select your repositories",ut=t=>{const e=B.c(21);let s,r,l,c,p,m,o;if(e[0]!==t){const{isReadyToContinue:x,continueHint:j,backStep:d,errorMessage:y,isPending:S,onContinue:g,...P}=t;p=x,r=j,s=d,l=y,c=S,m=P,o=R=>{R.preventDefault(),g()},e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=c,e[5]=p,e[6]=m,e[7]=o}else s=e[1],r=e[2],l=e[3],c=e[4],p=e[5],m=e[6],o=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Se,{title:ct,children:"Choose the repositories you review. Flight Plan shows their pull requests and branches on your home page."}),e[8]=h):h=e[8];let i;e[9]!==m?(i=n.jsx(Xe,{...m}),e[9]=m,e[10]=i):i=e[10];let b;e[11]!==s||e[12]!==r||e[13]!==l||e[14]!==c||e[15]!==p?(b=n.jsx(pe,{backStep:s,submitLabel:"Save and continue",pendingLabel:"Saving…",isPending:c,isReady:p,hint:r,errorMessage:l}),e[11]=s,e[12]=r,e[13]=l,e[14]=c,e[15]=p,e[16]=b):b=e[16];let u;return e[17]!==o||e[18]!==i||e[19]!==b?(u=n.jsxs("form",{onSubmit:o,children:[h,i,b]}),e[17]=o,e[18]=i,e[19]=b,e[20]=u):u=e[20],u},pt="Setup steps",dt={saved:"merged",current:"no-review",upcoming:"draft"},mt={saved:"text-signal-text",current:"font-bold text-signal-text",upcoming:"text-muted-foreground"},gt=t=>{const e=B.c(6),{stop:s}=t;if(s.state==="current"){let l;return e[0]!==s.label?(l=n.jsx("span",{"aria-current":"step",children:s.label}),e[0]=s.label,e[1]=l):l=e[1],l}let r;return e[2]!==s.isReachable||e[3]!==s.label||e[4]!==s.step?(r=s.isReachable?n.jsx(Ie,{to:"/setup",search:{step:s.step},className:"rounded-sm underline decoration-input underline-offset-4 hover:decoration-foreground",children:s.label}):n.jsx("span",{children:s.label}),e[2]=s.isReachable,e[3]=s.label,e[4]=s.step,e[5]=r):r=e[5],r},ft=t=>{const e=B.c(4),{stops:s}=t;let r;e[0]!==s?(r=s.map(St),e[0]=s,e[1]=r):r=e[1];let l;return e[2]!==r?(l=n.jsx("nav",{"aria-label":pt,children:n.jsx("ol",{children:r})}),e[2]=r,e[3]=l):l=e[3],l};function ht(t){return n.jsx(Ge,{segments:t.item,className:"text-sm text-muted-foreground"},t.key)}function St(t){return n.jsxs("li",{className:"group grid min-h-22 grid-cols-[2.5rem_minmax(0,1fr)]",children:[n.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[n.jsx("span",{className:"h-0.5 w-1 bg-(--line) group-first:invisible"}),n.jsx(Me,{status:dt[t.state]}),n.jsx("span",{className:"w-1 flex-1 bg-(--line) group-last:invisible"})]}),n.jsxs("div",{className:"pb-5",children:[n.jsxs("p",{className:Be("leading-6",mt[t.state]),children:[n.jsx(gt,{stop:t}),n.jsx("span",{className:"sr-only",children:`, ${t.stateLabel}`})]}),qe(t.lines).map(ht)]})]},t.step)}const bt="[--line:var(--primary)]",xt="Setup",yt="Setup • Flight Plan",jt="Searching…",vt="Looking for your recent repositories…",Rt=6e4,Pt=t=>{var be,xe,ye,je,ve,Re,Pe,ke,Ce,we,Ne,Ae,_e,Le;const e=B.c(107),{repositories:s,isReadyToContinue:r,continueHint:l,backStep:c,errorMessage:p,isPending:m,onChanged:o,onContinue:h}=t,i=he(),[b,u]=ie.useState(!1),[x,j]=ie.useState(null),d=ze(b);let y;e[0]!==d.search.query||e[1]!==b?(y={isEnabled:b,folderPath:d.search.query,repositoryName:null,saved:null},e[0]=d.search.query,e[1]=b,e[2]=y):y=e[2];const S=We(y),g=ie.useDeferredValue(x);let P;e[3]!==i.setup.recentRepositories?(P=i.setup.recentRepositories.queryOptions({}),e[3]=i.setup.recentRepositories,e[4]=P):P=e[4];let R;e[5]!==P?(R={...P,staleTime:Rt,placeholderData:Te},e[5]=P,e[6]=R):R=e[6];const k=fe(R);let C;e[7]!==(g==null?void 0:g.query)||e[8]!==(g==null?void 0:g.repositoryName)||e[9]!==(g==null?void 0:g.role)||e[10]!==i.setup.searchAuthors?(C=i.setup.searchAuthors.queryOptions({repositoryName:(g==null?void 0:g.repositoryName)??"",role:(g==null?void 0:g.role)??"tracked",query:(g==null?void 0:g.query)??""}),e[7]=g==null?void 0:g.query,e[8]=g==null?void 0:g.repositoryName,e[9]=g==null?void 0:g.role,e[10]=i.setup.searchAuthors,e[11]=C):C=e[11];const D=g!==null;let oe;e[12]!==C||e[13]!==D?(oe={...C,enabled:D,placeholderData:Te},e[12]=C,e[13]=D,e[14]=oe):oe=e[14];const O=fe(oe);let H;if(e[15]!==S||e[16]!==d||e[17]!==o||e[18]!==i.setup.addRepository){let w;e[20]!==S||e[21]!==d||e[22]!==o?(w=async()=>{u(!1),d.reset(),S.reset(),await o()},e[20]=S,e[21]=d,e[22]=o,e[23]=w):w=e[23],H=i.setup.addRepository.mutationOptions({onSuccess:w}),e[15]=S,e[16]=d,e[17]=o,e[18]=i.setup.addRepository,e[19]=H}else H=e[19];const f=V(H);let a;e[24]!==o||e[25]!==i.setup.addRepository?(a=i.setup.addRepository.mutationOptions({onSuccess:o}),e[24]=o,e[25]=i.setup.addRepository,e[26]=a):a=e[26];const L=V(a);let E;e[27]!==o||e[28]!==i.setup.removeRepository?(E=i.setup.removeRepository.mutationOptions({onSuccess:o}),e[27]=o,e[28]=i.setup.removeRepository,e[29]=E):E=e[29];const F=V(E);let $;e[30]!==o||e[31]!==i.setup.setAuthorTracking?($=i.setup.setAuthorTracking.mutationOptions({onSuccess:o}),e[30]=o,e[31]=i.setup.setAuthorTracking,e[32]=$):$=e[32];const T=V($);let I;e[33]!==f||e[34]!==S||e[35]!==d?(I=()=>{f.reset(),d.reset(),S.reset(),u(!1)},e[33]=f,e[34]=S,e[35]=d,e[36]=I):I=e[36];const M=I,q=k.isPending?vt:((be=k.error)==null?void 0:be.message)??((xe=k.data)==null?void 0:xe.message)??null;let N;e[37]!==((ye=k.data)==null?void 0:ye.repositories)?(N=((je=k.data)==null?void 0:je.repositories)??[],e[37]=(ve=k.data)==null?void 0:ve.repositories,e[38]=N):N=e[38];let A;e[39]!==s||e[40]!==N?(A=Ye(N,s),e[39]=s,e[40]=N,e[41]=A):A=e[41];const G=((Re=L.error)==null?void 0:Re.message)??((Pe=F.error)==null?void 0:Pe.message)??null,U=L.isPending||F.isPending,z=(x==null?void 0:x.repositoryName)??null,W=(x==null?void 0:x.role)??null,v=(x==null?void 0:x.query)??"";let _;e[42]!==((ke=O.data)==null?void 0:ke.options)?(_=((Ce=O.data)==null?void 0:Ce.options)??[],e[42]=(we=O.data)==null?void 0:we.options,e[43]=_):_=e[43];const re=((Ne=O.data)==null?void 0:Ne.message)??(O.isPending?jt:null),le=((Ae=O.error)==null?void 0:Ae.message)??((_e=T.error)==null?void 0:_e.message)??null;let K;e[44]!==z||e[45]!==W||e[46]!==v||e[47]!==_||e[48]!==re||e[49]!==le?(K={repositoryName:z,role:W,query:v,options:_,message:re,errorMessage:le},e[44]=z,e[45]=W,e[46]=v,e[47]=_,e[48]=re,e[49]=le,e[50]=K):K=e[50];let ae;e[51]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{u(!0)},e[51]=ae):ae=e[51];let J,X;e[52]!==L||e[53]!==F?(J=w=>{F.reset(),L.mutate({path:w,trackedAuthorIds:[]})},X=w=>{L.reset(),F.mutate({name:w})},e[52]=L,e[53]=F,e[54]=J,e[55]=X):(J=e[54],X=e[55]);let ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(ce=(w,me,ge)=>{j({repositoryName:w,role:me,query:ge})},e[56]=ce):ce=e[56];let Y;e[57]!==T?(Y=(w,me,ge)=>{j(null),T.mutate({repositoryName:w,authorId:me,isTracked:ge})},e[57]=T,e[58]=Y):Y=e[58];let Z;e[59]!==c||e[60]!==l||e[61]!==p||e[62]!==m||e[63]!==r||e[64]!==q||e[65]!==h||e[66]!==A||e[67]!==G||e[68]!==U||e[69]!==K||e[70]!==J||e[71]!==X||e[72]!==Y?(Z=n.jsx(ut,{rows:A,listMessage:q,repositoryErrorMessage:G,isChangingRepositories:U,authorSearch:K,isReadyToContinue:r,continueHint:l,backStep:c,errorMessage:p,isPending:m,onOpenAddRepository:ae,onFollow:J,onUnfollow:X,onAuthorQueryChange:ce,onAuthorTrackingChange:Y,onContinue:h}),e[59]=c,e[60]=l,e[61]=p,e[62]=m,e[63]=r,e[64]=q,e[65]=h,e[66]=A,e[67]=G,e[68]=U,e[69]=K,e[70]=J,e[71]=X,e[72]=Y,e[73]=Z):Z=e[73];const de=((Le=f.error)==null?void 0:Le.message)??null;let Q;e[74]!==f||e[75]!==d?(Q=w=>{f.reset(),d.onChooseFolder(w)},e[74]=f,e[75]=d,e[76]=Q):Q=e[76];let ee;e[77]!==f||e[78]!==S.selection||e[79]!==d.search.query?(ee=()=>{f.mutate({path:d.search.query,...S.selection})},e[77]=f,e[78]=S.selection,e[79]=d.search.query,e[80]=ee):ee=e[80];let te;e[81]!==f||e[82]!==d?(te=()=>{f.reset(),d.onBrowse()},e[81]=f,e[82]=d,e[83]=te):te=e[83];let se;e[84]!==f||e[85]!==d?(se=()=>{f.reset(),d.onBrowseClose()},e[84]=f,e[85]=d,e[86]=se):se=e[86];let ne;e[87]!==f.isPending||e[88]!==S.authors||e[89]!==S.onAuthorQueryChange||e[90]!==S.onAuthorSelect||e[91]!==S.onTrackedAuthorRemove||e[92]!==d.browse||e[93]!==d.onBrowseFolder||e[94]!==d.onQueryChange||e[95]!==d.search||e[96]!==M||e[97]!==b||e[98]!==de||e[99]!==Q||e[100]!==ee||e[101]!==te||e[102]!==se?(ne=n.jsx(Je,{isOpen:b,search:d.search,browse:d.browse,authors:S.authors,isAdding:f.isPending,errorMessage:de,onQueryChange:d.onQueryChange,onChooseFolder:Q,onAuthorQueryChange:S.onAuthorQueryChange,onAuthorSelect:S.onAuthorSelect,onTrackedAuthorRemove:S.onTrackedAuthorRemove,onSubmit:ee,onBrowse:te,onBrowseFolder:d.onBrowseFolder,onBrowseClose:se,onClose:M}),e[87]=f.isPending,e[88]=S.authors,e[89]=S.onAuthorQueryChange,e[90]=S.onAuthorSelect,e[91]=S.onTrackedAuthorRemove,e[92]=d.browse,e[93]=d.onBrowseFolder,e[94]=d.onQueryChange,e[95]=d.search,e[96]=M,e[97]=b,e[98]=de,e[99]=Q,e[100]=ee,e[101]=te,e[102]=se,e[103]=ne):ne=e[103];let ue;return e[104]!==Z||e[105]!==ne?(ue=n.jsxs(n.Fragment,{children:[Z,ne]}),e[104]=Z,e[105]=ne,e[106]=ue):ue=e[106],ue},kt=t=>{var j;const e=B.c(11),{form:s}=t,r=he(),[l,c]=ie.useState(null);let p;e[0]!==l||e[1]!==r.setup.browseFolders?(p=r.setup.browseFolders.queryOptions({path:l??"",purpose:"install-folder"}),e[0]=l,e[1]=r.setup.browseFolders,e[2]=p):p=e[2];const m=l!==null;let o;e[3]!==p||e[4]!==m?(o={...p,enabled:m},e[3]=p,e[4]=m,e[5]=o):o=e[5];const h=fe(o),i=l===null?null:h.data??null,b=((j=h.error)==null?void 0:j.message)??null;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{c(null)},e[6]=u):u=e[6];let x;return e[7]!==s||e[8]!==i||e[9]!==b?(x=n.jsx(rt,{...s,folderBrowser:i,folderBrowserErrorMessage:b,onBrowseFolder:c,onBrowseEnd:u}),e[7]=s,e[8]=i,e[9]=b,e[10]=x):x=e[10],x},It=()=>{var z,W;const t=B.c(89),e=he(),s=He(),r=Fe.useNavigate(),l=ie.use($e),{step:c}=Fe.useSearch(),p=c===void 0?null:c;let m;t[0]!==p||t[1]!==e.setup.get?(m=e.setup.get.queryOptions({step:p}),t[0]=p,t[1]=e.setup.get,t[2]=m):m=t[2];const{data:o}=De(m);let h;t[3]!==s||t[4]!==e.setup?(h=async()=>{s.removeQueries({...e.setup.pathFilter(),type:"inactive"}),await s.invalidateQueries(e.setup.pathFilter())},t[3]=s,t[4]=e.setup,t[5]=h):h=t[5];const i=h;let b;if(t[6]!==r||t[7]!==i||t[8]!==e.setup.saveStep){let v;t[10]!==r||t[11]!==i?(v=async _=>{_.kind!=="rejected"&&(await i(),await r({search:{step:_.nextStep}}))},t[10]=r,t[11]=i,t[12]=v):v=t[12],b=e.setup.saveStep.mutationOptions({onSuccess:v}),t[6]=r,t[7]=i,t[8]=e.setup.saveStep,t[9]=b}else b=t[9];const u=V(b);let x;if(t[13]!==r||t[14]!==s||t[15]!==e.setup.complete){let v;t[17]!==r||t[18]!==s?(v=async _=>{s.removeQueries({type:"inactive"}),await r({to:_.redirectTo})},t[17]=r,t[18]=s,t[19]=v):v=t[19],x=e.setup.complete.mutationOptions({onSuccess:v}),t[13]=r,t[14]=s,t[15]=e.setup.complete,t[16]=x}else x=t[16];const j=V(x);let d;t[20]!==e.reviewPreferences.save?(d=e.reviewPreferences.save.mutationOptions(),t[20]=e.reviewPreferences.save,t[21]=d):d=t[21];const y=V(d);let S;t[22]!==j||t[23]!==y||t[24]!==u?(S=v=>{const{configurationId:_,preferences:re}=v;u.reset(),y.mutate(re,{onSuccess:le=>{le.kind!=="rejected"&&u.mutate({step:"configuration",configurationId:_},{onSuccess:K=>{K.kind==="accepted"&&j.mutate({})}})}})},t[22]=j,t[23]=y,t[24]=u,t[25]=S):S=t[25];const g=S,P=((z=y.data)==null?void 0:z.kind)==="rejected"?y.data:null;let R;t[26]!==P||t[27]!==y.error?(R=y.error===null?P:{message:y.error.message,field:null},t[26]=P,t[27]=y.error,t[28]=R):R=t[28];const k=R,C=((W=u.data)==null?void 0:W.kind)==="rejected"?u.data:null;let D;t[29]!==C||t[30]!==u.error?(D=u.error===null?C:{message:u.error.message,field:null},t[29]=C,t[30]=u.error,t[31]=D):D=t[31];const O=k??D;let H;t[32]!==j.error||t[33]!==O?(H=j.error===null?O:{message:j.error.message,field:null},t[32]=j.error,t[33]=O,t[34]=H):H=t[34];const f=H,{form:a}=o;let L;t[35]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx("title",{children:yt}),t[35]=L):L=t[35];let E;t[36]!==l||t[37]!==o.progressLabel?(E=l===null?null:Ue.createPortal(n.jsxs(n.Fragment,{children:[n.jsx(Ke,{lineColor:"primary"}),n.jsxs("p",{className:"flex items-baseline gap-3",children:[n.jsx("span",{className:"font-bold",children:xt}),n.jsx("span",{className:"text-sm text-sign-muted tabular-nums",children:o.progressLabel})]})]}),l),t[36]=l,t[37]=o.progressLabel,t[38]=E):E=t[38];let F,$;t[39]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsxs("header",{className:"pb-8",children:[n.jsx("h1",{className:Ve,children:"Welcome to Flight Plan"}),n.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:"Let's get you ready for your first review. It takes four short steps, and each one is saved as you go, so you can stop and pick up where you left off."})]}),$=Be("grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)]",bt),t[39]=F,t[40]=$):(F=t[39],$=t[40]);let T;t[41]!==o.route?(T=n.jsx("div",{className:"self-start lg:sticky lg:top-22",children:n.jsx(ft,{stops:o.route})}),t[41]=o.route,t[42]=T):T=t[42];let I;t[43]!==a.agents||t[44]!==a.defaultAgent||t[45]!==a.step||t[46]!==o.backStep||t[47]!==f||t[48]!==u?(I=a.step==="agents"?n.jsx(kt,{form:{agents:a.agents,defaultAgent:a.defaultAgent,backStep:o.backStep,problem:f,isPending:u.isPending,onSubmit:v=>{u.mutate({step:"agents",...v})}}},a.step):null,t[43]=a.agents,t[44]=a.defaultAgent,t[45]=a.step,t[46]=o.backStep,t[47]=f,t[48]=u,t[49]=I):I=t[49];let M;t[50]!==a.codeHostFeatures||t[51]!==a.forges||t[52]!==a.step||t[53]!==o.backStep||t[54]!==f||t[55]!==u?(M=a.step==="forges"?n.jsx(at,{codeHostFeatures:a.codeHostFeatures,forges:a.forges,backStep:o.backStep,problem:f,isPending:u.isPending,onSubmit:v=>{u.mutate({step:"forges",...v})},onSkip:()=>{u.mutate({step:"forges",forges:[]})}},a.step):null,t[50]=a.codeHostFeatures,t[51]=a.forges,t[52]=a.step,t[53]=o.backStep,t[54]=f,t[55]=u,t[56]=M):M=t[56];let q;t[57]!==j.isPending||t[58]!==g||t[59]!==a.preferences||t[60]!==a.presets||t[61]!==a.selectedConfigurationId||t[62]!==a.spotlightGroups||t[63]!==a.step||t[64]!==o.backStep||t[65]!==f||t[66]!==y.isPending||t[67]!==u.isPending?(q=a.step==="configuration"?n.jsx(lt,{presets:a.presets,selectedConfigurationId:a.selectedConfigurationId,preferences:a.preferences,spotlightGroups:a.spotlightGroups,backStep:o.backStep,problem:f,isPending:y.isPending||u.isPending||j.isPending,onSubmit:g},a.step):null,t[57]=j.isPending,t[58]=g,t[59]=a.preferences,t[60]=a.presets,t[61]=a.selectedConfigurationId,t[62]=a.spotlightGroups,t[63]=a.step,t[64]=o.backStep,t[65]=f,t[66]=y.isPending,t[67]=u.isPending,t[68]=q):q=t[68];let N;t[69]!==a.continueHint||t[70]!==a.isReadyToContinue||t[71]!==a.repositories||t[72]!==a.step||t[73]!==o.backStep||t[74]!==(f==null?void 0:f.message)||t[75]!==i||t[76]!==u?(N=a.step==="repositories"?n.jsx(Pt,{repositories:a.repositories,isReadyToContinue:a.isReadyToContinue,continueHint:a.continueHint,backStep:o.backStep,errorMessage:(f==null?void 0:f.message)??null,isPending:u.isPending,onChanged:i,onContinue:()=>{u.mutate({step:"repositories"})}}):null,t[69]=a.continueHint,t[70]=a.isReadyToContinue,t[71]=a.repositories,t[72]=a.step,t[73]=o.backStep,t[74]=f==null?void 0:f.message,t[75]=i,t[76]=u,t[77]=N):N=t[77];let A;t[78]!==I||t[79]!==M||t[80]!==q||t[81]!==N?(A=n.jsxs("div",{className:"min-w-0",children:[I,M,q,N]}),t[78]=I,t[79]=M,t[80]=q,t[81]=N,t[82]=A):A=t[82];let G;t[83]!==T||t[84]!==A?(G=n.jsxs("div",{className:$,children:[T,A]}),t[83]=T,t[84]=A,t[85]=G):G=t[85];let U;return t[86]!==E||t[87]!==G?(U=n.jsxs(n.Fragment,{children:[L,E,F,G]}),t[86]=E,t[87]=G,t[88]=U):U=t[88],U};export{It as component};
@@ -0,0 +1 @@
1
+ import{c as V,h as Y,i as K,m as ee,r as k,j as s,B as Z,s as te,Z as se}from"./index-DRndyOxR.js";import{T as z}from"./index-DGsH5lbQ.js";const ie=(A,e,m)=>{var M,o;const t=V.c(18),{segmentId:u,waypointId:f}=e,i=Y(),n=K();let c;if(t[0]!==m||t[1]!==n||t[2]!==i.review.editWalkthrough||t[3]!==i.review.get){let h;t[5]!==m||t[6]!==n||t[7]!==i.review.get?(h=async R=>{R.kind==="saved"&&(await n.invalidateQueries(i.review.get.pathFilter()),m())},t[5]=m,t[6]=n,t[7]=i.review.get,t[8]=h):h=t[8],c=i.review.editWalkthrough.mutationOptions({onSuccess:h}),t[0]=m,t[1]=n,t[2]=i.review.editWalkthrough,t[3]=i.review.get,t[4]=c}else c=t[4];const a=ee(c),r=(((M=a.data)==null?void 0:M.kind)==="rejected"?a.data.message:null)??((o=a.error)==null?void 0:o.message)??null;let d;t[9]!==a||t[10]!==A||t[11]!==u||t[12]!==f?(d=h=>{a.mutate({...A,segmentId:u,edit:{kind:"change-waypoint",waypointId:f,...h}})},t[9]=a,t[10]=A,t[11]=u,t[12]=f,t[13]=d):d=t[13];let g;return t[14]!==a.isPending||t[15]!==r||t[16]!==d?(g={isSaving:a.isPending,errorMessage:r,onSave:d},t[14]=a.isPending,t[15]=r,t[16]=d,t[17]=g):g=t[17],g},ae="Title",J="Reading",ne="Say what you changed in this code and what the change is for.",le="Core change",re="Mark this change as an important part of the code review. This helps the reviewer see where to look first.",U="Additional context (optional)",oe="Say why this change is important, or what the reviewer should check in it.",ge=A=>{const e=V.c(57),{reviewKey:m,segmentId:t,waypointId:u,legend:f,text:i,renderCodeLinkDialog:n,onClose:c}=A,a=k.useId(),x=k.useId(),[r,d]=k.useState(i.title),[g,M]=k.useState(i.reading),[o,h]=k.useState(i.coreChange!==null),[R,X]=k.useState(i.coreChange??"");let L;e[0]!==t||e[1]!==u?(L={segmentId:t,waypointId:u},e[0]=t,e[1]=u,e[2]=L):L=e[2];const l=ie(m,L,c);let p;e[3]!==R||e[4]!==l||e[5]!==o||e[6]!==g||e[7]!==r?(p=te(()=>{l.onSave({title:r,reading:g,coreChange:o?R:null})}),e[3]=R,e[4]=l,e[5]=o,e[6]=g,e[7]=r,e[8]=p):p=e[8];let v;e[9]!==a?(v=s.jsx("label",{htmlFor:a,className:"text-sm font-bold",children:ae}),e[9]=a,e[10]=v):v=e[10];let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=q=>{d(q.target.value)},e[11]=O):O=e[11];let N;e[12]!==r||e[13]!==a?(N=s.jsx(se,{id:a,value:r,onChange:O}),e[12]=r,e[13]=a,e[14]=N):N=e[14];let j;e[15]!==v||e[16]!==N?(j=s.jsxs("div",{className:"grid gap-1.5",children:[v,N]}),e[15]=v,e[16]=N,e[17]=j):j=e[17];let B,H;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("p",{"aria-hidden":"true",className:"text-sm font-bold",children:J}),H=s.jsx("p",{className:"text-sm text-muted-foreground",children:ne}),e[18]=B,e[19]=H):(B=e[18],H=e[19]);let C;e[20]!==n||e[21]!==i.reading?(C=s.jsxs("div",{className:"grid gap-1.5",children:[B,H,s.jsx(z,{label:J,value:i.reading,errorMessage:null,renderCodeLinkDialog:n,onChange:M})]}),e[20]=n,e[21]=i.reading,e[22]=C):C=e[22];let W;e[23]===Symbol.for("react.memo_cache_sentinel")?(W=q=>{h(q.target.checked)},e[23]=W):W=e[23];let b;e[24]!==x||e[25]!==o?(b=s.jsxs("label",{className:"flex items-center gap-2 text-sm font-bold",children:[s.jsx("input",{type:"checkbox","aria-describedby":x,checked:o,onChange:W}),le]}),e[24]=x,e[25]=o,e[26]=b):b=e[26];let y;e[27]!==x?(y=s.jsx("p",{id:x,className:"-mt-2 text-sm text-muted-foreground",children:re}),e[27]=x,e[28]=y):y=e[28];const F=!o;let P,D;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("p",{"aria-hidden":"true",className:"text-sm font-bold",children:U}),D=s.jsx("p",{className:"text-sm text-muted-foreground",children:oe}),e[29]=P,e[30]=D):(P=e[29],D=e[30]);const Q=i.coreChange??"";let E;e[31]!==n||e[32]!==Q?(E=s.jsx(z,{label:U,value:Q,errorMessage:null,renderCodeLinkDialog:n,onChange:X}),e[31]=n,e[32]=Q,e[33]=E):E=e[33];let T;e[34]!==F||e[35]!==E?(T=s.jsxs("div",{hidden:F,className:"grid gap-1.5",children:[P,D,E]}),e[34]=F,e[35]=E,e[36]=T):T=e[36];let w;e[37]!==l.errorMessage?(w=l.errorMessage===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:l.errorMessage}),e[37]=l.errorMessage,e[38]=w):w=e[38];let I;e[39]!==c?(I=s.jsx(Z,{type:"button",variant:"ghost",onClick:c,children:"Cancel"}),e[39]=c,e[40]=I):I=e[40];const $=l.isSaving?"Saving…":"Save";let S;e[41]!==l.isSaving||e[42]!==$?(S=s.jsx(Z,{type:"submit",disabled:l.isSaving,children:$}),e[41]=l.isSaving,e[42]=$,e[43]=S):S=e[43];let _;e[44]!==I||e[45]!==S?(_=s.jsxs("div",{className:"flex justify-end gap-2",children:[I,S]}),e[44]=I,e[45]=S,e[46]=_):_=e[46];let G;return e[47]!==f||e[48]!==b||e[49]!==y||e[50]!==T||e[51]!==w||e[52]!==p||e[53]!==_||e[54]!==j||e[55]!==C?(G=s.jsxs("form",{"aria-label":f,onSubmit:p,className:"grid gap-3",children:[j,C,b,y,T,w,_]}),e[47]=f,e[48]=b,e[49]=y,e[50]=T,e[51]=w,e[52]=p,e[53]=_,e[54]=j,e[55]=C,e[56]=G):G=e[56],G};export{ge as default};
@@ -0,0 +1 @@
1
+ import{c as X,h as ie,l as oe,j as s,r as G,af as re,Z as ee,ag as de,ah as te,s as ce,_ as me,I as fe,B as se,e as he,D as ue,b as ge,d as pe,f as xe,g as be}from"./index-DRndyOxR.js";import{T as Se}from"./index-DGsH5lbQ.js";const je="Loading the card…",ye=n=>{var d;const e=X.c(8),l=ie();let t;e[0]!==n||e[1]!==l.review.cardForm?(t=l.review.cardForm.queryOptions(n),e[0]=n,e[1]=l.review.cardForm,e[2]=t):t=e[2];let o;e[3]!==t?(o={...t,gcTime:0},e[3]=t,e[4]=o):o=e[4];const r=oe(o),f=r.isFetching?null:r.data??null,u=f===null?((d=r.error)==null?void 0:d.message)??je:null;let h;return e[5]!==f||e[6]!==u?(h={form:f,statusMessage:u},e[5]=f,e[6]=u,e[7]=h):h=e[7],h},ve="Modify a card",Ee="Write what the card says, and choose the rows it lists. Select lines in the code to add a row.",le="Label",ae="Description",Le="Rows",Ce="No rows yet. Select lines in the code, then choose Add row.",Ne="Kind",De="Add row",ne=n=>[...n].sort((e,l)=>e.lineStart-l.lineStart||e.lineEnd-l.lineEnd),we=n=>({...n,key:n.id}),Ie=(n,e)=>n.kindOptions.some(l=>l.value===e),Oe=n=>{const e=X.c(72),{reviewKey:l,form:t,isSaving:o,errorMessage:r,renderCodeLinkDialog:f,onSave:u,onClose:h}=n,d=G.useId(),c=G.useId(),[g,b]=G.useState(t.label),[C,v]=G.useState(t.description);let E;e[0]!==t.rows?(E=()=>ne(t.rows.map(we)),e[0]=t.rows,e[1]=E):E=e[1];const[i,L]=G.useState(E);let p;e[2]!==t.lineEnd||e[3]!==t.lineStart?(p={lineStart:t.lineStart,lineEnd:t.lineEnd},e[2]=t.lineEnd,e[3]=t.lineStart,e[4]=p):p=e[4];const[S,y]=G.useState(p),x=re(l,t.path);let N;e[5]===Symbol.for("react.memo_cache_sentinel")?(N=(m,a)=>{L(j=>j.map(U=>U.key===m?{...U,...a}:U))},e[5]=N):N=e[5];const Y=N;let q;e[6]!==t.defaultKind?(q=m=>{const a={...m,key:crypto.randomUUID(),id:null,type:t.defaultKind,label:"",name:te(m)};L(j=>ne([...j,a])),y(m)},e[6]=t.defaultKind,e[7]=q):q=e[7];const z=q;let D;e[8]!==C||e[9]!==g||e[10]!==u||e[11]!==i?(D=ce(()=>{u({label:g,description:C,rows:i.map(ke)})}),e[8]=C,e[9]=g,e[10]=u,e[11]=i,e[12]=D):D=e[12];let w;e[13]!==d?(w=s.jsx("label",{htmlFor:d,className:"text-sm font-bold",children:le}),e[13]=d,e[14]=w):w=e[14];let Q;e[15]===Symbol.for("react.memo_cache_sentinel")?(Q=m=>{b(m.target.value)},e[15]=Q):Q=e[15];let I;e[16]!==t.labelPlaceholder||e[17]!==g||e[18]!==d?(I=s.jsx(ee,{id:d,value:g,placeholder:t.labelPlaceholder,onChange:Q}),e[16]=t.labelPlaceholder,e[17]=g,e[18]=d,e[19]=I):I=e[19];let O;e[20]!==w||e[21]!==I?(O=s.jsxs("div",{className:"grid gap-1.5",children:[w,I]}),e[20]=w,e[21]=I,e[22]=O):O=e[22];let V;e[23]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx("p",{"aria-hidden":"true",className:"text-sm font-bold",children:ae}),e[23]=V):V=e[23];let k;e[24]!==t.description||e[25]!==f?(k=s.jsxs("div",{className:"grid gap-1.5",children:[V,s.jsx(Se,{label:ae,value:t.description,errorMessage:null,renderCodeLinkDialog:f,onChange:v})]}),e[24]=t.description,e[25]=f,e[26]=k):k=e[26];let A;e[27]!==c?(A=s.jsx("h3",{id:c,className:"text-sm font-bold",children:Le}),e[27]=c,e[28]=A):A=e[28];let R;e[29]!==i.length?(R=i.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:Ce}):null,e[29]=i.length,e[30]=R):R=e[30];let F;if(e[31]!==t||e[32]!==i){let m;e[34]!==t?(m=a=>s.jsxs("li",{className:"grid gap-1.5 rounded-md border border-input p-2",onFocusCapture:()=>{y({lineStart:a.lineStart,lineEnd:a.lineEnd})},children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(me,{label:`${Ne} of ${a.name}`,options:t.kindOptions,value:a.type,isLabelHidden:!0,className:"w-40 shrink-0",onChange:j=>{Ie(t,j)&&Y(a.key,{type:j})}}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground tabular-nums",children:te(a)}),s.jsx(fe,{icon:"delete",label:`Delete the row ${a.label===""?a.name:a.label}`,onClick:()=>{L(j=>j.filter(U=>U.key!==a.key))}})]}),s.jsx(ee,{value:a.label,"aria-label":`${le} of ${a.name}`,placeholder:a.name,onChange:j=>{Y(a.key,{label:j.target.value})}})]},a.key),e[34]=t,e[35]=m):m=e[35],F=i.map(m),e[31]=t,e[32]=i,e[33]=F}else F=e[33];let M;e[36]!==F?(M=s.jsx("ul",{className:"grid gap-2",children:F}),e[36]=F,e[37]=M):M=e[37];let B;e[38]!==c||e[39]!==A||e[40]!==R||e[41]!==M?(B=s.jsxs("section",{"aria-labelledby":c,className:"grid gap-2",children:[A,R,M]}),e[38]=c,e[39]=A,e[40]=R,e[41]=M,e[42]=B):B=e[42];let _;e[43]!==k||e[44]!==B||e[45]!==O?(_=s.jsxs("div",{className:"flex min-h-0 flex-col gap-4 overflow-y-auto pr-1",children:[O,k,B]}),e[43]=k,e[44]=B,e[45]=O,e[46]=_):_=e[46];let T;e[47]!==x.lines||e[48]!==x.statusMessage||e[49]!==S||e[50]!==t.path||e[51]!==t.waypoints||e[52]!==z?(T=s.jsx(de,{path:t.path,lines:x.lines,statusMessage:x.statusMessage,waypoints:t.waypoints,waypointOptions:"toggle-off",highlightButtonLabel:De,focusOn:S,onHighlightCode:z}),e[47]=x.lines,e[48]=x.statusMessage,e[49]=S,e[50]=t.path,e[51]=t.waypoints,e[52]=z,e[53]=T):T=e[53];let $;e[54]!==_||e[55]!==T?($=s.jsxs("div",{className:"grid min-h-0 grid-cols-[minmax(0,26rem)_minmax(0,1fr)] gap-4 overflow-hidden",children:[_,T]}),e[54]=_,e[55]=T,e[56]=$):$=e[56];let K;e[57]!==r?(K=r===null?s.jsx("span",{}):s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),e[57]=r,e[58]=K):K=e[58];let P;e[59]!==h?(P=s.jsx(se,{type:"button",variant:"ghost",onClick:h,children:"Cancel"}),e[59]=h,e[60]=P):P=e[60];const J=o?"Saving…":"Save";let H;e[61]!==o||e[62]!==J?(H=s.jsx(se,{type:"submit",disabled:o,children:J}),e[61]=o,e[62]=J,e[63]=H):H=e[63];let W;e[64]!==P||e[65]!==H?(W=s.jsxs(he,{children:[P,H]}),e[64]=P,e[65]=H,e[66]=W):W=e[66];let Z;return e[67]!==$||e[68]!==K||e[69]!==W||e[70]!==D?(Z=s.jsxs("form",{onSubmit:D,className:"contents",children:[$,K,W]}),e[67]=$,e[68]=K,e[69]=W,e[70]=D,e[71]=Z):Z=e[71],Z},Fe=n=>{const e=X.c(26),{reviewKey:l,change:t,renderCodeLinkDialog:o}=n,{segmentId:r,nodeId:f,isSaving:u,errorMessage:h,onSave:d,onClose:c}=t;let g;e[0]!==f||e[1]!==l||e[2]!==r?(g={...l,segmentId:r,nodeId:f},e[0]=f,e[1]=l,e[2]=r,e[3]=g):g=e[3];const{form:b,statusMessage:C}=ye(g);let v;e[4]!==c?(v=N=>{N||c()},e[4]=c,e[5]=v):v=e[5];const E=(b==null?void 0:b.title)??ve;let i;e[6]!==E?(i=s.jsx(ue,{children:E}),e[6]=E,e[7]=i):i=e[7];let L;e[8]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ge,{children:Ee}),e[8]=L):L=e[8];let p;e[9]!==i?(p=s.jsxs(pe,{children:[i,L]}),e[9]=i,e[10]=p):p=e[10];let S;e[11]!==h||e[12]!==b||e[13]!==u||e[14]!==c||e[15]!==d||e[16]!==o||e[17]!==l||e[18]!==C?(S=b===null?s.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:C}):s.jsx(Oe,{reviewKey:l,form:b,isSaving:u,errorMessage:h,renderCodeLinkDialog:o,onSave:d,onClose:c},b.nodeId),e[11]=h,e[12]=b,e[13]=u,e[14]=c,e[15]=d,e[16]=o,e[17]=l,e[18]=C,e[19]=S):S=e[19];let y;e[20]!==p||e[21]!==S?(y=s.jsxs(xe,{className:"h-[calc(100dvh-4rem)] grid-rows-[auto_minmax(0,1fr)_auto_auto] sm:max-w-[min(90rem,calc(100vw-4rem))]",children:[p,S]}),e[20]=p,e[21]=S,e[22]=y):y=e[22];let x;return e[23]!==v||e[24]!==y?(x=s.jsx(be,{open:!0,onOpenChange:v,children:y}),e[23]=v,e[24]=y,e[25]=x):x=e[25],x};function ke(n){const{id:e,type:l,label:t,lineStart:o,lineEnd:r}=n;return{id:e,type:l,label:t,lineStart:o,lineEnd:r}}export{Fe as default};
@@ -0,0 +1 @@
1
+ import{c as I,h as N,i as O,m as Q,r as k,j as u,_ as $,B as P,s as q}from"./index-DRndyOxR.js";import{T as D}from"./index-DGsH5lbQ.js";const H=(S,e,p)=>{var l,d;const s=I.c(17),i=N(),t=O();let r;if(s[0]!==p||s[1]!==t||s[2]!==i.review.editBlast||s[3]!==i.review.get){let c;s[5]!==p||s[6]!==t||s[7]!==i.review.get?(c=async m=>{m.kind==="saved"&&(await t.invalidateQueries(i.review.get.pathFilter()),p())},s[5]=p,s[6]=t,s[7]=i.review.get,s[8]=c):c=s[8],r=i.review.editBlast.mutationOptions({onSuccess:c}),s[0]=p,s[1]=t,s[2]=i.review.editBlast,s[3]=i.review.get,s[4]=r}else r=s[4];const a=Q(r),C=(((l=a.data)==null?void 0:l.kind)==="rejected"?a.data.message:null)??((d=a.error)==null?void 0:d.message)??null;let o;s[9]!==a||s[10]!==e||s[11]!==S?(o=c=>{a.mutate({...S,path:e,...c})},s[9]=a,s[10]=e,s[11]=S,s[12]=o):o=s[12];let g;return s[13]!==a.isPending||s[14]!==C||s[15]!==o?(g={isSaving:a.isPending,errorMessage:C,onSave:o},s[13]=a.isPending,s[14]=C,s[15]=o,s[16]=g):g=s[16],g},A=S=>{const e=I.c(38),{reviewKey:p,path:s,assessment:i,form:t,renderCodeLinkDialog:r,onClose:a}=S,[n,C]=k.useState(i.impactType),[o,g]=k.useState(i.impactReason),l=H(p,s,a);let d;if(e[0]!==t.choices||e[1]!==n){let y;e[3]!==n?(y=T=>T.value===n&&T.hasReason,e[3]=n,e[4]=y):y=e[4],d=t.choices.some(y),e[0]=t.choices,e[1]=n,e[2]=d}else d=e[2];const c=d;let m;e[5]!==l||e[6]!==o||e[7]!==n?(m=q(()=>{l.onSave({impactType:n,impactReason:o})}),e[5]=l,e[6]=o,e[7]=n,e[8]=m):m=e[8];const B=c?null:l.errorMessage;let f;e[9]!==t.choices?(f=y=>{const T=t.choices.find(F=>F.value===y);T!==void 0&&C(T.value)},e[9]=t.choices,e[10]=f):f=e[10];let v;e[11]!==t.choices||e[12]!==t.impactTypeLabel||e[13]!==n||e[14]!==B||e[15]!==f?(v=u.jsx($,{label:t.impactTypeLabel,options:t.choices,value:n,errorMessage:B,onChange:f}),e[11]=t.choices,e[12]=t.impactTypeLabel,e[13]=n,e[14]=B,e[15]=f,e[16]=v):v=e[16];const M=!c,L=c?l.errorMessage:null;let h;e[17]!==i.impactReason||e[18]!==t.impactReasonLabel||e[19]!==r||e[20]!==L?(h=u.jsx(D,{label:t.impactReasonLabel,value:i.impactReason,errorMessage:L,renderCodeLinkDialog:r,onChange:g}),e[17]=i.impactReason,e[18]=t.impactReasonLabel,e[19]=r,e[20]=L,e[21]=h):h=e[21];let x;e[22]!==M||e[23]!==h?(x=u.jsx("div",{hidden:M,children:h}),e[22]=M,e[23]=h,e[24]=x):x=e[24];let R;e[25]!==a?(R=u.jsx(P,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),e[25]=a,e[26]=R):R=e[26];const E=l.isSaving?"Saving…":"Save";let b;e[27]!==l.isSaving||e[28]!==E?(b=u.jsx(P,{type:"submit",disabled:l.isSaving,children:E}),e[27]=l.isSaving,e[28]=E,e[29]=b):b=e[29];let j;e[30]!==R||e[31]!==b?(j=u.jsxs("div",{className:"flex justify-end gap-2",children:[R,b]}),e[30]=R,e[31]=b,e[32]=j):j=e[32];let w;return e[33]!==j||e[34]!==m||e[35]!==v||e[36]!==x?(w=u.jsxs("form",{onSubmit:m,className:"grid gap-3",children:[v,x,j]}),e[33]=j,e[34]=m,e[35]=v,e[36]=x,e[37]=w):w=e[37],w};export{A as default};