@testver/testver 1.4.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/LICENSE +88 -69
  2. package/README.md +6 -2
  3. package/bin/testver.js +9 -1
  4. package/dist/index.js +52650 -35771
  5. package/package.json +179 -178
  6. package/src/ui/static/agents/antigravity.svg +76 -0
  7. package/src/ui/static/agents/codex.svg +3 -0
  8. package/src/ui/static/agents/gemini.svg +1 -0
  9. package/src/ui/static/agents/opencode.svg +4 -0
  10. package/src/ui/static/agents/vscode.svg +17 -0
  11. package/src/ui/static/assets/AIPanel-RWO8Cd9w.js +32 -0
  12. package/src/ui/static/assets/AIRecordPanel-DnreS585.js +40 -0
  13. package/src/ui/static/assets/AIStreamUI-C1gHJtlF.js +9 -0
  14. package/src/ui/static/assets/{AITestGenPage-D3t2gPAA.js → AITestGenPage-C8bWUelu.js} +5 -5
  15. package/src/ui/static/assets/APITestingPage-DwL67hqL.js +19 -0
  16. package/src/ui/static/assets/AboutPage-CynLB95E.js +1 -0
  17. package/src/ui/static/assets/AccessTokensTab-BdevOmpE.js +1 -0
  18. package/src/ui/static/assets/AdvancedPage-BeM7aB8b.js +3 -0
  19. package/src/ui/static/assets/{AnalyticsPage-64mYNK2v.js → AnalyticsPage-C5ddYfRk.js} +1 -1
  20. package/src/ui/static/assets/AuditLogPage-DYcUdJoj.js +1 -0
  21. package/src/ui/static/assets/ChangesSummary-BjNMwGIZ.js +3 -0
  22. package/src/ui/static/assets/{CodeMapPage-B1ezmnlE.js → CodeMapPage-BQOEtv-R.js} +3 -3
  23. package/src/ui/static/assets/{ConfirmDialog-t7mpeeSN.js → ConfirmDialog-D_N9188T.js} +1 -1
  24. package/src/ui/static/assets/{CoveragePage-YMmCbiBk.js → CoveragePage-8bDSphY1.js} +2 -2
  25. package/src/ui/static/assets/{CronBuilder-Nk-K-_8I.js → CronBuilder-C7_JADb7.js} +1 -1
  26. package/src/ui/static/assets/{Dashboard-BDVxO2V4.js → Dashboard-B22yRPyV.js} +1 -1
  27. package/src/ui/static/assets/{DefectsPage-l8yGeCyR.js → DefectsPage-Arv4Ac-b.js} +72 -72
  28. package/src/ui/static/assets/{EmptyState-D1T3JWUr.js → EmptyState-BShNSbLf.js} +1 -1
  29. package/src/ui/static/assets/{ExportButton-Dt5RhL-h.js → ExportButton-xrS_AnfS.js} +1 -1
  30. package/src/ui/static/assets/{FileViewer-CrKgh_cB.js → FileViewer-Bcr9T1jW.js} +18 -18
  31. package/src/ui/static/assets/{GitPage-_4nCEzkJ.js → GitPage-DXL2Sv40.js} +12 -12
  32. package/src/ui/static/assets/{ImportExportPage-BcR7IQi9.js → ImportExportPage-BcjzRd7T.js} +36 -36
  33. package/src/ui/static/assets/{JiraPushDialog-C2sP4_4h.js → JiraPushDialog-DNYU9Ce0.js} +1 -1
  34. package/src/ui/static/assets/{KpiTile-inmeEsy3.js → KpiTile-BKlWqjgN.js} +1 -1
  35. package/src/ui/static/assets/{LiveExecutionView-D5BRe9jq.js → LiveExecutionView-1LlyEDEe.js} +1 -1
  36. package/src/ui/static/assets/{ManagePage-B8iG6Q0B.js → ManagePage-SvRQ6L19.js} +1 -1
  37. package/src/ui/static/assets/{MediaModal-C5n6sHYi.js → MediaModal-Dyy_iHl9.js} +1 -1
  38. package/src/ui/static/assets/MobileRunPicker-Cf5rm469.js +1 -0
  39. package/src/ui/static/assets/MobileRunTarget-C4M4YJJh.js +6 -0
  40. package/src/ui/static/assets/{ModuleExplorer-VGcmK167.js → ModuleExplorer-BKVbxFZK.js} +1 -1
  41. package/src/ui/static/assets/{OutputPage-B_1nPPxE.js → OutputPage-Bi-28tJi.js} +1 -1
  42. package/src/ui/static/assets/PipelinesPanel-BtO3iSJ4.js +1 -0
  43. package/src/ui/static/assets/{ProfilePage-y7tJNNFd.js → ProfilePage-BgZ4VDC-.js} +1 -1
  44. package/src/ui/static/assets/{ProjectExplorer-DbfGhRq0.js → ProjectExplorer-BVGbmVP7.js} +1 -1
  45. package/src/ui/static/assets/{RemoteFileStrip-WuRKtx_h.js → RemoteFileStrip-dzPInzgb.js} +1 -1
  46. package/src/ui/static/assets/{ReportCard-G52Q6-2i.js → ReportCard-LOf1PXlb.js} +2 -2
  47. package/src/ui/static/assets/{ReportFullView-Bt8UFP2J.js → ReportFullView-Ce4OI8lf.js} +1 -1
  48. package/src/ui/static/assets/{ReportsPage-DMtDi73Q.js → ReportsPage-DFxCQ8cY.js} +48 -48
  49. package/src/ui/static/assets/{ResultsPage-BI9jpK2N.js → ResultsPage-DD-uj8gk.js} +115 -115
  50. package/src/ui/static/assets/{RunState-ifC4zi6M.js → RunState-DDwFB4tA.js} +1 -1
  51. package/src/ui/static/assets/{RunTargets-C7vpCbck.js → RunTargets-CkIpY3v3.js} +1 -1
  52. package/src/ui/static/assets/ScriptMappingPage-DQQoR6sR.js +1 -0
  53. package/src/ui/static/assets/{SearchableDevicePicker-BYxYJNWl.js → SearchableDevicePicker-CenIxD7b.js} +1 -1
  54. package/src/ui/static/assets/{SettingsPage-DSISg7r7.js → SettingsPage-DAV_0y0m.js} +83 -83
  55. package/src/ui/static/assets/{SharedReportView-BOqKGJmR.js → SharedReportView-CqSLFKT1.js} +1 -1
  56. package/src/ui/static/assets/{SourcesPage-CgqtYGBi.js → SourcesPage-BvqC9oKw.js} +14 -14
  57. package/src/ui/static/assets/TestExplorerPage-Bdnll77k.js +7 -0
  58. package/src/ui/static/assets/{TestManagementPage-wqYTKP7W.js → TestManagementPage-CCNE688A.js} +10 -10
  59. package/src/ui/static/assets/{TestPlansPage-DOKX9p6z.js → TestPlansPage-T6D25i6-.js} +5 -5
  60. package/src/ui/static/assets/{TestverCreditsDetail-cSW0SpNx.js → TestverCreditsDetail-BKpt4oLW.js} +1 -1
  61. package/src/ui/static/assets/{TestverCreditsRing-DpMzl3h7.js → TestverCreditsRing-CoDk5eAS.js} +1 -1
  62. package/src/ui/static/assets/TestverMcpPage-Dte0qSXp.js +34 -0
  63. package/src/ui/static/assets/{UncommittedDiffViewer-BxS0zi-p.js → UncommittedDiffViewer-BNroxCoo.js} +2 -2
  64. package/src/ui/static/assets/{UserManagementPage-B5d0uDU_.js → UserManagementPage-BU4MuDJZ.js} +10 -10
  65. package/src/ui/static/assets/{WorkflowsPage-Bk0DFnFS.js → WorkflowsPage-BP5k7AqE.js} +83 -83
  66. package/src/ui/static/assets/clipboard-BIEd7Ccc.js +1 -0
  67. package/src/ui/static/assets/{hiddenLlmProviders-CdhhNa5G.js → hiddenLlmProviders-BPORgy-e.js} +1 -1
  68. package/src/ui/static/assets/index-BlA8ntjb.js +47 -0
  69. package/src/ui/static/assets/index-Co4_SlGD.css +1 -0
  70. package/src/ui/static/assets/{index-DpQhqcHv.js → index-DLmlY2Ol.js} +1 -1
  71. package/src/ui/static/assets/{reportMeta-AKcU_qwq.js → reportMeta-B9ZRW6ts.js} +1 -1
  72. package/src/ui/static/assets/runSelected-BoPm1sz-.js +1 -0
  73. package/src/ui/static/assets/{useChartTheme-BFz2QcND.js → useChartTheme-CTIe6M63.js} +1 -1
  74. package/src/ui/static/assets/{useDebouncedValue-BsHptIvX.js → useDebouncedValue-C9odz7b2.js} +1 -1
  75. package/src/ui/static/assets/{useFeatureFlags-DNkIctil.js → useFeatureFlags-B4Otsv-N.js} +1 -1
  76. package/src/ui/static/assets/{useJiraConnector-D5ysBBvz.js → useJiraConnector--JZhbYrT.js} +1 -1
  77. package/src/ui/static/assets/{useOwnership-U0AfKBRo.js → useOwnership-BhPOiYzy.js} +1 -1
  78. package/src/ui/static/assets/useSuites-GN_K2mHc.js +1 -0
  79. package/src/ui/static/assets/{useTabParam-ChbOedP1.js → useTabParam-CyYAP90W.js} +1 -1
  80. package/src/ui/static/assets/{useTestExplorer-DT8frjCK.js → useTestExplorer-BGhkGHKy.js} +1 -1
  81. package/src/ui/static/assets/{useTestLifecycle-OcwQaB1s.js → useTestLifecycle-DX5ES6x8.js} +1 -1
  82. package/src/ui/static/assets/{useTestManagement-Xm4Bcx3u.js → useTestManagement-ommXjx0q.js} +2 -2
  83. package/src/ui/static/assets/useTestResults-DWjvm8gm.js +1 -0
  84. package/src/ui/static/assets/{vendor-charts-DWFQlmCz.js → vendor-charts-By5uZ93z.js} +1 -1
  85. package/src/ui/static/assets/{vendor-flow-YGpC9U9I.js → vendor-flow-B61ZV-pm.js} +1 -1
  86. package/src/ui/static/assets/{vendor-icons-BKPiFyYV.js → vendor-icons-Cm92aSc5.js} +1426 -1421
  87. package/src/ui/static/assets/vendor-query-DkZSMtfn.js +1 -0
  88. package/src/ui/static/assets/{vendor-quill-W-RoQfb6.js → vendor-quill-xJF2Jvjc.js} +1 -1
  89. package/src/ui/static/assets/{vendor-react-CTbHBddL.js → vendor-react-DOVfxdUy.js} +1 -1
  90. package/src/ui/static/index.html +479 -479
  91. package/src/ui/static/assets/AIPanel-B_R-CbrF.js +0 -32
  92. package/src/ui/static/assets/AIRecordPanel-BRQWIU5h.js +0 -40
  93. package/src/ui/static/assets/AIStreamUI-C3D989_6.js +0 -9
  94. package/src/ui/static/assets/APITestingPage-Cmwkiiys.js +0 -19
  95. package/src/ui/static/assets/AboutPage-CjEqKB-q.js +0 -1
  96. package/src/ui/static/assets/AdvancedPage-4kAcpE8Y.js +0 -3
  97. package/src/ui/static/assets/AuditLogPage-BQjOzQje.js +0 -1
  98. package/src/ui/static/assets/ChangesSummary-CY_Vb27i.js +0 -2
  99. package/src/ui/static/assets/DiffViewer-BIU09a_i.js +0 -2
  100. package/src/ui/static/assets/MobileRunPicker-0h-N2c6d.js +0 -1
  101. package/src/ui/static/assets/MobileRunTarget-Bo_xekig.js +0 -6
  102. package/src/ui/static/assets/PipelinesPanel-PmmPu8pj.js +0 -1
  103. package/src/ui/static/assets/ScriptMappingPage-7vHuvhQw.js +0 -1
  104. package/src/ui/static/assets/TestExplorerPage-gYLhCD4d.js +0 -7
  105. package/src/ui/static/assets/index-BYVxKLrT.js +0 -47
  106. package/src/ui/static/assets/index-C2KJt7SI.css +0 -1
  107. package/src/ui/static/assets/runSelected-WlgnZcSF.js +0 -1
  108. package/src/ui/static/assets/useSuites-DyfN9HVv.js +0 -1
  109. package/src/ui/static/assets/useTestResults-D5EwGIX9.js +0 -1
  110. package/src/ui/static/assets/vendor-query-BrzmPFT3.js +0 -1
