@capagents/forgeqe 2.7.9 → 2.8.1

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 (50) hide show
  1. package/dist/forgeqe.js +1540 -1538
  2. package/dist/web/assets/{Agent-DAmFqxps.js → Agent-C79V2lzx.js} +1 -1
  3. package/dist/web/assets/{ApiTests-Dy5e1FRb.js → ApiTests-CS4zVVYu.js} +1 -1
  4. package/dist/web/assets/{Chat-B9YRYCxS.js → Chat-Xj5qngpm.js} +1 -1
  5. package/dist/web/assets/{CommandPalette-DwMar_Iu.js → CommandPalette-BIQBYhRU.js} +1 -1
  6. package/dist/web/assets/{Cost-BrcGorrw.js → Cost-rVA7nqHn.js} +1 -1
  7. package/dist/web/assets/{Data-UfYSw0hz.js → Data-DEVQ3Ah7.js} +1 -1
  8. package/dist/web/assets/{Evidence-C4Fgnexh.js → Evidence-D4dxe22a.js} +1 -1
  9. package/dist/web/assets/{Explore-DdOb7zHM.js → Explore-CHy55eiu.js} +1 -1
  10. package/dist/web/assets/{Features-CjFDX2tY.js → Features-CDHLD4lX.js} +1 -1
  11. package/dist/web/assets/{Flags-DD9xAV5Q.js → Flags-ClVEB7XK.js} +1 -1
  12. package/dist/web/assets/{Flaky-tUhmLORb.js → Flaky-DH1wEWoT.js} +1 -1
  13. package/dist/web/assets/{ForceGraph-BkCKxs6n.js → ForceGraph-LS1p4FN7.js} +1 -1
  14. package/dist/web/assets/{Impact-BXj3OMrd.js → Impact-BW0Evigt.js} +1 -1
  15. package/dist/web/assets/{Jobs-C8dfw1J1.js → Jobs-ChuJTxCx.js} +1 -1
  16. package/dist/web/assets/{KindPage-BcQ2nfZv.js → KindPage-PUuhBSTu.js} +1 -1
  17. package/dist/web/assets/Migration-DtWKdiUG.js +2 -0
  18. package/dist/web/assets/{Product-C83kJY6B.js → Product-C9n4W4L9.js} +1 -1
  19. package/dist/web/assets/{Production-DfL5Yj1U.js → Production-BoeOK-VW.js} +1 -1
  20. package/dist/web/assets/{Quality-BaZyObTf.js → Quality-DnZz9jQa.js} +1 -1
  21. package/dist/web/assets/{Readiness-BxHhuk9Q.js → Readiness-jh_T1BAB.js} +1 -1
  22. package/dist/web/assets/{Record-Bw8MC6Dz.js → Record-Kale1Him.js} +1 -1
  23. package/dist/web/assets/{Regression-Aic1N8Gr.js → Regression-BigK1A4M.js} +1 -1
  24. package/dist/web/assets/{Reports-DeQGZfWB.js → Reports-BAPY8SbD.js} +1 -1
  25. package/dist/web/assets/{Response-C19yhnDb.js → Response-CSf-Alvf.js} +1 -1
  26. package/dist/web/assets/{RunDiff-CyMF1t9P.js → RunDiff-45Gqgmi_.js} +1 -1
  27. package/dist/web/assets/{Runs-B_g-sDgC.js → Runs-C3TBvkMF.js} +1 -1
  28. package/dist/web/assets/{TestCases-CrTHYBXw.js → TestCases-F4dRMoJ4.js} +1 -1
  29. package/dist/web/assets/{TestData-DQrAv-DE.js → TestData-B4rcRR4A.js} +1 -1
  30. package/dist/web/assets/{TestDebt-BchIrLE2.js → TestDebt-CYrE481Z.js} +1 -1
  31. package/dist/web/assets/Tosca-DVAT9uFj.js +2 -0
  32. package/dist/web/assets/{WhatsNew-BWBXb0zY.js → WhatsNew-tvRHzxqZ.js} +1 -1
  33. package/dist/web/assets/{dataParts-CJhaJ4YM.js → dataParts-DmFAGLeZ.js} +1 -1
  34. package/dist/web/assets/{families-RmlYg4bl.js → families-D_YnXNTR.js} +1 -1
  35. package/dist/web/assets/frame-LE6IccxB.js +4 -0
  36. package/dist/web/assets/{index-kBLPh-15.js → index-DhR7aomZ.js} +5 -5
  37. package/dist/web/assets/{logos-ih0wOR3C.js → logos-DgqBK3qe.js} +1 -1
  38. package/dist/web/assets/{parts-Bopek2vd.js → parts-DJxun6mX.js} +1 -1
  39. package/dist/web/assets/{productParts-DGJotZr6.js → productParts-_qbTBR4z.js} +1 -1
  40. package/dist/web/assets/{qualityParts-BBFohD9x.js → qualityParts-4he1MuhN.js} +1 -1
  41. package/dist/web/assets/{segmented--5Wlq3Yo.js → segmented-D009ouN6.js} +1 -1
  42. package/dist/web/assets/{thread-VZReeAAU.js → thread-N69k7QNW.js} +1 -1
  43. package/dist/web/assets/{usePageChat-DDqwOiDj.js → usePageChat-Df0JW9Sh.js} +1 -1
  44. package/dist/web/index.html +2 -2
  45. package/package.json +1 -1
  46. package/py/forgeqe_tosca/tsu.py +43 -2
  47. package/py/forgeqe_tosca/vendored.py +4 -3
  48. package/dist/web/assets/Migration-B6E26p2C.js +0 -2
  49. package/dist/web/assets/Tosca-CaWZrjr4.js +0 -2
  50. package/dist/web/assets/frame-BlZmJqKb.js +0 -4
