@piwitests/server 0.22.1 → 0.23.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 (342) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{B_mN5eMV.js → 2yLW7WU0.js} +1 -1
  3. package/.output/public/_nuxt/{DK7xciFW.js → 499RbBSX.js} +1 -1
  4. package/.output/public/_nuxt/{CJEp4i0N.js → 5QBnDbs_.js} +1 -1
  5. package/.output/public/_nuxt/{cSeAgciy.js → 5SkLJHl8.js} +1 -1
  6. package/.output/public/_nuxt/{CrOA9onF.js → 6sA-GK37.js} +1 -1
  7. package/.output/public/_nuxt/{C0v6l4pr.js → 6vX5JdHr.js} +1 -1
  8. package/.output/public/_nuxt/{DOBSrxzY.js → 7_9fts7T.js} +1 -1
  9. package/.output/public/_nuxt/{DBhdObsO.js → 9_aJhhcm.js} +1 -1
  10. package/.output/public/_nuxt/{BtaTvcz6.js → AQ86C4c2.js} +1 -1
  11. package/.output/public/_nuxt/{HwFFbACq.js → B070fjS-.js} +1 -1
  12. package/.output/public/_nuxt/B0tmRAhY.js +1 -0
  13. package/.output/public/_nuxt/{CkKCKAYp.js → B2L0-Lzp.js} +2 -2
  14. package/.output/public/_nuxt/{BNAHBHbY.js → B3AG2m76.js} +1 -1
  15. package/.output/public/_nuxt/{BTvE9qca.js → B3G-TIoP.js} +1 -1
  16. package/.output/public/_nuxt/{B2a-Phk3.js → B4mZElvM.js} +1 -1
  17. package/.output/public/_nuxt/{2VtBYkNh.js → B7tiBVLW.js} +1 -1
  18. package/.output/public/_nuxt/{4yvOL9PC.js → BAbrtVp3.js} +1 -1
  19. package/.output/public/_nuxt/{_VzR8bwc.js → BDUfBn3i.js} +1 -1
  20. package/.output/public/_nuxt/{CZ9ThISn.js → BFYkWpPx.js} +1 -1
  21. package/.output/public/_nuxt/{BH-ym1CI.js → BM5BPKlc.js} +1 -1
  22. package/.output/public/_nuxt/{CI_q0F1O.js → BNyTWIad.js} +3 -3
  23. package/.output/public/_nuxt/{BqCiYSVY.js → BOvtXn3m.js} +1 -1
  24. package/.output/public/_nuxt/BVyjw9Bi.js +1 -0
  25. package/.output/public/_nuxt/{BhH0TNTi.js → BZFiz2UB.js} +1 -1
  26. package/.output/public/_nuxt/BZOykMLD.js +1 -0
  27. package/.output/public/_nuxt/{CWoSSKhQ.js → B_JSV0yG.js} +1 -1
  28. package/.output/public/_nuxt/{CWw9WGlv.js → B_MVJP17.js} +1 -1
  29. package/.output/public/_nuxt/{Cwwe5bRS.js → Bag08cIY.js} +1 -1
  30. package/.output/public/_nuxt/{BQzG26t0.js → Bb2mDqKr.js} +1 -1
  31. package/.output/public/_nuxt/{CobveFaj.js → BfcMJBTf.js} +1 -1
  32. package/.output/public/_nuxt/{BmJUhCIO.js → BjMo2tKC.js} +1 -1
  33. package/.output/public/_nuxt/{DOLeth7M.js → BjOFxi54.js} +1 -1
  34. package/.output/public/_nuxt/{DXXnDejN.js → Bj_v57Zu.js} +1 -1
  35. package/.output/public/_nuxt/{Hot1UcKY.js → Bq4_kqIp.js} +1 -1
  36. package/.output/public/_nuxt/{CNcu4khZ.js → Bsc11YIJ.js} +1 -1
  37. package/.output/public/_nuxt/{BlRWlfdD.js → BtZNYmZO.js} +1 -1
  38. package/.output/public/_nuxt/{x8w_1_rn.js → BuGAn4f7.js} +1 -1
  39. package/.output/public/_nuxt/{COP3KBCA.js → BwwfasRt.js} +1 -1
  40. package/.output/public/_nuxt/{BQOWm9mQ.js → C2_7XZo0.js} +1 -1
  41. package/.output/public/_nuxt/{DSvBQHzW.js → C6t4kxaa.js} +1 -1
  42. package/.output/public/_nuxt/{SBmMTKQb.js → C77tM5Hz.js} +1 -1
  43. package/.output/public/_nuxt/{DDN2tt0a.js → C9I1Dp3S.js} +1 -1
  44. package/.output/public/_nuxt/{t-juTK3X.js → CAoQUDI4.js} +1 -1
  45. package/.output/public/_nuxt/{DQnsFoJn.js → CBJFORiZ.js} +1 -1
  46. package/.output/public/_nuxt/{b_yFgp5S.js → CC8wk-N0.js} +1 -1
  47. package/.output/public/_nuxt/{D0ROfwV0.js → CEai-PWF.js} +1 -1
  48. package/.output/public/_nuxt/{BKJetfRH.js → CF_eDZHu.js} +1 -1
  49. package/.output/public/_nuxt/{Sgis3xif.js → CGDPUNcO.js} +1 -1
  50. package/.output/public/_nuxt/{6-ivqM_I.js → CIQeRUSy.js} +1 -1
  51. package/.output/public/_nuxt/{Cf52zHyB.js → CLWMETf9.js} +1 -1
  52. package/.output/public/_nuxt/{h49q_GXF.js → CNu3kken.js} +42 -42
  53. package/.output/public/_nuxt/{Bt4FLbe0.js → CPQRQqXU.js} +1 -1
  54. package/.output/public/_nuxt/{DwyFnMoY.js → CTTmX4gy.js} +1 -1
  55. package/.output/public/_nuxt/{D6Mo5HeX.js → CUOS6S13.js} +1 -1
  56. package/.output/public/_nuxt/{Bb7Uckln.js → CYhm2FBS.js} +1 -1
  57. package/.output/public/_nuxt/{DWEkQ7bl.js → CdEzDaDI.js} +1 -1
  58. package/.output/public/_nuxt/{DLNNAYfu.js → Ce47NgZw.js} +1 -1
  59. package/.output/public/_nuxt/{BFcdtAzg.js → Ce89VyHE.js} +1 -1
  60. package/.output/public/_nuxt/{PdEEuEsg.js → Ce_j5NtN.js} +1 -1
  61. package/.output/public/_nuxt/{BtSJxOdh.js → CfhOanaF.js} +1 -1
  62. package/.output/public/_nuxt/Ck_fTH5z.js +4 -0
  63. package/.output/public/_nuxt/{By5qkOq8.js → Clg2Qx0r.js} +1 -1
  64. package/.output/public/_nuxt/{B6s20NbT.js → CmTzxoQt.js} +1 -1
  65. package/.output/public/_nuxt/{9P8iHISX.js → CvVbKrcH.js} +1 -1
  66. package/.output/public/_nuxt/Cz7SCzdW.js +1 -0
  67. package/.output/public/_nuxt/{B9kt7ySS.js → D1Ucra3E.js} +1 -1
  68. package/.output/public/_nuxt/{DGyGmFem.js → D3SJGdl4.js} +1 -1
  69. package/.output/public/_nuxt/D7fxV-UA.js +1 -0
  70. package/.output/public/_nuxt/{BZnfiR67.js → D7t0Dn3h.js} +1 -1
  71. package/.output/public/_nuxt/{DtSn2Q9-.js → DAhv9aNg.js} +1 -1
  72. package/.output/public/_nuxt/{CMhK1PvI.js → DBWM_xs-.js} +1 -1
  73. package/.output/public/_nuxt/DCE2_MKD.js +2 -0
  74. package/.output/public/_nuxt/DFfqRQxk.js +1 -0
  75. package/.output/public/_nuxt/{Dj-TetcW.js → DJzFYrBt.js} +1 -1
  76. package/.output/public/_nuxt/{x8YSyy4c.js → DNKZmhbX.js} +1 -1
  77. package/.output/public/_nuxt/{CDh_Qt7h.js → DNqm5cWU.js} +1 -1
  78. package/.output/public/_nuxt/{C9p0YCAi.js → DTrPCv7R.js} +1 -1
  79. package/.output/public/_nuxt/{nANaAHCd.js → DXkFgrsT.js} +1 -1
  80. package/.output/public/_nuxt/{B0hK-xDF.js → DYjxDsYC.js} +1 -1
  81. package/.output/public/_nuxt/{D4UlSVir.js → DZ-KbUZi.js} +1 -1
  82. package/.output/public/_nuxt/{DzM9oeLa.js → DZECGgZm.js} +1 -1
  83. package/.output/public/_nuxt/{iubpj2qv.js → Dbf8eT28.js} +1 -1
  84. package/.output/public/_nuxt/{CD3R-ggS.js → DeewM3Wg.js} +1 -1
  85. package/.output/public/_nuxt/{CAZpjzvB.js → DgEa6_av.js} +1 -1
  86. package/.output/public/_nuxt/DiWxW-w3.js +2 -0
  87. package/.output/public/_nuxt/{DpalT0nH.js → DmqCquDx.js} +1 -1
  88. package/.output/public/_nuxt/{CoPntblj.js → DnxrNGE_.js} +1 -1
  89. package/.output/public/_nuxt/{Cd8r0xk5.js → DprkT7rM.js} +1 -1
  90. package/.output/public/_nuxt/{BjU3HZuS.js → DuBtaw3j.js} +1 -1
  91. package/.output/public/_nuxt/DylyATWU.js +2 -0
  92. package/.output/public/_nuxt/{CRPt9SfB.js → FJTsZ5Aa.js} +1 -1
  93. package/.output/public/_nuxt/{DHUT-BKj.js → HIGGZ_c-.js} +1 -1
  94. package/.output/public/_nuxt/{DLn-VPtK.js → HbnAkiyK.js} +1 -1
  95. package/.output/public/_nuxt/{czXrP7NB.js → LTMoFvEY.js} +1 -1
  96. package/.output/public/_nuxt/{DsX5CCb5.js → PDSNX4Te.js} +1 -1
  97. package/.output/public/_nuxt/{BfS8BZTO.js → QZYo3ErV.js} +1 -1
  98. package/.output/public/_nuxt/{kfFeu9tK.js → RkNtgoTD.js} +1 -1
  99. package/.output/public/_nuxt/Wk7ZKG4B.js +1 -0
  100. package/.output/public/_nuxt/{9N6hSApy.js → Ya8ZzWuY.js} +1 -1
  101. package/.output/public/_nuxt/{B09ddw9C.js → ZLfZolDM.js} +1 -1
  102. package/.output/public/_nuxt/{3xlGO1qT.js → a8Z6VC7V.js} +1 -1
  103. package/.output/public/_nuxt/{CCP6Tyle.js → axj2iIDK.js} +1 -1
  104. package/.output/public/_nuxt/builds/latest.json +1 -1
  105. package/.output/public/_nuxt/builds/meta/6d1766a0-0aba-46b8-9d97-7dd174130359.json +1 -0
  106. package/.output/public/_nuxt/dUPMBJ4f.js +1 -0
  107. package/.output/public/_nuxt/{DS2ANCQh.js → eT2oObCh.js} +1 -1
  108. package/.output/public/_nuxt/entry.D_eWXrnD.css +1 -0
  109. package/.output/public/_nuxt/{CkyMZI-0.js → jR2xm3_t.js} +1 -1
  110. package/.output/public/_nuxt/{BDQCwxpX.js → jxc14CqP.js} +1 -1
  111. package/.output/public/_nuxt/{Gik813Ek.js → kWnH8yJq.js} +1 -1
  112. package/.output/public/_nuxt/{BYB8NVJZ.js → mi22nGUC.js} +1 -1
  113. package/.output/public/_nuxt/{BVN50jIb.js → oSLbl-p0.js} +1 -1
  114. package/.output/public/_nuxt/{CBZD8ym8.js → pZbe82l5.js} +1 -1
  115. package/.output/public/_nuxt/roaTZkYi.js +1 -0
  116. package/.output/public/_nuxt/{BUMoU50-.js → sqqg4oXL.js} +1 -1
  117. package/.output/public/_nuxt/xZQGtnVA.js +1 -0
  118. package/.output/server/chunks/build/{Alert-DAb8nKVs.mjs → Alert-He-UxEt6.mjs} +2 -2
  119. package/.output/server/chunks/build/Alert-He-UxEt6.mjs.map +1 -0
  120. package/.output/server/chunks/build/{Breadcrumb-DJp5WvUM.mjs → Breadcrumb-DEP2dVCZ.mjs} +3 -3
  121. package/.output/server/chunks/build/Breadcrumb-DEP2dVCZ.mjs.map +1 -0
  122. package/.output/server/chunks/build/{BreadcrumbNav-BrQwfL8G.mjs → BreadcrumbNav-y6nMDYcR.mjs} +3 -3
  123. package/.output/server/chunks/build/BreadcrumbNav-y6nMDYcR.mjs.map +1 -0
  124. package/.output/server/chunks/build/{BrowserBadge-Djw_e_I9.mjs → BrowserBadge-DIASU8Gf.mjs} +6 -66
  125. package/.output/server/chunks/build/BrowserBadge-DIASU8Gf.mjs.map +1 -0
  126. package/.output/server/chunks/build/{ChartCard-B2gd_8HP.mjs → ChartCard-ZTsCvItQ.mjs} +2 -2
  127. package/.output/server/chunks/build/ChartCard-ZTsCvItQ.mjs.map +1 -0
  128. package/.output/server/chunks/build/{Checkbox-C1khEdTh.mjs → Checkbox-BisdHf8n.mjs} +6 -6
  129. package/.output/server/chunks/build/Checkbox-BisdHf8n.mjs.map +1 -0
  130. package/.output/server/chunks/build/{CodeBlock-CjnDrO3Y.mjs → CodeBlock-B8BNtZAe.mjs} +2 -2
  131. package/.output/server/chunks/build/CodeBlock-B8BNtZAe.mjs.map +1 -0
  132. package/.output/server/chunks/build/{DashboardNavbar-DYtmVlhy.mjs → DashboardNavbar-D7-3zBUU.mjs} +3 -3
  133. package/.output/server/chunks/build/DashboardNavbar-D7-3zBUU.mjs.map +1 -0
  134. package/.output/server/chunks/build/{DashboardSidebarToggle-BPNxODwj.mjs → DashboardSidebarToggle-C3HdHvlE.mjs} +2 -2
  135. package/.output/server/chunks/build/DashboardSidebarToggle-C3HdHvlE.mjs.map +1 -0
  136. package/.output/server/chunks/build/{DataLocationCard-2B-sVSMr.mjs → DataLocationCard-CC2-lHiP.mjs} +3 -3
  137. package/.output/server/chunks/build/DataLocationCard-CC2-lHiP.mjs.map +1 -0
  138. package/.output/server/chunks/build/{MetaStripGroup-BBByVvpR.mjs → DesktopRunLocallyButton-iNzrDsEs.mjs} +601 -623
  139. package/.output/server/chunks/build/DesktopRunLocallyButton-iNzrDsEs.mjs.map +1 -0
  140. package/.output/server/chunks/build/{DiagnosisPanel-D6QO30FQ.mjs → DiagnosisPanel-BVb2LgHu.mjs} +5 -5
  141. package/.output/server/chunks/build/DiagnosisPanel-BVb2LgHu.mjs.map +1 -0
  142. package/.output/server/chunks/build/{DiagnosisResult-ujB5Lt2A.mjs → DiagnosisResult-xVgZlfKK.mjs} +8 -8
  143. package/.output/server/chunks/build/DiagnosisResult-xVgZlfKK.mjs.map +1 -0
  144. package/.output/server/chunks/build/{EntityLinks-F8_kC-IH.mjs → EntityLinks-Dzn73fbq.mjs} +2 -2
  145. package/.output/server/chunks/build/EntityLinks-Dzn73fbq.mjs.map +1 -0
  146. package/.output/server/chunks/build/{EnvManagedBadge-D6e-10M9.mjs → EnvManagedBadge-C-agmABK.mjs} +3 -3
  147. package/.output/server/chunks/build/EnvManagedBadge-C-agmABK.mjs.map +1 -0
  148. package/.output/server/chunks/build/{FeatureUnavailable-BMw4euTk.mjs → FeatureUnavailable-DHFkwI7t.mjs} +2 -2
  149. package/.output/server/chunks/build/FeatureUnavailable-DHFkwI7t.mjs.map +1 -0
  150. package/.output/server/chunks/build/{FormField-QptK0rPg.mjs → FormField-GYHKiSI6.mjs} +2 -2
  151. package/.output/server/chunks/build/FormField-GYHKiSI6.mjs.map +1 -0
  152. package/.output/server/chunks/build/{GetStartedWizard-DxT8T14Y.mjs → GetStartedWizard-BpcGYsm2.mjs} +3 -3
  153. package/.output/server/chunks/build/GetStartedWizard-BpcGYsm2.mjs.map +1 -0
  154. package/.output/server/chunks/build/{HelpHint-C5Ru8BCc.mjs → HelpHint-plioHKA0.mjs} +2 -2
  155. package/.output/server/chunks/build/HelpHint-plioHKA0.mjs.map +1 -0
  156. package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs +193 -0
  157. package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs.map +1 -0
  158. package/.output/server/chunks/build/{Modal-BacZmQCX.mjs → Modal-hKLvVFNp.mjs} +2 -2
  159. package/.output/server/chunks/build/Modal-hKLvVFNp.mjs.map +1 -0
  160. package/.output/server/chunks/build/{NavigationMenu-sTiKSWDm.mjs → NavigationMenu-RfBOyS32.mjs} +4 -4
  161. package/.output/server/chunks/build/NavigationMenu-RfBOyS32.mjs.map +1 -0
  162. package/.output/server/chunks/build/{OpenInIdeLink-Crc8y0Yx.mjs → OpenInIdeLink-Jp6SzEtD.mjs} +4 -4
  163. package/.output/server/chunks/build/{OpenInIdeLink-Crc8y0Yx.mjs.map → OpenInIdeLink-Jp6SzEtD.mjs.map} +1 -1
  164. package/.output/server/chunks/build/{ProjectTestCasesTable-DwjqZ2i5.mjs → ProjectTestCasesTable-DxOTfhi4.mjs} +8 -8
  165. package/.output/server/chunks/build/{ProjectTestCasesTable-DwjqZ2i5.mjs.map → ProjectTestCasesTable-DxOTfhi4.mjs.map} +1 -1
  166. package/.output/server/chunks/build/{RovingFocusItem--OEHI2P3.mjs → RovingFocusItem-BOSx1Z9Z.mjs} +2 -2
  167. package/.output/server/chunks/build/RovingFocusItem-BOSx1Z9Z.mjs.map +1 -0
  168. package/.output/server/chunks/build/{SectionCard-C753B3Yo.mjs → SectionCard-DHAFvJxm.mjs} +2 -2
  169. package/.output/server/chunks/build/SectionCard-DHAFvJxm.mjs.map +1 -0
  170. package/.output/server/chunks/build/{Select-BAyYwPuo.mjs → Select-CEyw7HGK.mjs} +3 -3
  171. package/.output/server/chunks/build/Select-CEyw7HGK.mjs.map +1 -0
  172. package/.output/server/chunks/build/{SelectMenu-zE_AhMX8.mjs → SelectMenu-C02Hs2_F.mjs} +4 -4
  173. package/.output/server/chunks/build/{SelectMenu-zE_AhMX8.mjs.map → SelectMenu-C02Hs2_F.mjs.map} +1 -1
  174. package/.output/server/chunks/build/{Separator-BbgCfKKJ.mjs → Separator-lrN70ODV.mjs} +2 -2
  175. package/.output/server/chunks/build/Separator-lrN70ODV.mjs.map +1 -0
  176. package/.output/server/chunks/build/{SettingsField-D-VriK9X.mjs → SettingsField-tRmytcEJ.mjs} +5 -5
  177. package/.output/server/chunks/build/SettingsField-tRmytcEJ.mjs.map +1 -0
  178. package/.output/server/chunks/build/{Slideover-CNbGvbUF.mjs → Slideover-D6cRIqch.mjs} +3 -3
  179. package/.output/server/chunks/build/Slideover-D6cRIqch.mjs.map +1 -0
  180. package/.output/server/chunks/build/{Switch-DdkA3Fii.mjs → Switch-R2n82ncQ.mjs} +4 -4
  181. package/.output/server/chunks/build/Switch-R2n82ncQ.mjs.map +1 -0
  182. package/.output/server/chunks/build/{Table-CfDVAuUJ.mjs → Table-qZdnm9t2.mjs} +2 -2
  183. package/.output/server/chunks/build/Table-qZdnm9t2.mjs.map +1 -0
  184. package/.output/server/chunks/build/{Tabs-BCOhHEB9.mjs → Tabs-BDP7MWl4.mjs} +3 -3
  185. package/.output/server/chunks/build/Tabs-BDP7MWl4.mjs.map +1 -0
  186. package/.output/server/chunks/build/{TestStatusBar-wquHQqtp.mjs → TestStatusBar-CvsmKJ4D.mjs} +2 -2
  187. package/.output/server/chunks/build/TestStatusBar-CvsmKJ4D.mjs.map +1 -0
  188. package/.output/server/chunks/build/{Textarea-Ohs6QTXf.mjs → Textarea-DpmpM-lN.mjs} +2 -2
  189. package/.output/server/chunks/build/Textarea-DpmpM-lN.mjs.map +1 -0
  190. package/.output/server/chunks/build/{Tooltip-BRBnl4pE.mjs → Tooltip-BI3WQErw.mjs} +2 -2
  191. package/.output/server/chunks/build/Tooltip-BI3WQErw.mjs.map +1 -0
  192. package/.output/server/chunks/build/{VisuallyHiddenInput-BHvzNumK.mjs → VisuallyHiddenInput-D4E5aJCQ.mjs} +2 -2
  193. package/.output/server/chunks/build/VisuallyHiddenInput-D4E5aJCQ.mjs.map +1 -0
  194. package/.output/server/chunks/build/{_id_-CGs0u8Fr.mjs → _id_-CrGTZymJ.mjs} +70 -41
  195. package/.output/server/chunks/build/{_id_-CGs0u8Fr.mjs.map → _id_-CrGTZymJ.mjs.map} +1 -1
  196. package/.output/server/chunks/build/{_id_-BesWjK_d.mjs → _id_-D7UtAIPR.mjs} +34 -31
  197. package/.output/server/chunks/build/{_id_-BesWjK_d.mjs.map → _id_-D7UtAIPR.mjs.map} +1 -1
  198. package/.output/server/chunks/build/{_id_-CQ0lolEK.mjs → _id_-T965GKYC.mjs} +58 -15
  199. package/.output/server/chunks/build/_id_-T965GKYC.mjs.map +1 -0
  200. package/.output/server/chunks/build/{_id_-D1-06Fcl.mjs → _id_-wiULjAVc.mjs} +43 -39
  201. package/.output/server/chunks/build/{_id_-D1-06Fcl.mjs.map → _id_-wiULjAVc.mjs.map} +1 -1
  202. package/.output/server/chunks/build/{about-DdyOj-dj.mjs → about-B3V_OEiu.mjs} +5 -5
  203. package/.output/server/chunks/build/about-B3V_OEiu.mjs.map +1 -0
  204. package/.output/server/chunks/build/{account-7aVMKekZ.mjs → account-DpBdYE46.mjs} +6 -6
  205. package/.output/server/chunks/build/account-DpBdYE46.mjs.map +1 -0
  206. package/.output/server/chunks/build/{ai-zw3T9b5u.mjs → ai-DYhpzbqp.mjs} +15 -15
  207. package/.output/server/chunks/build/{ai-zw3T9b5u.mjs.map → ai-DYhpzbqp.mjs.map} +1 -1
  208. package/.output/server/chunks/build/{analytics-CeCzKwEX.mjs → analytics-CZJEU0an.mjs} +17 -17
  209. package/.output/server/chunks/build/{analytics-CeCzKwEX.mjs.map → analytics-CZJEU0an.mjs.map} +1 -1
  210. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  211. package/.output/server/chunks/build/{default-CkyAx_Mu.mjs → default-DO1izI2V.mjs} +504 -88
  212. package/.output/server/chunks/build/default-DO1izI2V.mjs.map +1 -0
  213. package/.output/server/chunks/build/{docs-Dhj-wEks.mjs → docs-C8bndVXg.mjs} +11 -11
  214. package/.output/server/chunks/build/{docs-Dhj-wEks.mjs.map → docs-C8bndVXg.mjs.map} +1 -1
  215. package/.output/server/chunks/build/{edit-CVz_gdoe.mjs → edit-BdfF9er2.mjs} +12 -12
  216. package/.output/server/chunks/build/edit-BdfF9er2.mjs.map +1 -0
  217. package/.output/server/chunks/build/{fetch-Be-j7hF1.mjs → fetch-tkz5_OA-.mjs} +2 -2
  218. package/.output/server/chunks/build/fetch-tkz5_OA-.mjs.map +1 -0
  219. package/.output/server/chunks/build/{forgot-password-CwdjL7BO.mjs → forgot-password-swZRcvXE.mjs} +3 -3
  220. package/.output/server/chunks/build/forgot-password-swZRcvXE.mjs.map +1 -0
  221. package/.output/server/chunks/build/{import-DyQEw4V3.mjs → import-B27Sv7h5.mjs} +10 -10
  222. package/.output/server/chunks/build/import-B27Sv7h5.mjs.map +1 -0
  223. package/.output/server/chunks/build/{index-DcnICCZU.mjs → index-BdZmxLtC.mjs} +17 -17
  224. package/.output/server/chunks/build/{index-DcnICCZU.mjs.map → index-BdZmxLtC.mjs.map} +1 -1
  225. package/.output/server/chunks/build/{index-D7Bmj6bq.mjs → index-C7m32bRI.mjs} +9 -9
  226. package/.output/server/chunks/build/index-C7m32bRI.mjs.map +1 -0
  227. package/.output/server/chunks/build/{index-DghAFpNR.mjs → index-vRwzDXLs.mjs} +30 -29
  228. package/.output/server/chunks/build/{index-DghAFpNR.mjs.map → index-vRwzDXLs.mjs.map} +1 -1
  229. package/.output/server/chunks/build/{isValueEqualOrExist-D2qw9YEr.mjs → isValueEqualOrExist-D4lZ8uRY.mjs} +2 -2
  230. package/.output/server/chunks/build/isValueEqualOrExist-D4lZ8uRY.mjs.map +1 -0
  231. package/.output/server/chunks/build/{login-rXKF63j6.mjs → login-hxCF06JT.mjs} +4 -4
  232. package/.output/server/chunks/build/login-hxCF06JT.mjs.map +1 -0
  233. package/.output/server/chunks/build/{mcp-ByNvFy4o.mjs → mcp-BVW1llyW.mjs} +11 -11
  234. package/.output/server/chunks/build/mcp-BVW1llyW.mjs.map +1 -0
  235. package/.output/server/chunks/build/{notifications-CbLAZnKJ.mjs → notifications-Dn-evqXM.mjs} +11 -11
  236. package/.output/server/chunks/build/notifications-Dn-evqXM.mjs.map +1 -0
  237. package/.output/server/chunks/build/{performance-C93MEPaZ.mjs → performance-CV8qm94u.mjs} +10 -10
  238. package/.output/server/chunks/build/performance-CV8qm94u.mjs.map +1 -0
  239. package/.output/server/chunks/build/{pr-feedback-DKCB0bDE.mjs → pr-feedback-gKDz8LyA.mjs} +9 -9
  240. package/.output/server/chunks/build/pr-feedback-gKDz8LyA.mjs.map +1 -0
  241. package/.output/server/chunks/build/{reset-password-BBoHKMqD.mjs → reset-password-DtEISa1I.mjs} +3 -3
  242. package/.output/server/chunks/build/reset-password-DtEISa1I.mjs.map +1 -0
  243. package/.output/server/chunks/build/server.mjs +85 -31
  244. package/.output/server/chunks/build/{settings-DiG0JjzC.mjs → settings-BJDnuLpc.mjs} +8 -8
  245. package/.output/server/chunks/build/settings-BJDnuLpc.mjs.map +1 -0
  246. package/.output/server/chunks/build/{setup-0-1O6Hjz.mjs → setup-BO9tXa_G.mjs} +14 -14
  247. package/.output/server/chunks/build/{setup-0-1O6Hjz.mjs.map → setup-BO9tXa_G.mjs.map} +1 -1
  248. package/.output/server/chunks/build/{storage-3JiFJ843.mjs → storage-zN92cA9q.mjs} +10 -10
  249. package/.output/server/chunks/build/storage-zN92cA9q.mjs.map +1 -0
  250. package/.output/server/chunks/build/{tags-CqYcp7js.mjs → tags-CJFnoyQc.mjs} +5 -5
  251. package/.output/server/chunks/build/tags-CJFnoyQc.mjs.map +1 -0
  252. package/.output/server/chunks/build/{test-cases-y1HSgPX2.mjs → test-cases-0Q6rT73d.mjs} +18 -18
  253. package/.output/server/chunks/build/test-cases-0Q6rT73d.mjs.map +1 -0
  254. package/.output/server/chunks/build/{test-functions-D2ju95Ly.mjs → test-functions-DVRJgiWo.mjs} +8 -8
  255. package/.output/server/chunks/build/test-functions-DVRJgiWo.mjs.map +1 -0
  256. package/.output/server/chunks/build/{useCopyRich-CVFeYfkG.mjs → useCopyRich-CZxJ7IY_.mjs} +12 -12
  257. package/.output/server/chunks/build/{useCopyRich-CVFeYfkG.mjs.map → useCopyRich-CZxJ7IY_.mjs.map} +1 -1
  258. package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs +319 -0
  259. package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs.map +1 -0
  260. package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs +67 -0
  261. package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs.map +1 -0
  262. package/.output/server/chunks/build/{useFormControl-CZ9So7iX.mjs → useFormControl-8skMOTIf.mjs} +2 -2
  263. package/.output/server/chunks/build/useFormControl-8skMOTIf.mjs.map +1 -0
  264. package/.output/server/chunks/build/{useOpenInIde--6Me0WlL.mjs → useOpenInIde-D74FmDNg.mjs} +2 -2
  265. package/.output/server/chunks/build/useOpenInIde-D74FmDNg.mjs.map +1 -0
  266. package/.output/server/chunks/build/{users-IdmY9JZV.mjs → users-C9bjOBde.mjs} +6 -6
  267. package/.output/server/chunks/build/users-C9bjOBde.mjs.map +1 -0
  268. package/.output/server/chunks/nitro/nitro.mjs +734 -720
  269. package/.output/server/package.json +1 -1
  270. package/package.json +1 -1
  271. package/.output/public/_nuxt/B-6GGrhr.js +0 -1
  272. package/.output/public/_nuxt/B9FSuKdA.js +0 -1
  273. package/.output/public/_nuxt/BaDhDBCV.js +0 -1
  274. package/.output/public/_nuxt/Be4c943G.js +0 -2
  275. package/.output/public/_nuxt/BpUXqOVj.js +0 -2
  276. package/.output/public/_nuxt/CScusXhF.js +0 -1
  277. package/.output/public/_nuxt/Cot8fIp5.js +0 -2
  278. package/.output/public/_nuxt/D4oheDIm.js +0 -4
  279. package/.output/public/_nuxt/DslnXfcH.js +0 -1
  280. package/.output/public/_nuxt/builds/meta/28bca36d-5571-4157-b1b8-7f62c934eed6.json +0 -1
  281. package/.output/public/_nuxt/entry.BAvBQY-h.css +0 -1
  282. package/.output/public/_nuxt/hzsG6cAc.js +0 -1
  283. package/.output/public/_nuxt/jjOqY9Tv.js +0 -1
  284. package/.output/public/_nuxt/xbO0VmDX.js +0 -1
  285. package/.output/server/chunks/build/Alert-DAb8nKVs.mjs.map +0 -1
  286. package/.output/server/chunks/build/Breadcrumb-DJp5WvUM.mjs.map +0 -1
  287. package/.output/server/chunks/build/BreadcrumbNav-BrQwfL8G.mjs.map +0 -1
  288. package/.output/server/chunks/build/BrowserBadge-Djw_e_I9.mjs.map +0 -1
  289. package/.output/server/chunks/build/ChartCard-B2gd_8HP.mjs.map +0 -1
  290. package/.output/server/chunks/build/Checkbox-C1khEdTh.mjs.map +0 -1
  291. package/.output/server/chunks/build/CodeBlock-CjnDrO3Y.mjs.map +0 -1
  292. package/.output/server/chunks/build/DashboardNavbar-DYtmVlhy.mjs.map +0 -1
  293. package/.output/server/chunks/build/DashboardSidebarToggle-BPNxODwj.mjs.map +0 -1
  294. package/.output/server/chunks/build/DataLocationCard-2B-sVSMr.mjs.map +0 -1
  295. package/.output/server/chunks/build/DiagnosisPanel-D6QO30FQ.mjs.map +0 -1
  296. package/.output/server/chunks/build/DiagnosisResult-ujB5Lt2A.mjs.map +0 -1
  297. package/.output/server/chunks/build/EntityLinks-F8_kC-IH.mjs.map +0 -1
  298. package/.output/server/chunks/build/EnvManagedBadge-D6e-10M9.mjs.map +0 -1
  299. package/.output/server/chunks/build/FeatureUnavailable-BMw4euTk.mjs.map +0 -1
  300. package/.output/server/chunks/build/FormField-QptK0rPg.mjs.map +0 -1
  301. package/.output/server/chunks/build/GetStartedWizard-DxT8T14Y.mjs.map +0 -1
  302. package/.output/server/chunks/build/HelpHint-C5Ru8BCc.mjs.map +0 -1
  303. package/.output/server/chunks/build/MetaStripGroup-BBByVvpR.mjs.map +0 -1
  304. package/.output/server/chunks/build/Modal-BacZmQCX.mjs.map +0 -1
  305. package/.output/server/chunks/build/NavigationMenu-sTiKSWDm.mjs.map +0 -1
  306. package/.output/server/chunks/build/RovingFocusItem--OEHI2P3.mjs.map +0 -1
  307. package/.output/server/chunks/build/SectionCard-C753B3Yo.mjs.map +0 -1
  308. package/.output/server/chunks/build/Select-BAyYwPuo.mjs.map +0 -1
  309. package/.output/server/chunks/build/Separator-BbgCfKKJ.mjs.map +0 -1
  310. package/.output/server/chunks/build/SettingsField-D-VriK9X.mjs.map +0 -1
  311. package/.output/server/chunks/build/Slideover-CNbGvbUF.mjs.map +0 -1
  312. package/.output/server/chunks/build/Switch-DdkA3Fii.mjs.map +0 -1
  313. package/.output/server/chunks/build/Table-CfDVAuUJ.mjs.map +0 -1
  314. package/.output/server/chunks/build/Tabs-BCOhHEB9.mjs.map +0 -1
  315. package/.output/server/chunks/build/TestStatusBar-wquHQqtp.mjs.map +0 -1
  316. package/.output/server/chunks/build/Textarea-Ohs6QTXf.mjs.map +0 -1
  317. package/.output/server/chunks/build/Tooltip-BRBnl4pE.mjs.map +0 -1
  318. package/.output/server/chunks/build/VisuallyHiddenInput-BHvzNumK.mjs.map +0 -1
  319. package/.output/server/chunks/build/_id_-CQ0lolEK.mjs.map +0 -1
  320. package/.output/server/chunks/build/about-DdyOj-dj.mjs.map +0 -1
  321. package/.output/server/chunks/build/account-7aVMKekZ.mjs.map +0 -1
  322. package/.output/server/chunks/build/default-CkyAx_Mu.mjs.map +0 -1
  323. package/.output/server/chunks/build/edit-CVz_gdoe.mjs.map +0 -1
  324. package/.output/server/chunks/build/fetch-Be-j7hF1.mjs.map +0 -1
  325. package/.output/server/chunks/build/forgot-password-CwdjL7BO.mjs.map +0 -1
  326. package/.output/server/chunks/build/import-DyQEw4V3.mjs.map +0 -1
  327. package/.output/server/chunks/build/index-D7Bmj6bq.mjs.map +0 -1
  328. package/.output/server/chunks/build/isValueEqualOrExist-D2qw9YEr.mjs.map +0 -1
  329. package/.output/server/chunks/build/login-rXKF63j6.mjs.map +0 -1
  330. package/.output/server/chunks/build/mcp-ByNvFy4o.mjs.map +0 -1
  331. package/.output/server/chunks/build/notifications-CbLAZnKJ.mjs.map +0 -1
  332. package/.output/server/chunks/build/performance-C93MEPaZ.mjs.map +0 -1
  333. package/.output/server/chunks/build/pr-feedback-DKCB0bDE.mjs.map +0 -1
  334. package/.output/server/chunks/build/reset-password-BBoHKMqD.mjs.map +0 -1
  335. package/.output/server/chunks/build/settings-DiG0JjzC.mjs.map +0 -1
  336. package/.output/server/chunks/build/storage-3JiFJ843.mjs.map +0 -1
  337. package/.output/server/chunks/build/tags-CqYcp7js.mjs.map +0 -1
  338. package/.output/server/chunks/build/test-cases-y1HSgPX2.mjs.map +0 -1
  339. package/.output/server/chunks/build/test-functions-D2ju95Ly.mjs.map +0 -1
  340. package/.output/server/chunks/build/useFormControl-CZ9So7iX.mjs.map +0 -1
  341. package/.output/server/chunks/build/useOpenInIde--6Me0WlL.mjs.map +0 -1
  342. package/.output/server/chunks/build/users-IdmY9JZV.mjs.map +0 -1
