@vostride/agent-qa-dashboard-ui 0.1.12 → 0.1.14

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 (96) hide show
  1. package/dist/assets/{arrow-up-down-CN-uHgX9.js → arrow-up-down-D_ErIdrE.js} +1 -1
  2. package/dist/assets/{badge-DrW2vGVJ.js → badge-ClWCtaXi.js} +1 -1
  3. package/dist/assets/{batch-action-bar-uEhHVDds.js → batch-action-bar-BoqzHfwU.js} +1 -1
  4. package/dist/assets/{circle-alert-BKX0IIz1.js → circle-alert-D7wbtVU2.js} +1 -1
  5. package/dist/assets/{circle-x-yPIxYoz1.js → circle-x-BOV-jCVR.js} +1 -1
  6. package/dist/assets/config-BH2rUSDL.js +10 -0
  7. package/dist/assets/{copy-Clw3wvSn.js → copy-DW4nc-pA.js} +1 -1
  8. package/dist/assets/{display-step-NqsJgW_B.js → display-step-vpHdm2LX.js} +1 -1
  9. package/dist/assets/{dist-BPheZrD6.js → dist-BABsMbMt.js} +1 -1
  10. package/dist/assets/dist-Bc4r79ls.js +1 -0
  11. package/dist/assets/{dist-m_OM4Je_.js → dist-BsGrTrYb.js} +1 -1
  12. package/dist/assets/{empty-state-BTvOA5lp.js → empty-state-BTFWlITi.js} +1 -1
  13. package/dist/assets/{external-link-C_uggQOc.js → external-link-CnabSkqe.js} +1 -1
  14. package/dist/assets/{eye-CZrufbYE.js → eye-Cj7s1eMQ.js} +1 -1
  15. package/dist/assets/{file-code-B3iDpJRP.js → file-code-DxVUPin2.js} +1 -1
  16. package/dist/assets/{file-search-DHHwYVza.js → file-search-BRbGARSr.js} +1 -1
  17. package/dist/assets/filename-validation-wKCpNal3.js +1 -0
  18. package/dist/assets/{grip-vertical-A-AANrBM.js → grip-vertical-C5AW4fiD.js} +1 -1
  19. package/dist/assets/{hook-editor-yhQoi-Ky.js → hook-editor-KoqKvv73.js} +1 -1
  20. package/dist/assets/{hook-runtime-JF-0oZpz.js → hook-runtime-DZ6bR69q.js} +1 -1
  21. package/dist/assets/{hook-viewer-DIkxp9uJ.js → hook-viewer-DWsN8RyZ.js} +1 -1
  22. package/dist/assets/hooks-BfUXcuyV.js +1 -0
  23. package/dist/assets/{id-badge-NwZYoNfB.js → id-badge-BpTnHwvn.js} +2 -2
  24. package/dist/assets/{index-Bvtm2F6f.js → index-C3AdCkmj.js} +2 -2
  25. package/dist/assets/index-DzWZqTlZ.css +2 -0
  26. package/dist/assets/{insights-DuYBsUzB.js → insights-Dtq5Rwby.js} +1 -1
  27. package/dist/assets/{insights-line-grid-BKOqA-1W.js → insights-line-grid-X5lNbmTY.js} +6 -6
  28. package/dist/assets/{lib-58FyJI_k.js → lib-u_ZEFKZp.js} +1 -1
  29. package/dist/assets/live-run-CfMxOSfk.js +1 -0
  30. package/dist/assets/{memory-B7nfWNTH.js → memory-DS-02aNZ.js} +1 -1
  31. package/dist/assets/memory-product-5m-eyxzH.js +2 -0
  32. package/dist/assets/{monaco-editor-DNT0Mzki.js → monaco-editor-BEWq4fzI.js} +2 -2
  33. package/dist/assets/{monaco-editor-inner-DuCqlGei.js → monaco-editor-inner-B6AQm3h7.js} +2 -2
  34. package/dist/assets/{monaco.contribution-LYJB_lCm.js → monaco.contribution-Dum2B1vn.js} +2 -2
  35. package/dist/assets/{observation-block-4AqYhL1h.js → observation-block-2qfTbm41.js} +1 -1
  36. package/dist/assets/{observation-markdown-Dx_5-T0t.js → observation-markdown-CIs-5TY2.js} +1 -1
  37. package/dist/assets/{pencil-DdRoBrsh.js → pencil-BUQgVaEH.js} +1 -1
  38. package/dist/assets/plus-Bf5Mbita.js +1 -0
  39. package/dist/assets/popover-OAiTzjiL.js +1 -0
  40. package/dist/assets/{refresh-cw-C_0AkMuu.js → refresh-cw-D0OwRzvm.js} +1 -1
  41. package/dist/assets/{resizable-BGEcNRZO.js → resizable-ugU12HrY.js} +1 -1
  42. package/dist/assets/run-detail-Cr984qgU.js +1 -0
  43. package/dist/assets/runs-CDAIeUbq.js +1 -0
  44. package/dist/assets/{scroll-area-CnATfQoe.js → scroll-area-CX3T8JWh.js} +1 -1
  45. package/dist/assets/{select-CeVjgiKI.js → select-D0GpDfUa.js} +1 -1
  46. package/dist/assets/{shortcut-hints-Bs5o743i.js → shortcut-hints-B8kCurzo.js} +1 -1
  47. package/dist/assets/split-button-CRYV8xU8.js +1 -0
  48. package/dist/assets/square-K8N8Yius.js +1 -0
  49. package/dist/assets/{step-name-pills-Dta5ZGMZ.js → step-name-pills-BQ8yv40K.js} +1 -1
  50. package/dist/assets/suite-editor-aAjvjp2R.js +5 -0
  51. package/dist/assets/suite-navbar-UATCw4Qb.js +1 -0
  52. package/dist/assets/suite-viewer-CmbLH1G2.js +1 -0
  53. package/dist/assets/{suites-BvfwzFEd.js → suites-BlJfefzt.js} +1 -1
  54. package/dist/assets/{switch-ByV5GV5L.js → switch-Dv7aVqt1.js} +1 -1
  55. package/dist/assets/tab-console-Ciur_Bee.js +1 -0
  56. package/dist/assets/{table-D08QBBt4.js → table-BOjrxBBL.js} +1 -1
  57. package/dist/assets/{tabs-DrB_Acb3.js → tabs-BEp-p5jh.js} +1 -1
  58. package/dist/assets/test-editor-CFzp3eq1.js +9 -0
  59. package/dist/assets/test-navbar-ChNg-qki.js +7 -0
  60. package/dist/assets/{test-viewer-BwUQNVa4.js → test-viewer-DEQQDURn.js} +1 -1
  61. package/dist/assets/tests-Dzlh9Zho.js +1 -0
  62. package/dist/assets/{tests-suites-table-widths-DNWnkAjA.js → tests-suites-table-widths-D2sc1JmR.js} +1 -1
  63. package/dist/assets/{textarea-DChEVvwQ.js → textarea-BFsDx2mB.js} +1 -1
  64. package/dist/assets/{trash-2-7P1Dp87k.js → trash-2-Dv939XWG.js} +1 -1
  65. package/dist/assets/{tsMode-DEhRZlmT.js → tsMode-CnaplBFQ.js} +1 -1
  66. package/dist/assets/use-hook-run-session-BLSTM6LJ.js +1 -0
  67. package/dist/assets/{use-keyboard-shortcuts-EAppuiKO.js → use-keyboard-shortcuts-COnAPsDD.js} +1 -1
  68. package/dist/assets/{use-page-title-B1t9-5_U.js → use-page-title-CsUoFrfG.js} +1 -1
  69. package/dist/assets/use-run-status-favicon-DLOLF3Hx.js +1 -0
  70. package/dist/assets/{use-selection-queue-BboTDies.js → use-selection-queue-BkEWIfvw.js} +1 -1
  71. package/dist/assets/{viewer-url-state-6mOK5_sY.js → viewer-url-state-PwkMc-qK.js} +1 -1
  72. package/dist/assets/{zap-KFJmkY3Y.js → zap-Dx2CqraS.js} +1 -1
  73. package/dist/index.html +2 -2
  74. package/package.json +2 -2
  75. package/dist/assets/config-TRu3J-E7.js +0 -10
  76. package/dist/assets/dist-BPJgj1d0.js +0 -1
  77. package/dist/assets/filename-validation-4sTTEagx.js +0 -1
  78. package/dist/assets/hooks-CDRbjPKv.js +0 -1
  79. package/dist/assets/index-CW7tbJhs.css +0 -2
  80. package/dist/assets/live-run-ucgeJa3o.js +0 -1
  81. package/dist/assets/memory-product-D1u5V75o.js +0 -2
  82. package/dist/assets/plus-pXO98OAE.js +0 -1
  83. package/dist/assets/popover-DGZi688D.js +0 -1
  84. package/dist/assets/run-detail-3tlB8sew.js +0 -1
  85. package/dist/assets/runs-CywxkFZ6.js +0 -1
  86. package/dist/assets/split-button-DcY8ames.js +0 -1
  87. package/dist/assets/square-D71GHEET.js +0 -1
  88. package/dist/assets/suite-editor-Bnf6KMna.js +0 -5
  89. package/dist/assets/suite-navbar-PStktQ6j.js +0 -1
  90. package/dist/assets/suite-viewer-BD74MY_X.js +0 -1
  91. package/dist/assets/tab-console-BQFkZJG_.js +0 -1
  92. package/dist/assets/test-editor-w7ZQPYgH.js +0 -9
  93. package/dist/assets/test-navbar-DoHKAy1p.js +0 -7
  94. package/dist/assets/tests-B5ELKDH2.js +0 -1
  95. package/dist/assets/use-hook-run-session-x-d_iodT.js +0 -1
  96. package/dist/assets/use-run-status-favicon-D69P46yH.js +0 -1