@@ -1,2 +0,0 @@
1
- import{$i as e,At as t,Cr as n,En as r,It as i,Mt as a,Nt as o,Sn as s,Wn as c,Xa as l,Xi as u,_t as d,an as f,bi as p,cr as m,da as h,dt as g,en as _,ft as v,ga as y,hi as b,ho as x,ji as S,kt as C,ma as w,mr as T,mt as E,nt as D,on as O,ot as k,po as A,pt as j,r as M,st as N,t as ee,tt as P,vi as te,vo as F,vt as I,wa as ne,wn as L,xi as R,yr as z,yt as B,zi as V}from"./frame-BlZmJqKb.js";import{c as H,o as re,r as U,u as W}from"./index-kBLPh-15.js";import{t as G}from"./segmented--5Wlq3Yo.js";import{n as ie}from"./families-RmlYg4bl.js";import{a as ae,c as oe,i as se,n as ce,o as K,r as le,s as q,t as ue}from"./logos-ih0wOR3C.js";import{a as de,c as fe,d as pe,f as J,i as me,l as he,n as ge,o as _e,p as ve,r as Y,s as ye,t as be,u as xe}from"./parts-Bopek2vd.js";var X=F(x(),1),Z=A(),Se={py:`python`,ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,java:`java`,cs:`csharp`,rb:`ruby`};function Ce({path:e}){let t=le[Se[e.split(`.`).pop()?.toLowerCase()||``]||``];return t?(0,Z.jsx)(t,{"aria-hidden":`true`,width:15,height:15,className:`flex-none`}):(0,Z.jsx)(T,{size:15,"aria-hidden":`true`,className:`flex-none text-muted`})}function we(e){let t={name:``,path:``,dirs:new Map,files:[]};for(let n of e){let e=n.path.split(`/`),r=t;for(let t of e.slice(0,-1))r.dirs.has(t)||r.dirs.set(t,{name:t,path:r.path?`${r.path}/${t}`:t,dirs:new Map,files:[]}),r=r.dirs.get(t);r.files.push(n)}let n=e=>{for(let[t,r]of[...e.dirs]){let i=n(r);for(;i.files.length===0&&i.dirs.size===1;){let e=[...i.dirs.values()][0];i={...e,name:`${i.name}/${e.name}`}}e.dirs.set(t,i)}return e};return n(t)}function Te({files:e,selected:t,onSelect:i,label:a}){let o=(0,X.useMemo)(()=>we(e),[e]),[s,c]=(0,X.useState)(new Set),l=e=>c(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):new Set([...t,e])),u=(e,a)=>(0,Z.jsxs)(Z.Fragment,{children:[[...e.dirs.values()].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>{let t=!s.has(e.path);return(0,Z.jsxs)(`li`,{role:`treeitem`,"aria-expanded":t,"aria-selected":!1,className:`list-none`,children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>l(e.path),className:`flex h-8 w-full cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-1.5 text-left text-[13px] text-ink hover:bg-surface-strong`,children:[(0,Z.jsx)(r,{size:14,"aria-hidden":`true`,className:y(`flex-none text-muted transition-transform duration-150`,t&&`rotate-90`)}),t?(0,Z.jsx)(n,{size:15,"aria-hidden":`true`,className:`flex-none text-accent-fg`}):(0,Z.jsx)(z,{size:15,"aria-hidden":`true`,className:`flex-none text-accent-fg`}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.name})]}),t&&(0,Z.jsx)(`ul`,{role:`group`,className:`m-0 ml-[13px] border-l border-line-soft p-0 pl-2`,children:u(e,a+1)})]},e.path)}),[...e.files].sort((e,t)=>e.path.localeCompare(t.path)).map(e=>{let n=t===e.id;return(0,Z.jsx)(`li`,{role:`treeitem`,"aria-selected":n,className:`list-none`,children:(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>i?.(e.id),"data-tip":e.title,className:y(`flex h-8 w-full items-center gap-2 rounded-[6px] border-0 px-1.5 text-left text-[13px]`,i?`cursor-pointer`:`cursor-default`,n?`bg-accent-soft font-medium text-ink`:`bg-transparent text-ink-2 hover:bg-surface-strong hover:text-ink`),children:[(0,Z.jsx)(`span`,{className:`w-[14px] flex-none`,"aria-hidden":`true`}),(0,Z.jsx)(Ce,{path:e.path}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.path.slice(e.path.lastIndexOf(`/`)+1)}),e.tail]})},e.id)})]});return(0,Z.jsx)(`ul`,{role:`tree`,"aria-label":a,className:`m-0 flex flex-col p-0`,children:u(o,0)})}function Ee({title:e,side:t,file:n,lang:r,text:i,missing:a}){let o=(i??``).split(`
2
- `),s=(0,X.useMemo)(()=>i?W(i,r):null,[i,r]);return(0,Z.jsxs)(`figure`,{className:`m-0 flex min-h-0 min-w-0 flex-col overflow-hidden rounded-[12px] card border`,children:[(0,Z.jsxs)(`figcaption`,{className:`flex min-h-10 items-center gap-2 border-b border-line-soft pr-1 pl-3`,children:[(0,Z.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[0.04em] text-muted uppercase`,children:t}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[12px] text-ink-2`,"data-tip":n,children:n||e}),i&&(0,Z.jsx)(re,{text:i,label:`Copy ${n||t}`})]}),i?(0,Z.jsxs)(`div`,{className:`flex min-h-[260px] flex-1 overflow-auto font-mono text-[12.5px] leading-[1.6]`,children:[(0,Z.jsx)(`pre`,{"aria-hidden":`true`,className:`m-0 min-h-full flex-none self-stretch border-r border-line-soft px-3 py-3 text-right text-muted select-none`,children:o.map((e,t)=>`${t+1}\n`).join(``)}),(0,Z.jsx)(`pre`,{className:`m-0 min-w-0 flex-1 px-3 py-3`,children:(0,Z.jsx)(`code`,{className:`hljs`,children:s})})]}):(0,Z.jsx)(`p`,{className:`m-0 flex min-h-[260px] flex-1 items-center justify-center px-4 text-center text-sm text-muted`,children:a||`Nothing to show.`})]})}function De({id:e,plan:t,result:n,initial:r}){let i=new Map((n?.units||[]).map(e=>[e.id,e.status])),a=[...t.units.filter(e=>e.kind!==`setup`).map(e=>({unit:e.id,kind:ge[e.kind],source:e.source,target:e.target,status:i.get(e.id)})),...t.copies.map((e,t)=>({unit:`c${t}`,kind:`Data`,source:e.source,target:e.target,data:!0}))],[o,s]=(0,X.useState)(``),[c,u]=(0,X.useState)(r||a.find(e=>e.kind===`Test`)?.unit||a[0]?.unit||``),[d,f]=(0,X.useState)(null),[p,m]=(0,X.useState)(``);(0,X.useEffect)(()=>{c&&(m(``),l.pair(e,c).then(f,e=>m(e.message)))},[e,c,n?.units.length,n?.endedAt]);let h=a.filter(e=>!o||`${e.source} ${e.target}`.toLowerCase().includes(o.toLowerCase())),_=a.filter(e=>e.status===`migrated`).length,v=a.filter(e=>e.status===`failed`||e.status===`blocked`).length;return(0,Z.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)] gap-4 @4xl:h-[calc(var(--screen)-320px)] @4xl:min-h-[540px] @4xl:grid-cols-[240px_minmax(0,1fr)]`,children:[(0,Z.jsxs)(`nav`,{"aria-label":`Files`,className:`flex max-h-[360px] min-h-0 min-w-0 flex-col gap-2 overflow-hidden rounded-[14px] card border p-3 @4xl:max-h-none`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-0.5 px-1`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:`Files`}),(0,Z.jsxs)(`span`,{className:`text-[12px] text-muted`,children:[_,` migrated · `,v,` failed · `,a.length,` files`]})]}),(0,Z.jsx)(g,{id:`find-a-file`,label:`Find a file`,value:o,onChange:s,className:`max-w-none flex-none`}),(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:h.length?(0,Z.jsx)(Te,{label:`Files`,selected:c,onSelect:u,files:h.map(e=>({id:e.unit,path:e.target,title:e.source?`from ${e.source}`:void 0,tail:(0,Z.jsx)(`span`,{role:`img`,"aria-label":e.status?fe[e.status].label:e.data?`Copied`:`Waiting`,className:y(`size-2 flex-none rounded-full`,e.status===`migrated`?`bg-pass`:e.status===`failed`?`bg-fail`:e.status===`blocked`?`bg-warn`:e.status===`written`?`bg-line-strong`:`bg-line`)})}))}):(0,Z.jsx)(`p`,{className:`m-0 px-2 py-3 text-[13px] text-muted`,children:`No file matches.`})})]}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col gap-3`,children:[p&&(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:p}),(0,Z.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)] gap-3 @3xl:grid-cols-2`,children:[(0,Z.jsx)(Ee,{title:`Source`,side:`Source`,file:d?.source?.path,lang:d?.source?.lang||`plaintext`,text:d?.source?.text,missing:d&&!d.source?`This file is made new for the target.`:void 0}),(0,Z.jsx)(Ee,{title:`Target`,side:`Migrated`,file:d?.target.path,lang:d?.target.lang||`plaintext`,text:d?.target.text,missing:d&&!d.target.exists?`Not written yet.`:void 0})]})]})]})}var Oe=[`prepare`,`setup`,`migrate`,`validate`,`fix`,`review`];function ke(e){if(e.job?.running)return{label:e.job.kind===`verify`?`Validating`:e.job.kind===`fix`?`Fixing`:`Running`,tone:`running`};let t=e.result;return t?.status===`running`?{label:t.stage===`validate`?`Validating`:t.stage===`fix`?`Fixing`:`Running`,tone:`running`}:t?me[t.status]:e.job?.last?{label:`Did not start`,tone:`fail`}:e.confirmed?{label:`Confirmed`,tone:`neutral`}:he[e.plan.feasibility.verdict]}var Q=e=>e.slice(e.lastIndexOf(`/`)+1);function Ae({d:e,planView:t}){let n=e.result;if(!n)return(0,Z.jsx)(Z.Fragment,{children:t});let r=new Map(n.units.map(e=>[e.id,e])),i=e.plan.units.filter(e=>e.kind===`test`),a=n.units.filter(e=>e.kind===`test`&&e.status===`migrated`).length,o=e.plan.units.filter(e=>e.kind!==`setup`),s=n.units.filter(e=>e.kind!==`setup`&&(e.status===`migrated`||e.status===`written`)).length,c=n.units.filter(e=>e.status===`failed`||e.status===`blocked`).length,l=e.plan.source.stack,[u,...f]=e.plan.target.id.split(`-`);return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Z.jsxs)(_e,{children:[(0,Z.jsx)(Y,{label:`Tests passing`,value:`${a} / ${i.length}`,tone:a===i.length&&i.length?`text-pass`:void 0}),(0,Z.jsx)(Y,{label:`Files migrated`,value:`${s} / ${o.length}`}),(0,Z.jsx)(Y,{label:`Need attention`,value:c,tone:c?`text-fail`:void 0}),(0,Z.jsx)(Y,{label:n.status===`running`?`Running for`:`Took`,value:pe(n.status===`running`?Date.now()-Date.parse(n.startedAt):n.ms)})]}),n.notes&&(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:n.notes}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)] items-start gap-5 @5xl:grid-cols-[minmax(0,1fr)_320px]`,children:[(0,Z.jsx)(P,{label:`Files`,placeholder:`Find a file`,empty:`No files.`,head:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`th`,{className:`py-2 pr-3 pl-3 font-medium`,children:`File`}),(0,Z.jsx)(`th`,{className:`py-2 pr-3 font-medium`,children:`Status`}),(0,Z.jsx)(`th`,{className:`hidden py-2 pr-3 font-medium @3xl:table-cell`,children:`Note`})]}),children:e.plan.units.map(e=>{let t=r.get(e.id),n=t?fe[t.status]:null;return(0,Z.jsxs)(`tr`,{className:k,children:[(0,Z.jsxs)(`td`,{className:D,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:e.kind===`setup`?`Project set-up`:Q(e.target)}),(0,Z.jsx)(`span`,{className:`block text-[12px] text-muted`,children:e.source?`from ${Q(e.source)}`:e.target})]}),(0,Z.jsx)(`td`,{className:y(D,`whitespace-nowrap`),children:n?(0,Z.jsx)(d,{tone:n.tone,children:n.label}):(0,Z.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Waiting`})}),(0,Z.jsx)(`td`,{className:y(D,`hidden text-[13px] text-ink-2 @3xl:table-cell`),children:(0,Z.jsx)(`span`,{className:`line-clamp-2`,children:t?.problems?.[0]||t?.reason||``})})]},e.id)})}),(0,Z.jsxs)(`aside`,{"aria-label":`Details`,className:`flex flex-col gap-4 rounded-[14px] card border p-5 text-sm`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:`From`}),(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[l&&(0,Z.jsx)(q,{framework:l.framework,language:l.language}),e.plan.source.title]}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-ink-2`,children:[(0,Z.jsx)(K,{kind:e.origin.kind,label:e.origin.label,size:15}),(0,Z.jsxs)(`span`,{className:`truncate`,"data-tip":e.origin.label,children:[J(e.origin.label),e.origin.branch?` · ${e.origin.branch}`:``]})]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line-soft pt-4`,children:[(0,Z.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:`To`}),(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,Z.jsx)(q,{framework:u,language:f.join(`-`)}),e.plan.target.title]}),(0,Z.jsx)(`span`,{className:`font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,children:e.targetPath})]}),(0,Z.jsxs)(`dl`,{className:`m-0 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 border-t border-line-soft pt-4`,children:[(0,Z.jsx)(`dt`,{className:`text-muted`,children:`Started`}),(0,Z.jsx)(`dd`,{className:`m-0 text-right`,children:ve(n.startedAt)}),n.model&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`dt`,{className:`text-muted`,children:`Agent`}),(0,Z.jsx)(`dd`,{className:`m-0 truncate text-right`,"data-tip":n.model,children:n.model})]}),n.reverted.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`dt`,{className:`text-muted`,children:`Put back`}),(0,Z.jsxs)(`dd`,{className:`m-0 text-right`,children:[n.reverted.length,` edits outside the target`]})]})]})]})]})]})}function je({d:e,events:t,picked:n,setPicked:r,busy:a,working:o,onFix:s,onCheck:c}){let[l,u]=(0,X.useState)(``),d=(0,X.useRef)(null),f=e.result?.validation?.tests||[],m=f.filter(e=>!e.ok),h=[];for(let t of e.result?.fixes||[])t.auto||h.push({who:`you`,text:t.note?`${t.note}`:`Fix ${Q(t.target)}`,at:t.at,detail:t.note?`for ${Q(t.target)}`:void 0}),h.push({who:`agent`,tone:t.ok?`ok`:`fail`,at:t.at,text:t.ok?`${Q(t.target)} passes now${t.attempts>1?` (${t.attempts} tries)`:``}. ${t.reason||``}`.trim():`I could not make ${Q(t.target)} pass. ${t.problems?.[0]||t.reason||``}`.trim(),detail:t.auto?`after the first check`:void 0});let g=o?t.filter(e=>e.stage===`fix`&&(e.kind===`agent`||e.kind===`ok`||e.kind===`fail`||e.kind===`info`)).slice(-6):[];(0,X.useEffect)(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[h.length,g.length]);let _=()=>{let e=[...n];e.length&&(s(e,l.trim()),u(``))},v=e=>{let t=new Set(n);t.has(e)?t.delete(e):t.add(e),r(t)};return(0,Z.jsxs)(`section`,{"aria-label":`Migration agent`,className:`flex h-[560px] min-h-0 min-w-0 flex-col overflow-hidden rounded-[14px] card border @5xl:h-full`,children:[(0,Z.jsxs)(`header`,{className:`flex items-center gap-3 border-b border-line-soft px-4 py-3`,children:[(0,Z.jsx)(i,{agent:`forgeqe-migrate`,px:28,working:o,decorative:!0}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:`Migration agent`}),(0,Z.jsx)(`span`,{className:`text-[12px] text-muted`,children:o?`Working on it…`:m.length?`${m.length} test${m.length===1?``:`s`} to fix`:`Every test passes`})]}),(0,Z.jsxs)(w,{size:`sm`,variant:`ghost`,disabled:a,onClick:c,"data-tip":`Run every migrated test again`,children:[(0,Z.jsx)(p,{"aria-hidden":`true`}),`Run tests`]})]}),(0,Z.jsxs)(`ol`,{ref:d,"aria-live":`polite`,className:`m-0 flex min-h-0 flex-1 list-none flex-col gap-3 overflow-y-auto bg-surface-muted p-4`,children:[!h.length&&!g.length&&(0,Z.jsxs)(`li`,{className:`flex flex-col gap-2 rounded-[12px] bg-bg p-3 text-[13px] text-ink-2`,children:[(0,Z.jsx)(`span`,{children:`I fix migrated tests that fail. Pick the tests below and tell me what you know, or just send.`}),m.length>0&&(0,Z.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>s(m.map(e=>e.id),``),className:`self-start rounded-[8px] border-0 bg-surface-strong px-2.5 py-1.5 text-[13px] font-medium text-ink hover:bg-line disabled:opacity-50`,children:`Fix all failing tests`})]}),h.map((e,t)=>(0,Z.jsxs)(`li`,{className:y(`flex max-w-[92%] flex-col gap-1`,e.who===`you`?`self-end items-end`:`self-start`),children:[(0,Z.jsxs)(`span`,{className:y(`rounded-[12px] px-3 py-2 text-[13px] leading-relaxed [overflow-wrap:anywhere]`,e.who===`you`?`bg-accent text-accent-ink`:e.tone===`fail`?`border border-fail-soft bg-bg text-ink`:`bg-bg text-ink`),children:[e.who===`agent`&&(0,Z.jsx)(`span`,{className:y(`mr-1 font-semibold`,e.tone===`ok`?`text-pass`:`text-fail`),children:e.tone===`ok`?`✓`:`✗`}),e.text]}),(0,Z.jsxs)(`span`,{className:`text-[11px] text-muted`,children:[e.detail?`${e.detail} · `:``,U(e.at)]})]},t)),g.map((e,t)=>(0,Z.jsxs)(`li`,{className:`flex max-w-[92%] items-start gap-2 self-start rounded-[12px] bg-bg px-3 py-2 text-[13px] text-ink-2`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:y(`flex-none`,e.kind===`ok`?`text-pass`:e.kind===`fail`?`text-fail`:`text-muted`),children:e.kind===`ok`?`✓`:e.kind===`fail`?`✗`:`•`}),(0,Z.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:e.text})]},`live-${t}`))]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2.5 border-t border-line-soft p-3`,children:[f.length>0&&(0,Z.jsx)(`div`,{role:`group`,"aria-label":`Tests to fix`,className:`flex flex-wrap gap-1.5`,children:f.map(e=>(0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":n.has(e.id),onClick:()=>v(e.id),className:y(`inline-flex min-h-7 items-center gap-1.5 rounded-full border px-2.5 text-[12px]`,n.has(e.id)?`border-accent bg-accent-soft text-ink`:`border-line-soft bg-bg text-ink-2 hover:bg-surface-muted`),children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:y(`size-1.5 rounded-full`,e.ok?`bg-pass`:`bg-fail`)}),Q(e.target)]},e.id))}),(0,Z.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Z.jsx)(E,{"aria-label":`Message to the agent`,value:l,rows:2,maxLength:2e3,placeholder:n.size?`What should change? (optional)`:`Pick a test above first`,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!a&&n.size&&(e.preventDefault(),_())},className:`min-h-[44px] flex-1 resize-none`}),(0,Z.jsx)(w,{variant:`primary`,size:`icon`,"aria-label":`Send to the agent`,disabled:a||!n.size,onClick:_,children:(0,Z.jsx)(S,{"aria-hidden":`true`})})]})]})]})}var Me=`@5xl:h-[calc(var(--screen)-320px)] @5xl:min-h-[540px]`;function Ne({d:e,events:t,busy:n,working:r,onFix:i,onCheck:a,onCompare:o}){let s=e.result?.validation?.tests||[],l=e.result?.fixes||[],u=s.filter(e=>!e.ok).map(e=>e.id).join(`,`),[f,p]=(0,X.useState)(()=>s.find(e=>!e.ok)?.id||s[0]?.id||``),[m,g]=(0,X.useState)(()=>new Set(s.filter(e=>!e.ok).map(e=>e.id)));(0,X.useEffect)(()=>g(new Set(u?u.split(`,`):[])),[u]);let _=s.find(e=>e.id===f),v=_&&[...l].reverse().find(e=>e.id===_.id);return s.length?(0,Z.jsxs)(`div`,{className:y(`grid grid-cols-[minmax(0,1fr)] gap-5 @5xl:grid-cols-[minmax(0,1fr)_380px]`,Me),children:[(0,Z.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col gap-4`,children:[(0,Z.jsx)(`div`,{className:`relative flex-none overflow-x-auto rounded-[12px] card border`,children:(0,Z.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,Z.jsx)(`thead`,{className:`bg-surface-strong text-left text-[12px] text-muted`,children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsxs)(`th`,{className:`px-4 py-2.5 font-medium`,children:[`Test `,(0,Z.jsxs)(`span`,{className:`font-normal`,children:[`· `,s.filter(e=>e.ok).length,` of `,s.length,` pass`]})]}),(0,Z.jsx)(`th`,{className:`px-3 py-2.5 font-medium`,children:`Result`}),(0,Z.jsx)(`th`,{className:`hidden px-3 py-2.5 font-medium @2xl:table-cell`,children:`Kept from the source`}),(0,Z.jsx)(`th`,{className:`hidden px-3 py-2.5 text-right font-medium @3xl:table-cell`,children:`Time`})]})}),(0,Z.jsx)(`tbody`,{children:s.map(e=>{let t=[...l].reverse().find(t=>t.id===e.id);return(0,Z.jsxs)(`tr`,{onClick:()=>p(e.id),"aria-selected":f===e.id,className:y(`cursor-pointer border-t border-line-soft`,f===e.id?`bg-accent-soft`:`hover:bg-surface-muted`),children:[(0,Z.jsxs)(`td`,{className:`px-4 py-2.5`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:()=>p(e.id),className:`cursor-pointer border-0 bg-transparent p-0 text-left font-medium text-ink`,children:Q(e.target)}),t&&(0,Z.jsx)(`span`,{className:y(`block text-[12px]`,t.ok?`text-pass`:`text-muted`),children:t.ok?`Fixed by the agent`:`The agent could not fix it`})]}),(0,Z.jsx)(`td`,{className:`px-3 py-2.5 whitespace-nowrap`,children:(0,Z.jsx)(d,{tone:e.ok?`pass`:`fail`,children:e.ok?`Passes`:`Fails`})}),(0,Z.jsxs)(`td`,{className:`hidden px-3 py-2.5 text-[13px] whitespace-nowrap text-ink-2 @2xl:table-cell`,children:[(0,Z.jsxs)(`span`,{className:e.after.tests<e.before.tests?`text-fail`:void 0,children:[e.after.tests,`/`,e.before.tests,` tests`]}),` · `,(0,Z.jsxs)(`span`,{className:e.after.assertions<e.before.assertions?`text-warn`:void 0,children:[e.after.assertions,`/`,e.before.assertions,` checks`]})]}),(0,Z.jsx)(`td`,{className:`hidden px-3 py-2.5 text-right text-[13px] text-muted tabular-nums @3xl:table-cell`,children:e.ms?pe(e.ms):`–`})]},e.id)})})]})}),_&&(0,Z.jsxs)(`section`,{"aria-label":`${Q(_.target)} details`,className:`flex min-h-[260px] flex-1 flex-col overflow-hidden rounded-[12px] card border`,children:[(0,Z.jsxs)(`header`,{className:`flex flex-wrap items-center gap-2 border-b border-line-soft px-4 py-2.5`,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:Q(_.target)}),(0,Z.jsx)(d,{tone:_.ok?`pass`:`fail`,children:_.ok?`Passes`:_.exitCode===null&&_.ms?`Timed out`:`Fails`}),_.source&&(0,Z.jsxs)(`span`,{className:`text-[12.5px] text-muted`,children:[`from `,Q(_.source)]}),(0,Z.jsx)(`span`,{className:`flex-1`}),(0,Z.jsxs)(w,{size:`sm`,variant:`ghost`,onClick:()=>o(_.id),children:[(0,Z.jsx)(c,{"aria-hidden":`true`}),`Compare`]}),!_.ok&&(0,Z.jsxs)(w,{size:`sm`,disabled:n,onClick:()=>g(new Set([_.id])),children:[(0,Z.jsx)(h,{"aria-hidden":`true`}),`Fix`]})]}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-auto bg-surface-muted px-4 py-3`,children:[_.problems.length>0&&(0,Z.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:_.problems.join(` `)}),v&&(0,Z.jsxs)(`p`,{className:y(`m-0 text-[13px]`,v.ok?`text-pass`:`text-ink-2`),children:[v.ok?`Fixed by the agent`:`The agent could not fix it`,v.reason?`: ${v.reason}`:`.`]}),_.command&&(0,Z.jsxs)(`code`,{className:`block font-mono text-[12px] text-muted`,children:[`$ `,_.command]}),(0,Z.jsx)(`pre`,{className:`m-0 flex-1 font-mono text-[12.5px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:_.output||(_.ok?`${_.after.tests} test${_.after.tests===1?``:`s`} passed in ${pe(_.ms)}.`:`No output.`)})]})]})]}),(0,Z.jsx)(je,{d:e,events:t,picked:m,setPicked:g,busy:n,working:r,onFix:i,onCheck:a})]}):(0,Z.jsx)(I,{center:!0,className:`py-6`,children:e.result?`The tests are checked once every file is migrated.`:`Start the migration first.`})}var Pe={ok:{mark:`✓`,cls:`text-pass`},fail:{mark:`✗`,cls:`text-fail`},info:{mark:`•`,cls:`text-muted`},agent:{mark:`•`,cls:`text-accent-fg`},tool:{mark:`·`,cls:`text-muted`}};function Fe({events:e,running:t}){let n=(0,X.useRef)(null);(0,X.useEffect)(()=>{t&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e.length,t]);let r=e.filter(e=>e.kind!==`tool`);return(0,Z.jsxs)(`ol`,{ref:n,"aria-live":t?`polite`:void 0,"aria-label":`Activity`,className:`m-0 flex max-h-[60vh] list-none flex-col overflow-y-auto rounded-[12px] card border p-0`,children:[r.map((e,t)=>(0,Z.jsxs)(`li`,{className:`flex gap-3 border-b border-line-soft px-4 py-2 text-[13px] last:border-b-0`,children:[(0,Z.jsx)(`span`,{className:`w-[64px] flex-none text-[12px] text-muted tabular-nums`,children:new Date(e.ts).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:y(`w-3 flex-none text-center`,Pe[e.kind].cls),children:Pe[e.kind].mark}),(0,Z.jsx)(`span`,{className:y(`min-w-0 flex-1 [overflow-wrap:anywhere]`,e.kind===`fail`?`text-fail`:e.kind===`ok`?`text-ink`:`text-ink-2`),children:e.text})]},t)),!r.length&&(0,Z.jsx)(`li`,{className:`px-4 py-8 text-center text-sm text-muted`,children:`Nothing yet.`})]})}function Ie({id:e,plan:t}){let[n,r]=(0,X.useState)(null),[i,s]=(0,X.useState)(``),[c,u]=(0,X.useState)(`overview`),[m,h]=(0,X.useState)(),[g,_]=(0,X.useState)([]),[v,y]=(0,X.useState)(null),[b,x]=(0,X.useState)(!1),S=(0,X.useRef)(0),C=(0,X.useCallback)(()=>{l.detail(e).then(e=>{r(e),s(``)},e=>s(e.message)),l.events(e,S.current).then(e=>{e.next<S.current?(S.current=0,_([])):(S.current=e.next,e.events.length&&_(t=>[...t,...e.events].slice(-2e3)))},()=>{})},[e]);(0,X.useEffect)(C,[C]);let T=!!(n?.job?.running||n?.result?.status===`running`);(0,X.useEffect)(()=>{if(!T)return;let e=setInterval(C,1500);return()=>clearInterval(e)},[T,C]);let E=async e=>{x(!0),s(``);try{r(await e()),setTimeout(C,800)}catch(e){s(e.message)}finally{x(!1)}};if(!n)return i?(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:i}):(0,Z.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`});let D=ke(n),k=xe(n.plan,n.result),A=n.result,j=(A?.validation?.tests||[]).filter(e=>!e.ok).length,M=[{id:`overview`,label:`Overview`},{id:`tests`,label:`Tests`,n:A?.validation?`${A.validation.tests.length-j}/${A.validation.tests.length}`:void 0,tone:j?`text-fail`:void 0},{id:`compare`,label:`Compare`},{id:`activity`,label:`Activity`}];return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`a`,{href:o(`migration`),className:`inline-flex items-center gap-1.5 self-start text-sm`,children:[(0,Z.jsx)(f,{size:16,"aria-hidden":`true`}),`Migration`]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 @3xl:flex-row @3xl:items-start`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsxs)(`h2`,{className:`m-0 flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[20px] leading-snug font-semibold tracking-[-0.01em]`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[n.plan.source.stack&&(0,Z.jsx)(q,{framework:n.plan.source.stack.framework,language:n.plan.source.stack.language,size:22}),n.plan.source.title]}),(0,Z.jsx)(O,{size:18,"aria-hidden":`true`,className:`text-muted`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:`to`}),(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,Z.jsx)(q,{framework:n.plan.target.id.split(`-`)[0],language:n.plan.target.id.split(`-`).slice(1).join(`-`),size:20}),n.plan.target.title]})]}),(0,Z.jsxs)(`p`,{className:`m-0 flex flex-wrap items-center gap-1.5 text-sm text-muted`,children:[(0,Z.jsx)(K,{kind:n.origin.kind,label:n.origin.label,size:15}),(0,Z.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:J(n.origin.label)}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,Z.jsxs)(`span`,{children:[`into `,(0,Z.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:n.plan.target.dir})]})]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(d,{tone:D.tone,children:D.label}),T?(0,Z.jsxs)(w,{variant:`danger`,disabled:b,onClick:()=>void E(()=>l.stop(e)),children:[(0,Z.jsx)(V,{fill:`currentColor`,"aria-hidden":`true`}),`Stop`]}):A?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(w,{variant:`ghost`,onClick:()=>l.report(e).then(e=>y(e.text),()=>y(``)),children:`Report`}),(0,Z.jsxs)(w,{disabled:b,onClick:()=>void E(()=>l.verify(e)),children:[(0,Z.jsx)(p,{"aria-hidden":`true`}),`Check again`]})]}):null]})]}),A&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-[12px] card border px-3 py-2.5 @xl:gap-4 @xl:px-4`,children:[(0,Z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Z.jsx)(de,{ids:Oe,states:A.stages})}),T&&(0,Z.jsxs)(`span`,{className:`flex-none text-[13px] font-semibold tabular-nums text-accent-fg`,"aria-label":`${Math.round(k)}% done`,children:[Math.round(k),`%`]})]}),i&&(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:i}),(0,Z.jsx)(ye,{tabs:M,tab:c,onTab:u,label:`Migration`}),(0,Z.jsxs)(`div`,{role:`tabpanel`,id:`mpanel-${c}`,"aria-labelledby":`mtab-${c}`,className:`flex min-w-0 flex-col gap-4`,children:[c===`overview`&&(0,Z.jsx)(Ae,{d:n,planView:t(n)}),c===`tests`&&(0,Z.jsx)(Ne,{d:n,events:g,busy:b||T,working:T,onFix:(t,n)=>void E(()=>l.fix(e,t,n)),onCheck:()=>void E(()=>l.verify(e)),onCompare:e=>(h(e),u(`compare`))}),c===`compare`&&(0,Z.jsx)(De,{id:e,plan:n.plan,result:A,initial:m}),c===`activity`&&(0,Z.jsx)(Fe,{events:g,running:T})]}),(0,Z.jsx)(a,{open:v!==null,onClose:()=>y(null),wide:!0,title:`Report`,description:`migrate.md for ${n.plan.id}`,footer:(0,Z.jsx)(w,{onClick:()=>y(null),children:`Close`}),children:v?(0,Z.jsx)(H,{text:v}):(0,Z.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No report yet.`})})]})}var Le=[{id:`git`,label:`Git`},{id:`folder`,label:`Folder`},{id:`upload`,label:`Upload`},{id:`paste`,label:`Paste`},{id:`project`,label:`This project`}],Re=[`Source`,`Target`,`Instructions`,`Review`],ze=[`Keep one page object per page, in pages/.`,`Read the base URL from BASE_URL.`,`Keep test names as they are.`],Be=[`Where the tests are`,`Framework and language`,`Your rules, optional`,`Check and start`];function Ve({at:e,reached:t,onGo:n}){return(0,Z.jsx)(`nav`,{"aria-label":`Steps`,children:(0,Z.jsx)(`ol`,{className:`m-0 flex list-none items-center gap-2 p-0`,children:Re.map((r,i)=>{let a=i<=t,o=i===e,c=i<t&&!o;return(0,Z.jsxs)(`li`,{className:y(`flex items-center gap-2`,i<Re.length-1&&`flex-1`),children:[(0,Z.jsxs)(`button`,{type:`button`,disabled:!a,"aria-current":o?`step`:void 0,onClick:()=>n(i),"aria-label":r,"data-tip":Be[i],className:y(`inline-flex min-h-8 flex-none items-center gap-2 rounded-[8px] border-0 bg-transparent px-1 text-[13px] whitespace-nowrap`,a&&!o?`cursor-pointer hover:bg-surface-strong`:``),children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:y(`inline-flex size-6 flex-none items-center justify-center rounded-full text-[11px] font-semibold tabular-nums`,c?`bg-pass text-white`:o?`bg-accent text-accent-ink`:`border border-line bg-bg text-muted`),children:c?(0,Z.jsx)(s,{size:13,strokeWidth:3}):i+1}),(0,Z.jsx)(`span`,{className:y(o?`font-medium text-ink`:a?`text-ink-2`:`text-muted`,!o&&`hidden @xl:inline`),children:r})]}),i<Re.length-1&&(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`h-0.5 min-w-4 flex-1 overflow-hidden rounded-full bg-line @xl:min-w-8`,children:(0,Z.jsx)(`span`,{className:y(`block h-full rounded-full bg-pass transition-[width] duration-500`,i<t?`w-full`:`w-0`)})})]},r)})})})}function $({id:e,label:t,help:n,children:r}){return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Z.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium`,children:t}),r,n&&(0,Z.jsx)(`span`,{className:`text-[13px] text-muted`,children:n})]})}function He({busy:e,onBack:t,next:n,onNext:r,disabled:i,aside:a}){return(0,Z.jsxs)(`div`,{className:`sticky bottom-0 flex flex-wrap items-center gap-3 border-t border-line-soft bg-bg py-3`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 text-[13px]`,children:a}),t&&(0,Z.jsx)(w,{variant:`ghost`,disabled:e,onClick:t,children:`Back`}),(0,Z.jsx)(w,{variant:`primary`,disabled:e||i,onClick:r,children:n})]})}function Ue({d:e}){let t=e.counts,n=[`${t.tests} test file${t.tests===1?``:`s`}`,`${t.support} support file${t.support===1?``:`s`}`,...t.features?[`${t.features} feature file${t.features===1?``:`s`}`]:[],...t.data?[`${t.data} data file${t.data===1?``:`s`}`]:[]];return(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[12px] bg-surface-muted px-4 py-3 text-sm`,children:[e.stack?(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-2 font-medium`,children:[(0,Z.jsx)(q,{framework:e.stack.framework,language:e.stack.language}),e.title]}):(0,Z.jsx)(d,{tone:`warn`,children:`Framework not detected`}),(0,Z.jsx)(`span`,{className:`text-ink-2`,children:n.join(` · `)}),t.skipped>0&&(0,Z.jsxs)(`span`,{className:`text-muted`,children:[`· `,t.skipped,` left out (links, large files)`]})]})}async function We(e,t,n){let r=[],i=0,a=null,o=0,s=async()=>{r.length&&(a=await l.files(e,r),o+=r.length,n(o),r=[],i=0)};for(let e of t){let t=e.webkitRelativePath||``,n=t&&t.split(`/`).slice(1).join(`/`)||e.name,a=new Uint8Array(await e.arrayBuffer()),o=``;for(let e=0;e<a.length;e+=32768)o+=String.fromCharCode(...a.subarray(e,e+32768));let c=btoa(o);i+c.length>8388608&&await s(),r.push({path:n,data:c}),i+=c.length}return await s(),a}var Ge=e=>(e.webkitRelativePath||e.name).split(`/`).some(e=>e.startsWith(`.`)||e===`node_modules`);function Ke({view:e,kind:t,setKind:r,src:i,setSrc:a,from:o,setFrom:s,stack:c,setStack:f,found:p,setFound:h}){let[g,_]=(0,X.useState)(``),[b,x]=(0,X.useState)(``),[S,C]=(0,X.useState)(null),[T,D]=(0,X.useState)(``),[O,k]=(0,X.useState)(e.credentials),[A,M]=(0,X.useState)(null),[N,ee]=(0,X.useState)(``),[P,F]=(0,X.useState)([{path:``,text:``}]),[I,L]=(0,X.useState)(``),[R,z]=(0,X.useState)(``),[B,V]=(0,X.useState)(``),H=(0,X.useRef)(null),re=(0,X.useRef)(null);(0,X.useEffect)(()=>{H.current?.setAttribute(`webkitdirectory`,``)},[t,i]);let U=i?.workspace,W=async(e,t)=>{L(e),z(``),V(``);try{await t()}catch(e){z(e.message)}finally{L(``)}},G=e=>{a(e),s(`.`),h(e.discovery)};(0,X.useEffect)(()=>{if(t!==`project`)return;let e=setTimeout(()=>l.discover(void 0,o||`.`).then(h,()=>h(null)),300);return()=>clearTimeout(e)},[t,o,h]);let ie=e=>{let t=e.filter(e=>!Ge(e));if(!t.length)return z(`Nothing to send: every file is hidden or a dependency.`);W(`upload`,async()=>{let n=e[0],r=await l.source({kind:`upload`,label:n?.webkitRelativePath?n.webkitRelativePath.split(`/`)[0]:`${t.length} files`});await We(r.workspace.id,t,e=>V(`Sending ${e} of ${t.length} files…`)),G(await l.finish(r.workspace.id))})},le=t===`project`||!!U?.ready;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Where the tests come from`,className:`flex w-fit max-w-full gap-1 overflow-x-auto rounded-[10px] bg-surface-strong p-1`,children:Le.map(e=>(0,Z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t===e.id,onClick:()=>{e.id!==t&&(r(e.id),a(null),h(null),z(``),s(e.id===`project`?``:`.`))},className:y(`inline-flex min-h-9 flex-none cursor-pointer items-center gap-2 rounded-[7px] border-0 px-3 text-sm font-medium`,t===e.id?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[(0,Z.jsx)(se,{logo:ae[e.id].Logo,icon:ae[e.id].Icon,size:16}),e.label]},e.id))}),R&&(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:R}),U?.ready?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-[12px] card border px-4 py-3`,children:[(0,Z.jsx)(K,{kind:U.kind,label:U.label,size:22}),(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 text-sm`,children:[(0,Z.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:J(U.label)}),U.branch&&(0,Z.jsxs)(`span`,{className:`text-muted`,children:[` · `,U.branch]}),(0,Z.jsxs)(`span`,{className:`text-muted`,children:[` · `,U.files,` files`]})]}),(0,Z.jsx)(d,{tone:`pass`,children:`Ready`}),(0,Z.jsx)(w,{variant:`ghost`,size:`sm`,onClick:()=>(a(null),h(null)),children:`Change`})]}):t===`git`?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsx)($,{id:`mig-url`,label:`Repository URL`,help:(0,Z.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-3 gap-y-1`,children:[`Works with `,ce.map(e=>(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,Z.jsx)(se,{logo:e.Logo,size:14}),e.name]},e.name)),` and any git server over https or ssh.`]}),children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsxs)(`span`,{className:`relative min-w-0 flex-[1_1_300px]`,children:[(0,Z.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2`,children:(0,Z.jsx)(se,{logo:oe(g).Logo,size:18})}),(0,Z.jsx)(v,{id:`mig-url`,value:g,spellCheck:!1,maxLength:500,placeholder:`https://github.com/org/ui-tests.git`,onChange:e=>(_(e.target.value),C(null)),className:`w-full pl-10`})]}),(0,Z.jsx)(w,{disabled:!!I||!g.trim(),onClick:()=>void W(`test`,async()=>{let e=await l.testRepository(g.trim(),T||void 0);C(e.branches),!b&&e.head&&x(e.head),V(`Connected · ${e.branches.length} branch${e.branches.length===1?``:`es`}`)}),children:I===`test`?`Testing…`:`Test connection`})]})}),(0,Z.jsxs)(`div`,{className:`grid gap-4 @xl:grid-cols-2`,children:[(0,Z.jsx)($,{id:`mig-branch`,label:`Branch`,children:S?.length?(0,Z.jsx)(j,{id:`mig-branch`,value:b,onChange:e=>x(e.target.value),children:S.map(e=>(0,Z.jsx)(`option`,{value:e,children:e},e))}):(0,Z.jsx)(v,{id:`mig-branch`,value:b,spellCheck:!1,maxLength:200,placeholder:`Default branch`,onChange:e=>x(e.target.value)})}),(0,Z.jsx)($,{id:`mig-token`,label:`Access token`,help:A?void 0:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>M({name:`GIT_TOKEN`,value:``}),className:`cursor-pointer border-0 bg-transparent p-0 text-[13px] text-accent-fg underline`,children:`Add a token`}),children:(0,Z.jsxs)(j,{id:`mig-token`,value:T,onChange:e=>D(e.target.value),children:[(0,Z.jsx)(`option`,{value:``,children:`None (public, or ssh)`}),O.map(e=>(0,Z.jsx)(`option`,{value:e,children:e},e))]})})]}),A&&(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 rounded-[12px] bg-surface-muted p-3`,children:[(0,Z.jsx)($,{id:`mig-token-name`,label:`Name`,children:(0,Z.jsx)(v,{id:`mig-token-name`,value:A.name,spellCheck:!1,maxLength:64,onChange:e=>M({...A,name:e.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,`_`)}),className:`w-[180px]`})}),(0,Z.jsx)($,{id:`mig-token-value`,label:`Token`,children:(0,Z.jsx)(v,{id:`mig-token-value`,type:`password`,autoComplete:`off`,value:A.value,onChange:e=>M({...A,value:e.target.value}),className:`w-[260px] max-w-full`})}),(0,Z.jsx)(w,{disabled:!!I||!A.name||!A.value,onClick:()=>void W(`token`,async()=>{await ne.saveSecrets({[A.name]:A.value}),k([...new Set([...O,A.name])].sort()),D(A.name),M(null)}),children:`Save`}),(0,Z.jsx)(w,{variant:`ghost`,onClick:()=>M(null),children:`Cancel`}),(0,Z.jsx)(`span`,{className:`w-full text-[12.5px] text-muted`,children:`Kept in ForgeQE's credential store, never in the URL or on this page.`})]}),(0,Z.jsx)(`div`,{children:(0,Z.jsx)(w,{variant:`primary`,disabled:!!I||!g.trim(),onClick:()=>void W(`clone`,async()=>G(await l.source({kind:`git`,url:g.trim(),...b?{branch:b}:{},...T?{tokenVar:T}:{}}))),children:I===`clone`?`Cloning…`:`Clone`})})]}):t===`folder`?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsx)($,{id:`mig-folder`,label:`Folder path`,help:`Copied first; the folder itself is never changed.`,children:(0,Z.jsx)(v,{id:`mig-folder`,value:N,spellCheck:!1,maxLength:1e3,placeholder:`/home/me/projects/shop-ui-tests`,onChange:e=>ee(e.target.value)})}),(0,Z.jsx)(`div`,{children:(0,Z.jsx)(w,{variant:`primary`,disabled:!!I||!N.trim(),onClick:()=>void W(`copy`,async()=>G(await l.source({kind:`folder`,folder:N.trim()}))),children:I===`copy`?`Copying…`:`Use this folder`})})]}):t===`upload`?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-3 rounded-[14px] border border-dashed border-line px-6 py-10 text-center`,children:[(0,Z.jsx)(`p`,{className:`m-0 text-sm text-ink-2`,children:`Choose a folder of tests, or some files.`}),(0,Z.jsx)(`input`,{ref:H,type:`file`,multiple:!0,hidden:!0,onChange:e=>e.target.files&&ie([...e.target.files])}),(0,Z.jsx)(`input`,{ref:re,type:`file`,multiple:!0,hidden:!0,onChange:e=>e.target.files&&ie([...e.target.files])}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[(0,Z.jsxs)(w,{variant:`primary`,disabled:!!I,onClick:()=>H.current?.click(),children:[(0,Z.jsx)(n,{"aria-hidden":`true`}),`Choose a folder`]}),(0,Z.jsxs)(w,{disabled:!!I,onClick:()=>re.current?.click(),children:[(0,Z.jsx)(m,{"aria-hidden":`true`}),`Choose files`]})]})]}):t===`paste`?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[P.map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(v,{"aria-label":`File ${t+1} name`,value:e.path,spellCheck:!1,maxLength:300,placeholder:t?`pages/LoginPage.java`:`tests/LoginTest.java`,onChange:e=>F(P.map((n,r)=>r===t?{...n,path:e.target.value}:n)),className:`max-w-[360px]`}),P.length>1&&(0,Z.jsx)(w,{variant:`icon`,size:`icon`,"aria-label":`Remove file ${t+1}`,onClick:()=>F(P.filter((e,n)=>n!==t)),children:(0,Z.jsx)(u,{"aria-hidden":`true`})})]}),(0,Z.jsx)(E,{"aria-label":`File ${t+1} code`,value:e.text,rows:7,spellCheck:!1,placeholder:`Paste the code`,onChange:e=>F(P.map((n,r)=>r===t?{...n,text:e.target.value}:n)),className:`font-mono`})]},t)),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsxs)(w,{variant:`ghost`,onClick:()=>F([...P,{path:``,text:``}]),children:[(0,Z.jsx)(te,{"aria-hidden":`true`}),`Add a file`]}),(0,Z.jsx)(`span`,{className:`flex-1`}),(0,Z.jsx)(w,{variant:`primary`,disabled:!!I||P.some(e=>!e.path.trim()||!e.text.trim()),onClick:()=>void W(`paste`,async()=>{let e=await l.source({kind:`paste`});await l.files(e.workspace.id,P.map(e=>({path:e.path.trim(),text:e.text}))),G(await l.finish(e.workspace.id))}),children:I===`paste`?`Adding…`:`Use this code`})]})]}):null,B&&!R&&(0,Z.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:B}),le&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`grid gap-4 @xl:grid-cols-2`,children:[(0,Z.jsx)($,{id:`mig-from`,label:`Tests folder`,children:t===`project`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(v,{id:`mig-from`,list:`mig-folders`,value:o,spellCheck:!1,maxLength:300,placeholder:`Whole project`,onChange:e=>s(e.target.value)}),(0,Z.jsx)(`datalist`,{id:`mig-folders`,children:e.folders.map(e=>(0,Z.jsx)(`option`,{value:e},e))})]}):(0,Z.jsxs)(j,{id:`mig-from`,value:o||`.`,onChange:e=>(s(e.target.value),U&&l.discover(U.id,e.target.value).then(h,()=>{})),children:[(0,Z.jsx)(`option`,{value:`.`,children:`All of it`}),(i?.folders||[]).map(e=>(0,Z.jsx)(`option`,{value:e,children:e},e))]})}),(0,Z.jsx)($,{id:`mig-stack`,label:`Framework`,children:(0,Z.jsxs)(j,{id:`mig-stack`,value:c,onChange:e=>f(e.target.value),children:[(0,Z.jsx)(`option`,{value:``,children:p?.stack?`${p.title} (detected)`:`Detect`}),e.sources.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.title},e.id))]})})]}),p&&(0,Z.jsx)(Ue,{d:p})]})]})}function qe({on:e,onPick:t,logo:n,title:r,sub:i,label:a}){return(0,Z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":e,"aria-label":a,onClick:t,className:y(`flex min-h-[72px] min-w-0 cursor-pointer items-center gap-3 rounded-[12px] border px-3.5 py-3 text-left transition-colors`,e?`border-accent bg-accent-soft ring-1 ring-accent`:`border-line-soft bg-bg hover:border-line hover:bg-surface-muted`),children:[(0,Z.jsx)(`span`,{className:`inline-flex size-9 flex-none items-center justify-center rounded-[10px] bg-surface-muted`,children:n}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium text-ink`,children:r}),i&&(0,Z.jsx)(`span`,{className:`truncate text-[12px] text-muted`,children:i})]})]})}var Je={playwright:`Microsoft`,cypress:`JavaScript only`,webdriverio:`WebDriver and BiDi`,selenium:`WebDriver`};function Ye({view:e,to:t,setTo:n,other:r,setOther:i,into:a,setInto:o,only:s,setOnly:c}){let l=e=>e.split(`-`)[0],u=e=>e.split(`-`).slice(1).join(`-`),d=[...new Map(e.targets.map(e=>[l(e.id),e.framework])).entries()],f=r===null?l(t):``,p=e.targets.filter(e=>l(e.id)===f);return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,Z.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2.5 border-0 p-0`,children:[(0,Z.jsx)(`legend`,{className:`mb-2.5 text-sm font-medium`,children:`Framework`}),(0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Framework`,className:`grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5`,children:[d.map(([r,a])=>{let o=ue[r];return(0,Z.jsx)(qe,{on:f===r,onPick:()=>(i(null),n((e.targets.find(e=>l(e.id)===r&&u(e.id)===u(t))||e.targets.find(e=>l(e.id)===r)).id)),logo:o?(0,Z.jsx)(o,{width:22,height:22,"aria-hidden":`true`}):null,title:a,sub:Je[r],label:a},r)}),(0,Z.jsx)(qe,{on:r!==null,onPick:()=>i(r??``),logo:(0,Z.jsx)(te,{size:18,"aria-hidden":`true`,className:`text-ink-2`}),title:`Other`,sub:`Type the framework`,label:`Other framework`})]})]}),r===null?(0,Z.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2.5 border-0 p-0`,children:[(0,Z.jsx)(`legend`,{className:`mb-2.5 text-sm font-medium`,children:`Language`}),(0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Language`,className:`grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5`,children:p.map(e=>{let r=le[u(e.id)];return(0,Z.jsx)(qe,{on:t===e.id,onPick:()=>n(e.id),logo:r?(0,Z.jsx)(r,{width:22,height:22,"aria-hidden":`true`}):null,title:e.language,sub:e.title.includes(`(`)&&e.title.slice(e.title.indexOf(`(`)+1,-1).replace(e.language,``).replace(/^,\s*/,``)||void 0,label:e.language},e.id)})})]}):(0,Z.jsx)($,{id:`mig-other`,label:`Which framework and language?`,help:`ForgeQE checks it against what it can run, and says so before anything starts.`,children:(0,Z.jsx)(v,{id:`mig-other`,value:r,maxLength:120,autoFocus:!0,placeholder:`Playwright with Java, WebdriverIO TypeScript…`,onChange:e=>i(e.target.value)})}),(0,Z.jsxs)(`div`,{className:`grid gap-4 @2xl:grid-cols-2`,children:[(0,Z.jsx)($,{id:`mig-into`,label:`Output folder`,help:`A new folder. Empty: named after the source and the target.`,children:(0,Z.jsx)(v,{id:`mig-into`,value:a,spellCheck:!1,maxLength:300,placeholder:`tests-playwright`,onChange:e=>o(e.target.value)})}),(0,Z.jsx)($,{id:`mig-only`,label:`Only some tests (optional)`,help:`A pattern, such as checkout/** or **/*Login*.`,children:(0,Z.jsx)(v,{id:`mig-only`,value:s,spellCheck:!1,maxLength:200,placeholder:`All tests`,onChange:e=>c(e.target.value)})})]})]})}function Xe({view:e,kind:t,src:n,found:r,to:i,other:a,instructions:o}){let s=e.targets.find(e=>e.id===i),c=(e,t)=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-b border-line-soft py-3.5 first:pt-0 last:border-b-0 last:pb-0`,children:[(0,Z.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:e}),(0,Z.jsx)(`div`,{className:`text-sm`,children:t})]});return(0,Z.jsxs)(`aside`,{"aria-label":`Summary`,className:`flex flex-col rounded-[14px] card border p-5`,children:[c(`Source`,n?.workspace?.ready||t===`project`&&r?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(K,{kind:n?.workspace?.kind||`project`,label:n?.workspace?.label,size:18}),(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:n?.workspace?J(n.workspace.label):`This project`})]}):(0,Z.jsx)(`span`,{className:`text-muted`,children:`Not picked yet`})),c(`Tests found`,r?.stack?(0,Z.jsxs)(`span`,{className:`flex flex-col gap-1`,children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,Z.jsx)(q,{framework:r.stack.framework,language:r.stack.language}),r.title]}),(0,Z.jsxs)(`span`,{className:`text-[13px] text-ink-2`,children:[r.counts.tests,` test files · `,r.counts.support,` support files`]})]}):(0,Z.jsx)(`span`,{className:`text-muted`,children:`–`})),c(`Target`,a===null?s?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,Z.jsx)(q,{framework:s.id.split(`-`)[0],language:s.id.split(`-`).slice(1).join(`-`)}),s.title]}):(0,Z.jsx)(`span`,{className:`text-muted`,children:`–`}):(0,Z.jsx)(`span`,{className:a.trim()?`font-medium`:`text-muted`,children:a.trim()||`Type it in`})),c(`Instructions`,o.trim()?(0,Z.jsx)(`span`,{className:`line-clamp-3 text-ink-2`,children:o.trim()}):(0,Z.jsx)(`span`,{className:`text-muted`,children:`None`}))]})}function Ze({view:e,review:t,onStart:n}){let[r,i]=(0,X.useState)(0),[a,o]=(0,X.useState)(0),[s,c]=(0,X.useState)(`git`),[u,d]=(0,X.useState)(null),[f,p]=(0,X.useState)(`.`),[m,h]=(0,X.useState)(``),[g,v]=(0,X.useState)(null),[y,x]=(0,X.useState)(e.targets[0]?.id||``),[S,C]=(0,X.useState)(null),[w,T]=(0,X.useState)(``),[D,O]=(0,X.useState)(``),[k,A]=(0,X.useState)(``),[j,M]=(0,X.useState)(null),[N,ee]=(0,X.useState)(!1),[P,F]=(0,X.useState)(!1),[I,ne]=(0,X.useState)(``);(0,X.useEffect)(()=>{M(null),ee(!1),o(e=>Math.min(e,2))},[s,u,f,m,D,y,S,w,k]);let L=e=>{i(e),o(t=>Math.max(t,e)),ne(``)},R=s===`project`||!!u?.workspace?.ready,z=async()=>{F(!0),ne(``);try{let e=await l.plan({...s!==`project`&&u?.workspace?{workspace:u.workspace.id}:{},...f.trim()&&f!==`.`?{from:f.trim()}:{},...m?{stack:m}:{},...S===null?{to:y}:{to:``,toText:S.trim()},...w.trim()?{into:w.trim()}:{},...D.trim()?{only:D.trim()}:{},...k.trim()?{instructions:k.trim()}:{}});M(e),L(3)}catch(e){ne(e.message)}finally{F(!1)}},B=j?.plan,V=B?.feasibility.findings.some(e=>e.level===`limit`),H=B?.feasibility.verdict===`blocked`;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,Z.jsx)(Ve,{at:r,reached:a,onGo:e=>!P&&(e<3||j)&&i(e)}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)] items-start gap-6 @5xl:grid-cols-[minmax(0,1fr)_280px]`,children:[(0,Z.jsxs)(`section`,{"aria-labelledby":`mig-step`,className:`flex min-w-0 flex-col gap-5`,children:[(0,Z.jsx)(`h2`,{id:`mig-step`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em]`,children:[`Where are the tests?`,`What should they become?`,`Anything the agent should know?`,`Review and start`][r]}),I&&(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:I}),r===0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ke,{view:e,kind:s,setKind:c,src:u,setSrc:d,from:f,setFrom:p,stack:m,setStack:h,found:g,setFound:v}),(0,Z.jsx)(He,{busy:P,next:`Continue`,onNext:()=>L(1),disabled:!R})]}),r===1&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ye,{view:e,to:y,setTo:x,other:S,setOther:C,into:w,setInto:T,only:D,setOnly:O}),(0,Z.jsx)(He,{busy:P,onBack:()=>i(0),next:`Continue`,onNext:()=>L(2),disabled:S===null?!y:!S.trim()})]}),r===2&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)($,{id:`mig-instructions`,label:`Instructions (optional)`,help:`Style and structure for the new code. Every test and check is kept either way.`,children:(0,Z.jsx)(E,{id:`mig-instructions`,value:k,rows:6,maxLength:4e3,placeholder:`Page objects go in pages/, one class per page.`,onChange:e=>A(e.target.value)})}),(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:ze.map(e=>(0,Z.jsxs)(`button`,{type:`button`,disabled:k.includes(e),onClick:()=>A(k.trim()?`${k.trim()}\n${e}`:e),className:`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[8px] border-0 bg-surface-strong px-2.5 text-[13px] text-ink hover:bg-line disabled:cursor-default disabled:opacity-50`,children:[(0,Z.jsx)(te,{size:13,"aria-hidden":`true`}),e]},e))}),(0,Z.jsx)(He,{busy:P,onBack:()=>i(1),next:P?`Checking…`:`Check the plan`,onNext:()=>void z(),aside:(0,Z.jsx)(`span`,{className:`text-muted`,children:`Nothing is changed yet.`})})]}),r===3&&B&&(0,Z.jsxs)(Z.Fragment,{children:[t(B,N,ee),(0,Z.jsx)(He,{busy:P,onBack:()=>i(2),next:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(_,{icon:b,size:15}),`Start migration`]}),disabled:H||V&&!N,onNext:()=>n(j,!!V&&N),aside:(0,Z.jsx)(`span`,{className:`text-muted`,children:H?`Change what is not possible first.`:V&&!N?`Accept the limits to start.`:`Runs in the background.`})})]})]}),(0,Z.jsx)(`div`,{className:`@5xl:sticky @5xl:top-6`,children:(0,Z.jsx)(Xe,{view:e,kind:s,src:u,found:g,to:y,other:S,instructions:k})})]})]})}function Qe({children:e,wide:t}){return(0,Z.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,Z.jsx)(M,{}),(0,Z.jsx)(`main`,{className:y(ee,`@container flex-auto gap-5`,t?`max-w-[1480px]`:`max-w-[1180px]`),children:e})]})}function $e({action:e}){return(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-6 gap-y-2`,children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(C,{pixel:B.migration,size:`lg`}),(0,Z.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Migration`})]}),(0,Z.jsx)(G,{label:`Migration`,links:ie,current:`migration`}),(0,Z.jsx)(`span`,{className:`flex-1`}),e]})}function et({error:e}){return e?(0,Z.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:e}):null}function tt({title:e,children:n}){let[r,i]=(0,X.useState)(!1),a=(0,X.useId)();return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(!r),className:`inline-flex min-h-8 cursor-pointer items-center gap-1.5 self-start rounded-[8px] border-0 bg-transparent px-1 text-sm font-medium text-ink hover:bg-surface-strong`,children:[(0,Z.jsx)(L,{size:15,"aria-hidden":`true`,className:y(`transition-transform`,r&&`rotate-180`)}),e]}),(0,Z.jsx)(t,{open:r,id:a,children:n})]})}function nt({finding:e}){let t=e.hits||[],n=e.files?.length||0;if(!t.length)return n?(0,Z.jsxs)(`span`,{className:`text-muted`,children:[` (`,n,` file`,n===1?``:`s`,`)`]}):null;let r=n-new Set(t.map(e=>e.file)).size;return(0,Z.jsxs)(`details`,{className:`mt-1 text-[13px]`,children:[(0,Z.jsxs)(`summary`,{className:`cursor-pointer text-muted hover:text-ink`,children:[`Found in `,n||t.length,` file`,(n||t.length)===1?``:`s`]}),(0,Z.jsxs)(`ul`,{className:`m-0 mt-1.5 flex list-none flex-col gap-1.5 p-0`,children:[t.map(e=>(0,Z.jsxs)(`li`,{className:`min-w-0`,children:[(0,Z.jsxs)(`span`,{className:`font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,children:[e.file,`:`,e.line]}),(0,Z.jsx)(`code`,{className:`mt-0.5 block overflow-x-auto rounded-[8px] bg-bg px-2 py-1 font-mono text-[12px] whitespace-pre text-ink`,children:e.code})]},`${e.file}:${e.line}`)),r>0&&(0,Z.jsxs)(`li`,{className:`text-muted`,children:[`and `,r,` more file`,r===1?``:`s`]})]})]})}function rt({plan:t,accepted:n,onAccept:r}){let i=t.feasibility.findings.filter(e=>e.level===`blocker`),a=t.feasibility.findings.filter(e=>e.level===`limit`),o=t.units.filter(e=>e.kind===`test`).length,s=t.units.filter(e=>e.kind===`support`).length;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Z.jsxs)(`dl`,{className:`m-0 grid gap-x-6 gap-y-2.5 rounded-[14px] card border px-5 py-4 text-sm @xl:grid-cols-[auto_1fr]`,children:[(0,Z.jsx)(`dt`,{className:`text-muted`,children:`From`}),(0,Z.jsxs)(`dd`,{className:`m-0 [overflow-wrap:anywhere]`,children:[t.source.title,(0,Z.jsxs)(`span`,{className:`text-muted`,children:[` `,`· `,t.workspace?J(t.workspace.label):`this project`,t.source.dir===`.`?``:`/${t.source.dir}`]})]}),(0,Z.jsx)(`dt`,{className:`text-muted`,children:`To`}),(0,Z.jsxs)(`dd`,{className:`m-0`,children:[t.target.title,(0,Z.jsxs)(`span`,{className:`text-muted`,children:[` · `,t.target.dir]})]}),(0,Z.jsx)(`dt`,{className:`text-muted`,children:`Files`}),(0,Z.jsxs)(`dd`,{className:`m-0`,children:[o,` test`,o===1?``:`s`,`, `,s,` support file`,s===1?``:`s`,t.copies.length?`, ${t.copies.length} data file${t.copies.length===1?``:`s`}`:``]}),t.instructions&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`dt`,{className:`text-muted`,children:`Instructions`}),(0,Z.jsx)(`dd`,{className:`m-0 whitespace-pre-wrap [overflow-wrap:anywhere]`,children:t.instructions})]})]}),i.length>0&&(0,Z.jsxs)(`section`,{"aria-labelledby":`mig-blockers`,className:`flex flex-col gap-2 rounded-[14px] bg-fail-soft px-5 py-4`,children:[(0,Z.jsxs)(`h3`,{id:`mig-blockers`,className:`m-0 flex items-center gap-2 text-sm font-semibold text-fail`,children:[(0,Z.jsx)(e,{size:16,"aria-hidden":`true`}),`Not possible`]}),(0,Z.jsx)(`ul`,{className:`m-0 flex list-disc flex-col gap-1 pl-5 text-sm text-ink`,children:i.map(e=>(0,Z.jsx)(`li`,{children:e.text},e.code))})]}),a.length>0&&(0,Z.jsxs)(`section`,{"aria-labelledby":`mig-limits`,className:`flex flex-col gap-3 rounded-[14px] bg-warn-soft px-5 py-4`,children:[(0,Z.jsxs)(`h3`,{id:`mig-limits`,className:`m-0 flex items-center gap-2 text-sm font-semibold text-warn`,children:[(0,Z.jsx)(e,{size:16,"aria-hidden":`true`}),`Before you start`]}),(0,Z.jsx)(`ul`,{className:`m-0 flex list-disc flex-col gap-1.5 pl-5 text-sm text-ink`,children:a.map(e=>(0,Z.jsxs)(`li`,{children:[e.text,(0,Z.jsx)(nt,{finding:e})]},e.code))}),r&&!i.length&&(0,Z.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm font-medium`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:!!n,onChange:e=>r(e.target.checked)}),`I understand`]})]}),(0,Z.jsxs)(tt,{title:`Files, in order (${t.units.length})`,children:[(0,Z.jsx)(`ol`,{className:`m-0 flex list-none flex-col rounded-[12px] card border p-0 text-[13px]`,children:t.units.map(e=>(0,Z.jsxs)(`li`,{className:`flex flex-wrap gap-x-3 border-b border-line-soft px-4 py-2 last:border-b-0`,children:[(0,Z.jsx)(`span`,{className:`w-16 flex-none text-muted`,children:ge[e.kind]}),(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[e.source?(0,Z.jsxs)(`span`,{className:`text-muted`,children:[e.source.slice(e.source.lastIndexOf(`/`)+1),` → `]}):null,e.target]})]},e.id))}),t.notMigrated.length>0&&(0,Z.jsxs)(`p`,{className:`m-0 mt-2 text-[12.5px] text-muted`,children:[`Not migrated: `,t.notMigrated.map(e=>e.rel.slice(e.rel.lastIndexOf(`/`)+1)).join(`, `)]})]})]})}function it({plan:e,acceptLimits:t,onClose:n,onStarted:r}){let[i,o]=(0,X.useState)(``),[s,c]=(0,X.useState)(!1),[u,d]=(0,X.useState)(``),f=async()=>{c(!0),d(``);try{r((await l.start(e.id,i,t)).detail)}catch(e){d(e.message),c(!1)}};return(0,Z.jsx)(a,{open:!0,onClose:n,title:`Start the migration`,description:`The tests are rewritten in ${e.target.title} into ${e.target.dir}, and ForgeQE runs each one. It runs in the background; your source tests are not changed.`,footer:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(w,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,Z.jsx)(w,{variant:`primary`,disabled:s||i!==e.id,onClick:()=>void f(),children:`Start migration`})]}),children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,Z.jsxs)(`span`,{children:[`Type `,(0,Z.jsx)(`span`,{className:`font-mono`,children:e.id}),` to confirm`]}),(0,Z.jsx)(v,{value:i,onChange:e=>o(e.target.value),autoComplete:`off`,spellCheck:!1})]}),(0,Z.jsx)(et,{error:u})]})})}function at({d:e,onStarted:t}){let[n,r]=(0,X.useState)(!1),[i,a]=(0,X.useState)(!1),o=e.plan.feasibility.findings.some(e=>e.level===`limit`),s=e.plan.feasibility.verdict===`blocked`,c=!!e.job?.running;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[e.job?.last&&!c&&(0,Z.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:`The last start did not run. Its job's log on the Jobs page says why.`}),(0,Z.jsx)(rt,{plan:e.plan,accepted:e.confirmed||n,onAccept:e.confirmed?void 0:r}),!s&&!c&&(0,Z.jsx)(`div`,{children:(0,Z.jsxs)(w,{variant:`primary`,disabled:!e.confirmed&&o&&!n,onClick:()=>a(!0),children:[(0,Z.jsx)(b,{"aria-hidden":`true`}),`Start migration`]})}),i&&(0,Z.jsx)(it,{plan:e.plan,acceptLimits:o&&(e.confirmed||n),onClose:()=>a(!1),onStarted:e=>{a(!1),t(e)}})]})}function ot(e){return e.result?.status===`running`?`running`:e.result?.status===`migrated`?`done`:e.result?`review`:`planned`}function st(e){return e.result?me[e.result.status]:e.confirmed?{label:`Confirmed`,tone:`neutral`}:he[e.verdict]}function ct({view:e}){let[t,n]=(0,X.useState)(`all`),r=t=>t===`all`?e.plans.length:e.plans.filter(e=>ot(e)===t).length,i=e.plans.filter(e=>t===`all`||ot(e)===t),a=e=>location.hash=o(`migration`,e);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(_e,{children:[(0,Z.jsx)(Y,{label:`All`,value:r(`all`),onClick:()=>n(`all`),on:t===`all`}),(0,Z.jsx)(Y,{label:`Running`,value:r(`running`),onClick:()=>n(`running`),on:t===`running`}),(0,Z.jsx)(Y,{label:`Migrated`,value:r(`done`),tone:r(`done`)?`text-pass`:void 0,onClick:()=>n(`done`),on:t===`done`}),(0,Z.jsx)(Y,{label:`Needs review`,value:r(`review`),tone:r(`review`)?`text-warn`:void 0,onClick:()=>n(`review`),on:t===`review`})]}),(0,Z.jsx)(P,{label:`Migrations`,placeholder:`Find a migration`,empty:t===`all`?`No migrations.`:`None here.`,resetKey:t,head:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`th`,{className:`py-1.5 pr-3 pl-3 font-medium`,children:`Migration`}),(0,Z.jsx)(`th`,{className:`hidden py-1.5 pr-3 font-medium @3xl:table-cell`,children:`Source`}),(0,Z.jsx)(`th`,{className:`py-1.5 pr-3 font-medium`,children:`Tests`}),(0,Z.jsx)(`th`,{className:`py-1.5 pr-3 font-medium`,children:`Status`}),(0,Z.jsx)(`th`,{className:`hidden py-1.5 pr-3 font-medium @xl:table-cell`,children:`Updated`})]}),children:i.map(e=>{let t=st(e),n=e.result?e.result.status===`migrated`||e.result.endedAt?100:Math.round(e.result.done/Math.max(1,e.files)*95):0;return(0,Z.jsxs)(`tr`,{onClick:()=>a(e.id),className:N,children:[(0,Z.jsx)(`td`,{className:D,children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,Z.jsxs)(`span`,{className:`hidden flex-none items-center gap-1 @xl:inline-flex`,"aria-hidden":`true`,children:[(0,Z.jsx)(q,{framework:e.stack?.framework,language:e.stack?.language,size:18}),(0,Z.jsx)(O,{size:13,className:`text-muted`}),(0,Z.jsx)(q,{framework:e.targetId.split(`-`)[0],language:e.targetId.split(`-`).slice(1).join(`-`),size:18})]}),(0,Z.jsxs)(`span`,{className:`min-w-0`,children:[(0,Z.jsxs)(`a`,{href:o(`migration`,e.id),onClick:e=>e.stopPropagation(),className:`font-medium text-ink no-underline hover:underline`,children:[e.source,` to `,e.target]}),(0,Z.jsx)(`span`,{className:`block text-[12px] text-muted`,children:e.to})]})]})}),(0,Z.jsx)(`td`,{className:y(D,`hidden max-w-[260px] @3xl:table-cell`),children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[13px] text-ink-2`,children:[(0,Z.jsx)(K,{kind:e.origin.kind,label:e.origin.label,size:15}),(0,Z.jsx)(`span`,{className:`truncate`,"data-tip":e.origin.label,children:e.origin.kind===`project`?e.from:J(e.origin.label)})]})}),(0,Z.jsx)(`td`,{className:y(D,`w-[180px] text-[13px]`),children:e.result?.status===`running`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(be,{value:n,label:`${e.source} to ${e.target}: progress`}),(0,Z.jsxs)(`span`,{className:`w-9 flex-none text-right text-[12px] text-muted tabular-nums`,children:[n,`%`]})]}):e.result?(0,Z.jsxs)(`span`,{className:e.result.migrated===e.tests?`text-pass`:`text-ink-2`,children:[e.result.migrated,` of `,e.tests,` pass`]}):(0,Z.jsx)(`span`,{className:`text-muted`,children:`Not started`})}),(0,Z.jsx)(`td`,{className:y(D,`whitespace-nowrap`),children:(0,Z.jsx)(d,{tone:t.tone,children:t.label})}),(0,Z.jsx)(`td`,{className:y(D,`hidden text-[12.5px] whitespace-nowrap text-muted @xl:table-cell`),children:U(e.result?.endedAt||e.result?.at||e.createdAt)})]},e.id)})})]})}function lt({sub:e}){let[t,n]=(0,X.useState)(null),[r,i]=(0,X.useState)(``),[a,s]=(0,X.useState)(null),c=(0,X.useCallback)(()=>{l.list().then(e=>{n(e),i(``)},e=>i(e.message))},[]);(0,X.useEffect)(c,[c,e]);let u=t?.plans.some(e=>e.result?.status===`running`);(0,X.useEffect)(()=>{if(!u||e)return;let t=setInterval(c,3e3);return()=>clearInterval(t)},[u,e,c]);let d=e&&/^mig-\d{8}-\d{6}-[0-9a-f]{4}$/.test(e)?e:``,f=()=>location.hash=o(`migration`,`new`),p=!t&&!r&&(0,Z.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`});return e===`new`?(0,Z.jsxs)(Qe,{children:[(0,Z.jsx)($e,{}),(0,Z.jsx)(et,{error:r}),p,t&&(0,Z.jsx)(Ze,{view:t,review:(e,t,n)=>(0,Z.jsx)(rt,{plan:e,accepted:t,onAccept:n}),onStart:(e,t)=>s({d:e,accept:t})}),a&&(0,Z.jsx)(it,{plan:a.d.plan,acceptLimits:a.accept,onClose:()=>s(null),onStarted:e=>location.hash=o(`migration`,e.plan.id)})]}):d?(0,Z.jsxs)(Qe,{wide:!0,children:[(0,Z.jsx)($e,{}),(0,Z.jsx)(et,{error:r}),p,t&&(0,Z.jsx)(Ie,{id:d,view:t,plan:e=>(0,Z.jsx)(at,{d:e,onStarted:()=>location.reload()})},d)]}):(0,Z.jsxs)(Qe,{children:[(0,Z.jsx)($e,{action:t&&!t.plans.length?void 0:(0,Z.jsx)(w,{variant:`primary`,disabled:!t,onClick:f,children:`New migration`})}),(0,Z.jsx)(et,{error:r}),p,t&&(t.plans.length?(0,Z.jsx)(ct,{view:t}):(0,Z.jsx)(I,{icon:R,title:`No migrations yet`,action:(0,Z.jsx)(w,{size:`sm`,onClick:f,children:`New migration`}),children:`Bring in tests from git, a folder, uploaded files or pasted code, and pick the framework they move to. Nothing starts until you confirm.`}))]})}export{lt as Migration};
@@ -1,2 +0,0 @@
1
- import{$i as e,At as t,Gr as n,Mt as r,Nt as i,Sn as a,Xr as o,Zr as s,_t as c,an as l,bi as u,cr as d,da as f,do as p,dt as m,en as h,fa as g,ft as _,ga as v,hi as y,ho as b,kt as x,ma as S,mr as C,mt as w,nt as T,on as E,ot as D,po as O,r as k,st as A,t as j,tt as M,vi as ee,vo as N,vt as P,wn as F,yt as I,zi as L}from"./frame-BlZmJqKb.js";import{c as R,o as te,r as ne,u as re}from"./index-kBLPh-15.js";import{t as ie}from"./segmented--5Wlq3Yo.js";import{n as ae}from"./families-RmlYg4bl.js";import{r as oe,s as z,t as se}from"./logos-ih0wOR3C.js";import{d as B,o as ce,p as le,r as V,s as ue,t as de}from"./parts-Bopek2vd.js";var H=N(b(),1),U=O(),W=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,fe={ok:{label:`Ready to start`,tone:`pass`},limits:{label:`Ready, with limits`,tone:`warn`},blocked:{label:`Not possible`,tone:`fail`}},pe={converted:{label:`Converted`,tone:`pass`},partial:{label:`Needs review`,tone:`warn`},failed:{label:`Failed`,tone:`fail`},stopped:{label:`Stopped`,tone:`neutral`},running:{label:`Running`,tone:`running`}},me={converted:{label:`Converted`,tone:`pass`},written:{label:`Written`,tone:`neutral`},failed:{label:`Failed`,tone:`fail`},blocked:{label:`Not possible`,tone:`warn`},skipped:{label:`Skipped`,tone:`neutral`}},he={setup:`Set-up`,page:`Page`,test:`Test`},ge={matched:{label:`In the test`,dot:`bg-pass`},missing:{label:`Missing from the test`,dot:`bg-fail`},elided:{label:`Not needed: this branch never runs`,dot:`bg-line-strong`},marked:{label:`Left for a person to finish`,dot:`bg-warn`}},G={web:`Web`,api:`API`,desktop:`Desktop`,mobile:`Mobile`,data:`Data`,mixed:`Mixed`,unsupported:`Not supported`},K={prepare:`Prepare`,setup:`Set up`,pages:`Pages`,tests:`Tests`,validate:`Validate`,review:`Review`},q=[`prepare`,`setup`,`pages`,`tests`,`validate`,`review`];function _e(e,t){if(!t)return 0;if(t.stages?.review.status===`done`)return 100;let n=t.stages?.validate.status===`done`?8:0;return Math.min(99,t.units.length/Math.max(1,e.units.length)*90+n)}function ve(e){let t=e?.status||`pending`,n=e?.startedAt&&e?.endedAt?B(Date.parse(e.endedAt)-Date.parse(e.startedAt)):``;return t===`running`?e?.startedAt?`Running · ${B(Date.now()-Date.parse(e.startedAt))}`:`Running`:t===`done`?e?.note||(n?`Done · ${n}`:`Done`):t===`failed`?e?.note||`Did not finish`:t===`skipped`?e?.note||`Skipped`:`Waiting`}function ye({states:e}){return(0,U.jsx)(`ol`,{"aria-label":`Stages`,className:`m-0 flex w-full min-w-0 list-none items-center gap-1 p-0 @xl:gap-2`,children:q.map((t,n)=>{let r=e?.[t],i=r?.status||`pending`,o=i===`done`||i===`skipped`,c=i===`running`||i===`failed`,l=ve(r);return(0,U.jsxs)(`li`,{"data-tip":`${K[t]}: ${l}`,className:v(`relative flex items-center gap-1 @xl:gap-2`,n<q.length-1&&`flex-1`),"aria-current":i===`running`?`step`:void 0,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:v(`inline-flex size-5 flex-none items-center justify-center rounded-full text-[11px] font-semibold tabular-nums @xl:size-6`,o?`bg-pass text-white`:i===`running`?`border-2 border-accent bg-accent-soft text-accent-fg`:i===`failed`?`bg-fail text-white`:`border border-line bg-bg text-muted`),children:o?(0,U.jsx)(a,{size:12,strokeWidth:3}):i===`failed`?(0,U.jsx)(g,{size:12,strokeWidth:3}):i===`running`?(0,U.jsx)(s,{size:12,strokeWidth:2.5,className:`animate-spin`}):n+1}),(0,U.jsxs)(`span`,{className:v(`flex-none text-[13px] whitespace-nowrap`,c?`inline`:`hidden @xl:inline`,i===`running`?`font-medium text-accent-fg`:i===`failed`?`font-medium text-fail`:i===`pending`?`text-muted`:`text-ink`),children:[K[t],c&&(0,U.jsx)(`span`,{className:`ml-1.5 hidden font-normal text-muted @3xl:inline`,children:l})]}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[K[t],`: `,l]}),n<q.length-1&&(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`h-0.5 min-w-4 flex-1 overflow-hidden rounded-full bg-line @xl:min-w-8`,children:(0,U.jsx)(`span`,{className:v(`block h-full rounded-full bg-pass transition-[width] duration-500`,o?`w-full`:`w-0`)})})]},t)})})}function J(e){return e?`literal`in e?JSON.stringify(e.literal):`env`in e?`env ${String(e.env)}${e.secret?` (secret)`:``}`:`var`in e?`variable ${String(e.var)}`:`param`in e?`parameter ${String(e.param)}`:`data`in e?`test data ${String(e.data)}`:`expr`in e?`expression ${String(e.expr)}`:`concat`in e&&Array.isArray(e.concat)?e.concat.map(J).join(` + `):``:``}function be(e){let t=e.target?e.target.slice(e.target.indexOf(`.`)+1).replace(/_/g,` `):``;if(e.kind===`action`){let n=e.op===`navigate`?`Open ${J(e.value)}`:e.op===`close`?`Close the browser`:e.op===`fill`?`Fill ${t} with ${J(e.value)}`:e.op===`press`?`Press ${e.key} on ${t}`:e.op===`select`?`Select in ${t}`:`${e.op[0].toUpperCase()}${e.op.slice(1)} ${t}`;return e.optional?`${n} (if it is there)`:n}return e.kind===`assert`?`Check ${t} ${e.op===`text`||e.op===`value`?`${e.match===`contains`?`contains`:`is`} ${J(e.expected)}`:`is ${e.op}`}${e.wait?`, waiting`:``}`:e.kind===`store`?`Read ${t} into ${e.var}`:e.kind===`set_var`?`Set ${e.var} to ${J(e.value)}`:e.kind===`wait`?`Wait ${e.ms} ms`:e.kind===`unsupported`?e.reason||`Cannot be converted`:e.name||e.kind}var xe={before:`Before`,after:`After`,block:`Reusable block`,folder:`Folder`};function Se({nodes:e,status:t,pick:n,onPick:r,depth:i=0}){return(0,U.jsx)(`ul`,{className:v(`m-0 flex list-none flex-col p-0`,i>0&&`ml-3 border-l border-line-soft pl-3`),children:e.map((e,a)=>{if(e.kind===`group`)return(0,U.jsxs)(`li`,{className:`flex flex-col gap-1 py-1`,children:[(0,U.jsxs)(`span`,{className:`text-[12px] font-medium text-muted`,children:[xe[e.role||`folder`]||`Folder`,`: `,(0,U.jsx)(`span`,{className:`text-ink-2`,children:e.name})]}),(0,U.jsx)(Se,{nodes:e.body||[],status:t,pick:n,onPick:r,depth:i+1})]},`g${a}`);if(e.kind===`if`||e.kind===`loop`){let o=e.condition;return(0,U.jsxs)(`li`,{className:`flex flex-col gap-1 py-1`,children:[(0,U.jsxs)(`span`,{className:`text-[12px] font-medium text-muted`,children:[e.kind===`if`?`If`:`Loop`,` `,e.name,`: `,(0,U.jsx)(`code`,{className:`font-mono text-[12px] text-ink-2`,children:o?.tosca}),o?.constant!==void 0&&(0,U.jsxs)(`span`,{children:[` · always `,o.constant?`true`:`false`]})]}),[`then`,`else`,`loop`].map(a=>e[a]?.length?(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:`ml-3 text-[12px] text-muted`,children:a===`then`?`Then`:a===`else`?`Else`:`Each time`}),(0,U.jsx)(Se,{nodes:e[a],status:t,pick:n,onPick:r,depth:i+1})]},a):null)]},`i${a}`)}let o=e.id?t.get(e.id):void 0,s=o?ge[o]:void 0;return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,"aria-pressed":n===e.id,onClick:()=>r(e),className:v(`flex w-full min-w-0 cursor-pointer items-start gap-2 rounded-[8px] border-0 px-2 py-1.5 text-left text-[13px]`,n===e.id?`bg-accent-soft`:`bg-transparent hover:bg-surface-muted`),children:[(0,U.jsx)(`span`,{role:`img`,"aria-label":s?.label||`Not converted yet`,"data-tip":s?.label||`Not converted yet`,className:v(`mt-1.5 size-2 flex-none rounded-full`,s?.dot||`bg-line`)}),(0,U.jsx)(`span`,{className:`w-9 flex-none font-mono text-[12px] text-muted`,children:e.id}),(0,U.jsxs)(`span`,{className:v(`min-w-0 flex-1 [overflow-wrap:anywhere]`,e.kind===`unsupported`?`text-warn`:`text-ink`),children:[be(e),e.tosca?.step&&(0,U.jsxs)(`span`,{className:`block text-[12px] text-muted`,children:[`Tosca step "`,e.tosca.step,`"`]})]})]})},e.id||a)})})}function Ce(e,t){for(let n of e){if(n.id===t)return n;for(let e of[`body`,`then`,`else`,`loop`]){let r=n[e]&&Ce(n[e],t);if(r)return r}}}function we({view:e,pick:t}){let n=e.target,r=n?.text||``,i=r.split(`
2
- `),a=(0,H.useMemo)(()=>r?re(r,n?.lang||`plaintext`):null,[r,n?.lang]),o=(0,H.useMemo)(()=>{if(!t)return new Set;let e=RegExp(`tosca:[\\sn\\d,]*\\b${t}\\b`,`i`);return new Set(i.flatMap((t,n)=>e.test(t)?[n]:[]))},[t,r]),s=(0,H.useRef)(null);(0,H.useEffect)(()=>{s.current?.scrollIntoView({block:`center`,behavior:`smooth`})},[t,o.size]);let c=Math.min(...o);return(0,U.jsxs)(`figure`,{className:`m-0 flex min-h-0 min-w-0 flex-col overflow-hidden rounded-[12px] card border`,children:[(0,U.jsxs)(`figcaption`,{className:`flex min-h-10 items-center gap-2 border-b border-line-soft pr-1 pl-3`,children:[(0,U.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[0.04em] text-muted uppercase`,children:`Converted test`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[12px] text-ink-2`,"data-tip":n?.path,children:n?.path||``}),r&&(0,U.jsx)(te,{text:r,label:`Copy ${n?.path||`the test`}`})]}),r?(0,U.jsxs)(`div`,{className:`flex min-h-[260px] flex-1 overflow-auto font-mono text-[12.5px] leading-[1.6]`,children:[(0,U.jsx)(`pre`,{"aria-hidden":`true`,className:`m-0 min-h-full flex-none self-stretch border-r border-line-soft py-3 text-right text-muted select-none`,children:i.map((e,t)=>(0,U.jsx)(`span`,{ref:t===c?s:void 0,className:v(`block px-3`,o.has(t)&&`bg-accent-soft font-semibold text-accent-fg`),children:t+1},t))}),(0,U.jsx)(`pre`,{className:`m-0 min-w-0 flex-1 px-3 py-3`,children:(0,U.jsx)(`code`,{className:`hljs`,children:a})})]}):(0,U.jsx)(`p`,{className:`m-0 flex min-h-[260px] flex-1 items-center justify-center px-4 text-center text-sm text-muted`,children:n?`Not written yet.`:`This test case is left out of the plan.`}),t&&r&&(0,U.jsx)(`p`,{role:`status`,className:`m-0 border-t border-line-soft px-3 py-2 text-[12.5px] text-muted`,children:o.size?`${t} is done on line ${[...o].map(e=>e+1).join(`, `)}.`:`No line of the test is marked ${t}.`})]})}function Te({view:e,node:t}){if(!t?.target)return null;let[n,r]=t.target.split(`.`),i=e.pages.find(e=>e.id===n),a=i?.elements.find(e=>e.id===r);return a?(0,U.jsxs)(`section`,{"aria-label":`Locators Tosca recorded`,className:`flex flex-col gap-2 rounded-[12px] card border px-4 py-3 text-[13px]`,children:[(0,U.jsxs)(`span`,{className:`font-medium`,children:[a.name,` `,(0,U.jsxs)(`span`,{className:`font-normal text-muted`,children:[`on `,i?.name,a.scope?.length?`, inside ${a.scope.join(` › `)}`:``,a.nth===void 0?``:`, number ${a.nth+1}`]})]}),a.locators.length?(0,U.jsx)(`ol`,{className:`m-0 flex list-none flex-col gap-1 p-0`,children:a.locators.slice(0,6).map((e,t)=>(0,U.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`w-14 flex-none text-[12px] text-muted`,children:e.strategy}),(0,U.jsx)(`code`,{className:`min-w-0 flex-1 font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,children:e.strategy===`role`?`${e.role} "${e.name}"`:e.attr?`[${e.attr}="${e.value}"]`:e.value}),e.fragile&&(0,U.jsx)(c,{tone:`warn`,children:`Fragile`})]},t))}):(0,U.jsx)(`span`,{className:`text-muted`,children:`Tosca recorded no locator for it.`})]}):null}function Ee({id:e,plan:t,result:n,initial:r}){let i=t.cases.filter(e=>e.included),[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)(r||i[0]?.id||``),[l,u]=(0,H.useState)(null),[d,f]=(0,H.useState)(``),[h,g]=(0,H.useState)(``);(0,H.useEffect)(()=>{s&&(g(``),p.case(e,s).then(u,e=>g(e.message)))},[e,s,n?.units.length,n?.status]),(0,H.useEffect)(()=>{f(``)},[s]);let _=new Map((l?.fidelity||[]).map(e=>[e.id,e.status])),y=i.filter(e=>!a||e.name.toLowerCase().includes(a.toLowerCase())),b=e=>n?.units.find(t=>t.kind===`test`&&t.case===e);return i.length?(0,U.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)] gap-4 @5xl:h-[calc(var(--screen)-320px)] @5xl:min-h-[540px] @5xl:grid-cols-[220px_minmax(0,1fr)_minmax(0,1fr)]`,children:[(0,U.jsxs)(`nav`,{"aria-label":`Test cases`,className:`flex max-h-[320px] min-h-0 min-w-0 flex-col gap-2 overflow-hidden rounded-[14px] card border p-3 @5xl:max-h-none`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5 px-1`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold`,children:`Test cases`}),(0,U.jsxs)(`span`,{className:`text-[12px] text-muted`,children:[i.filter(e=>b(e.id)?.status===`converted`).length,` converted · `,i.filter(e=>[`failed`,`blocked`].includes(b(e.id)?.status||``)).length,` failed · `,W(i.length,`test case`)]})]}),(0,U.jsx)(m,{id:`find-a-case`,label:`Find a test case`,value:a,onChange:o,className:`max-w-none flex-none`}),(0,U.jsxs)(`ul`,{className:`m-0 flex min-h-0 flex-1 list-none flex-col gap-0.5 overflow-y-auto p-0`,children:[y.map(e=>{let t=b(e.id);return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,"aria-pressed":s===e.id,onClick:()=>c(e.id),className:v(`flex w-full cursor-pointer items-start gap-2 rounded-[8px] border-0 px-2 py-1.5 text-left text-[13px]`,s===e.id?`bg-accent-soft text-ink`:`bg-transparent text-ink-2 hover:bg-surface-muted`),children:[(0,U.jsx)(`span`,{role:`img`,"aria-label":t?me[t.status].label:`Waiting`,className:v(`mt-1.5 size-2 flex-none rounded-full`,t?.status===`converted`?`bg-pass`:t?.status===`failed`?`bg-fail`:t?.status===`blocked`?`bg-warn`:`bg-line`)}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[e.name,(0,U.jsxs)(`span`,{className:`block text-[12px] text-muted`,children:[W(e.steps,`step`),` · `,W(e.asserts,`check`),t?.fidelity?` · ${t.fidelity.matched}/${t.fidelity.required} in the test`:``]})]})]})},e.id)}),!y.length&&(0,U.jsx)(`li`,{className:`px-2 py-3 text-[13px] text-muted`,children:`No test case matches.`})]})]}),(0,U.jsxs)(`section`,{"aria-label":`Tosca steps`,className:`flex min-h-[360px] min-w-0 flex-col gap-3 overflow-hidden`,children:[h&&(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:h}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-[12px] card border`,children:[(0,U.jsxs)(`header`,{className:`flex min-h-10 flex-wrap items-center gap-2 border-b border-line-soft px-3 py-1.5`,children:[(0,U.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[0.04em] text-muted uppercase`,children:`Tosca steps`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:l?.name}),l&&t.cases.find(e=>e.id===s)&&(0,U.jsx)(`span`,{className:`text-[12px] text-muted`,children:G[t.cases.find(e=>e.id===s).route]||``})]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 py-2`,children:l?(0,U.jsx)(Se,{nodes:l.body,status:_,pick:d,onPick:e=>f(e.id||``)}):h?(0,U.jsx)(`p`,{className:`m-0 px-2 text-sm text-muted`,children:`Nothing to show.`}):(0,U.jsx)(`p`,{role:`status`,className:`m-0 px-2 text-sm text-muted`,children:`Loading…`})}),l&&(l.env.length>0||l.warnings.length>0)&&(0,U.jsxs)(`footer`,{className:`flex flex-col gap-1 border-t border-line-soft px-3 py-2 text-[12.5px] text-ink-2`,children:[l.env.length>0&&(0,U.jsxs)(`span`,{children:[`Environment variables: `,l.env.map(e=>`${e.name}${e.secret?` (secret)`:``}`).join(`, `),`.`]}),l.warnings.slice(0,3).map(e=>(0,U.jsx)(`span`,{className:`text-warn`,children:e},e))]})]}),l&&(0,U.jsx)(Te,{view:l,node:Ce(l.body,d)})]}),l?(0,U.jsx)(we,{view:l,pick:d}):(0,U.jsx)(`p`,{className:`m-0 flex min-h-[260px] items-center justify-center rounded-[12px] card border px-4 text-center text-sm text-muted`,children:h?`Nothing to show.`:`Loading…`})]}):(0,U.jsx)(P,{center:!0,className:`py-6`,children:`No test case of this plan is converted.`})}function De(e){if(e.job?.running)return{label:e.job.kind===`fix`?`Fixing`:e.job.kind===`verify`?`Running tests`:`Running`,tone:`running`};let t=e.result;return t?.status===`running`?{label:t.stage===`validate`?`Validating`:`Running`,tone:`running`}:t?pe[t.status]:e.job?.last?{label:`Did not start`,tone:`fail`}:e.confirmed?{label:`Confirmed`,tone:`neutral`}:fe[e.plan.feasibility.verdict]}var Y=e=>e.slice(e.lastIndexOf(`/`)+1);function Oe({d:e,unit:t,onClose:n,onSend:i}){let[a,o]=(0,H.useState)(``),s=e.plan.units.find(e=>e.id===t),c=e.result?.units.find(e=>e.id===t);return(0,U.jsx)(r,{open:!0,onClose:n,title:`Fix ${s?Y(s.target):t}`,description:`The Tosca agent works on this file again, with ForgeQE's last check and your note. It runs in the background.`,footer:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(S,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,U.jsxs)(S,{variant:`primary`,onClick:()=>i(a.trim()),children:[(0,U.jsx)(f,{"aria-hidden":`true`}),`Send to the agent`]})]}),children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[c?.problems?.length?(0,U.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:c.problems[0]}):null,(0,U.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`What should change? (optional)`}),(0,U.jsx)(w,{value:a,rows:4,maxLength:2e3,placeholder:`The cart badge is a span now, not a button.`,onChange:e=>o(e.target.value)})]})]})})}function ke({d:e,unit:t,onClose:n}){let i=e.result?.units.find(e=>e.id===t),a=e.plan.units.find(e=>e.id===t);return(0,U.jsx)(r,{open:!0,onClose:n,wide:!0,title:`Output of ${a?Y(a.target):t}`,description:i?.checkedAt?`Run again ${le(i.checkedAt)}`:`From the conversion's own run`,footer:(0,U.jsx)(S,{onClick:n,children:`Close`}),children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[i?.problems?.length?(0,U.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:i.problems.join(` `)}):i?.status===`converted`?(0,U.jsx)(`p`,{className:`m-0 text-sm text-pass`,children:`Passes, with every Tosca step in the test.`}):null,i?.command&&(0,U.jsxs)(`code`,{className:`block font-mono text-[12px] text-muted`,children:[`$ `,i.command]}),(0,U.jsx)(`pre`,{className:`m-0 max-h-[60vh] overflow-auto rounded-[12px] bg-surface-muted px-3 py-2 font-mono text-[12.5px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:i?.output||`No output.`})]})})}function Ae({d:e,planView:t,busy:n,onFix:r,onSteps:i,onOutput:a,onRun:s}){let l=e.result;if(!l)return(0,U.jsx)(U.Fragment,{children:t});let u=new Map(l.units.map(e=>[e.id,e])),d=e.plan.units.filter(e=>e.kind===`test`),p=l.units.filter(e=>e.kind===`test`&&e.status===`converted`).length,m=l.units.reduce((e,t)=>t.fidelity?{m:e.m+t.fidelity.matched,n:e.n+t.fidelity.required}:e,{m:0,n:0}),h=l.units.filter(e=>e.status===`failed`||e.status===`blocked`).length,[g,..._]=e.plan.target.id.split(`-`);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,U.jsxs)(ce,{children:[(0,U.jsx)(V,{label:`Tests passing`,value:`${p} / ${d.length}`,tone:p===d.length&&d.length?`text-pass`:void 0}),(0,U.jsx)(V,{label:`Tosca steps in the tests`,value:m.n?`${m.m} / ${m.n}`:`–`,tone:m.n&&m.m===m.n?`text-pass`:void 0}),(0,U.jsx)(V,{label:`Need attention`,value:h,tone:h?`text-fail`:void 0}),(0,U.jsx)(V,{label:l.status===`running`?`Running for`:`Took`,value:B(l.status===`running`?Date.now()-Date.parse(l.startedAt):l.ms)})]}),l.notes&&(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:l.notes}),(0,U.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)] items-start gap-5 @5xl:grid-cols-[minmax(0,1fr)_320px]`,children:[(0,U.jsx)(M,{label:`Files`,placeholder:`Find a file`,empty:`No files.`,head:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`th`,{className:`py-2 pr-3 pl-3 font-medium`,children:`File`}),(0,U.jsx)(`th`,{className:`py-2 pr-3 font-medium`,children:`Status`}),(0,U.jsx)(`th`,{className:`hidden py-2 pr-3 font-medium @2xl:table-cell`,children:`Tosca steps`}),(0,U.jsx)(`th`,{className:`hidden py-2 pr-3 font-medium @3xl:table-cell`,children:`Note`}),(0,U.jsx)(`th`,{className:`py-2 pr-3 font-medium`,children:(0,U.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),children:e.plan.units.map(t=>{let s=u.get(t.id),l=s?me[s.status]:null,d=t.case?e.plan.cases.find(e=>e.id===t.case):void 0;return(0,U.jsxs)(`tr`,{className:D,children:[(0,U.jsxs)(`td`,{className:T,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:t.kind===`setup`?`Project set-up`:Y(t.target)}),(0,U.jsxs)(`span`,{className:`block text-[12px] text-muted`,children:[d?d.name:`${he[t.kind]} · ${t.target}`,d?.suites?.length?` · ${d.suites.join(`, `)}`:``]})]}),(0,U.jsxs)(`td`,{className:v(T,`whitespace-nowrap`),children:[l?(0,U.jsx)(c,{tone:l.tone,children:l.label}):(0,U.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Waiting`}),s?.checkedAt&&(0,U.jsxs)(`span`,{className:`block pt-1 text-[12px] text-muted`,children:[`Run again `,ne(s.checkedAt)]})]}),(0,U.jsx)(`td`,{className:v(T,`hidden text-[13px] whitespace-nowrap @2xl:table-cell`),children:s?.fidelity?(0,U.jsxs)(`span`,{className:s.fidelity.missing.length?`text-fail`:`text-ink-2`,children:[s.fidelity.matched,` of `,s.fidelity.required]}):(0,U.jsx)(`span`,{className:`text-muted`,children:`–`})}),(0,U.jsx)(`td`,{className:v(T,`hidden text-[13px] text-ink-2 @3xl:table-cell`),children:(0,U.jsx)(`span`,{className:`line-clamp-2`,children:s?.problems?.[0]||s?.reason||``})}),(0,U.jsx)(`td`,{className:v(T,`whitespace-nowrap text-right`),children:(0,U.jsxs)(`span`,{className:`inline-flex gap-1`,children:[t.kind===`test`&&(s?.output||s?.problems?.length)&&(0,U.jsxs)(S,{size:`sm`,variant:`ghost`,"aria-label":`Output of ${Y(t.target)}`,onClick:()=>a(t.id),children:[(0,U.jsx)(C,{"aria-hidden":`true`}),`Output`]}),t.case&&(0,U.jsxs)(S,{size:`sm`,variant:`ghost`,"aria-label":`Steps of ${Y(t.target)}`,onClick:()=>i(t.case),children:[(0,U.jsx)(o,{"aria-hidden":`true`}),`Steps`]}),s&&(s.status===`failed`||s.status===`blocked`)&&t.kind!==`setup`&&(0,U.jsxs)(S,{size:`sm`,disabled:n,"aria-label":`Fix ${Y(t.target)}`,onClick:()=>r(t.id),children:[(0,U.jsx)(f,{"aria-hidden":`true`}),`Fix`]})]})})]},t.id)})}),(0,U.jsxs)(`aside`,{"aria-label":`Details`,className:`flex flex-col gap-4 rounded-[14px] card border p-5 text-sm`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:`From`}),(0,U.jsxs)(`span`,{className:`font-medium`,children:[`Tricentis Tosca`,e.plan.source.project?` · ${e.plan.source.project}`:``]}),(0,U.jsx)(`span`,{className:`font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,children:e.plan.source.file})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-line-soft pt-4`,children:[(0,U.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:`To`}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,U.jsx)(z,{framework:g,language:_.join(`-`)}),e.plan.target.title]}),(0,U.jsx)(`span`,{className:`font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,children:e.targetPath})]}),(e.plan.suites||[]).length>0&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t border-line-soft pt-4`,children:[(0,U.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:`Suites`}),(0,U.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1.5 p-0`,children:e.plan.suites.map(e=>{let t=new Set(e.cases),r=l.units.filter(e=>e.kind===`test`&&e.case&&t.has(e.case)&&e.status===`converted`).length;return(0,U.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsx)(`span`,{className:`truncate`,children:e.name}),(0,U.jsxs)(`span`,{className:v(`text-[12px]`,r===e.cases.length?`text-pass`:`text-muted`),children:[r,` of `,W(e.cases.length,`test`),` pass · @`,e.tag]})]}),(0,U.jsxs)(S,{size:`sm`,variant:`ghost`,disabled:n,"aria-label":`Run the ${e.name} suite`,onClick:()=>s(e.name),children:[(0,U.jsx)(y,{"aria-hidden":`true`}),`Run`]})]},e.name)})})]}),e.plan.env.length>0&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t border-line-soft pt-4`,children:[(0,U.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:`Environment variables`}),(0,U.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0`,children:e.plan.env.map(e=>(0,U.jsxs)(`li`,{className:`flex flex-col`,children:[(0,U.jsxs)(`span`,{className:`font-mono text-[12px]`,children:[e.name,e.secret?(0,U.jsx)(`span`,{className:`font-sans text-muted`,children:` · secret`}):null]}),(0,U.jsx)(`span`,{className:`text-[12px] text-muted [overflow-wrap:anywhere]`,children:e.from})]},e.name))})]}),(0,U.jsxs)(`dl`,{className:`m-0 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 border-t border-line-soft pt-4`,children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`Started`}),(0,U.jsx)(`dd`,{className:`m-0 text-right`,children:le(l.startedAt)}),l.model&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`Agent`}),(0,U.jsx)(`dd`,{className:`m-0 truncate text-right`,"data-tip":l.model,children:l.model})]}),l.reverted.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`Put back`}),(0,U.jsxs)(`dd`,{className:`m-0 text-right`,children:[l.reverted.length,` edits outside the target`]})]})]})]})]})]})}var je={ok:{mark:`✓`,cls:`text-pass`},fail:{mark:`✗`,cls:`text-fail`},info:{mark:`•`,cls:`text-muted`},agent:{mark:`•`,cls:`text-accent-fg`},tool:{mark:`·`,cls:`text-muted`}};function Me({events:e,running:t}){let n=(0,H.useRef)(null);(0,H.useEffect)(()=>{t&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e.length,t]);let r=e.filter(e=>e.kind!==`tool`);return(0,U.jsxs)(`ol`,{ref:n,"aria-live":t?`polite`:void 0,"aria-label":`Activity`,className:`m-0 flex max-h-[60vh] list-none flex-col overflow-y-auto rounded-[12px] card border p-0`,children:[r.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex gap-3 border-b border-line-soft px-4 py-2 text-[13px] last:border-b-0`,children:[(0,U.jsx)(`span`,{className:`w-[64px] flex-none text-[12px] text-muted tabular-nums`,children:new Date(e.ts).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:v(`w-3 flex-none text-center`,je[e.kind].cls),children:je[e.kind].mark}),(0,U.jsx)(`span`,{className:v(`min-w-0 flex-1 [overflow-wrap:anywhere]`,e.kind===`fail`?`text-fail`:e.kind===`ok`?`text-ink`:`text-ink-2`),children:e.text})]},t)),!r.length&&(0,U.jsx)(`li`,{className:`px-4 py-8 text-center text-sm text-muted`,children:`Nothing yet.`})]})}function Ne({id:e,plan:t}){let[n,a]=(0,H.useState)(null),[o,s]=(0,H.useState)(``),[d,f]=(0,H.useState)(`overview`),[m,h]=(0,H.useState)(),[g,_]=(0,H.useState)(null),[v,y]=(0,H.useState)(null),[b,x]=(0,H.useState)([]),[C,w]=(0,H.useState)(null),[T,D]=(0,H.useState)(!1),O=(0,H.useRef)(0),k=(0,H.useCallback)(()=>{p.detail(e).then(e=>{a(e),s(``)},e=>s(e.message)),p.events(e,O.current).then(e=>{e.next<O.current?(O.current=0,x([])):(O.current=e.next,e.events.length&&x(t=>[...t,...e.events].slice(-2e3)))},()=>{})},[e]);(0,H.useEffect)(k,[k]);let A=!!(n?.job?.running||n?.result?.status===`running`);(0,H.useEffect)(()=>{if(!A)return;let e=setInterval(k,1500);return()=>clearInterval(e)},[A,k]);let j=async e=>{D(!0),s(``);try{a(await e()),setTimeout(k,800)}catch(e){s(e.message)}finally{D(!1)}};if(!n)return o?(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:o}):(0,U.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`});let M=De(n),ee=_e(n.plan,n.result),N=n.result,P=(N?.units||[]).filter(e=>e.kind===`test`&&(e.status===`failed`||e.status===`blocked`)).length,F=n.plan.cases.filter(e=>e.included).length,I=[{id:`overview`,label:`Overview`},{id:`steps`,label:`Steps`,n:F?String(F):void 0,tone:P?`text-fail`:void 0},{id:`activity`,label:`Activity`}];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`a`,{href:i(`tosca`),className:`inline-flex items-center gap-1.5 self-start text-sm`,children:[(0,U.jsx)(l,{size:16,"aria-hidden":`true`}),`Tosca`]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 @3xl:flex-row @3xl:items-start`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,U.jsxs)(`h2`,{className:`m-0 flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[20px] leading-snug font-semibold tracking-[-0.01em]`,children:[(0,U.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:Y(n.plan.source.file)}),(0,U.jsx)(E,{size:18,"aria-hidden":`true`,className:`text-muted`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`to`}),(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,U.jsx)(z,{framework:n.plan.target.id.split(`-`)[0],language:n.plan.target.id.split(`-`).slice(1).join(`-`),size:20}),n.plan.target.title]})]}),(0,U.jsxs)(`p`,{className:`m-0 flex flex-wrap items-center gap-1.5 text-sm text-muted`,children:[(0,U.jsxs)(`span`,{children:[`Tricentis Tosca`,n.plan.source.project?` · ${n.plan.source.project}`:``]}),(0,U.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,U.jsxs)(`span`,{children:[`into `,(0,U.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:n.plan.target.dir})]})]})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(c,{tone:M.tone,children:M.label}),A?(0,U.jsxs)(S,{variant:`danger`,disabled:T,onClick:()=>void j(()=>p.stop(e)),children:[(0,U.jsx)(L,{fill:`currentColor`,"aria-hidden":`true`}),`Stop`]}):N?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(S,{variant:`ghost`,onClick:()=>p.report(e).then(e=>w(e.text),()=>w(``)),children:`Report`}),(0,U.jsxs)(S,{disabled:T,onClick:()=>void j(()=>p.verify(e)),"data-tip":`Run every converted test again, no agent`,children:[(0,U.jsx)(u,{"aria-hidden":`true`}),`Run tests again`]})]}):null]})]}),N&&(0,U.jsxs)(`div`,{className:`flex items-center gap-3 rounded-[12px] card border px-3 py-2.5 @xl:gap-4 @xl:px-4`,children:[(0,U.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,U.jsx)(ye,{states:N.stages})}),A&&(0,U.jsxs)(`span`,{className:`flex-none text-[13px] font-semibold tabular-nums text-accent-fg`,"aria-label":`${Math.round(ee)}% done`,children:[Math.round(ee),`%`]})]}),o&&(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:o}),(0,U.jsx)(ue,{tabs:I,tab:d,onTab:f,label:`Tosca conversion`}),(0,U.jsxs)(`div`,{role:`tabpanel`,id:`mpanel-${d}`,"aria-labelledby":`mtab-${d}`,className:`flex min-w-0 flex-col gap-4`,children:[d===`overview`&&(0,U.jsx)(Ae,{d:n,planView:t(n),busy:T||A,onFix:_,onSteps:e=>(h(e),f(`steps`)),onOutput:y,onRun:t=>void j(()=>p.verify(e,t))}),d===`steps`&&(0,U.jsx)(Ee,{id:e,plan:n.plan,result:N,initial:m}),d===`activity`&&(0,U.jsx)(Me,{events:b,running:A})]}),v&&(0,U.jsx)(ke,{d:n,unit:v,onClose:()=>y(null)}),g&&(0,U.jsx)(Oe,{d:n,unit:g,onClose:()=>_(null),onSend:t=>{_(null),j(()=>p.fix(e,[g],t))}}),(0,U.jsx)(r,{open:C!==null,onClose:()=>w(null),wide:!0,title:`Report`,description:`tosca.md for ${n.plan.id}`,footer:(0,U.jsx)(S,{onClick:()=>w(null),children:`Close`}),children:C?(0,U.jsx)(R,{text:C}):(0,U.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No report yet.`})})]})}var Pe=[`Export`,`Target`,`Instructions`,`Review`],Fe=[`The Tosca export and its test cases`,`Framework and language`,`Your rules, optional`,`Check and start`],Ie=[`Keep one page object per Tosca module, in pages/.`,`Name each test after its Tosca test case.`,`Read the base URL from BASE_URL.`],Le={playwright:`Microsoft`,cypress:`JavaScript only`,webdriverio:`WebDriver and BiDi`,selenium:`WebDriver`};function Re({at:e,reached:t,onGo:n}){return(0,U.jsx)(`nav`,{"aria-label":`Steps`,children:(0,U.jsx)(`ol`,{className:`m-0 flex list-none items-center gap-2 p-0`,children:Pe.map((r,i)=>{let o=i<=t,s=i===e,c=i<t&&!s;return(0,U.jsxs)(`li`,{className:v(`flex items-center gap-2`,i<Pe.length-1&&`flex-1`),children:[(0,U.jsxs)(`button`,{type:`button`,disabled:!o,"aria-current":s?`step`:void 0,onClick:()=>n(i),"aria-label":r,"data-tip":Fe[i],className:v(`inline-flex min-h-8 flex-none items-center gap-2 rounded-[8px] border-0 bg-transparent px-1 text-[13px] whitespace-nowrap`,o&&!s?`cursor-pointer hover:bg-surface-strong`:``),children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:v(`inline-flex size-6 flex-none items-center justify-center rounded-full text-[11px] font-semibold tabular-nums`,c?`bg-pass text-white`:s?`bg-accent text-accent-ink`:`border border-line bg-bg text-muted`),children:c?(0,U.jsx)(a,{size:13,strokeWidth:3}):i+1}),(0,U.jsx)(`span`,{className:v(s?`font-medium text-ink`:o?`text-ink-2`:`text-muted`,!s&&`hidden @xl:inline`),children:r})]}),i<Pe.length-1&&(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`h-0.5 min-w-4 flex-1 overflow-hidden rounded-full bg-line @xl:min-w-8`,children:(0,U.jsx)(`span`,{className:v(`block h-full rounded-full bg-pass transition-[width] duration-500`,i<t?`w-full`:`w-0`)})})]},r)})})})}function X({id:e,label:t,help:n,children:r}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium`,children:t}),r,n&&(0,U.jsx)(`span`,{className:`text-[13px] text-muted`,children:n})]})}function Z({busy:e,onBack:t,next:n,onNext:r,disabled:i,aside:a}){return(0,U.jsxs)(`div`,{className:`sticky bottom-0 flex flex-wrap items-center gap-3 border-t border-line-soft bg-bg py-3`,children:[(0,U.jsx)(`span`,{className:`min-w-0 flex-1 text-[13px]`,children:a}),t&&(0,U.jsx)(S,{variant:`ghost`,disabled:e,onClick:t,children:`Back`}),(0,U.jsx)(S,{variant:`primary`,disabled:e||i,onClick:r,children:n})]})}function Q({on:e,onPick:t,logo:n,title:r,sub:i,label:a}){return(0,U.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":e,"aria-label":a,onClick:t,className:v(`flex min-h-[72px] min-w-0 cursor-pointer items-center gap-3 rounded-[12px] border px-3.5 py-3 text-left transition-colors`,e?`border-accent bg-accent-soft ring-1 ring-accent`:`border-line-soft bg-bg hover:border-line hover:bg-surface-muted`),children:[(0,U.jsx)(`span`,{className:`inline-flex size-9 flex-none items-center justify-center rounded-[10px] bg-surface-muted`,children:n}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,U.jsx)(`span`,{className:`truncate text-sm font-medium text-ink`,children:r}),i&&(0,U.jsx)(`span`,{className:`truncate text-[12px] text-muted`,children:i})]})]})}var ze=e=>e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1024))} KB`;function Be({s:e}){return(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[12px] bg-surface-muted px-4 py-3 text-sm`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:e.project||e.file}),(0,U.jsxs)(`span`,{className:`text-ink-2`,children:[W(e.test_cases.length,`test case`),` · `,W(e.pages.length,`module`),` · `,W(e.totals.steps,`step`),` · `,W(e.totals.asserts,`check`)]}),e.suites.length>0&&(0,U.jsxs)(`span`,{className:`text-ink-2`,children:[`· `,W(e.suites.length,`execution list`)]}),e.totals.unsupported>0&&(0,U.jsxs)(`span`,{className:`text-warn`,children:[`· `,e.totals.unsupported===1?`1 step value cannot`:`${e.totals.unsupported} step values cannot`,` be converted`]})]})}function Ve({view:e,file:t,setFile:n,found:r,setFound:i,only:a,setOnly:o}){let[s,l]=(0,H.useState)(e.exports.some(e=>e.path===t)?``:t),[u,f]=(0,H.useState)(!1),[m,h]=(0,H.useState)(``),g=async e=>{if(n(e),i(null),h(``),e){f(!0);try{let t=await p.inspect(e);i(t),o(new Set(t.test_cases.filter(e=>e.route===`web`||(e.routes?.web??0)>0).map(e=>e.id)))}catch(e){h(e.message)}finally{f(!1)}}},y=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),o(t)};return(0,U.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[e.exports.length>0?(0,U.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2.5 border-0 p-0`,children:[(0,U.jsx)(`legend`,{className:`mb-2.5 text-sm font-medium`,children:`Tosca exports in this project`}),(0,U.jsx)(`div`,{role:`radiogroup`,"aria-label":`Tosca exports`,className:`grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2.5`,children:e.exports.map(e=>(0,U.jsx)(Q,{on:t===e.path,onPick:()=>void g(e.path),logo:(0,U.jsx)(d,{size:18,"aria-hidden":`true`,className:`text-ink-2`}),title:e.path.slice(e.path.lastIndexOf(`/`)+1),sub:`${e.path.includes(`/`)?e.path.slice(0,e.path.lastIndexOf(`/`)):`.`} · ${ze(e.bytes)}`,label:e.path},e.path))})]}):(0,U.jsxs)(`p`,{className:`m-0 rounded-[12px] bg-surface-muted px-4 py-3 text-sm text-ink-2`,children:[`No Tosca export (.tsu) in this project yet. Export the test cases from Tosca Commander, put the file inside the project, for example `,(0,U.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:`tosca/checkout.tsu`}),`, and type its path below.`]}),(0,U.jsx)(X,{id:`tsc-path`,label:e.exports.length?`Or type its path`:`Path of the export`,help:`Inside the project. Secrets in it stay encrypted: they become environment variables.`,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(_,{id:`tsc-path`,value:s,spellCheck:!1,maxLength:300,placeholder:`tosca/checkout.tsu`,onChange:e=>l(e.target.value),className:`min-w-0 flex-[1_1_300px]`}),(0,U.jsx)(S,{disabled:u||!s.trim(),onClick:()=>void g(s.trim()),children:u?`Reading…`:`Read it`})]})}),m&&(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:m}),u&&!m&&(0,U.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Reading the export…`}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Be,{s:r}),(0,U.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,U.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:`Test cases to convert`}),(0,U.jsx)(`ul`,{className:`m-0 flex list-none flex-col rounded-[12px] card border p-0 text-[13px]`,children:r.test_cases.map(e=>{let t=e.route===`web`||(e.routes?.web??0)>0;return(0,U.jsx)(`li`,{className:`border-b border-line-soft last:border-b-0`,children:(0,U.jsxs)(`label`,{className:v(`flex min-h-11 items-start gap-3 px-4 py-2.5`,t?`cursor-pointer`:``),children:[(0,U.jsx)(`input`,{type:`checkbox`,className:`mt-0.5`,disabled:!t,checked:t&&a.has(e.id),onChange:()=>y(e.id)}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`font-medium text-ink [overflow-wrap:anywhere]`,children:e.name}),(0,U.jsxs)(`span`,{className:`block text-[12px] text-muted`,children:[e.folders.join(` / `)||`–`,` · `,W(e.steps,`step`),` · `,W(e.asserts,`check`),e.unsupported?` · ${e.unsupported} not convertible`:``,e.suites.length?` · in ${e.suites.join(`, `)}`:``]})]}),(0,U.jsx)(c,{tone:t?`neutral`:`warn`,children:e.route===`web`?G.web:t?`${G.web} + notes`:`${G[e.route]||e.route}: later`})]})},e.id)})})]}),r.env.length>0&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Environment variables`}),(0,U.jsxs)(`span`,{className:`text-[13px] text-ink-2`,children:[r.env.map(e=>`${e.name}${e.secret?` (secret)`:``}`).join(`, `),`. Their values are never in the export; you set them before the tests run.`]})]})]})]})}function He({view:e,to:t,setTo:n,into:r,setInto:i,attr:a,setAttr:o}){let s=e=>e.split(`-`)[0],c=e=>e.split(`-`).slice(1).join(`-`),l=[...new Map(e.targets.map(e=>[s(e.id),e.framework])).entries()],u=e.targets.filter(e=>s(e.id)===s(t));return(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2.5 border-0 p-0`,children:[(0,U.jsx)(`legend`,{className:`mb-2.5 text-sm font-medium`,children:`Framework`}),(0,U.jsx)(`div`,{role:`radiogroup`,"aria-label":`Framework`,className:`grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5`,children:l.map(([r,i])=>{let a=se[r];return(0,U.jsx)(Q,{on:s(t)===r,onPick:()=>n((e.targets.find(e=>s(e.id)===r&&c(e.id)===c(t))||e.targets.find(e=>s(e.id)===r)).id),logo:a?(0,U.jsx)(a,{width:22,height:22,"aria-hidden":`true`}):null,title:i,sub:Le[r],label:i},r)})})]}),(0,U.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2.5 border-0 p-0`,children:[(0,U.jsx)(`legend`,{className:`mb-2.5 text-sm font-medium`,children:`Language`}),(0,U.jsx)(`div`,{role:`radiogroup`,"aria-label":`Language`,className:`grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5`,children:u.map(e=>{let r=oe[c(e.id)];return(0,U.jsx)(Q,{on:t===e.id,onPick:()=>n(e.id),logo:r?(0,U.jsx)(r,{width:22,height:22,"aria-hidden":`true`}):null,title:e.language,label:e.language},e.id)})})]}),(0,U.jsxs)(`div`,{className:`grid gap-4 @2xl:grid-cols-2`,children:[(0,U.jsx)(X,{id:`tsc-into`,label:`Output folder`,help:`A new folder. Empty: named after the target.`,children:(0,U.jsx)(_,{id:`tsc-into`,value:r,spellCheck:!1,maxLength:300,placeholder:`tosca-${t}`,onChange:e=>i(e.target.value)})}),(0,U.jsx)(X,{id:`tsc-attr`,label:`Test id attribute (optional)`,help:`When the app's is not data-test-id, data-testid, data-test, data-cy or data-qa.`,children:(0,U.jsx)(_,{id:`tsc-attr`,value:a,spellCheck:!1,maxLength:40,placeholder:`data-automation-id`,onChange:e=>o(e.target.value.replace(/[^A-Za-z0-9_-]/g,``))})})]})]})}function Ue({view:e,file:t,found:n,only:r,to:i,instructions:a}){let o=e.targets.find(e=>e.id===i),s=(e,t)=>(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-b border-line-soft py-3.5 first:pt-0 last:border-b-0 last:pb-0`,children:[(0,U.jsx)(`span`,{className:`text-[12px] font-medium text-muted`,children:e}),(0,U.jsx)(`div`,{className:`text-sm`,children:t})]});return(0,U.jsxs)(`aside`,{"aria-label":`Summary`,className:`flex flex-col rounded-[14px] card border p-5`,children:[s(`Export`,t?(0,U.jsx)(`span`,{className:`font-mono text-[12.5px] [overflow-wrap:anywhere]`,children:t}):(0,U.jsx)(`span`,{className:`text-muted`,children:`Not picked yet`})),s(`Test cases`,n?(0,U.jsxs)(`span`,{children:[r.size,` of `,n.test_cases.length,` picked`]}):(0,U.jsx)(`span`,{className:`text-muted`,children:`–`})),s(`Target`,o?(0,U.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,U.jsx)(z,{framework:o.id.split(`-`)[0],language:o.id.split(`-`).slice(1).join(`-`)}),o.title]}):(0,U.jsx)(`span`,{className:`text-muted`,children:`–`})),s(`Instructions`,a.trim()?(0,U.jsx)(`span`,{className:`line-clamp-3 text-ink-2`,children:a.trim()}):(0,U.jsx)(`span`,{className:`text-muted`,children:`None`}))]})}function We({view:e,review:t,onStart:n}){let[r,i]=(0,H.useState)(0),[a,o]=(0,H.useState)(0),[s,c]=(0,H.useState)(``),[l,u]=(0,H.useState)(null),[d,f]=(0,H.useState)(new Set),[m,g]=(0,H.useState)(e.targets[0]?.id||``),[_,v]=(0,H.useState)(``),[b,x]=(0,H.useState)(``),[S,C]=(0,H.useState)(``),[T,E]=(0,H.useState)(null),[D,O]=(0,H.useState)(!1),[k,A]=(0,H.useState)(!1),[j,M]=(0,H.useState)(``),N=[...d].sort().join(`,`);(0,H.useEffect)(()=>{E(null),O(!1),o(e=>Math.min(e,2))},[s,N,m,_,b,S]);let P=e=>{i(e),o(t=>Math.max(t,e)),M(``)},F=async()=>{A(!0),M(``);try{let e=!l||l.test_cases.filter(e=>e.route===`web`||(e.routes?.web??0)>0).every(e=>d.has(e.id)),t=await p.plan({file:s,to:m,..._.trim()?{into:_.trim()}:{},...e?{}:{only:[...d]},...S.trim()?{instructions:S.trim()}:{},...b?{testAttributes:[b]}:{}});E(t),P(3)}catch(e){M(e.message)}finally{A(!1)}},I=T?.plan,L=I?.feasibility.findings.some(e=>e.level===`limit`),R=I?.feasibility.verdict===`blocked`;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(Re,{at:r,reached:a,onGo:e=>!k&&(e<3||T)&&i(e)}),(0,U.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)] items-start gap-6 @5xl:grid-cols-[minmax(0,1fr)_280px]`,children:[(0,U.jsxs)(`section`,{"aria-labelledby":`tsc-step`,className:`flex min-w-0 flex-col gap-5`,children:[(0,U.jsx)(`h2`,{id:`tsc-step`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em]`,children:[`Which Tosca export?`,`What should the tests become?`,`Anything the agent should know?`,`Review and start`][r]}),j&&(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:j}),r===0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ve,{view:e,file:s,setFile:c,found:l,setFound:u,only:d,setOnly:f}),(0,U.jsx)(Z,{busy:k,next:`Continue`,onNext:()=>P(1),disabled:!l||!d.size,aside:l&&!d.size?(0,U.jsx)(`span`,{className:`text-muted`,children:`Pick at least one web test case.`}):void 0})]}),r===1&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(He,{view:e,to:m,setTo:g,into:_,setInto:v,attr:b,setAttr:x}),(0,U.jsx)(Z,{busy:k,onBack:()=>i(0),next:`Continue`,onNext:()=>P(2),disabled:!m})]}),r===2&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{id:`tsc-instructions`,label:`Instructions (optional)`,help:`Style and structure for the new code. Every Tosca step and check is kept either way.`,children:(0,U.jsx)(w,{id:`tsc-instructions`,value:S,rows:6,maxLength:4e3,placeholder:`Page objects go in pages/, one class per Tosca module.`,onChange:e=>C(e.target.value)})}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Ie.map(e=>(0,U.jsxs)(`button`,{type:`button`,disabled:S.includes(e),onClick:()=>C(S.trim()?`${S.trim()}\n${e}`:e),className:`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[8px] border-0 bg-surface-strong px-2.5 text-[13px] text-ink hover:bg-line disabled:cursor-default disabled:opacity-50`,children:[(0,U.jsx)(ee,{size:13,"aria-hidden":`true`}),e]},e))}),(0,U.jsx)(Z,{busy:k,onBack:()=>i(1),next:k?`Checking…`:`Check the plan`,onNext:()=>void F(),aside:(0,U.jsx)(`span`,{className:`text-muted`,children:`Nothing is changed yet.`})})]}),r===3&&I&&(0,U.jsxs)(U.Fragment,{children:[t(I,D,O),(0,U.jsx)(Z,{busy:k,onBack:()=>i(2),next:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h,{icon:y,size:15}),`Start conversion`]}),disabled:R||L&&!D,onNext:()=>n(T,!!L&&D),aside:(0,U.jsx)(`span`,{className:`text-muted`,children:R?`Change what is not possible first.`:L&&!D?`Accept the limits to start.`:`Runs in the background.`})})]})]}),(0,U.jsx)(`div`,{className:`@5xl:sticky @5xl:top-6`,children:(0,U.jsx)(Ue,{view:e,file:s,found:l,only:d,to:m,instructions:S})})]})]})}function Ge({children:e,wide:t}){return(0,U.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,U.jsx)(k,{}),(0,U.jsx)(`main`,{className:v(j,`@container flex-auto gap-5`,t?`max-w-[1480px]`:`max-w-[1180px]`),children:e})]})}function Ke({action:e}){return(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-6 gap-y-2`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,U.jsx)(x,{pixel:I.tosca,size:`lg`}),(0,U.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Tosca`})]}),(0,U.jsx)(ie,{label:`Migration`,links:ae,current:`tosca`}),(0,U.jsx)(`span`,{className:`flex-1`}),e]})}function $({error:e}){return e?(0,U.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:e}):null}function qe({title:e,children:n}){let[r,i]=(0,H.useState)(!1),a=(0,H.useId)();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(!r),className:`inline-flex min-h-8 cursor-pointer items-center gap-1.5 self-start rounded-[8px] border-0 bg-transparent px-1 text-sm font-medium text-ink hover:bg-surface-strong`,children:[(0,U.jsx)(F,{size:15,"aria-hidden":`true`,className:v(`transition-transform`,r&&`rotate-180`)}),e]}),(0,U.jsx)(t,{open:r,id:a,children:n})]})}function Je({plan:t,accepted:n,onAccept:r}){let i=t.feasibility.findings.filter(e=>e.level===`blocker`),a=t.feasibility.findings.filter(e=>e.level===`limit`),o=t.cases.filter(e=>e.included),s=t.units.filter(e=>e.kind===`page`).length;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,U.jsxs)(`dl`,{className:`m-0 grid gap-x-6 gap-y-2.5 rounded-[14px] card border px-5 py-4 text-sm @xl:grid-cols-[auto_1fr]`,children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`From`}),(0,U.jsxs)(`dd`,{className:`m-0 [overflow-wrap:anywhere]`,children:[`Tricentis Tosca`,(0,U.jsxs)(`span`,{className:`text-muted`,children:[` `,`· `,(0,U.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:t.source.file}),t.source.project?` · ${t.source.project}`:``]})]}),(0,U.jsx)(`dt`,{className:`text-muted`,children:`To`}),(0,U.jsxs)(`dd`,{className:`m-0`,children:[t.target.title,(0,U.jsxs)(`span`,{className:`text-muted`,children:[` · `,t.target.dir]})]}),(0,U.jsx)(`dt`,{className:`text-muted`,children:`Files`}),(0,U.jsxs)(`dd`,{className:`m-0`,children:[o.length,` test`,o.length===1?``:`s`,` of `,t.cases.length,` test case`,t.cases.length===1?``:`s`,`, `,s,` page object`,s===1?``:`s`]}),(t.suites||[]).length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`Suites`}),(0,U.jsxs)(`dd`,{className:`m-0 [overflow-wrap:anywhere]`,children:[t.suites.map(e=>`${e.name} (${W(e.cases.length,`test`)})`).join(`, `),(0,U.jsxs)(`span`,{className:`block text-[12.5px] text-muted`,children:[`Tosca's execution lists, as tags on the tests: `,t.suites.map(e=>`@${e.tag}`).join(`, `),`.`]})]})]}),t.env.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`Environment variables`}),(0,U.jsxs)(`dd`,{className:`m-0 [overflow-wrap:anywhere]`,children:[t.env.map(e=>`${e.name}${e.secret?` (secret)`:``}`).join(`, `),(0,U.jsx)(`span`,{className:`block text-[12.5px] text-muted`,children:`Never in the export: you set them before the tests run.`})]})]}),t.instructions&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{className:`text-muted`,children:`Instructions`}),(0,U.jsx)(`dd`,{className:`m-0 whitespace-pre-wrap [overflow-wrap:anywhere]`,children:t.instructions})]})]}),i.length>0&&(0,U.jsxs)(`section`,{"aria-labelledby":`tsc-blockers`,className:`flex flex-col gap-2 rounded-[14px] bg-fail-soft px-5 py-4`,children:[(0,U.jsxs)(`h3`,{id:`tsc-blockers`,className:`m-0 flex items-center gap-2 text-sm font-semibold text-fail`,children:[(0,U.jsx)(e,{size:16,"aria-hidden":`true`}),`Not possible`]}),(0,U.jsx)(`ul`,{className:`m-0 flex list-disc flex-col gap-1 pl-5 text-sm text-ink`,children:i.map(e=>(0,U.jsx)(`li`,{children:e.text},e.code))})]}),a.length>0&&(0,U.jsxs)(`section`,{"aria-labelledby":`tsc-limits`,className:`flex flex-col gap-3 rounded-[14px] bg-warn-soft px-5 py-4`,children:[(0,U.jsxs)(`h3`,{id:`tsc-limits`,className:`m-0 flex items-center gap-2 text-sm font-semibold text-warn`,children:[(0,U.jsx)(e,{size:16,"aria-hidden":`true`}),`Before you start`]}),(0,U.jsx)(`ul`,{className:`m-0 flex list-disc flex-col gap-1.5 pl-5 text-sm text-ink`,children:a.map(e=>(0,U.jsx)(`li`,{children:e.text},e.code))}),r&&!i.length&&(0,U.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm font-medium`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:!!n,onChange:e=>r(e.target.checked)}),`I understand`]})]}),(0,U.jsx)(qe,{title:`Test cases (${t.cases.length})`,children:(0,U.jsx)(`ol`,{className:`m-0 flex list-none flex-col rounded-[12px] card border p-0 text-[13px]`,children:t.cases.map(e=>(0,U.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-x-3 border-b border-line-soft px-4 py-2 last:border-b-0`,children:[(0,U.jsx)(`span`,{className:v(`min-w-0 flex-1 [overflow-wrap:anywhere]`,e.included?`text-ink`:`text-muted`),children:e.name}),(0,U.jsx)(`span`,{className:`text-muted`,children:e.included?`${W(e.steps,`step`)} · ${W(e.asserts,`check`)}`:e.why}),(0,U.jsx)(`span`,{className:`w-16 flex-none text-right text-muted`,children:G[e.route]||e.route})]},e.id))})}),(0,U.jsx)(qe,{title:`Files, in order (${t.units.length})`,children:(0,U.jsx)(`ol`,{className:`m-0 flex list-none flex-col rounded-[12px] card border p-0 text-[13px]`,children:t.units.map(e=>(0,U.jsxs)(`li`,{className:`flex flex-wrap gap-x-3 border-b border-line-soft px-4 py-2 last:border-b-0`,children:[(0,U.jsx)(`span`,{className:`w-16 flex-none text-muted`,children:he[e.kind]}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:e.target})]},e.id))})})]})}function Ye({plan:e,acceptLimits:t,onClose:n,onStarted:i}){let[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)(!1),[l,u]=(0,H.useState)(``),d=async()=>{c(!0),u(``);try{i((await p.start(e.id,a,t)).detail)}catch(e){u(e.message),c(!1)}};return(0,U.jsx)(r,{open:!0,onClose:n,title:`Start the conversion`,description:`The Tosca test cases are written as ${e.target.title} tests in ${e.target.dir}, and ForgeQE runs each one. It runs in the background; the Tosca export is not changed.`,footer:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(S,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,U.jsx)(S,{variant:`primary`,disabled:s||a!==e.id,onClick:()=>void d(),children:`Start conversion`})]}),children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,U.jsxs)(`span`,{children:[`Type `,(0,U.jsx)(`span`,{className:`font-mono`,children:e.id}),` to confirm`]}),(0,U.jsx)(_,{value:a,onChange:e=>o(e.target.value),autoComplete:`off`,spellCheck:!1})]}),(0,U.jsx)($,{error:l})]})})}function Xe({d:e,onStarted:t}){let[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(!1),o=e.plan.feasibility.findings.some(e=>e.level===`limit`),s=e.plan.feasibility.verdict===`blocked`,c=!!e.job?.running;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[e.job?.last&&!c&&(0,U.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:`The last start did not run. Its job's log on the Jobs page says why.`}),(0,U.jsx)(Je,{plan:e.plan,accepted:e.confirmed||n,onAccept:e.confirmed?void 0:r}),!s&&!c&&(0,U.jsx)(`div`,{children:(0,U.jsxs)(S,{variant:`primary`,disabled:!e.confirmed&&o&&!n,onClick:()=>a(!0),children:[(0,U.jsx)(y,{"aria-hidden":`true`}),`Start conversion`]})}),i&&(0,U.jsx)(Ye,{plan:e.plan,acceptLimits:o&&(e.confirmed||n),onClose:()=>a(!1),onStarted:e=>{a(!1),t(e)}})]})}function Ze(e){return e.result?.status===`running`?`running`:e.result?.status===`converted`?`done`:e.result?`review`:`planned`}function Qe(e){return e.result?pe[e.result.status]:e.confirmed?{label:`Confirmed`,tone:`neutral`}:fe[e.verdict]}var $e=e=>e.slice(e.lastIndexOf(`/`)+1);function et({view:e}){let[t,n]=(0,H.useState)(`all`),r=t=>t===`all`?e.plans.length:e.plans.filter(e=>Ze(e)===t).length,a=e.plans.filter(e=>t===`all`||Ze(e)===t),o=e=>location.hash=i(`tosca`,e);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(ce,{children:[(0,U.jsx)(V,{label:`All`,value:r(`all`),onClick:()=>n(`all`),on:t===`all`}),(0,U.jsx)(V,{label:`Running`,value:r(`running`),onClick:()=>n(`running`),on:t===`running`}),(0,U.jsx)(V,{label:`Converted`,value:r(`done`),tone:r(`done`)?`text-pass`:void 0,onClick:()=>n(`done`),on:t===`done`}),(0,U.jsx)(V,{label:`Needs review`,value:r(`review`),tone:r(`review`)?`text-warn`:void 0,onClick:()=>n(`review`),on:t===`review`})]}),(0,U.jsx)(M,{label:`Conversions`,placeholder:`Find a conversion`,empty:t===`all`?`No conversions.`:`None here.`,resetKey:t,head:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`th`,{className:`py-1.5 pr-3 pl-3 font-medium`,children:`Conversion`}),(0,U.jsx)(`th`,{className:`py-1.5 pr-3 font-medium`,children:`Tests`}),(0,U.jsx)(`th`,{className:`py-1.5 pr-3 font-medium`,children:`Status`}),(0,U.jsx)(`th`,{className:`hidden py-1.5 pr-3 font-medium @xl:table-cell`,children:`Updated`})]}),children:a.map(e=>{let t=Qe(e),n=e.result?e.result.status===`converted`||e.result.endedAt?100:Math.round(e.result.done/Math.max(1,e.tests+1)*95):0;return(0,U.jsxs)(`tr`,{onClick:()=>o(e.id),className:A,children:[(0,U.jsx)(`td`,{className:T,children:(0,U.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,U.jsx)(`span`,{className:`hidden flex-none items-center gap-1 @xl:inline-flex`,"aria-hidden":`true`,children:(0,U.jsx)(z,{framework:e.targetId.split(`-`)[0],language:e.targetId.split(`-`).slice(1).join(`-`),size:18})}),(0,U.jsxs)(`span`,{className:`min-w-0`,children:[(0,U.jsxs)(`a`,{href:i(`tosca`,e.id),onClick:e=>e.stopPropagation(),className:`font-medium text-ink no-underline hover:underline`,children:[$e(e.file),` to `,e.target]}),(0,U.jsxs)(`span`,{className:`block text-[12px] text-muted`,children:[e.project?`${e.project} · `:``,e.into]})]})]})}),(0,U.jsx)(`td`,{className:v(T,`w-[180px] text-[13px]`),children:e.result?.status===`running`?(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(de,{value:n,label:`${$e(e.file)} to ${e.target}: progress`}),(0,U.jsxs)(`span`,{className:`w-9 flex-none text-right text-[12px] text-muted tabular-nums`,children:[n,`%`]})]}):e.result?(0,U.jsxs)(`span`,{className:e.result.converted===e.tests?`text-pass`:`text-ink-2`,children:[e.result.converted,` of `,e.tests,` pass`]}):(0,U.jsx)(`span`,{className:`text-muted`,children:`Not started`})}),(0,U.jsx)(`td`,{className:v(T,`whitespace-nowrap`),children:(0,U.jsx)(c,{tone:t.tone,children:t.label})}),(0,U.jsx)(`td`,{className:v(T,`hidden text-[12.5px] whitespace-nowrap text-muted @xl:table-cell`),children:ne(e.result?.endedAt||e.result?.at||e.createdAt)})]},e.id)})})]})}function tt({sub:e}){let[t,r]=(0,H.useState)(null),[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)(null),l=(0,H.useCallback)(()=>{p.list().then(e=>{r(e),o(``)},e=>o(e.message))},[]);(0,H.useEffect)(l,[l,e]);let u=t?.plans.some(e=>e.result?.status===`running`);(0,H.useEffect)(()=>{if(!u||e)return;let t=setInterval(l,3e3);return()=>clearInterval(t)},[u,e,l]);let d=e&&/^tsc-\d{8}-\d{6}-[0-9a-f]{4}$/.test(e)?e:``,f=()=>location.hash=i(`tosca`,`new`),m=!t&&!a&&(0,U.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`});return e===`new`?(0,U.jsxs)(Ge,{children:[(0,U.jsx)(Ke,{}),(0,U.jsx)($,{error:a}),m,t&&(0,U.jsx)(We,{view:t,review:(e,t,n)=>(0,U.jsx)(Je,{plan:e,accepted:t,onAccept:n}),onStart:(e,t)=>c({d:e,accept:t})}),s&&(0,U.jsx)(Ye,{plan:s.d.plan,acceptLimits:s.accept,onClose:()=>c(null),onStarted:e=>location.hash=i(`tosca`,e.plan.id)})]}):d?(0,U.jsxs)(Ge,{wide:!0,children:[(0,U.jsx)(Ke,{}),(0,U.jsx)($,{error:a}),m,t&&(0,U.jsx)(Ne,{id:d,plan:e=>(0,U.jsx)(Xe,{d:e,onStarted:()=>location.reload()})},d)]}):(0,U.jsxs)(Ge,{children:[(0,U.jsx)(Ke,{action:t&&!t.plans.length?void 0:(0,U.jsx)(S,{variant:`primary`,disabled:!t,onClick:f,children:`New conversion`})}),(0,U.jsx)($,{error:a}),m,t&&(t.plans.length?(0,U.jsx)(et,{view:t}):(0,U.jsx)(P,{icon:n,title:`No Tosca conversions yet`,action:(0,U.jsx)(S,{size:`sm`,onClick:f,children:`New conversion`}),children:`Pick a Tosca export (.tsu) in this project and the framework its test cases become. Every Tosca step and check is kept, and nothing starts until you confirm.`}))]})}export{tt as Tosca};