@@ -1 +1 @@
1
- import{_ as V}from"./C9p0YCAi.js";import{_ as H}from"./BTvE9qca.js";import{_ as A,a as J}from"./B_mN5eMV.js";import{_ as O}from"./HwFFbACq.js";import{d as Z,u as q,a as z,b as G,w as k,e as K,r as g,f as L,g as i,h as f,o as M,i as l,j as r,k as o,l as Q,_ as W,m as b,t as X}from"./h49q_GXF.js";import{_ as Y}from"./hzsG6cAc.js";import{_ as tt}from"./CWoSSKhQ.js";import{u as h}from"./Cd8r0xk5.js";import{o as ot,s as u}from"./DGnQ69wW.js";import"./BhH0TNTi.js";import"./BKJetfRH.js";import"./D4UlSVir.js";import"./CScusXhF.js";import"./BtSJxOdh.js";import"./BjaRappk.js";import"./BFcdtAzg.js";import"./BH-ym1CI.js";import"./xbO0VmDX.js";import"./BNAHBHbY.js";import"./B6s20NbT.js";import"./CD3R-ggS.js";const st={class:"p-4 space-y-4"},et={class:"text-sm text-gray-600 mt-1"},at={class:"font-medium"},nt={class:"flex justify-end gap-2 pt-2"},Pt=Z({__name:"edit",async setup(it){let n,p;const $=q(),v=z(),j=G(),c=$.params.id,{data:e}=([n,p]=k(()=>h(`/api/projects/${c}`,"$CprFePJ4Up")),n=await n,p(),n),{data:y,refresh:x}=([n,p]=k(()=>h("/api/tags","$vxtZOtP06T")),n=await n,p(),n);K(f(()=>({title:`Edit ${e.value?.label||e.value?.name||"Project"} — Piwi Dashboard`})));const U=f(()=>y.value?.tags||[]),I=f(()=>!!e.value?.hasScmToken),s=g({label:e.value?.label||"",description:e.value?.description||"",diagnosisInstructions:e.value?.diagnosisInstructions||"",scmToken:""}),d=g(e.value?.tags||[]),P=ot({label:u().optional(),description:u().optional(),diagnosisInstructions:u().optional(),scmToken:u().optional()}),_=g(!1);async function C(){try{_.value=!0,await $fetch(`/api/projects/${c}`,{method:"PUT",body:{label:s.value.label||null,description:s.value.description||null,diagnosisInstructions:s.value.diagnosisInstructions||null,scmToken:s.value.scmToken||null,tagIds:d.value.map(m=>m.id)}}),j.add({title:"Project updated",description:"Project settings have been saved successfully",color:"success"}),await v.push(`/projects/${c}`)}catch(m){console.error("Error updating project:",m),j.add({title:"Error",description:"Failed to update project",color:"error"})}finally{_.value=!1}}function w(){v.push(`/projects/${c}`)}return(m,t)=>{const N=V,B=H,D=J,F=O,T=W,E=Y,S=tt,R=A;return M(),L(R,{id:"project-edit"},{header:i(()=>[r(D,null,{leading:i(()=>[r(N),r(B,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},{label:o(e)?.label||o(e)?.name||"Project",to:`/projects/${o(c)}`},{label:"Edit"}]},null,8,["items"])]),_:1})]),body:i(()=>[l("div",st,[r(S,null,{header:i(()=>[t[7]||(t[7]=l("h2",null,"Edit project settings",-1)),l("p",et,[t[6]||(t[6]=b(" Project Name: ",-1)),l("span",at,X(o(e)?.name),1)]),t[8]||(t[8]=l("p",{class:"text-xs text-gray-500 mt-1"}," Note: The project name is used to match test results from the reporter and cannot be changed. ",-1))]),default:i(()=>[r(E,{schema:o(P),state:o(s),class:"space-y-5",onSubmit:C},{default:i(()=>[r(F,{mode:"edit","has-token":o(I),label:o(s).label,"onUpdate:label":t[0]||(t[0]=a=>o(s).label=a),description:o(s).description,"onUpdate:description":t[1]||(t[1]=a=>o(s).description=a),diagnosisInstructions:o(s).diagnosisInstructions,"onUpdate:diagnosisInstructions":t[2]||(t[2]=a=>o(s).diagnosisInstructions=a),scmToken:o(s).scmToken,"onUpdate:scmToken":t[3]||(t[3]=a=>o(s).scmToken=a),tags:o(d),"onUpdate:tags":t[4]||(t[4]=a=>Q(d)?d.value=a:null),"all-tags":o(U),onTagCreated:t[5]||(t[5]=a=>o(x)())},null,8,["has-token","label","description","diagnosisInstructions","scmToken","tags","all-tags"]),l("div",nt,[r(T,{variant:"ghost",color:"neutral",onClick:w},{default:i(()=>[...t[9]||(t[9]=[b(" Cancel ",-1)])]),_:1}),r(T,{type:"submit",icon:"i-lucide-check",loading:o(_)},{default:i(()=>[...t[10]||(t[10]=[b(" Save changes ",-1)])]),_:1},8,["loading"])])]),_:1},8,["schema","state"])]),_:1})])]),_:1})}}});export{Pt as default};
1
+ import{_ as V}from"./DTrPCv7R.js";import{_ as H}from"./B3G-TIoP.js";import{_ as A,a as J}from"./2yLW7WU0.js";import{_ as O}from"./B070fjS-.js";import{d as Z,u as q,a as z,b as G,w as k,e as K,r as g,f as L,g as i,h as f,o as M,i as l,j as r,k as o,l as Q,_ as W,m as b,t as X}from"./CNu3kken.js";import{_ as Y}from"./Wk7ZKG4B.js";import{_ as tt}from"./B_JSV0yG.js";import{u as h}from"./DprkT7rM.js";import{o as ot,s as u}from"./DGnQ69wW.js";import"./BZFiz2UB.js";import"./CF_eDZHu.js";import"./DZ-KbUZi.js";import"./B0tmRAhY.js";import"./CfhOanaF.js";import"./BjaRappk.js";import"./Ce89VyHE.js";import"./BM5BPKlc.js";import"./BVyjw9Bi.js";import"./B3AG2m76.js";import"./CmTzxoQt.js";import"./DeewM3Wg.js";const st={class:"p-4 space-y-4"},et={class:"text-sm text-gray-600 mt-1"},at={class:"font-medium"},nt={class:"flex justify-end gap-2 pt-2"},Pt=Z({__name:"edit",async setup(it){let n,p;const $=q(),v=z(),j=G(),c=$.params.id,{data:e}=([n,p]=k(()=>h(`/api/projects/${c}`,"$CprFePJ4Up")),n=await n,p(),n),{data:y,refresh:x}=([n,p]=k(()=>h("/api/tags","$vxtZOtP06T")),n=await n,p(),n);K(f(()=>({title:`Edit ${e.value?.label||e.value?.name||"Project"} — Piwi Dashboard`})));const U=f(()=>y.value?.tags||[]),I=f(()=>!!e.value?.hasScmToken),s=g({label:e.value?.label||"",description:e.value?.description||"",diagnosisInstructions:e.value?.diagnosisInstructions||"",scmToken:""}),d=g(e.value?.tags||[]),P=ot({label:u().optional(),description:u().optional(),diagnosisInstructions:u().optional(),scmToken:u().optional()}),_=g(!1);async function C(){try{_.value=!0,await $fetch(`/api/projects/${c}`,{method:"PUT",body:{label:s.value.label||null,description:s.value.description||null,diagnosisInstructions:s.value.diagnosisInstructions||null,scmToken:s.value.scmToken||null,tagIds:d.value.map(m=>m.id)}}),j.add({title:"Project updated",description:"Project settings have been saved successfully",color:"success"}),await v.push(`/projects/${c}`)}catch(m){console.error("Error updating project:",m),j.add({title:"Error",description:"Failed to update project",color:"error"})}finally{_.value=!1}}function w(){v.push(`/projects/${c}`)}return(m,t)=>{const N=V,B=H,D=J,F=O,T=W,E=Y,S=tt,R=A;return M(),L(R,{id:"project-edit"},{header:i(()=>[r(D,null,{leading:i(()=>[r(N),r(B,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},{label:o(e)?.label||o(e)?.name||"Project",to:`/projects/${o(c)}`},{label:"Edit"}]},null,8,["items"])]),_:1})]),body:i(()=>[l("div",st,[r(S,null,{header:i(()=>[t[7]||(t[7]=l("h2",null,"Edit project settings",-1)),l("p",et,[t[6]||(t[6]=b(" Project Name: ",-1)),l("span",at,X(o(e)?.name),1)]),t[8]||(t[8]=l("p",{class:"text-xs text-gray-500 mt-1"}," Note: The project name is used to match test results from the reporter and cannot be changed. ",-1))]),default:i(()=>[r(E,{schema:o(P),state:o(s),class:"space-y-5",onSubmit:C},{default:i(()=>[r(F,{mode:"edit","has-token":o(I),label:o(s).label,"onUpdate:label":t[0]||(t[0]=a=>o(s).label=a),description:o(s).description,"onUpdate:description":t[1]||(t[1]=a=>o(s).description=a),diagnosisInstructions:o(s).diagnosisInstructions,"onUpdate:diagnosisInstructions":t[2]||(t[2]=a=>o(s).diagnosisInstructions=a),scmToken:o(s).scmToken,"onUpdate:scmToken":t[3]||(t[3]=a=>o(s).scmToken=a),tags:o(d),"onUpdate:tags":t[4]||(t[4]=a=>Q(d)?d.value=a:null),"all-tags":o(U),onTagCreated:t[5]||(t[5]=a=>o(x)())},null,8,["has-token","label","description","diagnosisInstructions","scmToken","tags","all-tags"]),l("div",nt,[r(T,{variant:"ghost",color:"neutral",onClick:w},{default:i(()=>[...t[9]||(t[9]=[b(" Cancel ",-1)])]),_:1}),r(T,{type:"submit",icon:"i-lucide-check",loading:o(_)},{default:i(()=>[...t[10]||(t[10]=[b(" Save changes ",-1)])]),_:1},8,["loading"])])]),_:1},8,["schema","state"])]),_:1})])]),_:1})}}});export{Pt as default};
@@ -1,4 +1,4 @@
1
- import{d as F,B as W,o,f as u,g as n,i as e,c,F as E,y as N,k as a,q as C,p as O,t as y,v as m,s as R,m as s,_ as V,j as i,r as I,h as g,A as G}from"./h49q_GXF.js";import{a as T,d as K,_ as L}from"./BtSJxOdh.js";import{_ as Y}from"./Dj-TetcW.js";import{_ as q}from"./CWoSSKhQ.js";import{u as H}from"./BaDhDBCV.js";const M={class:"flex items-center gap-3"},J={class:"p-2 bg-primary/10 rounded-lg shrink-0"},Q={class:"text-xl font-semibold inline-flex items-center gap-1"},X={class:"text-sm text-gray-500 dark:text-gray-400"},Z={class:"flex flex-col items-center shrink-0"},tt={key:1},et={key:0,class:"w-px flex-1 mt-2 min-h-6 bg-gray-200 dark:bg-gray-700"},st={class:"flex-1 pb-6"},rt={class:"flex items-center gap-2 mb-1"},ot={class:"font-medium"},it={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},nt={class:"border-t border-gray-200 dark:border-gray-700 pt-4 mt-2"},at={key:0,class:"mt-4 space-y-6"},lt={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},dt={class:"flex items-center justify-between text-sm text-gray-500 dark:text-gray-400"},pt=`// tests/fixtures.ts
1
+ import{d as F,B as W,o,f as u,g as n,i as e,c,F as E,y as N,k as a,q as C,p as O,t as y,v as m,s as R,m as s,_ as V,j as i,r as I,h as g,A as G}from"./CNu3kken.js";import{a as T,d as K,_ as L}from"./CfhOanaF.js";import{_ as Y}from"./DJzFYrBt.js";import{_ as q}from"./B_JSV0yG.js";import{u as H}from"./DFfqRQxk.js";const M={class:"flex items-center gap-3"},J={class:"p-2 bg-primary/10 rounded-lg shrink-0"},Q={class:"text-xl font-semibold inline-flex items-center gap-1"},X={class:"text-sm text-gray-500 dark:text-gray-400"},Z={class:"flex flex-col items-center shrink-0"},tt={key:1},et={key:0,class:"w-px flex-1 mt-2 min-h-6 bg-gray-200 dark:bg-gray-700"},st={class:"flex-1 pb-6"},rt={class:"flex items-center gap-2 mb-1"},ot={class:"font-medium"},it={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},nt={class:"border-t border-gray-200 dark:border-gray-700 pt-4 mt-2"},at={key:0,class:"mt-4 space-y-6"},lt={class:"text-sm text-gray-600 dark:text-gray-400 mb-3"},dt={class:"flex items-center justify-between text-sm text-gray-500 dark:text-gray-400"},pt=`// tests/fixtures.ts
2
2
  import { test as base, expect } from '@playwright/test'
3
3
  import { piwiFixtures } from '@piwitests/reporter'
4
4
 