@@ -0,0 +1,9 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{c as t}from"./id-badge-BpTnHwvn.js";import{t as n}from"./monaco-editor-BEWq4fzI.js";import{t as r}from"./file-code-DxVUPin2.js";import{n as i}from"./split-button-CRYV8xU8.js";import{t as a}from"./refresh-cw-D0OwRzvm.js";import{a as o,c as s,i as ee,n as te,o as c,r as ne,s as l,t as re}from"./filename-validation-wKCpNal3.js";import{t as ie}from"./use-page-title-CsUoFrfG.js";import{a as ae,c as u,d as oe,f as d,i as se,l as ce,n as le,o as ue,p as f,r as de,s as fe,t as pe,u as p}from"./test-navbar-ChNg-qki.js";import{a as me,r as he}from"./dist-BsGrTrYb.js";import{i as ge,n as _e,r as ve,t as ye}from"./tabs-BEp-p5jh.js";import{$n as be,At as xe,Bt as Se,Ct as Ce,E as we,Ft as m,Gt as h,H as Te,It as g,Jn as Ee,Lt as De,Mt as _,Nt as v,O as Oe,Ot as ke,P as y,Pn as Ae,Rt as je,Ut as Me,Vn as b,Vt as Ne,Wt as x,Xt as Pe,dr as Fe,dt as Ie,er as S,jt as C,lr as Le,mr as Re,pt as w,r as ze,ur as Be,zt as Ve}from"./index-C3AdCkmj.js";import{n as T,r as He,t as Ue}from"./resizable-ugU12HrY.js";import{t as We}from"./empty-state-BTFWlITi.js";import{t as Ge}from"./use-keyboard-shortcuts-COnAPsDD.js";import{t as Ke}from"./observation-markdown-CIs-5TY2.js";var E=e(Re(),1),D=be();function qe(e){return e>=.7?`text-emerald-500`:e>=.4?`text-amber-500`:`text-destructive`}function Je(e){try{return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Ye({observation:e,onDelete:t,isDeleting:n}){return(0,D.jsxs)(`div`,{className:`rounded-md border bg-card/60 px-3 py-2 space-y-1.5`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-3 text-[11px]`,children:[(0,D.jsxs)(_,{children:[(0,D.jsx)(m,{asChild:!0,children:(0,D.jsx)(`span`,{className:h(`font-mono tabular-nums font-medium cursor-default`,qe(e.trust)),children:e.trust.toFixed(2)})}),(0,D.jsx)(v,{side:`top`,className:`max-w-xs text-xs`,children:`Trust score (0–1). Higher means the agent is more confident this observation is accurate. Increases when confirmed across runs, decreases when contradicted.`})]}),(0,D.jsxs)(_,{children:[(0,D.jsx)(m,{asChild:!0,children:(0,D.jsx)(`span`,{className:`text-muted-foreground cursor-default`,children:Je(e.created)})}),(0,D.jsx)(v,{side:`top`,className:`text-xs`,children:`First observed on this date`})]}),(0,D.jsxs)(_,{children:[(0,D.jsx)(m,{asChild:!0,children:(0,D.jsxs)(`span`,{className:`text-muted-foreground cursor-default`,children:[e.confirmed_count,`x confirmed · `,e.contradicted_count,`x contradicted`]})}),(0,D.jsx)(v,{side:`top`,className:`max-w-xs text-xs`,children:`Confirmed: how many runs validated this observation. Contradicted: how many runs found it inaccurate.`})]}),(0,D.jsx)(`div`,{className:`ml-auto`,children:(0,D.jsxs)(ae,{children:[(0,D.jsx)(f,{asChild:!0,children:(0,D.jsx)(x,{type:`button`,variant:`ghost`,size:`icon-sm`,disabled:n,"aria-label":`Delete observation: ${e.title.slice(0,40)}`,className:`shrink-0 text-muted-foreground/70 hover:text-destructive`,children:(0,D.jsx)(Ae,{className:`size-3.5`})})}),(0,D.jsxs)(u,{size:`sm`,children:[(0,D.jsxs)(oe,{children:[(0,D.jsx)(d,{children:`Delete observation?`}),(0,D.jsx)(ce,{children:`This observation will be permanently removed. The agent will no longer use it during future runs.`})]}),(0,D.jsxs)(p,{children:[(0,D.jsx)(fe,{children:`Cancel`}),(0,D.jsx)(ue,{variant:`destructive`,onClick:()=>t(e.id),disabled:n,children:`Delete Observation`})]})]})]})})]}),(0,D.jsxs)(`div`,{className:`space-y-2`,children:[(0,D.jsx)(`h4`,{className:`text-sm font-semibold tracking-tight text-foreground`,children:e.title}),(0,D.jsx)(Ke,{content:e.content})]})]})}function Xe({testId:e}){let[t,n]=(0,E.useState)([]),[r,i]=(0,E.useState)([]),[o,s]=(0,E.useState)(!0),[ee,te]=(0,E.useState)(null),[c,ne]=(0,E.useState)(null),l=(0,E.useCallback)(()=>{let t=!1;return s(!0),te(null),i([]),w(e).then(e=>{t||(n(e.observations),i(e.invalidFiles),s(!1))}).catch(e=>{t||(n([]),te(e instanceof Error?e.message:`Failed to load observations`),s(!1))}),()=>{t=!0}},[e]);(0,E.useEffect)(()=>l(),[l]);let re=(0,E.useCallback)(async t=>{ne(t);try{await y(e,t),n(e=>e.filter(e=>e.id!==t)),C.success(`Observation deleted`)}catch(e){C.error(`Failed to delete: ${e instanceof Error?e.message:String(e)}`)}finally{ne(null)}},[e]);return o?(0,D.jsxs)(`div`,{className:`space-y-2 px-4 py-2`,children:[(0,D.jsx)(g,{className:`h-16 w-full rounded-md`}),(0,D.jsx)(g,{className:`h-16 w-full rounded-md`}),(0,D.jsx)(g,{className:`h-16 w-full rounded-md`})]}):ee?(0,D.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 px-4 py-12 text-center`,children:[(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Could not load observations. Check that the dashboard server is running and try again.`}),(0,D.jsxs)(x,{variant:`outline`,size:`sm`,onClick:l,children:[(0,D.jsx)(a,{className:`mr-1.5 size-3.5`}),`Retry`]})]}):t.length===0?(0,D.jsxs)(`div`,{className:`space-y-3 px-4 py-2`,children:[r.length>0?(0,D.jsx)(Ze,{invalidFiles:r}):null,(0,D.jsx)(We,{icon:Ee,title:`No observations yet`,description:`Memory observations are created automatically when this test runs. They help the agent remember facts about your product.`})]}):(0,D.jsxs)(`div`,{className:`space-y-2 px-4 py-2`,children:[r.length>0?(0,D.jsx)(Ze,{invalidFiles:r}):null,(0,D.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,D.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[t.length,` observation`,t.length===1?``:`s`]})}),(0,D.jsx)(`div`,{className:`space-y-2`,children:t.map(e=>(0,D.jsx)(Ye,{observation:e,onDelete:re,isDeleting:c===e.id},e.id))})]})}function Ze({invalidFiles:e}){return(0,D.jsxs)(`div`,{className:`rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs text-amber-950 dark:text-amber-200`,children:[(0,D.jsxs)(`p`,{className:`font-medium`,children:[e.length,` invalid memory file`,e.length===1?``:`s`,` hidden from this panel.`]}),(0,D.jsx)(`p`,{className:`mt-1 text-[11px] text-amber-900/80 dark:text-amber-200/80`,children:e.map(e=>e.filename).join(`, `)})]})}var Qe=`name: My Test
2
+ test-id: ""
3
+ target: ""
4
+ context: ""
5
+ steps:
6
+ - Navigate to the homepage
7
+ - Verify the page loads
8
+ `;function $e({text:e}){return(0,D.jsxs)(_,{children:[(0,D.jsx)(m,{asChild:!0,children:(0,D.jsx)(b,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,D.jsx)(v,{className:`max-w-[250px] text-[13px]`,children:e})]})}function et(e){return e instanceof DOMException&&e.name===`AbortError`||e instanceof Error&&e.name===`AbortError`}function tt(e,t,n){if(t===`web`)return n||e?.url||`Configured start URL`;let r=e?.device;return(typeof r?.deviceName==`string`?r.deviceName:typeof r?.name==`string`?r.name:null)||e?.product||e?.bundleId||e?.appPackage||(t===`android`?`Android device`:`iOS device`)}function nt(e){return JSON.stringify({text:e.text,overrides:e.overrides??null})}function rt(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function it(e){let t=(0,E.useRef)([]);return(0,E.useMemo)(()=>{let n=t.current,r=new Set,i=e.map((e,t)=>{let i=nt(e),a=n[t];if(a&&a.signature===i)return r.add(a.id),{id:a.id,instruction:e.text,signature:i};let o=n.find(e=>e.signature===i&&!r.has(e.id));return o?(r.add(o.id),{id:o.id,instruction:e.text,signature:i}):a&&!r.has(a.id)?(r.add(a.id),{id:a.id,instruction:e.text,signature:i}):{id:crypto.randomUUID(),instruction:e.text,signature:i}});return t.current=i.map(({id:e,signature:t})=>({id:e,signature:t})),i},[e])}function at(){let{t_id:e}=Be(),a=Le(),[ae]=Fe(),u=Pe(),{defaultRunMode:oe}=i(),{targets:d,globalUse:ce,isLoading:ue}=t(),f=e??``,{suggestions:fe}=te(f||null),p=!e,be=ae.get(`live`)===`1`,m=(0,E.useRef)(null),h=(0,E.useRef)(null),g=(0,E.useRef)(null),Ee=(0,E.useRef)(()=>{}),_=(0,E.useRef)(!1),[v,y]=(0,E.useState)(p?Qe:``),[Ae,b]=(0,E.useState)(``),[x,Re]=(0,E.useState)(``),[w,Ke]=(0,E.useState)(!p),[qe,Je]=(0,E.useState)(!1),[Ye,Ze]=(0,E.useState)(!1),[nt,at]=(0,E.useState)(!1),[ot,st]=(0,E.useState)(!1),[O,ct]=(0,E.useState)(null),[k,A]=(0,E.useState)(null),[j,M]=(0,E.useState)(null),[N,P]=(0,E.useState)(!1),[F,I]=(0,E.useState)(!1),[L,R]=(0,E.useState)(null),[lt,z]=(0,E.useState)(`reasoning`),[ut,B]=(0,E.useState)(null),[dt,V]=(0,E.useState)({setup:[],teardown:[]}),[H,ft]=(0,E.useState)(null),[pt,mt]=(0,E.useState)(!1),[ht,gt]=(0,E.useState)(!1),[U,_t]=(0,E.useState)(void 0),[vt,yt]=(0,E.useState)(``),W=!p&&v!==Ae,bt=p&&x?re(x.trim(),U,`testMatch`):null,xt=p&&!!x&&!!bt;(0,E.useEffect)(()=>{if(p)return;let e=!1;return Ke(!0),Ie(f).then(t=>{e||(y(t.content),b(t.content),yt(t.path))}).catch(()=>{e||(Je(!0),C.error(`Failed to load test file`))}).finally(()=>{e||Ke(!1)}),()=>{e=!0}},[f,p]),(0,E.useEffect)(()=>{if(!p)return;let e=!1;return Te().then(t=>{if(e)return;let n=t.config.workspace?.testMatch;_t(Array.isArray(n)?n:[])}).catch(()=>{e||_t([])}),()=>{e=!0}},[p]),(0,E.useEffect)(()=>{if(!p)return;let e=he();y(t=>de(t,[`test-id`],e))},[p]);let G=(0,E.useMemo)(()=>se(v),[v]);G&&(m.current=G);let K=G??m.current,q=it(K?.steps??[]),St=(0,E.useMemo)(()=>q.map(e=>({draftId:e.id,instruction:e.instruction})),[q]),J=(0,E.useMemo)(()=>G?{testName:G.name.trim()||`Untitled Live Draft`,testContext:G.context.trim()||void 0}:null,[G]),Y=ee(k,{steps:St,setupHooks:dt.setup,teardownHooks:dt.teardown,allowReconnect:!1}),X=Y.terminateSession;g.current=k,Ee.current=X;let Ct=K?.target?.trim()??``,wt=Ct?d[Ct]:void 0,Tt=k?Y.platform:wt?.platform??`web`,Et=(0,E.useMemo)(()=>tt(wt,Tt,Y.currentUrl),[wt,Tt,Y.currentUrl]),Dt=G===null?`invalid`:W||p?`unsaved`:`saved`,Ot=(0,E.useMemo)(()=>q.map(e=>e.id),[q]),Z=F?`connecting`:Y.connectionState,Q=k!==null,kt=Q&&G!==null&&!rt(G.setup,dt.setup);ie((0,E.useMemo)(()=>Q&&j!==null?`Live #${j} — ${K?.name?.trim()||f||`Test`}`:p?`New Test`:`Edit Test`,[Q,j,K?.name,f,p]));let At=(0,E.useMemo)(()=>L===`ended`?{reason:`ended`,title:`Live session ended`,description:`The current draft is unchanged. Close live mode or start a fresh disposable session from this target.`}:L===`disconnected`?{reason:`disconnected`,title:`Live session disconnected`,description:`The connection dropped and the disposable session was terminated. Start a fresh session to reconnect.`}:null,[L]),jt=Q&&Z===`connected`&&G!==null&&G.steps.some(e=>e.text.trim()),Mt=F||Q,Nt=F||Q||ot||O!==null||G===null||!G?.target.trim()||ue,$=(0,E.useCallback)(async()=>{Ze(!0);try{if(p){let e=re(x.trim(),U,`testMatch`);if(e){C.error(e);return}await Oe(x.trim(),v),C.success(`Test file created`),a(S.testView(G?.testId??``))}else await ke(f,v),b(v),C.success(`Saved`)}catch(e){C.error(`Failed to save: ${e instanceof Error?e.message:String(e)}`)}finally{Ze(!1)}},[p,x,U,v,f,a,G]),Pt=(0,E.useCallback)(()=>{o(`page`,`closing live mode`,{liveSessionId:k??void 0,terminalReason:L??void 0}),h.current?.abort(),h.current=null,k&&X(),I(!1),A(null),M(null),R(null),B(null),V({setup:[],teardown:[]}),P(!1)},[k,L,X]),Ft=(0,E.useCallback)(()=>{o(`page`,`ending live session from UI`,{liveSessionId:k??void 0}),h.current?.abort(),h.current=null,k&&X(),I(!1),A(null),M(null),R(`ended`),B(null),V({setup:[],teardown:[]}),P(!0)},[k,X]),It=(0,E.useCallback)(async(e,t)=>{let n=e.target.trim();if(!n){C.error(`Select a target before starting live mode`);return}let r=new AbortController;h.current?.abort(),h.current=r,P(!0),R(null),z(`reasoning`),B(null),I(!0);try{t?.replaceCurrentSession&&k&&(X(),A(null),M(null));let i=ne({content:v,targetName:n,targets:d,globalUse:ce});o(`page`,`requesting live session`,{targetName:n,platform:i.platform,headless:i.headless??void 0,replacingSession:t?.replaceCurrentSession??!1});let a=[...e.setup],s=[...e.teardown],ee=e.testId?.trim()||null,te=ee?{type:`test`,id:ee}:void 0,{sessionId:c,sessionNumber:l}=await we({...i,setupHooks:a,teardownHooks:s,entity:te},r.signal);if(r.signal.aborted)return;V({setup:a,teardown:s}),A(c),M(l),o(`page`,`live session created`,{sessionId:c,targetName:n})}catch(e){et(e)||(o(`page`,`failed to create live session`,{error:e instanceof Error?e.message:String(e),targetName:n}),C.error(e instanceof Error?e.message:`Failed to start live session`)),t?.replaceCurrentSession||P(!1)}finally{h.current===r&&(h.current=null),I(!1)}},[v,ce,k,d,X]),Lt=(0,E.useCallback)(async()=>{if(!Nt){if(!G){C.error(`Fix YAML errors before starting live mode`);return}await It(G)}},[G,It,Nt]),Rt=(0,E.useCallback)(async()=>{if(Q){if(!G){C.error(`Fix YAML errors before restarting live mode`);return}await It(G,{replaceCurrentSession:!0})}},[G,Q,It]),zt=(0,E.useCallback)(e=>{if(e){P(!0);return}Pt()},[Pt]),Bt=async()=>{at(!0);try{let e=await xe(v,vt||x.trim());if(e.valid)C.success(`Valid YAML`);else{let t=e.errors.map(e=>e.line?`Line ${e.line}: ${e.message}`:e.message).join(`
9
+ `);C.error(t)}}catch(e){C.error(`Validation error: ${e instanceof Error?e.message:String(e)}`)}finally{at(!1)}},Vt=(0,E.useCallback)(async e=>{if(!ot){try{if(p){let e=re(x.trim(),U,`testMatch`);if(e){C.error(e);return}await Oe(x.trim(),v),a(S.testView(G?.testId??``));return}W&&(await ke(f,v),b(v))}catch(e){C.error(`Failed to save before run: ${e instanceof Error?e.message:String(e)}`);return}st(!0);try{ct((await Ce({file:vt,local:e})).runId),C.success(`Run started`)}catch(e){C.error(`Failed to start run: ${e instanceof Error?e.message:String(e)}`),st(!1)}}},[ot,p,x,U,v,W,f,vt,a,G]),Ht=(0,E.useCallback)(()=>{ct(null),st(!1)},[]),Ut=(0,E.useCallback)(e=>{if(!Q)return;if(!J){C.error(`Fix YAML errors before running live steps. Live mode uses the current valid draft, not the last valid snapshot.`);return}let t=Y.steps[e]?.id;t&&B({type:`step`,stepId:t}),z(`reasoning`),Y.executeStepByIndex(e,J)},[J,Q,Y]),Wt=(0,E.useCallback)(e=>{Y.runningStepIndex===e&&(z(`reasoning`),Y.cancelStep())},[Y]),Gt=(0,E.useCallback)((e,t)=>{if(!Q)return;if(e===`setup`){C.error(`Setup hooks only run when a live session starts`);return}let n=Y.teardownHooks.find(e=>e.id===t);n&&B({type:`hook`,hookId:n.id}),z(`reasoning`),Y.executeHookById(e,t)},[Q,Y]);if((0,E.useEffect)(()=>()=>{h.current?.abort(),g.current&&Ee.current()},[]),(0,E.useEffect)(()=>{k&&Z===`disconnected`&&(o(`page`,`live session moved to terminal state`,{liveSessionId:k,liveConnectionState:Z}),A(null),M(null),I(!1),R(`disconnected`),B(null),V({setup:[],teardown:[]}),P(!0))},[Z,k]),(0,E.useEffect)(()=>{!be||_.current||p||w||qe||F||N||Q||!G||!G.target.trim()||(_.current=!0,a(S.testEdit(f),{replace:!0}),Lt())},[G,Lt,Q,p,F,w,N,a,qe,be,f]),(0,E.useEffect)(()=>{H&&!Ot.includes(H)&&ft(null)},[Ot,H]),(0,E.useEffect)(()=>{if(!N){B(null);return}let e=[...Y.setupHooks,...Y.teardownHooks];if(Y.steps.length===0&&e.length===0){B(null);return}B(t=>t?.type===`hook`&&e.some(e=>e.id===t.hookId)||t&&`stepId`in t&&Y.steps.some(e=>e.id===t.stepId)?t:e.length>0?{type:`hook`,hookId:e[0].id}:{type:`step`,stepId:Y.steps[0].id})},[Y.setupHooks,Y.steps,Y.teardownHooks,N]),Ge((0,E.useMemo)(()=>({r:()=>{p||Vt(oe===`local`)},escape:()=>{O&&Ht()}}),[p,O,Vt,Ht,oe])),(0,E.useEffect)(()=>{function e(e){(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),$())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[$]),w)return(0,D.jsx)(ze,{});if(qe)return(0,D.jsx)(We,{icon:r,title:`Test not found`,description:`This test file doesn't exist`,actionLabel:`View All Tests`,onAction:()=>a(S.tests)});let Kt=(0,D.jsx)(le,{content:v,onChange:y,isCreateMode:p,showLiveStepActions:Q,canRunLiveStep:Z===`connected`&&G!==null,canRunLiveHook:Z===`connected`&&G!==null,liveEditorSteps:Y.steps,draftStepIds:Ot,liveSetupHooks:Y.setupHooks,liveTeardownHooks:Y.teardownHooks,onRunLiveStep:Ut,onCancelLiveStep:Wt,onRunLiveHook:Gt,openStepSettingsId:H,onOpenStepSettingsChange:ft,selection:ut,onSelect:B,variableSuggestions:fe}),qt=(0,D.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[p&&(0,D.jsx)(`div`,{className:`px-4 pt-3`,children:(0,D.jsxs)(`div`,{className:`rounded-md border bg-muted/15 px-3 py-2`,children:[(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsxs)(me,{className:`flex items-center gap-1 text-xs font-medium`,children:[`File Path `,(0,D.jsx)($e,{text:`Path is relative to your workspace root. Must match your workspace's testMatch pattern. Directories are created automatically on save.`})]}),(0,D.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Created only when you save`})]}),(0,D.jsx)(Me,{placeholder:`my-test.yaml`,value:x,onChange:e=>Re(e.target.value),className:`mt-2 max-w-md ${xt?`border-red-500 focus-visible:ring-red-500`:``}`}),xt&&(0,D.jsx)(`p`,{className:`mt-1 text-xs text-red-500`,children:bt})]})}),(0,D.jsxs)(ye,{defaultValue:`builder`,className:`flex-1 flex min-h-0 flex-col`,children:[(0,D.jsxs)(ve,{variant:`line`,className:`px-4`,children:[(0,D.jsx)(ge,{value:`builder`,children:`Builder`}),(0,D.jsx)(ge,{value:`yaml`,children:`YAML`}),!p&&(0,D.jsx)(ge,{value:`memory`,children:`Memory`})]}),(0,D.jsx)(_e,{value:`builder`,className:`mt-2 flex-1 overflow-auto`,children:Kt}),(0,D.jsx)(_e,{value:`yaml`,className:`flex-1 min-h-0 mt-2`,children:(0,D.jsx)(n,{value:v,onChange:y,onSave:$,showErrors:!0,className:`h-full`})}),!p&&(0,D.jsx)(_e,{value:`memory`,className:`mt-2 flex-1 overflow-auto`,children:(0,D.jsx)(Xe,{testId:f})})]})]}),Jt=(0,D.jsx)(c,{connectionState:Y.connectionState,isLaunching:F,targetName:Ct||`Selected Target`,targetLabel:Et,liveSessionNumber:j,platform:Tt,screenshot:Y.screenshot,currentUrl:Y.currentUrl,pendingNavigation:Y.pendingNavigation,steps:Y.steps,setupHooks:Y.setupHooks,teardownHooks:Y.teardownHooks,selection:ut,runningStepId:Y.runningStepId,terminalState:At,draftState:Dt,ariaTree:Y.ariaTree,errorMessage:Y.error,devtoolsTab:lt,canRunAll:jt,isRunningAll:Y.isRunningAll,isStoppingRunAll:Y.isStoppingRunAll,setupHooksStale:kt,onDevtoolsTabChange:z,onRunAll:()=>{if(!J){C.error(`Fix YAML errors before running live steps. Live mode uses the current valid draft, not the last valid snapshot.`);return}Y.runAll(J)},onStopAll:Y.cancelRunAll,onEndSession:Ft,onRestartSession:kt?()=>void Rt():void 0,showEndSessionAction:u,onCloseLiveMode:Pt,onStartFreshSession:()=>void Lt(),onBack:Y.goBack,onForward:Y.goForward,onRefresh:Y.refreshPage,onNavigate:Y.navigate,onRequestAriaTree:Y.requestAriaTree});return(0,D.jsxs)(`div`,{className:`flex flex-col h-screen`,children:[(0,D.jsx)(pe,{testName:p?`New Test`:K?.name??f,testId:K?.testId??``,unsaved:W,isCreateMode:p,mode:p?`view`:`edit`,testHref:p?void 0:S.testView(f),isSaving:Ye,isValidating:nt,isRunning:ot,runDisabled:Mt,hasInvalidFilename:xt,showTestId:!1,hasLiveSession:Q,liveConnectionState:Z,isLiveActionDisabled:Nt,liveSessionNumber:j,onBack:()=>a(p?S.tests:S.testView(f)),onSave:$,onValidate:Bt,onRun:Vt,onLiveConnect:N?void 0:Lt,onLiveEnd:Q?Ft:void 0,onSettingsOpen:()=>mt(!0),shortcutsOpen:ht,onToggleShortcuts:()=>gt(e=>!e)}),O?(0,D.jsxs)(He,{orientation:`horizontal`,className:`flex-1 rounded-md border border-border`,children:[(0,D.jsx)(T,{defaultSize:60,minSize:30,children:(0,D.jsx)(n,{value:v,onChange:y,onSave:$,className:`h-full`})}),(0,D.jsx)(Ue,{withHandle:!0}),(0,D.jsx)(T,{defaultSize:40,minSize:25,children:(0,D.jsx)(l,{runId:O,onClose:Ht})})]}):N&&!u?(0,D.jsxs)(He,{orientation:`horizontal`,className:`flex-1 rounded-md border border-border`,children:[(0,D.jsx)(T,{defaultSize:42,minSize:34,children:qt}),(0,D.jsx)(Ue,{withHandle:!0}),(0,D.jsx)(T,{defaultSize:58,minSize:38,children:Jt})]}):qt,(0,D.jsx)(De,{open:pt,onOpenChange:mt,children:(0,D.jsxs)(je,{side:`right`,className:`sm:max-w-[400px] overflow-y-auto p-0`,children:[(0,D.jsxs)(Se,{className:`px-4 pt-4 pb-2`,children:[(0,D.jsx)(Ne,{children:`Test Settings`}),(0,D.jsx)(Ve,{children:`Advanced configuration for this test`})]}),(0,D.jsx)(`div`,{className:`px-4 pb-4`,children:(0,D.jsx)(s,{content:v,onChange:y,selectedTarget:K?.target})})]})}),u&&(0,D.jsx)(De,{open:N,onOpenChange:zt,children:(0,D.jsxs)(je,{side:`bottom`,showCloseButton:!1,className:`h-[100dvh] max-h-[100dvh] rounded-none p-0`,children:[(0,D.jsxs)(Se,{className:`sr-only`,children:[(0,D.jsx)(Ne,{children:`Live Session`}),(0,D.jsx)(Ve,{children:`Live execution workspace for the current draft.`})]}),Jt]})})]})}export{at as default};
@@ -0,0 +1,7 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{i as t,n,o as r,s as i,t as a}from"./select-D0GpDfUa.js";import{t as o}from"./circle-alert-D7wbtVU2.js";import{C as s,S as c,_ as l,a as u,b as d,c as f,d as p,f as m,g as h,h as g,l as ee,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w,v as T,w as E,x as D,y as te}from"./id-badge-BpTnHwvn.js";import{n as ne,r as O}from"./monaco-editor-BEWq4fzI.js";import{c as k,t as A}from"./split-button-CRYV8xU8.js";import{t as re}from"./grip-vertical-C5AW4fiD.js";import{n as j,r as M,t as N}from"./shortcut-hints-B8kCurzo.js";import{t as ie}from"./plus-Bf5Mbita.js";import{t as P}from"./refresh-cw-D0OwRzvm.js";import{n as F,t as ae}from"./textarea-BFsDx2mB.js";import{t as oe}from"./square-K8N8Yius.js";import{a as I,r as L}from"./dist-BsGrTrYb.js";import{n as R,r as z,t as se}from"./popover-OAiTzjiL.js";import{t as ce}from"./switch-Dv7aVqt1.js";import{$n as B,Bn as V,Fn as le,Ft as H,Gn as ue,Gt as U,In as de,Ln as fe,Mt as W,Nn as pe,Nt as G,Pn as me,Tn as he,Ut as K,Vn as ge,Wn as q,Wt as J,an as _e,cn as ve,cr as ye,dn as be,fn as xe,in as Se,jn as Ce,ln as we,mr as Te,on as Ee,rn as De,sn as Oe,un as ke,wn as Ae,zn as je}from"./index-C3AdCkmj.js";import{t as Me}from"./badge-ClWCtaXi.js";var Y=e(Te(),1),X=B(),Ne=`AlertDialog`,[Pe,Fe]=he(Ne,[xe]),Z=xe(),Ie=e=>{let{__scopeAlertDialog:t,...n}=e,r=Z(t);return(0,X.jsx)(ve,{...r,...n,modal:!0})};Ie.displayName=Ne;var Le=`AlertDialogTrigger`,Re=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,X.jsx)(ke,{...i,...r,ref:t})});Re.displayName=Le;var ze=`AlertDialogPortal`,Be=e=>{let{__scopeAlertDialog:t,...n}=e,r=Z(t);return(0,X.jsx)(Oe,{...r,...n})};Be.displayName=ze;var Ve=`AlertDialogOverlay`,He=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,X.jsx)(Ee,{...i,...r,ref:t})});He.displayName=Ve;var Q=`AlertDialogContent`,[Ue,We]=Pe(Q),Ge=Ce(`AlertDialogContent`),Ke=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Z(n),o=Y.useRef(null),s=pe(t,o),c=Y.useRef(null);return(0,X.jsx)(be,{contentName:Q,titleName:qe,docsSlug:`alert-dialog`,children:(0,X.jsx)(Ue,{scope:n,cancelRef:c,children:(0,X.jsxs)(Se,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:Ae(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,X.jsx)(Ge,{children:r}),(0,X.jsx)(tt,{contentRef:o})]})})})});Ke.displayName=Q;var qe=`AlertDialogTitle`,Je=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,X.jsx)(we,{...i,...r,ref:t})});Je.displayName=qe;var Ye=`AlertDialogDescription`,Xe=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,X.jsx)(_e,{...i,...r,ref:t})});Xe.displayName=Ye;var Ze=`AlertDialogAction`,Qe=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Z(n);return(0,X.jsx)(De,{...i,...r,ref:t})});Qe.displayName=Ze;var $e=`AlertDialogCancel`,et=Y.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=We($e,n),a=Z(n),o=pe(t,i);return(0,X.jsx)(De,{...a,...r,ref:o})});et.displayName=$e;var tt=({contentRef:e})=>{let t=`\`${Q}\` requires a description for the component to be accessible for screen reader users.
2
+
3
+ You can add a description to the \`${Q}\` by passing a \`${Ye}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
+
5
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Q}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
+
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return Y.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},nt=Ie,rt=Re,it=Be,at=He,ot=Ke,st=Qe,ct=et,lt=Je,ut=Xe;function dt({...e}){return(0,X.jsx)(nt,{"data-slot":`alert-dialog`,...e})}function ft({...e}){return(0,X.jsx)(rt,{"data-slot":`alert-dialog-trigger`,...e})}function pt({...e}){return(0,X.jsx)(it,{"data-slot":`alert-dialog-portal`,...e})}function mt({className:e,...t}){return(0,X.jsx)(at,{"data-slot":`alert-dialog-overlay`,className:U(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function ht({className:e,size:t=`default`,...n}){return(0,X.jsxs)(pt,{children:[(0,X.jsx)(mt,{}),(0,X.jsx)(ot,{"data-slot":`alert-dialog-content`,"data-size":t,className:U(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...n})]})}function gt({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:U(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function _t({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:U(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function vt({className:e,...t}){return(0,X.jsx)(lt,{"data-slot":`alert-dialog-title`,className:U(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function yt({className:e,...t}){return(0,X.jsx)(ut,{"data-slot":`alert-dialog-description`,className:U(`text-sm text-muted-foreground`,e),...t})}function bt({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,X.jsx)(J,{variant:t,size:n,asChild:!0,children:(0,X.jsx)(st,{"data-slot":`alert-dialog-action`,className:U(e),...r})})}function xt({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,X.jsx)(J,{variant:t,size:n,asChild:!0,children:(0,X.jsx)(ct,{"data-slot":`alert-dialog-cancel`,className:U(e),...r})})}var St={running:{label:`Running`,badgeClass:`border-primary/30 bg-primary/10 text-primary`,cardClass:`live-running-surface border-border/60 bg-primary/5`},cancelling:{label:`Cancelling`,badgeClass:`border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400`,cardClass:`border-amber-500/30 bg-amber-500/5`},passed:{label:`Passed`,badgeClass:`border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`,cardClass:`border-emerald-500/25 bg-emerald-500/[0.03]`},failed:{label:`Failed`,badgeClass:`border-destructive/30 bg-destructive/10 text-destructive`,cardClass:`border-destructive/25 bg-destructive/[0.03]`},cancelled:{label:`Cancelled`,badgeClass:`border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400`,cardClass:`border-amber-500/25 bg-amber-500/[0.03]`}};function Ct(e){let t=[];return e.timeout&&t.push(`TIMEOUT: ${e.timeout.toUpperCase()}`),e.retries!=null&&t.push(`RETRIES: ${e.retries}`),e.screenshot!=null&&t.push(`SCREENSHOT: ${e.screenshot?`ON`:`OFF`}`),e.maxAttempts!=null&&t.push(`MAX ATTEMPTS: ${e.maxAttempts}`),t.length>0?t.join(` · `):null}function wt(e){return e instanceof HTMLElement?!!e.closest(`button, textarea, input, select, label, [role="switch"]`):!1}function Tt({result:e}){switch(e){case`success`:return(0,X.jsx)(q,{className:`size-3.5 text-emerald-500`});case`failure`:return(0,X.jsx)(de,{className:`size-3.5 text-destructive`});default:return(0,X.jsx)(E,{className:`size-3.5 text-muted-foreground`})}}function Et({status:e}){switch(e){case`running`:return(0,X.jsx)(V,{className:`size-3.5 animate-spin text-primary`});case`cancelling`:return(0,X.jsx)(V,{className:`size-3.5 animate-spin text-amber-500`});case`passed`:return(0,X.jsx)(q,{className:`size-3.5 text-emerald-500`});case`failed`:return(0,X.jsx)(de,{className:`size-3.5 text-destructive`});case`cancelled`:return(0,X.jsx)(E,{className:`size-3.5 text-amber-500`})}}function Dt(e){if(!e.plannedAction)return`Sub-action ${e.index+1}`;try{let t=typeof e.plannedAction==`string`?JSON.parse(e.plannedAction):e.plannedAction;if(t&&typeof t==`object`){let e=[t.type||t.action||``,t.target||t.selector||t.ref||``].filter(Boolean).join(` `);if(e)return e}}catch{if(typeof e.plannedAction==`string`)return e.plannedAction}return`Sub-action ${e.index+1}`}function Ot({id:e,index:t,value:n,overrides:r,onChange:i,onOverrideChange:a,onDelete:o,disabled:s=!1,liveStatus:l=`idle`,showLiveControls:d=!1,canRunLiveStep:f=!1,onRunLiveStep:p,onCancelLiveStep:m,stepError:h,isSettingsOpen:g=!1,onToggleSettings:ee,isSelected:v=!1,onSelectStep:b,subActions:x,selectedSubActionIndex:C=null,onSelectSubAction:w,suggestions:T=[],hookLabels:E={}}){let D=l===`running`||l===`cancelling`,{attributes:te,listeners:ne,setNodeRef:O,transform:k,transition:A,isDragging:j}=_({id:e,disabled:s||D}),M=(0,Y.useRef)(null),[N,ie]=(0,Y.useState)(0),P=u({text:n,cursorPos:N,suggestions:T,anchorRef:M,onInsert:(0,Y.useCallback)((e,r,a)=>{i(t,n.slice(0,r)+e+n.slice(a)),requestAnimationFrame(()=>{let t=M.current;if(t){let n=r+e.length;t.selectionStart=n,t.selectionEnd=n,t.focus()}})},[n,i,t])}),F=(0,Y.useMemo)(()=>Object.fromEntries(T.filter(e=>e.namespace===`runHook`&&e.insertValue).map(e=>[e.insertValue,e.name])),[T]),ae=(0,Y.useMemo)(()=>({...E,...F}),[E,F]),L=Ct(r),R=L!==null,z=l===`idle`?null:St[l],se=v||g||D,B=(0,Y.useCallback)(()=>{let e=M.current;e&&(e.style.height=`0`,e.style.height=`${e.scrollHeight}px`)},[]);(0,Y.useEffect)(()=>{B()},[n,B]),(0,Y.useEffect)(()=>{let e=M.current;if(!e)return;let t=new ResizeObserver(()=>B());return t.observe(e.parentElement??e),()=>t.disconnect()},[B]);let le={transform:c.Transform.toString(k),transition:A,opacity:j?.5:1,zIndex:j?10:void 0},H=(0,Y.useCallback)(t=>{!b||wt(t)||b(e)},[e,b]);return(0,X.jsxs)(`div`,{ref:O,style:le,onClick:e=>H(e.target),className:U(`group/step relative overflow-hidden rounded-md border bg-card/60 transition-colors`,`hover:bg-card`,j&&`shadow-lg ring-2 ring-primary/20`,z?.cardClass,v&&`ring-2 ring-primary/35 ring-offset-1 ring-offset-background bg-primary/[0.04]`,s&&`pointer-events-none opacity-60`),children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2 px-3 py-2`,children:[(0,X.jsx)(`button`,{type:`button`,className:`mt-0.5 flex shrink-0 items-center p-0.5 text-muted-foreground/40 hover:text-muted-foreground cursor-grab active:cursor-grabbing touch-none disabled:cursor-not-allowed`,"aria-label":`Reorder step ${t+1}`,disabled:s||D,...te,...ne,children:(0,X.jsx)(re,{className:`size-3.5`})}),(0,X.jsxs)(`span`,{className:`mt-[3px] shrink-0 text-[11px] tabular-nums text-muted-foreground/50`,children:[`#`,t+1]}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[l!==`idle`&&z&&(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-muted-foreground`,children:[(0,X.jsx)(Et,{status:l}),(0,X.jsx)(`span`,{className:`font-medium`,children:z.label})]}),(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(`textarea`,{ref:M,value:n,onChange:e=>{i(t,e.target.value),ie(e.target.selectionStart??0),B()},onKeyDown:e=>{P.handleKeyDown(e)},onBlur:()=>{setTimeout(()=>P.setVisible(!1),150)},placeholder:`Describe what this step should do...`,disabled:s||D,rows:1,className:`min-w-0 w-full resize-none overflow-hidden border-none bg-transparent p-0 text-sm text-foreground outline-none placeholder:text-muted-foreground/40`,"aria-haspopup":P.visible?`listbox`:void 0,"aria-expanded":P.visible||void 0}),P.dropdown]}),S(n)&&(0,X.jsx)(y,{text:n,hookLabels:ae}),(R||g)&&(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-muted-foreground/70`,children:[(0,X.jsx)(fe,{className:`size-3 shrink-0`}),(0,X.jsx)(`span`,{className:`truncate text-[11px] font-mono uppercase tracking-wide`,children:L??`Step settings open`})]})]}),(0,X.jsx)(`div`,{className:`flex shrink-0 items-start gap-2`,children:(0,X.jsxs)(`div`,{className:U(`mt-0.5 flex shrink-0 items-center gap-1 transition-opacity`,se?`opacity-100`:`opacity-0 pointer-events-none group-hover/step:pointer-events-auto group-hover/step:opacity-100 group-focus-within/step:pointer-events-auto group-focus-within/step:opacity-100`),children:[d&&(D?(0,X.jsxs)(J,{type:`button`,variant:`outline`,size:`xs`,onClick:()=>m?.(t),disabled:s||!m,children:[l===`cancelling`?(0,X.jsx)(V,{className:`size-3 animate-spin`}):(0,X.jsx)(oe,{className:`size-3`}),`Cancel`]}):(0,X.jsxs)(J,{type:`button`,variant:`outline`,size:`xs`,onClick:()=>p?.(t),disabled:s||!f||!p,children:[(0,X.jsx)(je,{className:`size-3`}),`Run`]})),(0,X.jsx)(J,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:()=>ee?.(e),disabled:s,className:U(`shrink-0 text-muted-foreground/70 hover:text-foreground`,g&&`bg-muted/60 text-foreground`),"aria-label":`Open settings for step ${t+1}`,title:`Step settings`,children:(0,X.jsx)(fe,{className:`size-3.5`})}),(0,X.jsxs)(dt,{children:[(0,X.jsx)(ft,{asChild:!0,children:(0,X.jsx)(J,{type:`button`,variant:`ghost`,size:`icon-sm`,disabled:s||D,"aria-label":`Delete step ${t+1}`,title:`Delete step`,className:`text-muted-foreground/70 hover:text-destructive`,children:(0,X.jsx)(me,{className:`size-3.5`})})}),(0,X.jsxs)(ht,{size:`sm`,children:[(0,X.jsxs)(gt,{children:[(0,X.jsx)(vt,{children:`Delete step?`}),(0,X.jsxs)(yt,{children:[`Step #`,t+1,` will be removed. This cannot be undone.`]})]}),(0,X.jsxs)(_t,{children:[(0,X.jsx)(xt,{children:`Cancel`}),(0,X.jsx)(bt,{variant:`destructive`,onClick:()=>o(t),children:`Delete`})]})]})]})]})})]}),g&&(0,X.jsx)(`div`,{className:`border-t px-3 py-3`,children:(0,X.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(I,{htmlFor:`step-${t}-timeout`,className:`text-[11px] text-muted-foreground`,children:`Timeout`}),(0,X.jsx)(K,{id:`step-${t}-timeout`,value:r.timeout??``,onChange:e=>a(t,`timeout`,e.target.value||void 0),placeholder:`e.g. 30s`,disabled:s,className:`h-8 text-xs`})]}),(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(I,{htmlFor:`step-${t}-retries`,className:`text-[11px] text-muted-foreground`,children:`Retries`}),(0,X.jsx)(K,{id:`step-${t}-retries`,type:`number`,min:0,value:r.retries??``,onChange:e=>a(t,`retries`,e.target.value?Number(e.target.value):void 0),placeholder:`0`,disabled:s,className:`h-8 text-xs`})]}),(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(I,{htmlFor:`step-${t}-maxAttempts`,className:`text-[11px] text-muted-foreground`,children:`Max Attempts`}),(0,X.jsx)(K,{id:`step-${t}-maxAttempts`,type:`number`,min:1,value:r.maxAttempts??``,onChange:e=>a(t,`maxAttempts`,e.target.value?Number(e.target.value):void 0),placeholder:`1`,disabled:s,className:`h-8 text-xs`})]}),(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(I,{className:`text-[11px] text-muted-foreground`,children:`Screenshot`}),(0,X.jsx)(`div`,{className:`flex h-8 items-center`,children:(0,X.jsx)(ce,{checked:r.screenshot??!1,onCheckedChange:e=>a(t,`screenshot`,e?!0:void 0),disabled:s})})]})]})}),x&&x.length>0&&(0,X.jsxs)(`div`,{className:`border-t px-3 py-2`,children:[(0,X.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,X.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:`Sub-actions`}),(0,X.jsx)(Me,{variant:`outline`,className:`text-[10px]`,children:x.length})]}),(0,X.jsx)(`div`,{className:`space-y-1`,children:x.map((t,n)=>(0,X.jsxs)(`button`,{type:`button`,onClick:()=>w?.(e,n),className:U(`flex w-full items-center gap-2 rounded-md border px-2.5 py-2 text-left text-xs transition-colors`,C===n?`border-primary/40 bg-primary/10 text-foreground`:`border-border/60 bg-background/70 text-muted-foreground hover:border-border hover:text-foreground`),children:[(0,X.jsx)(Tt,{result:t.result}),(0,X.jsxs)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:[`#`,n+1]}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:Dt(t)})]},`${e}-sub-${n}`))})]}),l===`failed`&&(0,X.jsx)(`div`,{className:`border-t px-3 py-2 text-xs text-destructive`,children:h||`Step failed. Select the step to inspect reasoning, env, network, or console output.`})]})}function kt({text:e}){return(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{asChild:!0,children:(0,X.jsx)(ge,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,X.jsx)(G,{className:`max-w-[250px] text-[13px]`,children:e})]})}function At({name:e,testId:o,target:c,context:l,isCreateMode:u,onChange:d,disabled:p=!1}){let{targets:m,isLoading:h}=ee(),{targets:g}=f(),_=c?g[c]:void 0;return(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,X.jsxs)(I,{htmlFor:`test-name`,className:`text-xs`,children:[`Test Name `,(0,X.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,X.jsx)(K,{id:`test-name`,value:e,onChange:e=>d(`name`,e.target.value),placeholder:`My Test`,disabled:p,className:`h-8 text-sm`})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,X.jsxs)(I,{htmlFor:`test-id`,className:`text-xs flex items-center gap-1`,children:[`Test ID `,(0,X.jsx)(kt,{text:`Unique identifier used for memory and analytics. Changing this breaks the association with past runs and observations.`})]}),u?(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(K,{id:`test-id`,value:o,readOnly:!0,disabled:!0,className:`h-8 text-sm font-mono flex-1`}),(0,X.jsx)(J,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:()=>d(`test-id`,L()),"aria-label":`Generate new ID`,disabled:p,children:(0,X.jsx)(P,{className:`size-3.5`})})]}):(0,X.jsx)(`p`,{className:`text-[13px] font-mono text-muted-foreground`,children:o||`No ID assigned`})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,X.jsxs)(I,{htmlFor:`test-target`,className:`text-xs flex items-center gap-1`,children:[`Target `,(0,X.jsx)(`span`,{className:`text-destructive`,children:`*`}),` `,(0,X.jsx)(kt,{text:`A registered app target from your workspace config. Defines where the test runs (web URL or mobile app).`})]}),!h&&m.length===0?(0,X.jsxs)(`p`,{className:`text-[13px] text-muted-foreground`,children:[`No targets configured.`,` `,(0,X.jsx)(ye,{to:`/config`,className:`text-primary underline underline-offset-4 hover:text-primary/80`,children:`Add targets in Settings`}),`.`]}):(0,X.jsxs)(a,{value:c||void 0,onValueChange:e=>d(`target`,e),disabled:p||h,children:[(0,X.jsx)(r,{className:`w-full h-8 text-sm`,children:(0,X.jsx)(i,{placeholder:`Select a target`})}),(0,X.jsx)(n,{children:m.map(e=>(0,X.jsx)(t,{value:e,children:e},e))})]}),_&&(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[13px] text-muted-foreground mt-1.5`,children:[_.platform===`web`?(0,X.jsx)(k,{className:`h-3.5 w-3.5 shrink-0`}):(0,X.jsx)(s,{className:`h-3.5 w-3.5 shrink-0`}),(0,X.jsx)(`span`,{className:`text-muted-foreground/70 uppercase text-[11px] tracking-wider shrink-0`,children:_.platform}),(0,X.jsxs)(`span`,{className:`font-mono truncate`,children:[_.product&&(0,X.jsx)(`span`,{className:`mr-1.5`,children:_.product}),_.platform===`web`&&_.url,_.platform===`android`&&`${_.appPackage}${_.appActivity?` / ${_.appActivity}`:``}`,_.platform===`ios`&&_.bundleId]})]})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,X.jsxs)(I,{htmlFor:`test-context`,className:`text-xs flex items-center gap-1`,children:[`Context `,(0,X.jsx)(kt,{text:`Additional instructions the AI agent receives before executing steps. Use this for login credentials, test-specific rules, or environment details.`})]}),(0,X.jsx)(ae,{id:`test-context`,value:l,onChange:e=>d(`context`,e.target.value),placeholder:`Additional instructions for the AI agent...`,disabled:p,className:`min-h-[60px] resize-none text-sm`,rows:2})]})]})}var jt=[`name`,`test-id`,`target`,`use`,`meta`,`context`,`setup`,`steps`,`teardown`];function Mt(e){function t(e,n){if(x(e)){n?e.items.sort((e,t)=>{let n=jt.indexOf(String(e.key)),r=jt.indexOf(String(t.key));return(n===-1?jt.length:n)-(r===-1?jt.length:r)}):e.items.sort((e,t)=>String(e.key).localeCompare(String(t.key)));for(let n of e.items)t(n.value,!1)}}t(e.contents,!0)}function $(e){return Mt(e),e.toString()}function Nt(e,t,n){let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function Pt(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Ft(e){try{let t=v(e);if(t.errors.length>0)return null;let n=t.toJSON();return!n||typeof n!=`object`?null:{name:n.name??``,testId:n[`test-id`]??``,target:n.target??``,context:n.context??``,setup:Pt(n.setup),steps:Array.isArray(n.steps)?n.steps.map(e=>{if(typeof e==`string`)return{text:e,overrides:{}};let t=e;return{text:t.step??``,overrides:{timeout:t.timeout,retries:t.retries,screenshot:t.screenshot,maxAttempts:t.maxAttempts}}}):[],teardown:Pt(n.teardown)}}catch{return null}}function It(e,t,n){try{let r=v(e);return n===void 0||Array.isArray(n)&&n.length===0?r.deleteIn(t):r.setIn(t,n),$(r)}catch{return e}}function Lt(e,t,n){try{let r=v(e),i=r.getIn([`steps`,t]);if(i&&typeof i==`object`&&`toJSON`in i){let e=i.toJSON();if(e&&typeof e==`object`&&`step`in e)return r.setIn([`steps`,t,`step`],n),$(r)}return r.setIn([`steps`,t],n),$(r)}catch{return e}}function Rt(e,t,n,r){try{let i=v(e),a=i.getIn([`steps`,t]),o=a&&typeof a==`object`&&`toJSON`in a?a.toJSON():a;if(typeof o==`string`||!o){let e=typeof o==`string`?o:``;i.setIn([`steps`,t],{step:e,[n]:r})}else if(r===void 0||r===``||r===null){i.deleteIn([`steps`,t,n]);let e=i.getIn([`steps`,t])?.toJSON?.();e&&typeof e==`object`&&Object.keys(e).filter(e=>e!==`step`).length===0&&i.setIn([`steps`,t],e.step??``)}else i.setIn([`steps`,t,n],r);return $(i)}catch{return e}}function zt(e,t){try{let n=v(e),r=n.getIn([`steps`]);return r&&typeof r.deleteIn==`function`&&r.deleteIn([t]),$(n)}catch{return e}}function Bt(e){try{let t=v(e),n=t.toJSON(),r=Array.isArray(n?.steps)?[...n.steps,``]:[``];return t.setIn([`steps`],r),$(t)}catch{return e}}function Vt(e,t,n,r){try{if(n===r||n<0||r<0)return e;let i=v(e),a=i.getIn([t]),o=a&&typeof a==`object`&&`toJSON`in a&&typeof a.toJSON==`function`?a.toJSON():a;return!Array.isArray(o)||n>=o.length||r>=o.length?e:(i.setIn([t],Nt(o,n,r)),$(i))}catch{return e}}function Ht({status:e}){switch(e){case`running`:return(0,X.jsx)(E,{className:`size-3.5 text-primary`});case`passed`:return(0,X.jsx)(q,{className:`size-3.5 text-emerald-500`});case`failed`:return(0,X.jsx)(de,{className:`size-3.5 text-destructive`});default:return(0,X.jsx)(le,{className:`size-3.5 text-muted-foreground`})}}function Ut({phase:e,title:t,hooks:n,selection:r,onSelect:i,canRunHook:a=!1,onRunHook:o}){return n.length===0?null:(0,X.jsxs)(`div`,{"data-live-hook-section":e,className:`space-y-1.5`,children:[(0,X.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:t}),(0,X.jsx)(`div`,{className:`space-y-1.5`,children:n.map(e=>(0,X.jsxs)(`div`,{className:U(`relative overflow-hidden flex items-center gap-2 rounded-md border bg-muted/15 px-3 py-2 transition-colors`,e.status===`running`?`live-running-surface border-border/60 bg-primary/5`:r?.type===`hook`&&r.hookId===e.id?`border-primary/20 bg-primary/10 ring-1 ring-primary/30`:`border-border/60 hover:border-border hover:bg-muted/25`),children:[(0,X.jsxs)(`button`,{type:`button`,onClick:()=>i?.({type:`hook`,hookId:e.id}),className:`flex min-w-0 flex-1 items-center gap-2 text-left`,children:[(0,X.jsx)(Ht,{status:e.status}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.name}),(0,X.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.id}),(0,X.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e.status===`pending`?`Waiting for session lifecycle`:e.status===`running`?`Running hook`:e.status===`passed`?`Completed`:e.error??`Hook failed`})]})]}),a&&(0,X.jsxs)(J,{type:`button`,variant:`outline`,size:`xs`,className:`shrink-0`,onClick:t=>{t.stopPropagation(),i?.({type:`hook`,hookId:e.id}),o?.(e.phase,e.id)},disabled:e.status===`running`||!o,children:[(0,X.jsx)(je,{className:`size-3`}),`Run`]})]},e.id))})]})}function Wt({content:e,onChange:t,isCreateMode:n,disabled:r=!1,showLiveStepActions:i=!1,canRunLiveStep:a=!1,canRunLiveHook:s=!1,liveEditorSteps:c,draftStepIds:u,liveSetupHooks:f,liveTeardownHooks:ee,onRunLiveStep:_,onCancelLiveStep:v,onRunLiveHook:y,openStepSettingsId:x,onOpenStepSettingsChange:S,selection:C,onSelect:E,variableSuggestions:ne}){let O=(0,Y.useRef)(null),{hooks:k,warningCopy:A}=w(),re=(0,Y.useMemo)(()=>Object.fromEntries(k.map(e=>[e.id,e.name])),[k]),j=Ft(e),M=j===null,N=j??O.current;j&&(O.current=j);let P=D(d(T,{activationConstraint:{distance:8}}),d(l,{coordinateGetter:b})),F=(0,Y.useCallback)((n,r)=>{t(It(e,[n],r))},[e,t]),ae=(0,Y.useCallback)((n,r)=>{t(Lt(e,n,r))},[e,t]),oe=(0,Y.useCallback)((n,r,i)=>{t(Rt(e,n,r,i))},[e,t]),I=(0,Y.useCallback)(n=>{t(zt(e,n))},[e,t]),L=(0,Y.useCallback)(()=>{t(Bt(e))},[e,t]),R=(0,Y.useMemo)(()=>N?.steps.map((e,t)=>u?.[t]??c?.[t]?.id??`draft-step-${t}`)??[],[N?.steps,u,c]),z=(0,Y.useCallback)(n=>{if(r||M)return;let{active:i,over:a}=n;if(!a||i.id===a.id)return;let o=R.indexOf(String(i.id)),s=R.indexOf(String(a.id));if(o===-1||s===-1)return;let c=Vt(e,`steps`,o,s);c!==e&&t(c)},[e,r,t,R,M]);return(0,X.jsx)(`div`,{className:`flex flex-col`,children:(0,X.jsxs)(`div`,{className:`space-y-4 p-4`,children:[M&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive`,children:[(0,X.jsx)(o,{className:`size-4 shrink-0`}),(0,X.jsx)(`span`,{children:`YAML has errors — builder shows last valid state`})]}),N?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(At,{name:N.name,testId:N.testId,target:N.target,context:N.context,isCreateMode:n??!1,onChange:F,disabled:r||M}),(0,X.jsxs)(`div`,{className:`space-y-3 rounded-md border bg-card/20 p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(le,{className:`size-4 text-muted-foreground`}),(0,X.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Hooks`})]}),(0,X.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/50`,children:[N.setup.length+N.teardown.length,` `,N.setup.length+N.teardown.length===1?`hook`:`hooks`]})]}),A&&(0,X.jsxs)(`div`,{className:`flex gap-2 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300`,children:[(0,X.jsx)(o,{className:`mt-0.5 size-3.5 shrink-0`}),(0,X.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,X.jsx)(`p`,{className:`font-medium`,children:A.title}),(0,X.jsx)(`p`,{children:A.body})]})]}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Search hook names or paste an h_ ID. Saved as stable ID in YAML. Inline runHook uses the stable hook ID.`}),(0,X.jsx)(p,{phase:`setup`,label:`Setup`,values:N.setup,suggestions:k,disabled:r||M,placeholder:`Search hook names or paste an h_ ID`,onChange:e=>F(`setup`,e)}),(0,X.jsx)(p,{phase:`teardown`,label:`Teardown`,values:N.teardown,suggestions:k,disabled:r||M,placeholder:`Search hook names or paste an h_ ID`,onChange:e=>F(`teardown`,e)})]})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[i&&(0,X.jsx)(Ut,{phase:`setup`,title:`Setup Run Status`,hooks:f??[],selection:C??null,onSelect:E,canRunHook:!1,onRunHook:y}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,X.jsxs)(`span`,{className:`text-xs font-medium text-muted-foreground flex items-center gap-1`,children:[`Steps`,(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{asChild:!0,children:(0,X.jsx)(ge,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,X.jsx)(G,{className:`max-w-[250px] text-[13px]`,children:`Plain-English instructions the AI agent executes in order. Each step is interpreted and acted upon independently.`})]})]}),(0,X.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/50`,children:[N.steps.length,` `,N.steps.length===1?`step`:`steps`]})]}),(0,X.jsx)(h,{sensors:P,collisionDetection:te,onDragEnd:z,children:(0,X.jsx)(m,{items:R,strategy:g,children:(0,X.jsx)(`div`,{className:`space-y-1.5`,children:N.steps.map((e,t)=>(()=>{let n=c?.[t],o=R[t]??n?.id??`draft-step-${t}`,s=C?.type===`subaction`&&C.stepId===o?C.subIndex:null,l=C?.type===`step`||C?.type===`subaction`?C.stepId===o:!1,u=n?.status??`idle`;return(0,X.jsx)(Ot,{id:o,index:t,value:e.text,overrides:e.overrides,onChange:ae,onOverrideChange:oe,onDelete:I,disabled:r||M,liveStatus:u,showLiveControls:i,canRunLiveStep:a&&!!e.text.trim(),onRunLiveStep:_,onCancelLiveStep:v,stepError:n?.error,isSettingsOpen:x===o,onToggleSettings:e=>S?.(x===e?null:e),isSelected:l,onSelectStep:e=>E?.({type:`step`,stepId:e}),subActions:n?.subActionsData??null,selectedSubActionIndex:s,onSelectSubAction:(e,t)=>E?.({type:`subaction`,stepId:e,subIndex:t}),suggestions:ne,hookLabels:re},o)})())})})}),(0,X.jsxs)(J,{variant:`outline`,size:`sm`,className:`w-full mt-2 text-xs`,onClick:L,disabled:r||M,children:[(0,X.jsx)(ie,{className:`size-3.5`}),`Add Step`]}),i&&(0,X.jsx)(Ut,{phase:`teardown`,title:`Teardown Run Status`,hooks:ee??[],selection:C??null,onSelect:E,canRunHook:s,onRunHook:y})]})]}):(0,X.jsx)(`div`,{className:`flex items-center justify-center py-12 text-sm text-muted-foreground`,children:`Enter valid YAML to use the visual builder`})]})})}function Gt({testName:e,testId:t,unsaved:n,isCreateMode:r,mode:i=`view`,testHref:a,isSaving:o,isValidating:s,isRunning:c,runDisabled:l=!1,hasInvalidFilename:u,shortcutsOpen:d,showTestId:f=!0,hasLiveSession:p=!1,liveConnectionState:m=`disconnected`,isLiveActionDisabled:h=!1,liveSessionNumber:g=null,onSave:ee,onValidate:_,onRun:v,onLiveConnect:y,onLiveEnd:b,onSettingsOpen:x,onToggleShortcuts:S}){let w=i===`view`&&!r,T=!!y||!!b||p||m===`connecting`,E=!r||T,D=!r&&!w&&i===`edit`,te=!w&&p&&typeof g==`number`&&(m===`connected`||m===`executing`),k=`Start a disposable live session for this test. Setup hooks run on connect, teardown hooks run when the session ends, and changes are not saved automatically.`;return(0,X.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center justify-between border-b px-4 min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,X.jsx)(ye,{to:`/tests`,className:`text-sm text-muted-foreground hover:text-foreground transition-colors shrink-0`,children:`Tests`}),(0,X.jsx)(ue,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),r?(0,X.jsx)(`span`,{className:`text-sm font-medium truncate`,children:`New Test`}):a&&!w?(0,X.jsx)(ye,{to:a,className:`truncate text-sm font-medium hover:text-primary transition-colors`,children:e}):(0,X.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e}),D&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ue,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,X.jsx)(`span`,{className:`text-sm font-medium truncate`,children:`Edit`})]}),n&&(0,X.jsx)(Me,{variant:`outline`,className:`text-xs`,children:`Unsaved`}),!w&&!r&&t&&f&&(0,X.jsx)(C,{label:`T`,value:t})]}),(0,X.jsx)(`div`,{className:`flex items-center gap-3 shrink-0`,children:w?(0,X.jsxs)(X.Fragment,{children:[a?(0,X.jsx)(J,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(ye,{to:a,children:[`Edit`,(0,X.jsx)(N,{shortcut:`E`})]})}):(0,X.jsxs)(J,{variant:`outline`,size:`sm`,disabled:!0,children:[`Edit`,(0,X.jsx)(N,{shortcut:`E`})]}),(0,X.jsx)(A,{onRun:v,disabled:c||l,label:c?`Running...`:`Run`,shortcutKey:`R`,size:`sm`}),T&&(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{asChild:!0,children:(0,X.jsxs)(J,{size:`sm`,onClick:y,disabled:h||!y,children:[m===`connecting`?(0,X.jsx)(V,{className:`h-3.5 w-3.5 animate-spin`}):(0,X.jsx)(O,{className:`h-3.5 w-3.5`}),m===`connecting`?`Connecting...`:`Connect Live Session`,(0,X.jsx)(N,{shortcut:`L`,className:`border-primary-foreground/20 bg-primary-foreground/10 text-primary-foreground`})]})}),(0,X.jsx)(G,{className:`max-w-sm text-[13px]`,children:k})]}),!r&&(0,X.jsxs)(se,{open:d,onOpenChange:e=>{e||S()},children:[(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{asChild:!0,children:(0,X.jsx)(z,{asChild:!0,children:(0,X.jsx)(J,{variant:`ghost`,size:`icon-sm`,onClick:S,"aria-label":`Shortcuts`,children:(0,X.jsx)(M,{className:`h-3.5 w-3.5`})})})}),(0,X.jsx)(G,{children:`Shortcuts`})]}),(0,X.jsx)(R,{align:`end`,sideOffset:8,className:`w-72 p-4`,children:(0,X.jsx)(`div`,{className:`space-y-3`,children:(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h4`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-2`,children:`Actions`}),(0,X.jsx)(j,{hints:[{key:`E`,label:`Edit`},{key:`R`,label:`Run`},{key:`L`,label:`Connect Live Session`}]})]})})})]})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(J,{variant:`ghost`,size:`sm`,onClick:_,disabled:s||u,children:[(0,X.jsx)(q,{className:`h-3.5 w-3.5`}),s?`Validating...`:`Validate`]}),(0,X.jsxs)(J,{variant:`ghost`,size:`sm`,onClick:ee,disabled:o||u,children:[(0,X.jsx)(ne,{className:`h-3.5 w-3.5`}),o?`Saving...`:`Save`]}),(0,X.jsxs)(J,{variant:`ghost`,size:`sm`,onClick:x,children:[(0,X.jsx)(F,{className:`h-3.5 w-3.5`}),`Settings`]}),E&&(0,X.jsx)(`div`,{className:`h-4 w-px bg-border`}),!r&&(0,X.jsx)(X.Fragment,{children:(0,X.jsx)(A,{onRun:v,disabled:c||l,label:c?`Running...`:`Run`,size:`sm`})}),T&&(p&&m!==`connecting`?(0,X.jsxs)(J,{variant:`destructive`,size:`sm`,onClick:b,disabled:!b,children:[(0,X.jsx)(oe,{className:`h-3.5 w-3.5`}),`End Live Session`]}):(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{asChild:!0,children:(0,X.jsxs)(J,{size:`sm`,onClick:y,disabled:h||!y,children:[m===`connecting`?(0,X.jsx)(V,{className:`h-3.5 w-3.5 animate-spin`}):(0,X.jsx)(O,{className:`h-3.5 w-3.5`}),m===`connecting`?`Connecting...`:`Connect Live Session`]})}),(0,X.jsx)(G,{className:`max-w-sm text-[13px]`,children:k})]})),te&&(0,X.jsxs)(Me,{variant:`outline`,"aria-live":`polite`,className:`text-[10px] tracking-wider font-medium text-muted-foreground bg-muted/50 border-border/50`,children:[`Session #`,g]}),!r&&(0,X.jsxs)(se,{open:d,onOpenChange:e=>{e||S()},children:[(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{asChild:!0,children:(0,X.jsx)(z,{asChild:!0,children:(0,X.jsx)(J,{variant:`ghost`,size:`icon-sm`,onClick:S,"aria-label":`Shortcuts`,children:(0,X.jsx)(M,{className:`h-3.5 w-3.5`})})})}),(0,X.jsx)(G,{children:`Shortcuts`})]}),(0,X.jsx)(R,{align:`end`,sideOffset:8,className:`w-72 p-4`,children:(0,X.jsx)(`div`,{className:`space-y-3`,children:(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h4`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-2`,children:`Actions`}),(0,X.jsx)(j,{hints:[{key:`R`,label:`Run test`},{key:`Cmd+S`,label:`Save`},{key:`Esc`,label:`Close results panel`}]})]})})})]})]})})]})}export{dt as a,ht as c,gt as d,vt as f,Ft as i,yt as l,Wt as n,bt as o,ft as p,It as r,xt as s,Gt as t,_t as u};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./monaco-editor-DNT0Mzki.js";import{t as n}from"./file-code-B3iDpJRP.js";import{n as r}from"./split-button-DcY8ames.js";import{t as i}from"./zap-KFJmkY3Y.js";import{t as a}from"./use-page-title-B1t9-5_U.js";import{n as o,t as ee}from"./test-navbar-DoHKAy1p.js";import{a as te,n as s,o as ne,t as c}from"./insights-line-grid-BKOqA-1W.js";import{i as l,n as u,r as d,t as f}from"./tabs-DrB_Acb3.js";import{$n as p,At as m,Gt as h,Jt as g,Kt as _,Mt as v,Nt as re,Pt as y,Qn as b,St as ie,Ut as x,cr as ae,jt as S,lr as oe,lt as se,pr as C,qt as w,r as ce,sr as T,ur as le,ut as ue}from"./index-Bvtm2F6f.js";import{t as E}from"./badge-DrW2vGVJ.js";import{a as D,i as O,n as k,o as A,r as j,t as M}from"./table-D08QBBt4.js";import{t as de}from"./empty-state-BTvOA5lp.js";import{t as fe}from"./use-keyboard-shortcuts-EAppuiKO.js";import{n as N,r as pe,t as me}from"./viewer-url-state-6mOK5_sY.js";var P=e(C(),1),F=b();function he(e){if(!e)return``;let t=new Date(g(e)),n=Date.now()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return`just now`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<7?`${o}d ago`:h(e)}function I({configured:e,mode:t,scopedCount:n,totalCount:r,onModeChange:i}){return e?(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`inline-flex rounded border border-border p-0.5`,children:[`scoped`,`all`].map(e=>(0,F.jsx)(x,{type:`button`,size:`xs`,variant:t===e?`default`:`ghost`,"aria-pressed":t===e,className:`h-7 rounded-[2px] px-2 text-xs`,onClick:()=>i(e),children:e===`scoped`?`Scoped`:`All runs`},e))}),(0,F.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,` scoped / `,r,` total runs`]})]}):(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No analytics scope configured`})}var ge=[`builder`,`yaml`,`memory`];function L({status:e}){switch(e){case`passed`:return(0,F.jsx)(E,{className:`bg-emerald-500/15 text-emerald-500 border-emerald-500/20`,children:`Passed`});case`failed`:return(0,F.jsx)(E,{variant:`destructive`,children:`Failed`});case`healed`:return(0,F.jsx)(E,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Healed`});case`flaky`:return(0,F.jsx)(E,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Flaky`});case`running`:return(0,F.jsx)(E,{className:`bg-blue-500/15 text-blue-500 border-blue-500/20 animate-pulse`,children:`Running`});case`cancelled`:return(0,F.jsx)(E,{className:`bg-muted text-muted-foreground border-border`,children:`Cancelled`});default:return(0,F.jsx)(E,{variant:`outline`,children:e})}}function _e({runs:e}){return e.length===0?(0,F.jsx)(`div`,{className:`flex items-center justify-center h-32 text-sm text-muted-foreground`,children:`No runs yet — click Run to start`}):(0,F.jsxs)(M,{children:[(0,F.jsx)(D,{children:(0,F.jsxs)(A,{children:[(0,F.jsx)(O,{children:`Status`}),(0,F.jsx)(O,{children:`Duration`}),(0,F.jsx)(O,{children:`Date`})]})}),(0,F.jsx)(k,{children:e.map(e=>(0,F.jsxs)(A,{className:`relative cursor-pointer hover:bg-muted/50`,children:[(0,F.jsxs)(j,{children:[(0,F.jsx)(T,{to:p.runDetailOrLive(e.id,e.status),className:`absolute inset-0`,tabIndex:-1}),(0,F.jsx)(L,{status:e.status})]}),(0,F.jsx)(j,{children:e.status===`running`?(0,F.jsx)(`span`,{className:`text-blue-500 text-sm`,children:`In progress...`}):(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:w(e.duration)})}),(0,F.jsx)(j,{children:(0,F.jsxs)(S,{children:[(0,F.jsx)(y,{asChild:!0,children:(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:h(e.createdAt)})}),(0,F.jsx)(v,{children:_(e.createdAt)})]})})]},e.id))})]})}function R(){let{t_id:e}=oe(),h=ae(),{defaultRunMode:g}=r(),[_,v]=le(),y=e??``,b=(0,P.useMemo)(()=>me(_,ge),[_]),x=(0,P.useMemo)(()=>N(b,_),[_,b]),S=b.tab,C=b.view,[R,ve]=(0,P.useState)(``),[ye,be]=(0,P.useState)(``),[xe,z]=(0,P.useState)(!0),[Se,B]=(0,P.useState)(!1),[V,Ce]=(0,P.useState)(null),[H,U]=(0,P.useState)(`all`),[W,G]=(0,P.useState)(!1),[we,Te]=(0,P.useState)(!1),K=(0,P.useMemo)(()=>{let e=R.match(/^name:\s*(.+)$/m);return e?e[1].trim():null},[R]);a(K||`Test`);let q=V?.scope?.configured===!0,J=H===`scoped`&&q&&V?.scopedTrends?V.scopedTrends:V?.trends,Y=H===`scoped`&&q&&V?.scopedFlakyScore!==void 0?V.scopedFlakyScore:V?.flakyScore??0,Ee=H===`scoped`&&q?V?.scopedRuns??[]:V?.runs??[],De=(0,P.useMemo)(()=>J?.daily?J.daily.map(e=>({date:e.date,passRate:e.total>0?Math.round(e.passed/e.total*1e3)/10:0})):[],[J]),Oe=(0,P.useMemo)(()=>V?.trends.daily?V.trends.daily.map(e=>({date:e.date,duration:e.avgDuration})):[],[V]),X=Ee;(0,P.useEffect)(()=>{V&&U(V.scope?.configured?`scoped`:`all`)},[V]),(0,P.useEffect)(()=>{x.toString()!==_.toString()&&v(x,{replace:!0})},[x,_,v]),(0,P.useEffect)(()=>{if(!y){B(!0),z(!1);return}let e=!1;return ue(y).then(t=>{e||(ve(t.content),be(t.path))}).catch(()=>{e||(B(!0),m.error(`Failed to load test file`))}).finally(()=>{e||z(!1)}),()=>{e=!0}},[y]),(0,P.useEffect)(()=>{if(!K)return;let e=!1;return se(K,{limit:50}).then(t=>{e||Ce(t)}).catch(()=>{}),()=>{e=!0}},[K]);let Z=async e=>{if(!W){G(!0);try{let t=await ie({file:ye,local:e});m.success(`Run started`),h(p.runLive(t.runId))}catch(e){m.error(`Failed to start run: ${e instanceof Error?e.message:String(e)}`)}finally{G(!1)}}},Q=p.testEdit(y),$=p.testEditLive(y);fe({e:()=>h(Q),r:()=>{Z(g===`local`)},l:()=>h($)});let ke=e=>{v(N(e,_),{replace:!0})};if(xe)return(0,F.jsx)(ce,{});if(Se)return(0,F.jsx)(de,{icon:n,title:`Test not found`,description:`This test file doesn't exist`,actionLabel:`View All Tests`,onAction:()=>h(p.tests)});let Ae=(0,F.jsx)(o,{content:R,onChange:()=>{},disabled:!0}),je=(0,F.jsx)(t,{value:R,onChange:()=>{},readOnly:!0,className:`h-full`}),Me=V&&(0,F.jsxs)(`aside`,{"data-testid":`test-detail-analytics-sidebar`,className:`flex flex-col gap-0 overflow-y-auto border-t border-border md:border-t-0 md:border-l md:border-border`,children:[(0,F.jsx)(`div`,{className:`border-b border-border px-3 py-2`,children:(0,F.jsx)(I,{configured:q,mode:H,scopedCount:V.scope?.scopedCount??0,totalCount:V.scope?.totalCount??V.total,onModeChange:U})}),(0,F.jsxs)(s,{className:`grid-cols-2 divide-x divide-y-0 border-x-0 border-t-0`,children:[(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Pass Rate`}),(0,F.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[Math.round((J??V.trends).passRate*100),`%`]})]}),(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Avg Duration`}),(0,F.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:w(V.trends.avgDuration)})]}),(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 border-t border-border px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Total Runs`}),(0,F.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:V.total.toLocaleString()})]}),(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 border-t border-border px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Flaky Score`}),(0,F.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[(Y*100).toFixed(0),`%`]})]})]}),(0,F.jsx)(s,{className:`border-x-0 border-y-0`,children:(0,F.jsxs)(c,{className:`flex flex-col gap-2 px-3 py-3`,children:[(0,F.jsxs)(`span`,{className:`text-sm font-medium text-foreground`,children:[H===`scoped`&&q?`Scoped Runs`:`All Runs`,` (`,X.length,`)`]}),X.length===0?(0,F.jsx)(`div`,{className:`flex items-center justify-center h-16 text-sm text-muted-foreground`,children:`No runs yet`}):(0,F.jsxs)(M,{children:[(0,F.jsx)(D,{children:(0,F.jsxs)(A,{children:[(0,F.jsx)(O,{children:`Status`}),(0,F.jsx)(O,{children:`Duration`}),(0,F.jsx)(O,{children:`Date`})]})}),(0,F.jsx)(k,{children:X.slice(0,5).map(e=>(0,F.jsxs)(A,{className:`relative cursor-pointer hover:bg-muted/50`,children:[(0,F.jsxs)(j,{children:[(0,F.jsx)(T,{to:p.runDetailOrLive(e.id,e.status),className:`absolute inset-0`,tabIndex:-1}),(0,F.jsx)(L,{status:e.status})]}),(0,F.jsx)(j,{children:e.status===`running`?(0,F.jsx)(`span`,{className:`text-blue-500 text-sm`,children:`In progress...`}):(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:w(e.duration)})}),(0,F.jsx)(j,{children:(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:he(e.createdAt)})})]},e.id))})]})]})})]});return(0,F.jsx)(re,{children:(0,F.jsxs)(`div`,{className:`flex flex-col h-screen`,children:[(0,F.jsx)(ee,{testName:K||`Test`,testId:y,unsaved:!1,isCreateMode:!1,mode:`view`,testHref:Q,isSaving:!1,isValidating:!1,isRunning:W,hasInvalidFilename:!1,showTestId:!1,onBack:()=>h(p.tests),onSave:()=>{},onValidate:()=>{},onRun:e=>Z(e),onLiveConnect:()=>h($),onSettingsOpen:()=>{},shortcutsOpen:we,onToggleShortcuts:()=>Te(e=>!e)}),(0,F.jsxs)(f,{value:S,onValueChange:e=>ke({tab:e,view:C}),className:`flex-1 min-h-0 flex flex-col`,children:[(0,F.jsx)(`div`,{className:`px-4 border-b border-border`,children:(0,F.jsxs)(d,{variant:`line`,children:[(0,F.jsx)(l,{value:`overview`,children:`Overview`}),(0,F.jsx)(l,{value:`insights`,children:`Insights`})]})}),(0,F.jsxs)(u,{value:`overview`,className:`flex-1 min-h-0 mt-0 grid grid-cols-1 md:grid-cols-[minmax(480px,1fr)_minmax(260px,320px)]`,children:[(0,F.jsx)(`div`,{className:`min-w-0 min-h-0 flex flex-col`,children:(0,F.jsxs)(f,{value:C,onValueChange:e=>ke({tab:S,view:e}),className:`flex-1 min-h-0 flex flex-col`,children:[(0,F.jsx)(`div`,{className:`px-4 border-b border-border`,children:(0,F.jsxs)(d,{variant:`line`,className:`w-full grid grid-cols-3 md:w-fit md:inline-flex`,children:[(0,F.jsx)(l,{value:`builder`,children:`Builder`}),(0,F.jsx)(l,{value:`yaml`,children:`YAML`}),(0,F.jsx)(l,{value:`memory`,children:`Memory`})]})}),(0,F.jsxs)(`div`,{className:`relative flex-1 min-h-0`,children:[(0,F.jsx)(u,{value:`builder`,className:`absolute inset-0 overflow-y-auto data-[state=inactive]:hidden`,children:Ae}),(0,F.jsx)(u,{value:`yaml`,className:`absolute inset-0 data-[state=inactive]:hidden`,children:je}),(0,F.jsx)(u,{value:`memory`,className:`absolute inset-0 overflow-y-auto data-[state=inactive]:hidden`,children:(0,F.jsx)(pe,{scope:`test`,scopeId:y,emptyTitle:`No test memory yet`,emptyDescription:`This test doesn't have cataloged observations in this workspace yet. Run the test with memory enabled, then reopen this tab.`})})]})]})}),Me]}),(0,F.jsx)(u,{value:`insights`,className:`flex-1 overflow-y-auto mt-0`,children:(0,F.jsx)(`div`,{"data-testid":`test-detail-insights`,className:`px-4 py-3`,children:V?(0,F.jsxs)(`div`,{className:`space-y-3`,children:[V.isFlaky&&(0,F.jsxs)(E,{variant:`destructive`,children:[(0,F.jsx)(i,{className:`size-3`}),`Flaky (score: `,V.flakyScore.toFixed(2),`)`]}),(0,F.jsxs)(s,{className:`grid-cols-2 divide-x divide-y-0 md:grid-cols-4`,children:[(0,F.jsx)(c,{className:`border-b border-border md:border-b-0`,children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Runs`}),(0,F.jsx)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:V.total.toLocaleString()})]})}),(0,F.jsx)(c,{className:`border-b border-border md:border-b-0 md:border-r`,children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Pass Rate`}),(0,F.jsxs)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:[Math.round((J??V.trends).passRate*100),`%`]})]})}),(0,F.jsx)(c,{children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Avg Duration`}),(0,F.jsx)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:w(V.trends.avgDuration)})]})}),(0,F.jsx)(c,{children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Flaky Score`}),(0,F.jsxs)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:[(Y*100).toFixed(0),`%`]})]})})]}),(0,F.jsx)(s,{children:(0,F.jsx)(c,{className:`px-4 py-3`,children:(0,F.jsx)(I,{configured:q,mode:H,scopedCount:V.scope?.scopedCount??0,totalCount:V.scope?.totalCount??V.total,onModeChange:U})})}),(J?.daily.length??0)>0&&(0,F.jsxs)(s,{className:`md:grid-cols-2 md:divide-x md:divide-y-0`,children:[(0,F.jsxs)(c,{className:`px-4 py-3`,children:[(0,F.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Pass Rate`}),(0,F.jsx)(`div`,{className:`h-[160px] overflow-hidden`,children:(0,F.jsx)(ne,{data:De})})]}),(0,F.jsxs)(c,{className:`px-4 py-3`,children:[(0,F.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Duration`}),(0,F.jsx)(`div`,{className:`h-[160px] overflow-hidden`,children:(0,F.jsx)(te,{data:Oe})})]})]}),(0,F.jsx)(s,{children:(0,F.jsxs)(c,{className:`px-4 py-3`,children:[(0,F.jsxs)(`p`,{className:`text-sm font-medium mb-2`,children:[H===`scoped`&&q?`Scoped Runs`:`All Runs`,` (`,X.length,`)`]}),(0,F.jsx)(_e,{runs:X})]})})]}):(0,F.jsx)(s,{children:(0,F.jsx)(c,{className:`flex h-32 items-center justify-center text-sm text-muted-foreground`,children:`No analytics data available`})})})})]})]})})}export{R as default};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./monaco-editor-BEWq4fzI.js";import{t as n}from"./file-code-DxVUPin2.js";import{n as r}from"./split-button-CRYV8xU8.js";import{t as i}from"./zap-Dx2CqraS.js";import{t as a}from"./use-page-title-CsUoFrfG.js";import{n as o,t as ee}from"./test-navbar-ChNg-qki.js";import{a as te,n as s,o as ne,t as c}from"./insights-line-grid-X5lNbmTY.js";import{i as l,n as u,r as d,t as f}from"./tabs-BEp-p5jh.js";import{$n as p,Ct as re,Ft as m,Jt as h,Kt as g,Mt as _,Nt as v,Pt as ie,Wt as y,Yt as b,cr as x,dr as ae,dt as oe,er as S,jt as C,lr as se,mr as w,qt as T,r as ce,ur as le,ut as ue}from"./index-C3AdCkmj.js";import{t as E}from"./badge-ClWCtaXi.js";import{a as D,i as O,n as k,o as A,r as j,t as M}from"./table-BOjrxBBL.js";import{t as de}from"./empty-state-BTFWlITi.js";import{t as fe}from"./use-keyboard-shortcuts-COnAPsDD.js";import{n as N,r as pe,t as me}from"./viewer-url-state-PwkMc-qK.js";var P=e(w(),1),F=p();function he(e){if(!e)return``;let t=new Date(b(e)),n=Date.now()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return`just now`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<7?`${o}d ago`:g(e)}function I({configured:e,mode:t,scopedCount:n,totalCount:r,onModeChange:i}){return e?(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`inline-flex rounded border border-border p-0.5`,children:[`scoped`,`all`].map(e=>(0,F.jsx)(y,{type:`button`,size:`xs`,variant:t===e?`default`:`ghost`,"aria-pressed":t===e,className:`h-7 rounded-[2px] px-2 text-xs`,onClick:()=>i(e),children:e===`scoped`?`Scoped`:`All runs`},e))}),(0,F.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,` scoped / `,r,` total runs`]})]}):(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No analytics scope configured`})}var ge=[`builder`,`yaml`,`memory`];function L({status:e}){switch(e){case`passed`:return(0,F.jsx)(E,{className:`bg-emerald-500/15 text-emerald-500 border-emerald-500/20`,children:`Passed`});case`failed`:return(0,F.jsx)(E,{variant:`destructive`,children:`Failed`});case`healed`:return(0,F.jsx)(E,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Healed`});case`flaky`:return(0,F.jsx)(E,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Flaky`});case`running`:return(0,F.jsx)(E,{className:`bg-blue-500/15 text-blue-500 border-blue-500/20 animate-pulse`,children:`Running`});case`cancelled`:return(0,F.jsx)(E,{className:`bg-muted text-muted-foreground border-border`,children:`Cancelled`});default:return(0,F.jsx)(E,{variant:`outline`,children:e})}}function _e({runs:e}){return e.length===0?(0,F.jsx)(`div`,{className:`flex items-center justify-center h-32 text-sm text-muted-foreground`,children:`No runs yet — click Run to start`}):(0,F.jsxs)(M,{children:[(0,F.jsx)(D,{children:(0,F.jsxs)(A,{children:[(0,F.jsx)(O,{children:`Status`}),(0,F.jsx)(O,{children:`Duration`}),(0,F.jsx)(O,{children:`Date`})]})}),(0,F.jsx)(k,{children:e.map(e=>(0,F.jsxs)(A,{className:`relative cursor-pointer hover:bg-muted/50`,children:[(0,F.jsxs)(j,{children:[(0,F.jsx)(x,{to:S.runDetailOrLive(e.id,e.status),className:`absolute inset-0`,tabIndex:-1}),(0,F.jsx)(L,{status:e.status})]}),(0,F.jsx)(j,{children:e.status===`running`?(0,F.jsx)(`span`,{className:`text-blue-500 text-sm`,children:`In progress...`}):(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:h(e.duration)})}),(0,F.jsx)(j,{children:(0,F.jsxs)(_,{children:[(0,F.jsx)(m,{asChild:!0,children:(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:g(e.createdAt)})}),(0,F.jsx)(v,{children:T(e.createdAt)})]})})]},e.id))})]})}function R(){let{t_id:e}=le(),p=se(),{defaultRunMode:m}=r(),[g,_]=ae(),v=e??``,y=(0,P.useMemo)(()=>me(g,ge),[g]),b=(0,P.useMemo)(()=>N(y,g),[g,y]),w=y.tab,T=y.view,[R,ve]=(0,P.useState)(``),[ye,be]=(0,P.useState)(``),[xe,z]=(0,P.useState)(!0),[Se,B]=(0,P.useState)(!1),[V,Ce]=(0,P.useState)(null),[H,U]=(0,P.useState)(`all`),[W,G]=(0,P.useState)(!1),[we,Te]=(0,P.useState)(!1),K=(0,P.useMemo)(()=>{let e=R.match(/^name:\s*(.+)$/m);return e?e[1].trim():null},[R]);a(K||`Test`);let q=V?.scope?.configured===!0,J=H===`scoped`&&q&&V?.scopedTrends?V.scopedTrends:V?.trends,Y=H===`scoped`&&q&&V?.scopedFlakyScore!==void 0?V.scopedFlakyScore:V?.flakyScore??0,Ee=H===`scoped`&&q?V?.scopedRuns??[]:V?.runs??[],De=(0,P.useMemo)(()=>J?.daily?J.daily.map(e=>({date:e.date,passRate:e.total>0?Math.round(e.passed/e.total*1e3)/10:0})):[],[J]),Oe=(0,P.useMemo)(()=>V?.trends.daily?V.trends.daily.map(e=>({date:e.date,duration:e.avgDuration})):[],[V]),X=Ee;(0,P.useEffect)(()=>{V&&U(V.scope?.configured?`scoped`:`all`)},[V]),(0,P.useEffect)(()=>{b.toString()!==g.toString()&&_(b,{replace:!0})},[b,g,_]),(0,P.useEffect)(()=>{if(!v){B(!0),z(!1);return}let e=!1;return oe(v).then(t=>{e||(ve(t.content),be(t.path))}).catch(()=>{e||(B(!0),C.error(`Failed to load test file`))}).finally(()=>{e||z(!1)}),()=>{e=!0}},[v]),(0,P.useEffect)(()=>{if(!K)return;let e=!1;return ue(K,{limit:50}).then(t=>{e||Ce(t)}).catch(()=>{}),()=>{e=!0}},[K]);let Z=async e=>{if(!W){G(!0);try{let t=await re({file:ye,local:e});C.success(`Run started`),p(S.runLive(t.runId))}catch(e){C.error(`Failed to start run: ${e instanceof Error?e.message:String(e)}`)}finally{G(!1)}}},Q=S.testEdit(v),$=S.testEditLive(v);fe({e:()=>p(Q),r:()=>{Z(m===`local`)},l:()=>p($)});let ke=e=>{_(N(e,g),{replace:!0})};if(xe)return(0,F.jsx)(ce,{});if(Se)return(0,F.jsx)(de,{icon:n,title:`Test not found`,description:`This test file doesn't exist`,actionLabel:`View All Tests`,onAction:()=>p(S.tests)});let Ae=(0,F.jsx)(o,{content:R,onChange:()=>{},disabled:!0}),je=(0,F.jsx)(t,{value:R,onChange:()=>{},readOnly:!0,className:`h-full`}),Me=V&&(0,F.jsxs)(`aside`,{"data-testid":`test-detail-analytics-sidebar`,className:`flex flex-col gap-0 overflow-y-auto border-t border-border md:border-t-0 md:border-l md:border-border`,children:[(0,F.jsx)(`div`,{className:`border-b border-border px-3 py-2`,children:(0,F.jsx)(I,{configured:q,mode:H,scopedCount:V.scope?.scopedCount??0,totalCount:V.scope?.totalCount??V.total,onModeChange:U})}),(0,F.jsxs)(s,{className:`grid-cols-2 divide-x divide-y-0 border-x-0 border-t-0`,children:[(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Pass Rate`}),(0,F.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[Math.round((J??V.trends).passRate*100),`%`]})]}),(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Avg Duration`}),(0,F.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:h(V.trends.avgDuration)})]}),(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 border-t border-border px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Total Runs`}),(0,F.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:V.total.toLocaleString()})]}),(0,F.jsxs)(c,{className:`flex flex-col gap-0.5 border-t border-border px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Flaky Score`}),(0,F.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[(Y*100).toFixed(0),`%`]})]})]}),(0,F.jsx)(s,{className:`border-x-0 border-y-0`,children:(0,F.jsxs)(c,{className:`flex flex-col gap-2 px-3 py-3`,children:[(0,F.jsxs)(`span`,{className:`text-sm font-medium text-foreground`,children:[H===`scoped`&&q?`Scoped Runs`:`All Runs`,` (`,X.length,`)`]}),X.length===0?(0,F.jsx)(`div`,{className:`flex items-center justify-center h-16 text-sm text-muted-foreground`,children:`No runs yet`}):(0,F.jsxs)(M,{children:[(0,F.jsx)(D,{children:(0,F.jsxs)(A,{children:[(0,F.jsx)(O,{children:`Status`}),(0,F.jsx)(O,{children:`Duration`}),(0,F.jsx)(O,{children:`Date`})]})}),(0,F.jsx)(k,{children:X.slice(0,5).map(e=>(0,F.jsxs)(A,{className:`relative cursor-pointer hover:bg-muted/50`,children:[(0,F.jsxs)(j,{children:[(0,F.jsx)(x,{to:S.runDetailOrLive(e.id,e.status),className:`absolute inset-0`,tabIndex:-1}),(0,F.jsx)(L,{status:e.status})]}),(0,F.jsx)(j,{children:e.status===`running`?(0,F.jsx)(`span`,{className:`text-blue-500 text-sm`,children:`In progress...`}):(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:h(e.duration)})}),(0,F.jsx)(j,{children:(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:he(e.createdAt)})})]},e.id))})]})]})})]});return(0,F.jsx)(ie,{children:(0,F.jsxs)(`div`,{className:`flex flex-col h-screen`,children:[(0,F.jsx)(ee,{testName:K||`Test`,testId:v,unsaved:!1,isCreateMode:!1,mode:`view`,testHref:Q,isSaving:!1,isValidating:!1,isRunning:W,hasInvalidFilename:!1,showTestId:!1,onBack:()=>p(S.tests),onSave:()=>{},onValidate:()=>{},onRun:e=>Z(e),onLiveConnect:()=>p($),onSettingsOpen:()=>{},shortcutsOpen:we,onToggleShortcuts:()=>Te(e=>!e)}),(0,F.jsxs)(f,{value:w,onValueChange:e=>ke({tab:e,view:T}),className:`flex-1 min-h-0 flex flex-col`,children:[(0,F.jsx)(`div`,{className:`px-4 border-b border-border`,children:(0,F.jsxs)(d,{variant:`line`,children:[(0,F.jsx)(l,{value:`overview`,children:`Overview`}),(0,F.jsx)(l,{value:`insights`,children:`Insights`})]})}),(0,F.jsxs)(u,{value:`overview`,className:`flex-1 min-h-0 mt-0 grid grid-cols-1 md:grid-cols-[minmax(480px,1fr)_minmax(260px,320px)]`,children:[(0,F.jsx)(`div`,{className:`min-w-0 min-h-0 flex flex-col`,children:(0,F.jsxs)(f,{value:T,onValueChange:e=>ke({tab:w,view:e}),className:`flex-1 min-h-0 flex flex-col`,children:[(0,F.jsx)(`div`,{className:`px-4 border-b border-border`,children:(0,F.jsxs)(d,{variant:`line`,className:`w-full grid grid-cols-3 md:w-fit md:inline-flex`,children:[(0,F.jsx)(l,{value:`builder`,children:`Builder`}),(0,F.jsx)(l,{value:`yaml`,children:`YAML`}),(0,F.jsx)(l,{value:`memory`,children:`Memory`})]})}),(0,F.jsxs)(`div`,{className:`relative flex-1 min-h-0`,children:[(0,F.jsx)(u,{value:`builder`,className:`absolute inset-0 overflow-y-auto data-[state=inactive]:hidden`,children:Ae}),(0,F.jsx)(u,{value:`yaml`,className:`absolute inset-0 data-[state=inactive]:hidden`,children:je}),(0,F.jsx)(u,{value:`memory`,className:`absolute inset-0 overflow-y-auto data-[state=inactive]:hidden`,children:(0,F.jsx)(pe,{scope:`test`,scopeId:v,emptyTitle:`No test memory yet`,emptyDescription:`This test doesn't have cataloged observations in this workspace yet. Run the test with memory enabled, then reopen this tab.`})})]})]})}),Me]}),(0,F.jsx)(u,{value:`insights`,className:`flex-1 overflow-y-auto mt-0`,children:(0,F.jsx)(`div`,{"data-testid":`test-detail-insights`,className:`px-4 py-3`,children:V?(0,F.jsxs)(`div`,{className:`space-y-3`,children:[V.isFlaky&&(0,F.jsxs)(E,{variant:`destructive`,children:[(0,F.jsx)(i,{className:`size-3`}),`Flaky (score: `,V.flakyScore.toFixed(2),`)`]}),(0,F.jsxs)(s,{className:`grid-cols-2 divide-x divide-y-0 md:grid-cols-4`,children:[(0,F.jsx)(c,{className:`border-b border-border md:border-b-0`,children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Runs`}),(0,F.jsx)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:V.total.toLocaleString()})]})}),(0,F.jsx)(c,{className:`border-b border-border md:border-b-0 md:border-r`,children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Pass Rate`}),(0,F.jsxs)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:[Math.round((J??V.trends).passRate*100),`%`]})]})}),(0,F.jsx)(c,{children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Avg Duration`}),(0,F.jsx)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:h(V.trends.avgDuration)})]})}),(0,F.jsx)(c,{children:(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Flaky Score`}),(0,F.jsxs)(`p`,{className:`text-2xl font-semibold mt-0.5`,children:[(Y*100).toFixed(0),`%`]})]})})]}),(0,F.jsx)(s,{children:(0,F.jsx)(c,{className:`px-4 py-3`,children:(0,F.jsx)(I,{configured:q,mode:H,scopedCount:V.scope?.scopedCount??0,totalCount:V.scope?.totalCount??V.total,onModeChange:U})})}),(J?.daily.length??0)>0&&(0,F.jsxs)(s,{className:`md:grid-cols-2 md:divide-x md:divide-y-0`,children:[(0,F.jsxs)(c,{className:`px-4 py-3`,children:[(0,F.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Pass Rate`}),(0,F.jsx)(`div`,{className:`h-[160px] overflow-hidden`,children:(0,F.jsx)(ne,{data:De})})]}),(0,F.jsxs)(c,{className:`px-4 py-3`,children:[(0,F.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Duration`}),(0,F.jsx)(`div`,{className:`h-[160px] overflow-hidden`,children:(0,F.jsx)(te,{data:Oe})})]})]}),(0,F.jsx)(s,{children:(0,F.jsxs)(c,{className:`px-4 py-3`,children:[(0,F.jsxs)(`p`,{className:`text-sm font-medium mb-2`,children:[H===`scoped`&&q?`Scoped Runs`:`All Runs`,` (`,X.length,`)`]}),(0,F.jsx)(_e,{runs:X})]})})]}):(0,F.jsx)(s,{children:(0,F.jsx)(c,{className:`flex h-32 items-center justify-center text-sm text-muted-foreground`,children:`No analytics data available`})})})})]})]})})}export{R as default};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./arrow-up-down-D_ErIdrE.js";import{i as n,n as r,o as i,s as a,t as o}from"./select-D0GpDfUa.js";import{n as s}from"./split-button-CRYV8xU8.js";import{n as c,r as l}from"./shortcut-hints-B8kCurzo.js";import{t as u}from"./plus-Bf5Mbita.js";import{t as d}from"./use-page-title-CsUoFrfG.js";import{t as f}from"./batch-action-bar-BoqzHfwU.js";import{n as p,t as ee}from"./scroll-area-CX3T8JWh.js";import{$n as m,Ct as te,Ft as ne,Gt as h,Kt as re,Mt as ie,N as ae,Nt as oe,Pn as se,Pt as ce,Un as le,Ut as ue,Wt as g,_t as de,a as fe,cr as _,dr as pe,er as v,ft as me,jt as y,lr as he,mr as b,rt as ge}from"./index-C3AdCkmj.js";import{t as x}from"./badge-ClWCtaXi.js";import{a as _e,n as ve,o as ye,r as be,t as xe}from"./lib-u_ZEFKZp.js";import{a as Se,i as Ce,n as we,o as S,r as Te,t as Ee}from"./table-BOjrxBBL.js";import{t as De}from"./empty-state-BTFWlITi.js";import{t as Oe}from"./use-keyboard-shortcuts-COnAPsDD.js";import{n as ke,t as Ae}from"./use-selection-queue-BkEWIfvw.js";import{n as je,r as C,t as Me}from"./tests-suites-table-widths-D2sc1JmR.js";var w=e(b(),1),T=new Set([`asc`,`desc`]),E=50;function Ne(e){if(!e)return 1;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>1?t:1}function D(e){let t=new URLSearchParams;return e.search&&t.set(`search`,e.search),e.status&&t.set(`status`,e.status),e.platform&&t.set(`platform`,e.platform),e.target&&t.set(`target`,e.target),e.sort&&(t.set(`sort`,e.sort),t.set(`order`,e.order)),e.page>1&&t.set(`page`,String(e.page)),t}function Pe(){let[e,t]=pe(),n=e.get(`search`)??``,r=e.get(`status`)??``,i=e.get(`platform`)??``,a=e.get(`target`)??``,o=e.get(`sort`)??``,s=e.get(`order`)??`desc`,c=T.has(s)?s:`desc`,l=Ne(e.get(`page`)),u=(0,w.useMemo)(()=>o?[{id:o,desc:c===`desc`}]:[],[o,c]),d=(0,w.useRef)(u);d.current=u;let f=(0,w.useMemo)(()=>({search:n,status:r,platform:i,target:a,sort:o,order:c,page:l}),[n,r,i,a,o,c,l]);(0,w.useEffect)(()=>{let n=D(f);e.toString()!==n.toString()&&t(n,{replace:!0})},[e,t,f]);let p=(0,w.useCallback)((e,n)=>{let r={...f,...e};n?.resetPage&&(r.page=1),t(D(r),{replace:!0})},[t,f]),ee=(0,w.useCallback)(e=>{let t=typeof e==`function`?e(d.current):e;t.length>0?p({sort:t[0].id,order:t[0].desc?`desc`:`asc`}):p({sort:``,order:`desc`})},[p]),m=(0,w.useMemo)(()=>({pageIndex:l-1,pageSize:E}),[l]);return{search:n,status:r,platform:i,target:a,sort:o,order:c,page:l,sorting:u,pagination:m,onSortingChange:ee,onPaginationChange:(0,w.useCallback)(e=>{p({page:(typeof e==`function`?e(m):e).pageIndex+1})},[m,p]),setSearch:(0,w.useCallback)(e=>p({search:e},{resetPage:!0}),[p]),setStatus:(0,w.useCallback)(e=>p({status:e},{resetPage:!0}),[p]),setPlatform:(0,w.useCallback)(e=>p({platform:e},{resetPage:!0}),[p]),setTarget:(0,w.useCallback)(e=>p({target:e},{resetPage:!0}),[p]),setPage:(0,w.useCallback)(e=>p({page:e}),[p])}}var O=m();function k({status:e}){switch(e){case`passed`:return(0,O.jsx)(x,{className:`bg-emerald-500/15 text-emerald-500 border-emerald-500/20`,children:`Passed`});case`failed`:return(0,O.jsx)(x,{variant:`destructive`,children:`Failed`});case`healed`:return(0,O.jsx)(x,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Healed`});case`flaky`:return(0,O.jsx)(x,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Flaky`});case`running`:return(0,O.jsx)(x,{className:`bg-blue-500/15 text-blue-500 border-blue-500/20 animate-pulse`,children:`Running`});case`cancelled`:return(0,O.jsx)(x,{className:`bg-muted text-muted-foreground border-border`,children:`Cancelled`});default:return(0,O.jsx)(x,{variant:`outline`,children:e})}}var Fe=new Set([`passed`,`healed`]),Ie=new Set([`passed`,`healed`,`failed`,`flaky`,`cancelled`]);function A(e){return e?e===`ios`?`iOS`:e.charAt(0).toUpperCase()+e.slice(1):`—`}function j(e){return e.replace(/\\/g,`/`)}function M(e){let t=j(e).split(`/`).filter(Boolean);return t.length>1?t.slice(1).join(`/`):t[0]??e}function N(e){return e.createdAt||e.startedAt||e.endedAt||``}function Le(e){return h(`h-10 bg-background text-[13px] font-medium text-foreground/90`,e===`select`?`px-2 text-center`:`px-3`,(e===`passRate`||e===`lastRun`)&&`text-right`)}function Re(e){return h(`py-2 align-top`,e===`select`&&`px-2`,e===`name`&&`max-w-0 px-3`,(e===`target`||e===`targetName`)&&`max-w-0 px-3`,e===`platform`&&`px-3`,e===`passRate`&&`px-3 text-right`,e===`lastRun`&&`max-w-0 px-3 text-right`)}function ze({isActive:e,isBatchSelected:t}){return h(`cursor-pointer outline-none hover:bg-muted/20 focus-visible:bg-primary/10 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary/60`,t&&!e&&`bg-muted/20`,e&&`bg-primary/10 ring-1 ring-inset ring-primary/60`)}var Be=[{accessorKey:`name`,header:({column:e})=>(0,O.jsxs)(g,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Test Name`,(0,O.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,O.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[(0,O.jsx)(`span`,{className:`block whitespace-normal break-words text-sm font-medium leading-snug text-foreground`,children:e.getValue(`name`)}),(0,O.jsx)(`span`,{className:`block whitespace-normal break-all text-xs leading-snug text-muted-foreground`,children:M(e.original.path)})]}),filterFn:(e,t,n)=>{let r=e.getValue(`name`).toLowerCase(),i=e.original.path.toLowerCase(),a=n.toLowerCase();return r.includes(a)||i.includes(a)}},{accessorKey:`targetName`,header:({column:e})=>(0,O.jsxs)(g,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Target`,(0,O.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,O.jsx)(`span`,{className:`block whitespace-normal break-words text-sm leading-snug text-muted-foreground`,children:e.original.targetName??`No target`})},{accessorKey:`platform`,header:({column:e})=>(0,O.jsxs)(g,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Platform`,(0,O.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,O.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:A(e.getValue(`platform`))})},{accessorKey:`passRate`,header:({column:e})=>(0,O.jsxs)(g,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Pass rate`,(0,O.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>e.original.passRate===null?(0,O.jsxs)(`div`,{className:`space-y-0.5 text-right`,children:[(0,O.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`No runs`}),(0,O.jsx)(`div`,{className:`text-xs tabular-nums text-muted-foreground`,children:`0 completed`})]}):(0,O.jsxs)(`div`,{className:`space-y-0.5 text-right`,children:[(0,O.jsxs)(`div`,{className:`text-sm font-medium tabular-nums text-foreground`,children:[e.original.passRate,`%`]}),(0,O.jsxs)(`div`,{className:`text-xs tabular-nums text-muted-foreground`,children:[e.original.passCount,`/`,e.original.completedRunCount]})]})},{id:`lastRun`,accessorFn:e=>e.lastRun?.createdAt??e.lastRun?.startedAt??e.lastRun?.endedAt??``,header:({column:e})=>(0,O.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,O.jsxs)(g,{variant:`ghost`,className:`h-auto justify-end px-0 text-[13px] font-medium text-foreground/90 hover:bg-transparent`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Last run`,(0,O.jsx)(t,{className:`ml-2 h-4 w-4`})]})}),cell:({row:e})=>e.original.lastRun?(0,O.jsxs)(_,{to:v.runDetail(e.original.lastRun.id),className:`relative z-10 flex w-full flex-col items-end gap-1 rounded-sm text-right focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,onClick:e=>e.stopPropagation(),children:[(0,O.jsx)(k,{status:e.original.lastRun.status}),(0,O.jsx)(`span`,{className:`whitespace-normal break-words text-xs leading-snug text-muted-foreground`,children:re(N(e.original.lastRun))})]}):(0,O.jsx)(`span`,{className:`block text-sm text-muted-foreground`,children:`No runs`}),sortingFn:(e,t)=>{let n=N(e.original.lastRun??{createdAt:``,startedAt:null,endedAt:null}),r=N(t.original.lastRun??{createdAt:``,startedAt:null,endedAt:null});return n.localeCompare(r)}}];function P(){d(`Tests`);let[e,t]=(0,w.useState)([]),[m,re]=(0,w.useState)([]),[_,pe]=(0,w.useState)([]),[b,x]=(0,w.useState)(!0),[T,E]=(0,w.useState)(!1),[Ne,D]=(0,w.useState)(!1),[k,A]=(0,w.useState)(!0),[P,Ve]=(0,w.useState)(!0),F=he(),{hasFarm:He,isLoading:Ue}=s();(0,w.useEffect)(()=>{let e=!1;return Promise.all([me(),ge({limit:200})]).then(([n,r])=>{e||(t(n.files),pe(n.targets??[]),re(r.runs))}).catch(()=>{e||y.error(`Failed to load test files`)}).finally(()=>{e||x(!1)}),()=>{e=!0}},[]);let{search:I,status:L,platform:R,target:z,page:We,sorting:Ge,pagination:B,onSortingChange:Ke,onPaginationChange:qe,setSearch:Je,setStatus:Ye,setPlatform:Xe,setTarget:Ze,setPage:Qe}=Pe(),[V,H]=(0,w.useState)(-1),$e=(0,w.useRef)([]),U=(0,w.useMemo)(()=>{let t=new Map,n=new Map,r=(e,t,n)=>{if(!t)return;let r=e.get(t);r?r.push(n):e.set(t,[n])};for(let e of m){if(!e.filePath)continue;let i=j(e.filePath);r(t,i,e),r(n,M(i),e)}return e.map(e=>{let r=j(e.path),i=[...t.get(r)??n.get(M(r))??[]].sort((e,t)=>N(t).localeCompare(N(e))),a=i.filter(e=>Ie.has(e.status)),o=a.filter(e=>Fe.has(e.status)).length,s=a.length>0?Math.round(o/a.length*100):null,c=i[0]??null;return{path:e.path,name:e.name,testId:e.testId,targetName:e.targetName,platform:e.platform,lastRunStatus:c?.status??null,lastRun:c,passRate:s,passCount:o,completedRunCount:a.length}})},[e,m]),W=(0,w.useMemo)(()=>{let e=U;if(I){let t=I.toLowerCase();e=e.filter(e=>{let n=e.targetName?.toLowerCase()??``;return e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)||n.includes(t)})}return L&&(e=L===`no-runs`?e.filter(e=>!e.lastRunStatus):e.filter(e=>e.lastRunStatus===L)),R&&(e=e.filter(e=>e.platform===R)),z&&(e=e.filter(e=>e.targetName===z)),e},[U,I,L,R,z]),G=Ae({items:U,getId:e=>e.path,visibleIds:W.map(e=>e.path)}),et=(0,w.useMemo)(()=>Array.from(new Set([z,..._,...U.map(e=>e.targetName??``)].filter(e=>!!e))),[U,z,_]),tt={id:`select`,header:({table:e})=>(0,O.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,O.jsx)(C,{checked:G.getVisibleSelectionState(e.getRowModel().rows.map(e=>e.original.path)),onCheckedChange:t=>G.setItemsSelected(e.getRowModel().rows.map(e=>e.original),t),ariaLabel:`Select all`})}),cell:({row:e})=>(0,O.jsx)(C,{checked:G.isSelected(e.original.path),onCheckedChange:t=>G.setItemSelected(e.original,t)}),enableSorting:!1,size:48},K=G.selectedIds,q=G.selectedItems,nt=(0,w.useCallback)(()=>{G.clearSelection(),D(!1),A(!0),Ve(!0)},[G]),rt=(0,w.useCallback)(async e=>{if(K.length!==0){E(!0);try{let t=await Promise.allSettled(K.map(t=>te({file:t,local:e,noCache:!k,noMemory:!P}))),n=t.filter(e=>e.status===`fulfilled`).length,r=t.length-n;r>0?y.error(`${n} runs queued, ${r} failed`):y.success(`${n} runs queued`),D(!1)}finally{E(!1)}}},[K,k,P]),it=(0,w.useCallback)(async()=>{if(K.length!==0){E(!0);try{let e=await Promise.allSettled(K.map(e=>de({file:e}))),t=e.filter(e=>e.status===`fulfilled`).length,n=e.filter(e=>e.status===`fulfilled`).reduce((e,t)=>e+t.value.purged,0),r=e.length-t;r>0?y.error(`Purged ${n} plans from ${t} tests, ${r} failed`):y.success(`Purged ${n} cached plan${n===1?``:`s`}`)}finally{E(!1)}}},[K]),at=(0,w.useCallback)(async()=>{if(q.length!==0){E(!0);try{let e=await Promise.allSettled(q.map(e=>e.testId?ae(e.testId):Promise.reject(Error(`Missing test id for ${e.path}`)))),n=q.filter((t,n)=>e[n]?.status===`fulfilled`),r=new Set(n.map(e=>e.path)),i=e.length-n.length;n.length>0&&(G.setItemsSelected(n,!1),t(e=>e.filter(e=>!r.has(e.path))),D(!1)),i>0?y.error(`Deleted ${n.length} test${n.length===1?``:`s`}, ${i} failed`):y.success(`Deleted ${n.length} test${n.length===1?``:`s`}`)}finally{E(!1)}}},[q,G]),J=ve({data:W,columns:[tt,...Be],getCoreRowModel:be(),getSortedRowModel:ye(),getPaginationRowModel:_e(),onSortingChange:Ke,onPaginationChange:qe,getRowId:e=>e.path,state:{sorting:Ge,pagination:B}}),Y=J.getRowModel().rows,X=G.hiddenCount,ot=I;(0,w.useEffect)(()=>{if(b)return;let e=Math.max(1,Math.ceil(W.length/B.pageSize));We>e&&Qe(e)},[W.length,b,We,B.pageSize,Qe]);let st=(0,w.useCallback)(e=>{Je(e),H(-1)},[Je]);Oe((0,w.useMemo)(()=>{let e=()=>H(e=>Math.min(e+1,Y.length-1)),t=()=>H(e=>Math.max(e-1,0));return{j:e,arrowdown:e,k:t,arrowup:t,enter:e=>{if(V>=0&&Y[V]){let t=Y[V].original,n=v.testView(t.testId??t.path);e.metaKey||e.ctrlKey?window.open(n,`_blank`):F(n)}}}},[Y,V,F])),(0,w.useEffect)(()=>{if(V<0)return;let e=$e.current[V];e&&document.activeElement!==e&&e.focus()},[V,Y.length]);let Z=(0,w.useCallback)((e,t)=>{t&&t.preventDefault(),F(v.testView(e.testId??e.path))},[F]);if(b)return(0,O.jsx)(fe,{});if(e.length===0)return(0,O.jsx)(De,{icon:le,title:`No tests found`,description:`Create your first test file to get started`,actionLabel:`Create Test`,onAction:()=>F(v.testNew)});let Q=W.length,ct=B.pageIndex,lt=B.pageSize,$=ct*lt+1,ut=Math.min($+lt-1,Q);return(0,O.jsx)(ce,{children:(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Tests`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(ie,{children:[(0,O.jsx)(ne,{asChild:!0,children:(0,O.jsx)(g,{variant:`ghost`,size:`icon-sm`,"aria-label":`Keyboard shortcuts`,children:(0,O.jsx)(l,{className:`h-4 w-4`})})}),(0,O.jsx)(oe,{side:`bottom`,className:`p-3`,children:(0,O.jsx)(c,{hints:[{key:`J / ↓`,label:`Next row`},{key:`K / ↑`,label:`Previous row`},{key:`Enter`,label:`Open test`},{key:`⌘+Enter`,label:`Open in new tab`}]})})]}),(0,O.jsxs)(g,{size:`sm`,onClick:()=>F(v.testNew),children:[(0,O.jsx)(u,{className:`size-4`}),`New Test`]})]})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,O.jsx)(ue,{placeholder:`Search tests...`,value:ot,onChange:e=>st(e.target.value),className:`max-w-[220px]`}),(0,O.jsxs)(o,{value:L||`all`,onValueChange:e=>{Ye(e===`all`?``:e),H(-1)},children:[(0,O.jsx)(i,{className:`w-[150px]`,children:(0,O.jsx)(a,{placeholder:`All statuses`})}),(0,O.jsxs)(r,{children:[(0,O.jsx)(n,{value:`all`,children:`All statuses`}),(0,O.jsx)(n,{value:`passed`,children:`Passed`}),(0,O.jsx)(n,{value:`failed`,children:`Failed`}),(0,O.jsx)(n,{value:`running`,children:`Running`}),(0,O.jsx)(n,{value:`no-runs`,children:`No runs`})]})]}),(0,O.jsxs)(o,{value:R||`all`,onValueChange:e=>{Xe(e===`all`?``:e),H(-1)},children:[(0,O.jsx)(i,{className:`w-[140px]`,children:(0,O.jsx)(a,{placeholder:`All platforms`})}),(0,O.jsxs)(r,{children:[(0,O.jsx)(n,{value:`all`,children:`All platforms`}),(0,O.jsx)(n,{value:`web`,children:`Web`}),(0,O.jsx)(n,{value:`android`,children:`Android`}),(0,O.jsx)(n,{value:`ios`,children:`iOS`})]})]}),(0,O.jsxs)(o,{value:z||`all`,onValueChange:e=>{Ze(e===`all`?``:e),H(-1)},children:[(0,O.jsx)(i,{className:`w-[180px]`,children:(0,O.jsx)(a,{placeholder:`All targets`})}),(0,O.jsxs)(r,{children:[(0,O.jsx)(n,{value:`all`,children:`All targets`}),et.map(e=>(0,O.jsx)(n,{value:e,children:e},e))]})]})]}),(0,O.jsxs)(ee,{className:`rounded-md border`,children:[(0,O.jsxs)(Ee,{className:`min-w-full table-fixed`,children:[(0,O.jsx)(`colgroup`,{children:Me.map(e=>{let t=je(e);return(0,O.jsx)(`col`,{"data-column-id":e,style:t?{width:t}:void 0},e)})}),(0,O.jsx)(Se,{children:J.getHeaderGroups().map(e=>(0,O.jsx)(S,{className:`hover:bg-transparent`,children:e.headers.map(e=>(0,O.jsx)(Ce,{className:Le(e.column.id),children:e.isPlaceholder?null:xe(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,O.jsx)(we,{children:Y.length?Y.map((e,t)=>{let n=t===V,r=G.isSelected(e.original.path);return(0,O.jsx)(S,{ref:e=>{$e.current[t]=e},"data-runs-row-surface":e.id,tabIndex:n?0:-1,"aria-selected":n,className:ze({isActive:n,isBatchSelected:r}),onClick:()=>Z(e.original),onFocus:()=>H(t),onKeyDown:t=>{t.key===`Enter`&&Z(e.original,t)},children:e.getVisibleCells().map(e=>{let t=e.column.id===`select`;return(0,O.jsx)(Te,{className:h(Re(e.column.id),t&&`relative z-10`),children:xe(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)}):(0,O.jsx)(S,{children:(0,O.jsx)(Te,{colSpan:Be.length+1,className:`h-24 text-center`,children:`No tests match the current search or filters.`})})})]}),(0,O.jsx)(p,{orientation:`horizontal`})]}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between px-2`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Q>0?`Showing ${$}-${ut} of ${Q}${ot||L||R||z?` (${U.length} total)`:``}`:`No tests found`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(g,{variant:`outline`,size:`sm`,onClick:()=>J.previousPage(),disabled:!J.getCanPreviousPage(),children:`Previous`}),(0,O.jsx)(g,{variant:`outline`,size:`sm`,onClick:()=>J.nextPage(),disabled:!J.getCanNextPage(),children:`Next`})]})]}),(0,O.jsx)(f,{selectedCount:G.selectedCount,summaryMeta:X>0?`${X} hidden by filters`:void 0,secondaryIcon:(0,O.jsx)(se,{className:`size-4`}),secondaryAriaLabel:`Clear queue`,onDelete:at,actionSlot:(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(ke,{selectedCount:G.selectedCount,hiddenCount:X,useCache:k,useMemory:P,browserStackAvailable:!Ue&&He,open:Ne,onOpenChange:D,onUseCacheChange:A,onUseMemoryChange:Ve,onRunLocal:()=>rt(!0),onRunBrowserStack:()=>rt(!1),disabled:T}),(0,O.jsx)(g,{variant:`outline`,size:`sm`,onClick:it,disabled:T,children:`Purge cache`})]}),onCancel:nt,isRunning:T})]})})}export{P as default};
@@ -1 +1 @@
1
- import{n as e}from"./batch-action-bar-uEhHVDds.js";import{Qn as t}from"./index-Bvtm2F6f.js";var n=t();function r({checked:t,onCheckedChange:r,ariaLabel:i}){function a(e){e.stopPropagation(),!(e.target instanceof Element&&e.target.closest(`[data-slot="checkbox"]`))&&r(t!==!0)}function o(e){e.stopPropagation()}return(0,n.jsx)(`div`,{"data-selection-checkbox-hit-area":!0,className:`relative z-10 flex min-h-8 min-w-8 items-center justify-center -my-1 -mx-2 px-2 py-1`,onPointerDown:e=>e.stopPropagation(),onFocus:o,onClick:a,children:(0,n.jsx)(e,{checked:t,onCheckedChange:e=>r(e===!0),onClick:e=>e.stopPropagation(),"aria-label":i??`Select row`})})}var i=[`select`,`name`,`target`,`platform`,`passRate`,`lastRun`],a={select:`2.75rem`,target:`10rem`,platform:`6.25rem`,passRate:`7.25rem`,lastRun:`9rem`};function o(e){return a[e]}export{o as n,r,i as t};
1
+ import{n as e}from"./batch-action-bar-BoqzHfwU.js";import{$n as t}from"./index-C3AdCkmj.js";var n=t();function r({checked:t,onCheckedChange:r,ariaLabel:i}){function a(e){e.stopPropagation(),!(e.target instanceof Element&&e.target.closest(`[data-slot="checkbox"]`))&&r(t!==!0)}function o(e){e.stopPropagation()}return(0,n.jsx)(`div`,{"data-selection-checkbox-hit-area":!0,className:`relative z-10 flex min-h-8 min-w-8 items-center justify-center -my-1 -mx-2 px-2 py-1`,onPointerDown:e=>e.stopPropagation(),onFocus:o,onClick:a,children:(0,n.jsx)(e,{checked:t,onCheckedChange:e=>r(e===!0),onClick:e=>e.stopPropagation(),"aria-label":i??`Select row`})})}var i=[`select`,`name`,`target`,`platform`,`passRate`,`lastRun`],a={select:`2.75rem`,target:`10rem`,platform:`6.25rem`,passRate:`7.25rem`,lastRun:`9rem`};function o(e){return a[e]}export{o as n,r,i as t};
@@ -1 +1 @@
1
- import"./chunk-CilyBKbf.js";import{Jn as e,Qn as t,Wt as n,pr as r}from"./index-Bvtm2F6f.js";var i=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);r();var a=t();function o({className:e,...t}){return(0,a.jsx)(`textarea`,{"data-slot":`textarea`,className:n(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}export{i as n,o as t};
1
+ import"./chunk-CilyBKbf.js";import{$n as e,Gt as t,Yn as n,mr as r}from"./index-C3AdCkmj.js";var i=n(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);r();var a=e();function o({className:e,...n}){return(0,a.jsx)(`textarea`,{"data-slot":`textarea`,className:t(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...n})}export{i as n,o as t};
@@ -1 +1 @@
1
- import{Jn as e}from"./index-Bvtm2F6f.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
1
+ import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,i as n,o as r,s as i,u as a}from"./editor.api2-DEGvZ9jW.js";import{t as o}from"./workers-BbHjH3Kx.js";import{n as s}from"./monaco.contribution-LYJB_lCm.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=o({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-METxwbDZ.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(t.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=u(i,t,n);return r}function d(e){return e?e.map(e=>e.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf(`/lib.`)===0?!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let n=i.parse(e),r=t.getModel(n);if(r)return r;if(this.isLibFile(n)&&this._hasFetchedLibFiles)return t.createModel(this._libFiles[n.path.slice(1)],`typescript`,n);let a=s.getExtraLibs()[e];return a?t.createModel(a.content,`typescript`,n):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,n,r,i){super(i),this._libFiles=e,this._defaults=n,this._selector=r,this._disposables=[],this._listener=Object.create(null);let a=e=>{if(e.getLanguageId()!==r)return;let n=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},i,a=e.onDidChangeContent(()=>{clearTimeout(i),i=window.setTimeout(n,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:r}=this._defaults.getDiagnosticsOptions();r&&(e.isAttachedToEditor()?n():t.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){a.dispose(),o.dispose(),clearTimeout(i)}},n()},o=e=>{t.setModelMarkers(e,this._selector,[]);let n=e.uri.toString();this._listener[n]&&(this._listener[n].dispose(),delete this._listener[n])};this._disposables.push(t.onDidCreateModel(e=>a(e))),this._disposables.push(t.onWillDisposeModel(o)),this._disposables.push(t.onDidChangeModelLanguage(e=>{o(e.model),a(e.model)})),this._disposables.push({dispose(){for(let e of t.getModels())o(e)}});let s=()=>{for(let e of t.getModels())o(e),a(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),t.getModels().forEach(e=>a(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let n=await this._worker(e.uri);if(e.isDisposed())return;let r=[],{noSyntaxValidation:a,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();a||r.push(n.getSyntacticDiagnostics(e.uri.toString())),o||r.push(n.getSemanticDiagnostics(e.uri.toString())),s||r.push(n.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(r);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?i.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&t.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(t,n){let r=n.start||0,i=n.length||1,{lineNumber:a,column:o}=t.getPositionAt(r),{lineNumber:s,column:c}=t.getPositionAt(r+i),l=[];return n.reportsUnnecessary&&l.push(e.Unnecessary),n.reportsDeprecated&&l.push(e.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(n.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(n.messageText,`
1
+ import{a as e,c as t,i as n,o as r,s as i,u as a}from"./editor.api2-DEGvZ9jW.js";import{t as o}from"./workers-BbHjH3Kx.js";import{n as s}from"./monaco.contribution-Dum2B1vn.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=o({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-METxwbDZ.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(t.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=u(i,t,n);return r}function d(e){return e?e.map(e=>e.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf(`/lib.`)===0?!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let n=i.parse(e),r=t.getModel(n);if(r)return r;if(this.isLibFile(n)&&this._hasFetchedLibFiles)return t.createModel(this._libFiles[n.path.slice(1)],`typescript`,n);let a=s.getExtraLibs()[e];return a?t.createModel(a.content,`typescript`,n):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,n,r,i){super(i),this._libFiles=e,this._defaults=n,this._selector=r,this._disposables=[],this._listener=Object.create(null);let a=e=>{if(e.getLanguageId()!==r)return;let n=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},i,a=e.onDidChangeContent(()=>{clearTimeout(i),i=window.setTimeout(n,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:r}=this._defaults.getDiagnosticsOptions();r&&(e.isAttachedToEditor()?n():t.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){a.dispose(),o.dispose(),clearTimeout(i)}},n()},o=e=>{t.setModelMarkers(e,this._selector,[]);let n=e.uri.toString();this._listener[n]&&(this._listener[n].dispose(),delete this._listener[n])};this._disposables.push(t.onDidCreateModel(e=>a(e))),this._disposables.push(t.onWillDisposeModel(o)),this._disposables.push(t.onDidChangeModelLanguage(e=>{o(e.model),a(e.model)})),this._disposables.push({dispose(){for(let e of t.getModels())o(e)}});let s=()=>{for(let e of t.getModels())o(e),a(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),t.getModels().forEach(e=>a(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let n=await this._worker(e.uri);if(e.isDisposed())return;let r=[],{noSyntaxValidation:a,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();a||r.push(n.getSyntacticDiagnostics(e.uri.toString())),o||r.push(n.getSemanticDiagnostics(e.uri.toString())),s||r.push(n.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(r);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?i.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&t.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(t,n){let r=n.start||0,i=n.length||1,{lineNumber:a,column:o}=t.getPositionAt(r),{lineNumber:s,column:c}=t.getPositionAt(r+i),l=[];return n.reportsUnnecessary&&l.push(e.Unnecessary),n.reportsDeprecated&&l.push(e.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(n.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(n.messageText,`
2
2
  `),code:n.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(t,n.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let n=[];return t.forEach(t=>{let r=e;if(t.file&&(r=this._libFiles.getOrCreateModel(t.file.fileName)),!r)return;let i=t.start||0,a=t.length||1,{lineNumber:o,column:s}=r.getPositionAt(i),{lineNumber:c,column:l}=r.getPositionAt(i+a);n.push({resource:r.uri,startLineNumber:o,startColumn:s,endLineNumber:c,endColumn:l,message:u(t.messageText,`
3
3
  `)})}),n}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return n.Error;case 3:return n.Info;case 0:return n.Warning;case 2:return n.Hint}return n.Info}},h=class e extends f{get triggerCharacters(){return[`.`]}async provideCompletionItems(t,n,i,o){let s=t.getWordUntilPosition(n),c=new r(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn),l=t.uri,u=t.getOffsetAt(n),d=await this._worker(l);if(t.isDisposed())return;let f=await d.getCompletionsAtPosition(l.toString(),u);if(!(!f||t.isDisposed()))return{suggestions:f.entries.map(i=>{let o=c;if(i.replacementSpan){let e=t.getPositionAt(i.replacementSpan.start),n=t.getPositionAt(i.replacementSpan.start+i.replacementSpan.length);o=new r(e.lineNumber,e.column,n.lineNumber,n.column)}let s=[];return i.kindModifiers!==void 0&&i.kindModifiers.indexOf(`deprecated`)!==-1&&s.push(a.CompletionItemTag.Deprecated),{uri:l,position:n,offset:u,range:o,label:i.name,insertText:i.name,sortText:i.sortText,kind:e.convertKind(i.kind),tags:s}})}}async resolveCompletionItem(t,n){let r=t,i=r.uri,a=r.position,o=r.offset,s=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),o,r.label);return s?{uri:i,position:a,label:s.name,kind:e.convertKind(s.kind),detail:d(s.displayParts),documentation:{value:e.createDocumentationString(s)}}:r}static convertKind(e){switch(e){case C.primitiveType:case C.keyword:return a.CompletionItemKind.Keyword;case C.variable:case C.localVariable:return a.CompletionItemKind.Variable;case C.memberVariable:case C.memberGetAccessor:case C.memberSetAccessor:return a.CompletionItemKind.Field;case C.function:case C.memberFunction:case C.constructSignature:case C.callSignature:case C.indexSignature:return a.CompletionItemKind.Function;case C.enum:return a.CompletionItemKind.Enum;case C.module:return a.CompletionItemKind.Module;case C.class:return a.CompletionItemKind.Class;case C.interface:return a.CompletionItemKind.Interface;case C.warning:return a.CompletionItemKind.File}return a.CompletionItemKind.Property}static createDocumentationString(e){let t=d(e.documentation);if(e.tags)for(let n of e.tags)t+=`
4
4
 
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{n as t,r as n}from"./monaco-editor-BEWq4fzI.js";import{n as r,r as i,t as a}from"./shortcut-hints-B8kCurzo.js";import{t as o}from"./pencil-BUQgVaEH.js";import{t as s}from"./plus-Bf5Mbita.js";import{t as c}from"./trash-2-Dv939XWG.js";import{n as l,r as u,t as d}from"./popover-OAiTzjiL.js";import{t as f}from"./scroll-area-CX3T8JWh.js";import{i as p,n as m,r as h,t as g}from"./tabs-BEp-p5jh.js";import{$n as _,Ft as v,Gn as y,Gt as b,In as x,Jt as S,Mt as C,Nt as w,S as T,Ut as E,Wt as D,_ as O,cr as k,f as A,g as j,h as M,ht as N,m as P,mr as F,p as I,vt as L}from"./index-C3AdCkmj.js";import{t as R}from"./badge-ClWCtaXi.js";import{r as z}from"./hook-runtime-DZ6bR69q.js";import{n as B,r as V,t as H}from"./resizable-ugU12HrY.js";var U=_();function W({label:e,value:t,mono:n=!1}){return(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:e}),(0,U.jsx)(`div`,{className:n?`font-mono text-xs text-foreground break-all`:`text-sm text-foreground`,children:t})]})}function G({open:e,onOpenChange:t,hook:n,isDeleting:r,deleteError:i,blockedReferences:a,onDelete:o,onForceDelete:s}){let l=z(n.runtime),u=a.length>0;return(0,U.jsx)(A,{open:e,onOpenChange:t,children:(0,U.jsxs)(I,{className:`sm:max-w-xl`,children:[(0,U.jsxs)(j,{children:[(0,U.jsx)(O,{children:u?`Hook is still in use`:`Delete hook?`}),(0,U.jsx)(P,{children:u?`These references will break if you force delete this hook.`:`This removes the hook record from the dashboard. If the hook is still referenced, those references will be shown here before force delete is allowed.`})]}),(0,U.jsxs)(`div`,{className:`grid gap-4 rounded-sm border px-4 py-3 sm:grid-cols-2`,children:[(0,U.jsx)(W,{label:`Hook`,value:n.name}),(0,U.jsx)(W,{label:`Runtime`,value:l.label}),(0,U.jsx)(W,{label:`Hook ID`,value:n.id,mono:!0}),(0,U.jsx)(W,{label:`File`,value:n.file,mono:!0})]}),i?(0,U.jsx)(`div`,{className:`rounded-sm border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-foreground`,children:i}):null,u?(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-start gap-3 rounded-sm border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm`,children:[(0,U.jsx)(x,{className:`mt-0.5 h-4 w-4 shrink-0 text-amber-600`}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`font-medium text-foreground`,children:`Force delete only if you will fix these references immediately.`}),(0,U.jsx)(`div`,{className:`text-muted-foreground`,children:`Remove or replace these hook usages first when possible.`})]})]}),(0,U.jsx)(`div`,{className:`max-h-64 space-y-2 overflow-y-auto pr-1`,children:a.map(e=>(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2`,children:[(0,U.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.label}),(0,U.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[e.kind,` · `,e.context]}),(0,U.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground break-all`,children:e.path})]},`${e.kind}-${e.path}-${e.context}`))})]}):null,(0,U.jsxs)(M,{children:[(0,U.jsx)(D,{variant:`outline`,onClick:()=>t(!1),children:u?`Close`:`Cancel`}),(0,U.jsxs)(D,{variant:`destructive`,onClick:u?s:o,disabled:r,children:[(0,U.jsx)(c,{className:`h-4 w-4`}),r?`Deleting...`:u?`Force Delete`:`Delete Hook`]})]})]})})}function K({hookName:e,isCreateMode:s,mode:f=`view`,hookHref:p,editHref:m,unsaved:h=!1,isSaving:g=!1,isRunning:_=!1,isDeleting:b=!1,onSave:x,onRun:S,runDisabled:T=!1,onDelete:E,shortcutsOpen:O=!1,onToggleShortcuts:A}){let j=f===`view`&&!s,M=!s&&!j&&f===`edit`,N=!s&&!!S,P=!s&&!!E;return(0,U.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center justify-between border-b px-4 min-w-0`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(k,{to:`/hooks`,className:`shrink-0 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:`Hooks`}),(0,U.jsx)(y,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),s?(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:`New Hook`}):p&&!j?(0,U.jsx)(k,{to:p,className:`truncate text-sm font-medium transition-colors hover:text-primary`,children:e}):(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e}),M&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(y,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:`Edit`})]}),h&&(0,U.jsx)(R,{variant:`outline`,className:`text-xs`,children:`Unsaved`})]}),(0,U.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:j?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(D,{variant:`outline`,size:`sm`,asChild:!0,children:(0,U.jsxs)(k,{to:m??p??`/hooks`,children:[(0,U.jsx)(o,{className:`h-3.5 w-3.5`}),`Edit`,(0,U.jsx)(a,{shortcut:`E`})]})}),N?(0,U.jsxs)(D,{size:`sm`,onClick:S,disabled:_||T,children:[(0,U.jsx)(n,{className:`h-3.5 w-3.5`}),_?`Running...`:`Run Hook`,(0,U.jsx)(a,{shortcut:`R`,className:`border-primary-foreground/20 bg-primary-foreground/10 text-primary-foreground`})]}):null,P?(0,U.jsxs)(D,{variant:`ghost`,size:`sm`,onClick:E,disabled:b,className:`text-muted-foreground hover:bg-destructive/10 hover:text-destructive`,children:[(0,U.jsx)(c,{className:`h-3.5 w-3.5`}),b?`Deleting...`:`Delete`]}):null,!s&&A?(0,U.jsxs)(d,{open:O,onOpenChange:e=>{e||A()},children:[(0,U.jsxs)(C,{children:[(0,U.jsx)(v,{asChild:!0,children:(0,U.jsx)(u,{asChild:!0,children:(0,U.jsx)(D,{variant:`ghost`,size:`icon-sm`,onClick:A,"aria-label":`Shortcuts`,children:(0,U.jsx)(i,{className:`h-3.5 w-3.5`})})})}),(0,U.jsx)(w,{children:`Shortcuts`})]}),(0,U.jsx)(l,{align:`end`,sideOffset:8,className:`w-72 p-4`,children:(0,U.jsx)(`div`,{className:`space-y-3`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Actions`}),(0,U.jsx)(r,{hints:[{key:`E`,label:`Edit`},{key:`R`,label:`Run Hook`},{key:`?`,label:`Toggle shortcuts`}]})]})})})]}):null]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(D,{variant:`ghost`,size:`sm`,onClick:x,disabled:g||!x,children:[(0,U.jsx)(t,{className:`h-3.5 w-3.5`}),g?`Saving...`:`Save`]}),N?(0,U.jsxs)(D,{size:`sm`,onClick:S,disabled:_||T,children:[(0,U.jsx)(n,{className:`h-3.5 w-3.5`}),_?`Running...`:`Run Hook`]}):null,P?(0,U.jsxs)(D,{variant:`ghost`,size:`sm`,onClick:E,disabled:b,className:`text-muted-foreground hover:bg-destructive/10 hover:text-destructive`,children:[(0,U.jsx)(c,{className:`h-3.5 w-3.5`}),b?`Deleting...`:`Delete`]}):null]})})]})}var q=e(F(),1);function J(e){if(!e)return`just now`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Y({status:e}){return e===`passed`?(0,U.jsx)(R,{className:`border-emerald-500/20 bg-emerald-500/15 text-emerald-500`,children:`Passed`}):(0,U.jsx)(R,{variant:`destructive`,children:`Failed`})}function X(){return(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6`,children:(0,U.jsxs)(`div`,{className:`max-w-sm text-center`,children:[(0,U.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:`No run selected`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-muted-foreground`,children:`Run this hook or pick a recent local result to inspect.`})]})})}function Z({rows:e}){return e.length===0?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`None`}):(0,U.jsx)(`div`,{className:`rounded-sm border`,children:(0,U.jsx)(`table`,{className:`w-full text-sm`,children:(0,U.jsx)(`tbody`,{children:e.map(([e,t])=>(0,U.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-muted-foreground`,children:e}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:t})]},e))})})})}function Q({selectedRun:e}){let[t,n]=(0,q.useState)(`overview`),r=e?.result??null,i=r?.sandbox.networkLogs??[],a=r?.sandbox.networkLogsAvailable===!0&&i.length>0;if((0,q.useEffect)(()=>{n(`overview`)},[e?.id]),(0,q.useEffect)(()=>{!a&&t===`network`&&n(`overview`)},[t,a]),!e)return(0,U.jsx)(X,{});let o=e.result,s=Object.entries(o.variables),c=Object.entries(e.overrideSnapshot);return(0,U.jsxs)(g,{value:t,onValueChange:e=>n(e),className:`flex h-full min-h-0 flex-col gap-0`,children:[o.status===`failed`?null:(0,U.jsx)(`div`,{className:`border-b px-4 py-3`,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,U.jsx)(Y,{status:o.status}),(0,U.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Latest hook result`}),(0,U.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:S(o.duration)}),(0,U.jsx)(`span`,{children:J(o.executedAt)})]})]})}),(0,U.jsxs)(h,{variant:`line`,className:`h-10 w-full justify-start rounded-none border-b px-4`,children:[(0,U.jsx)(p,{value:`overview`,className:`flex-initial rounded-none text-xs`,children:`Overview`}),(0,U.jsx)(p,{value:`output`,className:`flex-initial rounded-none text-xs`,children:`Output`}),(0,U.jsx)(p,{value:`env`,className:`flex-initial rounded-none text-xs`,children:`Env`}),(0,U.jsx)(p,{value:`sandbox`,className:`flex-initial rounded-none text-xs`,children:`Sandbox`}),a?(0,U.jsx)(p,{value:`network`,className:`flex-initial rounded-none text-xs`,children:`Network`}):null]}),(0,U.jsx)(m,{value:`overview`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Status`}),(0,U.jsx)(`div`,{className:`mt-2`,children:(0,U.jsx)(Y,{status:o.status})})]}),(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Duration`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:S(o.duration)})]}),(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Executed`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:new Date(o.executedAt).toLocaleString()})]}),(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Recency`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:J(o.executedAt)})]})]}),o.status===`failed`?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Failure summary`}),(0,U.jsx)(`div`,{className:`rounded-sm border border-destructive/30 bg-destructive/10 px-3 py-2.5 text-sm text-foreground`,children:o.error??o.stderr??`Hook run failed.`})]}):null]})})}),(0,U.jsx)(m,{value:`output`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`stdout`}),(0,U.jsx)(`div`,{className:`rounded-sm border bg-muted/20 p-3 font-mono text-xs text-foreground whitespace-pre-wrap break-all`,children:o.stdout||`No stdout captured.`})]}),(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`stderr`}),(0,U.jsx)(`div`,{className:`rounded-sm border bg-destructive/5 p-3 font-mono text-xs text-foreground whitespace-pre-wrap break-all`,children:o.stderr||`No stderr captured.`})]})]})})}),(0,U.jsx)(m,{value:`env`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Emitted variables`}),(0,U.jsx)(Z,{rows:s})]}),(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Applied override snapshot`}),(0,U.jsx)(Z,{rows:c})]})]})})}),(0,U.jsx)(m,{value:`sandbox`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsx)(`div`,{className:`rounded-sm border`,children:(0,U.jsx)(`table`,{className:`w-full text-sm`,children:(0,U.jsxs)(`tbody`,{children:[(0,U.jsxs)(`tr`,{className:`border-b`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Runtime`}),(0,U.jsx)(`td`,{className:`px-3 py-2 text-sm text-foreground`,children:z(o.sandbox.runtime).label})]}),(0,U.jsxs)(`tr`,{className:`border-b`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Image`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:o.sandbox.image})]}),(0,U.jsxs)(`tr`,{className:`border-b`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Docker version`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:o.sandbox.dockerVersion??`Not available`})]}),(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Network`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:o.sandbox.networkMode})]})]})})}),a?null:(0,U.jsx)(`div`,{className:`rounded-sm border bg-muted/20 px-3 py-2.5 text-sm text-muted-foreground`,children:`Network logs aren't available for this runtime yet.`})]})})}),a?(0,U.jsx)(m,{value:`network`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsx)(`div`,{className:`p-4`,children:(0,U.jsx)(`div`,{className:`overflow-hidden rounded-sm border`,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b bg-muted/30`,children:[(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Method`}),(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`URL`}),(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Status`}),(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Duration`})]})}),(0,U.jsx)(`tbody`,{children:i.map(e=>(0,U.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:e.method}),(0,U.jsxs)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:[(0,U.jsx)(`div`,{children:e.url}),e.error?(0,U.jsx)(`div`,{className:`mt-1 text-destructive`,children:e.error}):null]}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:e.statusCode??`—`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:e.durationMs==null?`—`:S(e.durationMs)})]},e.id))})]})})})})}):null]})}function $(e){if(!e)return`just now`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function ee({baselineCount:e,baselineFilePath:t,baselineInfo:n,isBaselineLoading:r,overrideRows:i,overridingRowIds:a,recentRuns:o,selectedRunId:l,isRunning:u,runDisabledReason:d,runError:_,onAddOverride:v,onUpdateOverride:y,onRemoveOverride:x,onRun:C,onSelectRun:w}){return(0,U.jsxs)(g,{defaultValue:`inputs`,className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,U.jsx)(`div`,{className:`border-b px-4 py-1.5`,children:(0,U.jsxs)(h,{variant:`line`,className:`h-7 w-auto justify-start rounded-none p-0`,children:[(0,U.jsx)(p,{value:`inputs`,className:`flex-initial rounded-none px-2.5 text-xs`,children:`Input`}),(0,U.jsx)(p,{value:`logs`,className:`flex-initial rounded-none px-2.5 text-xs`,children:`Run logs`})]})}),(0,U.jsx)(m,{value:`inputs`,className:`min-h-0 flex-1 overflow-hidden`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[d?(0,U.jsxs)(`div`,{className:`rounded-sm border border-amber-500/30 bg-amber-500/10 px-3 py-2.5 text-sm`,children:[(0,U.jsx)(`div`,{className:`font-medium text-foreground`,children:d===`Save this hook to run the latest changes.`?`Save required`:`Hook couldn't be executed`}),(0,U.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:d})]}):null,(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Workspace env`}),(0,U.jsxs)(`div`,{className:`rounded-sm border bg-muted/20 px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-sm text-foreground`,children:r?`Loading workspace variables...`:t?`${e} variable${e===1?``:`s`} available from ${t}`:`No workspace .env file is configured for this project.`}),n?(0,U.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:n}):(0,U.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:`Inherited workspace variables are included automatically for each run.`})]})]}),(0,U.jsxs)(`section`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Runtime variables`}),(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Variables added for this run only. They override inherited workspace values and can model env handoff between hooks.`})]}),(0,U.jsxs)(D,{variant:`outline`,size:`sm`,onClick:v,children:[(0,U.jsx)(s,{className:`h-3.5 w-3.5`}),`Add variable`]})]}),i.length===0?(0,U.jsx)(`div`,{className:`rounded-sm border border-dashed px-3 py-4 text-sm text-muted-foreground`,children:`No runtime variables yet.`}):(0,U.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>{let t=a.has(e.id);return(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)_auto]`,children:[(0,U.jsx)(E,{value:e.key,placeholder:`KEY`,onChange:t=>y(e.id,{key:t.target.value})}),(0,U.jsx)(E,{value:e.value,placeholder:`Value`,onChange:t=>y(e.id,{value:t.target.value})}),(0,U.jsx)(D,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove variable`,onClick:()=>x(e.id),children:(0,U.jsx)(c,{className:`h-3.5 w-3.5`})})]}),t?(0,U.jsx)(`div`,{className:`mt-2 text-xs text-primary`,children:`Overrides .env`}):null]},e.id)})})]})]})})}),(0,U.jsx)(m,{value:`logs`,className:`min-h-0 flex-1 overflow-hidden`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[_?(0,U.jsxs)(`div`,{className:`rounded-sm border border-destructive/30 bg-destructive/10 px-3 py-2.5 text-sm`,children:[(0,U.jsx)(`div`,{className:`font-medium text-foreground`,children:`Hook couldn't be executed`}),(0,U.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`Review stderr or sandbox details, adjust runtime variables, and run again.`}),(0,U.jsx)(`div`,{className:`mt-3 font-mono text-xs text-foreground`,children:_})]}):null,(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Local runs`}),(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Recent hook runs stay in this browser and are not added to dashboard history.`}),o.length===0?(0,U.jsx)(`div`,{className:`rounded-sm border border-dashed px-3 py-4 text-sm text-muted-foreground`,children:`No run logs in this browser session yet.`}):(0,U.jsx)(`div`,{className:`space-y-2`,children:o.map(e=>(0,U.jsxs)(`button`,{type:`button`,onClick:()=>w(e.id),className:b(`flex w-full items-center justify-between rounded-sm border px-3 py-2.5 text-left transition-colors`,`hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50`,(l??o[0]?.id)===e.id&&`border-primary/50 bg-primary/10`),children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.result.status===`passed`?`Passed`:`Failed`}),(0,U.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:$(e.result.executedAt)})]}),(0,U.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:S(e.result.duration)})]},e.id))})]})]})})})]})}function te({isMobile:e,leftPane:t,rightTopPane:n,rightBottomPane:r,className:i}){return e?(0,U.jsxs)(`div`,{className:b(`flex min-h-0 flex-1 flex-col overflow-auto`,i),children:[(0,U.jsx)(`section`,{"data-slot":`leftPane`,className:`min-h-0`,children:t}),(0,U.jsx)(`section`,{"data-slot":`rightTopPane`,className:`border-t`,children:n}),(0,U.jsx)(`section`,{"data-slot":`rightBottomPane`,className:`min-h-[360px] border-t`,children:r})]}):(0,U.jsxs)(V,{orientation:`horizontal`,className:b(`min-h-0 flex-1`,i),children:[(0,U.jsx)(B,{defaultSize:46,minSize:30,children:(0,U.jsx)(`div`,{"data-slot":`leftPane`,className:`h-full min-h-0 overflow-hidden`,children:t})}),(0,U.jsx)(H,{withHandle:!0}),(0,U.jsx)(B,{defaultSize:54,minSize:30,children:(0,U.jsxs)(V,{orientation:`vertical`,className:`h-full min-h-0`,children:[(0,U.jsx)(B,{defaultSize:42,minSize:24,children:(0,U.jsx)(`div`,{"data-slot":`rightTopPane`,className:`h-full min-h-0 overflow-hidden border-b`,children:n})}),(0,U.jsx)(H,{withHandle:!0}),(0,U.jsx)(B,{defaultSize:58,minSize:28,children:(0,U.jsx)(`div`,{"data-slot":`rightBottomPane`,className:`h-full min-h-0 overflow-hidden`,children:r})})]})})]})}function ne(e={}){return{id:`override-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,key:e.key??``,value:e.value??``}}function re(e){return e.map(e=>({key:e.key.trim(),value:e.value})).filter(e=>e.key.length>0)}function ie({hookId:e}){let[t,n]=(0,q.useState)([]),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(null),[s,c]=(0,q.useState)(!0),[l,u]=(0,q.useState)([]),[d,f]=(0,q.useState)([]),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(null),y=(0,q.useRef)(0);(0,q.useEffect)(()=>{u([]),f([]),m(null),v(null)},[e]),(0,q.useEffect)(()=>{let e=!1;return c(!0),N().then(t=>{e||(n(t.variables),i(t.filePath),o(t.error??null))}).catch(t=>{e||(n([]),i(null),o(t instanceof Error?t.message:`Failed to load workspace variables`))}).finally(()=>{e||c(!1)}),()=>{e=!0}},[e]);let b=(0,q.useMemo)(()=>new Set(t.map(e=>e.key)),[t]),x=(0,q.useMemo)(()=>re(l),[l]),S=(0,q.useMemo)(()=>{let e=new Set;for(let t of l){let n=t.key.trim();n&&b.has(n)&&e.add(t.id)}return e},[b,l]),C=(0,q.useMemo)(()=>d.find(e=>e.id===p)??d[0]??null,[d,p]);function w(e={}){u(t=>[...t,ne(e)])}function E(e,t){u(n=>n.map(n=>n.id===e?{...n,...t}:n))}function D(e){u(t=>t.filter(t=>t.id!==e))}async function O(){if(!e||h)return null;g(!0),v(null);let t=Object.fromEntries(x.map(e=>[e.key,e.value]));try{let n=await L(e,{overrides:x});y.current+=1;let r={id:`hook-run-${y.current}`,result:n,overrideSnapshot:t};return f(e=>[r,...e].slice(0,6)),m(r.id),r}catch(e){return e instanceof T?v(e.message):v(e instanceof Error?e.message:`Hook run failed`),null}finally{g(!1)}}return{baselineVariables:t,baselineFilePath:r,baselineInfo:a,isBaselineLoading:s,overrideRows:l,normalizedOverrides:x,overridingRowIds:S,recentRuns:d,selectedRunId:p,selectedRun:C,isRunning:h,runError:_,addOverrideRow:w,updateOverrideRow:E,removeOverrideRow:D,selectRun:m,clearRunError:()=>v(null),submitRun:O}}export{K as a,Q as i,te as n,G as o,ee as r,ie as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{pr as t}from"./index-Bvtm2F6f.js";var n=e(t(),1);function r(e){let t=(0,n.useRef)(e);(0,n.useLayoutEffect)(()=>{t.current=e},[e]),(0,n.useEffect)(()=>{function e(e){let n=e.target,r=n.tagName;if((r===`INPUT`||r===`TEXTAREA`||r===`SELECT`||n.isContentEditable)&&!(r===`TEXTAREA`&&n.getAttribute(`aria-readonly`)===`true`&&n.closest(`.monaco-editor`))){e.key===`Escape`&&n.blur();return}let i=e.key.toLowerCase();if(e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let n=`shift+${i}`,r=t.current[n];if(r){e.preventDefault(),r(e);return}}if(e.key!==`Escape`&&(e.ctrlKey||e.metaKey||e.altKey)&&!((e.metaKey||e.ctrlKey)&&i===`enter`)||e.shiftKey&&e.key!==`Escape`)return;let a=t.current[i];a&&(e.preventDefault(),a(e))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[])}export{r as t};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{mr as t}from"./index-C3AdCkmj.js";var n=e(t(),1);function r(e){let t=(0,n.useRef)(e);(0,n.useLayoutEffect)(()=>{t.current=e},[e]),(0,n.useEffect)(()=>{function e(e){let n=e.target,r=n.tagName;if((r===`INPUT`||r===`TEXTAREA`||r===`SELECT`||n.isContentEditable)&&!(r===`TEXTAREA`&&n.getAttribute(`aria-readonly`)===`true`&&n.closest(`.monaco-editor`))){e.key===`Escape`&&n.blur();return}let i=e.key.toLowerCase();if(e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let n=`shift+${i}`,r=t.current[n];if(r){e.preventDefault(),r(e);return}}if(e.key!==`Escape`&&(e.ctrlKey||e.metaKey||e.altKey)&&!((e.metaKey||e.ctrlKey)&&i===`enter`)||e.shiftKey&&e.key!==`Escape`)return;let a=t.current[i];a&&(e.preventDefault(),a(e))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[])}export{r as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{Qn as t,pr as n}from"./index-Bvtm2F6f.js";var r=e(n(),1);t();var i=r.createContext(void 0);function a(e){let t=r.useContext(i);return e||t||`ltr`}function o(e,[t,n]){return Math.min(n,Math.max(t,e))}function s(e){return e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?e.slice(1,-1):e}function c(e){(0,r.useEffect)(()=>(document.title=`${s(e)} | agent-qa`,()=>{document.title=`agent-qa`}),[e])}export{o as n,a as r,c as t};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{$n as t,mr as n}from"./index-C3AdCkmj.js";var r=e(n(),1);t();var i=r.createContext(void 0);function a(e){let t=r.useContext(i);return e||t||`ltr`}function o(e,[t,n]){return Math.min(n,Math.max(t,e))}function s(e){return e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?e.slice(1,-1):e}function c(e){(0,r.useEffect)(()=>(document.title=`${s(e)} | agent-qa`,()=>{document.title=`agent-qa`}),[e])}export{o as n,a as r,c as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{a as t,f as n,i as r,n as i,r as a,t as o,u as s}from"./tab-console-Ciur_Bee.js";import{u as c}from"./select-D0GpDfUa.js";import{t as l}from"./circle-x-BOV-jCVR.js";import{t as u}from"./copy-DW4nc-pA.js";import{t as d}from"./eye-Cj7s1eMQ.js";import{t as f}from"./refresh-cw-D0OwRzvm.js";import{t as p}from"./zap-Dx2CqraS.js";import{n as m,r as h,t as g}from"./popover-OAiTzjiL.js";import{t as _}from"./scroll-area-CX3T8JWh.js";import{i as v,n as y,r as b,t as x}from"./tabs-BEp-p5jh.js";import{$n as S,Bn as ee,Fn as C,Ft as w,Gt as T,It as E,Jt as D,Mt as O,Nt as te,Pn as ne,Rn as re,Wn as k,Wt as A,Yn as j,at as M,mr as ie,or as N,zn as P}from"./index-C3AdCkmj.js";import{t as F}from"./badge-ClWCtaXi.js";import{n as I}from"./step-name-pills-BQ8yv40K.js";var L=j(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),R=j(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),z=j(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),B=j(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),ae=j(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),oe=j(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),V=S();function se({log:e}){return(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsx)(`div`,{className:`shrink-0 border-b px-4 py-3`,children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`text-sm font-medium`,children:e.name}),(0,V.jsx)(F,{className:T(`px-1.5 py-0 text-[10px]`,e.status===`passed`?`border-emerald-500/20 bg-emerald-500/15 text-emerald-500`:e.status===`running`?`border-blue-500/20 bg-blue-500/15 text-blue-500`:`border-red-500/20 bg-red-500/15 text-red-500`),children:e.status}),(0,V.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:e.phase}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(e.duration)})]})}),(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{className:`space-y-4 p-4`,children:[e.stdout&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`stdout`}),(0,V.jsx)(`pre`,{className:`rounded-md bg-muted/50 p-2 font-mono text-xs whitespace-pre-wrap break-all`,children:e.stdout})]}),e.stderr&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`stderr`}),(0,V.jsx)(`pre`,{className:`rounded-md bg-red-500/5 p-2 font-mono text-xs whitespace-pre-wrap break-all text-red-400`,children:e.stderr})]}),e.variables&&Object.keys(e.variables).length>0&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Emitted Variables`}),(0,V.jsx)(`table`,{className:`w-full text-sm`,children:(0,V.jsx)(`tbody`,{children:Object.entries(e.variables).map(([e,t])=>(0,V.jsxs)(`tr`,{className:`border-b border-border/50`,children:[(0,V.jsx)(`td`,{className:`px-2 py-1 font-mono text-xs text-muted-foreground`,children:e}),(0,V.jsx)(`td`,{className:`px-2 py-1 font-mono text-xs break-all`,children:t})]},e))})})]}),e.returnData!=null&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Return Data`}),(0,V.jsx)(`pre`,{className:`rounded-md bg-muted/50 p-2 font-mono text-xs whitespace-pre-wrap break-all`,children:typeof e.returnData==`string`?e.returnData:JSON.stringify(e.returnData,null,2)})]})]})})]})}var H=e(ie(),1);function U({children:e,marker:t,state:n,tone:r,label:i}){let a=r===`primary`?`text-primary`:`text-amber-500`;return(0,V.jsxs)(O,{children:[(0,V.jsx)(w,{asChild:!0,children:(0,V.jsxs)(`span`,{className:`relative inline-flex shrink-0 cursor-default`,children:[e,(0,V.jsx)(`span`,{"data-cache-marker":t,"data-cache-state":n,"aria-label":i,className:T(`absolute -bottom-px -right-px inline-flex size-2 items-center justify-center rounded-full border border-background/90 bg-background/70 shadow-[0_0_0_1px_color-mix(in_srgb,var(--border)_70%,transparent)]`,a),children:(0,V.jsx)(p,{className:T(`size-1.5 fill-current stroke-[2.5]`,a)})})]})}),(0,V.jsx)(te,{children:i})]})}function ce(e){if(!e)return null;try{let t=typeof e==`string`?JSON.parse(e):e;if(t&&typeof t==`object`)return[t.type||t.action||``,t.target||t.selector||``].filter(Boolean).join(` `)}catch{return String(e)}return null}function W({sub:e,index:t,stepId:n,isSelected:r,onSelect:i}){let a=ce(e.plannedAction),o=e.phaseDurations?(e.phaseDurations.observe??0)+(e.phaseDurations.plan??0)+(e.phaseDurations.execute??0)+(e.phaseDurations.verify??0):null,s=(0,V.jsx)(`span`,{className:`relative inline-flex h-4 w-4 shrink-0 items-center justify-center`,children:e.result===`in-progress`?(0,V.jsx)(ee,{className:`h-3 w-3 text-blue-500 animate-spin shrink-0`}):e.result===`success`?(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-500 shrink-0`}):(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-red-500 shrink-0`})});return(0,V.jsx)(`li`,{role:`treeitem`,"aria-level":2,"aria-selected":r,"data-sub-action-id":`${n}-${t}`,children:(0,V.jsxs)(`button`,{className:T(`flex w-full items-center gap-2 py-1.5 px-3 text-left rounded-[2px] text-sm`,`hover:bg-muted/50 transition-colors`,r&&`bg-primary/10 ring-1 ring-primary/30`),onClick:i,children:[e.cached?(0,V.jsx)(U,{marker:`sub-action-status`,state:`cached`,tone:`primary`,label:`Cached action`,children:s}):s,(0,V.jsxs)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:[`#`,t+1]}),a&&(0,V.jsx)(`span`,{className:`flex-1 min-w-0 text-xs truncate text-muted-foreground`,children:a}),o!=null&&(0,V.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:D(o)})]})})}function G({log:e,isSelected:t,onSelect:n}){let r=e.type===`runjs`?B:C,i=(0,V.jsx)(`span`,{className:T(`h-1.5 w-1.5 rounded-full shrink-0`,e.status===`passed`?`bg-emerald-500`:`bg-red-500`)});return(0,V.jsx)(`li`,{role:`treeitem`,"aria-level":2,"aria-selected":t,"data-execution-id":e.id,children:(0,V.jsxs)(`button`,{className:T(`flex w-full items-center gap-2 py-1.5 px-3 text-left rounded-[2px] text-sm`,`hover:bg-muted/50 transition-colors`,t&&`bg-primary/10 ring-1 ring-primary/30`),onClick:n,children:[(0,V.jsx)(`span`,{className:`inline-flex h-4 w-4 shrink-0 items-center justify-center`,children:i}),(0,V.jsx)(r,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),e.phase===`inline`&&(0,V.jsx)(`span`,{className:`text-[9px] px-1 py-0 rounded bg-amber-500/15 text-amber-400 border border-amber-500/20 font-medium shrink-0`,children:`pre`}),(0,V.jsx)(`span`,{className:`flex-1 min-w-0 text-xs break-all text-muted-foreground`,children:e.name}),(0,V.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:D(e.duration)})]})})}function K({status:e}){switch(e){case`passed`:return(0,V.jsx)(k,{className:`h-4 w-4 text-emerald-500 shrink-0 mt-0.5`});case`failed`:return(0,V.jsx)(l,{className:`h-4 w-4 text-red-500 shrink-0 mt-0.5`});case`healed`:case`flaky`:return(0,V.jsx)(f,{className:`h-4 w-4 text-amber-500 shrink-0 mt-0.5`});default:return(0,V.jsx)(z,{className:`h-4 w-4 text-muted-foreground shrink-0 mt-0.5`})}}function q({step:e,isSelected:t,isExpanded:n,selection:r,onSelect:i,inlineLogs:a=[],embedded:o=!1}){let s=e.subActionsData??[],c=s.length>0,l=s.filter(e=>e.cached).length,u=s.length===0?`none`:l===s.length?`all`:l>0?`some`:`none`,d=c||a.length>0,f=(0,V.jsx)(K,{status:e.status}),p=u===`all`?(0,V.jsx)(U,{marker:`step-status`,state:`all`,tone:`primary`,label:`All actions cached`,children:f}):u===`some`?(0,V.jsx)(U,{marker:`step-status`,state:`some`,tone:`amber`,label:`${l} of ${s.length} actions cached`,children:f}):f;return(0,V.jsxs)(`li`,{role:`treeitem`,"aria-expanded":d?n:void 0,"aria-selected":t&&r?.type===`step`,"aria-level":1,"data-step-id":e.id,className:T(!o&&`mx-2 mb-1.5 rounded-[2px]`,d&&n&&!o&&`border border-border/70 bg-muted/15 relative before:absolute before:left-[19.5px] before:w-px before:bg-border/60 before:top-[19px] before:bottom-[13px]`,d&&n&&o&&`relative before:absolute before:left-[19.5px] before:w-px before:bg-border/60 before:top-[19px] before:bottom-[13px]`),children:[(0,V.jsxs)(`button`,{className:T(`flex w-full items-start gap-2 py-2 px-3 text-left rounded-[2px]`,`hover:bg-muted/50 transition-colors`,t&&r?.type===`step`&&`bg-primary/10 ring-1 ring-primary/30`),onClick:()=>i({type:`step`,stepId:e.id}),children:[p,(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.displayStepTotal?(0,V.jsxs)(`div`,{className:`text-[10px] font-medium uppercase tracking-wide text-muted-foreground/70`,children:[`Step `,e.displayStepOrder,` of `,e.displayStepTotal]}):null,(0,V.jsx)(I,{step:e})]}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0 pt-0.5`,children:D(e.duration)})]}),n&&d&&(0,V.jsxs)(`ul`,{role:`group`,children:[a.map(t=>(0,V.jsx)(G,{log:t,isSelected:r?.type===`execution`&&r.logId===t.id,onSelect:()=>i({type:`execution`,stepId:e.id,logId:t.id})},t.id)),s.map((t,n)=>(0,V.jsx)(W,{sub:t,index:n,stepId:e.id,isSelected:r?.type===`subaction`&&r.stepId===e.id&&r.subIndex===n,onSelect:()=>i({type:`subaction`,stepId:e.id,subIndex:n})},n))]})]})}function J(e){return e?.type===`step`||e?.type===`subaction`||e?.type===`execution`}function Y(e){return e?.type===`subaction`}function le({log:e,isSelected:t,onSelect:n}){return(0,V.jsx)(`li`,{role:`treeitem`,"aria-level":1,"aria-selected":t,children:(0,V.jsxs)(`button`,{className:T(`flex w-full items-center gap-2 py-1.5 px-3 text-left rounded-[2px] text-sm`,`hover:bg-muted/50 transition-colors`,t&&`bg-primary/10 ring-1 ring-primary/30`),onClick:n,children:[e.status===`passed`?(0,V.jsx)(k,{className:`h-3 w-3 text-emerald-500 shrink-0`}):e.status===`running`?(0,V.jsx)(z,{className:`h-3 w-3 text-blue-500 shrink-0`}):(0,V.jsx)(l,{className:`h-3 w-3 text-red-500 shrink-0`}),(0,V.jsx)(C,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,V.jsx)(`span`,{className:`flex-1 min-w-0 text-xs truncate`,children:e.name}),(0,V.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:D(e.duration)})]})})}function X({title:e}){return(0,V.jsx)(`div`,{className:`px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:e})}function Z({title:e,hooks:t,selection:n,onSelect:r}){return t.length===0?null:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(X,{title:e}),(0,V.jsx)(`div`,{className:`mx-2 mb-1.5 rounded-[2px] border border-border/70 bg-muted/15`,children:(0,V.jsx)(`ul`,{role:`group`,children:t.map(e=>(0,V.jsx)(le,{log:e,isSelected:n?.type===`hook`&&n.hookId===e.id,onSelect:()=>r({type:`hook`,hookId:e.id})},e.id))})})]})}function ue({steps:e,selection:t,onSelect:n,suiteTests:r,suiteSelectedView:i,setupHooks:a=[],teardownHooks:o=[],inlineLogs:s=[]}){J(t)&&t.stepId;let c=(0,H.useMemo)(()=>{let t=new Map;for(let n of s){if(!n.stepId)continue;let r=Number(n.stepId),i=e.find(e=>e.rawRunId&&n.runId&&e.rawRunId!==n.runId?!1:e.rawStepOrder===r)?.id??n.stepId,a=t.get(i)??[];a.push(n),t.set(i,a)}return t},[s,e]);if(e.length===0)return a.length>0||o.length>0?(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Z,{title:`Setup`,hooks:a,selection:t,onSelect:n}),(0,V.jsx)(Z,{title:`Teardown`,hooks:o,selection:t,onSelect:n})]})}):(0,V.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:`No steps were executed.`});if(r&&r.length>0&&i===`all`){let i=new Map;for(let t of e){let e=t.runId??t.id,n=i.get(e)??[];n.push(t),i.set(e,n)}let s=new Set(r.map(e=>e.id)),l=a.filter(e=>!s.has(e.runId)),u=o.filter(e=>!s.has(e.runId));return(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Z,{title:`Setup`,hooks:l,selection:t,onSelect:n}),(0,V.jsx)(X,{title:`Steps`}),(0,V.jsx)(`ul`,{role:`tree`,"aria-label":`Test steps`,className:`py-1`,children:r.map(e=>{let r=e.id,s=i.get(r)??[],l=e.name??`Unknown Test`,u=a.filter(e=>e.runId===r),d=o.filter(e=>e.runId===r);return(0,V.jsxs)(`li`,{role:`none`,children:[(0,V.jsxs)(`div`,{className:`mt-3 mb-1 flex items-center justify-between bg-muted/30 px-3 py-1.5 text-xs font-medium text-muted-foreground first:mt-0`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:l}),(0,V.jsx)(`span`,{className:`ml-2 shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground/70`,children:e.status})]}),u.length>0&&(0,V.jsx)(Z,{title:`Setup`,hooks:u,selection:t,onSelect:n}),s.length>0?(0,V.jsx)(`ul`,{role:`group`,children:s.map(e=>(0,V.jsx)(q,{step:e,isSelected:J(t)&&t.stepId===e.id,isExpanded:!0,selection:t,onSelect:n,inlineLogs:c.get(e.id)??[]},e.id))}):(0,V.jsx)(`div`,{className:`mx-2 mb-1.5 rounded-[2px] border border-border/60 bg-muted/10 px-3 py-2 text-xs text-muted-foreground`,children:e.status===`skipped`?`Skipped`:e.status===`cancelled`?`Cancelled`:`Pending`}),d.length>0&&(0,V.jsx)(Z,{title:`Teardown`,hooks:d,selection:t,onSelect:n})]},r)})}),(0,V.jsx)(Z,{title:`Teardown`,hooks:u,selection:t,onSelect:n})]})})}return(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Z,{title:`Setup`,hooks:a,selection:t,onSelect:n}),(0,V.jsx)(X,{title:`Steps`}),(0,V.jsx)(`ul`,{role:`tree`,"aria-label":`Test steps`,className:`py-1`,children:e.map(e=>(0,V.jsx)(q,{step:e,isSelected:J(t)&&t.stepId===e.id,isExpanded:!0,selection:t,onSelect:n,inlineLogs:c.get(e.id)??[]},e.id))}),(0,V.jsx)(Z,{title:`Teardown`,hooks:o,selection:t,onSelect:n})]})})}var de=[`data:image/`,`blob:`,`http://`,`https://`];function fe(e){return e.replace(/\\/g,`/`)}function pe(e){return e.startsWith(`http://`)||e.startsWith(`https://`)}function me(e){return e.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(e)}function he(e){if(de.some(t=>e.startsWith(t)))return e;let t=fe(e),n=t.split(`/`).filter(Boolean);if(n.length>=2){let e=n[n.length-1];return`/api/screenshots/${n[n.length-2]}/${e}`}return`/api/screenshots/${t}`}function ge(e,t){let n=t?.trim();if(!n)return null;if(pe(n))return n;if(me(n))return null;let r=fe(n),i=r.split(`/`).filter(Boolean);return i.length===0?null:r.startsWith(`${e}/`)?`/api/videos/${r}`:i.length===1?`/api/videos/${e}/${i[0]}`:`/api/videos/${r}`}function _e({screenshotPath:e,annotation:t,refLabel:n,className:r}){let i=(0,H.useRef)(null),[a]=(0,H.useState)(()=>Math.random().toString(36).slice(2,8)),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)({width:0,height:0}),[f,p]=(0,H.useState)({width:0,height:0}),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)({x:0,y:0}),[v,y]=(0,H.useState)(!1),[b,x]=(0,H.useState)(!1),[S,ee]=(0,H.useState)(!0),C=he(e);(0,H.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)d({width:t.contentRect.width,height:t.contentRect.height})});return t.observe(e),()=>t.disconnect()},[]),(0,H.useEffect)(()=>{if(!b)return;let e=e=>{e.key===`Escape`&&x(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let w=(0,H.useCallback)(e=>{let t=e.currentTarget;p({width:t.naturalWidth,height:t.naturalHeight}),s(!0)},[]),D=(0,H.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();_({x:e.clientX-t.left,y:e.clientY-t.top})},[]),O=t?.viewport?.width||f.width||1,te=t?.viewport?.height||f.height||1,k=u.width,j=u.height,M=f.width/(f.height||1),ie=k/(j||1),N=k,P=j,F=0,I=0;o&&f.width>0&&(M>ie?(N=k,P=k/M,I=(j-P)/2):(P=j,N=j*M,F=(k-N)/2));let L=N/O,z=P/te,B=2.5,se=N*B,U=P*B,ce=-((g.x-F)*B-150/2),W=-((g.y-I)*B-150/2),G=g.x+20,K=g.y+20;G+150>k&&(G=g.x-150-10),K+150>j&&(K=g.y-150-10),G<0&&(G=0),K<0&&(K=0);let q=v&&m&&o;if(c)return(0,V.jsx)(`div`,{className:T(`relative rounded-lg border bg-muted/20 flex items-center justify-center`,r),style:{aspectRatio:`16 / 9`,maxHeight:`50vh`},children:(0,V.jsxs)(`div`,{className:`text-muted-foreground flex flex-col items-center gap-2`,children:[(0,V.jsx)(R,{className:`h-8 w-8`}),(0,V.jsx)(`span`,{className:`text-sm`,children:`Screenshot unavailable`})]})});let J=!!(t?.clickPoint||t?.boundingBox||t?.failureHighlight||t?.startPoint||t?.endPoint||t?.direction||t?.pinchScale),Y=o&&t&&S&&(0,V.jsxs)(V.Fragment,{children:[t.failureHighlight&&(0,V.jsx)(`div`,{className:`absolute border-2 border-red-500/70 rounded-sm bg-red-500/15 animate-pulse pointer-events-none`,style:{left:F+t.failureHighlight.x*L,top:I+t.failureHighlight.y*z,width:t.failureHighlight.width*L,height:t.failureHighlight.height*z}}),t.boundingBox&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute border-2 border-emerald-500/70 rounded-sm bg-emerald-500/10 pointer-events-none`,style:{left:F+t.boundingBox.x*L,top:I+t.boundingBox.y*z,width:t.boundingBox.width*L,height:t.boundingBox.height*z}}),n&&(0,V.jsx)(`div`,{className:`absolute text-[10px] font-mono font-bold text-white bg-emerald-600/90 px-1 rounded-sm pointer-events-none leading-tight`,style:{left:F+t.boundingBox.x*L,top:I+t.boundingBox.y*z-14},children:n})]}),t.clickPoint&&(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:F+t.clickPoint.x*L,top:I+t.clickPoint.y*z,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/60 shadow-[0_0_0_1px_rgba(255,255,255,0.4)]`}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-2 border-turquoise-500/50 animate-ping`,style:{width:22,height:22,left:-8.5,top:-8.5}})]})}),t.startPoint&&t.endPoint&&(()=>{let e=t.type===`drag`?`oklch(0.65 0.19 150)`:`oklch(0.65 0.19 210)`,n=t.type===`drag`?`oklch(0.65 0.19 150 / 0.4)`:`oklch(0.65 0.19 210 / 0.4)`,r=F+t.startPoint.x*L,i=I+t.startPoint.y*z,a=F+t.endPoint.x*L,o=I+t.endPoint.y*z;return(0,V.jsxs)(V.Fragment,{children:[Array.from({length:4},(e,t)=>{let s=(t+1)/5;return(0,V.jsx)(`div`,{className:`absolute pointer-events-none animate-gesture-trail`,style:{left:r+(a-r)*s,top:i+(o-i)*s,transform:`translate(-50%, -50%)`,zIndex:1,animationDelay:`${t*.15}s`},children:(0,V.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full`,style:{backgroundColor:n}})},`trail-${t}`)}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:r,top:i,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`,style:{backgroundColor:e}})}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:a,top:o,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2 h-2 rounded-full border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`,style:{backgroundColor:e}}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-[1.5px] animate-ping`,style:{borderColor:n,width:18,height:18,left:-7,top:-7}})]})})]})})(),t.direction&&!t.startPoint&&(()=>{let e=t.clickPoint?F+t.clickPoint.x*L:F+N/2,n=t.clickPoint?I+t.clickPoint.y*z:I+P/2,r=Math.min(P,N)*.35,[i,o]={up:[0,-r],down:[0,r],left:[-r,0],right:[r,0]}[t.direction]||[0,0];return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`svg`,{className:`absolute pointer-events-none`,style:{left:F,top:I,zIndex:1},width:N,height:P,children:[(0,V.jsxs)(`defs`,{children:[(0,V.jsx)(`marker`,{id:`scroll-arrow-border-${a}`,markerWidth:`16`,markerHeight:`14`,refX:`14`,refY:`7`,orient:`auto`,markerUnits:`userSpaceOnUse`,children:(0,V.jsx)(`path`,{d:`M1 1 L14 7 L1 13`,fill:`none`,stroke:`oklch(0 0 0 / 0.5)`,strokeWidth:`3`,strokeLinejoin:`round`,strokeLinecap:`round`})}),(0,V.jsx)(`marker`,{id:`scroll-arrow-${a}`,markerWidth:`16`,markerHeight:`14`,refX:`14`,refY:`7`,orient:`auto`,markerUnits:`userSpaceOnUse`,children:(0,V.jsx)(`path`,{d:`M1 1 L14 7 L1 13`,fill:`none`,stroke:`oklch(0.719 0.119 209.8)`,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`})})]}),(0,V.jsx)(`line`,{x1:e-F,y1:n-I,x2:e-F+i,y2:n-I+o,stroke:`oklch(0 0 0 / 0.5)`,strokeWidth:4,strokeLinecap:`round`,markerEnd:`url(#scroll-arrow-border-${a})`}),(0,V.jsx)(`line`,{x1:e-F,y1:n-I,x2:e-F+i,y2:n-I+o,stroke:`oklch(0.719 0.119 209.8 / 0.8)`,strokeWidth:2.5,strokeLinecap:`round`,markerEnd:`url(#scroll-arrow-${a})`})]}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:e,top:n,transform:`translate(-50%, -50%)`,zIndex:2},children:(0,V.jsxs)(`div`,{className:`relative flex items-center justify-center`,style:{width:22,height:22},children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/60 shadow-[0_0_0_1px_rgba(255,255,255,0.4)]`}),(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-turquoise-500/50 animate-ping`})]})})]})})(),t.pinchScale&&(()=>{let e=t.startPoint?F+t.startPoint.x*L:F+N/2,n=t.startPoint?I+t.startPoint.y*z:I+P/2,r=t.pinchScale===`out`?`animate-gesture-pinch-out`:`animate-gesture-pinch-in`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute pointer-events-none ${r}`,style:{left:e-24,top:n,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-[1.5px] border-turquoise-500/40 animate-ping`,style:{width:18,height:18,left:-6.5,top:-6.5}})]})}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none ${r}`,style:{left:e+24,top:n,transform:`translate(-50%, -50%)`,zIndex:1,animationDirection:`reverse`},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-[1.5px] border-turquoise-500/40 animate-ping`,style:{width:18,height:18,left:-6.5,top:-6.5}})]})})]})})()]});return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{ref:i,className:T(`relative overflow-hidden rounded-lg border bg-muted/20 group w-full`,r),style:{aspectRatio:o&&f.width>0?`${f.width} / ${f.height}`:`16 / 9`,maxHeight:`50vh`},onMouseMove:v?D:void 0,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[!o&&(0,V.jsx)(E,{className:`absolute inset-0 rounded-lg`}),(0,V.jsx)(`img`,{src:C,alt:`Step screenshot`,className:T(`w-full h-full object-contain`,!o&&`opacity-0`),onLoad:w,onError:()=>l(!0)}),Y,q&&(0,V.jsx)(`div`,{className:`absolute rounded-full border-2 border-primary/50 shadow-lg pointer-events-none z-10`,style:{width:150,height:150,left:G,top:K,backgroundImage:`url(${C})`,backgroundSize:`${se}px ${U}px`,backgroundPosition:`${ce}px ${W}px`,backgroundRepeat:`no-repeat`}}),o&&(0,V.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-20`,children:[J&&(0,V.jsx)(A,{variant:`secondary`,size:`icon-sm`,className:`h-7 w-7 bg-background/80 backdrop-blur-sm`,onClick:e=>{e.stopPropagation(),ee(!S)},title:S?`Hide annotations`:`Show annotations`,children:(0,V.jsx)(ae,{className:T(`h-3.5 w-3.5`,S&&`text-primary`)})}),(0,V.jsx)(A,{variant:`secondary`,size:`icon-sm`,className:`h-7 w-7 bg-background/80 backdrop-blur-sm`,onClick:e=>{e.stopPropagation(),y(!v)},title:v?`Disable magnifier`:`Enable magnifier`,children:(0,V.jsx)(re,{className:T(`h-3.5 w-3.5`,v&&`text-primary`)})}),(0,V.jsx)(A,{variant:`secondary`,size:`icon-sm`,className:`h-7 w-7 bg-background/80 backdrop-blur-sm`,onClick:e=>{e.stopPropagation(),x(!0)},title:`View full size`,children:(0,V.jsx)(oe,{className:`h-3.5 w-3.5`})})]})]}),b&&(0,V.jsxs)(`div`,{className:`fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center`,onClick:()=>x(!1),children:[(0,V.jsx)(A,{variant:`secondary`,size:`icon-sm`,className:`absolute top-4 right-4 h-8 w-8 bg-background/80 backdrop-blur-sm z-10`,onClick:()=>x(!1),children:(0,V.jsx)(ne,{className:`h-4 w-4`})}),(0,V.jsx)(`img`,{src:C,alt:`Step screenshot (full size)`,className:`object-contain rounded-lg`,style:{maxWidth:`90vw`,maxHeight:`90vh`},onClick:e=>e.stopPropagation()})]})]})}var ve=`rounded-sm border border-border/60 bg-muted/20 p-1`,ye=`rounded-sm px-3 py-1 text-xs font-medium transition-colors`,be=`bg-primary/10 text-foreground ring-1 ring-primary/30`,xe=`text-muted-foreground hover:bg-muted hover:text-foreground`;function Se(e){if(!e)return null;try{let t=typeof e==`string`?JSON.parse(e):e;if(t&&typeof t==`object`)return{type:t.type||t.action||`unknown`,target:t.target||t.selector||``}}catch{return{type:String(e),target:``}}return null}function Ce(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observation`,icon:d,content:e.observation,duration:e.phaseDurations?.observe??null}),e.reasoning&&t.push({key:`reasoning`,label:`Reasoning`,icon:n,content:e.reasoning,duration:e.phaseDurations?.plan??null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Planned Action`,icon:P,content:null,duration:e.phaseDurations?.execute??null,children:(0,V.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),e.verifierReasoning&&t.push({key:`verifier`,label:`Verifier`,icon:s,content:e.verifierReasoning,duration:e.phaseDurations?.verify??null}),t}function we(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observation`,icon:d,content:e.observation,duration:null}),e.reasoning&&t.push({key:`reasoning`,label:`Reasoning`,icon:n,content:e.reasoning,duration:null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Planned Action`,icon:P,content:null,duration:null,children:(0,V.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),t}function Te({step:e,subAction:n,runId:i,screenshotSide:a,onScreenshotSideChange:o,pipelineRef:s}){let c=(e.subActionsData?.length??0)>1;if(n){let e=n.screenshotBeforePath,t=n.screenshotAfterPath;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(De,{beforePath:e??null,afterPath:t??null,annotation:n.annotation,refLabel:n.plannedAction&&typeof n.plannedAction==`object`&&n.plannedAction!==null&&`ref`in n.plannedAction?n.plannedAction.ref:void 0,screenContextBefore:n.screenContextBefore,screenContextAfter:n.screenContextAfter,screenshotSide:a,onScreenshotSideChange:o}),(0,V.jsx)(`div`,{className:`border-t`,children:(0,V.jsxs)(`div`,{className:`p-3 space-y-3 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsxs)(`span`,{className:`font-medium`,children:[`Sub-action #`,n.index+1]}),(0,V.jsx)(`span`,{className:`text-xs font-medium ${n.result===`success`?`text-emerald-500`:`text-red-500`}`,children:n.result}),n.confidence!=null&&(0,V.jsxs)(`span`,{className:`text-xs ${n.confidence>=.8?`text-emerald-500`:n.confidence>=.5?`text-amber-500`:`text-red-500`}`,children:[Math.round(n.confidence*100),`%`]})]}),(0,V.jsx)(r,{ref:s,mode:`static`,sections:Ce(n)}),n.error&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Error`}),(0,V.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded-sm p-2 text-xs break-words [overflow-wrap:anywhere]`,children:n.error})]})]})})]})}let l=e.screenshotBeforePath,u=e.screenshotPath,d=c?null:e.annotationData,f=c?void 0:e.action&&typeof e.action==`object`&&e.action!==null&&`ref`in e.action?e.action.ref:void 0,p=Se(e.action);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(De,{beforePath:l,afterPath:u,annotation:d,refLabel:f,screenContextBefore:e.screenContextBefore,screenContextAfter:e.screenContextAfter,screenshotSide:a,onScreenshotSideChange:o}),(0,V.jsx)(`div`,{className:`border-t`,children:(0,V.jsxs)(`div`,{className:`p-3 space-y-3 min-w-0`,children:[i?(0,V.jsx)(r,{ref:s,runId:i,stepOrder:e.rawStepOrder,stepData:e}):(0,V.jsx)(r,{ref:s,mode:`static`,sections:we(e)}),p&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Action`}),(0,V.jsxs)(`p`,{className:`text-sm`,children:[p.type,p.target&&(0,V.jsx)(`span`,{className:`text-muted-foreground ml-1`,children:p.target})]})]}),e.plannedAction!=null&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Planned Action`}),(0,V.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,style:{maxHeight:`12rem`},children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})]}),e.error&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Error`}),(0,V.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded-sm p-2 text-sm break-words [overflow-wrap:anywhere]`,children:e.error})]}),e.healingAttempts&&e.healingAttempts.length>0&&(0,V.jsx)(t,{attempts:e.healingAttempts})]})})]})}function Ee({url:e}){let[t,n]=(0,H.useState)(!1);return e?(0,V.jsxs)(`div`,{className:`w-0 flex-1 flex items-center gap-1`,children:[(0,V.jsx)(`div`,{className:`flex-1 min-w-0 overflow-hidden bg-muted/50 rounded-sm px-2 py-0.5 text-xs font-mono truncate text-muted-foreground`,children:e}),(0,V.jsxs)(g,{children:[(0,V.jsx)(h,{asChild:!0,children:(0,V.jsx)(`button`,{className:`shrink-0 p-1 rounded-sm hover:bg-muted transition-colors`,children:(0,V.jsx)(L,{className:`h-3 w-3 text-muted-foreground`})})}),(0,V.jsx)(m,{align:`end`,className:`w-auto max-w-md p-3`,children:(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs font-mono break-all select-text`,children:e}),(0,V.jsxs)(`button`,{onClick:()=>{navigator.clipboard.writeText(e).catch(()=>{}),n(!0),setTimeout(()=>n(!1),2e3)},className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[t?(0,V.jsx)(c,{className:`h-3 w-3`}):(0,V.jsx)(u,{className:`h-3 w-3`}),t?`Copied`:`Copy URL`]})]})})]})]}):null}function De({beforePath:e,afterPath:t,annotation:n,refLabel:r,screenContextBefore:i,screenContextAfter:a,screenshotSide:o,onScreenshotSideChange:s}){let c=!!e,l=!!t,u=c?`before`:`after`,[d,f]=(0,H.useState)(u);(0,H.useEffect)(()=>{f(u)},[e,t,u]);let p=o??d,m=p===`before`&&c?`before`:p===`after`&&l?`after`:u,h=e=>{if(!(e===`before`&&!c)&&!(e===`after`&&!l)){if(s){s(e);return}f(e)}};return!c&&!l?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground gap-2 py-12`,children:[(0,V.jsx)(R,{className:`h-8 w-8`}),(0,V.jsx)(`span`,{className:`text-sm`,children:`No screenshot for this step`})]}):(0,V.jsxs)(`div`,{className:`p-3 space-y-2 min-w-0`,children:[c&&l&&(0,V.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-1 shrink-0 ${ve}`,children:[(0,V.jsx)(`button`,{onClick:()=>h(`before`),className:`${ye} ${m===`before`?be:xe}`,children:`Before`}),(0,V.jsx)(`button`,{onClick:()=>h(`after`),className:`${ye} ${m===`after`?be:xe}`,children:`After`})]}),(i||a)&&(0,V.jsx)(Ee,{url:m===`before`?i:a})]}),m===`before`&&c&&(0,V.jsx)(_e,{screenshotPath:e,annotation:n,refLabel:r,className:`w-full rounded-sm overflow-hidden`}),m===`after`&&l&&(0,V.jsx)(_e,{screenshotPath:t,annotation:c?null:n,refLabel:c?void 0:r,className:`w-full rounded-sm overflow-hidden`})]})}var Oe=`rounded-sm border border-border/60 bg-muted/20 p-1`,Q=`rounded-sm px-3 py-1 text-xs font-medium transition-colors`,ke=`bg-primary/10 text-foreground ring-1 ring-primary/30`,Ae=`text-muted-foreground hover:bg-muted hover:text-foreground`;function je({step:e,subAction:t,runId:n}){let[r,i]=(0,H.useState)(`before`);if(t){let e=t.screenStateBefore,n=t.screenStateAfter;return!e&&!n?(0,V.jsx)(Pe,{}):(0,V.jsx)(Ne,{before:e??null,after:n??null,tab:r,setTab:i})}return(0,V.jsx)(Me,{step:e,runId:n,tab:r,setTab:i})}function Me({step:e,runId:t,tab:n,setTab:r}){let[i,a]=(0,H.useState)(null),[o,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(!0);return(0,H.useEffect)(()=>{let n=!1;return l(!0),M(t,e.rawStepOrder).then(e=>{n||(a(e.trace.screenStateBefore),s(e.trace.screenStateAfter),l(!1))}).catch(()=>{n||l(!1)}),()=>{n=!0}},[t,e.rawStepOrder]),c?(0,V.jsxs)(`div`,{className:`p-3 space-y-2`,children:[(0,V.jsx)(E,{className:`h-4 w-3/4`}),(0,V.jsx)(E,{className:`h-4 w-1/2`}),(0,V.jsx)(E,{className:`h-4 w-2/3`})]}):!i&&!o?(0,V.jsx)(Pe,{}):(0,V.jsx)(Ne,{before:i,after:o,tab:n,setTab:r})}function Ne({before:e,after:t,tab:n,setTab:r}){let i=!!e,a=!!t;return(0,V.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-2 overflow-hidden p-3`,children:[i&&a&&(0,V.jsxs)(`div`,{className:`flex gap-1 ${Oe}`,children:[(0,V.jsx)(`button`,{onClick:()=>r(`before`),className:`${Q} ${n===`before`?ke:Ae}`,children:`Before`}),(0,V.jsx)(`button`,{onClick:()=>r(`after`),className:`${Q} ${n===`after`?ke:Ae}`,children:`After`})]}),(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-sm border border-border/60 bg-muted/20`,children:(0,V.jsx)(`div`,{className:`h-full overflow-auto overscroll-contain`,children:(0,V.jsx)(`pre`,{className:`min-w-full p-3 text-xs font-mono whitespace-pre`,children:n===`before`&&i?e:a?t:e})})})]})}function Pe(){return(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:`No ARIA tree snapshot available for this step`})}function Fe(e){switch(e){case`critical`:return`bg-red-500/15 text-red-500 border-red-500/20`;case`serious`:return`bg-orange-500/15 text-orange-500 border-orange-500/20`;case`moderate`:return`bg-amber-500/15 text-amber-500 border-amber-500/20`;case`minor`:return`bg-blue-500/15 text-blue-500 border-blue-500/20`;default:return`bg-muted text-muted-foreground`}}function Ie({step:e,summary:t}){let n=e.accessibilityViolations;return n==null?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:t?.enabled===!1?`Accessibility checks were disabled for this run.`:`Accessibility checks did not record data for this step.`}):n.length===0?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:`No accessibility violations detected`}):(0,V.jsx)(`div`,{className:`p-3 space-y-3`,children:n.map((e,t)=>(0,V.jsxs)(`div`,{className:`border border-border/50 rounded-sm p-3 space-y-1.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(F,{className:T(`text-[10px] px-1.5 py-0`,Fe(e.impact)),children:e.impact}),(0,V.jsx)(`span`,{className:`text-sm font-medium`,children:e.help})]}),(0,V.jsx)(`div`,{className:`text-[10px] font-mono text-muted-foreground`,children:e.ruleId}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),e.nodes.length>0&&(0,V.jsx)(`div`,{className:`space-y-1 mt-1`,children:e.nodes.map((e,t)=>(0,V.jsx)(`pre`,{className:`text-[10px] font-mono bg-muted/30 rounded p-1.5 overflow-x-auto whitespace-pre-wrap break-words`,children:e.html},t))}),(0,V.jsx)(`a`,{href:e.helpUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-[10px] text-blue-500 hover:underline`,children:`Learn more`})]},t))})}function Le({activeTab:e,onTabChange:t,step:n,subAction:r,runId:s,allSteps:c,executionLogs:l=[],accessibilitySummary:u,platform:d,screenshotSide:f,onScreenshotSideChange:p,pipelineRef:m}){let h=l.length>0,g=(0,H.useRef)(null),S=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(e!==`console`&&e!==`network`)return;let t=e===`console`?g:S;requestAnimationFrame(()=>{let e=t.current?.querySelector(`[data-slot="scroll-area-viewport"]`);e&&(e.scrollTop=e.scrollHeight)})},[e,n?.id]),n?(0,V.jsxs)(x,{value:e,onValueChange:t,className:`flex h-full min-h-0 flex-col overflow-hidden gap-0`,children:[(0,V.jsxs)(b,{variant:`line`,className:`w-full justify-start border-b px-3 h-9 shrink-0 rounded-none`,children:[(0,V.jsx)(v,{value:`overview`,className:`text-xs rounded-none flex-initial`,children:`Overview`}),(0,V.jsx)(v,{value:`env`,className:`text-xs rounded-none flex-initial`,children:`Variables`}),(0,V.jsx)(v,{value:`network`,className:`text-xs rounded-none flex-initial`,children:`Network`}),(0,V.jsx)(v,{value:`console`,className:`text-xs rounded-none flex-initial`,children:h?`stdout`:`Console`}),(0,V.jsx)(v,{value:`aria`,className:`text-xs rounded-none flex-initial`,children:`ARIA Tree`}),(0,V.jsx)(v,{value:`a11y`,className:`text-xs rounded-none flex-initial`,children:`A11y`})]}),(0,V.jsx)(y,{value:`overview`,className:`flex-1 min-h-0`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(Te,{step:n,subAction:r,runId:s,screenshotSide:f,onScreenshotSideChange:p,pipelineRef:m})})}),(0,V.jsx)(y,{value:`env`,className:`flex-1 min-h-0`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(a,{step:n,executionLogs:l})})}),(0,V.jsx)(y,{value:`network`,className:`flex-1 min-h-0`,children:(0,V.jsx)(`div`,{ref:S,className:`h-full`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(i,{step:n,allSteps:c,platform:d})})})}),(0,V.jsx)(y,{value:`console`,className:`flex-1 min-h-0`,children:(0,V.jsx)(`div`,{ref:g,className:`h-full`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(o,{step:n,allSteps:c,executionLogs:l,isHookStep:h})})})}),(0,V.jsx)(y,{value:`aria`,className:`flex flex-1 min-h-0 overflow-hidden`,children:(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:(0,V.jsx)(je,{step:n,subAction:r,runId:s??``})})}),(0,V.jsx)(y,{value:`a11y`,className:`flex-1 min-h-0`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(Ie,{step:n,summary:u})})})]}):(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm`,children:`Select a step to view details`})}var $=`/favicon.svg`,Re=`link[rel="icon"][type="image/svg+xml"]`,ze=`data:image/svg+xml,`,Be=`#1BA8A4`,Ve={running:`#3B82F6`,passed:`#10B981`,failed:`#EF4444`,cancelled:`#737373`},He=`M323.737 74.0036C321.678 45.7468 307.367 20.4603 274.355 7.62753C237.635 -6.64743 193.906 0.707226 159.595 16.555C123.709 33.1301 79.4877 66.4329 68.7041 107.674C64.4889 123.793 65.8966 141.625 74.0475 156.147C84.524 174.812 105.284 186.34 126.509 188.709C155.758 191.973 186.212 179.951 208.798 161.766C221.672 151.401 233.416 137.876 240.032 122.593C245.968 108.883 247.372 92.6358 241.051 79.1C232.452 60.686 212.101 52.6385 192.81 55.6667C190.276 56.0569 187.867 56.6097 185.58 57.2681C183.292 57.9233 181.123 58.6816 179.071 59.528C174.96 61.1995 171.314 63.2018 168.074 65.329C164.839 67.4688 162.013 69.7616 159.591 72.0974C159.042 72.6512 158.503 73.1949 157.975 73.728C157.403 74.2983 156.905 74.8399 156.405 75.3741C155.412 76.4424 154.506 77.4954 153.649 78.4973C151.95 80.5145 150.496 82.3772 149.251 84.0721C146.746 87.4439 144.991 90.0845 143.806 91.8622C143.224 92.7564 142.783 93.4344 142.486 93.889C142.195 94.3472 142.047 94.5798 142.047 94.5798C141.56 95.3492 141.534 96.3676 142.066 97.1784C142.789 98.2807 144.267 98.5866 145.366 97.8607C145.366 97.8607 145.595 97.7094 146.048 97.4115C146.496 97.1104 147.164 96.6612 148.045 96.0686C149.796 94.8803 152.379 93.101 155.711 90.89C159.064 88.6975 163.129 86.0856 168.019 83.6181C169.17 83.0505 170.364 82.5052 171.643 82.0103C172.913 81.508 174.233 81.0227 175.625 80.6096C178.393 79.7611 181.387 79.0894 184.521 78.7039C186.088 78.517 187.686 78.3869 189.3 78.3476C190.915 78.312 192.544 78.3635 194.161 78.5064C199.857 79.0389 206.946 80.8278 210.393 85.7883C212.64 89.023 212.942 93.2873 212.188 97.1561C210.88 103.87 206.746 109.679 202.191 114.771C186.162 132.688 162.952 145.008 138.913 147.011C118.893 148.576 100.226 139.353 97.5544 117.418C95.6448 101.742 102.982 86.1918 113.092 74.0838C127.362 56.9936 145.131 42.6953 165.374 33.7232C172.833 30.4168 180.568 27.6382 188.491 25.5933C209.564 20.1131 234.474 18.5074 254.87 27.3737C274.418 35.8716 286.877 55.0613 286.483 76.4807C286.365 82.7505 285.206 89.1452 283.246 95.5313C281.308 101.923 278.484 108.284 275.041 114.413C271.579 120.542 267.503 126.447 262.989 132.001C240.471 159.732 205.211 180.858 172.707 194.714C133.472 211.439 58.5315 231.21 30.5129 185.239C15.9075 161.276 21.2651 130.621 29.1883 105.347C29.4747 104.433 29.1915 103.391 28.3958 102.763C27.3676 101.951 25.8789 102.129 25.07 103.16C25.07 103.16 24.3939 104.021 23.0836 105.69C22.7533 106.097 22.4023 106.602 22.0042 107.145C21.6092 107.69 21.1767 108.288 20.7066 108.937C9.05634 125.023 1.26869 144.477 0.139985 164.406C-0.898721 182.75 3.84163 201.559 14.4087 216.568C27.0823 234.568 47.3503 246.191 68.6072 251.765C102.301 260.599 139.556 257.617 172.626 247.578C180.417 245.213 188.18 242.456 195.864 239.289C203.543 236.112 211.124 232.493 218.604 228.502C245.711 214.042 271.483 194.467 290.821 170.385C311.713 144.368 326.151 107.143 323.737 74.0036Z`;function Ue(){let e=document.querySelector(Re);if(e)return e;let t=document.createElement(`link`);return t.setAttribute(`rel`,`icon`),t.setAttribute(`type`,`image/svg+xml`),t.setAttribute(`href`,$),document.head.appendChild(t),t}function We(e){return e===`failed`?`<path d="M208 142L310 244M310 142L208 244" stroke="#EF4444" stroke-width="26" stroke-linecap="round"/>`:`<circle cx="258" cy="192" r="61" fill="${Ve[e]}"/>`}function Ge(e){switch(N(e)){case`running`:case`pending`:case`queued`:return`running`;case`passed`:case`flaky`:case`healed`:return`passed`;case`failed`:case`timeout`:return`failed`;case`cancelled`:return`cancelled`;case`skipped`:case`unknown`:return`default`}}function Ke(e){if(e===`default`)return $;let t=[`<svg width="324" height="257" viewBox="0 0 324 257" fill="none" xmlns="http://www.w3.org/2000/svg">`,`<path d="${He}" fill="${Be}"/>`,We(e),`</svg>`].join(``);return`${ze}${encodeURIComponent(t)}`}function qe(e){(0,H.useEffect)(()=>(Ue().setAttribute(`href`,Ke(e)),()=>{Ue().setAttribute(`href`,$)}),[e])}export{ue as a,se as c,ge as i,L as l,qe as n,J as o,Le as r,Y as s,Ge as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{l as t}from"./select-CeVjgiKI.js";import{a as n,c as r,i,o as a,r as o,s}from"./split-button-DcY8ames.js";import{n as c}from"./batch-action-bar-uEhHVDds.js";import{n as l,r as u,t as d}from"./popover-DGZi688D.js";import{Qn as f,Rn as p,Ut as m,Vt as h,pr as g}from"./index-Bvtm2F6f.js";var _=f();function v({selectedCount:e,hiddenCount:f,useCache:g,useMemory:v,browserStackAvailable:y,open:b,onOpenChange:x,onUseCacheChange:S,onUseMemoryChange:C,onRunLocal:w,onRunBrowserStack:T,disabled:E=!1}){return(0,_.jsxs)(d,{open:b,onOpenChange:x,children:[(0,_.jsx)(u,{asChild:!0,children:(0,_.jsx)(m,{size:`sm`,disabled:E,children:`Run`})}),(0,_.jsxs)(l,{side:`top`,sideOffset:8,className:`w-[280px] max-w-[calc(100vw-2rem)] space-y-4`,children:[(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsxs)(`p`,{className:`text-sm font-medium`,children:[e,` selected`]}),f>0?(0,_.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[f,` hidden by filters`]}):null]}),(0,_.jsx)(h,{}),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm`,children:[(0,_.jsx)(`span`,{children:`Use cache`}),(0,_.jsx)(c,{checked:g,onCheckedChange:e=>S(e===!0),disabled:E})]}),(0,_.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm`,children:[(0,_.jsx)(`span`,{children:`Use memory`}),(0,_.jsx)(c,{checked:v,onCheckedChange:e=>C(e===!0),disabled:E})]})]}),(0,_.jsx)(h,{}),(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsxs)(o,{children:[(0,_.jsx)(a,{asChild:!0,children:(0,_.jsxs)(m,{size:`sm`,className:`w-full justify-between`,disabled:E,children:[(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,_.jsx)(p,{className:`size-4`}),`Run`]}),(0,_.jsx)(t,{className:`size-4`})]})}),(0,_.jsxs)(i,{align:`end`,className:`w-[240px]`,children:[(0,_.jsxs)(n,{onClick:()=>{E||(w(),x(!1))},children:[(0,_.jsx)(s,{className:`size-4`}),`Run Local`]}),(0,_.jsxs)(n,{onClick:()=>{E||!y||(T(),x(!1))},disabled:!y,children:[(0,_.jsx)(r,{className:`size-4`}),`Run on BrowserStack`]})]})]}),y?null:(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`BrowserStack is unavailable in the current config.`})]})]})]})}var y=e(g(),1);function b(e,t){return e===0?!1:e===t?!0:`indeterminate`}function x({items:e,getId:t,visibleIds:n}){let[r,i]=(0,y.useState)({ids:[],itemsById:new Map});(0,y.useEffect)(()=>{i(n=>{let r=!1,i=new Map(n.itemsById);for(let n of e){let e=t(n);i.has(e)&&i.get(e)!==n&&(i.set(e,n),r=!0)}return r?{ids:n.ids,itemsById:i}:n})},[t,e]);let a=r.ids,o=(0,y.useMemo)(()=>new Set(a),[a]),s=(0,y.useMemo)(()=>a.map(e=>r.itemsById.get(e)).filter(e=>e!==void 0),[a,r.itemsById]),c=(0,y.useMemo)(()=>n??e.map(e=>t(e)),[t,e,n]),l=(0,y.useMemo)(()=>new Set(c),[c]),u=(0,y.useMemo)(()=>a.filter(e=>!l.has(e)).length,[a,l]),d=(0,y.useCallback)(e=>o.has(e),[o]),f=(0,y.useCallback)((e,n)=>{let r=t(e);i(t=>{let i=t.ids.includes(r);if(n&&i){if(t.itemsById.get(r)===e)return t;let n=new Map(t.itemsById);return n.set(r,e),{ids:t.ids,itemsById:n}}if(!n&&!i)return t;let a=new Map(t.itemsById);return n?(a.set(r,e),{ids:[...t.ids,r],itemsById:a}):(a.delete(r),{ids:t.ids.filter(e=>e!==r),itemsById:a})})},[t]),p=(0,y.useCallback)((e,n)=>{e.length!==0&&i(r=>{let i=new Map(r.itemsById),a=[...r.ids],o=!1;for(let r of e){let e=t(r),s=a.includes(e);if(n){s||(a.push(e),o=!0),i.get(e)!==r&&(i.set(e,r),o=!0);continue}s&&(o=!0,i.delete(e),a.splice(a.indexOf(e),1))}return o?{ids:a,itemsById:i}:r})},[t]),m=(0,y.useCallback)(()=>{i(e=>e.ids.length===0?e:{ids:[],itemsById:new Map})},[]),h=(0,y.useCallback)(e=>{let t=e.filter(e=>o.has(e)).length;return b(t,e.length)},[o]);return{selectedIds:a,selectedIdSet:o,selectedItems:s,selectedCount:a.length,hiddenCount:u,isSelected:d,setItemSelected:f,setItemsSelected:p,clearSelection:m,getVisibleSelectionState:h}}export{v as n,x as t};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{l as t}from"./select-D0GpDfUa.js";import{a as n,c as r,i,o as a,r as o,s}from"./split-button-CRYV8xU8.js";import{n as c}from"./batch-action-bar-BoqzHfwU.js";import{n as l,r as u,t as d}from"./popover-OAiTzjiL.js";import{$n as f,Ht as p,Wt as m,mr as h,zn as g}from"./index-C3AdCkmj.js";var _=f();function v({selectedCount:e,hiddenCount:f,useCache:h,useMemory:v,browserStackAvailable:y,open:b,onOpenChange:x,onUseCacheChange:S,onUseMemoryChange:C,onRunLocal:w,onRunBrowserStack:T,disabled:E=!1}){return(0,_.jsxs)(d,{open:b,onOpenChange:x,children:[(0,_.jsx)(u,{asChild:!0,children:(0,_.jsx)(m,{size:`sm`,disabled:E,children:`Run`})}),(0,_.jsxs)(l,{side:`top`,sideOffset:8,className:`w-[280px] max-w-[calc(100vw-2rem)] space-y-4`,children:[(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsxs)(`p`,{className:`text-sm font-medium`,children:[e,` selected`]}),f>0?(0,_.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[f,` hidden by filters`]}):null]}),(0,_.jsx)(p,{}),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm`,children:[(0,_.jsx)(`span`,{children:`Use cache`}),(0,_.jsx)(c,{checked:h,onCheckedChange:e=>S(e===!0),disabled:E})]}),(0,_.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm`,children:[(0,_.jsx)(`span`,{children:`Use memory`}),(0,_.jsx)(c,{checked:v,onCheckedChange:e=>C(e===!0),disabled:E})]})]}),(0,_.jsx)(p,{}),(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsxs)(o,{children:[(0,_.jsx)(a,{asChild:!0,children:(0,_.jsxs)(m,{size:`sm`,className:`w-full justify-between`,disabled:E,children:[(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,_.jsx)(g,{className:`size-4`}),`Run`]}),(0,_.jsx)(t,{className:`size-4`})]})}),(0,_.jsxs)(i,{align:`end`,className:`w-[240px]`,children:[(0,_.jsxs)(n,{onClick:()=>{E||(w(),x(!1))},children:[(0,_.jsx)(s,{className:`size-4`}),`Run Local`]}),(0,_.jsxs)(n,{onClick:()=>{E||!y||(T(),x(!1))},disabled:!y,children:[(0,_.jsx)(r,{className:`size-4`}),`Run on BrowserStack`]})]})]}),y?null:(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`BrowserStack is unavailable in the current config.`})]})]})]})}var y=e(h(),1);function b(e,t){return e===0?!1:e===t?!0:`indeterminate`}function x({items:e,getId:t,visibleIds:n}){let[r,i]=(0,y.useState)({ids:[],itemsById:new Map});(0,y.useEffect)(()=>{i(n=>{let r=!1,i=new Map(n.itemsById);for(let n of e){let e=t(n);i.has(e)&&i.get(e)!==n&&(i.set(e,n),r=!0)}return r?{ids:n.ids,itemsById:i}:n})},[t,e]);let a=r.ids,o=(0,y.useMemo)(()=>new Set(a),[a]),s=(0,y.useMemo)(()=>a.map(e=>r.itemsById.get(e)).filter(e=>e!==void 0),[a,r.itemsById]),c=(0,y.useMemo)(()=>n??e.map(e=>t(e)),[t,e,n]),l=(0,y.useMemo)(()=>new Set(c),[c]),u=(0,y.useMemo)(()=>a.filter(e=>!l.has(e)).length,[a,l]),d=(0,y.useCallback)(e=>o.has(e),[o]),f=(0,y.useCallback)((e,n)=>{let r=t(e);i(t=>{let i=t.ids.includes(r);if(n&&i){if(t.itemsById.get(r)===e)return t;let n=new Map(t.itemsById);return n.set(r,e),{ids:t.ids,itemsById:n}}if(!n&&!i)return t;let a=new Map(t.itemsById);return n?(a.set(r,e),{ids:[...t.ids,r],itemsById:a}):(a.delete(r),{ids:t.ids.filter(e=>e!==r),itemsById:a})})},[t]),p=(0,y.useCallback)((e,n)=>{e.length!==0&&i(r=>{let i=new Map(r.itemsById),a=[...r.ids],o=!1;for(let r of e){let e=t(r),s=a.includes(e);if(n){s||(a.push(e),o=!0),i.get(e)!==r&&(i.set(e,r),o=!0);continue}s&&(o=!0,i.delete(e),a.splice(a.indexOf(e),1))}return o?{ids:a,itemsById:i}:r})},[t]),m=(0,y.useCallback)(()=>{i(e=>e.ids.length===0?e:{ids:[],itemsById:new Map})},[]),h=(0,y.useCallback)(e=>{let t=e.filter(e=>o.has(e)).length;return b(t,e.length)},[o]);return{selectedIds:a,selectedIdSet:o,selectedItems:s,selectedCount:a.length,hiddenCount:u,isSelected:d,setItemSelected:f,setItemsSelected:p,clearSelection:m,getVisibleSelectionState:h}}export{v as n,x as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./observation-block-4AqYhL1h.js";import{Ft as n,Qn as r,X as i,pr as a,qn as o}from"./index-Bvtm2F6f.js";import{t as s}from"./empty-state-BTvOA5lp.js";var c=e(a(),1),l=r();function u({scope:e,scopeId:r,emptyTitle:a=`No ${e} memory yet`,emptyDescription:u=`This ${e} doesn't have cataloged observations in this workspace yet. Run the ${e} with memory enabled, then reopen this tab.`}){let[f,p]=(0,c.useState)([]),[m,h]=(0,c.useState)([]),[g,_]=(0,c.useState)(!0),[v,y]=(0,c.useState)(null),b=(0,c.useCallback)(()=>{let t=!1;return _(!0),y(null),h([]),i(e,r).then(e=>{t||(p(e.observations),h(e.invalidFiles),_(!1))}).catch(e=>{t||(p([]),h([]),y(e instanceof Error?e.message:`Failed to load memory`),_(!1))}),()=>{t=!0}},[e,r]);(0,c.useEffect)(()=>b(),[b]);let x=e===`test`?`Test memory`:`Suite memory`;return g?(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:(0,l.jsxs)(`div`,{className:`space-y-5`,children:[(0,l.jsx)(n,{className:`h-7 w-32`}),(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsx)(n,{className:`h-20 w-full`}),(0,l.jsx)(n,{className:`h-20 w-full`}),(0,l.jsx)(n,{className:`h-20 w-full`})]})]})})}):v?(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:(0,l.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-muted/20 px-4 py-3 text-sm text-muted-foreground`,children:[`Couldn't load this `,e,` memory. Refresh the page. If it continues, verify the dashboard server can read the workspace memory directory.`]})})}):(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:[m.length>0?(0,l.jsx)(d,{invalidFiles:m}):null,(0,l.jsx)(`h2`,{className:`text-base font-medium tracking-tight text-foreground`,children:x}),f.length===0?(0,l.jsx)(`div`,{className:`pt-4`,children:(0,l.jsx)(s,{icon:o,title:a,description:u})}):(0,l.jsx)(`article`,{className:`mt-6 divide-y divide-border/60`,children:f.map(e=>(0,l.jsx)(`section`,{className:`py-6 first:pt-0 last:pb-0`,children:(0,l.jsx)(t,{observation:e,query:``})},e.id))})]})})}function d({invalidFiles:e}){return(0,l.jsxs)(`div`,{className:`mb-4 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm text-amber-950 dark:text-amber-200`,children:[(0,l.jsxs)(`p`,{className:`font-medium`,children:[e.length,` invalid memory file`,e.length===1?``:`s`,` hidden from this reader.`]}),(0,l.jsx)(`p`,{className:`mt-1 text-xs text-amber-900/80 dark:text-amber-200/80`,children:e.map(e=>e.filename).join(`, `)})]})}var f=[`overview`,`insights`];function p(e,t){return e!==null&&t.includes(e)}function m(e,t,n={}){let r=n.defaultTab??`overview`,i=n.defaultView??t[0],a=e.get(`tab`),o=e.get(`view`);return{tab:p(a,f)?a:r,view:p(o,t)?o:i}}function h(e,t){let n=new URLSearchParams;if(n.set(`tab`,e.tab),n.set(`view`,e.view),t)for(let[e,r]of t.entries())e===`tab`||e===`view`||e===`sub`||n.append(e,r);return n}export{h as n,u as r,m as t};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./observation-block-2qfTbm41.js";import{$n as n,It as r,Jn as i,Z as a,mr as o}from"./index-C3AdCkmj.js";import{t as s}from"./empty-state-BTFWlITi.js";var c=e(o(),1),l=n();function u({scope:e,scopeId:n,emptyTitle:o=`No ${e} memory yet`,emptyDescription:u=`This ${e} doesn't have cataloged observations in this workspace yet. Run the ${e} with memory enabled, then reopen this tab.`}){let[f,p]=(0,c.useState)([]),[m,h]=(0,c.useState)([]),[g,_]=(0,c.useState)(!0),[v,y]=(0,c.useState)(null),b=(0,c.useCallback)(()=>{let t=!1;return _(!0),y(null),h([]),a(e,n).then(e=>{t||(p(e.observations),h(e.invalidFiles),_(!1))}).catch(e=>{t||(p([]),h([]),y(e instanceof Error?e.message:`Failed to load memory`),_(!1))}),()=>{t=!0}},[e,n]);(0,c.useEffect)(()=>b(),[b]);let x=e===`test`?`Test memory`:`Suite memory`;return g?(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:(0,l.jsxs)(`div`,{className:`space-y-5`,children:[(0,l.jsx)(r,{className:`h-7 w-32`}),(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsx)(r,{className:`h-20 w-full`}),(0,l.jsx)(r,{className:`h-20 w-full`}),(0,l.jsx)(r,{className:`h-20 w-full`})]})]})})}):v?(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:(0,l.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-muted/20 px-4 py-3 text-sm text-muted-foreground`,children:[`Couldn't load this `,e,` memory. Refresh the page. If it continues, verify the dashboard server can read the workspace memory directory.`]})})}):(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:[m.length>0?(0,l.jsx)(d,{invalidFiles:m}):null,(0,l.jsx)(`h2`,{className:`text-base font-medium tracking-tight text-foreground`,children:x}),f.length===0?(0,l.jsx)(`div`,{className:`pt-4`,children:(0,l.jsx)(s,{icon:i,title:o,description:u})}):(0,l.jsx)(`article`,{className:`mt-6 divide-y divide-border/60`,children:f.map(e=>(0,l.jsx)(`section`,{className:`py-6 first:pt-0 last:pb-0`,children:(0,l.jsx)(t,{observation:e,query:``})},e.id))})]})})}function d({invalidFiles:e}){return(0,l.jsxs)(`div`,{className:`mb-4 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm text-amber-950 dark:text-amber-200`,children:[(0,l.jsxs)(`p`,{className:`font-medium`,children:[e.length,` invalid memory file`,e.length===1?``:`s`,` hidden from this reader.`]}),(0,l.jsx)(`p`,{className:`mt-1 text-xs text-amber-900/80 dark:text-amber-200/80`,children:e.map(e=>e.filename).join(`, `)})]})}var f=[`overview`,`insights`];function p(e,t){return e!==null&&t.includes(e)}function m(e,t,n={}){let r=n.defaultTab??`overview`,i=n.defaultView??t[0],a=e.get(`tab`),o=e.get(`view`);return{tab:p(a,f)?a:r,view:p(o,t)?o:i}}function h(e,t){let n=new URLSearchParams;if(n.set(`tab`,e.tab),n.set(`view`,e.view),t)for(let[e,r]of t.entries())e===`tab`||e===`view`||e===`sub`||n.append(e,r);return n}export{h as n,u as r,m as t};
@@ -1 +1 @@
1
- import{Jn as e}from"./index-Bvtm2F6f.js";var t=e(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);export{t};
1
+ import{Yn as e}from"./index-C3AdCkmj.js";var t=e(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);export{t};
package/dist/index.html CHANGED
@@ -22,9 +22,9 @@
22
22
  @keyframes splash-in{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}
23
23
  #splash svg{height:48px;width:auto;animation:splash-in .5s ease-out both}
24
24
  </style>
25
- <script type="module" crossorigin src="/assets/index-Bvtm2F6f.js"></script>
25
+ <script type="module" crossorigin src="/assets/index-C3AdCkmj.js"></script>
26
26
  <link rel="modulepreload" crossorigin href="/assets/chunk-CilyBKbf.js">
27
- <link rel="stylesheet" crossorigin href="/assets/index-CW7tbJhs.css">
27
+ <link rel="stylesheet" crossorigin href="/assets/index-DzWZqTlZ.css">
28
28
  </head>
29
29
  <body>
30
30
  <div id="splash">