@@ -1 +1 @@
1
- import{j as s}from"./vendor-react-CTbHBddL.js";import{r as f,ap as g,b1 as j,u as m,a0 as b,aq as y}from"./vendor-icons-BKPiFyYV.js";const d={xs:"text-[10px] px-1.5 py-[1px] gap-1",sm:"text-[11px] px-2 py-0.5 gap-1.5",md:"text-xs px-2.5 py-1 gap-1.5"},N={xs:9,sm:10,md:12};function o({size:n="sm"}){const e=n==="md"?"h-2 w-2":"h-1.5 w-1.5";return s.jsxs("span",{className:`relative flex ${e} flex-shrink-0`,"aria-hidden":"true",children:[s.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-sky-400 opacity-75 motion-safe:animate-ping"}),s.jsx("span",{className:`relative inline-flex ${e} rounded-full bg-sky-500`})]})}function k({label:n="Running",detail:e,size:a="sm",title:t,className:l=""}){return s.jsxs("span",{"data-run-state":"running",title:t,className:`inline-flex items-center rounded-full border border-sky-500/30 bg-sky-500/10 text-sky-300 font-medium whitespace-nowrap flex-shrink-0 ${d[a]} ${l}`,children:[s.jsx(o,{size:a}),n,e!=null&&e!==""&&s.jsxs("span",{className:"opacity-70 font-normal tabular-nums",children:["· ",e]})]})}function v({label:n="Queued",position:e,size:a="sm",title:t,className:l=""}){return s.jsxs("span",{"data-run-state":"queued",title:t??(e?`Waiting — number ${e} in line`:"Waiting its turn"),className:`inline-flex items-center rounded-full border border-dashed border-gray-500/50 bg-gray-500/5 text-gray-400 font-medium whitespace-nowrap flex-shrink-0 ${d[a]} ${l}`,children:[s.jsx(m,{size:N[a],className:"flex-shrink-0"}),n,e?s.jsxs("span",{className:"tabular-nums opacity-80",children:["#",e]}):null]})}function C({state:n,size:e=16}){return n==="running"?s.jsx(b,{size:e,className:"text-sky-400 animate-spin flex-shrink-0","aria-label":"Running"}):s.jsx(y,{size:e,className:"text-gray-500 flex-shrink-0","aria-label":"Queued"})}function L({passed:n,failed:e,skipped:a=0,running:t=0,total:l,className:x="w-full",height:u="h-1.5"}){const i=l&&l>0?l:0,r=h=>i?Math.max(0,Math.min(100,h/i*100)):0,c=n+e+a,p=r(t);return s.jsx("span",{className:`${x} ${u} rounded-full bg-surface-3 overflow-hidden flex flex-shrink-0`,role:"progressbar","aria-valuemin":0,"aria-valuemax":i||void 0,"aria-valuenow":c,title:`${n} passed · ${e} failed${a?` · ${a} skipped`:""}${t?` · ${t} running`:""}${i?` · ${Math.max(0,i-c-t)} queued`:""}`,children:i?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"h-full bg-emerald-400 transition-[width] duration-500",style:{width:`${r(n)}%`}}),s.jsx("span",{className:"h-full bg-red-400 transition-[width] duration-500",style:{width:`${r(e)}%`}}),a>0&&s.jsx("span",{className:"h-full bg-gray-400/70 transition-[width] duration-500",style:{width:`${r(a)}%`}}),t>0&&s.jsx("span",{className:"h-full bg-sky-400 tv-stripes transition-[width] duration-500",style:{width:`${Math.max(p,3)}%`}})]}):s.jsx("span",{className:"h-full w-full bg-sky-400/80 tv-stripes"})})}function R({passed:n,failed:e,skipped:a=0,running:t=0,queued:l,size:x="sm",className:u=""}){const i=x==="xs"?"text-[11px]":"text-xs",r=x==="xs"?11:12;return s.jsxs("span",{className:`inline-flex items-center gap-x-2.5 gap-y-1 flex-wrap ${i} ${u}`,children:[s.jsxs("span",{className:"inline-flex items-center gap-1 text-emerald-400 tabular-nums",children:[s.jsx(f,{size:r})," ",n," passed"]}),e>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-red-400 tabular-nums",children:[s.jsx(g,{size:r})," ",e," failed"]}),a>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-gray-400 tabular-nums",children:[s.jsx(j,{size:r})," ",a," skipped"]}),t>0&&s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sky-300 tabular-nums",children:[s.jsx(o,{size:"xs"})," ",t," running"]}),l!=null&&l>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-gray-400 tabular-nums",children:[s.jsx(m,{size:r})," ",l," queued"]})]})}export{L,v as Q,k as R,R as a,C as b};
1
+ import{j as s}from"./vendor-react-DOVfxdUy.js";import{s as f,aq as g,b2 as j,v as m,a1 as b,ar as y}from"./vendor-icons-Cm92aSc5.js";const d={xs:"text-[10px] px-1.5 py-[1px] gap-1",sm:"text-[11px] px-2 py-0.5 gap-1.5",md:"text-xs px-2.5 py-1 gap-1.5"},N={xs:9,sm:10,md:12};function o({size:n="sm"}){const e=n==="md"?"h-2 w-2":"h-1.5 w-1.5";return s.jsxs("span",{className:`relative flex ${e} flex-shrink-0`,"aria-hidden":"true",children:[s.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-sky-400 opacity-75 motion-safe:animate-ping"}),s.jsx("span",{className:`relative inline-flex ${e} rounded-full bg-sky-500`})]})}function k({label:n="Running",detail:e,size:a="sm",title:t,className:l=""}){return s.jsxs("span",{"data-run-state":"running",title:t,className:`inline-flex items-center rounded-full border border-sky-500/30 bg-sky-500/10 text-sky-300 font-medium whitespace-nowrap flex-shrink-0 ${d[a]} ${l}`,children:[s.jsx(o,{size:a}),n,e!=null&&e!==""&&s.jsxs("span",{className:"opacity-70 font-normal tabular-nums",children:["· ",e]})]})}function v({label:n="Queued",position:e,size:a="sm",title:t,className:l=""}){return s.jsxs("span",{"data-run-state":"queued",title:t??(e?`Waiting — number ${e} in line`:"Waiting its turn"),className:`inline-flex items-center rounded-full border border-dashed border-gray-500/50 bg-gray-500/5 text-gray-400 font-medium whitespace-nowrap flex-shrink-0 ${d[a]} ${l}`,children:[s.jsx(m,{size:N[a],className:"flex-shrink-0"}),n,e?s.jsxs("span",{className:"tabular-nums opacity-80",children:["#",e]}):null]})}function C({state:n,size:e=16}){return n==="running"?s.jsx(b,{size:e,className:"text-sky-400 animate-spin flex-shrink-0","aria-label":"Running"}):s.jsx(y,{size:e,className:"text-gray-500 flex-shrink-0","aria-label":"Queued"})}function L({passed:n,failed:e,skipped:a=0,running:t=0,total:l,className:x="w-full",height:u="h-1.5"}){const i=l&&l>0?l:0,r=p=>i?Math.max(0,Math.min(100,p/i*100)):0,c=n+e+a,h=r(t);return s.jsx("span",{className:`${x} ${u} rounded-full bg-surface-3 overflow-hidden flex flex-shrink-0`,role:"progressbar","aria-valuemin":0,"aria-valuemax":i||void 0,"aria-valuenow":c,title:`${n} passed · ${e} failed${a?` · ${a} skipped`:""}${t?` · ${t} running`:""}${i?` · ${Math.max(0,i-c-t)} queued`:""}`,children:i?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"h-full bg-emerald-400 transition-[width] duration-500",style:{width:`${r(n)}%`}}),s.jsx("span",{className:"h-full bg-red-400 transition-[width] duration-500",style:{width:`${r(e)}%`}}),a>0&&s.jsx("span",{className:"h-full bg-gray-400/70 transition-[width] duration-500",style:{width:`${r(a)}%`}}),t>0&&s.jsx("span",{className:"h-full bg-sky-400 tv-stripes transition-[width] duration-500",style:{width:`${Math.max(h,3)}%`}})]}):s.jsx("span",{className:"h-full w-full bg-sky-400/80 tv-stripes"})})}function R({passed:n,failed:e,skipped:a=0,running:t=0,queued:l,size:x="sm",className:u=""}){const i=x==="xs"?"text-[11px]":"text-xs",r=x==="xs"?11:12;return s.jsxs("span",{className:`inline-flex items-center gap-x-2.5 gap-y-1 flex-wrap ${i} ${u}`,children:[s.jsxs("span",{className:"inline-flex items-center gap-1 text-emerald-400 tabular-nums",children:[s.jsx(f,{size:r})," ",n," passed"]}),e>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-red-400 tabular-nums",children:[s.jsx(g,{size:r})," ",e," failed"]}),a>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-gray-400 tabular-nums",children:[s.jsx(j,{size:r})," ",a," skipped"]}),t>0&&s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sky-300 tabular-nums",children:[s.jsx(o,{size:"xs"})," ",t," running"]}),l!=null&&l>0&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-gray-400 tabular-nums",children:[s.jsx(m,{size:r})," ",l," queued"]})]})}export{L,v as Q,k as R,R as a,C as b};
@@ -1 +1 @@
1
- import{j as e,r as y}from"./vendor-react-CTbHBddL.js";import{u as z}from"./vendor-query-BrzmPFT3.js";import{K as u,cE as w,aB as v,c as x,bA as k,by as j,y as b}from"./vendor-icons-BKPiFyYV.js";import{v as C}from"./index-BYVxKLrT.js";const G="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2027600%2027600'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3clinearGradient%20id='A'%20gradientUnits='userSpaceOnUse'/%3e%3clinearGradient%20id='B'%20x1='6870'%20x2='24704'%20y1='18705'%20y2='18705'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%230c59a4'/%3e%3cstop%20offset='1'%20stop-color='%23114a8b'/%3e%3c/linearGradient%3e%3clinearGradient%20id='C'%20x1='16272'%20x2='5133'%20y1='10968'%20y2='23102'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%231b9de2'/%3e%3cstop%20offset='.16'%20stop-color='%231595df'/%3e%3cstop%20offset='.67'%20stop-color='%230680d7'/%3e%3cstop%20offset='1'%20stop-color='%230078d4'/%3e%3c/linearGradient%3e%3cradialGradient%20id='D'%20cx='16720'%20cy='18747'%20r='9538'%20xlink:href='%23A'%3e%3cstop%20offset='.72'%20stop-opacity='0'/%3e%3cstop%20offset='.95'%20stop-opacity='.53'/%3e%3cstop%20offset='1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='E'%20cx='7130'%20cy='19866'%20r='14324'%20gradientTransform='matrix(.14843%20-.98892%20.79688%20.1196%20-8759%2025542)'%20xlink:href='%23A'%3e%3cstop%20offset='.76'%20stop-opacity='0'/%3e%3cstop%20offset='.95'%20stop-opacity='.5'/%3e%3cstop%20offset='1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='F'%20cx='2523'%20cy='4680'%20r='20243'%20gradientTransform='matrix(-.03715%20.99931%20-2.12836%20-.07913%2013579%203530)'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%2335c1f1'/%3e%3cstop%20offset='.11'%20stop-color='%2334c1ed'/%3e%3cstop%20offset='.23'%20stop-color='%232fc2df'/%3e%3cstop%20offset='.31'%20stop-color='%232bc3d2'/%3e%3cstop%20offset='.67'%20stop-color='%2336c752'/%3e%3c/radialGradient%3e%3cradialGradient%20id='G'%20cx='24247'%20cy='7758'%20r='9734'%20gradientTransform='matrix(.28109%20.95968%20-.78353%20.22949%2024510%20-16292)'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%2366eb6e'/%3e%3cstop%20offset='1'%20stop-color='%2366eb6e'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3cpath%20id='H'%20d='M24105%2020053a9345%209345%200%2001-1053%20472%2010202%2010202%200%2001-3590%20646c-4732%200-8855-3255-8855-7432%200-1175%20680-2193%201643-2729-4280%20180-5380%204640-5380%207253%200%207387%206810%208137%208276%208137%20791%200%201984-230%202704-456l130-44a12834%2012834%200%20006660-5282c220-350-168-757-535-565z'/%3e%3cpath%20id='I'%20d='M11571%2025141a7913%207913%200%2001-2273-2137%208145%208145%200%2001-1514-4740%208093%208093%200%20013093-6395%208082%208082%200%20011373-859c312-148%20846-414%201554-404a3236%203236%200%20012569%201297%203184%203184%200%2001636%201866c0-21%202446-7960-8005-7960-4390%200-8004%204166-8004%207820%200%202319%20538%204170%201212%205604a12833%2012833%200%20007684%206757%2012795%2012795%200%20003908%20610c1414%200%202774-233%204045-656a7575%207575%200%2001-6278-803z'/%3e%3cpath%20id='J'%20d='M16231%2015886c-80%20105-330%20250-330%20566%200%20260%20170%20512%20472%20723%201438%201003%204149%20868%204156%20868a5954%205954%200%20003027-839%206147%206147%200%20001133-850%206180%206180%200%20001910-4437c26-2242-796-3732-1133-4392-2120-4141-6694-6525-11668-6525-7011%200-12703%205635-12798%2012620%2047-3654%203679-6605%207996-6605%20350%200%202346%2034%204200%201007%201634%20858%202490%201894%203086%202921%20618%201067%20728%202415%20728%202952s-271%201333-780%201990z'/%3e%3cuse%20fill='url(%23B)'%20xlink:href='%23H'/%3e%3cuse%20fill='url(%23D)'%20opacity='.35'%20xlink:href='%23H'/%3e%3cuse%20fill='url(%23C)'%20xlink:href='%23I'/%3e%3cuse%20fill='url(%23E)'%20opacity='.4'%20xlink:href='%23I'/%3e%3cuse%20fill='url(%23F)'%20xlink:href='%23J'/%3e%3cuse%20fill='url(%23G)'%20xlink:href='%23J'/%3e%3c/svg%3e",M="/assets/firefox-FC5QDl5e.svg",A="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3clinearGradient%20id='a'%20x1='295.835'%20x2='295.835'%20y1='274.049'%20y2='272.933'%20gradientTransform='matrix(112%200%200%20-112%20-33069.5%2030695)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2319D7FF'/%3e%3cstop%20offset='1'%20stop-color='%231E64F0'/%3e%3c/linearGradient%3e%3ccircle%20cx='64'%20cy='64'%20r='62.5'%20fill='url(%23a)'/%3e%3cpath%20d='M63.5%207.6v9.2h1V7.6Zm-3.902.26-.996.08.4%205%20.996-.08zm8.804%200-.4%205%20.996.08.4-5zm-13.709.554-.986.172%201.6%209.101.986-.173zm18.614%200-1.6%209.1.986.174%201.6-9.102zM49.883%209.47l-.965.261%201.299%204.801.965-.261Zm28.234%200-1.299%204.8.965.262%201.299-4.8zm-32.846%201.363-.943.336%203.102%208.7.941-.337zm37.458%200-3.1%208.7.941.335%203.102-8.699zm4.62%201.852-2.2%204.601.902.43%202.201-4.6zm-46.695.007-.908.416%202.1%204.6.908-.414zm-4.32%202.26-.867.498%204.6%208%20.867-.498zm55.332%200-4.6%208%20.868.498%204.6-8zm-59.559%202.56-.816.577%202.9%204.101.817-.578zm63.786%200-2.9%204.1.816.578%202.9-4.101zm-67.61%202.968-.765.644%205.9%207%20.764-.644zm71.434%200-5.899%207%20.764.644%205.9-7zm-75.168%203.263-.697.717%203.6%203.5.696-.717zm-3.33%203.574-.639.768%207.1%205.9.64-.77zm85.562%200-7.101%205.899.64.77%207.1-5.901zM18.184%2031.19l-.569.823%204.201%202.9.569-.824zm91.632%200-4.2%202.899.568.824%204.2-2.9zM15.55%2035.367l-.498.867%208%204.6.498-.867zm96.902%200-8%204.6.498.867%208-4.6zm-99.14%204.28-.422.906%204.5%202.1.422-.907zm101.378%200-4.5%202.1.422.905%204.5-2.1zM11.375%2044.13l-.35.937%208.6%203.202.35-.938zm105.25%200-8.6%203.201.35.938%208.6-3.202zM9.828%2048.816l-.256.967%204.9%201.301.257-.967zm108.344%200-4.9%201.301.255.967%204.9-1.3zM8.688%2053.607l-.174.985%209.1%201.601.173-.986zm110.624%200-9.1%201.6.175.986%209.1-1.601zM8.05%2058.402l-.098.996%205%20.5.098-.996zm111.902%200-5%20.5.098.996%205-.5zM7.801%2063.4v1H17v-1zM111%2063.4v1h9.2v-1zm-98.049%204.403-5%20.5.098.994%205-.5zm102.098%200-.098.994%205%20.5.098-.994zm-97.436%203.705-9.1%201.6.175.984%209.1-1.6zm92.774%200-.174.984%209.1%201.6.173-.985zm-95.914%205.11-4.9%201.298.255.967%204.9-1.299zm99.054%200-.256.966%204.9%201.299.257-.967zm-93.902%202.814-8.6%203.199.35.937%208.6-3.199zm88.75%200-.35.937%208.6%203.2.35-.938zm-90.986%205.615-4.5%202.1.422.906%204.5-2.1zm93.222%200-.422.906%204.5%202.1.422-.907zm-87.56%201.92-8%204.6.498.867%208-4.6zm81.898%200-.498.867%208%204.6.498-.868zm-83.133%205.822-4.2%202.9.568.823%204.2-2.9zm84.368%200-.569.822%204.201%202.9.569-.822zm-78.504.926-7.1%205.9.639.77%207.101-5.9zm72.64%200-.64.77%207.101%205.9.639-.77zm-66.902%205.863-5.9%207%20.765.645%205.899-7zm61.164%200-.764.645%205.899%207%20.765-.645zm5.967.164-.697.717%203.6%203.5.696-.717zm-60.48%204.606-4.6%207.9.863.504%204.6-7.9zm47.863%200-.864.504%204.6%207.9.863-.504zm-53.74%201.164-2.901%204.1.816.577%202.9-4.101zm59.617%200-.817.576%202.9%204.101.817-.578zm-46.38%202.32-3.1%208.7.942.335%203.1-8.699zm33.141%200-.941.336%203.1%208.7.943-.337zm-25.263%202.182-1.6%209.1.986.173%201.6-9.1zm17.386%200-.986.174%201.6%209.1.986-.175zm-30.742.066-2.201%204.5.898.44%202.202-4.5zm44.098%200-.899.44%202.202%204.5.898-.44Zm-22.549.82v9.2h1v-9.2zm-13.283%202.272-1.301%204.9.967.256%201.3-4.9zm27.566%200-.967.256%201.301%204.9.967-.256zm-18.781%201.687-.4%205%20.996.08.4-5zm9.996%200-.996.08.4%205%20.996-.08z'%20style='-inkscape-stroke:none'%20color='%23000'%20fill='%23fff'/%3e%3cpath%20fill='%23f00'%20d='m106.7%2021-48%2037.7%205.2%205.2z'/%3e%3cpath%20fill='%23D01414'%20d='m63.9%2063.9%206%206L106.7%2021z'/%3e%3cpath%20fill='%23fff'%20d='m58.7%2058.7-37.7%2048%2042.9-42.8z'/%3e%3cpath%20fill='%23ACACAC'%20d='m21%20106.7%2048.9-36.8-6-6z'/%3e%3c/svg%3e";function N({browser:t,size:r=14,showLabel:s=!1}){if(!t)return null;const l=t.toLowerCase();return e.jsxs("span",{className:"inline-flex items-center gap-1 flex-shrink-0",children:[e.jsx("span",{className:"inline-flex",children:F(l,r)}),s&&e.jsx("span",{className:"text-[11px] text-gray-400",children:t})]})}function F(t,r){return t.includes("chromium")?e.jsx(D,{size:r}):t.includes("chrome")?e.jsx(B,{size:r}):t.includes("firefox")?e.jsx("img",{src:M,width:r,height:r,alt:"Firefox",style:{display:"block"}}):t.includes("safari")||t.includes("webkit")?e.jsx("img",{src:A,width:r,height:r,alt:"Safari",style:{display:"block"}}):t.includes("edge")?e.jsx("img",{src:G,width:r,height:r,alt:"Microsoft Edge",style:{display:"block"}}):e.jsx(u,{size:r,className:"text-gray-500"})}function B({size:t}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{fill:"#EA4335",d:"M24 24 4.95 13A22 22 0 0 1 43.05 13Z"}),e.jsx("path",{fill:"#FBBC05",d:"M24 24 43.05 13A22 22 0 0 1 24 46Z"}),e.jsx("path",{fill:"#34A853",d:"M24 24 24 46A22 22 0 0 1 4.95 13Z"}),e.jsx("circle",{cx:"24",cy:"24",r:"10",fill:"#fff"}),e.jsx("circle",{cx:"24",cy:"24",r:"7.5",fill:"#4285F4"})]})}function D({size:t}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{fill:"#5C9CE6",d:"M24 24 4.95 13A22 22 0 0 1 43.05 13Z"}),e.jsx("path",{fill:"#8AB4E8",d:"M24 24 43.05 13A22 22 0 0 1 24 46Z"}),e.jsx("path",{fill:"#4E8FD4",d:"M24 24 24 46A22 22 0 0 1 4.95 13Z"}),e.jsx("circle",{cx:"24",cy:"24",r:"10",fill:"#fff"}),e.jsx("circle",{cx:"24",cy:"24",r:"7.5",fill:"#5F6368"})]})}function E({name:t,size:r=15}){const s=(t||"").toLowerCase();return s.includes("prod")&&!s.includes("pre")?e.jsx(w,{size:r,className:"text-emerald-400"}):s.includes("pre")?e.jsx(v,{size:r,className:"text-amber-400"}):s.includes("stag")?e.jsx(x,{size:r,className:"text-cyan-400"}):s.includes("dev")?e.jsx(k,{size:r,className:"text-blue-400"}):s.includes("qa")||s.includes("test")?e.jsx(j,{size:r,className:"text-purple-400"}):e.jsx(x,{size:r,className:"text-gray-500"})}function p({name:t,isEnv:r,size:s=15}){return r?e.jsx(E,{name:t,size:s}):t?e.jsx(N,{browser:t,size:s}):e.jsx(u,{size:s,className:"text-gray-500"})}function R(){var r,s,l,c,n,o,a,f;const{data:t}=z({queryKey:["run-commands-config"],queryFn:C,staleTime:3e4});return{browserOpts:((s=(r=t==null?void 0:t.configured)==null?void 0:r.browsers)==null?void 0:s.options)||[],envOpts:((c=(l=t==null?void 0:t.configured)==null?void 0:l.environments)==null?void 0:c.options)||[],browserDefault:((o=(n=t==null?void 0:t.configured)==null?void 0:n.browsers)==null?void 0:o.default)||"",envDefault:((f=(a=t==null?void 0:t.configured)==null?void 0:a.environments)==null?void 0:f.default)||""}}function $({isEnv:t,value:r,onChange:s,options:l,size:c="md",variant:n="field"}){const[o,a]=y.useState(!1),f=c==="sm"?"px-2.5 py-1.5 text-xs":"px-3 py-2 text-sm",m=c==="sm"?14:15,d=n==="inline",g=d?`w-full flex items-center gap-1.5 rounded-md px-2 py-1.5 ${c==="sm"?"text-xs":"text-sm"} text-left group transition-colors ${o?"bg-surface-2":"hover:bg-surface-2"}`:`w-full flex items-center gap-2 bg-white dark:bg-white/[0.04] border border-gray-200 dark:border-white/10 rounded-lg ${f} text-left outline-none hover:border-gray-300 dark:hover:border-white/20 focus:border-brand-500/50`,h=d?`text-gray-400 dark:text-gray-500 flex-shrink-0 transition-all ${o?"opacity-100 rotate-180":"opacity-0 group-hover:opacity-100"}`:`text-gray-400 dark:text-gray-500 flex-shrink-0 transition-transform ${o?"rotate-180":""}`;return e.jsxs("div",{className:"relative w-full",children:[e.jsxs("button",{type:"button",onClick:()=>a(i=>!i),className:g,children:[r?e.jsx(p,{name:r,isEnv:t,size:m}):null,e.jsx("span",{className:`flex-1 truncate ${r?"text-gray-800 dark:text-gray-200":"text-gray-400 dark:text-gray-500"}`,children:r||"Default"}),e.jsx(b,{size:13,className:h})]}),o&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>a(!1)}),e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 w-full min-w-[180px] rounded-lg bg-white dark:bg-surface-1 border border-gray-200 dark:border-white/10 shadow-xl shadow-black/20 dark:shadow-black/40 p-1 max-h-60 overflow-auto",children:[e.jsx("button",{type:"button",onClick:()=>{s(""),a(!1)},className:"w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-sm text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors",children:"Default"}),l.map(i=>e.jsxs("button",{type:"button",onClick:()=>{s(i.name),a(!1)},className:"w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors",children:[e.jsx(p,{name:i.name,isEnv:t,size:m}),e.jsx("span",{className:"flex-1 text-left truncate",children:i.name})]},i.name))]})]})]})}export{N as B,$ as T,p as a,R as u};
1
+ import{j as e,r as y}from"./vendor-react-DOVfxdUy.js";import{u as z}from"./vendor-query-DkZSMtfn.js";import{O as u,cH as w,aC as v,e as x,bB as k,bz as j,z as b}from"./vendor-icons-Cm92aSc5.js";import{v as C}from"./index-BlA8ntjb.js";const G="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2027600%2027600'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3clinearGradient%20id='A'%20gradientUnits='userSpaceOnUse'/%3e%3clinearGradient%20id='B'%20x1='6870'%20x2='24704'%20y1='18705'%20y2='18705'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%230c59a4'/%3e%3cstop%20offset='1'%20stop-color='%23114a8b'/%3e%3c/linearGradient%3e%3clinearGradient%20id='C'%20x1='16272'%20x2='5133'%20y1='10968'%20y2='23102'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%231b9de2'/%3e%3cstop%20offset='.16'%20stop-color='%231595df'/%3e%3cstop%20offset='.67'%20stop-color='%230680d7'/%3e%3cstop%20offset='1'%20stop-color='%230078d4'/%3e%3c/linearGradient%3e%3cradialGradient%20id='D'%20cx='16720'%20cy='18747'%20r='9538'%20xlink:href='%23A'%3e%3cstop%20offset='.72'%20stop-opacity='0'/%3e%3cstop%20offset='.95'%20stop-opacity='.53'/%3e%3cstop%20offset='1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='E'%20cx='7130'%20cy='19866'%20r='14324'%20gradientTransform='matrix(.14843%20-.98892%20.79688%20.1196%20-8759%2025542)'%20xlink:href='%23A'%3e%3cstop%20offset='.76'%20stop-opacity='0'/%3e%3cstop%20offset='.95'%20stop-opacity='.5'/%3e%3cstop%20offset='1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='F'%20cx='2523'%20cy='4680'%20r='20243'%20gradientTransform='matrix(-.03715%20.99931%20-2.12836%20-.07913%2013579%203530)'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%2335c1f1'/%3e%3cstop%20offset='.11'%20stop-color='%2334c1ed'/%3e%3cstop%20offset='.23'%20stop-color='%232fc2df'/%3e%3cstop%20offset='.31'%20stop-color='%232bc3d2'/%3e%3cstop%20offset='.67'%20stop-color='%2336c752'/%3e%3c/radialGradient%3e%3cradialGradient%20id='G'%20cx='24247'%20cy='7758'%20r='9734'%20gradientTransform='matrix(.28109%20.95968%20-.78353%20.22949%2024510%20-16292)'%20xlink:href='%23A'%3e%3cstop%20offset='0'%20stop-color='%2366eb6e'/%3e%3cstop%20offset='1'%20stop-color='%2366eb6e'%20stop-opacity='0'/%3e%3c/radialGradient%3e%3cpath%20id='H'%20d='M24105%2020053a9345%209345%200%2001-1053%20472%2010202%2010202%200%2001-3590%20646c-4732%200-8855-3255-8855-7432%200-1175%20680-2193%201643-2729-4280%20180-5380%204640-5380%207253%200%207387%206810%208137%208276%208137%20791%200%201984-230%202704-456l130-44a12834%2012834%200%20006660-5282c220-350-168-757-535-565z'/%3e%3cpath%20id='I'%20d='M11571%2025141a7913%207913%200%2001-2273-2137%208145%208145%200%2001-1514-4740%208093%208093%200%20013093-6395%208082%208082%200%20011373-859c312-148%20846-414%201554-404a3236%203236%200%20012569%201297%203184%203184%200%2001636%201866c0-21%202446-7960-8005-7960-4390%200-8004%204166-8004%207820%200%202319%20538%204170%201212%205604a12833%2012833%200%20007684%206757%2012795%2012795%200%20003908%20610c1414%200%202774-233%204045-656a7575%207575%200%2001-6278-803z'/%3e%3cpath%20id='J'%20d='M16231%2015886c-80%20105-330%20250-330%20566%200%20260%20170%20512%20472%20723%201438%201003%204149%20868%204156%20868a5954%205954%200%20003027-839%206147%206147%200%20001133-850%206180%206180%200%20001910-4437c26-2242-796-3732-1133-4392-2120-4141-6694-6525-11668-6525-7011%200-12703%205635-12798%2012620%2047-3654%203679-6605%207996-6605%20350%200%202346%2034%204200%201007%201634%20858%202490%201894%203086%202921%20618%201067%20728%202415%20728%202952s-271%201333-780%201990z'/%3e%3cuse%20fill='url(%23B)'%20xlink:href='%23H'/%3e%3cuse%20fill='url(%23D)'%20opacity='.35'%20xlink:href='%23H'/%3e%3cuse%20fill='url(%23C)'%20xlink:href='%23I'/%3e%3cuse%20fill='url(%23E)'%20opacity='.4'%20xlink:href='%23I'/%3e%3cuse%20fill='url(%23F)'%20xlink:href='%23J'/%3e%3cuse%20fill='url(%23G)'%20xlink:href='%23J'/%3e%3c/svg%3e",M="/assets/firefox-FC5QDl5e.svg",N="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3clinearGradient%20id='a'%20x1='295.835'%20x2='295.835'%20y1='274.049'%20y2='272.933'%20gradientTransform='matrix(112%200%200%20-112%20-33069.5%2030695)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2319D7FF'/%3e%3cstop%20offset='1'%20stop-color='%231E64F0'/%3e%3c/linearGradient%3e%3ccircle%20cx='64'%20cy='64'%20r='62.5'%20fill='url(%23a)'/%3e%3cpath%20d='M63.5%207.6v9.2h1V7.6Zm-3.902.26-.996.08.4%205%20.996-.08zm8.804%200-.4%205%20.996.08.4-5zm-13.709.554-.986.172%201.6%209.101.986-.173zm18.614%200-1.6%209.1.986.174%201.6-9.102zM49.883%209.47l-.965.261%201.299%204.801.965-.261Zm28.234%200-1.299%204.8.965.262%201.299-4.8zm-32.846%201.363-.943.336%203.102%208.7.941-.337zm37.458%200-3.1%208.7.941.335%203.102-8.699zm4.62%201.852-2.2%204.601.902.43%202.201-4.6zm-46.695.007-.908.416%202.1%204.6.908-.414zm-4.32%202.26-.867.498%204.6%208%20.867-.498zm55.332%200-4.6%208%20.868.498%204.6-8zm-59.559%202.56-.816.577%202.9%204.101.817-.578zm63.786%200-2.9%204.1.816.578%202.9-4.101zm-67.61%202.968-.765.644%205.9%207%20.764-.644zm71.434%200-5.899%207%20.764.644%205.9-7zm-75.168%203.263-.697.717%203.6%203.5.696-.717zm-3.33%203.574-.639.768%207.1%205.9.64-.77zm85.562%200-7.101%205.899.64.77%207.1-5.901zM18.184%2031.19l-.569.823%204.201%202.9.569-.824zm91.632%200-4.2%202.899.568.824%204.2-2.9zM15.55%2035.367l-.498.867%208%204.6.498-.867zm96.902%200-8%204.6.498.867%208-4.6zm-99.14%204.28-.422.906%204.5%202.1.422-.907zm101.378%200-4.5%202.1.422.905%204.5-2.1zM11.375%2044.13l-.35.937%208.6%203.202.35-.938zm105.25%200-8.6%203.201.35.938%208.6-3.202zM9.828%2048.816l-.256.967%204.9%201.301.257-.967zm108.344%200-4.9%201.301.255.967%204.9-1.3zM8.688%2053.607l-.174.985%209.1%201.601.173-.986zm110.624%200-9.1%201.6.175.986%209.1-1.601zM8.05%2058.402l-.098.996%205%20.5.098-.996zm111.902%200-5%20.5.098.996%205-.5zM7.801%2063.4v1H17v-1zM111%2063.4v1h9.2v-1zm-98.049%204.403-5%20.5.098.994%205-.5zm102.098%200-.098.994%205%20.5.098-.994zm-97.436%203.705-9.1%201.6.175.984%209.1-1.6zm92.774%200-.174.984%209.1%201.6.173-.985zm-95.914%205.11-4.9%201.298.255.967%204.9-1.299zm99.054%200-.256.966%204.9%201.299.257-.967zm-93.902%202.814-8.6%203.199.35.937%208.6-3.199zm88.75%200-.35.937%208.6%203.2.35-.938zm-90.986%205.615-4.5%202.1.422.906%204.5-2.1zm93.222%200-.422.906%204.5%202.1.422-.907zm-87.56%201.92-8%204.6.498.867%208-4.6zm81.898%200-.498.867%208%204.6.498-.868zm-83.133%205.822-4.2%202.9.568.823%204.2-2.9zm84.368%200-.569.822%204.201%202.9.569-.822zm-78.504.926-7.1%205.9.639.77%207.101-5.9zm72.64%200-.64.77%207.101%205.9.639-.77zm-66.902%205.863-5.9%207%20.765.645%205.899-7zm61.164%200-.764.645%205.899%207%20.765-.645zm5.967.164-.697.717%203.6%203.5.696-.717zm-60.48%204.606-4.6%207.9.863.504%204.6-7.9zm47.863%200-.864.504%204.6%207.9.863-.504zm-53.74%201.164-2.901%204.1.816.577%202.9-4.101zm59.617%200-.817.576%202.9%204.101.817-.578zm-46.38%202.32-3.1%208.7.942.335%203.1-8.699zm33.141%200-.941.336%203.1%208.7.943-.337zm-25.263%202.182-1.6%209.1.986.173%201.6-9.1zm17.386%200-.986.174%201.6%209.1.986-.175zm-30.742.066-2.201%204.5.898.44%202.202-4.5zm44.098%200-.899.44%202.202%204.5.898-.44Zm-22.549.82v9.2h1v-9.2zm-13.283%202.272-1.301%204.9.967.256%201.3-4.9zm27.566%200-.967.256%201.301%204.9.967-.256zm-18.781%201.687-.4%205%20.996.08.4-5zm9.996%200-.996.08.4%205%20.996-.08z'%20style='-inkscape-stroke:none'%20color='%23000'%20fill='%23fff'/%3e%3cpath%20fill='%23f00'%20d='m106.7%2021-48%2037.7%205.2%205.2z'/%3e%3cpath%20fill='%23D01414'%20d='m63.9%2063.9%206%206L106.7%2021z'/%3e%3cpath%20fill='%23fff'%20d='m58.7%2058.7-37.7%2048%2042.9-42.8z'/%3e%3cpath%20fill='%23ACACAC'%20d='m21%20106.7%2048.9-36.8-6-6z'/%3e%3c/svg%3e";function A({browser:t,size:r=14,showLabel:s=!1}){if(!t)return null;const l=t.toLowerCase();return e.jsxs("span",{className:"inline-flex items-center gap-1 flex-shrink-0",children:[e.jsx("span",{className:"inline-flex",children:F(l,r)}),s&&e.jsx("span",{className:"text-[11px] text-gray-400",children:t})]})}function F(t,r){return t.includes("chromium")?e.jsx(D,{size:r}):t.includes("chrome")?e.jsx(B,{size:r}):t.includes("firefox")?e.jsx("img",{src:M,width:r,height:r,alt:"Firefox",style:{display:"block"}}):t.includes("safari")||t.includes("webkit")?e.jsx("img",{src:N,width:r,height:r,alt:"Safari",style:{display:"block"}}):t.includes("edge")?e.jsx("img",{src:G,width:r,height:r,alt:"Microsoft Edge",style:{display:"block"}}):e.jsx(u,{size:r,className:"text-gray-500"})}function B({size:t}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{fill:"#EA4335",d:"M24 24 4.95 13A22 22 0 0 1 43.05 13Z"}),e.jsx("path",{fill:"#FBBC05",d:"M24 24 43.05 13A22 22 0 0 1 24 46Z"}),e.jsx("path",{fill:"#34A853",d:"M24 24 24 46A22 22 0 0 1 4.95 13Z"}),e.jsx("circle",{cx:"24",cy:"24",r:"10",fill:"#fff"}),e.jsx("circle",{cx:"24",cy:"24",r:"7.5",fill:"#4285F4"})]})}function D({size:t}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{fill:"#5C9CE6",d:"M24 24 4.95 13A22 22 0 0 1 43.05 13Z"}),e.jsx("path",{fill:"#8AB4E8",d:"M24 24 43.05 13A22 22 0 0 1 24 46Z"}),e.jsx("path",{fill:"#4E8FD4",d:"M24 24 24 46A22 22 0 0 1 4.95 13Z"}),e.jsx("circle",{cx:"24",cy:"24",r:"10",fill:"#fff"}),e.jsx("circle",{cx:"24",cy:"24",r:"7.5",fill:"#5F6368"})]})}function S({name:t,size:r=15}){const s=(t||"").toLowerCase();return s.includes("prod")&&!s.includes("pre")?e.jsx(w,{size:r,className:"text-emerald-400"}):s.includes("pre")?e.jsx(v,{size:r,className:"text-amber-400"}):s.includes("stag")?e.jsx(x,{size:r,className:"text-cyan-400"}):s.includes("dev")?e.jsx(k,{size:r,className:"text-blue-400"}):s.includes("qa")||s.includes("test")?e.jsx(j,{size:r,className:"text-purple-400"}):e.jsx(x,{size:r,className:"text-gray-500"})}function p({name:t,isEnv:r,size:s=15}){return r?e.jsx(S,{name:t,size:s}):t?e.jsx(A,{browser:t,size:s}):e.jsx(u,{size:s,className:"text-gray-500"})}function O(){var r,s,l,c,n,o,a,f;const{data:t}=z({queryKey:["run-commands-config"],queryFn:C,staleTime:3e4});return{browserOpts:((s=(r=t==null?void 0:t.configured)==null?void 0:r.browsers)==null?void 0:s.options)||[],envOpts:((c=(l=t==null?void 0:t.configured)==null?void 0:l.environments)==null?void 0:c.options)||[],browserDefault:((o=(n=t==null?void 0:t.configured)==null?void 0:n.browsers)==null?void 0:o.default)||"",envDefault:((f=(a=t==null?void 0:t.configured)==null?void 0:a.environments)==null?void 0:f.default)||""}}function R({isEnv:t,value:r,onChange:s,options:l,size:c="md",variant:n="field"}){const[o,a]=y.useState(!1),f=c==="sm"?"px-2.5 py-1.5 text-xs":"px-3 py-2 text-sm",m=c==="sm"?14:15,d=n==="inline",g=d?`w-full flex items-center gap-1.5 rounded-md px-2 py-1.5 ${c==="sm"?"text-xs":"text-sm"} text-left group transition-colors ${o?"bg-surface-2":"hover:bg-surface-2"}`:`w-full flex items-center gap-2 bg-white dark:bg-white/[0.04] border border-gray-200 dark:border-white/10 rounded-lg ${f} text-left outline-none hover:border-gray-300 dark:hover:border-white/20 focus:border-brand-500/50`,h=d?`text-gray-400 dark:text-gray-500 flex-shrink-0 transition-all ${o?"opacity-100 rotate-180":"opacity-0 group-hover:opacity-100"}`:`text-gray-400 dark:text-gray-500 flex-shrink-0 transition-transform ${o?"rotate-180":""}`;return e.jsxs("div",{className:"relative w-full",children:[e.jsxs("button",{type:"button",onClick:()=>a(i=>!i),className:g,children:[r?e.jsx(p,{name:r,isEnv:t,size:m}):null,e.jsx("span",{className:`flex-1 truncate ${r?"text-gray-800 dark:text-gray-200":"text-gray-400 dark:text-gray-500"}`,children:r||"Default"}),e.jsx(b,{size:13,className:h})]}),o&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>a(!1)}),e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 w-full min-w-[180px] rounded-lg bg-white dark:bg-surface-1 border border-gray-200 dark:border-white/10 shadow-xl shadow-black/20 dark:shadow-black/40 p-1 max-h-60 overflow-auto",children:[e.jsx("button",{type:"button",onClick:()=>{s(""),a(!1)},className:"w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-sm text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors",children:"Default"}),l.map(i=>e.jsxs("button",{type:"button",onClick:()=>{s(i.name),a(!1)},className:"w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors",children:[e.jsx(p,{name:i.name,isEnv:t,size:m}),e.jsx("span",{className:"flex-1 text-left truncate",children:i.name})]},i.name))]})]})]})}export{A as B,R as T,p as a,O as u};
@@ -0,0 +1 @@
1
+ import{r as z,j as e}from"./vendor-react-DOVfxdUy.js";import{u as Ue}from"./useTabParam-CyYAP90W.js";import{b as Ae,D as Pe}from"./index-BlA8ntjb.js";import{C as Ee}from"./ConfirmDialog-D_N9188T.js";import{aa as Fe,ab as Ie,ac as Be,F as Oe,ad as qe,ae as He,af as Ve,ag as De}from"./useTestManagement-ommXjx0q.js";import{u as Ge}from"./vendor-query-DkZSMtfn.js";import{f as K}from"./formatTestName-BKd2Uqhs.js";import{cy as H,b as Ke,f as I,a1 as F,T as Z,ci as Y,aD as Ye,cp as Je,s as q,p as me,aq as pe,I as Qe,am as Xe,aJ as he,Z as Ze,R as ge,w as ue,X as be,bP as We,z as fe,ah as X,$ as es,dl as oe,u as ss,aK as ts,b2 as as}from"./vendor-icons-Cm92aSc5.js";const rs={critical:"bg-red-500/20 text-red-300",high:"bg-orange-500/20 text-orange-300",medium:"bg-amber-500/20 text-amber-300",low:"bg-emerald-500/20 text-emerald-300"},ns={functional:"bg-sky-500/20 text-sky-300",regression:"bg-violet-500/20 text-violet-300",smoke:"bg-amber-500/20 text-amber-300",integration:"bg-teal-500/20 text-teal-300",e2e:"bg-indigo-500/20 text-indigo-300",api:"bg-cyan-500/20 text-cyan-300",performance:"bg-rose-500/20 text-rose-300",security:"bg-red-500/20 text-red-300"},xe={playwright:"bg-green-500/20 text-green-300",jest:"bg-red-500/20 text-red-300",cypress:"bg-teal-500/20 text-teal-300",mocha:"bg-amber-500/20 text-amber-300",vitest:"bg-yellow-500/20 text-yellow-300",cucumber:"bg-emerald-500/20 text-emerald-300",pytest:"bg-blue-500/20 text-blue-300",junit:"bg-orange-500/20 text-orange-300",testng:"bg-violet-500/20 text-violet-300",nunit:"bg-purple-500/20 text-purple-300",xunit:"bg-indigo-500/20 text-indigo-300",mstest:"bg-sky-500/20 text-sky-300",tunit:"bg-violet-500/20 text-violet-300",rspec:"bg-rose-500/20 text-rose-300",robot:"bg-cyan-500/20 text-cyan-300",xctest:"bg-slate-500/20 text-slate-300",unknown:"bg-gray-500/20 text-gray-300"},G={synced:"bg-emerald-500",script_updated:"bg-amber-500",script_missing:"bg-red-500",case_updated:"bg-blue-500"};function is(t){if(!t)return"Never";const i=Date.now()-t,o=Math.floor(i/6e4);if(o<1)return"Just now";if(o<60)return`${o}m ago`;const j=Math.floor(o/60);return j<24?`${j}h ago`:`${Math.floor(j/24)}d ago`}function ye(t){return t.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function je(t,i=40){if(t.length<=i)return t;const o=t.split("/");return o.length<=2?"..."+t.slice(-i):o[0]+"/.../"+o.slice(-2).join("/")}const ee=t=>{var i;return((i=t==null?void 0:t.mapping)==null?void 0:i.syncStatus)||(t==null?void 0:t.syncStatus)||"synced"};function ls({status:t}){const i={synced:{icon:q,label:"Synced",color:"text-emerald-400 bg-emerald-500/15"},script_updated:{icon:me,label:"Script Updated",color:"text-amber-400 bg-amber-500/15"},script_missing:{icon:pe,label:"Script Missing",color:"text-red-400 bg-red-500/15"},case_updated:{icon:H,label:"Case Updated",color:"text-blue-400 bg-blue-500/15"},not_mapped:{icon:as,label:"Not Mapped",color:"text-gray-400 bg-gray-500/15"}},o=i[t]||i.not_mapped,j=o.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${o.color}`,children:[e.jsx(j,{size:12}),o.label]})}function se({priority:t}){const i=rs[t]||"bg-gray-500/20 text-gray-300";return e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${i}`,children:ye(t)})}function cs({type:t}){const i=ns[t]||"bg-gray-500/20 text-gray-300";return e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${i}`,children:ye(t)})}function W({framework:t}){const i=xe[t]||xe.unknown;return e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${i}`,children:t})}function js(){var le;const[t,i]=Ue("tab",["dashboard","mapped","map"],"dashboard"),[o,j]=z.useState(""),[b,S]=z.useState(""),[u,C]=z.useState(""),[M,R]=z.useState(null),[$,N]=z.useState(new Set),[E,T]=z.useState(new Set),{toast:A}=Ae(),[m,n]=z.useState(null),{data:w,isLoading:v}=Fe(),{data:p,isLoading:c}=Ie(),{data:g,isLoading:s}=Be(),{data:r}=Oe(),{data:l,isLoading:f}=Ge({queryKey:["test-explorer"],queryFn:Pe}),y=qe(),h=He(),_=Ve(),L=De(),k=w||{},P=Array.isArray(p)?p:(p==null?void 0:p.testCases)||(p==null?void 0:p.mappings)||[],B=Array.isArray(g)?g:(g==null?void 0:g.testCases)||[],V=k.totalTestCases??((le=r==null?void 0:r.testCases)==null?void 0:le.length)??(r==null?void 0:r.length)??0,J=k.syncedCount??0,te=k.scriptUpdatedCount??0,ae=k.scriptMissingCount??0,re=k.caseUpdatedCount??0,D=k.mappedCount??P.length??0,Ne=k.unmappedCount??Math.max(0,V-D),ne=k.totalMappings??J+te+ae+re,ve=k.syncHealthPercentage??(ne>0?Math.round(J/ne*100):0),we=k.mappingPercentage??(V>0?Math.round(D/V*100):0),Q=z.useMemo(()=>{let a=[...P];if(o){const d=o.toLowerCase();a=a.filter(x=>{var O,ce,de;return(x.title||((O=x.testCase)==null?void 0:O.title)||"").toLowerCase().includes(d)||(x.scriptPath||((ce=x.mapping)==null?void 0:ce.scriptPath)||"").toLowerCase().includes(d)||(x.testName||((de=x.mapping)==null?void 0:de.testName)||"").toLowerCase().includes(d)})}return u&&(a=a.filter(d=>ee(d)===u)),a},[P,o,u]),ke=z.useMemo(()=>{if(!b)return B;const a=b.toLowerCase();return B.filter(d=>(d.title||"").toLowerCase().includes(a)||(d.id||"").toLowerCase().includes(a))},[B,b]);function U(a){A("success",a)}function Se(a){T(d=>{const x=new Set(d);return x.has(a)?x.delete(a):x.add(a),x})}function Ce(a){N(d=>{const x=new Set(d);return x.has(a)?x.delete(a):x.add(a),x})}function Me(){$.size===Q.length?N(new Set):N(new Set(Q.map(a=>a.testCaseId||a.id)))}function ie(a){a.length>0&&n(a)}async function $e(a){n(null);try{await h.mutateAsync(a),N(new Set),U(`Unlinked ${a.length} mapping(s)`)}catch(d){A("error",d.message||"Failed to unlink")}}async function Te(a){const d=a.testCaseId||a.id;try{await L.mutateAsync({testCaseId:d,syncStatus:"synced"}),U("Marked as synced")}catch(x){U(`Error: ${x.message||"Failed to sync"}`)}}async function Le(a,d,x){try{await y.mutateAsync([{testCaseId:a,scriptPath:d.file,testName:x.name,suite:x.suite||d.name,framework:x.framework||d.framework}]),R(null),U(`Mapped successfully to "${x.name}"`)}catch(O){U(`Error: ${O.message||"Failed to map"}`)}}async function ze(){try{await _.mutateAsync(),U("Sync check completed")}catch(a){U(`Error: ${a.message||"Sync check failed"}`)}}async function _e(){const a=Array.from($);try{for(const d of a)await L.mutateAsync({testCaseId:d,syncStatus:"synced"});N(new Set),U(`Marked ${a.length} as synced`)}catch(d){U(`Error: ${d.message||"Failed to mark synced"}`)}}const Re=[{id:"dashboard",label:"Dashboard",icon:Ke},{id:"mapped",label:"Mapped Test Cases",icon:I},{id:"map",label:"Map Test Cases",icon:H}];return e.jsxs("div",{className:"min-h-screen bg-surface-0 text-gray-200",children:[m&&e.jsx(Ee,{open:!0,title:"Remove mapping?",description:`Remove the script mapping for ${m.length} test case${m.length===1?"":"s"}? This unlinks the script — it doesn't delete the test case or the script.`,confirmLabel:"Remove",onConfirm:()=>$e(m),onCancel:()=>n(null)}),e.jsx("div",{className:"border-b border-white/5 bg-surface-1",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-6",children:[e.jsxs("h1",{className:"text-2xl font-bold text-gray-100 flex items-center gap-3",children:[e.jsx(H,{size:24,className:"text-brand-300"}),"Script Mapping & Sync"]}),e.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Link test cases to automation scripts and monitor sync health"})]})}),e.jsx("div",{className:"border-b border-white/5 bg-surface-1",children:e.jsx("div",{className:"max-w-[1400px] mx-auto px-6 flex gap-1",children:Re.map(a=>{const d=a.icon,x=t===a.id;return e.jsxs("button",{onClick:()=>i(a.id),className:`flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors ${x?"border-brand-400 text-brand-300":"border-transparent text-gray-400 hover:text-gray-200 hover:border-white/10"}`,children:[e.jsx(d,{size:14}),a.label]},a.id)})})}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8",children:[t==="dashboard"&&e.jsx(ds,{totalTestCases:V,totalMapped:D,totalUnmapped:Ne,mappingPercentage:we,syncHealth:ve,syncedCount:J,scriptUpdatedCount:te,scriptMissingCount:ae,caseUpdatedCount:re,isLoading:v,onCheckSync:ze,checkSyncPending:_.isPending,onGoToMap:()=>i("mapped"),onGoToUnmapped:()=>i("map"),mappedItems:P}),t==="mapped"&&e.jsx(os,{items:Q,isLoading:c,searchMapped:o,setSearchMapped:j,syncStatusFilter:u,setSyncStatusFilter:C,selectedMappedIds:$,toggleMappedSelection:Ce,selectAllMapped:Me,totalMapped:D,onUnlink:a=>ie([a.testCaseId||a.id]),onResync:Te,onBulkUnlink:()=>ie(Array.from($)),onBulkMarkSynced:_e,onViewScript:(a,d)=>{const x=a.replace(/\\/g,"/"),O=`/tests?file=${encodeURIComponent(x)}&test=${encodeURIComponent(d)}`;window.open(O,"_blank","noopener")}}),t==="map"&&e.jsx(xs,{unmapped:ke,unmappedLoading:s,searchUnmapped:b,setSearchUnmapped:S,selectedTestCaseId:M,setSelectedTestCaseId:R,explorerData:l,explorerLoading:f,expandedSuites:E,toggleSuiteExpand:Se,onMap:Le,mappingPending:y.isPending,mappedScripts:P})]})]})}function ds({totalTestCases:t,totalMapped:i,totalUnmapped:o,mappingPercentage:j,syncHealth:b,syncedCount:S,scriptUpdatedCount:u,scriptMissingCount:C,caseUpdatedCount:M,isLoading:R,onCheckSync:$,checkSyncPending:N,onGoToMap:E,onGoToUnmapped:T,mappedItems:A}){const[m,n]=z.useState(null),w=j??(t>0?Math.round(i/t*100):0),v=S+u+C+M,p={synced:[],script_updated:[],script_missing:[],case_updated:[]};for(const c of A){const g=ee(c);p[g]&&p[g].push(c)}return R?e.jsxs("div",{className:"flex items-center justify-center py-20",children:[e.jsx(F,{className:"w-6 h-6 text-brand-400 animate-spin"}),e.jsx("span",{className:"ml-2 text-gray-400",children:"Loading dashboard..."})]}):e.jsxs("div",{className:"space-y-6 max-w-6xl",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsx("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/15 flex items-center justify-center",children:e.jsx(Z,{className:"w-5 h-5 text-blue-400"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-gray-100",children:t}),e.jsx("div",{className:"text-xs text-gray-400",children:"Total Test Cases"})]})]})}),e.jsx("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-500/15 flex items-center justify-center",children:e.jsx(I,{className:"w-5 h-5 text-emerald-400"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-100",children:[i,e.jsxs("span",{className:"text-sm font-normal text-emerald-400 ml-1.5",children:[w,"%"]})]}),e.jsx("div",{className:"text-xs text-gray-400",children:"Mapped"})]})]})}),e.jsx("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-500/15 flex items-center justify-center",children:e.jsx(Y,{className:"w-5 h-5 text-amber-400"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-gray-100",children:o}),e.jsx("div",{className:"text-xs text-gray-400",children:"Unmapped"})]})]})}),e.jsx("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-500/15 flex items-center justify-center",children:e.jsx(Ye,{className:"w-5 h-5 text-cyan-400"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-100",children:[b,e.jsx("span",{className:"text-sm font-normal text-cyan-400 ml-0.5",children:"%"})]}),e.jsx("div",{className:"text-xs text-gray-400",children:"Sync Health"})]})]})})]}),e.jsxs("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-5",children:[e.jsxs("h3",{className:"text-sm font-medium text-gray-200 mb-4 flex items-center gap-2",children:[e.jsx(Je,{className:"w-4 h-4 text-brand-400"}),"Sync Status Breakdown"]}),v>0?e.jsxs("div",{className:"w-full h-3 rounded-full bg-surface-2 overflow-hidden flex mb-4",children:[S>0&&e.jsx("div",{className:`${G.synced} h-full transition-all`,style:{width:`${S/v*100}%`},title:`Synced: ${S}`}),u>0&&e.jsx("div",{className:`${G.script_updated} h-full transition-all`,style:{width:`${u/v*100}%`},title:`Script Updated: ${u}`}),C>0&&e.jsx("div",{className:`${G.script_missing} h-full transition-all`,style:{width:`${C/v*100}%`},title:`Script Missing: ${C}`}),M>0&&e.jsx("div",{className:`${G.case_updated} h-full transition-all`,style:{width:`${M/v*100}%`},title:`Case Updated: ${M}`})]}):e.jsx("div",{className:"w-full h-3 rounded-full bg-surface-2 mb-4"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{key:"synced",label:"Synced",count:S,icon:q,color:"text-emerald-400",desc:"Test case and script file are in sync. No action needed."},{key:"script_updated",label:"Script Updated",count:u,icon:me,color:"text-amber-400",desc:"The automation script file was modified on disk after mapping. Review the test case to ensure it still matches the script."},{key:"script_missing",label:"Script Missing",count:C,icon:pe,color:"text-red-400",desc:"The mapped script file was deleted or moved. Re-map the test case to a valid script file."},{key:"case_updated",label:"Case Updated",count:M,icon:H,color:"text-blue-400",desc:"The test case was edited after mapping. The automation script may need to be updated to reflect the changes."}].map(c=>{const g=c.icon,s=m===c.key;return e.jsx("div",{className:"relative group/card",children:e.jsxs("button",{onClick:()=>n(s?null:c.key),className:`w-full bg-surface-2 rounded-lg border p-3 flex items-center gap-2 text-left transition-colors ${s?"border-brand-500/40 ring-1 ring-brand-500/20":"border-white/5 hover:border-white/10"}`,children:[e.jsx(g,{size:16,className:`${c.color} shrink-0`}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-lg font-semibold text-gray-100",children:c.count}),e.jsx("div",{className:"text-xs text-gray-400",children:c.label})]}),e.jsxs("span",{className:"relative group/info shrink-0",children:[e.jsx(Qe,{size:12,className:"text-gray-600 hover:text-gray-300 transition-colors cursor-help"}),e.jsxs("span",{className:"absolute z-20 bottom-full right-0 mb-2 w-56 px-3 py-2.5 rounded-lg bg-gray-900 border border-white/10 shadow-xl text-[11px] text-gray-300 leading-relaxed opacity-0 invisible group-hover/info:opacity-100 group-hover/info:visible transition-all pointer-events-none",children:[e.jsxs("span",{className:"font-medium text-gray-100 mb-1 flex items-center gap-1.5",children:[e.jsx(g,{size:11,className:c.color})," ",c.label]}),c.desc,e.jsx("span",{className:"absolute top-full right-4 -mt-px w-2 h-2 bg-gray-900 border-r border-b border-white/10 rotate-45"})]})]})]})},c.key)})}),m&&p[m]&&e.jsxs("div",{className:"mt-4 bg-surface-2 rounded-lg border border-white/5 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-white/5 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:m==="synced"?"Synced Mappings":m==="script_updated"?"Scripts Changed on Disk":m==="script_missing"?"Missing Script Files":"Test Cases Updated After Mapping"}),e.jsxs("span",{className:"text-xs text-gray-500",children:[p[m].length," item",p[m].length!==1?"s":""]})]}),p[m].length===0?e.jsx("div",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No items in this category"}):e.jsx("div",{className:"divide-y divide-white/5 max-h-[300px] overflow-y-auto",children:p[m].map((c,g)=>{const s=c,r=c.mapping||{},l=r.scriptPath||c.scriptPath||"",f=r.testName||c.testName||"",y=s.title||s.name||"Untitled",h=r.lastSynced||r.last_synced;return e.jsx("div",{className:"px-4 py-3 hover:bg-white/[0.02] transition-colors",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Z,{size:12,className:"text-brand-400 shrink-0"}),e.jsx("span",{className:"text-sm text-gray-200 font-medium truncate",children:y}),s.priority&&e.jsx(se,{priority:s.priority})]}),e.jsxs("div",{className:"flex items-center gap-2 ml-5",children:[e.jsx(Xe,{size:10,className:"text-gray-600 shrink-0"}),e.jsx(he,{size:11,className:"text-gray-500 shrink-0"}),e.jsx("span",{className:"text-xs font-mono text-gray-400 truncate",children:l||"No script path"}),f&&e.jsx("span",{className:"text-[10px] text-gray-500 bg-surface-1 px-1.5 py-0.5 rounded shrink-0",title:f,children:K(f)})]})]}),e.jsxs("div",{className:"text-right shrink-0",children:[m==="case_updated"&&e.jsx("span",{className:"text-[10px] text-blue-400",children:"Test case was modified after last sync"}),m==="script_updated"&&e.jsx("span",{className:"text-[10px] text-amber-400",children:"Script file changed on disk"}),m==="script_missing"&&e.jsxs("span",{className:"text-[10px] text-red-400",children:["File not found: ",l.split("/").pop()]}),h&&e.jsxs("div",{className:"text-[10px] text-gray-500 mt-0.5",children:["Last synced: ",new Date(h).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})]})]})]})},c.id||g)})})]})]}),e.jsxs("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-5",children:[e.jsxs("h3",{className:"text-sm font-medium text-gray-200 mb-3 flex items-center gap-2",children:[e.jsx(Ze,{className:"w-4 h-4 text-brand-400"}),"Quick Actions"]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs("button",{onClick:$,disabled:N,className:"inline-flex items-center gap-2 bg-brand-600 hover:bg-brand-500 text-white rounded-lg px-4 py-2 text-sm font-medium transition-colors disabled:opacity-50",children:[N?e.jsx(F,{size:16,className:"animate-spin"}):e.jsx(ge,{size:16}),"Check Sync Status"]}),e.jsxs("button",{onClick:E,className:"inline-flex items-center gap-2 bg-surface-2 hover:bg-surface-1 text-gray-300 rounded-lg px-4 py-2 text-sm font-medium transition-colors border border-white/5",children:[e.jsx(I,{size:16}),"View Mapped Test Cases"]}),e.jsxs("button",{onClick:T,className:"inline-flex items-center gap-2 bg-surface-2 hover:bg-surface-1 text-gray-300 rounded-lg px-4 py-2 text-sm font-medium transition-colors border border-white/5",children:[e.jsx(Y,{size:16}),"View Unmapped Test Cases"]})]})]})]})}function os({items:t,isLoading:i,searchMapped:o,setSearchMapped:j,syncStatusFilter:b,setSyncStatusFilter:S,selectedMappedIds:u,toggleMappedSelection:C,selectAllMapped:M,totalMapped:R,onUnlink:$,onResync:N,onBulkUnlink:E,onBulkMarkSynced:T,onViewScript:A}){const m=t.length>0&&u.size===t.length;return e.jsxs("div",{className:"space-y-4 max-w-full",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{className:"w-4 h-4 text-emerald-400"}),e.jsxs("span",{className:"text-sm font-medium text-gray-200",children:[R," mapped test case",R!==1?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ue,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400"}),e.jsx("input",{type:"text",value:o,onChange:n=>j(n.target.value),placeholder:"Search mapped cases...",className:"bg-surface-2 border border-white/10 rounded-lg pl-8 pr-3 py-1.5 text-sm text-gray-200 placeholder-gray-500 focus:outline-none focus:border-brand-500/50 w-56"}),o&&e.jsx("button",{onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-200",children:e.jsx(be,{size:12})})]}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none"}),e.jsxs("select",{value:b,onChange:n=>S(n.target.value),className:"appearance-none bg-surface-2 border border-white/10 rounded-lg pl-8 pr-8 py-1.5 text-sm text-gray-200 focus:outline-none focus:border-brand-500/50 cursor-pointer",children:[e.jsx("option",{value:"",children:"All Statuses"}),e.jsx("option",{value:"synced",children:"Synced"}),e.jsx("option",{value:"script_updated",children:"Script Updated"}),e.jsx("option",{value:"script_missing",children:"Script Missing"}),e.jsx("option",{value:"case_updated",children:"Case Updated"})]}),e.jsx(fe,{size:14,className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none"})]})]})]}),u.size>0&&e.jsxs("div",{className:"bg-brand-500/10 border border-brand-500/20 rounded-lg px-4 py-2.5 flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-brand-300 font-medium",children:[u.size," selected"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:E,className:"inline-flex items-center gap-1.5 bg-red-500/15 hover:bg-red-500/25 text-red-300 rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:[e.jsx(Y,{size:12}),"Unlink Selected"]}),e.jsxs("button",{onClick:T,className:"inline-flex items-center gap-1.5 bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-300 rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:[e.jsx(X,{size:12}),"Mark Synced"]})]})]}),i?e.jsxs("div",{className:"flex items-center justify-center py-16",children:[e.jsx(F,{className:"w-5 h-5 text-brand-400 animate-spin"}),e.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:"Loading mapped cases..."})]}):t.length===0?e.jsxs("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-12 text-center",children:[e.jsx(I,{className:"w-8 h-8 text-gray-500 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-400",children:o||b?"No mapped test cases match your filters.":'No mapped test cases yet. Go to "Map Test Cases" to create mappings.'})]}):e.jsx("div",{className:"bg-surface-1 rounded-xl border border-white/5 overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/5 text-gray-400 text-xs uppercase tracking-wider",children:[e.jsx("th",{className:"px-3 py-3 text-left w-10",children:e.jsx("button",{onClick:M,className:"w-4 h-4 rounded border border-white/20 flex items-center justify-center hover:border-brand-400 transition-colors",children:m&&e.jsx(X,{size:10,className:"text-brand-400"})})}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Test Case"}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Priority"}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Script Path"}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Test Name"}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Framework"}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Sync Status"}),e.jsx("th",{className:"px-3 py-3 text-left",children:"Last Synced"}),e.jsx("th",{className:"px-3 py-3 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-white/5",children:t.map(n=>{var y,h,_,L,k,P;const w=n.testCaseId||n.id,v=u.has(w),p=n.title||((y=n.testCase)==null?void 0:y.title)||"Untitled",c=n.priority||((h=n.testCase)==null?void 0:h.priority)||"medium",g=n.scriptPath||((_=n.mapping)==null?void 0:_.scriptPath)||"",s=n.testName||((L=n.mapping)==null?void 0:L.testName)||"",r=n.framework||((k=n.mapping)==null?void 0:k.framework)||"",l=ee(n),f=n.lastSynced||((P=n.mapping)==null?void 0:P.lastSynced)||null;return e.jsxs("tr",{className:`hover:bg-surface-2/50 transition-colors ${v?"bg-brand-500/5":""}`,children:[e.jsx("td",{className:"px-3 py-3",children:e.jsx("button",{onClick:()=>C(w),className:`w-4 h-4 rounded border flex items-center justify-center transition-colors ${v?"bg-brand-600 border-brand-500":"border-white/20 hover:border-brand-400"}`,children:v&&e.jsx(X,{size:10,className:"text-white"})})}),e.jsx("td",{className:"px-3 py-3 align-top",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-xs font-mono text-brand-300 shrink-0 mt-0.5",children:w}),e.jsx("span",{className:"text-gray-200 font-medium break-words",children:p})]})}),e.jsx("td",{className:"px-3 py-3",children:e.jsx(se,{priority:c})}),e.jsx("td",{className:"px-3 py-3",children:e.jsx("span",{className:"text-gray-300 text-xs font-mono cursor-help",title:g,children:je(g)})}),e.jsx("td",{className:"px-3 py-3",children:e.jsx("span",{className:"text-gray-300 text-xs",title:s,children:K(s)})}),e.jsx("td",{className:"px-3 py-3",children:r&&e.jsx(W,{framework:r})}),e.jsx("td",{className:"px-3 py-3",children:e.jsx(ls,{status:l})}),e.jsx("td",{className:"px-3 py-3",children:e.jsx("span",{className:"text-gray-400 text-xs",children:is(f)})}),e.jsx("td",{className:"px-3 py-3",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx("button",{onClick:()=>N(n),className:"p-1.5 rounded-md hover:bg-surface-2 text-gray-400 hover:text-blue-400 transition-colors",title:"Re-sync",children:e.jsx(ge,{size:14})}),e.jsx("button",{onClick:()=>$(n),className:"p-1.5 rounded-md hover:bg-surface-2 text-gray-400 hover:text-red-400 transition-colors",title:"Unlink",children:e.jsx(Y,{size:14})}),g&&e.jsx("button",{onClick:()=>{var B;return A(g,((B=n.mapping)==null?void 0:B.testName)||n.testName||"")},className:"p-1.5 rounded-md hover:bg-surface-2 text-gray-400 hover:text-brand-400 transition-colors",title:"View Script (new tab)",children:e.jsx(es,{size:14})})]})})]},w)})})]})})})]})}function xs({unmapped:t,unmappedLoading:i,searchUnmapped:o,setSearchUnmapped:j,selectedTestCaseId:b,setSelectedTestCaseId:S,explorerData:u,explorerLoading:C,expandedSuites:M,toggleSuiteExpand:R,onMap:$,mappingPending:N,mappedScripts:E}){const[T,A]=z.useState(!1),m=new Set,n=new Set,w=new Map;E.forEach(s=>{var f,y;const r=((f=s.mapping)==null?void 0:f.scriptPath)||s.scriptPath||"",l=((y=s.mapping)==null?void 0:y.testName)||s.testName||"";r&&(m.add(`${r}::${l}`.toLowerCase()),n.add(r.toLowerCase()),w.has(r.toLowerCase())||w.set(r.toLowerCase(),new Set),w.get(r.toLowerCase()).add(l.toLowerCase()))});const v=(u==null?void 0:u.suites)||[],p=(s,r)=>{if(m.has(`${s}::${r}`.toLowerCase()))return!0;const l=w.get(s.toLowerCase());if(!l)return!1;const f=v.find(h=>{var _;return((_=h.file)==null?void 0:_.toLowerCase())===s.toLowerCase()}),y=new Set(((f==null?void 0:f.tests)||[]).map(h=>(h.name||"").toLowerCase()));for(const h of l)if(h&&!y.has(h))return!0;return!1},c=v.map(s=>{const r=(s.tests||[]).filter(l=>T||!p(s.file,l.name));return{...s,tests:r,testCount:r.length}}).filter(s=>s.tests.length>0),g=v.reduce((s,r)=>s+(r.tests||[]).filter(l=>p(r.file,l.name)).length,0);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-surface-1 rounded-xl border border-white/5 p-4 flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-brand-500/15 flex items-center justify-center shrink-0",children:e.jsx(H,{className:"w-4 h-4 text-brand-400"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-200",children:"Map Test Cases to Scripts"}),e.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:'Select a test case on the left, then click "Map" on a script on the right to create the mapping.'})]}),e.jsx("span",{className:`text-xs px-2.5 py-1 rounded-full border ${t.length>0?"bg-amber-500/10 text-amber-300 border-amber-500/20":"bg-emerald-500/10 text-emerald-300 border-emerald-500/20"}`,children:t.length>0?`${t.length} unmapped`:"All mapped ✓"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",style:{minHeight:"60vh"},children:[e.jsxs("div",{className:"bg-surface-1 rounded-xl border border-white/5 flex flex-col overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-white/5 flex items-center justify-between shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"w-4 h-4 text-amber-400"}),e.jsx("span",{className:"text-sm font-medium text-gray-200",children:"Unmapped Test Cases"}),e.jsx("span",{className:"text-xs text-gray-500 bg-surface-2 px-2 py-0.5 rounded-full",children:t.length})]})}),e.jsx("div",{className:"px-4 py-2 border-b border-white/5 shrink-0",children:e.jsxs("div",{className:"relative",children:[e.jsx(ue,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400"}),e.jsx("input",{type:"text",value:o,onChange:s=>j(s.target.value),placeholder:"Search test cases...",className:"w-full bg-surface-2 border border-white/10 rounded-lg pl-8 pr-3 py-1.5 text-sm text-gray-200 placeholder-gray-500 focus:outline-none focus:border-brand-500/50"}),o&&e.jsx("button",{onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-200",children:e.jsx(be,{size:12})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:i?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(F,{className:"w-5 h-5 text-brand-400 animate-spin"}),e.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:"Loading..."})]}):t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[e.jsx(q,{className:"w-8 h-8 text-emerald-400 mb-2"}),e.jsx("p",{className:"text-sm text-gray-400 text-center",children:o?"No unmapped test cases match your search.":"All test cases are mapped!"})]}):e.jsx("div",{className:"divide-y divide-white/5",children:t.map(s=>{const r=s.id||s.testCaseId,l=b===r;return e.jsx("button",{onClick:()=>S(l?null:r),className:`w-full text-left px-4 py-3 transition-colors ${l?"bg-brand-500/10 border-l-2 border-l-brand-500":"hover:bg-surface-2/50 border-l-2 border-l-transparent"}`,children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-xs font-mono text-brand-300 shrink-0",children:r}),e.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",title:s.title||"Untitled",children:s.title||"Untitled"})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[e.jsx(se,{priority:s.priority||"medium"}),s.type&&e.jsx(cs,{type:s.type})]})]}),e.jsx("div",{className:`w-4 h-4 rounded-full border-2 mt-0.5 shrink-0 transition-colors ${l?"border-brand-500 bg-brand-500":"border-white/20"}`,children:l&&e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white"})})})]})},r)})})})]}),e.jsxs("div",{className:"bg-surface-1 rounded-xl border border-white/5 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-white/5 flex items-center justify-between shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(he,{className:"w-4 h-4 text-brand-400"}),e.jsx("span",{className:"text-sm font-medium text-gray-200",children:"Available Scripts"}),c.length>0&&e.jsxs("span",{className:"text-xs text-gray-500 bg-surface-2 px-2 py-0.5 rounded-full",children:[c.reduce((s,r)=>{var l;return s+(((l=r.tests)==null?void 0:l.length)||0)},0)," available"]})]}),g>0&&e.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[e.jsx("span",{className:"text-[10px] text-gray-500",children:"Show mapped"}),e.jsx("button",{role:"switch","aria-checked":T,onClick:()=>A(!T),className:`relative inline-flex h-4 w-7 items-center rounded-full transition-colors ${T?"bg-brand-500":"bg-gray-600"}`,children:e.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full bg-white transition-transform ${T?"translate-x-3.5":"translate-x-0.5"}`})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:C?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(F,{className:"w-5 h-5 text-brand-400 animate-spin"}),e.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:"Loading scripts..."})]}):c.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[e.jsx(oe,{className:"w-8 h-8 text-gray-500 mb-2"}),e.jsx("p",{className:"text-sm text-gray-400 text-center",children:"No test scripts discovered yet."}),e.jsx("p",{className:"text-xs text-gray-500 text-center mt-1",children:"Run your test framework first so Testver can discover test suites, or use the Test Explorer to scan."})]}):e.jsx("div",{className:"divide-y divide-white/5",children:c.map((s,r)=>{const l=s.file||`suite-${r}`,f=M.has(l),y=s.tests||[];return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>R(l),className:"w-full text-left px-4 py-3 hover:bg-surface-2/50 transition-colors flex items-center gap-2",children:[f?e.jsx(fe,{size:14,className:"text-gray-400 shrink-0"}):e.jsx(ss,{size:14,className:"text-gray-400 shrink-0"}),e.jsx(oe,{size:14,className:"text-gray-400 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-gray-200 truncate",title:s.name||s.file,children:s.name?K(s.name):s.file}),e.jsx("div",{className:"text-xs text-gray-500 font-mono truncate mt-0.5",children:s.file})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx(W,{framework:s.framework||"unknown"}),e.jsxs("span",{className:"text-xs text-gray-500",children:[s.testCount||y.length," test",(s.testCount||y.length)!==1?"s":""]})]})]}),f&&y.length>0&&e.jsx("div",{className:"bg-surface-0/50",children:y.map((h,_)=>{const L=p(s.file,h.name);return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-2.5 pl-10 border-t border-white/5 transition-colors ${L?"bg-emerald-500/[0.03] opacity-60":"hover:bg-surface-2/30"}`,children:[e.jsx(ts,{size:12,className:L?"text-emerald-500 shrink-0":"text-gray-500 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:`text-sm truncate ${L?"text-gray-400":"text-gray-300"}`,title:h.name,children:K(h.name)}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(W,{framework:h.framework||s.framework||"unknown"}),e.jsx("span",{className:"text-xs text-gray-500 font-mono truncate",children:je(s.file,30)})]})]}),L&&!b?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-[10px] font-medium bg-emerald-500/15 text-emerald-400 border border-emerald-500/20 shrink-0",children:[e.jsx(q,{size:10})," Mapped"]}):L&&b?e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",children:[e.jsx(q,{size:9})," Mapped"]}),e.jsxs("button",{onClick:()=>$(b,s,h),disabled:N,className:"inline-flex items-center gap-1 bg-amber-600 hover:bg-amber-500 text-white rounded-lg px-2.5 py-1 text-[10px] font-medium transition-colors disabled:opacity-50",children:[N?e.jsx(F,{size:10,className:"animate-spin"}):e.jsx(I,{size:10}),"Map Also"]})]}):b?e.jsxs("button",{onClick:()=>$(b,s,h),disabled:N,className:"inline-flex items-center gap-1.5 bg-brand-600 hover:bg-brand-500 text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors shrink-0 disabled:opacity-50",children:[N?e.jsx(F,{size:12,className:"animate-spin"}):e.jsx(I,{size:12}),"Map"]}):e.jsx("span",{className:"text-xs text-gray-500 italic shrink-0",children:"Select a test case first"})]},`${l}-${_}`)})})]},l)})})})]})]})]})}export{js as ScriptMappingPage};
@@ -1 +1 @@
1
- import{r,j as e,b as q}from"./vendor-react-CTbHBddL.js";import{J as E,a0 as F,y as G,R as J,v as K,W as Q,ag as V}from"./vendor-icons-BKPiFyYV.js";const ee="No devices connected. Start an emulator or simulator in Settings → Connectors → Local Devices, or plug in a phone.";function te({devices:s,selectedId:o,onSelect:g,loading:i,disabled:b,onRefresh:a,placeholder:d="Select a device…",errorText:l,variant:x="runner",emptyText:O="No devices available for this provider."}){const[c,u]=r.useState(!1),[m,k]=r.useState(""),[Y,U]=r.useState(!1),[f,_]=r.useState(null),j=r.useRef(null),v=r.useRef(null),L=r.useRef(null);r.useEffect(()=>{c?setTimeout(()=>{var t;return(t=L.current)==null?void 0:t.focus()},30):k("")},[c]);const S=()=>{if(!v.current)return;const t=v.current.getBoundingClientRect(),p=384,n=window.innerHeight-t.bottom,D=t.top,P=n<p+16&&D>n;U(P),_({left:t.left,width:t.width,...P?{bottom:window.innerHeight-t.top+4}:{top:t.bottom+4}})},A=()=>{b||(c||S(),u(t=>!t))};r.useLayoutEffect(()=>{if(!c)return;const t=()=>S();return window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[c]),r.useEffect(()=>{if(!c)return;const t=p=>{j.current&&!j.current.contains(p.target)&&u(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[c]);const h=r.useMemo(()=>s.find(t=>t.id===o)||null,[s,o]),{realMatches:N,simMatches:C}=r.useMemo(()=>{const t=m.trim().toLowerCase(),p=t?s.filter(n=>[n.name,n.os,n.manufacturer,n.platform].filter(Boolean).join(" ").toLowerCase().includes(t)):s;return{realMatches:p.filter(n=>n.realMobile),simMatches:p.filter(n=>!n.realMobile)}},[s,m]),y=N.length+C.length,B=x==="compact"?"h-8 px-2.5 text-xs gap-1.5 rounded-lg":"h-[42px] px-3 text-[15px] gap-2 rounded-lg",R="bg-white dark:bg-white/[0.04] border border-gray-200 dark:border-white/10",z="hover:border-gray-300 dark:hover:border-white/20",T="text-gray-800 dark:text-gray-200",w="text-gray-500",W=x==="compact"?"bg-white dark:bg-surface-1 border border-gray-200 dark:border-white/10 shadow-xl":"bg-surface-1 border border-white/10 shadow-xl shadow-black/40";return e.jsxs("div",{ref:j,className:"relative w-full min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1 min-w-0",children:[e.jsxs("button",{ref:v,type:"button",disabled:b,onClick:A,className:`${B} ${R} ${z} flex-1 min-w-0 flex items-center justify-between text-left transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,title:h?$(h):d,children:[e.jsxs("span",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[e.jsx(E,{size:x==="compact"?11:12,className:`${w} flex-shrink-0`}),e.jsx("span",{className:`${T} truncate min-w-0 flex-1`,title:h?$(h):void 0,children:i?"Loading devices…":h?$(h):e.jsx("span",{className:w,children:d})})]}),i?e.jsx(F,{size:x==="compact"?11:12,className:`${w} animate-spin flex-shrink-0`}):e.jsx(G,{size:x==="compact"?11:12,className:`${w} flex-shrink-0 transition-transform ${c?"rotate-180":""}`})]}),a&&e.jsx("button",{type:"button",onClick:a,disabled:i||b,title:"Refresh device list",className:`${x==="compact"?"h-8 w-8 rounded-lg":"h-[42px] w-[42px] rounded-lg"} ${R} ${z} flex-shrink-0 flex items-center justify-center text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-40 transition-colors`,children:e.jsx(J,{size:x==="compact"?12:13,className:i?"animate-spin":""})})]}),c&&f&&q.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-[60]",onClick:()=>u(!1)}),e.jsxs("div",{style:{position:"fixed",left:Math.max(8,Math.min(f.left,window.innerWidth-272-8)),width:x==="compact"?Math.max(f.width,272):f.width,top:f.top,bottom:f.bottom},className:`z-[70] ${W} rounded-lg flex flex-col overflow-hidden max-h-96`,onMouseDown:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"px-2 py-2 border-b border-gray-200 dark:border-white/5 flex items-center gap-1.5 bg-white dark:bg-surface-1 sticky top-0",children:[e.jsx(K,{size:12,className:"text-gray-500 flex-shrink-0 ml-1"}),e.jsx("input",{ref:L,type:"text",value:m,onChange:t=>k(t.target.value),placeholder:"Search by name, OS, manufacturer…",className:"flex-1 bg-transparent border-0 outline-none text-xs text-gray-800 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-600",onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),u(!1))}}),m&&e.jsx("button",{type:"button",onClick:()=>k(""),className:"text-[10px] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 px-1.5",children:"Clear"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto py-1",children:[l&&e.jsx("div",{className:"px-3 py-2 text-xs text-red-300",children:l}),!l&&i&&s.length===0&&e.jsxs("div",{className:"flex items-center justify-center gap-1.5 px-3 py-4 text-xs text-gray-500",children:[e.jsx(F,{size:11,className:"animate-spin"}),"Fetching devices…"]}),!l&&!i&&y===0&&e.jsx("div",{className:"px-3 py-4 text-xs text-gray-500 text-center",children:m?e.jsxs(e.Fragment,{children:["No devices match ",e.jsxs("span",{className:"text-gray-300",children:["“",m,"”"]})]}):O}),N.length>0&&e.jsx(H,{title:"Real devices",icon:e.jsx(Q,{size:9,className:"text-emerald-400/80"}),devices:N,selectedId:o,onPick:t=>{g(t),u(!1)}}),C.length>0&&e.jsx(H,{title:"Emulators / Simulators",icon:e.jsx(E,{size:9,className:"text-gray-500"}),devices:C,selectedId:o,onPick:t=>{g(t),u(!1)}})]}),!i&&y>0&&e.jsx("div",{className:"px-3 py-1.5 border-t border-gray-200 dark:border-white/5 text-[10px] text-gray-500 bg-white dark:bg-surface-1",children:m?e.jsxs(e.Fragment,{children:[y," match",y===1?"":"es"," of ",s.length," devices"]}):e.jsxs(e.Fragment,{children:[s.length," device",s.length===1?"":"s"]})})]})]}),document.body)]})}function H({title:s,icon:o,devices:g,selectedId:i,onPick:b}){return e.jsxs("div",{children:[e.jsxs("div",{className:"px-3 pt-1.5 pb-0.5 flex items-center gap-1 text-[10px] uppercase tracking-wider text-gray-500 dark:text-gray-500 font-semibold",children:[o," ",s,e.jsx("span",{className:"ml-auto text-gray-400 dark:text-gray-600 normal-case font-normal",children:g.length})]}),g.map(a=>{const d=a.id===i,l=!!a.unavailableReason;return e.jsxs("button",{type:"button",disabled:l,onClick:()=>b(a),title:l?`${a.name} — ${a.unavailableReason}`:`${a.name} · ${M(a)}${a.manufacturer?" · "+a.manufacturer:""}${a.realMobile?" · real device":" · emulator/simulator"}`,className:`w-full text-left px-3 py-1.5 flex items-center gap-2 text-xs transition-colors ${l?"text-gray-400 dark:text-gray-600 cursor-not-allowed":d?"bg-indigo-50 dark:bg-indigo-500/15 text-indigo-700 dark:text-indigo-100":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-white/5"}`,children:[e.jsx(E,{size:11,className:d?"text-indigo-500 dark:text-indigo-300 flex-shrink-0":"text-gray-400 dark:text-gray-500 flex-shrink-0"}),e.jsxs("span",{className:"flex-1 truncate",children:[e.jsx("span",{className:"font-medium",children:a.name}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-500",children:[" · ",M(a)]}),l?e.jsxs("span",{className:"text-amber-600 dark:text-amber-400 ml-1",children:["· ",a.unavailableReason]}):a.manufacturer&&a.manufacturer!==a.name.split(" ")[0]&&e.jsxs("span",{className:"text-gray-400 dark:text-gray-600 ml-1",children:["· ",a.manufacturer]})]}),d&&e.jsx(V,{size:11,className:"text-indigo-500 dark:text-indigo-300 flex-shrink-0"})]},a.id)})]})}function $(s){return`${s.name} · ${M(s)}${s.realMobile?"":" · sim"}`}function M(s){const o=s.platform==="ios"?"iOS":X(s.platform);return/^\d/.test(s.os)?`${o} ${s.os}`:o}function X(s){return s&&s.charAt(0).toUpperCase()+s.slice(1)}export{ee as L,te as S};
1
+ import{r,j as e,d as q}from"./vendor-react-DOVfxdUy.js";import{K as E,a1 as F,z as G,R as K,w as Q,W as V,ah as X}from"./vendor-icons-Cm92aSc5.js";const ee="No devices connected. Start an emulator or simulator in Settings → Connectors → Local Devices, or plug in a phone.";function te({devices:s,selectedId:o,onSelect:g,loading:i,disabled:b,onRefresh:a,placeholder:d="Select a device…",errorText:l,variant:x="runner",emptyText:O="No devices available for this provider."}){const[c,u]=r.useState(!1),[m,k]=r.useState(""),[J,U]=r.useState(!1),[f,_]=r.useState(null),j=r.useRef(null),v=r.useRef(null),L=r.useRef(null);r.useEffect(()=>{c?setTimeout(()=>{var t;return(t=L.current)==null?void 0:t.focus()},30):k("")},[c]);const S=()=>{if(!v.current)return;const t=v.current.getBoundingClientRect(),p=384,n=window.innerHeight-t.bottom,D=t.top,P=n<p+16&&D>n;U(P),_({left:t.left,width:t.width,...P?{bottom:window.innerHeight-t.top+4}:{top:t.bottom+4}})},A=()=>{b||(c||S(),u(t=>!t))};r.useLayoutEffect(()=>{if(!c)return;const t=()=>S();return window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[c]),r.useEffect(()=>{if(!c)return;const t=p=>{j.current&&!j.current.contains(p.target)&&u(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[c]);const h=r.useMemo(()=>s.find(t=>t.id===o)||null,[s,o]),{realMatches:N,simMatches:C}=r.useMemo(()=>{const t=m.trim().toLowerCase(),p=t?s.filter(n=>[n.name,n.os,n.manufacturer,n.platform].filter(Boolean).join(" ").toLowerCase().includes(t)):s;return{realMatches:p.filter(n=>n.realMobile),simMatches:p.filter(n=>!n.realMobile)}},[s,m]),y=N.length+C.length,B=x==="compact"?"h-8 px-2.5 text-xs gap-1.5 rounded-lg":"h-[42px] px-3 text-[15px] gap-2 rounded-lg",z="bg-white dark:bg-white/[0.04] border border-gray-200 dark:border-white/10",R="hover:border-gray-300 dark:hover:border-white/20",T="text-gray-800 dark:text-gray-200",w="text-gray-500",W=x==="compact"?"bg-white dark:bg-surface-1 border border-gray-200 dark:border-white/10 shadow-xl":"bg-surface-1 border border-white/10 shadow-xl shadow-black/40";return e.jsxs("div",{ref:j,className:"relative w-full min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1 min-w-0",children:[e.jsxs("button",{ref:v,type:"button",disabled:b,onClick:A,className:`${B} ${z} ${R} flex-1 min-w-0 flex items-center justify-between text-left transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,title:h?$(h):d,children:[e.jsxs("span",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[e.jsx(E,{size:x==="compact"?11:12,className:`${w} flex-shrink-0`}),e.jsx("span",{className:`${T} truncate min-w-0 flex-1`,title:h?$(h):void 0,children:i?"Loading devices…":h?$(h):e.jsx("span",{className:w,children:d})})]}),i?e.jsx(F,{size:x==="compact"?11:12,className:`${w} animate-spin flex-shrink-0`}):e.jsx(G,{size:x==="compact"?11:12,className:`${w} flex-shrink-0 transition-transform ${c?"rotate-180":""}`})]}),a&&e.jsx("button",{type:"button",onClick:a,disabled:i||b,title:"Refresh device list",className:`${x==="compact"?"h-8 w-8 rounded-lg":"h-[42px] w-[42px] rounded-lg"} ${z} ${R} flex-shrink-0 flex items-center justify-center text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-40 transition-colors`,children:e.jsx(K,{size:x==="compact"?12:13,className:i?"animate-spin":""})})]}),c&&f&&q.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-[60]",onClick:()=>u(!1)}),e.jsxs("div",{style:{position:"fixed",left:Math.max(8,Math.min(f.left,window.innerWidth-272-8)),width:x==="compact"?Math.max(f.width,272):f.width,top:f.top,bottom:f.bottom},className:`z-[70] ${W} rounded-lg flex flex-col overflow-hidden max-h-96`,onMouseDown:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"px-2 py-2 border-b border-gray-200 dark:border-white/5 flex items-center gap-1.5 bg-white dark:bg-surface-1 sticky top-0",children:[e.jsx(Q,{size:12,className:"text-gray-500 flex-shrink-0 ml-1"}),e.jsx("input",{ref:L,type:"text",value:m,onChange:t=>k(t.target.value),placeholder:"Search by name, OS, manufacturer…",className:"flex-1 bg-transparent border-0 outline-none text-xs text-gray-800 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-600",onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),u(!1))}}),m&&e.jsx("button",{type:"button",onClick:()=>k(""),className:"text-[10px] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 px-1.5",children:"Clear"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto py-1",children:[l&&e.jsx("div",{className:"px-3 py-2 text-xs text-red-300",children:l}),!l&&i&&s.length===0&&e.jsxs("div",{className:"flex items-center justify-center gap-1.5 px-3 py-4 text-xs text-gray-500",children:[e.jsx(F,{size:11,className:"animate-spin"}),"Fetching devices…"]}),!l&&!i&&y===0&&e.jsx("div",{className:"px-3 py-4 text-xs text-gray-500 text-center",children:m?e.jsxs(e.Fragment,{children:["No devices match ",e.jsxs("span",{className:"text-gray-300",children:["“",m,"”"]})]}):O}),N.length>0&&e.jsx(H,{title:"Real devices",icon:e.jsx(V,{size:9,className:"text-emerald-400/80"}),devices:N,selectedId:o,onPick:t=>{g(t),u(!1)}}),C.length>0&&e.jsx(H,{title:"Emulators / Simulators",icon:e.jsx(E,{size:9,className:"text-gray-500"}),devices:C,selectedId:o,onPick:t=>{g(t),u(!1)}})]}),!i&&y>0&&e.jsx("div",{className:"px-3 py-1.5 border-t border-gray-200 dark:border-white/5 text-[10px] text-gray-500 bg-white dark:bg-surface-1",children:m?e.jsxs(e.Fragment,{children:[y," match",y===1?"":"es"," of ",s.length," devices"]}):e.jsxs(e.Fragment,{children:[s.length," device",s.length===1?"":"s"]})})]})]}),document.body)]})}function H({title:s,icon:o,devices:g,selectedId:i,onPick:b}){return e.jsxs("div",{children:[e.jsxs("div",{className:"px-3 pt-1.5 pb-0.5 flex items-center gap-1 text-[10px] uppercase tracking-wider text-gray-500 dark:text-gray-500 font-semibold",children:[o," ",s,e.jsx("span",{className:"ml-auto text-gray-400 dark:text-gray-600 normal-case font-normal",children:g.length})]}),g.map(a=>{const d=a.id===i,l=!!a.unavailableReason;return e.jsxs("button",{type:"button",disabled:l,onClick:()=>b(a),title:l?`${a.name} — ${a.unavailableReason}`:`${a.name} · ${M(a)}${a.manufacturer?" · "+a.manufacturer:""}${a.realMobile?" · real device":" · emulator/simulator"}`,className:`w-full text-left px-3 py-1.5 flex items-center gap-2 text-xs transition-colors ${l?"text-gray-400 dark:text-gray-600 cursor-not-allowed":d?"bg-indigo-50 dark:bg-indigo-500/15 text-indigo-700 dark:text-indigo-100":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-white/5"}`,children:[e.jsx(E,{size:11,className:d?"text-indigo-500 dark:text-indigo-300 flex-shrink-0":"text-gray-400 dark:text-gray-500 flex-shrink-0"}),e.jsxs("span",{className:"flex-1 truncate",children:[e.jsx("span",{className:"font-medium",children:a.name}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-500",children:[" · ",M(a)]}),l?e.jsxs("span",{className:"text-amber-600 dark:text-amber-400 ml-1",children:["· ",a.unavailableReason]}):a.manufacturer&&a.manufacturer!==a.name.split(" ")[0]&&e.jsxs("span",{className:"text-gray-400 dark:text-gray-600 ml-1",children:["· ",a.manufacturer]})]}),d&&e.jsx(X,{size:11,className:"text-indigo-500 dark:text-indigo-300 flex-shrink-0"})]},a.id)})]})}function $(s){return`${s.name} · ${M(s)}${s.realMobile?"":" · sim"}`}function M(s){const o=s.platform==="ios"?"iOS":Y(s.platform);return/^\d/.test(s.os)?`${o} ${s.os}`:o}function Y(s){return s&&s.charAt(0).toUpperCase()+s.slice(1)}export{ee as L,te as S};