@@ -1 +1 @@
1
- import{u as j}from"./BhH0TNTi.js";import{h as b,c6 as m}from"./h49q_GXF.js";const g="piwi-browser-notify";function a(){return{projects:{}}}function y(e){try{const n=JSON.parse(e);if(typeof n!="object"||n===null)return a();const c={};if(n.projects&&typeof n.projects=="object")for(const[i,r]of Object.entries(n.projects)){const u=Number(i);Number.isNaN(u)||r&&typeof r=="object"&&Array.isArray(r.events)&&(c[u]={events:r.events.filter(f=>typeof f=="string")})}return{projects:c}}catch{return a()}}const h=m(!0);let l=null,p=null;function S(){p||h.run(()=>{l=j(g,{default:()=>"",maxAge:3600*24*365,sameSite:"lax",path:"/",secure:location.protocol==="https:",encode:e=>encodeURIComponent(e),decode:e=>decodeURIComponent(e)}),p=b({get:()=>{const e=l.value;return e?y(e):a()},set:e=>{l.value=JSON.stringify(e)}})})}function O(){S();const e=p;function n(t){return e.value.projects[t]??{events:[]}}function c(t,o){if(o.length===0){const s={...e.value};delete s.projects[t],e.value=s}else e.value={...e.value,projects:{...e.value.projects,[t]:{events:o}}}}function i(t,o){const s=n(t).events,v=s.includes(o)?s.filter(d=>d!==o):[...s,o];c(t,v)}function r(t){return n(t).events.length>0}function u(t,o){return n(t).events.includes(o)}function f(){return Object.values(e.value.projects).some(t=>t.events.length>0)}return{getProject:n,setEvents:c,toggleEvent:i,isSubscribed:r,isEventSubscribed:u,hasAnySubscription:f,stored:e}}export{O as u};
1
+ import{u as j}from"./BZFiz2UB.js";import{h as b,c8 as m}from"./CNu3kken.js";const g="piwi-browser-notify";function a(){return{projects:{}}}function y(e){try{const n=JSON.parse(e);if(typeof n!="object"||n===null)return a();const c={};if(n.projects&&typeof n.projects=="object")for(const[i,r]of Object.entries(n.projects)){const u=Number(i);Number.isNaN(u)||r&&typeof r=="object"&&Array.isArray(r.events)&&(c[u]={events:r.events.filter(f=>typeof f=="string")})}return{projects:c}}catch{return a()}}const h=m(!0);let l=null,p=null;function S(){p||h.run(()=>{l=j(g,{default:()=>"",maxAge:3600*24*365,sameSite:"lax",path:"/",secure:location.protocol==="https:",encode:e=>encodeURIComponent(e),decode:e=>decodeURIComponent(e)}),p=b({get:()=>{const e=l.value;return e?y(e):a()},set:e=>{l.value=JSON.stringify(e)}})})}function O(){S();const e=p;function n(t){return e.value.projects[t]??{events:[]}}function c(t,o){if(o.length===0){const s={...e.value};delete s.projects[t],e.value=s}else e.value={...e.value,projects:{...e.value.projects,[t]:{events:o}}}}function i(t,o){const s=n(t).events,v=s.includes(o)?s.filter(d=>d!==o):[...s,o];c(t,v)}function r(t){return n(t).events.length>0}function u(t,o){return n(t).events.includes(o)}function f(){return Object.values(e.value.projects).some(t=>t.events.length>0)}return{getProject:n,setEvents:c,toggleEvent:i,isSubscribed:r,isEventSubscribed:u,hasAnySubscription:f,stored:e}}export{O as u};
@@ -1,4 +1,4 @@
1
- import{d as ue,b as Je,o,f as q,g as A,j as _,_ as Ie,m as E,i as p,k as t,l as Le,r as Y,K as vt,h as I,A as ze,c as u,P as xt,V as Oe,ae as bt,S as ke,C as _e,p as $e,q as pe,v as T,t as $,F as ee,L as kt,y as fe,s as Pe,H as at,J as Ee,af as Ae,B as rt,E as _t,R as et,I as We,ac as Re,G as $t,W as Ne,ag as Se,T as wt,ad as Ct,ah as Tt,ai as St,aj as At,a0 as Lt,a1 as Rt}from"./h49q_GXF.js";import{_ as it,a as It}from"./BtSJxOdh.js";import{_ as zt}from"./DOLeth7M.js";import{u as Pt}from"./BDQCwxpX.js";import{a as He,u as Ue}from"./Cd8r0xk5.js";import{e as lt,u as Bt,v as Et,f as Ye,w as ct,n as Me,x as Ot}from"./CD3R-ggS.js";import{_ as Ge}from"./9N6hSApy.js";import{_ as je}from"./DLNNAYfu.js";import{_ as Mt}from"./jjOqY9Tv.js";import{_ as Nt}from"./CDh_Qt7h.js";import{_ as Ut}from"./CRPt9SfB.js";import{_ as jt}from"./Dj-TetcW.js";import{u as Dt,i as Kt,b as Vt}from"./DBhdObsO.js";import{f as Ht}from"./D-c8ZSws.js";import{_ as ut}from"./PdEEuEsg.js";import{_ as Ft}from"./CWoSSKhQ.js";const qt={class:"w-64 p-1 space-y-0.5"},Zt={class:"flex items-center justify-between px-2 pt-1 pb-1"},Wt=ue({__name:"ExportMenu",props:{endpoint:{},baseName:{}},setup(e){const r=e,{download:a}=Pt(),{copy:c}=He(),n=Je(),s=Y(!1),l=Y(""),f=I(()=>(ze().app?.baseURL??"/").replace(/\/$/,""));function i(C){return`${f.value}${C}`}async function h(C){s.value=!1,await a(i(`${r.endpoint}?format=${C}`),`${r.baseName}.${C}`,{binary:C==="zip"})}function v(){s.value=!1,window.open(i(`${r.endpoint}?format=html&print=1`),"_blank")}async function L(C,w,S){l.value=w;try{const D=await fetch(i(C));if(!D.ok)throw new Error(`Request failed (${D.status})`);const U=await D.text();c(S?S(U):U,{toast:`${w} copied`}),s.value=!1}catch(D){n.add({title:`Could not copy ${w.toLowerCase()}`,description:lt(D),color:"error"})}finally{l.value=""}}function y(){return L(`${r.endpoint}?format=md`,"Report")}return(C,w)=>{const S=Ie,D=it,U=zt,V=vt;return o(),q(V,{open:t(s),"onUpdate:open":w[4]||(w[4]=B=>Le(s)?s.value=B:null)},{content:A(()=>[p("div",qt,[p("div",Zt,[w[6]||(w[6]=p("p",{class:"text-xs font-medium text-gray-500"},"Download",-1)),_(D,{topic:"export.offline"})]),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-code",title:"One self-contained HTML file with screenshots and video embedded",onClick:w[0]||(w[0]=B=>h("html"))},{default:A(()=>[...w[7]||(w[7]=[E(" HTML — single file ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-archive",title:"Report plus the raw artifacts, including trace archives and data.json",onClick:w[1]||(w[1]=B=>h("zip"))},{default:A(()=>[...w[8]||(w[8]=[E(" ZIP — with all evidence ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-printer",title:"Opens the report with your browser's print dialog, for Save as PDF",onClick:v},{default:A(()=>[...w[9]||(w[9]=[E(" PDF — via print ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-text",title:"The Markdown report as a file",onClick:w[2]||(w[2]=B=>h("md"))},{default:A(()=>[...w[10]||(w[10]=[E(" Markdown ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-json",title:"Everything the report contains, machine-readable",onClick:w[3]||(w[3]=B=>h("json"))},{default:A(()=>[...w[11]||(w[11]=[E(" JSON ",-1)])]),_:1}),_(U,{class:"my-1"}),w[13]||(w[13]=p("p",{class:"text-xs font-medium text-gray-500 px-2 pt-1 pb-1"},"Copy to clipboard",-1)),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard-list",loading:t(l)==="Report",title:"The whole investigation as Markdown, for an issue or a chat",onClick:y},{default:A(()=>[...w[12]||(w[12]=[E(" Report (Markdown) ",-1)])]),_:1},8,["loading"])])]),default:A(()=>[_(S,{icon:"i-lucide-share",size:"xs",color:"neutral",variant:"outline",title:"Take this investigation away"},{default:A(()=>[...w[5]||(w[5]=[E(" Export ",-1)])]),_:1})]),_:1},8,["open"])}}}),Oa=Object.assign(Wt,{__name:"ExportMenu"}),Jt={class:"flex items-center justify-between gap-2"},Yt=["aria-expanded","title"],Gt={class:"text-lg font-medium inline-flex items-center gap-1 shrink-0"},Qt={key:2,class:"min-w-0 flex-1 truncate text-sm text-gray-500 dark:text-gray-400"},Xt={key:0,class:"flex items-center gap-1 shrink-0"},en={key:0,class:"text-sm text-gray-500 mt-1 ml-11"},tn=ue({__name:"CollapsibleSectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{},storageKey:{},defaultFolded:{type:Boolean,default:!0}},setup(e,{expose:r}){const a=e,{folded:c,toggle:n,setFolded:s}=Dt(`piwi-section-fold-${a.storageKey}`,a.defaultFolded),l=Y(null);function f(){s(!1),kt(()=>l.value?.scrollIntoView({behavior:"smooth",block:"start"}))}return r({setFolded:s,reveal:f}),(i,h)=>{const v=$e,L=it,y=Ft;return o(),u("div",{ref_key:"rootEl",ref:l,class:"scroll-mt-4"},[_(y,{ui:{header:"p-3 sm:px-4 sm:py-3",body:t(c)?"p-0 sm:p-0":""},class:pe(t(c)&&"divide-y-0")},{header:A(()=>[p("div",Jt,[p("div",{class:"flex items-center gap-2 min-w-0 flex-1 cursor-pointer select-none rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-expanded":!t(c),title:t(c)?"Expand section":"Collapse section",onClick:h[1]||(h[1]=(...C)=>t(n)&&t(n)(...C)),onKeydown:[h[2]||(h[2]=ke((...C)=>t(n)&&t(n)(...C),["enter"])),h[3]||(h[3]=ke(_e((...C)=>t(n)&&t(n)(...C),["prevent"]),["space"]))]},[_(v,{name:t(c)?"i-lucide-chevron-right":"i-lucide-chevron-down",class:"size-4 shrink-0 text-gray-400"},null,8,["name"]),e.icon?(o(),q(v,{key:0,name:e.icon,class:pe(["size-5 shrink-0",e.iconClass])},null,8,["name","class"])):T("",!0),p("h3",Gt,[E($(e.title),1),e.count!=null?(o(),u(ee,{key:0},[E(" ("+$(e.count)+")",1)],64)):T("",!0)]),e.help?(o(),u("span",{key:1,onClick:h[0]||(h[0]=_e(()=>{},["stop"]))},[_(L,{topic:e.help},null,8,["topic"])])):T("",!0),t(c)&&i.$slots.folded?(o(),u("span",Qt,[Oe(i.$slots,"folded")])):T("",!0)],40,Yt),i.$slots.actions?(o(),u("div",Xt,[Oe(i.$slots,"actions")])):T("",!0)]),!t(c)&&(e.subtitle||i.$slots.subtitle)?(o(),u("p",en,[Oe(i.$slots,"subtitle",{},()=>[E($(e.subtitle),1)])])):T("",!0)]),default:A(()=>[xt(p("div",null,[Oe(i.$slots,"default")],512),[[bt,!t(c)]])]),_:3},8,["ui","class"])],512)}}}),De=Object.assign(tn,{__name:"CollapsibleSectionCard"}),nn=/('(?:\\.|[^'])*'|"(?:\\.|[^"])*")|([A-Za-z_$][\w$]*)(?=\s*\()|([A-Za-z_$][\w$]*)(?=\s*:)|(true|false|null|\d+)|([{}(),.])/g;function on(e){const r=[],a=new RegExp(nn.source,"g");let c=0,n;for(;(n=a.exec(e))!==null;){n.index>c&&r.push({kind:"plain",text:e.slice(c,n.index)});const s=n[1]?"string":n[2]?"method":n[3]?"option":n[4]?"literal":"punctuation";r.push({kind:s,text:n[0]}),c=a.lastIndex}return c<e.length&&r.push({kind:"plain",text:e.slice(c)}),r}const sn=["title"],an=ue({__name:"LocatorCode",props:{locator:{},truncate:{type:Boolean,default:!1}},setup(e){const r=e,a={method:"text-violet-700 dark:text-violet-300",string:"text-green-700 dark:text-green-300",option:"text-blue-700 dark:text-blue-300",literal:"text-amber-700 dark:text-amber-300",punctuation:"text-gray-500 dark:text-gray-400",plain:""},c=I(()=>on(r.locator));return(n,s)=>(o(),u("code",{class:pe(["font-mono",e.truncate?"block truncate":"break-words"]),title:e.locator},[(o(!0),u(ee,null,fe(t(c),(l,f)=>(o(),u("span",{key:f,class:pe(a[l.kind])},$(l.text),3))),128))],10,sn))}}),Qe=Object.assign(an,{__name:"LocatorCode"}),rn={class:"overflow-x-auto text-xs font-mono"},ln=ue({__name:"DiffPatch",props:{patch:{}},setup(e){return(r,a)=>(o(),u("div",rn,[(o(!0),u(ee,null,fe(("parsePatchLines"in r?r.parsePatchLines:t(Et))(e.patch),(c,n)=>(o(),u("div",{key:n,class:pe(["px-3 py-px whitespace-pre leading-5 min-w-0",("patchLineClass"in r?r.patchLineClass:t(Bt))[c.type]])},$(c.text||" "),3))),128))]))}}),cn=Object.assign(ln,{__name:"DiffPatch"}),un=["role","aria-checked","tabindex"],dn={class:"flex-1 min-w-0"},pn={key:0,class:"text-[11px] leading-4 text-gray-500 truncate"},fn=ue({__name:"LocatorAlternativeRow",props:{alt:{},note:{default:void 0},copied:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1}},emits:["copy","select"],setup(e){const r=e;function a(s){return s>=80?"success":s>=50?"warning":"error"}function c(s){const{method:l,score:f,args:i}=s;return i&&(i.anchorTestId||i.anchorSelector||i.anchorRole)?"scoped to a stable ancestor — survives renames":f>=100?"most stable — purpose-built for testing":l==="getByRole"&&i&&!("name"in i)?"name-free role — survives renames":l==="getByRole"?"browser ARIA tree — semantic and stable":l==="getByLabel"?"associated <label> element":l==="getByPlaceholder"?"input placeholder":l==="getByText"?"visible text":l==="getByAltText"?"image alt text":l==="getByTitle"?"title attribute":l==="locator"&&f>=50?"stable selector":l==="locator"?"CSS class — may be fragile":""}const n=I(()=>r.note??c(r.alt));return(s,l)=>{const f=Pe,i=Qe,h=$e,v=Ie;return o(),u("div",{class:pe(["flex items-center gap-2 rounded border",[e.dense?"py-1 px-2":"py-1.5 px-2.5",e.selectable?"cursor-pointer hover:bg-elevated transition-colors focus-visible:outline-2 focus-visible:outline-primary":"",e.selectable&&e.selected?"border-primary/60 ring-1 ring-primary/50":"border-default/50"]]),role:e.selectable?"radio":void 0,"aria-checked":e.selectable?e.selected:void 0,tabindex:e.selectable?0:void 0,onClick:l[1]||(l[1]=L=>e.selectable&&s.$emit("select")),onKeydown:[l[2]||(l[2]=ke(_e(L=>e.selectable&&s.$emit("select"),["prevent"]),["enter"])),l[3]||(l[3]=ke(_e(L=>e.selectable&&s.$emit("select"),["prevent"]),["space"]))]},[_(f,{size:"xs",color:a(e.alt.score),variant:"subtle",class:pe(["shrink-0 font-mono tabular-nums cursor-default text-center",e.dense?"min-w-[2.25rem]":"min-w-[2.5rem]"]),title:`Stability score: ${e.alt.score}/100`},{default:A(()=>[E($(e.alt.score),1)]),_:1},8,["color","class","title"]),p("div",dn,[_(i,{locator:e.alt.locator,truncate:"",class:"text-xs"},null,8,["locator"]),t(n)?(o(),u("p",pn,$(t(n)),1)):T("",!0)]),e.alt.pickedByUser&&e.dense?(o(),q(h,{key:0,name:"i-lucide-user-check",class:"size-3.5 text-primary shrink-0",title:"Confirmed with the locator picker"})):e.alt.pickedByUser?(o(),q(f,{key:1,size:"xs",color:"primary",variant:"subtle",icon:"i-lucide-user-check",class:"shrink-0",title:"Confirmed with the locator picker on the failing page"})):T("",!0),_(v,{size:"xs",variant:"ghost",color:"neutral",icon:e.copied?"i-lucide-check":"i-lucide-copy",title:e.copied?"Copied!":"Copy",class:"shrink-0",onClick:l[0]||(l[0]=_e(L=>s.$emit("copy"),["stop"]))},null,8,["icon","title"])],42,un)}}}),dt=Object.assign(fn,{__name:"LocatorAlternativeRow"}),tt={getByTestId:"testid",getByRole:"semantic",getByLabel:"label",getByPlaceholder:"label",getByText:"text",getByAltText:"text",getByTitle:"text",locator:"css","page.locator":"css"},mn=50;function pt(e,r,a=mn){const c=r[0]??null;if(!c)return{recommended:null,durable:null,preservesConvention:!1,hasDurableAlternative:!1,suggestAddTestId:!1};const n=e?tt[e]:void 0,s=(e?r.find(i=>i.method===e&&i.score>=a):void 0)??(n?r.find(i=>tt[i.method]===n&&i.score>=a):void 0),f=r.find(i=>i.pickedByUser)??s??c;return{recommended:f,durable:c,preservesConvention:!!s&&f===s,hasDurableAlternative:f.locator!==c.locator,suggestAddTestId:c.score<a}}const ft={a:"link",button:"button",nav:"navigation",main:"main",article:"article",section:"region",form:"form",img:"img",figure:"figure",figcaption:"caption",blockquote:"blockquote",table:"table",caption:"caption",thead:"rowgroup",tbody:"rowgroup",tfoot:"rowgroup",tr:"row",td:"cell",ul:"list",ol:"list",li:"listitem",dialog:"dialog",output:"status",progress:"progressbar",meter:"meter",textarea:"textbox",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",details:"group",summary:"button",search:"search"},gn={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",search:"searchbox",number:"spinbutton",text:"textbox",email:"textbox",tel:"textbox",url:"textbox",password:"textbox"},hn=["id","class","name","data-testid","placeholder","alt","title","aria-label","aria-level","role","type","href","multiple"];function yn(e){const r=e.attributes.role;if(r)return r;const a=e.tagName;if(!a)return null;if(a==="input"){const c=(e.attributes.type??"text").toLowerCase();return gn[c]??"textbox"}return a==="select"?e.attributes.multiple!=null?"listbox":"combobox":a==="a"?e.attributes.href!=null?"link":null:ft[a]??null}function vn(e,r){if(r!=="heading")return null;const a=e.tagName.match(/^h([1-6])$/);if(a)return Number(a[1]);const c=e.attributes["aria-level"];return c&&/^\d+$/.test(c)?Number(c):null}const Ce=(e,r)=>e.attributes[r]||null,ve=e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),Ve=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),nt=e=>/^[A-Za-z][A-Za-z0-9_-]*$/.test(e);function xn(e){return/[a-f0-9]{8,}/i.test(e)?10:/^(?:css|sc|emotion|styled)-/i.test(e)?15:/^(bg|text|border|shadow|opacity|font|w-|h-|m[tblrxy]?-|p[tblrxy]?-|flex|grid|gap|rounded|absolute|relative|fixed|sticky|block|inline|hidden|overflow|z-|top-|right-|bottom-|left-|inset-|justify-|items-|self-|content-|order-|col-|row-)/.test(e)?25:/__/.test(e)||/--/.test(e)?35:/^[a-z]+(-[a-z]+)+$/.test(e)||/^[a-z]+[A-Z][a-zA-Z]+$/.test(e)?40:(e.includes("_")||/^[a-z]+-[a-z0-9]{5,}$/.test(e)&&/[0-9]/.test(e),15)}function ot(e){return!!(/^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$/i.test(e)||/^[a-f0-9]{8,}$/i.test(e)||/^[a-z]+-\d{4,}$/.test(e)||/^(tab|panel|input|select|option|dialog|modal|popup|tooltip|menu|listbox|combobox|checkbox|radio|textarea|button|field|label|accordion|collapse|step|slider|toggle|switch|dropdown|overlay|portal|layer)-\d+$/i.test(e)||/^(emotion-|styled-|css-|sc-)/.test(e)||e.startsWith("ng-")||/^(radix-|headlessui-|mui-|mantine-|chakra-)/i.test(e)||/^:r[0-9a-z]+:$/i.test(e)||/^«r[0-9a-z]+»$/i.test(e))}const bn=new Set(["data-test","data-test-id","data-qa","data-qa-id","data-cy","data-e2e"]);function kn(e){const r=[],a=new Set,c=x=>{a.has(x.locator)||(a.add(x.locator),r.push(x))},{accessibleName:n}=e,s=e.tagName,l=yn(e),f=e.selectorCounts,i=x=>x==null||x<=1,h=x=>x!=null&&x>1?45:0,v=e.textContent?e.textContent.replace(/\s+/g," ").trim():null,L=Ce(e,"data-testid");L&&i(f?.testId)&&c({locator:`getByTestId('${ve(L)}')`,method:"getByTestId",args:{testId:L},score:100});const y=vn(e,l),C=y!=null?`, level: ${y}`:"",w=x=>y!=null?{...x,level:y}:x;l&&n&&c({locator:`getByRole('${l}', { name: '${ve(n)}'${C} })`,method:"getByRole",args:w({role:l,name:n}),score:90-h(f?.roleName)});const S=Ce(e,"aria-label");if(l&&S&&S!==n&&c({locator:`getByRole('${l}', { name: '${ve(S)}'${C} })`,method:"getByRole",args:w({role:l,name:S}),score:85-h(f?.roleName)}),n&&["input","select","textarea"].includes(s)){const x=Ce(e,"aria-label");(e.hasLabel===void 0||e.hasLabel===!0||x===n)&&c({locator:`getByLabel('${ve(n)}')`,method:"getByLabel",args:{label:n},score:85})}const D=Ce(e,"placeholder");D&&c({locator:`getByPlaceholder('${ve(D)}')`,method:"getByPlaceholder",args:{placeholder:D},score:80-h(f?.placeholder)}),v&&v.length<80&&c({locator:`getByText('${ve(v)}')`,method:"getByText",args:{text:v},score:75-h(f?.text)});const U=Ce(e,"id");if(U&&!ot(U)&&i(f?.id)){const x=nt(U)?`#${U}`:`[id="${Ve(U)}"]`;c({locator:`locator('${ve(x)}')`,method:"locator",args:{selector:x},score:65})}const V=Ce(e,"name");if(V&&i(f?.name)){const x=`[name="${Ve(V)}"]`;c({locator:`locator('${ve(x)}')`,method:"locator",args:{selector:x},score:60})}const B=Ce(e,"alt");B&&c({locator:`getByAltText('${ve(B)}')`,method:"getByAltText",args:{text:B},score:60-h(f?.alt)});const Q=Ce(e,"title");Q&&c({locator:`getByTitle('${ve(Q)}')`,method:"getByTitle",args:{title:Q},score:50-h(f?.title)});const X=!!(L&&i(f?.testId)),m=(x,K,P)=>{let j=!1,ne=!1,me=!1,ge=!1,he=!1;for(const Z of e.ancestors??[]){if(K(Z)!==1)continue;if(!j&&Z.testId&&Z.testIdCount===1&&(j=!0,c({locator:`getByTestId('${ve(Z.testId)}').${x.expr}`,method:x.method,args:{...x.args,anchorTestId:Z.testId},score:P.testId})),!ne&&Z.id&&!ot(Z.id)&&Z.idCount===1){ne=!0;const k=nt(Z.id)?`#${Z.id}`:`[id="${Ve(Z.id)}"]`;c({locator:`locator('${ve(k)}').${x.expr}`,method:x.method,args:{...x.args,anchorSelector:k},score:P.id})}if(!ge&&Z.dataAttr&&Z.dataAttrCount===1){ge=!0;const{name:k,value:d}=Z.dataAttr,O=`[${k}="${Ve(d)}"]`;c({locator:`locator('${ve(O)}').${x.expr}`,method:x.method,args:{...x.args,anchorSelector:O},score:bn.has(k)?P.testData:P.data})}const ce=Z.role||ft[Z.tag]||null;!me&&ce&&ce!==x.role&&Z.roleCount===1&&(me=!0,c({locator:`getByRole('${ve(ce)}').${x.expr}`,method:x.method,args:{...x.args,anchorRole:ce},score:P.role})),!he&&ce&&Z.filterText&&Z.filterRoleCount===1&&(he=!0,c({locator:`getByRole('${ve(ce)}').filter({ hasText: '${ve(Z.filterText)}' }).${x.expr}`,method:x.method,args:{...x.args,anchorRole:ce,anchorHasText:Z.filterText},score:P.filter}))}};if(l&&!X){const x=y!=null?`'${l}', { level: ${y} }`:`'${l}'`,K=w({role:l});m({expr:`getByRole(${x})`,method:"getByRole",args:K,role:l},j=>j.scopedRoleCount,{testId:72,testData:70,id:64,data:60,role:55,filter:53});const P=e.rolePosition;P&&P.role===l&&(P.count===1||y!=null&&P.levelCount===1)&&c({locator:`getByRole(${x})`,method:"getByRole",args:K,score:58})}else!l&&v&&v.length<80&&!X&&m({expr:`getByText('${ve(v)}')`,method:"getByText",args:{text:v},role:null},x=>x.scopedTextCount,{testId:68,testData:66,id:60,data:56,role:51,filter:49});const M=Ce(e,"class");if(M){const x=f?.classes,K=M.split(/\s+/).filter(P=>P.length>1&&/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(P)&&i(x?.[P])).map(P=>({cls:P,score:xn(P)})).sort((P,j)=>j.score-P.score).slice(0,3);for(const{cls:P,score:j}of K)c({locator:`locator('.${ve(P)}')`,method:"locator",args:{selector:`.${P}`},score:j})}return r.sort((x,K)=>K.score-x.score)}function _n(e){const r=e.attributes,a=r["aria-label"];if(a)return a;if(e.textContent)return e.textContent;const c=r.title;if(c)return c;const n=r.placeholder;return n||null}function $n(e,r){const{keep:a,tagRoles:c,inputRoles:n,roleSources:s,includeStructural:l,includeLabelText:f}=r,i={};for(const S of a){const D=e.getAttribute(S)??e[S];i[S]=typeof D=="string"?D.slice(0,200):D?String(D).slice(0,200):null}const h=e.getBoundingClientRect(),v={};try{const S=e.ownerDocument,D=B=>S.defaultView.CSS.escape(B),U=B=>{try{return S.querySelectorAll(B).length}catch{return}};i["data-testid"]&&(v.testId=U(`[data-testid=${JSON.stringify(i["data-testid"])}]`)),i.id&&(v.id=U(`#${D(i.id)}`)),i.name&&(v.name=U(`[name=${JSON.stringify(i.name)}]`)),i.placeholder&&(v.placeholder=U(`[placeholder=${JSON.stringify(i.placeholder)}]`)),i.alt&&(v.alt=U(`[alt=${JSON.stringify(i.alt)}]`)),i.title&&(v.title=U(`[title=${JSON.stringify(i.title)}]`));const V=(i.class||"").split(/\s+/).filter(B=>B.length>1).slice(0,10);if(V.length>0){const B={};for(const Q of V){const X=U(`.${D(Q)}`);X!==void 0&&(B[Q]=X)}v.classes=B}}catch{}let L=null;const y=[];if(l&&c&&n&&s)try{const S=e.ownerDocument,D=k=>S.defaultView.CSS.escape(k),U=k=>{try{return S.querySelectorAll(k).length}catch{return}},V=new Map,B=new Map,Q=k=>{const d=V.get(k);if(d!==void 0)return d;let O;const G=k.getAttribute("role");if(G)O=G;else{const se=(k.tagName||"").toLowerCase();se==="input"?O=n[(k.getAttribute("type")||"text").toLowerCase()]??"textbox":se==="select"?O=k.getAttribute("multiple")!=null?"listbox":"combobox":se==="a"?O=k.getAttribute("href")!=null?"link":null:O=c[se]??null}return V.set(k,O),O},X=k=>{const d=/^h([1-6])$/.exec((k.tagName||"").toLowerCase());if(d)return Number(d[1]);const O=k.getAttribute("aria-level");return O&&/^\d+$/.test(O)?Number(O):null},m=Q(e),M=m==="heading"?X(e):null,x=k=>{const d=k.getAttribute("aria-label");if(d)return d;const O=(k.textContent||"").replace(/\s+/g," ").trim();return O||k.getAttribute("title")||k.getAttribute("placeholder")||null},K=x(e),P=(e.textContent||"").replace(/\s+/g," ").trim(),j=P?P.toLowerCase():null,ne=k=>{const d=B.get(k);if(d!==void 0)return d;const O=(k.textContent||"").replace(/\s+/g," ").trim().toLowerCase();return B.set(k,O),O},me=2,ge=(k,d)=>{if(!j)return-1;const O=k.querySelectorAll("*");if(O.length>d)return-1;let G=0;for(let se=0;se<O.length;se++){const re=O[se];if(ne(re).indexOf(j)===-1)continue;let g=!1;const z=re.children;for(let H=0;H<z.length;H++)if(ne(z[H]).indexOf(j)!==-1){g=!0;break}if(g||G++,G>=me)return G}return G},he=S.querySelectorAll(s),Z=he.length<=4e3,ce=!!m&&Z;if(ce){let k=0,d=-1,O=0,G=0;for(let se=0;se<he.length;se++){const re=he[se];Q(re)===m&&(re===e&&(d=k),k++,M!=null&&X(re)===M&&O++,K!=null&&x(re)===K&&G++)}K!=null&&(v.roleName=G),d!==-1&&(L={role:m,count:k,index:d,...M!=null?{levelCount:O}:{}})}if(j){const k=ge(S.body||S.documentElement,4e3);k>=0&&(v.text=k)}if(ce||j){const k=["form","nav","main","article","section","dialog","table","li","tr"],d=/^data-(v-[0-9a-f]+|reactid|react-checksum|svelte-\w+|ng-\w+|ember\w*)$/i,O=/^data-(index|idx|i|key|row|rownum|col|column|position|pos|order|sort|offset|page)$/i,G=["data-test","data-test-id","data-qa","data-qa-id","data-cy","data-e2e"],se=(W,oe)=>!W||W.slice(0,5)!=="data-"||W==="data-testid"||d.test(W)||O.test(W)?!1:!!oe&&oe.length<=120,re=W=>{const oe=W.attributes;if(!oe)return null;let ie=null;for(let de=0;de<oe.length;de++){const le=oe[de].name,ye=oe[de].value;if(se(le,ye)){if(G.indexOf(le.toLowerCase())!==-1)return{name:le,value:ye};ie||(ie={name:le,value:ye})}}return ie},g=W=>{let oe=0;for(let ie=0;ie<he.length;ie++)Q(he[ie])===W&&oe++;return oe},z=W=>(W.textContent||"").replace(/\s+/g," ").trim(),H=W=>{const oe=W.replace(/[^A-Za-z]/g,"").length;return oe<2?!1:W.replace(/[^0-9]/g,"").length<=oe},F=W=>!!W&&W.length<=60&&W!==P&&H(W),te=W=>{const oe=W.querySelector('h1,h2,h3,h4,h5,h6,[role="heading"]');if(oe){const de=z(oe);if(F(de))return de}const ie=W.querySelectorAll("*");if(ie.length>200)return null;for(let de=0;de<ie.length;de++){const le=ie[de];if(le===e||le.children.length>0)continue;const ye=z(le);if(F(ye))return ye}return null},N=(W,oe)=>{const ie=oe.toLowerCase();let de=0;for(let le=0;le<he.length;le++)Q(he[le])===W&&ne(he[le]).indexOf(ie)!==-1&&de++;return de};let J=e.parentElement,we=0;for(;J&&we<12&&y.length<4;){we++;const W=(J.tagName||"").toLowerCase();if(W==="body"||W==="html")break;const oe=J.getAttribute("data-testid"),ie=J.getAttribute("id"),de=J.getAttribute("role"),le=J.getAttribute("aria-label"),ye=de||(k.includes(W)?c[W]:null)||null,Te=re(J);if(oe||ie||ye||le||Te){let R=-1;if(ce){const xe=J.querySelectorAll(s);if(xe.length<=2e3){R=0;for(let Be=0;Be<xe.length;Be++){const Ke=xe[Be];Q(Ke)===m&&(M!=null&&X(Ke)!==M||R++)}}}const b=ge(J,2e3);let ae=null;try{ye&&Z&&(ae=te(J))}catch{ae=null}y.push({tag:W,depth:we,testId:oe||null,id:ie||null,role:de||null,ariaLabel:le||null,...R>=0?{scopedRoleCount:R}:{},...b>=0?{scopedTextCount:b}:{},...oe?{testIdCount:U(`[data-testid=${JSON.stringify(oe)}]`)}:{},...ie?{idCount:U(`#${D(ie)}`)}:{},...ye&&Z?{roleCount:g(ye)}:{},...ae?{filterText:ae,filterRoleCount:N(ye,ae)}:{},...Te?{dataAttr:Te,dataAttrCount:U(`[${Te.name}=${JSON.stringify(Te.value)}]`)}:{}})}J=J.parentElement}}}catch{}const C=!!(e.labels&&e.labels.length>0),w=f?C&&(e.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,120)||null:void 0;return{tagName:e.tagName?.toLowerCase?.()??"unknown",attributes:i,textContent:(e.textContent||"").replace(/\s+/g," ").trim().slice(0,80),center:{x:Math.round(h.x+h.width/2),y:Math.round(h.y+h.height/2)},hasLabel:C,...f?{labelText:w}:{},selectorCounts:v,...l?{rolePosition:L,ancestors:y}:{}}}function wn(e){const r=globalThis,a=r.document;if(!a||!a.body){e.transport==="postMessage"?r.parent.postMessage({type:"pickerClosed"},"*"):r.__piwiPickState="skipped";return}const c=2147483600,n=a.createElement("div");n.id="__piwi_picker_highlight",n.style.cssText=`position:fixed;pointer-events:none;z-index:${c};display:none;box-sizing:border-box;border:2px solid #a855f7;background:rgba(168,85,247,.14);border-radius:4px;box-shadow:0 0 0 1px rgba(255,255,255,.9),0 0 0 3px rgba(59,7,100,.55),inset 0 0 0 1px rgba(255,255,255,.5);`;const s=a.createElement("div");s.id="__piwi_picker_banner",s.style.cssText=`position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:${c+2};background:#111827;color:#f9fafb;font:13px/1.5 system-ui,sans-serif;border:1px solid #312e81;padding:10px 16px;border-radius:10px;box-shadow:0 4px 24px rgba(0,0,0,.5);max-width:min(680px,86vw);`;const l=g=>{const z=J=>J.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),H=/('(?:\\.|[^'])*'|"(?:\\.|[^"])*")|([A-Za-z_$][\w$]*)(?=\s*\()|([A-Za-z_$][\w$]*)(?=\s*:)|(true|false|null|\d+)|([{}(),.])/g;let F="",te=0,N;for(;(N=H.exec(g))!==null;){N.index>te&&(F+=z(g.slice(te,N.index)));const J=N[1]?"#86efac":N[2]?"#d8b4fe":N[3]?"#93c5fd":N[4]?"#fcd34d":"#9ca3af";F+=`<span style="color:${J}">${z(N[0])}</span>`,te=H.lastIndex}return te<g.length&&(F+=z(g.slice(te))),F},f="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace",i=g=>`<code style="font-family:${f}">${l(g)}</code>`,h=a.createElement("div");h.innerHTML=e.transport==="postMessage"?"Click an element to generate locators":e.failing?`Piwi locator picker — click the element that should replace ${i(e.failing)}`:"Piwi inspector — click any element to generate locators for it";const v=a.createElement("div");v.id="__piwi_picker_locator",v.style.cssText=`display:none;margin-top:7px;padding:5px 9px;border-radius:7px;background:#0b1120;border:1px solid #4c1d95;font:13.5px/1.55 ${f};word-break:break-word;overflow-wrap:anywhere;`;const L=a.createElement("div");L.id="__piwi_picker_foot",L.style.cssText="color:#9ca3af;margin-top:6px;font-size:12px;",L.textContent="↑ parent · ↓ child · Esc skip",s.appendChild(h),s.appendChild(v),s.appendChild(L);const y=a.createElement("div");y.id="__piwi_picker_label",y.style.cssText=`position:fixed;pointer-events:none;z-index:${c+1};display:none;box-sizing:border-box;max-width:min(620px,92vw);background:#0b1120;color:#f9fafb;border:1px solid #7c3aed;border-radius:7px;padding:4px 8px;font:12.5px/1.45 ${f};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 4px 18px rgba(0,0,0,.5);`,a.body.appendChild(n),a.body.appendChild(y),a.body.appendChild(s);const C=g=>g.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),w=g=>{const z=(g.tagName||"?").toLowerCase(),H=g.getAttribute&&g.getAttribute("data-testid");if(H)return`getByTestId('${C(H)}')`;if(g.labels&&g.labels.length>0){const W=(g.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,80);if(W)return`getByLabel('${C(W)}')`}const F=g.getAttribute&&g.getAttribute("aria-label");if(F)return`getByLabel('${C(F)}')`;const te=g.getAttribute&&g.getAttribute("placeholder");if(te)return`getByPlaceholder('${C(te)}')`;const N=g.getAttribute&&g.getAttribute("alt");if(N)return`getByAltText('${C(N)}')`;const J=g.getAttribute&&g.getAttribute("title");if(J)return`getByTitle('${C(J)}')`;if(g.id)return`locator('#${C(g.id)}')`;const we=(g.getAttribute&&g.getAttribute("class")||"").split(/\s+/).find(W=>W.length>1);return we?`locator('.${C(we)}')`:z},S=g=>{const z=[];let H=g;for(;H&&z.length<15;){const F=(H.tagName||"").toLowerCase();if(F==="body"||F==="html")break;z.push(H),H=H.parentElement}return z.length?z:[g]},D=["button","a","input","select","textarea","summary","option"],U=g=>{for(let z=0;z<Math.min(g.length,4);z++){const H=g[z],F=(H.tagName||"").toLowerCase();if(D.includes(F)||H.getAttribute&&(H.getAttribute("role")||H.getAttribute("data-testid")))return z}return 0},V=g=>{const z=r.__piwiDescribeElement;if(typeof z=="function")try{const H=z(g);if(typeof H=="string"&&H)return H}catch{}return w(g)};let B=[],Q=0,X=null,m=null;const M=g=>{y.style.display="block";const z=y.getBoundingClientRect(),H=r.innerWidth||a.documentElement.clientWidth||0,F=r.innerHeight||a.documentElement.clientHeight||0;let te=g.top-z.height-6;te<4&&(te=g.bottom+6),te+z.height>F-4&&(te=Math.max(4,F-z.height-4));let N=g.left;N+z.width>H-6&&(N=H-z.width-6),N<6&&(N=6),y.style.left=N+"px",y.style.top=te+"px"},x=()=>B[Q]??null,K=()=>{const g=x();if(!g){n.style.display="none",y.style.display="none";return}const z=g.getBoundingClientRect();if(n.style.display="block",n.style.left=z.left+"px",n.style.top=z.top+"px",n.style.width=z.width+"px",n.style.height=z.height+"px",g!==m){m=g;const H=(g.tagName||"?").toLowerCase(),F=l(V(g));y.innerHTML=`<span style="color:#c4b5fd">&lt;${H}&gt;</span> ${F}`,v.innerHTML=F,v.style.display="block"}M(z),L.textContent="click to pick · ↑ parent · ↓ child · Esc skip"},P=g=>{g.preventDefault(),g.stopImmediatePropagation()},j=g=>g===s||g===n||g===y||s.contains&&s.contains(g)||!!(g&&g.__piwiHint);let ne="top";const me=g=>{ne!==g&&(ne=g,g==="bottom"?(s.style.top="auto",s.style.bottom="12px"):(s.style.top="12px",s.style.bottom="auto"))},ge=g=>{const z=g.target;if(!z||j(z)){n.style.display="none",y.style.display="none";return}z!==X&&(X=z,B=S(z),Q=U(B)),K();const H=x();if(H){const F=H.getBoundingClientRect(),te=s.getBoundingClientRect(),N=8;F.left<te.right+N&&F.right>te.left-N&&F.top<te.bottom+N&&F.bottom>te.top-N&&me(ne==="top"?"bottom":"top")}},he=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick"],Z=()=>{a.removeEventListener("mousemove",ge,!0),a.removeEventListener("click",G,!0),a.removeEventListener("keydown",se,!0),e.transport==="postMessage"&&r.removeEventListener("message",re,!1)},ce=()=>{for(const g of he)a.removeEventListener(g,P,!0)},k=()=>{n.remove(),y.remove(),s.remove()},d=g=>{if(Z(),n.style.display="none",y.style.display="none",e.transport==="postMessage"){const z=r.__piwiProbe,H=typeof z=="function"?z(g,e.probeArg):null;r.__piwiSnapshotExtras?.onPick?.(),a.addEventListener("click",P,!0),a.addEventListener("keydown",P,!0),L.textContent="Analyzing element…",r.parent.postMessage({type:"elementPicked",attrs:H},"*")}else ce(),r.__piwiPickedElement=g,r.__piwiPickState="picked",L.textContent="Analyzing element…"},O=()=>{Z(),e.transport==="postMessage"?(a.removeEventListener("click",P,!0),a.removeEventListener("keydown",P,!0),ce(),r.__piwiSnapshotExtras?.onClose?.(),k(),r.parent.postMessage({type:"pickerClosed"},"*")):(ce(),r.__piwiPickState="skipped",k())},G=g=>{P(g);const z=x();!z||j(g.target)||d(z)},se=g=>{if(g.key==="Escape"){P(g),O();return}(g.key==="ArrowUp"||g.key==="ArrowDown")&&(P(g),g.key==="ArrowUp"?Q=Math.min(Q+1,B.length-1):Q=Math.max(Q-1,0),K())},re=g=>{const z=g.data;!z||typeof z.type!="string"||z.type!=="piwiPickerKey"||typeof z.key!="string"||se({key:z.key,preventDefault(){},stopImmediatePropagation(){}})};r.__piwiPickCleanup=k,a.addEventListener("mousemove",ge,!0),a.addEventListener("click",G,!0),a.addEventListener("keydown",se,!0);for(const g of he)a.addEventListener(g,P,!0);e.transport==="postMessage"&&(r.addEventListener("message",re,!1),r.parent.postMessage({type:"pickerReady"},"*"))}function Cn(){var e=document,r=window,a=2147483600,c=[];function n(){for(var m=0;m<c.length;m++)c[m].parentNode&&c[m].parentNode.removeChild(c[m]);c=[]}function s(m){return(m||"").replace(/\s+/g," ").trim().toLowerCase()}function l(m){var M=s(m);if(M.length<2)return[];for(var x=e.querySelectorAll("button,a,[role],h1,h2,h3,h4,h5,h6,label,summary,input,textarea,select,option,span,li,td,th,p"),K=[],P=[],j=0;j<x.length;j++){var ne=x[j],me=s(ne.textContent);if(!me){var ge=s(ne.getAttribute&&(ne.getAttribute("placeholder")||ne.getAttribute("aria-label"))||"");ge&&(ge===M||ge.indexOf(M)!==-1)&&K.push(ne);continue}me.length>120||(me===M?K.push(ne):me.indexOf(M)!==-1&&me.length<M.length+30&&P.push(ne))}return K.concat(P)}function f(m,M){var x=m.getBoundingClientRect();if(x.width===0&&x.height===0)return null;var K=e.createElement("div");return K.__piwiHint=!0,K.style.cssText="position:fixed;pointer-events:none;z-index:"+(a+1)+";box-sizing:border-box;border-radius:3px;transition:opacity .3s;border:2px solid "+M+";box-shadow:0 0 0 3px "+M+"55;left:"+x.left+"px;top:"+x.top+"px;width:"+x.width+"px;height:"+x.height+"px;",e.body.appendChild(K),c.push(K),K}function i(m){var M=m.getBoundingClientRect();r.parent.postMessage({type:"piwiScrollTo",y:M.top},"*")}function h(m){if(n(),!(!m||!m.length)){for(var M=null,x=0;x<m.length;x++)for(var K=m[x],P=l(K&&K.text),j=0;j<Math.min(P.length,3);j++)f(P[j],"#f59e0b"),M||(M=P[j]);M&&i(M),setTimeout(function(){for(var ne=0;ne<c.length;ne++)c[ne].style.opacity="0"},2600),setTimeout(n,3e3)}}var v=[],L=0;function y(){r.parent.postMessage({type:"piwiSearchResult",count:v.length,index:v.length?L:-1},"*")}function C(){n();var m=v[L];m&&(f(m,"#7c3aed"),i(m),y())}function w(m){if(v=l(m),L=0,!v.length){n(),y();return}C()}function S(){v.length&&(L=(L+1)%v.length,C())}function D(m){var M=m.data;if(!(!M||typeof M.type!="string")){if(M.type==="piwiHighlight")try{h(M.hints)}catch{}else if(M.type==="piwiSearch")try{w(M.q)}catch{}else if(M.type==="piwiSearchNext")try{S()}catch{}else if(M.type==="piwiClearHints")try{n()}catch{}}}r.addEventListener("message",D,!1);function U(m){m.preventDefault(),m.stopImmediatePropagation()}for(var V=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick","contextmenu","submit","beforeinput","input","change","paste","cut","drop","dragstart","keypress","keyup","touchstart","touchend"],B=0;B<V.length;B++)e.addEventListener(V[B],U,!0);r.__piwiSnapshotExtras={onPick:function(){n()},onClose:function(){n(),r.removeEventListener("message",D,!1);for(var m=0;m<V.length;m++)e.removeEventListener(V[m],U,!0)}};function Q(){var m=Math.max(e.documentElement?e.documentElement.scrollHeight:0,e.body?e.body.scrollHeight:0);m>0&&r.parent.postMessage({type:"piwiContentHeight",height:m},"*")}Q();try{if(r.ResizeObserver){var X=new r.ResizeObserver(Q);e.documentElement&&X.observe(e.documentElement),e.body&&X.observe(e.body)}}catch{}}function Tn(e){const r=[],a=new Set,c=s=>{if(typeof s!="string")return;const l=s.trim();if(l.length<2||l.length>80)return;const f=l.toLowerCase();a.has(f)||(a.add(f),r.push({text:l}))},n=s=>s&&(s.name??s.text??s.label??s.placeholder??s.alt??s.title);c(n(e.failingLocator?.args));for(const s of e.fromElementMatch??[])c(n(s.args));for(const s of e.fromAriaSnapshot??[])c(n(s.args));return r.slice(0,6)}const qe=e=>e.replace(/<\/(script)/gi,"<\\/$1");function Sn(e){const a={transport:"postMessage",probeArg:{keep:e.probedAttrs,includeStructural:!1,includeLabelText:!0}},c=qe(String($n)),n=qe(String(Cn)),s=qe(String(wn));return`<script>globalThis.__piwiProbe = (${c});(${n})();(${s})(${JSON.stringify(a)});<\/script>`}function An(e){return e.replace(/<base\b[^>]*>/gi,"")}function Ln(e,r){return An(e)+Sn(r)}const Rn={key:0,class:"flex items-center justify-center py-20"},In={key:1,class:"py-8 text-center"},zn={class:"text-xs text-gray-400 mt-1"},Pn={key:2,class:"py-8 text-center"},Bn={class:"mb-2 flex items-center gap-2 flex-wrap"},En={key:1,class:"ml-auto inline-flex rounded-md border border-default overflow-hidden text-xs"},On={key:0,class:"flex items-center gap-1 mb-1.5 text-xs text-gray-500"},Mn={class:"tabular-nums w-11 text-center select-none"},Nn={class:"ml-auto text-gray-400 tabular-nums"},Un={key:1,class:"flex items-center gap-2 mb-1.5"},jn={key:0,class:"text-xs text-gray-500 tabular-nums"},Dn={key:1,class:"text-xs text-gray-400"},Kn={key:0,class:"absolute inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-10"},Vn=["src"],Hn={key:2,class:"mt-4 space-y-3"},Fn={class:"flex items-center gap-3 bg-elevated rounded-lg p-3"},qn={class:"flex-1 min-w-0"},Zn={class:"text-sm font-medium"},Wn={class:"text-xs"},Jn={key:0,class:"text-xs text-gray-400 ml-1"},Yn={key:0,class:"text-xs text-gray-500 mt-0.5 truncate"},Gn={class:"space-y-1",role:"radiogroup","aria-label":"Alternative locators"},Qn={class:"flex-1 min-w-0"},Xn={class:"text-xs font-medium text-primary"},eo={class:"flex justify-between w-full"},to={key:1},no={class:"flex gap-2"},oo=ue({__name:"SnapshotLocatorPicker",props:We({runId:{},testRunsCaseId:{},failingLocator:{},healing:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:We(["close","confirmed"],["update:open"]),setup(e,{emit:r}){const a=e,c=r,n=at(e,"open"),s=Y(!1),l=Y(null),f=Y(null),i=Y(void 0);async function h(){s.value=!0,f.value=null;try{const R=new URLSearchParams({inlineStyles:"1"});i.value&&R.set("source",i.value);const b=`?${R.toString()}`;l.value=await $fetch(`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/dom-snapshot${b}`),l.value?.source&&(i.value=l.value.source)}catch(R){f.value=R instanceof Error?R.message:"Unknown error"}finally{s.value=!1}}const v=I(()=>l.value?.availableSources??[]);function L(R){R===i.value||s.value||(i.value=R,w.value=!1,y.value="pick-element",X.value=0,M.value=!1,S.value=null,D.value=[],F.value=null,O.value="",G.value=0,se.value=-1,h())}Ee(n,R=>{R&&(l.value=null,w.value=!1,y.value="pick-element",X.value=0,M.value=!1,i.value=void 0,S.value=null,D.value=[],F.value=null,O.value="",G.value=0,se.value=-1,h())});const y=Y("pick-element"),C=Y(null),w=Y(!1),S=Y(null),D=Y([]),U=Y(void 0);function V(R){return URL.createObjectURL(new Blob([Ln(R,{probedAttrs:hn})],{type:"text/html"}))}Ee(()=>l.value?.html,R=>{U.value&&(URL.revokeObjectURL(U.value),U.value=void 0),R&&(U.value=V(R))},{immediate:!0});const B=Y(null),Q=Y(0),X=Y(0),m=Y(1),M=Y(!1),x=I(()=>l.value?.viewport??null),K=I(()=>{const R=x.value;return!R?.width||!Q.value?1:Math.min(Q.value/R.width,1)}),P=I(()=>{const R=x.value;if(!R)return{width:"100%",height:X.value?`${X.value}px`:"100%"};const b=X.value||R.height;return{width:`${Math.round(R.width*m.value)}px`,height:`${Math.round(b*m.value)}px`}}),j=I(()=>{const R=x.value;if(!R)return{width:"100%",height:X.value?`${X.value}px`:"100%",border:"0"};const b=X.value||R.height;return{width:`${R.width}px`,height:`${b}px`,transform:`scale(${m.value})`,transformOrigin:"top left",border:"0"}}),ne=I(()=>Math.round(m.value*100)),me=R=>Math.min(4,Math.max(.1,R));function ge(R){M.value=!0,m.value=me(m.value*R)}function he(){M.value=!1,m.value=K.value}Ee([K,x],()=>{M.value||(m.value=K.value)});let Z=null;Ee(B,R=>{Z?.disconnect(),R&&(Q.value=R.clientWidth,Z=new ResizeObserver(b=>{for(const ae of b)Q.value=ae.contentRect.width}),Z.observe(R))}),Ae(()=>{Z?.disconnect()}),Ae(()=>{U.value&&URL.revokeObjectURL(U.value)});function ce(R){if(!C.value||R.source!==C.value.contentWindow)return;const b=R.data;if(b?.type==="pickerReady"){w.value=!0,d();return}if(b?.type==="piwiContentHeight"&&typeof b.height=="number"){X.value=Math.max(b.height,x.value?.height??0);return}if(b?.type==="piwiScrollTo"&&typeof b.y=="number"){const ae=B.value;ae&&ae.scrollTo({top:Math.max(0,b.y*m.value-80),behavior:"smooth"});return}if(b?.type==="piwiSearchResult"){G.value=typeof b.count=="number"?b.count:0,se.value=typeof b.index=="number"?b.index:-1;return}if(b?.type==="elementPicked"&&b.attrs){const{labelText:ae,...xe}=b.attrs;S.value={...xe,accessibleName:ae??_n(xe)},D.value=kn(S.value),F.value=null,y.value="review"}b?.type==="pickerClosed"&&oe()}function k(R){C.value?.contentWindow?.postMessage(R,"*")}function d(){const R=Tn({failingLocator:a.failingLocator,fromElementMatch:a.healing?.fromElementMatch??null,fromAriaSnapshot:a.healing?.fromAriaSnapshot??null});R.length&&k({type:"piwiHighlight",hints:R})}const O=Y(""),G=Y(0),se=Y(-1);let re=null;Ee(O,R=>{re&&clearTimeout(re),re=setTimeout(()=>k({type:"piwiSearch",q:R}),180)});function g(){k({type:"piwiSearchNext"})}Ae(()=>{re&&clearTimeout(re)});function z(R){if(!n.value||y.value!=="pick-element"||!w.value||R.key!=="ArrowUp"&&R.key!=="ArrowDown")return;const b=(document.activeElement?.tagName??"").toLowerCase();if(b==="input"||b==="textarea")return;const ae=C.value?.contentWindow;ae&&(R.preventDefault(),ae.postMessage({type:"piwiPickerKey",key:R.key},"*"))}function H(){C.value&&(C.value.src="about:blank")}rt(()=>{window.addEventListener("message",ce),window.addEventListener("keydown",z,!0)}),Ae(()=>{window.removeEventListener("message",ce),window.removeEventListener("keydown",z,!0)});const F=Y(null),te=Y(!1);function N(R){F.value=R}const J=I(()=>pt(a.failingLocator.method,D.value)),we=Je();async function W(){if(F.value){te.value=!0;try{(await $fetch(`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/locator-pick`,{method:"POST",body:{failingLocator:a.failingLocator,pickedLocator:F.value,element:S.value}})).status==="ok"?c("confirmed",F.value):we.add({title:"Pick not saved",description:"This failure has no call-site or locator signature to attach the pick to.",color:"warning",icon:"i-lucide-alert-triangle"}),n.value=!1}catch(R){we.add({title:"Could not save the pick",description:lt(R),color:"error",icon:"i-lucide-alert-triangle"})}finally{te.value=!1}}}function oe(){H(),n.value=!1}function ie(){S.value=null,D.value=[],F.value=null,y.value="pick-element",w.value=!1,O.value="",G.value=0,se.value=-1;const R=l.value?.html;R&&(U.value&&URL.revokeObjectURL(U.value),U.value=V(R))}const{copy:de}=He(),le=Y(null);let ye=null;function Te(R,b){de(R,{toast:"Locator copied"}),le.value=b,ye&&clearTimeout(ye),ye=setTimeout(()=>{le.value=null},2e3)}return Ae(()=>{ye&&clearTimeout(ye)}),(R,b)=>{const ae=$e,xe=Ie,Be=_t,Ke=Pe,gt=Qe,ht=Mt;return o(),q(ht,{open:n.value,"onUpdate:open":b[8]||(b[8]=be=>n.value=be),ui:{content:"max-w-6xl w-[95vw]"},onAfterLeave:oe},{header:A(()=>[...b[9]||(b[9]=[p("div",null,[p("h3",{class:"text-lg font-medium"},"Pick a locator from the DOM snapshot"),p("p",{class:"text-sm text-gray-500 mt-0.5"}," Click the element the failing locator should target. Use ↑↓ to walk the DOM tree. ")],-1)])]),body:A(()=>[t(s)?(o(),u("div",Rn,[_(ae,{name:"i-lucide-loader",class:"size-6 animate-spin text-gray-400"}),b[10]||(b[10]=p("span",{class:"ml-2 text-sm text-gray-500"},"Loading DOM snapshot...",-1))])):t(f)?(o(),u("div",In,[_(ae,{name:"i-lucide-alert-triangle",class:"size-8 text-red-300 mx-auto mb-2"}),b[12]||(b[12]=p("p",{class:"text-sm text-red-500"},"Failed to load snapshot",-1)),p("p",zn,$(t(f)),1),_(xe,{size:"xs",variant:"outline",color:"neutral",class:"mt-3",onClick:h},{default:A(()=>[...b[11]||(b[11]=[E("Retry",-1)])]),_:1})])):t(l)?.status!=="ok"||!t(l).html?(o(),u("div",Pn,[_(ae,{name:"i-lucide-file-x",class:"size-8 text-gray-300 mx-auto mb-2"}),b[13]||(b[13]=p("p",{class:"text-sm text-gray-500"},"No DOM snapshot or ARIA data available for this execution",-1)),b[14]||(b[14]=p("p",{class:"text-xs text-gray-400 mt-1"},"This test run has no stored trace or ARIA snapshot to pick from.",-1))])):(o(),u(ee,{key:3},[p("div",Bn,[t(l).source?(o(),u("div",{key:0,class:pe(["text-xs flex items-center gap-1",t(l).source==="aria"?"text-amber-600 dark:text-amber-400":"text-green-600 dark:text-green-400"])},[_(ae,{name:t(l).source==="aria"?"i-lucide-accessibility":"i-lucide-check",class:"size-3.5 shrink-0"},null,8,["name"]),t(l).source==="aria"?(o(),u(ee,{key:0},[E(" Accessibility tree from the failure-time ARIA snapshot — element styles are approximate ")],64)):(o(),u(ee,{key:1},[E(" Rendered from the failure-time DOM snapshot ")],64))],2)):T("",!0),t(v).length>1?(o(),u("div",En,[p("button",{type:"button",class:pe(["px-2 py-1 flex items-center gap-1 transition-colors",t(i)==="dom"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Rendered page from the trace",onClick:b[0]||(b[0]=be=>L("dom"))},[_(ae,{name:"i-lucide-layout-panel-top",class:"size-3.5"}),b[15]||(b[15]=E(" DOM ",-1))],2),p("button",{type:"button",class:pe(["px-2 py-1 flex items-center gap-1 border-l border-default transition-colors",t(i)==="aria"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Accessibility tree from the ARIA snapshot",onClick:b[1]||(b[1]=be=>L("aria"))},[_(ae,{name:"i-lucide-accessibility",class:"size-3.5"}),b[16]||(b[16]=E(" Tree ",-1))],2)])):T("",!0)]),t(x)?(o(),u("div",On,[_(xe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-out",title:"Zoom out",onClick:b[2]||(b[2]=be=>ge(1/1.25))}),p("span",Mn,$(t(ne))+"%",1),_(xe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-in",title:"Zoom in",onClick:b[3]||(b[3]=be=>ge(1.25))}),_(xe,{size:"xs",variant:"outline",color:"neutral",class:"ml-1",onClick:he},{default:A(()=>[...b[17]||(b[17]=[E("Fit",-1)])]),_:1}),p("span",Nn,$(t(x).width)+"×"+$(t(x).height),1)])):T("",!0),t(y)==="pick-element"?(o(),u("div",Un,[_(Be,{modelValue:t(O),"onUpdate:modelValue":b[4]||(b[4]=be=>Le(O)?O.value=be:null),size:"xs",icon:"i-lucide-search",placeholder:"Find an element by its text…",class:"max-w-xs",onKeydown:ke(_e(g,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),t(O)&&t(G)>0?(o(),u("span",jn,$(t(se)+1)+"/"+$(t(G)),1)):t(O)?(o(),u("span",Dn,"no matches")):T("",!0),t(G)>1?(o(),q(xe,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-chevron-down",title:"Next match (Enter)",onClick:g})):T("",!0)])):T("",!0),p("div",{ref_key:"stageRef",ref:B,class:pe(["relative border border-default rounded-lg overflow-auto",[t(y)==="pick-element"?"h-[75vh]":"h-80",t(x)?"bg-gray-100 dark:bg-gray-800":""]])},[t(w)?T("",!0):(o(),u("div",Kn,[_(ae,{name:"i-lucide-loader",class:"size-5 animate-spin text-gray-400"}),b[18]||(b[18]=p("span",{class:"ml-2 text-sm text-gray-500"},"Initializing picker...",-1))])),p("div",{style:et(t(P))},[p("iframe",{ref_key:"iframeRef",ref:C,src:t(U),style:et(t(j)),class:"bg-white",sandbox:"allow-scripts",title:"DOM snapshot"},null,12,Vn)],4)],2),t(y)==="review"&&t(S)?(o(),u("div",Hn,[p("div",Fn,[_(ae,{name:"i-lucide-crosshair",class:"size-5 text-primary shrink-0"}),p("div",qn,[p("p",Zn,[b[19]||(b[19]=E(" Picked: ",-1)),p("code",Wn,$(t(S).tagName),1),t(S).attributes.id?(o(),u("code",Jn,"#"+$(t(S).attributes.id),1)):T("",!0),t(S).attributes["data-testid"]?(o(),q(Ke,{key:1,size:"xs",color:"primary",variant:"subtle",class:"ml-1"},{default:A(()=>[E($(t(S).attributes["data-testid"]),1)]),_:1})):T("",!0)]),t(S).textContent?(o(),u("p",Yn,' "'+$(t(S).textContent)+'" ',1)):T("",!0)]),_(xe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-rotate-ccw",title:"Pick a different element",onClick:ie})]),p("div",Gn,[(o(!0),u(ee,null,fe(t(D),(be,Fe)=>(o(),q(dt,{key:Fe,alt:be,copied:t(le)===`picked-${Fe}`,dense:!0,selectable:!0,selected:t(F)?.locator===be.locator,onCopy:yt=>Te(be.locator,`picked-${Fe}`),onSelect:yt=>N(be)},null,8,["alt","copied","selected","onCopy","onSelect"]))),128))]),t(J).recommended?(o(),u("div",{key:0,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 flex items-center gap-3 cursor-pointer",role:"button",tabindex:"0",title:"Select this locator for Confirm",onClick:b[6]||(b[6]=be=>N(t(J).recommended)),onKeydown:b[7]||(b[7]=ke(_e(be=>N(t(J).recommended),["prevent"]),["enter"]))},[_(ae,{name:"i-lucide-star",class:"size-5 text-primary shrink-0"}),p("div",Qn,[p("p",Xn," Recommended (score: "+$(t(J).recommended.score)+") ",1),_(gt,{locator:t(J).recommended.locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"])]),_(xe,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(le)==="rec"?"i-lucide-check":"i-lucide-copy",onClick:b[5]||(b[5]=_e(be=>Te(t(J).recommended.locator,"rec"),["stop"]))},{default:A(()=>[...b[20]||(b[20]=[E(" Copy ",-1)])]),_:1},8,["trailing-icon"])],32)):T("",!0)])):T("",!0)],64))]),footer:A(()=>[p("div",eo,[t(y)==="review"?(o(),q(xe,{key:0,size:"sm",variant:"outline",color:"neutral",icon:"i-lucide-rotate-ccw",onClick:ie},{default:A(()=>[...b[21]||(b[21]=[E(" Pick a different element ",-1)])]),_:1})):(o(),u("div",to)),p("div",no,[_(xe,{size:"sm",variant:"outline",color:"neutral",onClick:oe},{default:A(()=>[...b[22]||(b[22]=[E("Cancel",-1)])]),_:1}),t(y)==="review"?(o(),q(xe,{key:0,size:"sm",color:"primary",loading:t(te),disabled:!t(F),onClick:W},{default:A(()=>[...b[23]||(b[23]=[E(" Confirm pick ",-1)])]),_:1},8,["loading","disabled"])):T("",!0)])])]),_:1},8,["open"])}}}),so=Object.assign(oo,{__name:"SnapshotLocatorPicker"});function ao(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ro(e,r){let a=0,c=null;for(let n=r;n<e.length;n++){const s=e[n];if(c){if(s==="\\"){n++;continue}s===c&&(c=null);continue}if(s==="'"||s==='"'||s==="`"){c=s;continue}if(s==="(")a++;else if(s===")"&&(a--,a===0))return n}return-1}function io(e,r,a){if(!e||!r||!a)return null;const c=new RegExp(`${ao(r)}\\s*\\(`,"g");let n;for(;(n=c.exec(e))!==null;){const s=n.index,l=s>0?e[s-1]:"";if(l&&/[A-Za-z0-9_$]/.test(l))continue;const f=s+n[0].lastIndexOf("("),i=ro(e,f);if(i===-1)return null;const h=e.slice(0,s)+a+e.slice(i+1);return h===e?null:{old:e,new:h}}return null}function lo(e,r){return`${r?`@@ ${r} @@
1
+ import{d as ue,b as Je,o,f as q,g as A,j as _,_ as Ie,m as E,i as p,k as t,l as Le,r as Y,K as vt,h as I,A as ze,c as u,P as xt,V as Oe,ae as bt,S as ke,C as _e,p as $e,q as pe,v as T,t as $,F as ee,L as kt,y as fe,s as Pe,H as at,J as Ee,af as Ae,B as rt,E as _t,R as et,I as We,ac as Re,G as $t,W as Ne,ag as Se,T as wt,ad as Ct,ah as Tt,ai as St,aj as At,a0 as Lt,a1 as Rt}from"./CNu3kken.js";import{_ as it,a as It}from"./CfhOanaF.js";import{_ as zt}from"./BjOFxi54.js";import{u as Pt}from"./jxc14CqP.js";import{a as He,u as Ue}from"./DprkT7rM.js";import{e as lt,u as Bt,v as Et,f as Ye,w as ct,n as Me,x as Ot}from"./DeewM3Wg.js";import{_ as Ge}from"./Ya8ZzWuY.js";import{_ as je}from"./Ce47NgZw.js";import{_ as Mt}from"./roaTZkYi.js";import{_ as Nt}from"./DNqm5cWU.js";import{_ as Ut}from"./FJTsZ5Aa.js";import{_ as jt}from"./DJzFYrBt.js";import{u as Dt,i as Kt,b as Vt}from"./9_aJhhcm.js";import{f as Ht}from"./D-c8ZSws.js";import{_ as ut}from"./Ce_j5NtN.js";import{_ as Ft}from"./B_JSV0yG.js";const qt={class:"w-64 p-1 space-y-0.5"},Zt={class:"flex items-center justify-between px-2 pt-1 pb-1"},Wt=ue({__name:"ExportMenu",props:{endpoint:{},baseName:{}},setup(e){const r=e,{download:a}=Pt(),{copy:c}=He(),n=Je(),s=Y(!1),l=Y(""),f=I(()=>(ze().app?.baseURL??"/").replace(/\/$/,""));function i(C){return`${f.value}${C}`}async function h(C){s.value=!1,await a(i(`${r.endpoint}?format=${C}`),`${r.baseName}.${C}`,{binary:C==="zip"})}function v(){s.value=!1,window.open(i(`${r.endpoint}?format=html&print=1`),"_blank")}async function L(C,w,S){l.value=w;try{const D=await fetch(i(C));if(!D.ok)throw new Error(`Request failed (${D.status})`);const U=await D.text();c(S?S(U):U,{toast:`${w} copied`}),s.value=!1}catch(D){n.add({title:`Could not copy ${w.toLowerCase()}`,description:lt(D),color:"error"})}finally{l.value=""}}function y(){return L(`${r.endpoint}?format=md`,"Report")}return(C,w)=>{const S=Ie,D=it,U=zt,V=vt;return o(),q(V,{open:t(s),"onUpdate:open":w[4]||(w[4]=B=>Le(s)?s.value=B:null)},{content:A(()=>[p("div",qt,[p("div",Zt,[w[6]||(w[6]=p("p",{class:"text-xs font-medium text-gray-500"},"Download",-1)),_(D,{topic:"export.offline"})]),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-code",title:"One self-contained HTML file with screenshots and video embedded",onClick:w[0]||(w[0]=B=>h("html"))},{default:A(()=>[...w[7]||(w[7]=[E(" HTML — single file ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-archive",title:"Report plus the raw artifacts, including trace archives and data.json",onClick:w[1]||(w[1]=B=>h("zip"))},{default:A(()=>[...w[8]||(w[8]=[E(" ZIP — with all evidence ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-printer",title:"Opens the report with your browser's print dialog, for Save as PDF",onClick:v},{default:A(()=>[...w[9]||(w[9]=[E(" PDF — via print ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-text",title:"The Markdown report as a file",onClick:w[2]||(w[2]=B=>h("md"))},{default:A(()=>[...w[10]||(w[10]=[E(" Markdown ",-1)])]),_:1}),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-file-json",title:"Everything the report contains, machine-readable",onClick:w[3]||(w[3]=B=>h("json"))},{default:A(()=>[...w[11]||(w[11]=[E(" JSON ",-1)])]),_:1}),_(U,{class:"my-1"}),w[13]||(w[13]=p("p",{class:"text-xs font-medium text-gray-500 px-2 pt-1 pb-1"},"Copy to clipboard",-1)),_(S,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard-list",loading:t(l)==="Report",title:"The whole investigation as Markdown, for an issue or a chat",onClick:y},{default:A(()=>[...w[12]||(w[12]=[E(" Report (Markdown) ",-1)])]),_:1},8,["loading"])])]),default:A(()=>[_(S,{icon:"i-lucide-share",size:"xs",color:"neutral",variant:"outline",title:"Take this investigation away"},{default:A(()=>[...w[5]||(w[5]=[E(" Export ",-1)])]),_:1})]),_:1},8,["open"])}}}),Oa=Object.assign(Wt,{__name:"ExportMenu"}),Jt={class:"flex items-center justify-between gap-2"},Yt=["aria-expanded","title"],Gt={class:"text-lg font-medium inline-flex items-center gap-1 shrink-0"},Qt={key:2,class:"min-w-0 flex-1 truncate text-sm text-gray-500 dark:text-gray-400"},Xt={key:0,class:"flex items-center gap-1 shrink-0"},en={key:0,class:"text-sm text-gray-500 mt-1 ml-11"},tn=ue({__name:"CollapsibleSectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{},storageKey:{},defaultFolded:{type:Boolean,default:!0}},setup(e,{expose:r}){const a=e,{folded:c,toggle:n,setFolded:s}=Dt(`piwi-section-fold-${a.storageKey}`,a.defaultFolded),l=Y(null);function f(){s(!1),kt(()=>l.value?.scrollIntoView({behavior:"smooth",block:"start"}))}return r({setFolded:s,reveal:f}),(i,h)=>{const v=$e,L=it,y=Ft;return o(),u("div",{ref_key:"rootEl",ref:l,class:"scroll-mt-4"},[_(y,{ui:{header:"p-3 sm:px-4 sm:py-3",body:t(c)?"p-0 sm:p-0":""},class:pe(t(c)&&"divide-y-0")},{header:A(()=>[p("div",Jt,[p("div",{class:"flex items-center gap-2 min-w-0 flex-1 cursor-pointer select-none rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-expanded":!t(c),title:t(c)?"Expand section":"Collapse section",onClick:h[1]||(h[1]=(...C)=>t(n)&&t(n)(...C)),onKeydown:[h[2]||(h[2]=ke((...C)=>t(n)&&t(n)(...C),["enter"])),h[3]||(h[3]=ke(_e((...C)=>t(n)&&t(n)(...C),["prevent"]),["space"]))]},[_(v,{name:t(c)?"i-lucide-chevron-right":"i-lucide-chevron-down",class:"size-4 shrink-0 text-gray-400"},null,8,["name"]),e.icon?(o(),q(v,{key:0,name:e.icon,class:pe(["size-5 shrink-0",e.iconClass])},null,8,["name","class"])):T("",!0),p("h3",Gt,[E($(e.title),1),e.count!=null?(o(),u(ee,{key:0},[E(" ("+$(e.count)+")",1)],64)):T("",!0)]),e.help?(o(),u("span",{key:1,onClick:h[0]||(h[0]=_e(()=>{},["stop"]))},[_(L,{topic:e.help},null,8,["topic"])])):T("",!0),t(c)&&i.$slots.folded?(o(),u("span",Qt,[Oe(i.$slots,"folded")])):T("",!0)],40,Yt),i.$slots.actions?(o(),u("div",Xt,[Oe(i.$slots,"actions")])):T("",!0)]),!t(c)&&(e.subtitle||i.$slots.subtitle)?(o(),u("p",en,[Oe(i.$slots,"subtitle",{},()=>[E($(e.subtitle),1)])])):T("",!0)]),default:A(()=>[xt(p("div",null,[Oe(i.$slots,"default")],512),[[bt,!t(c)]])]),_:3},8,["ui","class"])],512)}}}),De=Object.assign(tn,{__name:"CollapsibleSectionCard"}),nn=/('(?:\\.|[^'])*'|"(?:\\.|[^"])*")|([A-Za-z_$][\w$]*)(?=\s*\()|([A-Za-z_$][\w$]*)(?=\s*:)|(true|false|null|\d+)|([{}(),.])/g;function on(e){const r=[],a=new RegExp(nn.source,"g");let c=0,n;for(;(n=a.exec(e))!==null;){n.index>c&&r.push({kind:"plain",text:e.slice(c,n.index)});const s=n[1]?"string":n[2]?"method":n[3]?"option":n[4]?"literal":"punctuation";r.push({kind:s,text:n[0]}),c=a.lastIndex}return c<e.length&&r.push({kind:"plain",text:e.slice(c)}),r}const sn=["title"],an=ue({__name:"LocatorCode",props:{locator:{},truncate:{type:Boolean,default:!1}},setup(e){const r=e,a={method:"text-violet-700 dark:text-violet-300",string:"text-green-700 dark:text-green-300",option:"text-blue-700 dark:text-blue-300",literal:"text-amber-700 dark:text-amber-300",punctuation:"text-gray-500 dark:text-gray-400",plain:""},c=I(()=>on(r.locator));return(n,s)=>(o(),u("code",{class:pe(["font-mono",e.truncate?"block truncate":"break-words"]),title:e.locator},[(o(!0),u(ee,null,fe(t(c),(l,f)=>(o(),u("span",{key:f,class:pe(a[l.kind])},$(l.text),3))),128))],10,sn))}}),Qe=Object.assign(an,{__name:"LocatorCode"}),rn={class:"overflow-x-auto text-xs font-mono"},ln=ue({__name:"DiffPatch",props:{patch:{}},setup(e){return(r,a)=>(o(),u("div",rn,[(o(!0),u(ee,null,fe(("parsePatchLines"in r?r.parsePatchLines:t(Et))(e.patch),(c,n)=>(o(),u("div",{key:n,class:pe(["px-3 py-px whitespace-pre leading-5 min-w-0",("patchLineClass"in r?r.patchLineClass:t(Bt))[c.type]])},$(c.text||" "),3))),128))]))}}),cn=Object.assign(ln,{__name:"DiffPatch"}),un=["role","aria-checked","tabindex"],dn={class:"flex-1 min-w-0"},pn={key:0,class:"text-[11px] leading-4 text-gray-500 truncate"},fn=ue({__name:"LocatorAlternativeRow",props:{alt:{},note:{default:void 0},copied:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1}},emits:["copy","select"],setup(e){const r=e;function a(s){return s>=80?"success":s>=50?"warning":"error"}function c(s){const{method:l,score:f,args:i}=s;return i&&(i.anchorTestId||i.anchorSelector||i.anchorRole)?"scoped to a stable ancestor — survives renames":f>=100?"most stable — purpose-built for testing":l==="getByRole"&&i&&!("name"in i)?"name-free role — survives renames":l==="getByRole"?"browser ARIA tree — semantic and stable":l==="getByLabel"?"associated <label> element":l==="getByPlaceholder"?"input placeholder":l==="getByText"?"visible text":l==="getByAltText"?"image alt text":l==="getByTitle"?"title attribute":l==="locator"&&f>=50?"stable selector":l==="locator"?"CSS class — may be fragile":""}const n=I(()=>r.note??c(r.alt));return(s,l)=>{const f=Pe,i=Qe,h=$e,v=Ie;return o(),u("div",{class:pe(["flex items-center gap-2 rounded border",[e.dense?"py-1 px-2":"py-1.5 px-2.5",e.selectable?"cursor-pointer hover:bg-elevated transition-colors focus-visible:outline-2 focus-visible:outline-primary":"",e.selectable&&e.selected?"border-primary/60 ring-1 ring-primary/50":"border-default/50"]]),role:e.selectable?"radio":void 0,"aria-checked":e.selectable?e.selected:void 0,tabindex:e.selectable?0:void 0,onClick:l[1]||(l[1]=L=>e.selectable&&s.$emit("select")),onKeydown:[l[2]||(l[2]=ke(_e(L=>e.selectable&&s.$emit("select"),["prevent"]),["enter"])),l[3]||(l[3]=ke(_e(L=>e.selectable&&s.$emit("select"),["prevent"]),["space"]))]},[_(f,{size:"xs",color:a(e.alt.score),variant:"subtle",class:pe(["shrink-0 font-mono tabular-nums cursor-default text-center",e.dense?"min-w-[2.25rem]":"min-w-[2.5rem]"]),title:`Stability score: ${e.alt.score}/100`},{default:A(()=>[E($(e.alt.score),1)]),_:1},8,["color","class","title"]),p("div",dn,[_(i,{locator:e.alt.locator,truncate:"",class:"text-xs"},null,8,["locator"]),t(n)?(o(),u("p",pn,$(t(n)),1)):T("",!0)]),e.alt.pickedByUser&&e.dense?(o(),q(h,{key:0,name:"i-lucide-user-check",class:"size-3.5 text-primary shrink-0",title:"Confirmed with the locator picker"})):e.alt.pickedByUser?(o(),q(f,{key:1,size:"xs",color:"primary",variant:"subtle",icon:"i-lucide-user-check",class:"shrink-0",title:"Confirmed with the locator picker on the failing page"})):T("",!0),_(v,{size:"xs",variant:"ghost",color:"neutral",icon:e.copied?"i-lucide-check":"i-lucide-copy",title:e.copied?"Copied!":"Copy",class:"shrink-0",onClick:l[0]||(l[0]=_e(L=>s.$emit("copy"),["stop"]))},null,8,["icon","title"])],42,un)}}}),dt=Object.assign(fn,{__name:"LocatorAlternativeRow"}),tt={getByTestId:"testid",getByRole:"semantic",getByLabel:"label",getByPlaceholder:"label",getByText:"text",getByAltText:"text",getByTitle:"text",locator:"css","page.locator":"css"},mn=50;function pt(e,r,a=mn){const c=r[0]??null;if(!c)return{recommended:null,durable:null,preservesConvention:!1,hasDurableAlternative:!1,suggestAddTestId:!1};const n=e?tt[e]:void 0,s=(e?r.find(i=>i.method===e&&i.score>=a):void 0)??(n?r.find(i=>tt[i.method]===n&&i.score>=a):void 0),f=r.find(i=>i.pickedByUser)??s??c;return{recommended:f,durable:c,preservesConvention:!!s&&f===s,hasDurableAlternative:f.locator!==c.locator,suggestAddTestId:c.score<a}}const ft={a:"link",button:"button",nav:"navigation",main:"main",article:"article",section:"region",form:"form",img:"img",figure:"figure",figcaption:"caption",blockquote:"blockquote",table:"table",caption:"caption",thead:"rowgroup",tbody:"rowgroup",tfoot:"rowgroup",tr:"row",td:"cell",ul:"list",ol:"list",li:"listitem",dialog:"dialog",output:"status",progress:"progressbar",meter:"meter",textarea:"textbox",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",details:"group",summary:"button",search:"search"},gn={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",search:"searchbox",number:"spinbutton",text:"textbox",email:"textbox",tel:"textbox",url:"textbox",password:"textbox"},hn=["id","class","name","data-testid","placeholder","alt","title","aria-label","aria-level","role","type","href","multiple"];function yn(e){const r=e.attributes.role;if(r)return r;const a=e.tagName;if(!a)return null;if(a==="input"){const c=(e.attributes.type??"text").toLowerCase();return gn[c]??"textbox"}return a==="select"?e.attributes.multiple!=null?"listbox":"combobox":a==="a"?e.attributes.href!=null?"link":null:ft[a]??null}function vn(e,r){if(r!=="heading")return null;const a=e.tagName.match(/^h([1-6])$/);if(a)return Number(a[1]);const c=e.attributes["aria-level"];return c&&/^\d+$/.test(c)?Number(c):null}const Ce=(e,r)=>e.attributes[r]||null,ve=e=>e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),Ve=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),nt=e=>/^[A-Za-z][A-Za-z0-9_-]*$/.test(e);function xn(e){return/[a-f0-9]{8,}/i.test(e)?10:/^(?:css|sc|emotion|styled)-/i.test(e)?15:/^(bg|text|border|shadow|opacity|font|w-|h-|m[tblrxy]?-|p[tblrxy]?-|flex|grid|gap|rounded|absolute|relative|fixed|sticky|block|inline|hidden|overflow|z-|top-|right-|bottom-|left-|inset-|justify-|items-|self-|content-|order-|col-|row-)/.test(e)?25:/__/.test(e)||/--/.test(e)?35:/^[a-z]+(-[a-z]+)+$/.test(e)||/^[a-z]+[A-Z][a-zA-Z]+$/.test(e)?40:(e.includes("_")||/^[a-z]+-[a-z0-9]{5,}$/.test(e)&&/[0-9]/.test(e),15)}function ot(e){return!!(/^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$/i.test(e)||/^[a-f0-9]{8,}$/i.test(e)||/^[a-z]+-\d{4,}$/.test(e)||/^(tab|panel|input|select|option|dialog|modal|popup|tooltip|menu|listbox|combobox|checkbox|radio|textarea|button|field|label|accordion|collapse|step|slider|toggle|switch|dropdown|overlay|portal|layer)-\d+$/i.test(e)||/^(emotion-|styled-|css-|sc-)/.test(e)||e.startsWith("ng-")||/^(radix-|headlessui-|mui-|mantine-|chakra-)/i.test(e)||/^:r[0-9a-z]+:$/i.test(e)||/^«r[0-9a-z]+»$/i.test(e))}const bn=new Set(["data-test","data-test-id","data-qa","data-qa-id","data-cy","data-e2e"]);function kn(e){const r=[],a=new Set,c=x=>{a.has(x.locator)||(a.add(x.locator),r.push(x))},{accessibleName:n}=e,s=e.tagName,l=yn(e),f=e.selectorCounts,i=x=>x==null||x<=1,h=x=>x!=null&&x>1?45:0,v=e.textContent?e.textContent.replace(/\s+/g," ").trim():null,L=Ce(e,"data-testid");L&&i(f?.testId)&&c({locator:`getByTestId('${ve(L)}')`,method:"getByTestId",args:{testId:L},score:100});const y=vn(e,l),C=y!=null?`, level: ${y}`:"",w=x=>y!=null?{...x,level:y}:x;l&&n&&c({locator:`getByRole('${l}', { name: '${ve(n)}'${C} })`,method:"getByRole",args:w({role:l,name:n}),score:90-h(f?.roleName)});const S=Ce(e,"aria-label");if(l&&S&&S!==n&&c({locator:`getByRole('${l}', { name: '${ve(S)}'${C} })`,method:"getByRole",args:w({role:l,name:S}),score:85-h(f?.roleName)}),n&&["input","select","textarea"].includes(s)){const x=Ce(e,"aria-label");(e.hasLabel===void 0||e.hasLabel===!0||x===n)&&c({locator:`getByLabel('${ve(n)}')`,method:"getByLabel",args:{label:n},score:85})}const D=Ce(e,"placeholder");D&&c({locator:`getByPlaceholder('${ve(D)}')`,method:"getByPlaceholder",args:{placeholder:D},score:80-h(f?.placeholder)}),v&&v.length<80&&c({locator:`getByText('${ve(v)}')`,method:"getByText",args:{text:v},score:75-h(f?.text)});const U=Ce(e,"id");if(U&&!ot(U)&&i(f?.id)){const x=nt(U)?`#${U}`:`[id="${Ve(U)}"]`;c({locator:`locator('${ve(x)}')`,method:"locator",args:{selector:x},score:65})}const V=Ce(e,"name");if(V&&i(f?.name)){const x=`[name="${Ve(V)}"]`;c({locator:`locator('${ve(x)}')`,method:"locator",args:{selector:x},score:60})}const B=Ce(e,"alt");B&&c({locator:`getByAltText('${ve(B)}')`,method:"getByAltText",args:{text:B},score:60-h(f?.alt)});const Q=Ce(e,"title");Q&&c({locator:`getByTitle('${ve(Q)}')`,method:"getByTitle",args:{title:Q},score:50-h(f?.title)});const X=!!(L&&i(f?.testId)),m=(x,K,P)=>{let j=!1,ne=!1,me=!1,ge=!1,he=!1;for(const Z of e.ancestors??[]){if(K(Z)!==1)continue;if(!j&&Z.testId&&Z.testIdCount===1&&(j=!0,c({locator:`getByTestId('${ve(Z.testId)}').${x.expr}`,method:x.method,args:{...x.args,anchorTestId:Z.testId},score:P.testId})),!ne&&Z.id&&!ot(Z.id)&&Z.idCount===1){ne=!0;const k=nt(Z.id)?`#${Z.id}`:`[id="${Ve(Z.id)}"]`;c({locator:`locator('${ve(k)}').${x.expr}`,method:x.method,args:{...x.args,anchorSelector:k},score:P.id})}if(!ge&&Z.dataAttr&&Z.dataAttrCount===1){ge=!0;const{name:k,value:d}=Z.dataAttr,O=`[${k}="${Ve(d)}"]`;c({locator:`locator('${ve(O)}').${x.expr}`,method:x.method,args:{...x.args,anchorSelector:O},score:bn.has(k)?P.testData:P.data})}const ce=Z.role||ft[Z.tag]||null;!me&&ce&&ce!==x.role&&Z.roleCount===1&&(me=!0,c({locator:`getByRole('${ve(ce)}').${x.expr}`,method:x.method,args:{...x.args,anchorRole:ce},score:P.role})),!he&&ce&&Z.filterText&&Z.filterRoleCount===1&&(he=!0,c({locator:`getByRole('${ve(ce)}').filter({ hasText: '${ve(Z.filterText)}' }).${x.expr}`,method:x.method,args:{...x.args,anchorRole:ce,anchorHasText:Z.filterText},score:P.filter}))}};if(l&&!X){const x=y!=null?`'${l}', { level: ${y} }`:`'${l}'`,K=w({role:l});m({expr:`getByRole(${x})`,method:"getByRole",args:K,role:l},j=>j.scopedRoleCount,{testId:72,testData:70,id:64,data:60,role:55,filter:53});const P=e.rolePosition;P&&P.role===l&&(P.count===1||y!=null&&P.levelCount===1)&&c({locator:`getByRole(${x})`,method:"getByRole",args:K,score:58})}else!l&&v&&v.length<80&&!X&&m({expr:`getByText('${ve(v)}')`,method:"getByText",args:{text:v},role:null},x=>x.scopedTextCount,{testId:68,testData:66,id:60,data:56,role:51,filter:49});const M=Ce(e,"class");if(M){const x=f?.classes,K=M.split(/\s+/).filter(P=>P.length>1&&/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(P)&&i(x?.[P])).map(P=>({cls:P,score:xn(P)})).sort((P,j)=>j.score-P.score).slice(0,3);for(const{cls:P,score:j}of K)c({locator:`locator('.${ve(P)}')`,method:"locator",args:{selector:`.${P}`},score:j})}return r.sort((x,K)=>K.score-x.score)}function _n(e){const r=e.attributes,a=r["aria-label"];if(a)return a;if(e.textContent)return e.textContent;const c=r.title;if(c)return c;const n=r.placeholder;return n||null}function $n(e,r){const{keep:a,tagRoles:c,inputRoles:n,roleSources:s,includeStructural:l,includeLabelText:f}=r,i={};for(const S of a){const D=e.getAttribute(S)??e[S];i[S]=typeof D=="string"?D.slice(0,200):D?String(D).slice(0,200):null}const h=e.getBoundingClientRect(),v={};try{const S=e.ownerDocument,D=B=>S.defaultView.CSS.escape(B),U=B=>{try{return S.querySelectorAll(B).length}catch{return}};i["data-testid"]&&(v.testId=U(`[data-testid=${JSON.stringify(i["data-testid"])}]`)),i.id&&(v.id=U(`#${D(i.id)}`)),i.name&&(v.name=U(`[name=${JSON.stringify(i.name)}]`)),i.placeholder&&(v.placeholder=U(`[placeholder=${JSON.stringify(i.placeholder)}]`)),i.alt&&(v.alt=U(`[alt=${JSON.stringify(i.alt)}]`)),i.title&&(v.title=U(`[title=${JSON.stringify(i.title)}]`));const V=(i.class||"").split(/\s+/).filter(B=>B.length>1).slice(0,10);if(V.length>0){const B={};for(const Q of V){const X=U(`.${D(Q)}`);X!==void 0&&(B[Q]=X)}v.classes=B}}catch{}let L=null;const y=[];if(l&&c&&n&&s)try{const S=e.ownerDocument,D=k=>S.defaultView.CSS.escape(k),U=k=>{try{return S.querySelectorAll(k).length}catch{return}},V=new Map,B=new Map,Q=k=>{const d=V.get(k);if(d!==void 0)return d;let O;const G=k.getAttribute("role");if(G)O=G;else{const se=(k.tagName||"").toLowerCase();se==="input"?O=n[(k.getAttribute("type")||"text").toLowerCase()]??"textbox":se==="select"?O=k.getAttribute("multiple")!=null?"listbox":"combobox":se==="a"?O=k.getAttribute("href")!=null?"link":null:O=c[se]??null}return V.set(k,O),O},X=k=>{const d=/^h([1-6])$/.exec((k.tagName||"").toLowerCase());if(d)return Number(d[1]);const O=k.getAttribute("aria-level");return O&&/^\d+$/.test(O)?Number(O):null},m=Q(e),M=m==="heading"?X(e):null,x=k=>{const d=k.getAttribute("aria-label");if(d)return d;const O=(k.textContent||"").replace(/\s+/g," ").trim();return O||k.getAttribute("title")||k.getAttribute("placeholder")||null},K=x(e),P=(e.textContent||"").replace(/\s+/g," ").trim(),j=P?P.toLowerCase():null,ne=k=>{const d=B.get(k);if(d!==void 0)return d;const O=(k.textContent||"").replace(/\s+/g," ").trim().toLowerCase();return B.set(k,O),O},me=2,ge=(k,d)=>{if(!j)return-1;const O=k.querySelectorAll("*");if(O.length>d)return-1;let G=0;for(let se=0;se<O.length;se++){const re=O[se];if(ne(re).indexOf(j)===-1)continue;let g=!1;const z=re.children;for(let H=0;H<z.length;H++)if(ne(z[H]).indexOf(j)!==-1){g=!0;break}if(g||G++,G>=me)return G}return G},he=S.querySelectorAll(s),Z=he.length<=4e3,ce=!!m&&Z;if(ce){let k=0,d=-1,O=0,G=0;for(let se=0;se<he.length;se++){const re=he[se];Q(re)===m&&(re===e&&(d=k),k++,M!=null&&X(re)===M&&O++,K!=null&&x(re)===K&&G++)}K!=null&&(v.roleName=G),d!==-1&&(L={role:m,count:k,index:d,...M!=null?{levelCount:O}:{}})}if(j){const k=ge(S.body||S.documentElement,4e3);k>=0&&(v.text=k)}if(ce||j){const k=["form","nav","main","article","section","dialog","table","li","tr"],d=/^data-(v-[0-9a-f]+|reactid|react-checksum|svelte-\w+|ng-\w+|ember\w*)$/i,O=/^data-(index|idx|i|key|row|rownum|col|column|position|pos|order|sort|offset|page)$/i,G=["data-test","data-test-id","data-qa","data-qa-id","data-cy","data-e2e"],se=(W,oe)=>!W||W.slice(0,5)!=="data-"||W==="data-testid"||d.test(W)||O.test(W)?!1:!!oe&&oe.length<=120,re=W=>{const oe=W.attributes;if(!oe)return null;let ie=null;for(let de=0;de<oe.length;de++){const le=oe[de].name,ye=oe[de].value;if(se(le,ye)){if(G.indexOf(le.toLowerCase())!==-1)return{name:le,value:ye};ie||(ie={name:le,value:ye})}}return ie},g=W=>{let oe=0;for(let ie=0;ie<he.length;ie++)Q(he[ie])===W&&oe++;return oe},z=W=>(W.textContent||"").replace(/\s+/g," ").trim(),H=W=>{const oe=W.replace(/[^A-Za-z]/g,"").length;return oe<2?!1:W.replace(/[^0-9]/g,"").length<=oe},F=W=>!!W&&W.length<=60&&W!==P&&H(W),te=W=>{const oe=W.querySelector('h1,h2,h3,h4,h5,h6,[role="heading"]');if(oe){const de=z(oe);if(F(de))return de}const ie=W.querySelectorAll("*");if(ie.length>200)return null;for(let de=0;de<ie.length;de++){const le=ie[de];if(le===e||le.children.length>0)continue;const ye=z(le);if(F(ye))return ye}return null},N=(W,oe)=>{const ie=oe.toLowerCase();let de=0;for(let le=0;le<he.length;le++)Q(he[le])===W&&ne(he[le]).indexOf(ie)!==-1&&de++;return de};let J=e.parentElement,we=0;for(;J&&we<12&&y.length<4;){we++;const W=(J.tagName||"").toLowerCase();if(W==="body"||W==="html")break;const oe=J.getAttribute("data-testid"),ie=J.getAttribute("id"),de=J.getAttribute("role"),le=J.getAttribute("aria-label"),ye=de||(k.includes(W)?c[W]:null)||null,Te=re(J);if(oe||ie||ye||le||Te){let R=-1;if(ce){const xe=J.querySelectorAll(s);if(xe.length<=2e3){R=0;for(let Be=0;Be<xe.length;Be++){const Ke=xe[Be];Q(Ke)===m&&(M!=null&&X(Ke)!==M||R++)}}}const b=ge(J,2e3);let ae=null;try{ye&&Z&&(ae=te(J))}catch{ae=null}y.push({tag:W,depth:we,testId:oe||null,id:ie||null,role:de||null,ariaLabel:le||null,...R>=0?{scopedRoleCount:R}:{},...b>=0?{scopedTextCount:b}:{},...oe?{testIdCount:U(`[data-testid=${JSON.stringify(oe)}]`)}:{},...ie?{idCount:U(`#${D(ie)}`)}:{},...ye&&Z?{roleCount:g(ye)}:{},...ae?{filterText:ae,filterRoleCount:N(ye,ae)}:{},...Te?{dataAttr:Te,dataAttrCount:U(`[${Te.name}=${JSON.stringify(Te.value)}]`)}:{}})}J=J.parentElement}}}catch{}const C=!!(e.labels&&e.labels.length>0),w=f?C&&(e.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,120)||null:void 0;return{tagName:e.tagName?.toLowerCase?.()??"unknown",attributes:i,textContent:(e.textContent||"").replace(/\s+/g," ").trim().slice(0,80),center:{x:Math.round(h.x+h.width/2),y:Math.round(h.y+h.height/2)},hasLabel:C,...f?{labelText:w}:{},selectorCounts:v,...l?{rolePosition:L,ancestors:y}:{}}}function wn(e){const r=globalThis,a=r.document;if(!a||!a.body){e.transport==="postMessage"?r.parent.postMessage({type:"pickerClosed"},"*"):r.__piwiPickState="skipped";return}const c=2147483600,n=a.createElement("div");n.id="__piwi_picker_highlight",n.style.cssText=`position:fixed;pointer-events:none;z-index:${c};display:none;box-sizing:border-box;border:2px solid #a855f7;background:rgba(168,85,247,.14);border-radius:4px;box-shadow:0 0 0 1px rgba(255,255,255,.9),0 0 0 3px rgba(59,7,100,.55),inset 0 0 0 1px rgba(255,255,255,.5);`;const s=a.createElement("div");s.id="__piwi_picker_banner",s.style.cssText=`position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:${c+2};background:#111827;color:#f9fafb;font:13px/1.5 system-ui,sans-serif;border:1px solid #312e81;padding:10px 16px;border-radius:10px;box-shadow:0 4px 24px rgba(0,0,0,.5);max-width:min(680px,86vw);`;const l=g=>{const z=J=>J.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),H=/('(?:\\.|[^'])*'|"(?:\\.|[^"])*")|([A-Za-z_$][\w$]*)(?=\s*\()|([A-Za-z_$][\w$]*)(?=\s*:)|(true|false|null|\d+)|([{}(),.])/g;let F="",te=0,N;for(;(N=H.exec(g))!==null;){N.index>te&&(F+=z(g.slice(te,N.index)));const J=N[1]?"#86efac":N[2]?"#d8b4fe":N[3]?"#93c5fd":N[4]?"#fcd34d":"#9ca3af";F+=`<span style="color:${J}">${z(N[0])}</span>`,te=H.lastIndex}return te<g.length&&(F+=z(g.slice(te))),F},f="ui-monospace,SFMono-Regular,Menlo,Consolas,monospace",i=g=>`<code style="font-family:${f}">${l(g)}</code>`,h=a.createElement("div");h.innerHTML=e.transport==="postMessage"?"Click an element to generate locators":e.failing?`Piwi locator picker — click the element that should replace ${i(e.failing)}`:"Piwi inspector — click any element to generate locators for it";const v=a.createElement("div");v.id="__piwi_picker_locator",v.style.cssText=`display:none;margin-top:7px;padding:5px 9px;border-radius:7px;background:#0b1120;border:1px solid #4c1d95;font:13.5px/1.55 ${f};word-break:break-word;overflow-wrap:anywhere;`;const L=a.createElement("div");L.id="__piwi_picker_foot",L.style.cssText="color:#9ca3af;margin-top:6px;font-size:12px;",L.textContent="↑ parent · ↓ child · Esc skip",s.appendChild(h),s.appendChild(v),s.appendChild(L);const y=a.createElement("div");y.id="__piwi_picker_label",y.style.cssText=`position:fixed;pointer-events:none;z-index:${c+1};display:none;box-sizing:border-box;max-width:min(620px,92vw);background:#0b1120;color:#f9fafb;border:1px solid #7c3aed;border-radius:7px;padding:4px 8px;font:12.5px/1.45 ${f};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 4px 18px rgba(0,0,0,.5);`,a.body.appendChild(n),a.body.appendChild(y),a.body.appendChild(s);const C=g=>g.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),w=g=>{const z=(g.tagName||"?").toLowerCase(),H=g.getAttribute&&g.getAttribute("data-testid");if(H)return`getByTestId('${C(H)}')`;if(g.labels&&g.labels.length>0){const W=(g.labels[0].textContent||"").replace(/\s+/g," ").trim().slice(0,80);if(W)return`getByLabel('${C(W)}')`}const F=g.getAttribute&&g.getAttribute("aria-label");if(F)return`getByLabel('${C(F)}')`;const te=g.getAttribute&&g.getAttribute("placeholder");if(te)return`getByPlaceholder('${C(te)}')`;const N=g.getAttribute&&g.getAttribute("alt");if(N)return`getByAltText('${C(N)}')`;const J=g.getAttribute&&g.getAttribute("title");if(J)return`getByTitle('${C(J)}')`;if(g.id)return`locator('#${C(g.id)}')`;const we=(g.getAttribute&&g.getAttribute("class")||"").split(/\s+/).find(W=>W.length>1);return we?`locator('.${C(we)}')`:z},S=g=>{const z=[];let H=g;for(;H&&z.length<15;){const F=(H.tagName||"").toLowerCase();if(F==="body"||F==="html")break;z.push(H),H=H.parentElement}return z.length?z:[g]},D=["button","a","input","select","textarea","summary","option"],U=g=>{for(let z=0;z<Math.min(g.length,4);z++){const H=g[z],F=(H.tagName||"").toLowerCase();if(D.includes(F)||H.getAttribute&&(H.getAttribute("role")||H.getAttribute("data-testid")))return z}return 0},V=g=>{const z=r.__piwiDescribeElement;if(typeof z=="function")try{const H=z(g);if(typeof H=="string"&&H)return H}catch{}return w(g)};let B=[],Q=0,X=null,m=null;const M=g=>{y.style.display="block";const z=y.getBoundingClientRect(),H=r.innerWidth||a.documentElement.clientWidth||0,F=r.innerHeight||a.documentElement.clientHeight||0;let te=g.top-z.height-6;te<4&&(te=g.bottom+6),te+z.height>F-4&&(te=Math.max(4,F-z.height-4));let N=g.left;N+z.width>H-6&&(N=H-z.width-6),N<6&&(N=6),y.style.left=N+"px",y.style.top=te+"px"},x=()=>B[Q]??null,K=()=>{const g=x();if(!g){n.style.display="none",y.style.display="none";return}const z=g.getBoundingClientRect();if(n.style.display="block",n.style.left=z.left+"px",n.style.top=z.top+"px",n.style.width=z.width+"px",n.style.height=z.height+"px",g!==m){m=g;const H=(g.tagName||"?").toLowerCase(),F=l(V(g));y.innerHTML=`<span style="color:#c4b5fd">&lt;${H}&gt;</span> ${F}`,v.innerHTML=F,v.style.display="block"}M(z),L.textContent="click to pick · ↑ parent · ↓ child · Esc skip"},P=g=>{g.preventDefault(),g.stopImmediatePropagation()},j=g=>g===s||g===n||g===y||s.contains&&s.contains(g)||!!(g&&g.__piwiHint);let ne="top";const me=g=>{ne!==g&&(ne=g,g==="bottom"?(s.style.top="auto",s.style.bottom="12px"):(s.style.top="12px",s.style.bottom="auto"))},ge=g=>{const z=g.target;if(!z||j(z)){n.style.display="none",y.style.display="none";return}z!==X&&(X=z,B=S(z),Q=U(B)),K();const H=x();if(H){const F=H.getBoundingClientRect(),te=s.getBoundingClientRect(),N=8;F.left<te.right+N&&F.right>te.left-N&&F.top<te.bottom+N&&F.bottom>te.top-N&&me(ne==="top"?"bottom":"top")}},he=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick"],Z=()=>{a.removeEventListener("mousemove",ge,!0),a.removeEventListener("click",G,!0),a.removeEventListener("keydown",se,!0),e.transport==="postMessage"&&r.removeEventListener("message",re,!1)},ce=()=>{for(const g of he)a.removeEventListener(g,P,!0)},k=()=>{n.remove(),y.remove(),s.remove()},d=g=>{if(Z(),n.style.display="none",y.style.display="none",e.transport==="postMessage"){const z=r.__piwiProbe,H=typeof z=="function"?z(g,e.probeArg):null;r.__piwiSnapshotExtras?.onPick?.(),a.addEventListener("click",P,!0),a.addEventListener("keydown",P,!0),L.textContent="Analyzing element…",r.parent.postMessage({type:"elementPicked",attrs:H},"*")}else ce(),r.__piwiPickedElement=g,r.__piwiPickState="picked",L.textContent="Analyzing element…"},O=()=>{Z(),e.transport==="postMessage"?(a.removeEventListener("click",P,!0),a.removeEventListener("keydown",P,!0),ce(),r.__piwiSnapshotExtras?.onClose?.(),k(),r.parent.postMessage({type:"pickerClosed"},"*")):(ce(),r.__piwiPickState="skipped",k())},G=g=>{P(g);const z=x();!z||j(g.target)||d(z)},se=g=>{if(g.key==="Escape"){P(g),O();return}(g.key==="ArrowUp"||g.key==="ArrowDown")&&(P(g),g.key==="ArrowUp"?Q=Math.min(Q+1,B.length-1):Q=Math.max(Q-1,0),K())},re=g=>{const z=g.data;!z||typeof z.type!="string"||z.type!=="piwiPickerKey"||typeof z.key!="string"||se({key:z.key,preventDefault(){},stopImmediatePropagation(){}})};r.__piwiPickCleanup=k,a.addEventListener("mousemove",ge,!0),a.addEventListener("click",G,!0),a.addEventListener("keydown",se,!0);for(const g of he)a.addEventListener(g,P,!0);e.transport==="postMessage"&&(r.addEventListener("message",re,!1),r.parent.postMessage({type:"pickerReady"},"*"))}function Cn(){var e=document,r=window,a=2147483600,c=[];function n(){for(var m=0;m<c.length;m++)c[m].parentNode&&c[m].parentNode.removeChild(c[m]);c=[]}function s(m){return(m||"").replace(/\s+/g," ").trim().toLowerCase()}function l(m){var M=s(m);if(M.length<2)return[];for(var x=e.querySelectorAll("button,a,[role],h1,h2,h3,h4,h5,h6,label,summary,input,textarea,select,option,span,li,td,th,p"),K=[],P=[],j=0;j<x.length;j++){var ne=x[j],me=s(ne.textContent);if(!me){var ge=s(ne.getAttribute&&(ne.getAttribute("placeholder")||ne.getAttribute("aria-label"))||"");ge&&(ge===M||ge.indexOf(M)!==-1)&&K.push(ne);continue}me.length>120||(me===M?K.push(ne):me.indexOf(M)!==-1&&me.length<M.length+30&&P.push(ne))}return K.concat(P)}function f(m,M){var x=m.getBoundingClientRect();if(x.width===0&&x.height===0)return null;var K=e.createElement("div");return K.__piwiHint=!0,K.style.cssText="position:fixed;pointer-events:none;z-index:"+(a+1)+";box-sizing:border-box;border-radius:3px;transition:opacity .3s;border:2px solid "+M+";box-shadow:0 0 0 3px "+M+"55;left:"+x.left+"px;top:"+x.top+"px;width:"+x.width+"px;height:"+x.height+"px;",e.body.appendChild(K),c.push(K),K}function i(m){var M=m.getBoundingClientRect();r.parent.postMessage({type:"piwiScrollTo",y:M.top},"*")}function h(m){if(n(),!(!m||!m.length)){for(var M=null,x=0;x<m.length;x++)for(var K=m[x],P=l(K&&K.text),j=0;j<Math.min(P.length,3);j++)f(P[j],"#f59e0b"),M||(M=P[j]);M&&i(M),setTimeout(function(){for(var ne=0;ne<c.length;ne++)c[ne].style.opacity="0"},2600),setTimeout(n,3e3)}}var v=[],L=0;function y(){r.parent.postMessage({type:"piwiSearchResult",count:v.length,index:v.length?L:-1},"*")}function C(){n();var m=v[L];m&&(f(m,"#7c3aed"),i(m),y())}function w(m){if(v=l(m),L=0,!v.length){n(),y();return}C()}function S(){v.length&&(L=(L+1)%v.length,C())}function D(m){var M=m.data;if(!(!M||typeof M.type!="string")){if(M.type==="piwiHighlight")try{h(M.hints)}catch{}else if(M.type==="piwiSearch")try{w(M.q)}catch{}else if(M.type==="piwiSearchNext")try{S()}catch{}else if(M.type==="piwiClearHints")try{n()}catch{}}}r.addEventListener("message",D,!1);function U(m){m.preventDefault(),m.stopImmediatePropagation()}for(var V=["mousedown","mouseup","pointerdown","pointerup","auxclick","dblclick","contextmenu","submit","beforeinput","input","change","paste","cut","drop","dragstart","keypress","keyup","touchstart","touchend"],B=0;B<V.length;B++)e.addEventListener(V[B],U,!0);r.__piwiSnapshotExtras={onPick:function(){n()},onClose:function(){n(),r.removeEventListener("message",D,!1);for(var m=0;m<V.length;m++)e.removeEventListener(V[m],U,!0)}};function Q(){var m=Math.max(e.documentElement?e.documentElement.scrollHeight:0,e.body?e.body.scrollHeight:0);m>0&&r.parent.postMessage({type:"piwiContentHeight",height:m},"*")}Q();try{if(r.ResizeObserver){var X=new r.ResizeObserver(Q);e.documentElement&&X.observe(e.documentElement),e.body&&X.observe(e.body)}}catch{}}function Tn(e){const r=[],a=new Set,c=s=>{if(typeof s!="string")return;const l=s.trim();if(l.length<2||l.length>80)return;const f=l.toLowerCase();a.has(f)||(a.add(f),r.push({text:l}))},n=s=>s&&(s.name??s.text??s.label??s.placeholder??s.alt??s.title);c(n(e.failingLocator?.args));for(const s of e.fromElementMatch??[])c(n(s.args));for(const s of e.fromAriaSnapshot??[])c(n(s.args));return r.slice(0,6)}const qe=e=>e.replace(/<\/(script)/gi,"<\\/$1");function Sn(e){const a={transport:"postMessage",probeArg:{keep:e.probedAttrs,includeStructural:!1,includeLabelText:!0}},c=qe(String($n)),n=qe(String(Cn)),s=qe(String(wn));return`<script>globalThis.__piwiProbe = (${c});(${n})();(${s})(${JSON.stringify(a)});<\/script>`}function An(e){return e.replace(/<base\b[^>]*>/gi,"")}function Ln(e,r){return An(e)+Sn(r)}const Rn={key:0,class:"flex items-center justify-center py-20"},In={key:1,class:"py-8 text-center"},zn={class:"text-xs text-gray-400 mt-1"},Pn={key:2,class:"py-8 text-center"},Bn={class:"mb-2 flex items-center gap-2 flex-wrap"},En={key:1,class:"ml-auto inline-flex rounded-md border border-default overflow-hidden text-xs"},On={key:0,class:"flex items-center gap-1 mb-1.5 text-xs text-gray-500"},Mn={class:"tabular-nums w-11 text-center select-none"},Nn={class:"ml-auto text-gray-400 tabular-nums"},Un={key:1,class:"flex items-center gap-2 mb-1.5"},jn={key:0,class:"text-xs text-gray-500 tabular-nums"},Dn={key:1,class:"text-xs text-gray-400"},Kn={key:0,class:"absolute inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-10"},Vn=["src"],Hn={key:2,class:"mt-4 space-y-3"},Fn={class:"flex items-center gap-3 bg-elevated rounded-lg p-3"},qn={class:"flex-1 min-w-0"},Zn={class:"text-sm font-medium"},Wn={class:"text-xs"},Jn={key:0,class:"text-xs text-gray-400 ml-1"},Yn={key:0,class:"text-xs text-gray-500 mt-0.5 truncate"},Gn={class:"space-y-1",role:"radiogroup","aria-label":"Alternative locators"},Qn={class:"flex-1 min-w-0"},Xn={class:"text-xs font-medium text-primary"},eo={class:"flex justify-between w-full"},to={key:1},no={class:"flex gap-2"},oo=ue({__name:"SnapshotLocatorPicker",props:We({runId:{},testRunsCaseId:{},failingLocator:{},healing:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:We(["close","confirmed"],["update:open"]),setup(e,{emit:r}){const a=e,c=r,n=at(e,"open"),s=Y(!1),l=Y(null),f=Y(null),i=Y(void 0);async function h(){s.value=!0,f.value=null;try{const R=new URLSearchParams({inlineStyles:"1"});i.value&&R.set("source",i.value);const b=`?${R.toString()}`;l.value=await $fetch(`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/dom-snapshot${b}`),l.value?.source&&(i.value=l.value.source)}catch(R){f.value=R instanceof Error?R.message:"Unknown error"}finally{s.value=!1}}const v=I(()=>l.value?.availableSources??[]);function L(R){R===i.value||s.value||(i.value=R,w.value=!1,y.value="pick-element",X.value=0,M.value=!1,S.value=null,D.value=[],F.value=null,O.value="",G.value=0,se.value=-1,h())}Ee(n,R=>{R&&(l.value=null,w.value=!1,y.value="pick-element",X.value=0,M.value=!1,i.value=void 0,S.value=null,D.value=[],F.value=null,O.value="",G.value=0,se.value=-1,h())});const y=Y("pick-element"),C=Y(null),w=Y(!1),S=Y(null),D=Y([]),U=Y(void 0);function V(R){return URL.createObjectURL(new Blob([Ln(R,{probedAttrs:hn})],{type:"text/html"}))}Ee(()=>l.value?.html,R=>{U.value&&(URL.revokeObjectURL(U.value),U.value=void 0),R&&(U.value=V(R))},{immediate:!0});const B=Y(null),Q=Y(0),X=Y(0),m=Y(1),M=Y(!1),x=I(()=>l.value?.viewport??null),K=I(()=>{const R=x.value;return!R?.width||!Q.value?1:Math.min(Q.value/R.width,1)}),P=I(()=>{const R=x.value;if(!R)return{width:"100%",height:X.value?`${X.value}px`:"100%"};const b=X.value||R.height;return{width:`${Math.round(R.width*m.value)}px`,height:`${Math.round(b*m.value)}px`}}),j=I(()=>{const R=x.value;if(!R)return{width:"100%",height:X.value?`${X.value}px`:"100%",border:"0"};const b=X.value||R.height;return{width:`${R.width}px`,height:`${b}px`,transform:`scale(${m.value})`,transformOrigin:"top left",border:"0"}}),ne=I(()=>Math.round(m.value*100)),me=R=>Math.min(4,Math.max(.1,R));function ge(R){M.value=!0,m.value=me(m.value*R)}function he(){M.value=!1,m.value=K.value}Ee([K,x],()=>{M.value||(m.value=K.value)});let Z=null;Ee(B,R=>{Z?.disconnect(),R&&(Q.value=R.clientWidth,Z=new ResizeObserver(b=>{for(const ae of b)Q.value=ae.contentRect.width}),Z.observe(R))}),Ae(()=>{Z?.disconnect()}),Ae(()=>{U.value&&URL.revokeObjectURL(U.value)});function ce(R){if(!C.value||R.source!==C.value.contentWindow)return;const b=R.data;if(b?.type==="pickerReady"){w.value=!0,d();return}if(b?.type==="piwiContentHeight"&&typeof b.height=="number"){X.value=Math.max(b.height,x.value?.height??0);return}if(b?.type==="piwiScrollTo"&&typeof b.y=="number"){const ae=B.value;ae&&ae.scrollTo({top:Math.max(0,b.y*m.value-80),behavior:"smooth"});return}if(b?.type==="piwiSearchResult"){G.value=typeof b.count=="number"?b.count:0,se.value=typeof b.index=="number"?b.index:-1;return}if(b?.type==="elementPicked"&&b.attrs){const{labelText:ae,...xe}=b.attrs;S.value={...xe,accessibleName:ae??_n(xe)},D.value=kn(S.value),F.value=null,y.value="review"}b?.type==="pickerClosed"&&oe()}function k(R){C.value?.contentWindow?.postMessage(R,"*")}function d(){const R=Tn({failingLocator:a.failingLocator,fromElementMatch:a.healing?.fromElementMatch??null,fromAriaSnapshot:a.healing?.fromAriaSnapshot??null});R.length&&k({type:"piwiHighlight",hints:R})}const O=Y(""),G=Y(0),se=Y(-1);let re=null;Ee(O,R=>{re&&clearTimeout(re),re=setTimeout(()=>k({type:"piwiSearch",q:R}),180)});function g(){k({type:"piwiSearchNext"})}Ae(()=>{re&&clearTimeout(re)});function z(R){if(!n.value||y.value!=="pick-element"||!w.value||R.key!=="ArrowUp"&&R.key!=="ArrowDown")return;const b=(document.activeElement?.tagName??"").toLowerCase();if(b==="input"||b==="textarea")return;const ae=C.value?.contentWindow;ae&&(R.preventDefault(),ae.postMessage({type:"piwiPickerKey",key:R.key},"*"))}function H(){C.value&&(C.value.src="about:blank")}rt(()=>{window.addEventListener("message",ce),window.addEventListener("keydown",z,!0)}),Ae(()=>{window.removeEventListener("message",ce),window.removeEventListener("keydown",z,!0)});const F=Y(null),te=Y(!1);function N(R){F.value=R}const J=I(()=>pt(a.failingLocator.method,D.value)),we=Je();async function W(){if(F.value){te.value=!0;try{(await $fetch(`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/locator-pick`,{method:"POST",body:{failingLocator:a.failingLocator,pickedLocator:F.value,element:S.value}})).status==="ok"?c("confirmed",F.value):we.add({title:"Pick not saved",description:"This failure has no call-site or locator signature to attach the pick to.",color:"warning",icon:"i-lucide-alert-triangle"}),n.value=!1}catch(R){we.add({title:"Could not save the pick",description:lt(R),color:"error",icon:"i-lucide-alert-triangle"})}finally{te.value=!1}}}function oe(){H(),n.value=!1}function ie(){S.value=null,D.value=[],F.value=null,y.value="pick-element",w.value=!1,O.value="",G.value=0,se.value=-1;const R=l.value?.html;R&&(U.value&&URL.revokeObjectURL(U.value),U.value=V(R))}const{copy:de}=He(),le=Y(null);let ye=null;function Te(R,b){de(R,{toast:"Locator copied"}),le.value=b,ye&&clearTimeout(ye),ye=setTimeout(()=>{le.value=null},2e3)}return Ae(()=>{ye&&clearTimeout(ye)}),(R,b)=>{const ae=$e,xe=Ie,Be=_t,Ke=Pe,gt=Qe,ht=Mt;return o(),q(ht,{open:n.value,"onUpdate:open":b[8]||(b[8]=be=>n.value=be),ui:{content:"max-w-6xl w-[95vw]"},onAfterLeave:oe},{header:A(()=>[...b[9]||(b[9]=[p("div",null,[p("h3",{class:"text-lg font-medium"},"Pick a locator from the DOM snapshot"),p("p",{class:"text-sm text-gray-500 mt-0.5"}," Click the element the failing locator should target. Use ↑↓ to walk the DOM tree. ")],-1)])]),body:A(()=>[t(s)?(o(),u("div",Rn,[_(ae,{name:"i-lucide-loader",class:"size-6 animate-spin text-gray-400"}),b[10]||(b[10]=p("span",{class:"ml-2 text-sm text-gray-500"},"Loading DOM snapshot...",-1))])):t(f)?(o(),u("div",In,[_(ae,{name:"i-lucide-alert-triangle",class:"size-8 text-red-300 mx-auto mb-2"}),b[12]||(b[12]=p("p",{class:"text-sm text-red-500"},"Failed to load snapshot",-1)),p("p",zn,$(t(f)),1),_(xe,{size:"xs",variant:"outline",color:"neutral",class:"mt-3",onClick:h},{default:A(()=>[...b[11]||(b[11]=[E("Retry",-1)])]),_:1})])):t(l)?.status!=="ok"||!t(l).html?(o(),u("div",Pn,[_(ae,{name:"i-lucide-file-x",class:"size-8 text-gray-300 mx-auto mb-2"}),b[13]||(b[13]=p("p",{class:"text-sm text-gray-500"},"No DOM snapshot or ARIA data available for this execution",-1)),b[14]||(b[14]=p("p",{class:"text-xs text-gray-400 mt-1"},"This test run has no stored trace or ARIA snapshot to pick from.",-1))])):(o(),u(ee,{key:3},[p("div",Bn,[t(l).source?(o(),u("div",{key:0,class:pe(["text-xs flex items-center gap-1",t(l).source==="aria"?"text-amber-600 dark:text-amber-400":"text-green-600 dark:text-green-400"])},[_(ae,{name:t(l).source==="aria"?"i-lucide-accessibility":"i-lucide-check",class:"size-3.5 shrink-0"},null,8,["name"]),t(l).source==="aria"?(o(),u(ee,{key:0},[E(" Accessibility tree from the failure-time ARIA snapshot — element styles are approximate ")],64)):(o(),u(ee,{key:1},[E(" Rendered from the failure-time DOM snapshot ")],64))],2)):T("",!0),t(v).length>1?(o(),u("div",En,[p("button",{type:"button",class:pe(["px-2 py-1 flex items-center gap-1 transition-colors",t(i)==="dom"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Rendered page from the trace",onClick:b[0]||(b[0]=be=>L("dom"))},[_(ae,{name:"i-lucide-layout-panel-top",class:"size-3.5"}),b[15]||(b[15]=E(" DOM ",-1))],2),p("button",{type:"button",class:pe(["px-2 py-1 flex items-center gap-1 border-l border-default transition-colors",t(i)==="aria"?"bg-primary/10 text-primary font-medium":"text-gray-500 hover:bg-elevated"]),title:"Accessibility tree from the ARIA snapshot",onClick:b[1]||(b[1]=be=>L("aria"))},[_(ae,{name:"i-lucide-accessibility",class:"size-3.5"}),b[16]||(b[16]=E(" Tree ",-1))],2)])):T("",!0)]),t(x)?(o(),u("div",On,[_(xe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-out",title:"Zoom out",onClick:b[2]||(b[2]=be=>ge(1/1.25))}),p("span",Mn,$(t(ne))+"%",1),_(xe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-zoom-in",title:"Zoom in",onClick:b[3]||(b[3]=be=>ge(1.25))}),_(xe,{size:"xs",variant:"outline",color:"neutral",class:"ml-1",onClick:he},{default:A(()=>[...b[17]||(b[17]=[E("Fit",-1)])]),_:1}),p("span",Nn,$(t(x).width)+"×"+$(t(x).height),1)])):T("",!0),t(y)==="pick-element"?(o(),u("div",Un,[_(Be,{modelValue:t(O),"onUpdate:modelValue":b[4]||(b[4]=be=>Le(O)?O.value=be:null),size:"xs",icon:"i-lucide-search",placeholder:"Find an element by its text…",class:"max-w-xs",onKeydown:ke(_e(g,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),t(O)&&t(G)>0?(o(),u("span",jn,$(t(se)+1)+"/"+$(t(G)),1)):t(O)?(o(),u("span",Dn,"no matches")):T("",!0),t(G)>1?(o(),q(xe,{key:2,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-chevron-down",title:"Next match (Enter)",onClick:g})):T("",!0)])):T("",!0),p("div",{ref_key:"stageRef",ref:B,class:pe(["relative border border-default rounded-lg overflow-auto",[t(y)==="pick-element"?"h-[75vh]":"h-80",t(x)?"bg-gray-100 dark:bg-gray-800":""]])},[t(w)?T("",!0):(o(),u("div",Kn,[_(ae,{name:"i-lucide-loader",class:"size-5 animate-spin text-gray-400"}),b[18]||(b[18]=p("span",{class:"ml-2 text-sm text-gray-500"},"Initializing picker...",-1))])),p("div",{style:et(t(P))},[p("iframe",{ref_key:"iframeRef",ref:C,src:t(U),style:et(t(j)),class:"bg-white",sandbox:"allow-scripts",title:"DOM snapshot"},null,12,Vn)],4)],2),t(y)==="review"&&t(S)?(o(),u("div",Hn,[p("div",Fn,[_(ae,{name:"i-lucide-crosshair",class:"size-5 text-primary shrink-0"}),p("div",qn,[p("p",Zn,[b[19]||(b[19]=E(" Picked: ",-1)),p("code",Wn,$(t(S).tagName),1),t(S).attributes.id?(o(),u("code",Jn,"#"+$(t(S).attributes.id),1)):T("",!0),t(S).attributes["data-testid"]?(o(),q(Ke,{key:1,size:"xs",color:"primary",variant:"subtle",class:"ml-1"},{default:A(()=>[E($(t(S).attributes["data-testid"]),1)]),_:1})):T("",!0)]),t(S).textContent?(o(),u("p",Yn,' "'+$(t(S).textContent)+'" ',1)):T("",!0)]),_(xe,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-rotate-ccw",title:"Pick a different element",onClick:ie})]),p("div",Gn,[(o(!0),u(ee,null,fe(t(D),(be,Fe)=>(o(),q(dt,{key:Fe,alt:be,copied:t(le)===`picked-${Fe}`,dense:!0,selectable:!0,selected:t(F)?.locator===be.locator,onCopy:yt=>Te(be.locator,`picked-${Fe}`),onSelect:yt=>N(be)},null,8,["alt","copied","selected","onCopy","onSelect"]))),128))]),t(J).recommended?(o(),u("div",{key:0,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 flex items-center gap-3 cursor-pointer",role:"button",tabindex:"0",title:"Select this locator for Confirm",onClick:b[6]||(b[6]=be=>N(t(J).recommended)),onKeydown:b[7]||(b[7]=ke(_e(be=>N(t(J).recommended),["prevent"]),["enter"]))},[_(ae,{name:"i-lucide-star",class:"size-5 text-primary shrink-0"}),p("div",Qn,[p("p",Xn," Recommended (score: "+$(t(J).recommended.score)+") ",1),_(gt,{locator:t(J).recommended.locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"])]),_(xe,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(le)==="rec"?"i-lucide-check":"i-lucide-copy",onClick:b[5]||(b[5]=_e(be=>Te(t(J).recommended.locator,"rec"),["stop"]))},{default:A(()=>[...b[20]||(b[20]=[E(" Copy ",-1)])]),_:1},8,["trailing-icon"])],32)):T("",!0)])):T("",!0)],64))]),footer:A(()=>[p("div",eo,[t(y)==="review"?(o(),q(xe,{key:0,size:"sm",variant:"outline",color:"neutral",icon:"i-lucide-rotate-ccw",onClick:ie},{default:A(()=>[...b[21]||(b[21]=[E(" Pick a different element ",-1)])]),_:1})):(o(),u("div",to)),p("div",no,[_(xe,{size:"sm",variant:"outline",color:"neutral",onClick:oe},{default:A(()=>[...b[22]||(b[22]=[E("Cancel",-1)])]),_:1}),t(y)==="review"?(o(),q(xe,{key:0,size:"sm",color:"primary",loading:t(te),disabled:!t(F),onClick:W},{default:A(()=>[...b[23]||(b[23]=[E(" Confirm pick ",-1)])]),_:1},8,["loading","disabled"])):T("",!0)])])]),_:1},8,["open"])}}}),so=Object.assign(oo,{__name:"SnapshotLocatorPicker"});function ao(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ro(e,r){let a=0,c=null;for(let n=r;n<e.length;n++){const s=e[n];if(c){if(s==="\\"){n++;continue}s===c&&(c=null);continue}if(s==="'"||s==='"'||s==="`"){c=s;continue}if(s==="(")a++;else if(s===")"&&(a--,a===0))return n}return-1}function io(e,r,a){if(!e||!r||!a)return null;const c=new RegExp(`${ao(r)}\\s*\\(`,"g");let n;for(;(n=c.exec(e))!==null;){const s=n.index,l=s>0?e[s-1]:"";if(l&&/[A-Za-z0-9_$]/.test(l))continue;const f=s+n[0].lastIndexOf("("),i=ro(e,f);if(i===-1)return null;const h=e.slice(0,s)+a+e.slice(i+1);return h===e?null:{old:e,new:h}}return null}function lo(e,r){return`${r?`@@ ${r} @@
2
2
  `:""}-${e.old.trimEnd()}
3
3
  +${e.new.trimEnd()}`}function co(e,r){const a=e??{},c=r??{},n=l=>l==null?null:typeof l=="string"?l:JSON.stringify(l),s=[];for(const l of new Set([...Object.keys(a),...Object.keys(c)])){const f=n(a[l]),i=n(c[l]);f!==i&&s.push({key:l,from:f,to:i})}return s}function uo(e){const a=[`In ${e.location??(e.sourceLine?`line ${e.sourceLine.line}`:"the failing test")}, the Playwright locator \`${e.failing}\` no longer matches its element.`,`Replace it with \`${e.recommended}\`.`];return e.sourceLine&&a.push("","Current line:",e.sourceLine.text.trim()),a.join(`
4
4
  `)}const po={key:1},fo={class:"flex items-center gap-1"},mo={key:1,class:"rounded-lg border border-primary/50 bg-primary/10 p-3 mb-3 flex items-center gap-3"},go={class:"flex-1 min-w-0"},ho={class:"text-xs font-medium text-primary flex items-center gap-1.5"},yo={key:2,class:"flex items-center gap-2 bg-elevated rounded p-2 mb-3 border border-red-200 dark:border-red-800"},vo={class:"text-xs font-mono text-red-600 dark:text-red-400 flex-1 truncate"},xo={key:4,class:"rounded-lg border border-primary/40 bg-primary/5 p-3 mb-3 space-y-2"},bo={class:"flex items-center gap-2 min-w-0"},ko={key:0,class:"text-[11px] text-gray-500 truncate min-w-0"},_o={key:0,class:"rounded border border-default overflow-hidden bg-default"},$o={key:0,class:"text-xs flex flex-wrap items-center gap-x-1.5 gap-y-0.5"},wo={class:"font-mono text-gray-500"},Co={key:0,class:"font-mono text-red-500 line-through"},To={key:1,class:"text-gray-400"},So={key:2,class:"font-mono text-green-600 dark:text-green-400"},Ao={key:3,class:"text-gray-400"},Lo={key:2,class:"text-xs text-gray-500"},Ro={key:3,class:"text-xs text-primary/90 flex items-center gap-1"},Io={class:"flex items-center gap-2"},zo={key:5,class:"rounded-lg border border-default bg-elevated p-3 mb-3 flex items-center gap-3"},Po={class:"flex-1 min-w-0"},Bo={class:"text-xs font-medium text-success-600 dark:text-success-400"},Eo={class:"space-y-2"},Oo={key:6,class:"mt-3"},Mo={class:"space-y-2"},No={class:"flex items-center gap-1"},st=3,Uo=ue({__name:"LocatorHealingPanel",props:{runId:{},testRunsCaseId:{},storageKey:{},affectedCount:{}},setup(e){const r=e,a=I(()=>r.storageKey?De:je),c=I(()=>r.storageKey?{storageKey:r.storageKey}:{}),{data:n,pending:s,error:l}=Ue(()=>`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`,{lazy:!0},"$Zgad3xb7ix"),f=I(()=>!!n.value&&n.value.source!=="none"&&!!(n.value.fromElementMatch?.length||n.value.fromPriorSuccess?.length||n.value.fromAriaSnapshot?.length)),i=I(()=>n.value?n.value.fromElementMatch??n.value.fromPriorSuccess??n.value.fromAriaSnapshot??[]:[]),h=I(()=>i.value.find(k=>k.pickedByUser)??null),v=I(()=>n.value?.recommendation?n.value.recommendation:n.value?.priorNameMayBeStale||!i.value.length?null:pt(n.value?.failingLocator?.method,i.value)),L=I(()=>n.value?.priorNameMayBeStale&&n.value.fromPriorSuccess?.length?n.value.fromAriaSnapshot??[]:[]),y=I(()=>{const k=v.value;return k?.recommended?k.recommended.pickedByUser?"Confirmed with the locator picker on the failing page":k.preservesConvention?"Keeps your original locator style — minimal, idiomatic edit":k.suggestAddTestId?"Most stable available, but still fragile":"Most stable available — a sturdier style than the original":""}),C=I(()=>{const k=n.value?.priorNameMayBeStale,d=(()=>{switch(n.value?.source){case"prior-run":return k?"Pre-captured from the last passing run — the element looks changed since":"Pre-captured from the last passing run — highest confidence";case"element-match":return"The element looks renamed or moved — these are fresh locators for its current identity on the failing page";case"fingerprint":return"Matched by locator signature (line numbers shifted)";case"cross-test":return"Captured by another test in this project that uses the same locator";case"aria-snapshot":return"Generated from the failure-time ARIA snapshot — limited, no HTML attributes";default:return""}})(),O=n.value?.capturedAt;return O?`${d} · captured ${Ye(O)}`:d}),w=I(()=>{if(n.value?.priorNameMayBeStale)return"text-warning-600 dark:text-warning-400";switch(n.value?.source){case"prior-run":case"fingerprint":case"cross-test":return"text-success-600 dark:text-success-400";case"element-match":return"text-primary-600 dark:text-primary-400";default:return"text-warning-600 dark:text-warning-400"}}),S=I(()=>{const k=n.value?.failingLocator;return k?`${k.method}(${JSON.stringify(k.args)})`:""}),D=ze(),{data:U}=Ue(()=>`/api/test-run-cases/${r.testRunsCaseId}/traces`,{lazy:!0},"$eLKRphd7VZ"),V=I(()=>{const k=U.value?.[0];if(!k)return null;const d=!!D.public.demoMode&&k.filePath.startsWith("demo/");return ct(k.filePath,D.app?.baseURL,d)}),B=Y(!1);async function Q(){await wt(`/api/test-runs/${r.runId}/cases/${r.testRunsCaseId}/locator-healing`)}const{copy:X}=He(),m=Y(null);let M=null;function x(k,d,O){X(k,{toast:O}),m.value=d,M&&clearTimeout(M),M=setTimeout(()=>{m.value=null},2e3)}function K(k,d){x(k,d,"Locator copied")}Ae(()=>{M&&clearTimeout(M)});const P=I(()=>v.value?.recommended??null),j=I(()=>r.affectedCount&&r.affectedCount>1&&P.value?`Same break affects ${r.affectedCount} tests in this cluster — one fix`:""),ne=I(()=>{if(P.value?.pickedByUser)return"your confirmed pick";switch(n.value?.source){case"prior-run":return"from the last passing run";case"fingerprint":return"from a prior run (line shifted)";case"cross-test":return"from another test in this project";case"element-match":return"from the current failing page";case"aria-snapshot":return"from the ARIA snapshot";default:return""}}),me=I(()=>{const k=n.value?.sourceLine,d=P.value;if(!k||!d)return null;const O=io(k.text,n.value?.failingLocator?.method,d.locator);return O?{edit:O,patch:lo(O,n.value?.location??null)}:null}),ge=I(()=>{if(me.value)return[];const k=n.value?.failingLocator,d=P.value;return!k||!d||d.method!==k.method?[]:co(k.args,d.args)});function he(){const k=P.value;!k||!n.value||x(uo({location:n.value.location??null,sourceLine:n.value.sourceLine??null,failing:S.value,recommended:k.locator}),"fix-prompt","Fix prompt copied")}const Z=Y(!1),ce=I(()=>Z.value?i.value:i.value.slice(0,st));return(k,d)=>{const O=Qe,G=Ie,se=$t,re=Ge,g=$e,z=Pe,H=cn,F=dt,te=It;return o(),u(ee,null,[!t(s)&&!t(l)&&t(f)?(o(),q(Se(t(a)),Ne({key:0},t(c),{icon:"i-lucide-bandage",title:"Alternative locators",count:t(i).length,help:"locator-healing"}),Re({subtitle:A(()=>[p("span",{class:pe(t(w))},$(t(C)),3)]),default:A(()=>[t(n)?.healedInRunId?(o(),q(re,{key:0,class:"mb-3",color:"success",icon:"i-lucide-circle-check",variant:"subtle",title:"Locator healed"},{description:A(()=>[d[11]||(d[11]=E(" The recommended locator now passes at this call site — ",-1)),_(se,{to:`/test-runs/${t(n).healedInRunId}`,class:"underline font-medium"},{default:A(()=>[E(" see run #"+$(t(n).healedInRunId),1)]),_:1},8,["to"]),d[12]||(d[12]=E(". ",-1))]),_:1})):T("",!0),t(h)?(o(),u("div",mo,[_(g,{name:"i-lucide-user-check",class:"size-5 text-primary shrink-0"}),p("div",go,[p("p",ho,[d[14]||(d[14]=E(" Your pick ",-1)),_(z,{size:"sm",color:"primary",variant:"subtle"},{default:A(()=>[...d[13]||(d[13]=[E("confirmed on the failing page",-1)])]),_:1})]),_(O,{locator:t(h).locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"])]),_(G,{size:"sm",color:"primary",variant:"solid","trailing-icon":t(m)==="user-pick"?"i-lucide-check":"i-lucide-copy",onClick:d[1]||(d[1]=N=>K(t(h).locator,"user-pick"))},{default:A(()=>[...d[15]||(d[15]=[E(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):T("",!0),t(n)?.failingLocator?(o(),u("div",yo,[_(g,{name:"i-lucide-x-circle",class:"size-4 text-red-500 shrink-0"}),p("code",vo,$(t(S)),1),_(G,{size:"xs",variant:"ghost",color:"neutral",icon:t(m)==="failing"?"i-lucide-check":"i-lucide-copy",title:t(m)==="failing"?"Copied!":"Copy",onClick:d[2]||(d[2]=N=>K(t(S),"failing"))},null,8,["icon","title"])])):T("",!0),t(n)?.priorNameMayBeStale?(o(),q(re,{key:3,class:"mb-3",color:"warning",icon:"i-lucide-alert-triangle",variant:"subtle",title:"The element's name looks changed",description:"The captured accessible name no longer appears on the failing page, so name-based alternatives (and the failing locator itself) probably no longer match. Prefer the structural options, or the failing-page candidates below."})):T("",!0),t(P)?(o(),u("div",xo,[p("div",bo,[_(g,{name:"i-lucide-star",class:"size-4 text-primary shrink-0"}),d[16]||(d[16]=p("p",{class:"text-xs font-medium text-primary shrink-0"},"Recommended fix",-1)),t(ne)?(o(),u("span",ko," · "+$(t(ne)),1)):T("",!0),d[17]||(d[17]=p("span",{class:"flex-1"},null,-1)),_(z,{size:"xs",color:"primary",variant:"subtle",class:"font-mono tabular-nums shrink-0"},{default:A(()=>[E($(t(P).score),1)]),_:1})]),t(me)?(o(),u("div",_o,[_(H,{patch:t(me).patch},null,8,["patch"])])):(o(),u(ee,{key:1},[_(O,{locator:t(P).locator,truncate:"",class:"text-sm"},null,8,["locator"]),t(ge).length?(o(),u("p",$o,[(o(!0),u(ee,null,fe(t(ge),(N,J)=>(o(),u(ee,{key:J},[p("span",wo,$(N.key)+":",1),N.from?(o(),u("span",Co,$(N.from),1)):(o(),u("span",To,"—")),_(g,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),N.to?(o(),u("span",So,$(N.to),1)):(o(),u("span",Ao,"removed"))],64))),128))])):T("",!0)],64)),t(y)?(o(),u("p",Lo,$(t(y)),1)):T("",!0),t(j)?(o(),u("p",Ro,[_(g,{name:"i-lucide-layers",class:"size-3 shrink-0"}),E($(t(j)),1)])):T("",!0),p("div",Io,[_(G,{size:"xs",color:"primary",variant:"solid","trailing-icon":t(m)==="top"?"i-lucide-check":"i-lucide-copy",onClick:d[3]||(d[3]=N=>K(t(P).locator,"top"))},{default:A(()=>[...d[18]||(d[18]=[E(" Copy locator ",-1)])]),_:1},8,["trailing-icon"]),_(G,{size:"xs",color:"neutral",variant:"outline",icon:t(m)==="fix-prompt"?"i-lucide-check":"i-lucide-sparkles",title:"Copy an instruction an AI coding agent can apply directly to the test",onClick:he},{default:A(()=>[...d[19]||(d[19]=[E(" Copy fix prompt ",-1)])]),_:1},8,["icon"])])])):T("",!0),t(v)?.hasDurableAlternative&&t(v).durable?(o(),u("div",zo,[_(g,{name:"i-lucide-shield-check",class:"size-5 text-success shrink-0"}),p("div",Po,[p("p",Bo," Most stable option (score: "+$(t(v).durable.score)+") ",1),_(O,{locator:t(v).durable.locator,truncate:"",class:"text-sm mt-0.5"},null,8,["locator"]),d[20]||(d[20]=p("p",{class:"text-xs text-gray-500 mt-0.5"},"Sturdier, but changes the locator style",-1))]),_(G,{size:"sm",color:"neutral",variant:"outline","trailing-icon":t(m)==="durable"?"i-lucide-check":"i-lucide-copy",onClick:d[4]||(d[4]=N=>K(t(v).durable.locator,"durable"))},{default:A(()=>[...d[21]||(d[21]=[E(" Copy ",-1)])]),_:1},8,["trailing-icon"])])):T("",!0),p("div",Eo,[d[22]||(d[22]=p("p",{class:"text-xs font-medium text-gray-500"},"All alternatives",-1)),(o(!0),u(ee,null,fe(t(ce),(N,J)=>(o(),q(F,{key:J,alt:N,copied:t(m)===`alt-${J}`,onCopy:we=>K(N.locator,`alt-${J}`)},null,8,["alt","copied","onCopy"]))),128)),t(i).length>st?(o(),q(G,{key:0,size:"xs",variant:"ghost",color:"neutral",block:"",icon:t(Z)?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:d[5]||(d[5]=N=>Z.value=!t(Z))},{default:A(()=>[E($(t(Z)?"Show fewer":`Show all ${t(i).length} alternatives`),1)]),_:1},8,["icon"])):T("",!0)]),t(L).length?(o(),u("div",Oo,[d[23]||(d[23]=p("p",{class:"text-xs font-medium text-gray-500 mb-2"},"From the failing page",-1)),p("div",Mo,[(o(!0),u(ee,null,fe(t(L),(N,J)=>(o(),q(F,{key:J,alt:N,note:"candidate from the failure-time ARIA snapshot",copied:t(m)===`supp-${J}`,onCopy:we=>K(N.locator,`supp-${J}`)},null,8,["alt","copied","onCopy"]))),128))])])):T("",!0),t(v)?.suggestAddTestId?(o(),q(re,{key:7,class:"mt-3",color:"warning",icon:"i-lucide-info",variant:"subtle",title:"All alternatives are fragile",description:"Every captured locator scores below 50. Add a stable data-testid attribute to this element in the app for a durable fix."})):T("",!0),t(n)?.source==="aria-snapshot"?(o(),q(re,{key:8,class:"mt-3",color:"info",icon:"i-lucide-info",variant:"subtle"},{description:A(()=>[d[25]||(d[25]=E(" No HTML attributes were available. ",-1)),_(te,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:A(()=>[...d[24]||(d[24]=[E("Enable Piwi fixture capture",-1)])]),_:1}),d[26]||(d[26]=E(" for full alternatives including data-testid and CSS selectors. ",-1))]),_:1})):T("",!0)]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[t(v)?.recommended?(o(),q(O,{key:0,locator:t(v).recommended.locator,class:"text-xs"},null,8,["locator"])):(o(),u("span",po,$(t(i).length)+" alternative"+$(t(i).length===1?"":"s"),1))]),key:"0"}:void 0,t(V)||t(n)?.failingLocator?{name:"actions",fn:A(()=>[p("div",fo,[t(n)?.failingLocator?(o(),q(G,{key:0,size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-mouse-pointer",title:"Open the failure-time DOM snapshot and click the element to pick a locator",onClick:d[0]||(d[0]=N=>B.value=!0)},{default:A(()=>[...d[9]||(d[9]=[E(" Pick from snapshot ",-1)])]),_:1})):T("",!0),t(V)?(o(),q(G,{key:1,to:t(V),target:"_blank",size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-crosshair",title:"Open the failure trace in the trace viewer — its Pick locator tool works on the recorded page snapshots"},{default:A(()=>[...d[10]||(d[10]=[E(" Pick from trace ",-1)])]),_:1},8,["to"])):T("",!0)])]),key:"1"}:void 0]),1040,["count"])):!t(s)&&!t(l)&&!t(f)?(o(),q(Se(t(a)),Ne({key:1},t(c),{icon:"i-lucide-bandage",title:"Alternative locators",subtitle:"No alternatives available",help:"locator-healing"}),Re({default:A(()=>[_(re,{color:"neutral",icon:"i-lucide-info",variant:"subtle"},{description:A(()=>[d[31]||(d[31]=E(" No pre-captured alternatives — this locator has never passed in a previous run. ",-1)),_(te,{to:"capture-fixtures","no-icon":"",class:"text-primary hover:underline"},{default:A(()=>[...d[30]||(d[30]=[E("Enable Piwi dashboard fixtures",-1)])]),_:1}),d[32]||(d[32]=E(" to capture element attributes at test time, or use “Pick from snapshot” above to choose a locator by hand on the failure-time page. ",-1))]),_:1})]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[d[27]||(d[27]=p("span",null,"No alternatives available",-1))]),key:"0"}:void 0,t(V)||t(n)?.failingLocator?{name:"actions",fn:A(()=>[p("div",No,[t(n)?.failingLocator?(o(),q(G,{key:0,size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-mouse-pointer",title:"Open the failure-time DOM snapshot and click the element to pick a locator",onClick:d[6]||(d[6]=N=>B.value=!0)},{default:A(()=>[...d[28]||(d[28]=[E(" Pick from snapshot ",-1)])]),_:1})):T("",!0),t(V)?(o(),q(G,{key:1,to:t(V),target:"_blank",size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-crosshair",title:"Open the failure trace in the trace viewer — its Pick locator tool works on the recorded page snapshots"},{default:A(()=>[...d[29]||(d[29]=[E(" Pick from trace ",-1)])]),_:1},8,["to"])):T("",!0)])]),key:"1"}:void 0]),1040)):T("",!0),t(n)?.failingLocator?(o(),q(so,{key:2,open:t(B),"onUpdate:open":d[7]||(d[7]=N=>Le(B)?B.value=N:null),"run-id":e.runId,"test-runs-case-id":e.testRunsCaseId,"failing-locator":t(n).failingLocator,healing:t(n),onConfirmed:Q,onClose:d[8]||(d[8]=N=>B.value=!1)},null,8,["open","run-id","test-runs-case-id","failing-locator","healing"])):T("",!0)],64)}}}),Ma=Object.assign(Uo,{__name:"LocatorHealingPanel"}),jo={key:1,class:"space-y-2"},Do={class:"text-xs font-medium text-gray-500 dark:text-gray-400 sm:w-40 shrink-0"},Ko={class:"flex flex-wrap items-center gap-1.5 min-w-0 text-xs font-mono"},Vo={class:"rounded bg-red-50 px-1.5 py-0.5 text-red-700 dark:bg-red-950/30 dark:text-red-400 break-all"},Ho={class:"rounded bg-green-50 px-1.5 py-0.5 text-green-700 dark:bg-green-950/30 dark:text-green-400 break-all"},Fo={key:0,class:"text-xs text-gray-400 dark:text-gray-500"},qo={key:0},Zo=ue({__name:"EnvironmentDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const a=e,c=I(()=>a.storageKey?De:je),n=I(()=>a.storageKey?{storageKey:a.storageKey}:{}),{data:s,pending:l,error:f}=Ue(()=>`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/environment-diff`,{lazy:!0},"$0pD8W6UYqF"),i=I(()=>s.value?.entries??[]),h=I(()=>i.value.filter(w=>!w.informational)),v=I(()=>i.value.filter(w=>w.informational)),L=I(()=>{const w=s.value?.baseline;if(!w)return"";const S=w.startTime?` · ${Ye(new Date(w.startTime))}`:"";return`vs last pass in run #${w.runId}${S}`}),y=I(()=>{if(s.value?.status!=="ok")return"No passing baseline to compare against";const w=h.value.length;return w===0?"Identical to last pass — no environment drift":`${w} change${w===1?"":"s"}: ${h.value.map(S=>S.label).join(", ")}`}),C=Y(null);return r({reveal:()=>C.value?.reveal?.()}),(w,S)=>{const D=Ge,U=$e;return!t(l)&&!t(f)&&t(s)?.status==="ok"?(o(),q(Se(t(c)),Ne({key:0,ref_key:"card",ref:C},t(n),{icon:"i-lucide-git-compare-arrows",title:"Environment diff",count:t(h).length||void 0,help:"environment-diff",subtitle:t(L)}),Re({default:A(()=>[t(i).length===0?(o(),q(D,{key:0,color:"success",icon:"i-lucide-check-circle",variant:"subtle",description:"The environment is identical to the last passing run — environment drift is unlikely to explain this failure."})):(o(),u("div",jo,[(o(!0),u(ee,null,fe(t(h),V=>(o(),u("div",{key:V.key,class:"rounded-lg border border-default p-3 flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-3"},[p("span",Do,$(V.label),1),p("div",Ko,[p("code",Vo,$(V.failing??"(unset)"),1),_(U,{name:"i-lucide-arrow-left",class:"size-3 shrink-0 text-gray-400"}),p("code",Ho,$(V.baseline??"(unset)"),1)])]))),128)),t(v).length>0?(o(),u("p",Fo,[S[0]||(S[0]=E(" Also changed (varies naturally between runs): ",-1)),(o(!0),u(ee,null,fe(t(v),(V,B)=>(o(),u("span",{key:V.key},[E($(V.label.toLowerCase())+" "+$(V.baseline??"—")+" → "+$(V.failing??"—"),1),B<t(v).length-1?(o(),u("span",qo,", ")):T("",!0)]))),128))])):T("",!0)]))]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[p("span",null,$(t(y)),1)]),key:"0"}:void 0]),1040,["count","subtitle"])):T("",!0)}}}),Na=Object.assign(Zo,{__name:"EnvironmentDiffCard"}),Wo={class:"absolute top-4 left-4 text-white/70 text-sm font-medium"},Jo=["src","alt"],Yo=ue({__name:"ScreenshotLightbox",props:{images:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:r}){const a=e,c=r,n=I(()=>a.modelValue!==null);function s(){c("update:modelValue",null)}function l(){a.modelValue!==null&&a.modelValue>0&&c("update:modelValue",a.modelValue-1)}function f(){a.modelValue!==null&&a.modelValue<a.images.length-1&&c("update:modelValue",a.modelValue+1)}const i=I(()=>a.modelValue===null?null:a.images[a.modelValue]??null);function h(v){n.value&&(v.key==="Escape"&&s(),v.key==="ArrowLeft"&&l(),v.key==="ArrowRight"&&f())}return rt(()=>window.addEventListener("keydown",h)),Ct(()=>window.removeEventListener("keydown",h)),(v,L)=>{const y=$e;return o(),q(Tt,{to:"body"},[_(St,{name:"lightbox"},{default:A(()=>[n.value?(o(),u("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/90",onClick:_e(s,["self"])},[p("button",{class:"absolute top-4 right-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:s},[_(y,{name:"i-lucide-x",class:"size-6"})]),p("div",Wo,$((e.modelValue??0)+1)+" / "+$(e.images.length),1),e.images.length>1&&(e.modelValue??0)>0?(o(),u("button",{key:0,class:"absolute left-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:l},[_(y,{name:"i-lucide-chevron-left",class:"size-6"})])):T("",!0),i.value?(o(),u("img",{key:1,src:i.value.src,alt:i.value.name,class:"max-h-[90vh] max-w-[90vw] object-contain rounded-lg",onClick:L[0]||(L[0]=_e(()=>{},["stop"]))},null,8,Jo)):T("",!0),e.images.length>1&&(e.modelValue??0)<e.images.length-1?(o(),u("button",{key:2,class:"absolute right-4 size-10 flex items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/20 transition-colors",onClick:f},[_(y,{name:"i-lucide-chevron-right",class:"size-6"})])):T("",!0)])):T("",!0)]),_:1})])}}}),mt=Object.assign(At(Yo,[["__scopeId","data-v-c02b1e9b"]]),{__name:"ScreenshotLightbox"}),Go={class:"flex justify-end mb-2"},Qo={key:1,class:"rounded overflow-hidden border border-default bg-gray-50 dark:bg-gray-900"},Xo=["src"],es={key:2,class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},ts={class:"rounded overflow-hidden border border-red-200 dark:border-red-900 bg-gray-50 dark:bg-gray-900"},ns=["src"],os={class:"rounded overflow-hidden border border-green-200 dark:border-green-900 bg-gray-50 dark:bg-gray-900"},ss={class:"px-2 py-1 text-[10px] font-medium text-green-600 dark:text-green-400"},as=["src"],rs=ue({__name:"VisualDiffCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const a=e,c=I(()=>a.storageKey?De:je),n=I(()=>a.storageKey?{storageKey:a.storageKey}:{}),s=ze(),{data:l,pending:f,error:i}=Ue(()=>`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/visual-diff`,{lazy:!0},"$QAhY8Q5pJg"),h=I(()=>l.value?.status==="ok"?l.value.diff??null:null),v=Y("overlay"),L=[{label:"Overlay",value:"overlay"},{label:"Side by side",value:"side-by-side"}],y=I(()=>h.value?Me(h.value.path,"image/png",s.app?.baseURL):""),C=I(()=>h.value?Me(h.value.failingPath,null,s.app?.baseURL):""),w=I(()=>h.value?Me(h.value.baselinePath,null,s.app?.baseURL):""),S=I(()=>h.value?(h.value.changedPixelRatio*100).toFixed(2):"0"),D=I(()=>{const X=h.value?.changedPixelRatio??0;return X>.1?"error":X>.01?"warning":"success"}),U=I(()=>h.value?h.value.dimensionMismatch?`${S.value}% changed — dimensions differ, unreliable`:`${S.value}% of pixels changed vs last pass`:"No comparable screenshots"),V=I(()=>h.value?[{src:C.value,name:"Failing screenshot"},{src:w.value,name:"Last passing screenshot"},{src:y.value,name:"Diff overlay"}]:[]),B=Y(null),Q=Y(null);return r({reveal:()=>Q.value?.reveal?.()}),(X,m)=>{const M=Pe,x=Ge,K=Nt,P=mt;return!t(f)&&!t(i)&&t(h)?(o(),q(Se(t(c)),Ne({key:0,ref_key:"card",ref:Q},t(n),{icon:"i-lucide-images",title:"Visual diff",help:"visual-diff"}),Re({subtitle:A(()=>[p("span",null,"vs last pass in run #"+$(t(h).baselineRunId),1)]),actions:A(()=>[_(M,{color:t(D),variant:"subtle",size:"sm",class:"font-mono tabular-nums"},{default:A(()=>[E($(t(S))+"% changed ",1)]),_:1},8,["color"])]),default:A(()=>[t(h).dimensionMismatch?(o(),q(x,{key:0,class:"mb-3",color:"warning",icon:"i-lucide-alert-triangle",variant:"subtle",title:"Screenshot dimensions differ",description:"The failing and passing screenshots have different sizes (viewport change?). They are compared on a padded canvas, so the changed-pixel ratio is inflated and unreliable."})):T("",!0),p("div",Go,[_(K,{modelValue:t(v),"onUpdate:modelValue":m[0]||(m[0]=j=>Le(v)?v.value=j:null),items:L,size:"xs",content:!1,ui:{list:"overflow-x-auto",trigger:"shrink-0"}},null,8,["modelValue"])]),t(v)==="overlay"?(o(),u("div",Qo,[p("img",{src:t(y),alt:"Diff overlay (red = changed pixels)",class:"w-full max-h-96 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open diff overlay in lightbox",onClick:m[1]||(m[1]=j=>B.value=2),onKeydown:[m[2]||(m[2]=ke(j=>B.value=2,["enter"])),m[3]||(m[3]=ke(_e(j=>B.value=2,["prevent"]),["space"]))]},null,40,Xo),m[11]||(m[11]=p("p",{class:"px-2 py-1 text-[10px] text-gray-500"},"Red pixels mark differences against the last passing run",-1))])):(o(),u("div",es,[p("div",ts,[m[12]||(m[12]=p("p",{class:"px-2 py-1 text-[10px] font-medium text-red-600 dark:text-red-400"},"Failing",-1)),p("img",{src:t(C),alt:"Failing screenshot",class:"w-full max-h-80 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open failing screenshot in lightbox",onClick:m[4]||(m[4]=j=>B.value=0),onKeydown:[m[5]||(m[5]=ke(j=>B.value=0,["enter"])),m[6]||(m[6]=ke(_e(j=>B.value=0,["prevent"]),["space"]))]},null,40,ns)]),p("div",os,[p("p",ss," Last pass (run #"+$(t(h).baselineRunId)+") ",1),p("img",{src:t(w),alt:"Last passing screenshot",class:"w-full max-h-80 object-contain cursor-zoom-in outline-none focus-visible:outline-2 focus-visible:outline-primary",loading:"lazy",role:"button",tabindex:"0","aria-label":"Open last passing screenshot in lightbox",onClick:m[7]||(m[7]=j=>B.value=1),onKeydown:[m[8]||(m[8]=ke(j=>B.value=1,["enter"])),m[9]||(m[9]=ke(_e(j=>B.value=1,["prevent"]),["space"]))]},null,40,as)])])),_(P,{modelValue:t(B),"onUpdate:modelValue":m[10]||(m[10]=j=>Le(B)?B.value=j:null),images:t(V)},null,8,["modelValue","images"])]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[p("span",null,$(t(U)),1)]),key:"0"}:void 0]),1040)):T("",!0)}}}),Ua=Object.assign(rs,{__name:"VisualDiffCard"}),is={class:"max-h-96 overflow-y-auto"},ls={key:0,class:"mt-2 text-xs text-gray-400 dark:text-gray-500"},Ze=2e4,cs=ue({__name:"DomSnapshotCard",props:{runId:{},testRunsCaseId:{},storageKey:{}},setup(e,{expose:r}){const a=e,c=I(()=>a.storageKey?De:je),n=I(()=>a.storageKey?{storageKey:a.storageKey}:{}),{data:s,pending:l,error:f}=Ue(()=>`/api/test-runs/${a.runId}/cases/${a.testRunsCaseId}/dom-snapshot`,{lazy:!0},"$rAu-vOWv77"),i=I(()=>(s.value?.html??"").slice(0,Ze)),h=I(()=>(s.value?.html?.length??0)>Ze),v=I(()=>{const w=s.value;return!w||w.status!=="ok"?"":`${Math.round((w.html?.length??0)/1024)} KB · rendered from the uploaded trace${w.snapshotName?` (${w.snapshotName})`:""}`}),{copy:L,copied:y}=He(),C=Y(null);return r({reveal:()=>C.value?.reveal?.()}),(w,S)=>{const D=Ie,U=Ut,V=jt;return!t(l)&&!t(f)&&t(s)?.status==="ok"&&t(s).html?(o(),q(Se(t(c)),Ne({key:0,ref_key:"card",ref:C},t(n),{icon:"i-lucide-file-code",title:"DOM snapshot",help:"dom-snapshot",subtitle:t(v)}),Re({actions:A(()=>[_(U,{text:t(y)?"Copied!":"Copy full HTML"},{default:A(()=>[_(D,{size:"xs",variant:"ghost",color:"neutral",icon:t(y)?"i-lucide-check":"i-lucide-clipboard",onClick:S[0]||(S[0]=B=>t(L)(t(s).html))},null,8,["icon"])]),_:1},8,["text"])]),default:A(()=>[p("div",is,[_(V,{code:t(i),lang:"xml"},null,8,["code"])]),t(h)||t(s).truncated?(o(),u("p",ls,[t(h)?(o(),u(ee,{key:0},[E("Showing the first "+$(Math.round(Ze/1e3))+"k characters — use Copy for the full document.",1)],64)):(o(),u(ee,{key:1},[E("The snapshot was truncated to its size cap.")],64))])):T("",!0)]),_:2},[e.storageKey?{name:"folded",fn:A(()=>[p("span",null,"Failure-time HTML extracted from the trace — "+$(Math.round((t(s).html.length??0)/1024))+" KB",1)]),key:"0"}:void 0]),1040,["subtitle"])):T("",!0)}}}),ja=Object.assign(cs,{__name:"DomSnapshotCard"}),us={class:"rounded-md border border-default overflow-hidden"},ds={class:"text-xs font-semibold text-gray-600 dark:text-gray-300 flex-1"},ps={key:0,class:"text-gray-400 font-normal ml-1"},fs={key:0},ms=ue({__name:"TestEvidenceSection",props:We({icon:{},label:{},count:{},collapsible:{type:Boolean}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(e){const r=e,a=at(e,"open"),c=I(()=>r.collapsible===!1||a.value);return(n,s)=>{const l=$e;return o(),u("div",us,[(o(),q(Se(e.collapsible===!1?"div":"button"),{class:pe(["w-full flex items-center gap-1.5 px-3 py-2 bg-elevated border-b border-default text-left",e.collapsible!==!1&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer"]),onClick:s[0]||(s[0]=f=>e.collapsible!==!1&&(a.value=!a.value))},{default:A(()=>[_(l,{name:e.icon,class:"size-3.5 shrink-0 text-primary/70"},null,8,["name"]),p("span",ds,[E($(e.label),1),e.count!=null?(o(),u("span",ps,"("+$(e.count)+")",1)):T("",!0)]),e.collapsible!==!1?(o(),q(l,{key:0,name:a.value?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"size-3.5 text-gray-400"},null,8,["name"])):T("",!0)]),_:1},8,["class"])),t(c)?(o(),u("div",fs,[Oe(n.$slots,"default")])):T("",!0)])}}}),Xe=Object.assign(ms,{__name:"TestEvidenceSection"}),gs={class:"grid grid-cols-2 gap-2 p-2 bg-gray-50 dark:bg-gray-900"},hs=["aria-label","onClick","onKeydown"],ys=["src","alt"],vs={class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/30"},xs={class:"absolute bottom-0 inset-x-0 px-1.5 py-0.5 text-[10px] text-white bg-black/50 truncate"},bs=ue({__name:"TestEvidenceScreenshots",props:{attachments:{}},setup(e){const r=e,a=ze();function c(l){return l.split("/").pop()||l}const n=I(()=>r.attachments.filter(l=>Kt(l.path,l.contentType)).map(l=>({src:Me(l.path,l.contentType,a.app?.baseURL),name:l.name||c(l.path)}))),s=Y(null);return(l,f)=>{const i=$e,h=mt,v=Xe;return t(n).length>0?(o(),q(v,{key:0,icon:"i-lucide-image",label:"Screenshots",count:t(n).length,collapsible:!1},{default:A(()=>[p("div",gs,[(o(!0),u(ee,null,fe(t(n),(L,y)=>(o(),u("div",{key:L.src,class:"relative group cursor-pointer rounded overflow-hidden border border-default outline-none focus-visible:outline-2 focus-visible:outline-primary",role:"button",tabindex:"0","aria-label":`View screenshot ${L.name}`,onClick:C=>s.value=y,onKeydown:[ke(C=>s.value=y,["enter"]),ke(_e(C=>s.value=y,["prevent"]),["space"])]},[p("img",{src:L.src,alt:L.name,class:"w-full h-28 object-cover object-top transition-opacity group-hover:opacity-80",loading:"lazy"},null,8,ys),p("div",vs,[_(i,{name:"i-lucide-zoom-in",class:"size-5 text-white"})]),p("p",xs,$(L.name),1)],40,hs))),128))]),_(h,{modelValue:t(s),"onUpdate:modelValue":f[0]||(f[0]=L=>Le(s)?s.value=L:null),images:t(n)},null,8,["modelValue","images"])]),_:1},8,["count"])):T("",!0)}}}),Da=Object.assign(bs,{__name:"TestEvidenceScreenshots"}),ks={class:"m-0"},_s={class:"bg-black rounded overflow-hidden"},$s=["src"],ws=["title"],Cs=ue({__name:"VideoPlayer",props:{src:{},label:{}},setup(e){return(r,a)=>(o(),u("figure",ks,[p("div",_s,[p("video",{src:e.src,controls:"",preload:"metadata",class:"w-full max-h-96"}," Your browser does not support the video tag. ",8,$s)]),e.label?(o(),u("figcaption",{key:0,class:"mt-1 text-xs text-gray-400 truncate",title:e.label},$(e.label),9,ws)):T("",!0)]))}}),Ts=Object.assign(Cs,{__name:"VideoPlayer"}),Ss={class:"space-y-2 p-2 bg-gray-50 dark:bg-gray-900"},As=ue({__name:"TestEvidenceVideos",props:{attachments:{}},setup(e){const r=e,a=ze();function c(s){return s.split("/").pop()||s}const n=I(()=>r.attachments.filter(s=>Vt(s.path,s.contentType)).map(s=>({src:Me(s.path,s.contentType,a.app?.baseURL),name:s.name||c(s.path)})));return(s,l)=>{const f=Ts,i=Xe;return t(n).length>0?(o(),q(i,{key:0,icon:"i-lucide-video",label:"Videos",count:t(n).length,collapsible:!1},{default:A(()=>[p("div",Ss,[(o(!0),u(ee,null,fe(t(n),h=>(o(),q(f,{key:h.src,src:h.src,label:h.name},null,8,["src","label"]))),128))])]),_:1},8,["count"])):T("",!0)}}}),Ka=Object.assign(As,{__name:"TestEvidenceVideos"}),Ls={class:"flex items-center justify-between gap-2"},Rs={class:"flex items-center gap-2 min-w-0"},Is={class:"text-sm truncate"},zs={key:0,class:"text-xs text-gray-400 shrink-0"},Ps={key:1,class:"text-xs text-gray-400 shrink-0"},Bs={class:"flex items-center gap-1.5 shrink-0"},Es=ue({__name:"TraceListItem",props:{trace:{},showTime:{type:Boolean,default:!0}},setup(e){const r=e,a=ze(),c=I(()=>(a.app?.baseURL??"/").replace(/\/$/,"")),n=I(()=>!!a.public.demoMode&&r.trace.filePath.startsWith("demo/")),s=I(()=>r.trace.filePath.split("/").pop()||r.trace.filePath),l=I(()=>ct(r.trace.filePath,a.app?.baseURL,n.value)),f=I(()=>n.value?`${c.value}/${r.trace.filePath}`:`${c.value}/api/files/${Ot(r.trace.filePath)}`);return(i,h)=>{const v=$e,L=Ie;return o(),u("div",Ls,[p("div",Rs,[_(v,{name:"i-lucide-file-archive",class:"size-4 text-gray-400 shrink-0"}),p("span",Is,$(t(s)),1),e.trace.size?(o(),u("span",zs,$(("formatBytes"in i?i.formatBytes:t(Ht))(e.trace.size)),1)):T("",!0),e.showTime?(o(),u("span",Ps,$(("formatRelativeTime"in i?i.formatRelativeTime:t(Ye))(e.trace.createdAt)),1)):T("",!0)]),p("div",Bs,[_(L,{to:t(l),target:"_blank",icon:"i-lucide-bug-play",size:"xs",label:"View trace"},null,8,["to"]),_(L,{to:t(f),target:"_blank",icon:"i-lucide-download",size:"xs",color:"neutral",variant:"soft",label:"Download"},null,8,["to"])])])}}}),Os=Object.assign(Es,{__name:"TraceListItem"}),Ms={key:0,class:"flex items-center justify-center py-4"},Ns={key:1,class:"divide-y divide-default"},Us=ue({__name:"TestEvidenceTraces",props:{traces:{},loading:{type:Boolean}},setup(e){return(r,a)=>{const c=$e,n=Os,s=Xe;return e.loading||e.traces.length>0?(o(),q(s,{key:0,icon:"i-lucide-bug-play",label:"Traces",count:e.traces.length||null,collapsible:!1},{default:A(()=>[e.loading&&!e.traces.length?(o(),u("div",Ms,[_(c,{name:"i-lucide-loader-circle",class:"size-4 animate-spin text-gray-400"})])):(o(),u("div",Ns,[(o(!0),u(ee,null,fe(e.traces,l=>(o(),q(n,{key:l.id,trace:l,class:"px-3 py-2"},null,8,["trace"]))),128))]))]),_:1},8,["count"])):T("",!0)}}}),Va=Object.assign(Us,{__name:"TestEvidenceTraces"}),js={class:"space-y-2"},Ds={key:0,class:"rounded-lg border border-default overflow-hidden"},Ks=["title"],Vs={key:2,class:"truncate text-gray-400 dark:text-gray-500"},Hs={class:"font-mono"},Fs={key:0,class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},qs={class:"min-w-max"},Zs={key:1,class:"rounded-lg border border-dashed border-default"},Ws=["onClick"],Js={key:0,class:"px-3 pb-2 space-y-1"},Ys=["title"],Gs={key:0,class:"truncate font-mono shrink-0"},Qs=ue({__name:"TraceCallStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){const r=e,a=I(()=>{if(!r.frames.some(L=>L.inProject))return r.frames.map((L,y)=>({kind:"frame",frame:L,frameIndex:y}));const i=[];let h=[];const v=()=>{h.length!==0&&(i.push({kind:"group",frames:h,key:`group-${i.length}`}),h=[])};return r.frames.forEach((L,y)=>{L.inProject?(v(),i.push({kind:"frame",frame:L,frameIndex:y})):h.push(L)}),v(),i}),c=I(()=>{const f=r.frames.findIndex(i=>i.inProject);return f>=0?f:0}),n=Y(new Set);function s(f){const i=new Set(n.value);i.has(f)?i.delete(f):i.add(f),n.value=i}function l(f){return f.source?f.source.lines.map((i,h)=>{const v=f.source.startLine+h;return{lineNo:v,text:i,failing:v===f.line}}):[]}return(f,i)=>{const h=$e,v=ut,L=Pe;return o(),u("div",js,[(o(!0),u(ee,null,fe(t(a),y=>(o(),u(ee,{key:y.kind==="frame"?`f-${y.frameIndex}`:y.key},[y.kind==="frame"?(o(),u("div",Ds,[p("div",{class:pe(["flex items-center gap-2 px-3 py-1.5 bg-elevated/40 text-xs",y.frame.source?"border-b border-default":""])},[_(h,{name:y.frameIndex===t(c)?"i-lucide-circle-x":"i-lucide-corner-left-up",class:pe([y.frameIndex===t(c)?"text-red-500":"text-gray-400","size-3.5 shrink-0"])},null,8,["name","class"]),y.frame.inProject?(o(),q(v,{key:0,"file-path":y.frame.file,line:y.frame.line,column:y.frame.column,"project-key":e.projectKey,"project-name":e.projectName,class:"min-w-0"},null,8,["file-path","line","column","project-key","project-name"])):(o(),u("code",{key:1,class:"truncate text-gray-500 dark:text-gray-400",title:y.frame.absFile||y.frame.file},$(y.frame.file)+":"+$(y.frame.line),9,Ks)),y.frame.functionName?(o(),u("span",Vs,[i[0]||(i[0]=E(" in ",-1)),p("span",Hs,$(y.frame.functionName),1)])):T("",!0),_(L,{color:y.frameIndex===t(c)?"error":"neutral",variant:"subtle",size:"xs",class:"ml-auto shrink-0"},{default:A(()=>[E($(y.frameIndex===t(c)?"Failed here":"Caller"),1)]),_:2},1032,["color"])],2),y.frame.source?(o(),u("div",Fs,[p("div",qs,[(o(!0),u(ee,null,fe(l(y.frame),C=>(o(),u("div",{key:C.lineNo,class:pe(["px-3 whitespace-pre flex",C.failing?"bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300 font-medium":"text-gray-600 dark:text-gray-400"])},[p("span",{class:pe(["w-10 shrink-0 text-right pr-3 tabular-nums select-none",C.failing?"text-red-400 dark:text-red-500":"text-gray-300 dark:text-gray-600"])},$(C.lineNo),3),p("span",null,$(C.text),1)],2))),128))])])):T("",!0)])):(o(),u("div",Zs,[p("button",{type:"button",class:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300",onClick:C=>s(y.key)},[_(h,{name:t(n).has(y.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 shrink-0"},null,8,["name"]),E(" "+$(y.frames.length)+" frame"+$(y.frames.length===1?"":"s")+" in dependencies ",1)],8,Ws),t(n).has(y.key)?(o(),u("div",Js,[(o(!0),u(ee,null,fe(y.frames,(C,w)=>(o(),u("div",{key:w,class:"flex items-center gap-2 text-xs text-gray-400 dark:text-gray-500 min-w-0"},[_(h,{name:"i-lucide-corner-left-up",class:"size-3 shrink-0"}),p("code",{class:"truncate",title:C.absFile||C.file},$(C.file)+":"+$(C.line),9,Ys),C.functionName?(o(),u("span",Gs,$(C.functionName),1)):T("",!0)]))),128))])):T("",!0)]))],64))),128))])}}}),Ha=Object.assign(Qs,{__name:"TraceCallStack"}),Xs={class:"space-y-2"},ea={class:"flex items-center gap-2 px-3 py-1.5 bg-elevated/40 border-b border-default text-xs"},ta={class:"overflow-x-auto text-xs font-mono leading-relaxed py-1"},na={class:"min-w-max"},oa=ue({__name:"TestSourceStack",props:{frames:{},projectKey:{},projectName:{}},setup(e){function r(a){return a.split(`
@@ -1 +1 @@
1
- import{G as m,a as p}from"./CD3R-ggS.js";import{d,o as n,c as o,k as t,F as r,m as i,t as l,i as f,q as _,h as c}from"./h49q_GXF.js";const k=["title"],x=d({__name:"DurationValue",props:{ms:{default:null},fallback:{default:"—"},unitClass:{default:"text-gray-400/70 dark:text-gray-500/70"},noTitle:{type:Boolean,default:!1}},setup(e){const a=e,s=c(()=>m(a.ms)),u=c(()=>a.noTitle||a.ms===null||a.ms===void 0?void 0:p(a.ms));return(y,g)=>(n(),o("span",{class:"tabular-nums whitespace-nowrap",title:t(u)},[t(s)?(n(),o(r,{key:0},[i(l(t(s).value),1),f("span",{class:_(e.unitClass)},l(t(s).unit),3)],64)):(n(),o(r,{key:1},[i(l(e.fallback),1)],64))],8,k))}}),h=Object.assign(x,{__name:"DurationValue"});export{h as _};
1
+ import{G as m,a as p}from"./DeewM3Wg.js";import{d,o as n,c as o,k as t,F as r,m as i,t as l,i as f,q as _,h as c}from"./CNu3kken.js";const k=["title"],x=d({__name:"DurationValue",props:{ms:{default:null},fallback:{default:"—"},unitClass:{default:"text-gray-400/70 dark:text-gray-500/70"},noTitle:{type:Boolean,default:!1}},setup(e){const a=e,s=c(()=>m(a.ms)),u=c(()=>a.noTitle||a.ms===null||a.ms===void 0?void 0:p(a.ms));return(y,g)=>(n(),o("span",{class:"tabular-nums whitespace-nowrap",title:t(u)},[t(s)?(n(),o(r,{key:0},[i(l(t(s).value),1),f("span",{class:_(e.unitClass)},l(t(s).unit),3)],64)):(n(),o(r,{key:1},[i(l(e.fallback),1)],64))],8,k))}}),h=Object.assign(x,{__name:"DurationValue"});export{h as _};
@@ -1 +1 @@
1
- import{d as _,f as i,ac as h,g as l,o as s,V as o,i as a,p as k,q as g,v as n,m as c,t as m,c as r,F as p}from"./h49q_GXF.js";import{_ as y}from"./BtSJxOdh.js";import{_ as C}from"./CWoSSKhQ.js";const $={class:"flex items-start justify-between gap-2"},b={class:"flex items-center gap-2 min-w-0"},x={class:"min-w-0"},v={class:"text-lg font-medium inline-flex items-center gap-1"},w={key:0,class:"text-sm text-gray-500 mt-0.5"},S={key:0,class:"flex items-center gap-1 shrink-0"},B=_({__name:"SectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{}},setup(t){return(e,V)=>{const u=k,d=y,f=C;return s(),i(f,null,h({header:l(()=>[a("div",$,[a("div",b,[t.icon?(s(),i(u,{key:0,name:t.icon,class:g(["w-5 h-5 shrink-0",t.iconClass])},null,8,["name","class"])):n("",!0),a("div",x,[a("h3",v,[c(m(t.title),1),t.count!=null?(s(),r(p,{key:0},[c(" ("+m(t.count)+")",1)],64)):n("",!0),t.help?(s(),i(d,{key:1,topic:t.help},null,8,["topic"])):n("",!0)]),t.subtitle||e.$slots.subtitle?(s(),r("p",w,[o(e.$slots,"subtitle",{},()=>[c(m(t.subtitle),1)])])):n("",!0)])]),e.$slots.actions?(s(),r("div",S,[o(e.$slots,"actions")])):n("",!0)])]),default:l(()=>[o(e.$slots,"default")]),_:2},[e.$slots.footer?{name:"footer",fn:l(()=>[o(e.$slots,"footer")]),key:"0"}:void 0]),1024)}}}),H=Object.assign(B,{__name:"SectionCard"});export{H as _};
1
+ import{d as _,f as i,ac as h,g as l,o as s,V as o,i as a,p as k,q as g,v as n,m as c,t as m,c as r,F as p}from"./CNu3kken.js";import{_ as y}from"./CfhOanaF.js";import{_ as C}from"./B_JSV0yG.js";const $={class:"flex items-start justify-between gap-2"},b={class:"flex items-center gap-2 min-w-0"},x={class:"min-w-0"},v={class:"text-lg font-medium inline-flex items-center gap-1"},w={key:0,class:"text-sm text-gray-500 mt-0.5"},S={key:0,class:"flex items-center gap-1 shrink-0"},B=_({__name:"SectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{}},setup(t){return(e,V)=>{const u=k,d=y,f=C;return s(),i(f,null,h({header:l(()=>[a("div",$,[a("div",b,[t.icon?(s(),i(u,{key:0,name:t.icon,class:g(["w-5 h-5 shrink-0",t.iconClass])},null,8,["name","class"])):n("",!0),a("div",x,[a("h3",v,[c(m(t.title),1),t.count!=null?(s(),r(p,{key:0},[c(" ("+m(t.count)+")",1)],64)):n("",!0),t.help?(s(),i(d,{key:1,topic:t.help},null,8,["topic"])):n("",!0)]),t.subtitle||e.$slots.subtitle?(s(),r("p",w,[o(e.$slots,"subtitle",{},()=>[c(m(t.subtitle),1)])])):n("",!0)])]),e.$slots.actions?(s(),r("div",S,[o(e.$slots,"actions")])):n("",!0)])]),default:l(()=>[o(e.$slots,"default")]),_:2},[e.$slots.footer?{name:"footer",fn:l(()=>[o(e.$slots,"footer")]),key:"0"}:void 0]),1024)}}}),H=Object.assign(B,{__name:"SectionCard"});export{H as _};
@@ -1 +1 @@
1
- import{d as a,o as t,c as n,t as o,R as s,q as c,aj as l}from"./h49q_GXF.js";const r=a({__name:"TagBadge",props:{text:{},color:{},variant:{}},setup(e){return(i,m)=>(t(),n("span",{class:c(["tag-badge inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap",e.variant==="outline"?"tag-badge--outline":""]),style:s({"--tag-color":e.color})},o(e.text),7))}}),p=Object.assign(l(r,[["__scopeId","data-v-58fcc931"]]),{__name:"TagBadge"});export{p as _};
1
+ import{d as a,o as t,c as n,t as o,R as s,q as c,aj as l}from"./CNu3kken.js";const r=a({__name:"TagBadge",props:{text:{},color:{},variant:{}},setup(e){return(i,m)=>(t(),n("span",{class:c(["tag-badge inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap",e.variant==="outline"?"tag-badge--outline":""]),style:s({"--tag-color":e.color})},o(e.text),7))}}),p=Object.assign(l(r,[["__scopeId","data-v-58fcc931"]]),{__name:"TagBadge"});export{p as _};
@@ -1 +1 @@
1
- import{d as S,o as v,c as h,k as t,F as J,i as x,q as B,V as K,m as l,t as L,j as n,p as A,f as U,g as a,_ as q,v as F,l as M,h as y,r as _,L as R,K as T}from"./h49q_GXF.js";import{_ as H}from"./DOLeth7M.js";import{a as G}from"./BZnfiR67.js";import{a as Q}from"./Cd8r0xk5.js";function W(i){let o=i,u=null,j=null;const k=i.lastIndexOf(":");if(k>0){const m=i.slice(k+1);if(/^\d+$/.test(m)){const c=i.slice(0,k),b=c.lastIndexOf(":");if(b>0){const g=c.slice(b+1);/^\d+$/.test(g)?(j=parseInt(m,10),u=parseInt(g,10),o=c.slice(0,b)):(u=parseInt(m,10),o=c)}else u=parseInt(m,10),o=c}}return{filePath:o,line:u,column:j}}const X={class:"group/ide inline-flex items-center gap-1 min-w-0 max-w-full align-middle"},Y=["title","aria-label"],Z={type:"button",class:"shrink-0 inline-flex items-center rounded p-0.5 text-muted cursor-pointer transition-colors hover:bg-elevated/60 hover:text-default","aria-label":"Choose how to open in IDE",title:"Choose how to open"},ee={class:"w-56 p-1 space-y-0.5"},te=S({__name:"OpenInIdeLink",props:{filePath:{},line:{default:null},column:{default:null},location:{},projectKey:{},projectName:{},mono:{type:Boolean,default:!0}},setup(i){const o=i,{openInIde:u,openInVscode:j,openViaJetbrainsUrl:k,openViaJetbrainsHttp:m,resolveAbsPath:c,openSettings:b}=G(),{copy:g}=Q(),P=y(()=>o.filePath?{filePath:o.filePath,line:o.line??null,column:o.column??null}:o.location?W(o.location):{filePath:"",line:null,column:null}),f=y(()=>P.value.filePath),w=y(()=>P.value.line),I=y(()=>w.value?`${f.value}:${w.value}`:f.value),O=y(()=>c(f.value,o.projectKey)),r=y(()=>({filePath:f.value,line:w.value,column:P.value.column,projectKey:o.projectKey??null,projectName:o.projectName??null})),C=_(!1),N=_(!1);function D(){N.value=!0,R(()=>{C.value=!0})}function p($){C.value=!1,$()}return($,e)=>{const z=A,d=q,V=H,E=T;return v(),h("span",X,[t(f)?(v(),h(J,{key:0},[x("button",{type:"button",class:"inline-flex items-center gap-1 min-w-0 max-w-full cursor-pointer text-left",title:`Open ${t(I)} in IDE`,"aria-label":`Open ${t(I)} in IDE`,onClick:e[0]||(e[0]=s=>t(u)(t(r)))},[x("span",{class:B([i.mono?"font-mono":"","truncate underline decoration-dashed decoration-1 underline-offset-2 decoration-gray-400/70 dark:decoration-gray-500/70 transition-colors group-hover/ide:decoration-current"])},[K($.$slots,"default",{},()=>[l(L(t(I)),1)])],2),n(z,{name:"i-lucide-external-link",class:"size-3 shrink-0 opacity-0 transition-opacity group-hover/ide:opacity-100"})],8,Y),t(N)?(v(),U(E,{key:1,open:t(C),"onUpdate:open":e[8]||(e[8]=s=>M(C)?C.value=s:null)},{content:a(()=>[x("div",ee,[e[16]||(e[16]=x("p",{class:"text-xs font-medium text-muted px-2 pt-1 pb-1"},"Open in IDE",-1)),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-wand-sparkles",onClick:e[1]||(e[1]=s=>p(()=>t(u)({...t(r),method:"auto"})))},{default:a(()=>[...e[9]||(e[9]=[l(" Auto (try all) ",-1)])]),_:1}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-code",onClick:e[2]||(e[2]=s=>p(()=>t(j)(t(r))))},{default:a(()=>[...e[10]||(e[10]=[l(" Open in VS Code ",-1)])]),_:1}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-square-code",onClick:e[3]||(e[3]=s=>p(()=>t(k)(t(r))))},{default:a(()=>[...e[11]||(e[11]=[l(" JetBrains (URL) ",-1)])]),_:1}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-server",onClick:e[4]||(e[4]=s=>p(()=>t(m)(t(r))))},{default:a(()=>[...e[12]||(e[12]=[l(" JetBrains (local server) ",-1)])]),_:1}),n(V,{class:"my-1"}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard",onClick:e[5]||(e[5]=s=>p(()=>t(g)(t(f),{toast:"Path copied"})))},{default:a(()=>[...e[13]||(e[13]=[l(" Copy path ",-1)])]),_:1}),t(O)?(v(),U(d,{key:0,block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard-check",onClick:e[6]||(e[6]=s=>p(()=>t(g)(t(O),{toast:"Absolute path copied"})))},{default:a(()=>[...e[14]||(e[14]=[l(" Copy absolute path ",-1)])]),_:1})):F("",!0),n(V,{class:"my-1"}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-settings",onClick:e[7]||(e[7]=s=>p(()=>t(b)({projectKey:t(r).projectKey?String(t(r).projectKey):null,projectName:t(r).projectName})))},{default:a(()=>[...e[15]||(e[15]=[l(" Configure… ",-1)])]),_:1})])]),default:a(()=>[x("button",Z,[n(z,{name:"i-lucide-chevron-down",class:"size-3.5"})])]),_:1},8,["open"])):(v(),h("button",{key:0,type:"button",class:"shrink-0 inline-flex items-center rounded p-0.5 text-muted cursor-pointer transition-opacity hover:bg-elevated/60 hover:text-default opacity-100 sm:opacity-0 sm:group-hover/ide:opacity-100 focus-visible:opacity-100","aria-label":"Choose how to open in IDE",title:"Choose how to open",onClick:D},[n(z,{name:"i-lucide-chevron-down",class:"size-3.5"})]))],64)):(v(),h("span",{key:1,class:B([i.mono?"font-mono":"","truncate"])},[K($.$slots,"default",{},()=>[l(L(t(I)),1)])],2))])}}}),ae=Object.assign(te,{__name:"OpenInIdeLink"});export{ae as _};
1
+ import{d as S,o as v,c as h,k as t,F as J,i as x,q as B,V as K,m as l,t as L,j as n,p as A,f as U,g as a,_ as q,v as F,l as M,h as y,r as _,L as R,K as T}from"./CNu3kken.js";import{_ as H}from"./BjOFxi54.js";import{a as G}from"./D7t0Dn3h.js";import{a as Q}from"./DprkT7rM.js";function W(i){let o=i,u=null,j=null;const k=i.lastIndexOf(":");if(k>0){const m=i.slice(k+1);if(/^\d+$/.test(m)){const c=i.slice(0,k),b=c.lastIndexOf(":");if(b>0){const g=c.slice(b+1);/^\d+$/.test(g)?(j=parseInt(m,10),u=parseInt(g,10),o=c.slice(0,b)):(u=parseInt(m,10),o=c)}else u=parseInt(m,10),o=c}}return{filePath:o,line:u,column:j}}const X={class:"group/ide inline-flex items-center gap-1 min-w-0 max-w-full align-middle"},Y=["title","aria-label"],Z={type:"button",class:"shrink-0 inline-flex items-center rounded p-0.5 text-muted cursor-pointer transition-colors hover:bg-elevated/60 hover:text-default","aria-label":"Choose how to open in IDE",title:"Choose how to open"},ee={class:"w-56 p-1 space-y-0.5"},te=S({__name:"OpenInIdeLink",props:{filePath:{},line:{default:null},column:{default:null},location:{},projectKey:{},projectName:{},mono:{type:Boolean,default:!0}},setup(i){const o=i,{openInIde:u,openInVscode:j,openViaJetbrainsUrl:k,openViaJetbrainsHttp:m,resolveAbsPath:c,openSettings:b}=G(),{copy:g}=Q(),P=y(()=>o.filePath?{filePath:o.filePath,line:o.line??null,column:o.column??null}:o.location?W(o.location):{filePath:"",line:null,column:null}),f=y(()=>P.value.filePath),w=y(()=>P.value.line),I=y(()=>w.value?`${f.value}:${w.value}`:f.value),O=y(()=>c(f.value,o.projectKey)),r=y(()=>({filePath:f.value,line:w.value,column:P.value.column,projectKey:o.projectKey??null,projectName:o.projectName??null})),C=_(!1),N=_(!1);function D(){N.value=!0,R(()=>{C.value=!0})}function p($){C.value=!1,$()}return($,e)=>{const z=A,d=q,V=H,E=T;return v(),h("span",X,[t(f)?(v(),h(J,{key:0},[x("button",{type:"button",class:"inline-flex items-center gap-1 min-w-0 max-w-full cursor-pointer text-left",title:`Open ${t(I)} in IDE`,"aria-label":`Open ${t(I)} in IDE`,onClick:e[0]||(e[0]=s=>t(u)(t(r)))},[x("span",{class:B([i.mono?"font-mono":"","truncate underline decoration-dashed decoration-1 underline-offset-2 decoration-gray-400/70 dark:decoration-gray-500/70 transition-colors group-hover/ide:decoration-current"])},[K($.$slots,"default",{},()=>[l(L(t(I)),1)])],2),n(z,{name:"i-lucide-external-link",class:"size-3 shrink-0 opacity-0 transition-opacity group-hover/ide:opacity-100"})],8,Y),t(N)?(v(),U(E,{key:1,open:t(C),"onUpdate:open":e[8]||(e[8]=s=>M(C)?C.value=s:null)},{content:a(()=>[x("div",ee,[e[16]||(e[16]=x("p",{class:"text-xs font-medium text-muted px-2 pt-1 pb-1"},"Open in IDE",-1)),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-wand-sparkles",onClick:e[1]||(e[1]=s=>p(()=>t(u)({...t(r),method:"auto"})))},{default:a(()=>[...e[9]||(e[9]=[l(" Auto (try all) ",-1)])]),_:1}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-code",onClick:e[2]||(e[2]=s=>p(()=>t(j)(t(r))))},{default:a(()=>[...e[10]||(e[10]=[l(" Open in VS Code ",-1)])]),_:1}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-square-code",onClick:e[3]||(e[3]=s=>p(()=>t(k)(t(r))))},{default:a(()=>[...e[11]||(e[11]=[l(" JetBrains (URL) ",-1)])]),_:1}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-server",onClick:e[4]||(e[4]=s=>p(()=>t(m)(t(r))))},{default:a(()=>[...e[12]||(e[12]=[l(" JetBrains (local server) ",-1)])]),_:1}),n(V,{class:"my-1"}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard",onClick:e[5]||(e[5]=s=>p(()=>t(g)(t(f),{toast:"Path copied"})))},{default:a(()=>[...e[13]||(e[13]=[l(" Copy path ",-1)])]),_:1}),t(O)?(v(),U(d,{key:0,block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-clipboard-check",onClick:e[6]||(e[6]=s=>p(()=>t(g)(t(O),{toast:"Absolute path copied"})))},{default:a(()=>[...e[14]||(e[14]=[l(" Copy absolute path ",-1)])]),_:1})):F("",!0),n(V,{class:"my-1"}),n(d,{block:"",size:"sm",color:"neutral",variant:"ghost",class:"justify-start",icon:"i-lucide-settings",onClick:e[7]||(e[7]=s=>p(()=>t(b)({projectKey:t(r).projectKey?String(t(r).projectKey):null,projectName:t(r).projectName})))},{default:a(()=>[...e[15]||(e[15]=[l(" Configure… ",-1)])]),_:1})])]),default:a(()=>[x("button",Z,[n(z,{name:"i-lucide-chevron-down",class:"size-3.5"})])]),_:1},8,["open"])):(v(),h("button",{key:0,type:"button",class:"shrink-0 inline-flex items-center rounded p-0.5 text-muted cursor-pointer transition-opacity hover:bg-elevated/60 hover:text-default opacity-100 sm:opacity-0 sm:group-hover/ide:opacity-100 focus-visible:opacity-100","aria-label":"Choose how to open in IDE",title:"Choose how to open",onClick:D},[n(z,{name:"i-lucide-chevron-down",class:"size-3.5"})]))],64)):(v(),h("span",{key:1,class:B([i.mono?"font-mono":"","truncate"])},[K($.$slots,"default",{},()=>[l(L(t(I)),1)])],2))])}}}),ae=Object.assign(te,{__name:"OpenInIdeLink"});export{ae as _};