@piwitests/server 0.20.0 → 0.22.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 (791) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/2VtBYkNh.js +1 -0
  3. package/.output/public/_nuxt/{BmUfSNMV.js → 3xlGO1qT.js} +1 -1
  4. package/.output/public/_nuxt/{DeY2JkR2.js → 4yvOL9PC.js} +1 -1
  5. package/.output/public/_nuxt/6-ivqM_I.js +17 -0
  6. package/.output/public/_nuxt/{BrQEE053.js → 9N6hSApy.js} +1 -1
  7. package/.output/public/_nuxt/{hC_z4G8p.js → 9P8iHISX.js} +1 -1
  8. package/.output/public/_nuxt/B-6GGrhr.js +1 -0
  9. package/.output/public/_nuxt/B09ddw9C.js +1 -0
  10. package/.output/public/_nuxt/{Dpd16JVI.js → B0hK-xDF.js} +1 -1
  11. package/.output/public/_nuxt/{BdfhYr-u.js → B2a-Phk3.js} +1 -1
  12. package/.output/public/_nuxt/{B99fbi73.js → B6s20NbT.js} +1 -1
  13. package/.output/public/_nuxt/B9FSuKdA.js +1 -0
  14. package/.output/public/_nuxt/B9kt7ySS.js +5 -0
  15. package/.output/public/_nuxt/BDQCwxpX.js +1 -0
  16. package/.output/public/_nuxt/{oAClCn_h.js → BFcdtAzg.js} +1 -1
  17. package/.output/public/_nuxt/{CeG9pBAD.js → BH-ym1CI.js} +1 -1
  18. package/.output/public/_nuxt/{AbmKWFQQ.js → BKJetfRH.js} +1 -1
  19. package/.output/public/_nuxt/BNAHBHbY.js +1 -0
  20. package/.output/public/_nuxt/BQOWm9mQ.js +1 -0
  21. package/.output/public/_nuxt/{DJxlKFGb.js → BQzG26t0.js} +1 -1
  22. package/.output/public/_nuxt/{DabzhQB1.js → BTvE9qca.js} +1 -1
  23. package/.output/public/_nuxt/{C2hkrSey.js → BUMoU50-.js} +1 -1
  24. package/.output/public/_nuxt/{C1gTN4Q8.js → BVN50jIb.js} +1 -1
  25. package/.output/public/_nuxt/BYB8NVJZ.js +1 -0
  26. package/.output/public/_nuxt/{BicAJ6U8.js → BZnfiR67.js} +1 -1
  27. package/.output/public/_nuxt/{5A6ITZXj.js → B_mN5eMV.js} +1 -1
  28. package/.output/public/_nuxt/BaDhDBCV.js +1 -0
  29. package/.output/public/_nuxt/Bb7Uckln.js +5 -0
  30. package/.output/public/_nuxt/Be4c943G.js +2 -0
  31. package/.output/public/_nuxt/{CsLojMwR.js → BfS8BZTO.js} +1 -1
  32. package/.output/public/_nuxt/{KyA_4Ks-.js → BhH0TNTi.js} +1 -1
  33. package/.output/public/_nuxt/BjU3HZuS.js +1 -0
  34. package/.output/public/_nuxt/{DrfE8IY0.js → BlRWlfdD.js} +1 -1
  35. package/.output/public/_nuxt/BmJUhCIO.js +6 -0
  36. package/.output/public/_nuxt/BpUXqOVj.js +2 -0
  37. package/.output/public/_nuxt/BqCiYSVY.js +1 -0
  38. package/.output/public/_nuxt/Bt4FLbe0.js +1 -0
  39. package/.output/public/_nuxt/{Bm62iDV5.js → BtSJxOdh.js} +1 -1
  40. package/.output/public/_nuxt/{Und3xXFc.js → BtaTvcz6.js} +2 -2
  41. package/.output/public/_nuxt/{hNh4CIL0.js → By5qkOq8.js} +1 -1
  42. package/.output/public/_nuxt/{Bnxf8nbZ.js → C0v6l4pr.js} +1 -1
  43. package/.output/public/_nuxt/{CXEH9OPk.js → C9p0YCAi.js} +1 -1
  44. package/.output/public/_nuxt/{Dyeqn3aG.js → CAZpjzvB.js} +1 -1
  45. package/.output/public/_nuxt/{CjPfj7ya.js → CBZD8ym8.js} +1 -1
  46. package/.output/public/_nuxt/CCP6Tyle.js +1 -0
  47. package/.output/public/_nuxt/{DuwtTfO8.js → CD3R-ggS.js} +2 -2
  48. package/.output/public/_nuxt/{CxyAzHr3.js → CDh_Qt7h.js} +1 -1
  49. package/.output/public/_nuxt/CI_q0F1O.js +9 -0
  50. package/.output/public/_nuxt/CJEp4i0N.js +1 -0
  51. package/.output/public/_nuxt/{l5WKbU4h.js → CMhK1PvI.js} +3 -3
  52. package/.output/public/_nuxt/{H94BMf3L.js → CNcu4khZ.js} +1 -1
  53. package/.output/public/_nuxt/COP3KBCA.js +9 -0
  54. package/.output/public/_nuxt/{BT3wGCTI.js → CRPt9SfB.js} +1 -1
  55. package/.output/public/_nuxt/{DsesNydr.js → CScusXhF.js} +1 -1
  56. package/.output/public/_nuxt/{-f7BAm1H.js → CWoSSKhQ.js} +1 -1
  57. package/.output/public/_nuxt/{CAvY22RE.js → CWw9WGlv.js} +1 -1
  58. package/.output/public/_nuxt/{DdwHkKfV.js → CZ9ThISn.js} +1 -1
  59. package/.output/public/_nuxt/Cd8r0xk5.js +1 -0
  60. package/.output/public/_nuxt/Cf52zHyB.js +1 -0
  61. package/.output/public/_nuxt/{GPNI1ffD.js → CkKCKAYp.js} +2 -2
  62. package/.output/public/_nuxt/CkyMZI-0.js +1 -0
  63. package/.output/public/_nuxt/CoPntblj.js +1 -0
  64. package/.output/public/_nuxt/CobveFaj.js +1 -0
  65. package/.output/public/_nuxt/Cot8fIp5.js +2 -0
  66. package/.output/public/_nuxt/{D5tke0B5.js → CrOA9onF.js} +1 -1
  67. package/.output/public/_nuxt/{FaFoMVKo.js → Cwwe5bRS.js} +1 -1
  68. package/.output/public/_nuxt/D0ROfwV0.js +1 -0
  69. package/.output/public/_nuxt/{L3kAWB2a.js → D4UlSVir.js} +1 -1
  70. package/.output/public/_nuxt/D4oheDIm.js +4 -0
  71. package/.output/public/_nuxt/{CAAwCT7H.js → D6Mo5HeX.js} +1 -1
  72. package/.output/public/_nuxt/{Cnsmicv2.js → DBhdObsO.js} +34 -34
  73. package/.output/public/_nuxt/{A1pj0VnG.js → DDN2tt0a.js} +1 -1
  74. package/.output/public/_nuxt/DGnQ69wW.js +64 -0
  75. package/.output/public/_nuxt/{Cus22Ud3.js → DGyGmFem.js} +2 -2
  76. package/.output/public/_nuxt/{CzAPFPpL.js → DHUT-BKj.js} +1 -1
  77. package/.output/public/_nuxt/DK7xciFW.js +7 -0
  78. package/.output/public/_nuxt/{C0_yH0N7.js → DLNNAYfu.js} +1 -1
  79. package/.output/public/_nuxt/DLn-VPtK.js +34 -0
  80. package/.output/public/_nuxt/{CA9B2HE5.js → DOBSrxzY.js} +1 -1
  81. package/.output/public/_nuxt/{Dy-TJ0Mt.js → DOLeth7M.js} +1 -1
  82. package/.output/public/_nuxt/{CNyV9YpI.js → DQnsFoJn.js} +1 -1
  83. package/.output/public/_nuxt/DS2ANCQh.js +1 -0
  84. package/.output/public/_nuxt/{bLcjFslv.js → DSvBQHzW.js} +1 -1
  85. package/.output/public/_nuxt/{BzRRzmwm.js → DWEkQ7bl.js} +1 -1
  86. package/.output/public/_nuxt/DWwiVTZX.js +24 -0
  87. package/.output/public/_nuxt/DXXnDejN.js +1 -0
  88. package/.output/public/_nuxt/{B3obW6cw.js → Dj-TetcW.js} +2 -2
  89. package/.output/public/_nuxt/DpalT0nH.js +1 -0
  90. package/.output/public/_nuxt/{Bow4tTR0.js → DsX5CCb5.js} +1 -1
  91. package/.output/public/_nuxt/DslnXfcH.js +1 -0
  92. package/.output/public/_nuxt/DtSn2Q9-.js +1 -0
  93. package/.output/public/_nuxt/DwyFnMoY.js +44 -0
  94. package/.output/public/_nuxt/{CJFtzlQ4.js → DzM9oeLa.js} +1 -1
  95. package/.output/public/_nuxt/{BKkF4pPD.js → Gik813Ek.js} +1 -1
  96. package/.output/public/_nuxt/{pQqGiNch.js → Hot1UcKY.js} +1 -1
  97. package/.output/public/_nuxt/{DPCxhHri.js → HwFFbACq.js} +1 -1
  98. package/.output/public/_nuxt/{DJmoLeVt.js → PdEEuEsg.js} +1 -1
  99. package/.output/public/_nuxt/SBmMTKQb.js +1 -0
  100. package/.output/public/_nuxt/{C8e1EbJI.js → Sgis3xif.js} +1 -1
  101. package/.output/public/_nuxt/{CTU1mrhq.js → _VzR8bwc.js} +1 -1
  102. package/.output/public/_nuxt/{CeW8v31b.js → b_yFgp5S.js} +1 -1
  103. package/.output/public/_nuxt/builds/latest.json +1 -1
  104. package/.output/public/_nuxt/builds/meta/5f1ebc7c-d690-4f02-847f-a3249653f75f.json +1 -0
  105. package/.output/public/_nuxt/{b-GYfcrQ.js → cSeAgciy.js} +1 -1
  106. package/.output/public/_nuxt/{CwGWJbiy.js → czXrP7NB.js} +1 -1
  107. package/.output/public/_nuxt/entry.BAvBQY-h.css +1 -0
  108. package/.output/public/_nuxt/{Du2W7Jne.js → h49q_GXF.js} +42 -42
  109. package/.output/public/_nuxt/hzsG6cAc.js +1 -0
  110. package/.output/public/_nuxt/iubpj2qv.js +1 -0
  111. package/.output/public/_nuxt/jjOqY9Tv.js +1 -0
  112. package/.output/public/_nuxt/kfFeu9tK.js +1 -0
  113. package/.output/public/_nuxt/nANaAHCd.js +5 -0
  114. package/.output/public/_nuxt/{CIrFl3MW.js → t-juTK3X.js} +1 -1
  115. package/.output/public/_nuxt/{4gYNA-d4.js → x8YSyy4c.js} +1 -1
  116. package/.output/public/_nuxt/{DfgOx_ou.js → x8w_1_rn.js} +1 -1
  117. package/.output/public/_nuxt/xbO0VmDX.js +1 -0
  118. package/.output/server/chunks/_/collect.mjs +1 -1
  119. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  120. package/.output/server/chunks/_/markers.mjs +1 -1
  121. package/.output/server/chunks/_/quarantine.mjs +1 -1
  122. package/.output/server/chunks/_/scope.mjs +43 -27
  123. package/.output/server/chunks/_/scope.mjs.map +1 -1
  124. package/.output/server/chunks/_/users.mjs +1 -1
  125. package/.output/server/chunks/build/{Alert-C4xq8lao.mjs → Alert-DAb8nKVs.mjs} +2 -2
  126. package/.output/server/chunks/build/Alert-DAb8nKVs.mjs.map +1 -0
  127. package/.output/server/chunks/build/{Breadcrumb-Ak2Lg3oM.mjs → Breadcrumb-DJp5WvUM.mjs} +5 -5
  128. package/.output/server/chunks/build/Breadcrumb-DJp5WvUM.mjs.map +1 -0
  129. package/.output/server/chunks/build/{BreadcrumbNav-DO7I_z-n.mjs → BreadcrumbNav-BrQwfL8G.mjs} +2 -2
  130. package/.output/server/chunks/build/BreadcrumbNav-BrQwfL8G.mjs.map +1 -0
  131. package/.output/server/chunks/build/{BrowserBadge-MFvBwxmD.mjs → BrowserBadge-Djw_e_I9.mjs} +3 -3
  132. package/.output/server/chunks/build/BrowserBadge-Djw_e_I9.mjs.map +1 -0
  133. package/.output/server/chunks/build/{Card-BQP_oZkQ.mjs → Card--Ike7sYc.mjs} +2 -2
  134. package/.output/server/chunks/build/Card--Ike7sYc.mjs.map +1 -0
  135. package/.output/server/chunks/build/{ChartCard-Y1UKwMsf.mjs → ChartCard-B2gd_8HP.mjs} +2 -2
  136. package/.output/server/chunks/build/ChartCard-B2gd_8HP.mjs.map +1 -0
  137. package/.output/server/chunks/build/{ChartMarkerTooltip-0DcMfD_6.mjs → ChartMarkerTooltip-u_1DUHh-.mjs} +2 -2
  138. package/.output/server/chunks/build/ChartMarkerTooltip-u_1DUHh-.mjs.map +1 -0
  139. package/.output/server/chunks/build/{Checkbox-4Q5d0fa0.mjs → Checkbox-C1khEdTh.mjs} +4 -4
  140. package/.output/server/chunks/build/Checkbox-C1khEdTh.mjs.map +1 -0
  141. package/.output/server/chunks/build/{CodeBlock-BgE-NSmE.mjs → CodeBlock-CjnDrO3Y.mjs} +4 -4
  142. package/.output/server/chunks/build/CodeBlock-CjnDrO3Y.mjs.map +1 -0
  143. package/.output/server/chunks/build/{DashboardNavbar-BHmMSPX7.mjs → DashboardNavbar-DYtmVlhy.mjs} +5 -5
  144. package/.output/server/chunks/build/DashboardNavbar-DYtmVlhy.mjs.map +1 -0
  145. package/.output/server/chunks/build/{DashboardSidebarToggle-DCTnHiIv.mjs → DashboardSidebarToggle-BPNxODwj.mjs} +5 -5
  146. package/.output/server/chunks/build/DashboardSidebarToggle-BPNxODwj.mjs.map +1 -0
  147. package/.output/server/chunks/build/{DataLocationCard-B_YHdzSz.mjs → DataLocationCard-2B-sVSMr.mjs} +5 -5
  148. package/.output/server/chunks/build/DataLocationCard-2B-sVSMr.mjs.map +1 -0
  149. package/.output/server/chunks/build/{DiagnosisPanel-CALyEmcJ.mjs → DiagnosisPanel-D6QO30FQ.mjs} +9 -8
  150. package/.output/server/chunks/build/DiagnosisPanel-D6QO30FQ.mjs.map +1 -0
  151. package/.output/server/chunks/build/{useAiStatus-CxjMmDDY.mjs → DiagnosisResult-ujB5Lt2A.mjs} +12 -34
  152. package/.output/server/chunks/build/DiagnosisResult-ujB5Lt2A.mjs.map +1 -0
  153. package/.output/server/chunks/build/{DurationValue-D20oGbnc.mjs → DurationValue-UX9uajQJ.mjs} +2 -2
  154. package/.output/server/chunks/build/DurationValue-UX9uajQJ.mjs.map +1 -0
  155. package/.output/server/chunks/build/{EntityLinks-BBHWssHH.mjs → EntityLinks-F8_kC-IH.mjs} +6 -6
  156. package/.output/server/chunks/build/EntityLinks-F8_kC-IH.mjs.map +1 -0
  157. package/.output/server/chunks/build/{EnvManagedBadge-UwD2b9v2.mjs → EnvManagedBadge-D6e-10M9.mjs} +3 -3
  158. package/.output/server/chunks/build/EnvManagedBadge-D6e-10M9.mjs.map +1 -0
  159. package/.output/server/chunks/build/FeatureUnavailable-BMw4euTk.mjs +83 -0
  160. package/.output/server/chunks/build/FeatureUnavailable-BMw4euTk.mjs.map +1 -0
  161. package/.output/server/chunks/build/{FormField-B0HKsdMd.mjs → FormField-QptK0rPg.mjs} +3 -3
  162. package/.output/server/chunks/build/FormField-QptK0rPg.mjs.map +1 -0
  163. package/.output/server/chunks/build/GetStartedWizard-DxT8T14Y.mjs +510 -0
  164. package/.output/server/chunks/build/GetStartedWizard-DxT8T14Y.mjs.map +1 -0
  165. package/.output/server/chunks/build/{HelpHint-DrcIv-Oj.mjs → HelpHint-C5Ru8BCc.mjs} +3 -3
  166. package/.output/server/chunks/build/HelpHint-C5Ru8BCc.mjs.map +1 -0
  167. package/.output/server/chunks/build/{LoadingState-C3pBSuOO.mjs → LoadingState-CwpfmI0W.mjs} +3 -3
  168. package/.output/server/chunks/build/LoadingState-CwpfmI0W.mjs.map +1 -0
  169. package/.output/server/chunks/build/{MarkerBadge-D7meXy4u.mjs → MarkerBadge-Biz5--h2.mjs} +1 -1
  170. package/.output/server/chunks/build/MarkerBadge-Biz5--h2.mjs.map +1 -0
  171. package/.output/server/chunks/build/{CiEnvCard-DB5DvBh1.mjs → MetaStripGroup-BBByVvpR.mjs} +242 -529
  172. package/.output/server/chunks/build/MetaStripGroup-BBByVvpR.mjs.map +1 -0
  173. package/.output/server/chunks/build/{MiniRunBars-CZMugDrh.mjs → MiniRunBars-fgLMgRUp.mjs} +2 -2
  174. package/.output/server/chunks/build/MiniRunBars-fgLMgRUp.mjs.map +1 -0
  175. package/.output/server/chunks/build/{Modal-pSDlXzT3.mjs → Modal-BacZmQCX.mjs} +3 -3
  176. package/.output/server/chunks/build/Modal-BacZmQCX.mjs.map +1 -0
  177. package/.output/server/chunks/build/{useSettingsNav-DnQKacz8.mjs → NavigationMenu-sTiKSWDm.mjs} +7 -30
  178. package/.output/server/chunks/build/NavigationMenu-sTiKSWDm.mjs.map +1 -0
  179. package/.output/server/chunks/build/{OpenInIdeLink-CQWKKChd.mjs → OpenInIdeLink-Crc8y0Yx.mjs} +6 -6
  180. package/.output/server/chunks/build/{OpenInIdeLink-CQWKKChd.mjs.map → OpenInIdeLink-Crc8y0Yx.mjs.map} +1 -1
  181. package/.output/server/chunks/build/{ProjectTestCasesTable-Bo61P5K1.mjs → ProjectTestCasesTable-DwjqZ2i5.mjs} +17 -17
  182. package/.output/server/chunks/build/{ProjectTestCasesTable-Bo61P5K1.mjs.map → ProjectTestCasesTable-DwjqZ2i5.mjs.map} +1 -1
  183. package/.output/server/chunks/build/{RunReports-DFLv51TX.mjs → RunReports-nuLb-Nm3.mjs} +3 -3
  184. package/.output/server/chunks/build/RunReports-nuLb-Nm3.mjs.map +1 -0
  185. package/.output/server/chunks/build/{RunStatusBadge-FfGb6bkW.mjs → RunStatusBadge-CvWmcFYM.mjs} +2 -2
  186. package/.output/server/chunks/build/RunStatusBadge-CvWmcFYM.mjs.map +1 -0
  187. package/.output/server/chunks/build/{SectionCard-CN-v0FZ_.mjs → SectionCard-C753B3Yo.mjs} +3 -3
  188. package/.output/server/chunks/build/SectionCard-C753B3Yo.mjs.map +1 -0
  189. package/.output/server/chunks/build/{Select-5DK9frQ7.mjs → Select-BAyYwPuo.mjs} +4 -4
  190. package/.output/server/chunks/build/Select-BAyYwPuo.mjs.map +1 -0
  191. package/.output/server/chunks/build/{SelectMenu-D-2FSqBU.mjs → SelectMenu-zE_AhMX8.mjs} +4 -4
  192. package/.output/server/chunks/build/{SelectMenu-D-2FSqBU.mjs.map → SelectMenu-zE_AhMX8.mjs.map} +1 -1
  193. package/.output/server/chunks/build/{Separator-CR4WcEKD.mjs → Separator-BbgCfKKJ.mjs} +3 -3
  194. package/.output/server/chunks/build/Separator-BbgCfKKJ.mjs.map +1 -0
  195. package/.output/server/chunks/build/{SettingsField-BZfx4ma1.mjs → SettingsField-D-VriK9X.mjs} +5 -5
  196. package/.output/server/chunks/build/SettingsField-D-VriK9X.mjs.map +1 -0
  197. package/.output/server/chunks/build/{Skeleton-CEHuuKVh.mjs → Skeleton-DAp_WMEe.mjs} +2 -2
  198. package/.output/server/chunks/build/Skeleton-DAp_WMEe.mjs.map +1 -0
  199. package/.output/server/chunks/build/{Slideover-D270EZZD.mjs → Slideover-CNbGvbUF.mjs} +3 -3
  200. package/.output/server/chunks/build/Slideover-CNbGvbUF.mjs.map +1 -0
  201. package/.output/server/chunks/build/{StatTile-D61Vzo6e.mjs → StatTile-DpcVQFVI.mjs} +2 -26
  202. package/.output/server/chunks/build/StatTile-DpcVQFVI.mjs.map +1 -0
  203. package/.output/server/chunks/build/StatTileGrid-7zOFUQ6j.mjs +30 -0
  204. package/.output/server/chunks/build/StatTileGrid-7zOFUQ6j.mjs.map +1 -0
  205. package/.output/server/chunks/build/{Switch-B5Fp8ULt.mjs → Switch-DdkA3Fii.mjs} +3 -3
  206. package/.output/server/chunks/build/Switch-DdkA3Fii.mjs.map +1 -0
  207. package/.output/server/chunks/build/{Table-BRk04Hd2.mjs → Table-CfDVAuUJ.mjs} +4 -4
  208. package/.output/server/chunks/build/Table-CfDVAuUJ.mjs.map +1 -0
  209. package/.output/server/chunks/build/{Tabs-BkSOnbaB.mjs → Tabs-BCOhHEB9.mjs} +2 -2
  210. package/.output/server/chunks/build/Tabs-BCOhHEB9.mjs.map +1 -0
  211. package/.output/server/chunks/build/{TestCaseHistoryChart-CSi64vVA.mjs → TestCaseHistoryChart-CKDXQ2GI.mjs} +4 -4
  212. package/.output/server/chunks/build/TestCaseHistoryChart-CKDXQ2GI.mjs.map +1 -0
  213. package/.output/server/chunks/build/{TestMetaBadges-D5_yUtIP.mjs → TestMetaBadges-BlyKmfeP.mjs} +1 -1
  214. package/.output/server/chunks/build/TestMetaBadges-BlyKmfeP.mjs.map +1 -0
  215. package/.output/server/chunks/build/{TestStatusBar-DX3EhlyP.mjs → TestStatusBar-wquHQqtp.mjs} +4 -4
  216. package/.output/server/chunks/build/TestStatusBar-wquHQqtp.mjs.map +1 -0
  217. package/.output/server/chunks/build/{Textarea-Dv2-lOvW.mjs → Textarea-Ohs6QTXf.mjs} +3 -3
  218. package/.output/server/chunks/build/Textarea-Ohs6QTXf.mjs.map +1 -0
  219. package/.output/server/chunks/build/{Tooltip-Dv4htNP6.mjs → Tooltip-BRBnl4pE.mjs} +3 -3
  220. package/.output/server/chunks/build/Tooltip-BRBnl4pE.mjs.map +1 -0
  221. package/.output/server/chunks/build/{_id_-BxA6IgWr.mjs → _id_-BesWjK_d.mjs} +900 -394
  222. package/.output/server/chunks/build/_id_-BesWjK_d.mjs.map +1 -0
  223. package/.output/server/chunks/build/{_id_-C_uSBiyU.mjs → _id_-CGs0u8Fr.mjs} +38 -36
  224. package/.output/server/chunks/build/_id_-CGs0u8Fr.mjs.map +1 -0
  225. package/.output/server/chunks/build/{_id_-BdG37K7s.mjs → _id_-CQ0lolEK.mjs} +31 -28
  226. package/.output/server/chunks/build/_id_-CQ0lolEK.mjs.map +1 -0
  227. package/.output/server/chunks/build/{_id_-BdJs7BJZ.mjs → _id_-D1-06Fcl.mjs} +1913 -1121
  228. package/.output/server/chunks/build/_id_-D1-06Fcl.mjs.map +1 -0
  229. package/.output/server/chunks/build/{about-BE0UV-8-.mjs → about-DdyOj-dj.mjs} +25 -455
  230. package/.output/server/chunks/build/about-DdyOj-dj.mjs.map +1 -0
  231. package/.output/server/chunks/build/{account-DAfvaD-F.mjs → account-7aVMKekZ.mjs} +11 -9
  232. package/.output/server/chunks/build/account-7aVMKekZ.mjs.map +1 -0
  233. package/.output/server/chunks/build/{ai-Cn05ch0u.mjs → ai-zw3T9b5u.mjs} +24 -22
  234. package/.output/server/chunks/build/{ai-Cn05ch0u.mjs.map → ai-zw3T9b5u.mjs.map} +1 -1
  235. package/.output/server/chunks/build/{analytics-Bo_B_jko.mjs → analytics-CeCzKwEX.mjs} +105 -76
  236. package/.output/server/chunks/build/analytics-CeCzKwEX.mjs.map +1 -0
  237. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  238. package/.output/server/chunks/build/{compare-RxHSOdsO.mjs → compare-B2OB3zdd.mjs} +4 -1
  239. package/.output/server/chunks/build/compare-B2OB3zdd.mjs.map +1 -0
  240. package/.output/server/chunks/build/{db.client-CQoVTYB9.mjs → db.client-Bdqk_eYQ.mjs} +40 -2
  241. package/.output/server/chunks/build/db.client-Bdqk_eYQ.mjs.map +1 -0
  242. package/.output/server/chunks/build/{default-CbNHaFsy.mjs → default-CkyAx_Mu.mjs} +48 -33
  243. package/.output/server/chunks/build/{default-CbNHaFsy.mjs.map → default-CkyAx_Mu.mjs.map} +1 -1
  244. package/.output/server/chunks/build/{docs-B_llWMxx.mjs → docs-Dhj-wEks.mjs} +18 -16
  245. package/.output/server/chunks/build/{docs-B_llWMxx.mjs.map → docs-Dhj-wEks.mjs.map} +1 -1
  246. package/.output/server/chunks/build/{edit-J0asTFg8.mjs → edit-CVz_gdoe.mjs} +17 -16
  247. package/.output/server/chunks/build/edit-CVz_gdoe.mjs.map +1 -0
  248. package/.output/server/chunks/build/{fetch-B4FwBOzu.mjs → fetch-Be-j7hF1.mjs} +32 -4
  249. package/.output/server/chunks/build/fetch-Be-j7hF1.mjs.map +1 -0
  250. package/.output/server/chunks/build/{forgot-password-CC__1OnV.mjs → forgot-password-CwdjL7BO.mjs} +8 -5
  251. package/.output/server/chunks/build/forgot-password-CwdjL7BO.mjs.map +1 -0
  252. package/.output/server/chunks/build/{import-CS9oylTN.mjs → import-DyQEw4V3.mjs} +17 -15
  253. package/.output/server/chunks/build/import-DyQEw4V3.mjs.map +1 -0
  254. package/.output/server/chunks/build/{index-CU2nZhAa.mjs → index-ByWTzqF6.mjs} +2 -1
  255. package/.output/server/chunks/build/index-ByWTzqF6.mjs.map +1 -0
  256. package/.output/server/chunks/build/{index-DE45ycdZ.mjs → index-D7Bmj6bq.mjs} +19 -18
  257. package/.output/server/chunks/build/index-D7Bmj6bq.mjs.map +1 -0
  258. package/.output/server/chunks/build/{index-e9skCi-V.mjs → index-DcnICCZU.mjs} +43 -539
  259. package/.output/server/chunks/build/index-DcnICCZU.mjs.map +1 -0
  260. package/.output/server/chunks/build/{index-hGHlmyxj.mjs → index-DghAFpNR.mjs} +132 -89
  261. package/.output/server/chunks/build/{index-hGHlmyxj.mjs.map → index-DghAFpNR.mjs.map} +1 -1
  262. package/.output/server/chunks/build/index-ID913tUa.mjs +93 -0
  263. package/.output/server/chunks/build/index-ID913tUa.mjs.map +1 -0
  264. package/.output/server/chunks/build/isValueEqualOrExist-D2qw9YEr.mjs +1 -1
  265. package/.output/server/chunks/build/{login-Da4u1IlW.mjs → login-rXKF63j6.mjs} +12 -9
  266. package/.output/server/chunks/build/login-rXKF63j6.mjs.map +1 -0
  267. package/.output/server/chunks/build/{mcp-uhVCCwQM.mjs → mcp-ByNvFy4o.mjs} +254 -22
  268. package/.output/server/chunks/build/mcp-ByNvFy4o.mjs.map +1 -0
  269. package/.output/server/chunks/build/{notifications-fx_qnKGA.mjs → notifications-CbLAZnKJ.mjs} +18 -16
  270. package/.output/server/chunks/build/notifications-CbLAZnKJ.mjs.map +1 -0
  271. package/.output/server/chunks/build/performance-C93MEPaZ.mjs +581 -0
  272. package/.output/server/chunks/build/performance-C93MEPaZ.mjs.map +1 -0
  273. package/.output/server/chunks/build/{pr-feedback-X6-70iF0.mjs → pr-feedback-DKCB0bDE.mjs} +12 -10
  274. package/.output/server/chunks/build/pr-feedback-DKCB0bDE.mjs.map +1 -0
  275. package/.output/server/chunks/build/{reset-password-BmrUS4ZD.mjs → reset-password-BBoHKMqD.mjs} +8 -5
  276. package/.output/server/chunks/build/reset-password-BBoHKMqD.mjs.map +1 -0
  277. package/.output/server/chunks/build/server.mjs +86 -72
  278. package/.output/server/chunks/build/server.mjs.map +1 -1
  279. package/.output/server/chunks/build/{settings-CCYe7rsc.mjs → settings-DiG0JjzC.mjs} +18 -26
  280. package/.output/server/chunks/build/settings-DiG0JjzC.mjs.map +1 -0
  281. package/.output/server/chunks/build/{settings-metadata-DrEqWcW-.mjs → settings-metadata-DnAK4Rzg.mjs} +40 -18
  282. package/.output/server/chunks/build/settings-metadata-DnAK4Rzg.mjs.map +1 -0
  283. package/.output/server/chunks/build/setup-0-1O6Hjz.mjs +1065 -0
  284. package/.output/server/chunks/build/setup-0-1O6Hjz.mjs.map +1 -0
  285. package/.output/server/chunks/build/{storage-CJEmviCD.mjs → storage-3JiFJ843.mjs} +18 -16
  286. package/.output/server/chunks/build/storage-3JiFJ843.mjs.map +1 -0
  287. package/.output/server/chunks/build/{tags-DauTe_F-.mjs → tags-CqYcp7js.mjs} +11 -10
  288. package/.output/server/chunks/build/tags-CqYcp7js.mjs.map +1 -0
  289. package/.output/server/chunks/build/{test-cases-thBbAykw.mjs → test-cases-y1HSgPX2.mjs} +26 -24
  290. package/.output/server/chunks/build/test-cases-y1HSgPX2.mjs.map +1 -0
  291. package/.output/server/chunks/build/test-functions-D2ju95Ly.mjs +552 -0
  292. package/.output/server/chunks/build/test-functions-D2ju95Ly.mjs.map +1 -0
  293. package/.output/server/chunks/build/useAiStatus-UR8x-feE.mjs +9 -0
  294. package/.output/server/chunks/build/useAiStatus-UR8x-feE.mjs.map +1 -0
  295. package/.output/server/chunks/build/{useChartMarkers-C89e_VLV.mjs → useChartMarkers-C0wSO0xk.mjs} +1 -1
  296. package/.output/server/chunks/build/useChartMarkers-C0wSO0xk.mjs.map +1 -0
  297. package/.output/server/chunks/build/{useCopyRich-RJKhWoyj.mjs → useCopyRich-CVFeYfkG.mjs} +699 -247
  298. package/.output/server/chunks/build/useCopyRich-CVFeYfkG.mjs.map +1 -0
  299. package/.output/server/chunks/build/{useDesktopDownload-BepjqxOt.mjs → useDesktopDownload-Dyf0fR47.mjs} +2 -2
  300. package/.output/server/chunks/build/useDesktopDownload-Dyf0fR47.mjs.map +1 -0
  301. package/.output/server/chunks/build/{useOpenInIde-BbTnPhFA.mjs → useOpenInIde--6Me0WlL.mjs} +1 -1
  302. package/.output/server/chunks/build/useOpenInIde--6Me0WlL.mjs.map +1 -0
  303. package/.output/server/chunks/build/useSettingsNav-BLTHducV.mjs +19 -0
  304. package/.output/server/chunks/build/useSettingsNav-BLTHducV.mjs.map +1 -0
  305. package/.output/server/chunks/build/{users-CTUqXyGh.mjs → users-IdmY9JZV.mjs} +12 -11
  306. package/.output/server/chunks/build/users-IdmY9JZV.mjs.map +1 -0
  307. package/.output/server/chunks/nitro/nitro.mjs +2336 -1581
  308. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  309. package/.output/server/chunks/routes/__piwi/session.get.mjs +4 -1
  310. package/.output/server/chunks/routes/__piwi/session.get.mjs.map +1 -1
  311. package/.output/server/chunks/routes/api/admin/cleanup.delete.mjs +3 -0
  312. package/.output/server/chunks/routes/api/admin/cleanup.delete.mjs.map +1 -1
  313. package/.output/server/chunks/routes/api/admin/stats.get.mjs +3 -0
  314. package/.output/server/chunks/routes/api/admin/stats.get.mjs.map +1 -1
  315. package/.output/server/chunks/routes/api/ai/status.get.mjs +3 -0
  316. package/.output/server/chunks/routes/api/ai/status.get.mjs.map +1 -1
  317. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs +3 -0
  318. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs.map +1 -1
  319. package/.output/server/chunks/routes/api/auth/change-password.post.mjs +10 -1
  320. package/.output/server/chunks/routes/api/auth/change-password.post.mjs.map +1 -1
  321. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs +3 -1
  322. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs.map +1 -1
  323. package/.output/server/chunks/routes/api/auth/login.post.mjs +16 -2
  324. package/.output/server/chunks/routes/api/auth/login.post.mjs.map +1 -1
  325. package/.output/server/chunks/routes/api/auth/logout.post.mjs +4 -1
  326. package/.output/server/chunks/routes/api/auth/logout.post.mjs.map +1 -1
  327. package/.output/server/chunks/routes/api/auth/me.get.mjs +4 -1
  328. package/.output/server/chunks/routes/api/auth/me.get.mjs.map +1 -1
  329. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs +4 -1
  330. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs.map +1 -1
  331. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs +4 -1
  332. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs.map +1 -1
  333. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs +11 -1
  334. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs.map +1 -1
  335. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs +9 -1
  336. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs.map +1 -1
  337. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs +7 -1
  338. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs.map +1 -1
  339. package/.output/server/chunks/routes/api/auth/setup.get.mjs +4 -1
  340. package/.output/server/chunks/routes/api/auth/setup.get.mjs.map +1 -1
  341. package/.output/server/chunks/routes/api/auth/setup.post.mjs +30 -12
  342. package/.output/server/chunks/routes/api/auth/setup.post.mjs.map +1 -1
  343. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs +4 -1
  344. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs.map +1 -1
  345. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs +6 -3
  346. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs.map +1 -1
  347. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs +4 -1
  348. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs.map +1 -1
  349. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs +4 -1
  350. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs.map +1 -1
  351. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs +4 -1
  352. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs.map +1 -1
  353. package/.output/server/chunks/routes/api/desktop/import-local.post.mjs +4 -1
  354. package/.output/server/chunks/routes/api/desktop/import-local.post.mjs.map +1 -1
  355. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs +3 -0
  356. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs.map +1 -1
  357. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +4 -1
  358. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs.map +1 -1
  359. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +4 -1
  360. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs.map +1 -1
  361. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +4 -1
  362. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs.map +1 -1
  363. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +4 -1
  364. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs.map +1 -1
  365. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +4 -1
  366. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs.map +1 -1
  367. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +4 -1
  368. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs.map +1 -1
  369. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +4 -1
  370. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs.map +1 -1
  371. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +4 -1
  372. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs.map +1 -1
  373. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +4 -1
  374. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs.map +1 -1
  375. package/.output/server/chunks/routes/api/failure-clusters/_id/export.get.mjs +4 -1
  376. package/.output/server/chunks/routes/api/failure-clusters/_id/export.get.mjs.map +1 -1
  377. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +4 -1
  378. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs.map +1 -1
  379. package/.output/server/chunks/routes/api/failure-clusters/_id/fix-plan.get.mjs +4 -1
  380. package/.output/server/chunks/routes/api/failure-clusters/_id/fix-plan.get.mjs.map +1 -1
  381. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +4 -1
  382. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs.map +1 -1
  383. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +4 -1
  384. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs.map +1 -1
  385. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +4 -1
  386. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs.map +1 -1
  387. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +23 -4
  388. package/.output/server/chunks/routes/api/files/_...path_.get.mjs.map +1 -1
  389. package/.output/server/chunks/routes/api/health.get.mjs +4 -1
  390. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  391. package/.output/server/chunks/routes/api/index.get.mjs +12 -5
  392. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  393. package/.output/server/chunks/routes/api/index.get2.mjs +9 -3
  394. package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
  395. package/.output/server/chunks/routes/api/index.get3.mjs +4 -1
  396. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  397. package/.output/server/chunks/routes/api/index.get4.mjs +4 -1
  398. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  399. package/.output/server/chunks/routes/api/index.get5.mjs +4 -1
  400. package/.output/server/chunks/routes/api/index.get5.mjs.map +1 -1
  401. package/.output/server/chunks/routes/api/index.post.mjs +3 -1
  402. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
  403. package/.output/server/chunks/routes/api/index.post2.mjs +6 -2
  404. package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -1
  405. package/.output/server/chunks/routes/api/index.post3.mjs +3 -1
  406. package/.output/server/chunks/routes/api/index.post3.mjs.map +1 -1
  407. package/.output/server/chunks/routes/api/index.post4.mjs +14 -1
  408. package/.output/server/chunks/routes/api/index.post4.mjs.map +1 -1
  409. package/.output/server/chunks/routes/api/index.post5.mjs +3 -1
  410. package/.output/server/chunks/routes/api/index.post5.mjs.map +1 -1
  411. package/.output/server/chunks/routes/api/index.post6.mjs +3 -1
  412. package/.output/server/chunks/routes/api/index.post6.mjs.map +1 -1
  413. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +5 -3
  414. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs.map +1 -1
  415. package/.output/server/chunks/routes/api/links/_id_.delete.mjs +5 -3
  416. package/.output/server/chunks/routes/api/links/_id_.delete.mjs.map +1 -1
  417. package/.output/server/chunks/routes/api/links/_id_.patch.mjs +4 -3
  418. package/.output/server/chunks/routes/api/links/_id_.patch.mjs.map +1 -1
  419. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +4 -1
  420. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs.map +1 -1
  421. package/.output/server/chunks/routes/api/markers/_id_.put.mjs +3 -1
  422. package/.output/server/chunks/routes/api/markers/_id_.put.mjs.map +1 -1
  423. package/.output/server/chunks/routes/api/notifications/stream.get.mjs +33 -16
  424. package/.output/server/chunks/routes/api/notifications/stream.get.mjs.map +1 -1
  425. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +4 -1
  426. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs.map +1 -1
  427. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +4 -1
  428. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs.map +1 -1
  429. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +4 -1
  430. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs.map +1 -1
  431. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +4 -1
  432. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs.map +1 -1
  433. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +4 -1
  434. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs.map +1 -1
  435. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +4 -1
  436. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs.map +1 -1
  437. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +3 -1
  438. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs.map +1 -1
  439. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +4 -1
  440. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs.map +1 -1
  441. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +3 -1
  442. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs.map +1 -1
  443. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +4 -1
  444. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs.map +1 -1
  445. package/.output/server/chunks/routes/api/projects/_id/quarantine/_testCaseId_.delete.mjs +4 -1
  446. package/.output/server/chunks/routes/api/projects/_id/quarantine/_testCaseId_.delete.mjs.map +1 -1
  447. package/.output/server/chunks/routes/api/projects/_id/quarantine.get.mjs +4 -1
  448. package/.output/server/chunks/routes/api/projects/_id/quarantine.get.mjs.map +1 -1
  449. package/.output/server/chunks/routes/api/projects/_id/quarantine.post.mjs +4 -1
  450. package/.output/server/chunks/routes/api/projects/_id/quarantine.post.mjs.map +1 -1
  451. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +4 -1
  452. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs.map +1 -1
  453. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +4 -1
  454. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs.map +1 -1
  455. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +4 -1
  456. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs.map +1 -1
  457. package/.output/server/chunks/routes/api/projects/_id/test-functions/extract.post.mjs +78 -0
  458. package/.output/server/chunks/routes/api/projects/_id/test-functions/extract.post.mjs.map +1 -0
  459. package/.output/server/chunks/routes/api/projects/_id/test-functions/validate-proposal.post.mjs +68 -0
  460. package/.output/server/chunks/routes/api/projects/_id/test-functions/validate-proposal.post.mjs.map +1 -0
  461. package/.output/server/chunks/routes/api/projects/_id/test-functions.get.mjs +55 -0
  462. package/.output/server/chunks/routes/api/projects/_id/test-functions.get.mjs.map +1 -0
  463. package/.output/server/chunks/routes/api/projects/_id/test-functions.post.mjs +69 -0
  464. package/.output/server/chunks/routes/api/projects/_id/test-functions.post.mjs.map +1 -0
  465. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +4 -1
  466. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs.map +1 -1
  467. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +4 -1
  468. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs.map +1 -1
  469. package/.output/server/chunks/routes/api/projects/_id_.get.mjs +4 -1
  470. package/.output/server/chunks/routes/api/projects/_id_.get.mjs.map +1 -1
  471. package/.output/server/chunks/routes/api/projects/_id_.put.mjs +3 -1
  472. package/.output/server/chunks/routes/api/projects/_id_.put.mjs.map +1 -1
  473. package/.output/server/chunks/routes/api/projects/menu.get.mjs +4 -1
  474. package/.output/server/chunks/routes/api/projects/menu.get.mjs.map +1 -1
  475. package/.output/server/chunks/routes/api/projects/overview.get.mjs +4 -1
  476. package/.output/server/chunks/routes/api/projects/overview.get.mjs.map +1 -1
  477. package/.output/server/chunks/routes/api/projects.get.mjs +4 -1
  478. package/.output/server/chunks/routes/api/projects.get.mjs.map +1 -1
  479. package/.output/server/chunks/routes/api/search.get.mjs +4 -1
  480. package/.output/server/chunks/routes/api/search.get.mjs.map +1 -1
  481. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +4 -1
  482. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs.map +1 -1
  483. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +4 -1
  484. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs.map +1 -1
  485. package/.output/server/chunks/routes/api/settings/ai/models.post.mjs +3 -0
  486. package/.output/server/chunks/routes/api/settings/ai/models.post.mjs.map +1 -1
  487. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +4 -1
  488. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs.map +1 -1
  489. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +4 -1
  490. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs.map +1 -1
  491. package/.output/server/chunks/routes/api/settings/ai.get.mjs +4 -1
  492. package/.output/server/chunks/routes/api/settings/ai.get.mjs.map +1 -1
  493. package/.output/server/chunks/routes/api/settings/ai.put.mjs +4 -1
  494. package/.output/server/chunks/routes/api/settings/ai.put.mjs.map +1 -1
  495. package/.output/server/chunks/routes/api/settings/pr-feedback.get.mjs +4 -1
  496. package/.output/server/chunks/routes/api/settings/pr-feedback.get.mjs.map +1 -1
  497. package/.output/server/chunks/routes/api/settings/pr-feedback.put.mjs +4 -1
  498. package/.output/server/chunks/routes/api/settings/pr-feedback.put.mjs.map +1 -1
  499. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs +3 -1
  500. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs.map +1 -1
  501. package/.output/server/chunks/routes/api/settings/smtp.get.mjs +4 -1
  502. package/.output/server/chunks/routes/api/settings/smtp.get.mjs.map +1 -1
  503. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +4 -1
  504. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs.map +1 -1
  505. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +4 -1
  506. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs.map +1 -1
  507. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +4 -1
  508. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs.map +1 -1
  509. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +4 -1
  510. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs.map +1 -1
  511. package/.output/server/chunks/routes/api/setup-status.get.mjs +101 -0
  512. package/.output/server/chunks/routes/api/setup-status.get.mjs.map +1 -0
  513. package/.output/server/chunks/routes/api/stream.get.mjs +8 -2
  514. package/.output/server/chunks/routes/api/stream.get.mjs.map +1 -1
  515. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +4 -1
  516. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs.map +1 -1
  517. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +3 -1
  518. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs.map +1 -1
  519. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +4 -1
  520. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs.map +1 -1
  521. package/.output/server/chunks/routes/api/tags/_id_.put.mjs +3 -1
  522. package/.output/server/chunks/routes/api/tags/_id_.put.mjs.map +1 -1
  523. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +4 -1
  524. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs.map +1 -1
  525. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +4 -1
  526. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs.map +1 -1
  527. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +4 -1
  528. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs.map +1 -1
  529. package/.output/server/chunks/routes/api/test-functions/_id_.delete.mjs +62 -0
  530. package/.output/server/chunks/routes/api/test-functions/_id_.delete.mjs.map +1 -0
  531. package/.output/server/chunks/routes/api/test-functions/_id_.put.mjs +71 -0
  532. package/.output/server/chunks/routes/api/test-functions/_id_.put.mjs.map +1 -0
  533. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +4 -1
  534. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs.map +1 -1
  535. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +4 -1
  536. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs.map +1 -1
  537. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +4 -1
  538. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs.map +1 -1
  539. package/.output/server/chunks/routes/api/test-run-cases/_id/export.get.mjs +4 -1
  540. package/.output/server/chunks/routes/api/test-run-cases/_id/export.get.mjs.map +1 -1
  541. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +4 -1
  542. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs.map +1 -1
  543. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +4 -1
  544. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs.map +1 -1
  545. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +7 -4
  546. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs.map +1 -1
  547. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +4 -1
  548. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs.map +1 -1
  549. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +4 -1
  550. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs.map +1 -1
  551. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +4 -1
  552. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs.map +1 -1
  553. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +4 -1
  554. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs.map +1 -1
  555. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +4 -1
  556. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs.map +1 -1
  557. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +4 -1
  558. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs.map +1 -1
  559. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +4 -1
  560. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs.map +1 -1
  561. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +4 -1
  562. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs.map +1 -1
  563. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +4 -1
  564. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs.map +1 -1
  565. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +4 -1
  566. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs.map +1 -1
  567. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +4 -1
  568. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs.map +1 -1
  569. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +4 -1
  570. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs.map +1 -1
  571. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs +4 -1
  572. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs.map +1 -1
  573. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +4 -1
  574. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs.map +1 -1
  575. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +4 -1
  576. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs.map +1 -1
  577. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +4 -1
  578. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs.map +1 -1
  579. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +4 -1
  580. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs.map +1 -1
  581. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +4 -1
  582. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs.map +1 -1
  583. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +4 -1
  584. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs.map +1 -1
  585. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +4 -1
  586. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs.map +1 -1
  587. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +4 -1
  588. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs.map +1 -1
  589. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +4 -1
  590. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs.map +1 -1
  591. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs +4 -1
  592. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs.map +1 -1
  593. package/.output/server/chunks/routes/api/test-runs/import.post.mjs +4 -1
  594. package/.output/server/chunks/routes/api/test-runs/import.post.mjs.map +1 -1
  595. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +4 -1
  596. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs.map +1 -1
  597. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +4 -1
  598. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs.map +1 -1
  599. package/.output/server/chunks/routes/api/test-runs/start.post.mjs +4 -1
  600. package/.output/server/chunks/routes/api/test-runs/start.post.mjs.map +1 -1
  601. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +4 -1
  602. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs.map +1 -1
  603. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +4 -1
  604. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs.map +1 -1
  605. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs +4 -1
  606. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs.map +1 -1
  607. package/.output/server/chunks/routes/api/traces/check.post.mjs +6 -3
  608. package/.output/server/chunks/routes/api/traces/check.post.mjs.map +1 -1
  609. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs +4 -1
  610. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs.map +1 -1
  611. package/.output/server/chunks/routes/api/users/_id/index.get.mjs +4 -1
  612. package/.output/server/chunks/routes/api/users/_id/index.get.mjs.map +1 -1
  613. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +3 -1
  614. package/.output/server/chunks/routes/api/users/_id/index.post.mjs.map +1 -1
  615. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +4 -1
  616. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs.map +1 -1
  617. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +4 -1
  618. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs.map +1 -1
  619. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +3 -1
  620. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs.map +1 -1
  621. package/.output/server/chunks/routes/api/users/_id_.delete.mjs +4 -1
  622. package/.output/server/chunks/routes/api/users/_id_.delete.mjs.map +1 -1
  623. package/.output/server/chunks/routes/api/users/_id_.patch.mjs +7 -2
  624. package/.output/server/chunks/routes/api/users/_id_.patch.mjs.map +1 -1
  625. package/.output/server/chunks/routes/api/version.get.mjs +4 -1
  626. package/.output/server/chunks/routes/api/version.get.mjs.map +1 -1
  627. package/.output/server/chunks/routes/mcp.post.mjs +43 -11
  628. package/.output/server/chunks/routes/mcp.post.mjs.map +1 -1
  629. package/.output/server/chunks/routes/renderer.mjs +1 -1
  630. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  631. package/.output/server/chunks/tasks/sweep.mjs +3 -0
  632. package/.output/server/chunks/tasks/sweep.mjs.map +1 -1
  633. package/.output/server/chunks/tasks/sweep2.mjs +3 -0
  634. package/.output/server/chunks/tasks/sweep2.mjs.map +1 -1
  635. package/.output/server/database/migrations/0043_watery_dragon_lord.sql +22 -0
  636. package/.output/server/database/migrations/0044_panoramic_eddie_brock.sql +1 -0
  637. package/.output/server/database/migrations/meta/0043_snapshot.json +3764 -0
  638. package/.output/server/database/migrations/meta/0044_snapshot.json +3772 -0
  639. package/.output/server/database/migrations/meta/_journal.json +14 -0
  640. package/.output/server/database/migrations-pg/0044_dark_triathlon.sql +22 -0
  641. package/.output/server/database/migrations-pg/0045_loose_runaways.sql +1 -0
  642. package/.output/server/database/migrations-pg/meta/0044_snapshot.json +4473 -0
  643. package/.output/server/database/migrations-pg/meta/0045_snapshot.json +4480 -0
  644. package/.output/server/database/migrations-pg/meta/_journal.json +14 -0
  645. package/.output/server/index.mjs +4 -1
  646. package/.output/server/index.mjs.map +1 -1
  647. package/.output/server/package.json +1 -1
  648. package/bin/piwi-server.mjs +10 -0
  649. package/package.json +1 -1
  650. package/.output/public/_nuxt/8PUUncmO.js +0 -44
  651. package/.output/public/_nuxt/B7FTvFWq.js +0 -5
  652. package/.output/public/_nuxt/B8zkOmwo.js +0 -1
  653. package/.output/public/_nuxt/B96M2gdj.js +0 -1
  654. package/.output/public/_nuxt/B9OLmp0f.js +0 -1
  655. package/.output/public/_nuxt/BUa0V0Ly.js +0 -1
  656. package/.output/public/_nuxt/BUkim3TM.js +0 -1
  657. package/.output/public/_nuxt/BVc14Ncz.js +0 -4
  658. package/.output/public/_nuxt/BY0HxR3t.js +0 -17
  659. package/.output/public/_nuxt/B_xAMWQS.js +0 -2
  660. package/.output/public/_nuxt/BdQoBaOv.js +0 -1
  661. package/.output/public/_nuxt/BgRu_3tT.js +0 -1
  662. package/.output/public/_nuxt/BiO7RBWb.js +0 -6
  663. package/.output/public/_nuxt/CEfS4-oS.js +0 -64
  664. package/.output/public/_nuxt/CIoSMkpp.js +0 -1
  665. package/.output/public/_nuxt/CSJ-eOQM.js +0 -1
  666. package/.output/public/_nuxt/CahpB9Z2.js +0 -5
  667. package/.output/public/_nuxt/Cbh--1MW.js +0 -1
  668. package/.output/public/_nuxt/Cx6gc2VW.js +0 -1
  669. package/.output/public/_nuxt/D--H4jLI.js +0 -1
  670. package/.output/public/_nuxt/D1POo6S4.js +0 -10
  671. package/.output/public/_nuxt/D8nkF-OO.js +0 -3
  672. package/.output/public/_nuxt/DA25RkyK.js +0 -1
  673. package/.output/public/_nuxt/DIB-5fUJ.js +0 -1
  674. package/.output/public/_nuxt/DMec-OLo.js +0 -1
  675. package/.output/public/_nuxt/DSqHUrvO.js +0 -1
  676. package/.output/public/_nuxt/DmkUdSS4.js +0 -1
  677. package/.output/public/_nuxt/DoIREDVb.js +0 -1
  678. package/.output/public/_nuxt/DpZ1r1HA.js +0 -1
  679. package/.output/public/_nuxt/DqcKngf3.js +0 -1
  680. package/.output/public/_nuxt/DtHJgCS8.js +0 -1
  681. package/.output/public/_nuxt/Dtd4rC58.js +0 -9
  682. package/.output/public/_nuxt/Dy86h-7P.js +0 -1
  683. package/.output/public/_nuxt/HPNQD6v3.js +0 -1
  684. package/.output/public/_nuxt/HXadJrHu.js +0 -2
  685. package/.output/public/_nuxt/McL25vkx.js +0 -34
  686. package/.output/public/_nuxt/Nn93e_Mz.js +0 -1
  687. package/.output/public/_nuxt/UdR3DBPS.js +0 -1
  688. package/.output/public/_nuxt/_mj6CfPa.js +0 -1
  689. package/.output/public/_nuxt/builds/meta/e659b3e1-0e61-4971-940e-10063f9f4763.json +0 -1
  690. package/.output/public/_nuxt/entry.DmptwB51.css +0 -1
  691. package/.output/public/_nuxt/ryMzSDUj.js +0 -2
  692. package/.output/public/trace-viewer/assets/codeMirrorModule-LEHpjmcn.js +0 -32
  693. package/.output/public/trace-viewer/assets/defaultSettingsView-BNmKHKpQ.js +0 -264
  694. package/.output/public/trace-viewer/assets/urlMatch-BYQrIQwR.js +0 -1
  695. package/.output/public/trace-viewer/assets/xtermModule-CsJ4vdCR.js +0 -9
  696. package/.output/public/trace-viewer/codeMirrorModule.DYBRYzYX.css +0 -1
  697. package/.output/public/trace-viewer/codicon.DCmgc-ay.ttf +0 -0
  698. package/.output/public/trace-viewer/defaultSettingsView.CjdS-WJx.css +0 -1
  699. package/.output/public/trace-viewer/index.CzXZzn5A.css +0 -1
  700. package/.output/public/trace-viewer/index.DMMX1gXU.js +0 -2
  701. package/.output/public/trace-viewer/index.html +0 -44
  702. package/.output/public/trace-viewer/manifest.webmanifest +0 -16
  703. package/.output/public/trace-viewer/playwright-logo.svg +0 -9
  704. package/.output/public/trace-viewer/snapshot.html +0 -10
  705. package/.output/public/trace-viewer/snapshot.v8KI4P3m.js +0 -2
  706. package/.output/public/trace-viewer/sw.bundle.js +0 -5
  707. package/.output/public/trace-viewer/uiMode.BZQ54Kgt.css +0 -1
  708. package/.output/public/trace-viewer/uiMode.Ut8wwJNp.js +0 -6
  709. package/.output/public/trace-viewer/uiMode.html +0 -18
  710. package/.output/public/trace-viewer/xtermModule.DYP7pi_n.css +0 -32
  711. package/.output/server/chunks/build/Alert-C4xq8lao.mjs.map +0 -1
  712. package/.output/server/chunks/build/Breadcrumb-Ak2Lg3oM.mjs.map +0 -1
  713. package/.output/server/chunks/build/BreadcrumbNav-DO7I_z-n.mjs.map +0 -1
  714. package/.output/server/chunks/build/BrowserBadge-MFvBwxmD.mjs.map +0 -1
  715. package/.output/server/chunks/build/Card-BQP_oZkQ.mjs.map +0 -1
  716. package/.output/server/chunks/build/ChartCard-Y1UKwMsf.mjs.map +0 -1
  717. package/.output/server/chunks/build/ChartMarkerTooltip-0DcMfD_6.mjs.map +0 -1
  718. package/.output/server/chunks/build/Checkbox-4Q5d0fa0.mjs.map +0 -1
  719. package/.output/server/chunks/build/CiEnvCard-DB5DvBh1.mjs.map +0 -1
  720. package/.output/server/chunks/build/CodeBlock-BgE-NSmE.mjs.map +0 -1
  721. package/.output/server/chunks/build/DashboardNavbar-BHmMSPX7.mjs.map +0 -1
  722. package/.output/server/chunks/build/DashboardSidebarToggle-DCTnHiIv.mjs.map +0 -1
  723. package/.output/server/chunks/build/DataLocationCard-B_YHdzSz.mjs.map +0 -1
  724. package/.output/server/chunks/build/DiagnosisPanel-CALyEmcJ.mjs.map +0 -1
  725. package/.output/server/chunks/build/DurationValue-D20oGbnc.mjs.map +0 -1
  726. package/.output/server/chunks/build/EntityLinks-BBHWssHH.mjs.map +0 -1
  727. package/.output/server/chunks/build/EnvManagedBadge-UwD2b9v2.mjs.map +0 -1
  728. package/.output/server/chunks/build/FormField-B0HKsdMd.mjs.map +0 -1
  729. package/.output/server/chunks/build/HelpHint-DrcIv-Oj.mjs.map +0 -1
  730. package/.output/server/chunks/build/LoadingState-C3pBSuOO.mjs.map +0 -1
  731. package/.output/server/chunks/build/MarkerBadge-D7meXy4u.mjs.map +0 -1
  732. package/.output/server/chunks/build/MiniRunBars-CZMugDrh.mjs.map +0 -1
  733. package/.output/server/chunks/build/Modal-pSDlXzT3.mjs.map +0 -1
  734. package/.output/server/chunks/build/RunReports-DFLv51TX.mjs.map +0 -1
  735. package/.output/server/chunks/build/RunStatusBadge-FfGb6bkW.mjs.map +0 -1
  736. package/.output/server/chunks/build/SectionCard-CN-v0FZ_.mjs.map +0 -1
  737. package/.output/server/chunks/build/Select-5DK9frQ7.mjs.map +0 -1
  738. package/.output/server/chunks/build/Separator-CR4WcEKD.mjs.map +0 -1
  739. package/.output/server/chunks/build/SettingsField-BZfx4ma1.mjs.map +0 -1
  740. package/.output/server/chunks/build/Skeleton-CEHuuKVh.mjs.map +0 -1
  741. package/.output/server/chunks/build/Slideover-D270EZZD.mjs.map +0 -1
  742. package/.output/server/chunks/build/StatTile-D61Vzo6e.mjs.map +0 -1
  743. package/.output/server/chunks/build/Switch-B5Fp8ULt.mjs.map +0 -1
  744. package/.output/server/chunks/build/Table-BRk04Hd2.mjs.map +0 -1
  745. package/.output/server/chunks/build/Tabs-BkSOnbaB.mjs.map +0 -1
  746. package/.output/server/chunks/build/TestCaseHistoryChart-CSi64vVA.mjs.map +0 -1
  747. package/.output/server/chunks/build/TestMetaBadges-D5_yUtIP.mjs.map +0 -1
  748. package/.output/server/chunks/build/TestStatusBar-DX3EhlyP.mjs.map +0 -1
  749. package/.output/server/chunks/build/Textarea-Dv2-lOvW.mjs.map +0 -1
  750. package/.output/server/chunks/build/Tooltip-Dv4htNP6.mjs.map +0 -1
  751. package/.output/server/chunks/build/_id_-BdG37K7s.mjs.map +0 -1
  752. package/.output/server/chunks/build/_id_-BdJs7BJZ.mjs.map +0 -1
  753. package/.output/server/chunks/build/_id_-BxA6IgWr.mjs.map +0 -1
  754. package/.output/server/chunks/build/_id_-C_uSBiyU.mjs.map +0 -1
  755. package/.output/server/chunks/build/about-BE0UV-8-.mjs.map +0 -1
  756. package/.output/server/chunks/build/account-DAfvaD-F.mjs.map +0 -1
  757. package/.output/server/chunks/build/analytics-Bo_B_jko.mjs.map +0 -1
  758. package/.output/server/chunks/build/compare-RxHSOdsO.mjs.map +0 -1
  759. package/.output/server/chunks/build/db.client-CQoVTYB9.mjs.map +0 -1
  760. package/.output/server/chunks/build/edit-J0asTFg8.mjs.map +0 -1
  761. package/.output/server/chunks/build/fetch-B4FwBOzu.mjs.map +0 -1
  762. package/.output/server/chunks/build/forgot-password-CC__1OnV.mjs.map +0 -1
  763. package/.output/server/chunks/build/import-CS9oylTN.mjs.map +0 -1
  764. package/.output/server/chunks/build/index-CU2nZhAa.mjs.map +0 -1
  765. package/.output/server/chunks/build/index-DE45ycdZ.mjs.map +0 -1
  766. package/.output/server/chunks/build/index-e9skCi-V.mjs.map +0 -1
  767. package/.output/server/chunks/build/index-tR6owKzj.mjs +0 -167
  768. package/.output/server/chunks/build/index-tR6owKzj.mjs.map +0 -1
  769. package/.output/server/chunks/build/login-Da4u1IlW.mjs.map +0 -1
  770. package/.output/server/chunks/build/mcp-uhVCCwQM.mjs.map +0 -1
  771. package/.output/server/chunks/build/notifications-fx_qnKGA.mjs.map +0 -1
  772. package/.output/server/chunks/build/pr-feedback-X6-70iF0.mjs.map +0 -1
  773. package/.output/server/chunks/build/reset-password-BmrUS4ZD.mjs.map +0 -1
  774. package/.output/server/chunks/build/settings-CCYe7rsc.mjs.map +0 -1
  775. package/.output/server/chunks/build/settings-metadata-DrEqWcW-.mjs.map +0 -1
  776. package/.output/server/chunks/build/storage-CJEmviCD.mjs.map +0 -1
  777. package/.output/server/chunks/build/tags-DauTe_F-.mjs.map +0 -1
  778. package/.output/server/chunks/build/test-cases-thBbAykw.mjs.map +0 -1
  779. package/.output/server/chunks/build/timeout-hygiene-CbnSaVbK.mjs +0 -330
  780. package/.output/server/chunks/build/timeout-hygiene-CbnSaVbK.mjs.map +0 -1
  781. package/.output/server/chunks/build/useAiStatus-CxjMmDDY.mjs.map +0 -1
  782. package/.output/server/chunks/build/useChartMarkers-C89e_VLV.mjs.map +0 -1
  783. package/.output/server/chunks/build/useCopy-CeKWgHyT.mjs +0 -33
  784. package/.output/server/chunks/build/useCopy-CeKWgHyT.mjs.map +0 -1
  785. package/.output/server/chunks/build/useCopyRich-RJKhWoyj.mjs.map +0 -1
  786. package/.output/server/chunks/build/useDesktopDownload-BepjqxOt.mjs.map +0 -1
  787. package/.output/server/chunks/build/useOpenInIde-BbTnPhFA.mjs.map +0 -1
  788. package/.output/server/chunks/build/useSettingsNav-DnQKacz8.mjs.map +0 -1
  789. package/.output/server/chunks/build/users-CTUqXyGh.mjs.map +0 -1
  790. package/.output/server/chunks/build/wasted-time-BNTPIyrC.mjs +0 -301
  791. package/.output/server/chunks/build/wasted-time-BNTPIyrC.mjs.map +0 -1
@@ -1 +1 @@
1
- import{_ as k}from"./BrQEE053.js";import{d as _,f as r,g as l,k as b,o as n,c as a,t as u,m as h,F as g,y as V,h as f,i as y,v,ac as x,V as p}from"./Du2W7Jne.js";import{_ as B}from"./Bm62iDV5.js";import{_ as $}from"./BmUfSNMV.js";import{_ as E}from"./AbmKWFQQ.js";import{h as M}from"./BjaRappk.js";const F={key:0},S={key:1},q={class:"font-mono text-xs"},A={key:0},C={key:2},N=_({__name:"EnvManagedAlert",props:{envVars:{},title:{},description:{}},setup(e){const t=e,c=f(()=>t.title??"Managed by environment variables");return(o,s)=>{const d=k;return n(),r(d,{icon:"i-lucide-lock",color:"neutral",variant:"subtle",title:b(c)},{description:l(()=>[e.description?(n(),a("span",F,u(e.description),1)):e.envVars?.length?(n(),a("span",S,[s[0]||(s[0]=h(" These settings are pinned by ",-1)),(n(!0),a(g,null,V(e.envVars,(i,m)=>(n(),a(g,{key:i},[y("code",q,u(i),1),m<e.envVars.length-1?(n(),a("span",A,", ")):v("",!0)],64))),128)),s[1]||(s[1]=h(" and cannot be changed here. Edit the environment and restart to change them. ",-1))])):(n(),a("span",C," These settings are pinned by environment variables and cannot be changed here. "))]),_:1},8,["title"])}}}),z=Object.assign(N,{__name:"EnvManagedAlert"}),T={class:"inline-flex items-center gap-1"},j=_({__name:"SettingsField",props:{label:{},help:{},envVars:{},envManaged:{type:Boolean},description:{},hint:{},required:{type:Boolean},name:{},disabled:{type:Boolean}},setup(e){const t=e,c=f(()=>{if(t.envVars)return t.envVars;if(t.help)return M(t.help)});return(o,s)=>{const d=B,i=$,m=E;return n(),r(m,{label:e.label,description:e.description,hint:e.hint,required:e.required,name:e.name,disabled:e.disabled||e.envManaged},x({label:l(()=>[y("span",T,[h(u(e.label)+" ",1),e.help?(n(),r(d,{key:0,topic:e.help},null,8,["topic"])):v("",!0),e.envManaged?(n(),r(i,{key:1,"env-vars":b(c)},null,8,["env-vars"])):v("",!0)])]),default:l(()=>[p(o.$slots,"default")]),_:2},[o.$slots.trailing?{name:"trailing",fn:l(()=>[p(o.$slots,"trailing")]),key:"0"}:void 0]),1032,["label","description","hint","required","name","disabled"])}}}),G=Object.assign(j,{__name:"SettingsField"});export{z as _,G as a};
1
+ import{_ as k}from"./9N6hSApy.js";import{d as _,f as r,g as l,k as b,o as n,c as a,t as u,m as h,F as g,y as V,h as f,i as y,v,ac as x,V as p}from"./h49q_GXF.js";import{_ as B}from"./BtSJxOdh.js";import{_ as $}from"./3xlGO1qT.js";import{_ as E}from"./BKJetfRH.js";import{h as M}from"./BjaRappk.js";const F={key:0},S={key:1},q={class:"font-mono text-xs"},A={key:0},C={key:2},N=_({__name:"EnvManagedAlert",props:{envVars:{},title:{},description:{}},setup(e){const t=e,c=f(()=>t.title??"Managed by environment variables");return(o,s)=>{const d=k;return n(),r(d,{icon:"i-lucide-lock",color:"neutral",variant:"subtle",title:b(c)},{description:l(()=>[e.description?(n(),a("span",F,u(e.description),1)):e.envVars?.length?(n(),a("span",S,[s[0]||(s[0]=h(" These settings are pinned by ",-1)),(n(!0),a(g,null,V(e.envVars,(i,m)=>(n(),a(g,{key:i},[y("code",q,u(i),1),m<e.envVars.length-1?(n(),a("span",A,", ")):v("",!0)],64))),128)),s[1]||(s[1]=h(" and cannot be changed here. Edit the environment and restart to change them. ",-1))])):(n(),a("span",C," These settings are pinned by environment variables and cannot be changed here. "))]),_:1},8,["title"])}}}),z=Object.assign(N,{__name:"EnvManagedAlert"}),T={class:"inline-flex items-center gap-1"},j=_({__name:"SettingsField",props:{label:{},help:{},envVars:{},envManaged:{type:Boolean},description:{},hint:{},required:{type:Boolean},name:{},disabled:{type:Boolean}},setup(e){const t=e,c=f(()=>{if(t.envVars)return t.envVars;if(t.help)return M(t.help)});return(o,s)=>{const d=B,i=$,m=E;return n(),r(m,{label:e.label,description:e.description,hint:e.hint,required:e.required,name:e.name,disabled:e.disabled||e.envManaged},x({label:l(()=>[y("span",T,[h(u(e.label)+" ",1),e.help?(n(),r(d,{key:0,topic:e.help},null,8,["topic"])):v("",!0),e.envManaged?(n(),r(i,{key:1,"env-vars":b(c)},null,8,["env-vars"])):v("",!0)])]),default:l(()=>[p(o.$slots,"default")]),_:2},[o.$slots.trailing?{name:"trailing",fn:l(()=>[p(o.$slots,"trailing")]),key:"0"}:void 0]),1032,["label","description","hint","required","name","disabled"])}}}),G=Object.assign(j,{__name:"SettingsField"});export{z as _,G as a};
@@ -1 +1 @@
1
- import{r as C,H as I,b$ as N,am as D,c0 as J,K as G,aN as K,$ as Y,a3 as U,a6 as Q,b1 as Z,a4 as V,a5 as H,o as W,f as F,W as ee,k as p,_ as te,h as k,a8 as X,c1 as oe,l as R,g as ne,V as ie,q as ae,X as re}from"./Du2W7Jne.js";const se=3456e4;function le(e,a,t){const n=e.indexOf(";",a);return n===-1?t:n}function ue(e,a,t){const n=e.indexOf("=",a);return n<t?n:-1}function $(e,a,t){if(a===t)return"";let n=a,i=t;do{const l=e.charCodeAt(n);if(l!==32&&l!==9)break}while(++n<i);for(;i>n;){const l=e.charCodeAt(i-1);if(l!==32&&l!==9)break;i--}return e.slice(n,i)}const ce=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function de(e,a){const t=new ce,n=e.length;if(n<2)return t;const i=a?.decode||fe,l=a?.allowMultiple||!1;let o=0;do{const c=ue(e,o,n);if(c===-1)break;const u=le(e,o,n);if(c>u){o=e.lastIndexOf(";",c-1)+1;continue}const r=$(e,o,c);if(a?.filter&&!a.filter(r)){o=u+1;continue}const f=i($(e,c+1,u));if(l){const d=t[r];d===void 0?t[r]=f:Array.isArray(d)?d.push(f):t[r]=[d,f]}else t[r]===void 0&&(t[r]=f);o=u+1}while(o<n);return t}function fe(e){if(!e.includes("%"))return e;try{return decodeURIComponent(e)}catch{return e}}const pe=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ve=/^[\u0021-\u003A\u003C-\u007E]*$/,he=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,me=/^[\u0020-\u003A\u003C-\u007E]*$/,ge=Object.prototype.toString;function M(e,a,t){const n=typeof e=="object"&&e!==null,i=n?a:t,l=i?.stringify||JSON.stringify,o=n?e:{...t,name:e,value:a==null?"":typeof a=="string"?a:l(a)},c=i?.encode||encodeURIComponent;if(!pe.test(o.name))throw new TypeError(`argument name is invalid: ${o.name}`);const u=o.value?c(o.value):"";if(!ve.test(u))throw new TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw new TypeError("Partitioned cookies must have the Secure attribute");if(o.sameSite&&String(o.sameSite).toLowerCase()==="none")throw new TypeError("SameSite=None cookies must have the Secure attribute");if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){const f=o.name.toLowerCase();if(f.startsWith("__secure-")||f.startsWith("__host-"))throw new TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith("__host-")){if(o.path!=="/")throw new TypeError("__Host- cookies must have Path=/");if(o.domain)throw new TypeError("__Host- cookies must not have a Domain attribute")}let r=o.name+"="+u;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw new TypeError(`option maxAge is invalid: ${o.maxAge}`);r+="; Max-Age="+Math.max(0,Math.min(o.maxAge,se))}if(o.domain){if(!he.test(o.domain))throw new TypeError(`option domain is invalid: ${o.domain}`);r+="; Domain="+o.domain}if(o.path){if(!me.test(o.path))throw new TypeError(`option path is invalid: ${o.path}`);r+="; Path="+o.path}if(o.expires){if(!be(o.expires)||!Number.isFinite(o.expires.valueOf()))throw new TypeError(`option expires is invalid: ${o.expires}`);r+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(r+="; HttpOnly"),o.secure&&(r+="; Secure"),o.partitioned&&(r+="; Partitioned"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():void 0){case"low":r+="; Priority=Low";break;case"medium":r+="; Priority=Medium";break;case"high":r+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"none":r+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${o.sameSite}`)}return r}function be(e){return ge.call(e)==="[object Date]"}function g(e){if(typeof e!="object")return e;var a,t,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){t=new e.constructor;for(a in e)e.hasOwnProperty(a)&&t[a]!==e[a]&&(t[a]=g(e[a]))}else{t={};for(a in e)a==="__proto__"?Object.defineProperty(t,a,{value:g(e[a]),configurable:!0,enumerable:!0,writable:!0}):t[a]=g(e[a])}return t}if(n==="[object Array]"){for(a=e.length,t=Array(a);a--;)t[a]=g(e[a]);return t}return n==="[object Set]"?(t=new Set,e.forEach(function(i){t.add(g(i))}),t):n==="[object Map]"?(t=new Map,e.forEach(function(i,l){t.set(g(l),g(i))}),t):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(t=new RegExp(e.source,e.flags),t.lastIndex=e.lastIndex,t):n==="[object DataView]"?new e.constructor(g(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}function ye(e){if(e!=="undefined")try{const a=JSON.parse(e);return typeof a=="number"&&String(a)!==e?e:a}catch{return e}}const Se={path:"/",watch:!0,decode:e=>e&&ye(decodeURIComponent(e)),encode:e=>{if(typeof e!="string"||e==="undefined")return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!="string")return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},j=globalThis.cookieStore;function we(e,a){const t={...Se,...a};t.filter??=r=>r===e;const n=B(t)||{};let i;t.maxAge!==void 0?i=t.maxAge*1e3:t.expires&&(i=t.expires.getTime()-Date.now());const l=i!==void 0&&i<=0,o=l||n[e]===void 0||n[e]===null,c=g(l?void 0:n[e]??t.default?.()),u=i&&!l?Oe(c,i,t.watch&&t.watch!=="shallow"):C(c);{let r=null;try{!j&&typeof BroadcastChannel<"u"&&(r=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const f=(h=!1)=>{if(!h&&(t.readonly||K(u.value,n[e])))return;const b=u.value===null||u.value===void 0?void 0:t.encode(u.value);Ee(e,b,t),n[e]=g(u.value),r?.postMessage({value:t.encode(u.value)})},d=h=>{const b=h.refresh?B(t)?.[e]:t.decode(h.value);y=!0,u.value=b,n[e]=g(b),G(()=>{y=!1})};let y=!1;const S=!!N();if(S&&D(()=>{y=!0,f(),r?.close()}),j){const h=b=>{const A=b.changed.find(E=>E.name===e),L=b.deleted.find(E=>E.name===e);A&&d({value:A.value}),L&&d({value:null})};j.addEventListener("change",h),S&&D(()=>j.removeEventListener("change",h))}else r&&(r.onmessage=({data:h})=>d(h));t.watch&&I(u,()=>{y||f(t.refresh)},{deep:t.watch!=="shallow"}),o&&f(o)}return u}function B(e={}){return de(document.cookie,e)}const Ce=e=>e;function ze(e){const{encode:a,decode:t,...n}=e;return{...n,encode:Ce}}function ke(e,a,t={}){const n=ze(t);return a===void 0?M(e,"",{...n,maxAge:-1}):M(e,a,n)}function Ee(e,a,t={}){document.cookie=ke(e,a,t)}const P=2147483647;function Oe(e,a,t){let n,i,l=0;const o=t?C(e):{value:e};return N()&&D(()=>{i?.(),clearTimeout(n)}),J((c,u)=>{t&&(i=I(o,u));function r(){const d=a-l,y=d<P?d:P;n=setTimeout(()=>{if(l+=y,l<a)return r();o.value=void 0,u()},y)}function f(){l=0,clearTimeout(n),r()}return{get(){return c(),o.value},set(d){f(),o.value=d,u()}}})}const[qe,xe]=Y("DashboardGroup"),Te={base:"lg:hidden",variants:{side:{left:"",right:""}}},Re=Object.assign({inheritAttrs:!1},{__name:"UDashboardSidebarToggle",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},ui:{type:Object,required:!1},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(e){const t=U("dashboardSidebarToggle",e),n=Q(Z(t,"icon","side","class")),{t:i}=V(),l=H(),{sidebarOpen:o,toggleSidebar:c}=qe({sidebarOpen:C(!1),toggleSidebar:()=>{}}),u=k(()=>X({extend:Te,...l.ui?.dashboardSidebarToggle||{}}));return(r,f)=>(W(),F(te,ee({...p(n),icon:p(t).icon||(p(o)?p(l).ui.icons.close:p(l).ui.icons.menu),"aria-label":p(o)?p(i)("dashboardSidebarToggle.close"):p(i)("dashboardSidebarToggle.open"),...r.$attrs},{class:u.value({class:[p(t).ui?.base,p(t).class],side:p(t).side}),onClick:p(c)}),null,16,["class","onClick"]))}});function je(e,a={},{collapsed:t=C(!1)}={}){const n=C(null),i=k(()=>({side:"left",minSize:0,maxSize:100,defaultSize:0,storage:"cookie",persistent:!0,collapsible:!1,collapsedSize:0,resizable:!0,unit:"%",...R(a)?a.value:a})),{dir:l}=V(),o={size:i.value.defaultSize,collapsed:p(t)??!1},c=i.value.persistent&&(i.value.resizable||i.value.collapsible)?i.value.storage==="cookie"?we(e,{...i.value.storageOptions,default:()=>o}):oe(e,o,void 0,i.value.storageOptions):C(o),u=s=>{c.value?Object.assign(c.value,s):c.value={...o,...s}},r=k({get:()=>c.value?.collapsed??o.collapsed,set:s=>{i.value.collapsible&&(R(t)&&(t.value=s),u({collapsed:s}))}}),f=C(i.value.defaultSize),d=k({get:()=>c.value?.size??i.value.defaultSize,set:s=>{u({size:s})}}),y=k(()=>r.value?i.value.collapsedSize:d.value),S=C(!1),h=()=>i.value.unit==="rem"?Number.parseFloat(getComputedStyle(document.documentElement).fontSize):1,b=(s,v,O,q)=>{if(!n.value||!i.value.resizable)return;const T=n.value.parentElement?.offsetWidth||1,z=l.value==="rtl";let m;z?m=i.value.side==="left"?v-s:s-v:m=i.value.side==="left"?s-v:v-s;const w=O+m;let _;if(i.value.unit==="rem"?_=w/q:i.value.unit==="px"?_=w:_=w/T*100,i.value.collapsible&&_<i.value.collapsedSize+4){x(!0);return}else r.value&&x(!1);d.value=Math.min(i.value.maxSize,Math.max(i.value.minSize,_))},A=s=>{if(!n.value||!i.value.resizable)return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.clientX,q=v,T=h();S.value=!0;const z=w=>{b(w.clientX,O,q,T)},m=()=>{S.value=!1,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",z),document.addEventListener("mouseup",m)},L=s=>{if(!n.value||!i.value.resizable||!s.touches[0])return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.touches[0].clientX,q=v,T=h();S.value=!0;const z=w=>{w.touches[0]&&b(w.touches[0].clientX,O,q,T)},m=()=>{S.value=!1,document.removeEventListener("touchmove",z),document.removeEventListener("touchend",m),document.removeEventListener("touchcancel",m)};document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",m),document.addEventListener("touchcancel",m)},E=s=>{!n.value||!i.value.resizable||(s.preventDefault(),s.stopPropagation(),r.value&&x(!1),d.value=i.value.defaultSize)},x=s=>{if(!i.value.collapsible)return;const v=s??!r.value;v&&!r.value?f.value=d.value:!v&&r.value&&(d.value=f.value),r.value=v};return R(t)&&c.value?.collapsed&&(t.value=c.value.collapsed),R(t)&&I(t,s=>{i.value.collapsible&&c.value?.collapsed!==s&&(r.value=s)}),{el:n,size:y,isDragging:S,isCollapsed:r,onMouseDown:A,onTouchStart:L,onDoubleClick:E,collapse:x}}const _e={base:"hidden lg:block touch-none select-none cursor-ew-resize relative before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:z-1"},Le={__name:"UDashboardResizeHandle",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){const t=U("dashboardResizeHandle",e),n=H(),i=k(()=>X({extend:_e,...n.ui?.dashboardResizeHandle||{}}));return(l,o)=>(W(),F(p(re),{as:p(t).as,role:"separator",class:ae(i.value({class:[p(t).ui?.base,p(t).class]}))},{default:ne(()=>[ie(l.$slots,"default")]),_:3},8,["as","class"]))}};export{Re as _,qe as a,je as b,Le as c,xe as p,we as u};
1
+ import{r as C,J as I,bi as N,am as D,bj as X,L as G,aR as K,$ as Y,a3 as U,a6 as Q,b9 as Z,a4 as V,a5 as H,o as W,f as F,W as ee,k as p,_ as te,h as z,a8 as J,bk as oe,l as R,g as ne,V as ie,q as ae,X as re}from"./h49q_GXF.js";const se=3456e4;function le(e,a,t){const n=e.indexOf(";",a);return n===-1?t:n}function ue(e,a,t){const n=e.indexOf("=",a);return n<t?n:-1}function M(e,a,t){if(a===t)return"";let n=a,i=t;do{const l=e.charCodeAt(n);if(l!==32&&l!==9)break}while(++n<i);for(;i>n;){const l=e.charCodeAt(i-1);if(l!==32&&l!==9)break;i--}return e.slice(n,i)}const ce=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function de(e,a){const t=new ce,n=e.length;if(n<2)return t;const i=a?.decode||fe,l=a?.allowMultiple||!1;let o=0;do{const c=ue(e,o,n);if(c===-1)break;const u=le(e,o,n);if(c>u){o=e.lastIndexOf(";",c-1)+1;continue}const r=M(e,o,c);if(a?.filter&&!a.filter(r)){o=u+1;continue}const f=i(M(e,c+1,u));if(l){const d=t[r];d===void 0?t[r]=f:Array.isArray(d)?d.push(f):t[r]=[d,f]}else t[r]===void 0&&(t[r]=f);o=u+1}while(o<n);return t}function fe(e){if(!e.includes("%"))return e;try{return decodeURIComponent(e)}catch{return e}}const pe=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ve=/^[\u0021-\u003A\u003C-\u007E]*$/,he=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,me=/^[\u0020-\u003A\u003C-\u007E]*$/,ge=Object.prototype.toString;function $(e,a,t){const n=typeof e=="object"&&e!==null,i=n?a:t,l=i?.stringify||JSON.stringify,o=n?e:{...t,name:e,value:a==null?"":typeof a=="string"?a:l(a)},c=i?.encode||encodeURIComponent;if(!pe.test(o.name))throw new TypeError(`argument name is invalid: ${o.name}`);const u=o.value?c(o.value):"";if(!ve.test(u))throw new TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw new TypeError("Partitioned cookies must have the Secure attribute");if(o.sameSite&&String(o.sameSite).toLowerCase()==="none")throw new TypeError("SameSite=None cookies must have the Secure attribute");if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){const f=o.name.toLowerCase();if(f.startsWith("__secure-")||f.startsWith("__host-"))throw new TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith("__host-")){if(o.path!=="/")throw new TypeError("__Host- cookies must have Path=/");if(o.domain)throw new TypeError("__Host- cookies must not have a Domain attribute")}let r=o.name+"="+u;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw new TypeError(`option maxAge is invalid: ${o.maxAge}`);r+="; Max-Age="+Math.max(0,Math.min(o.maxAge,se))}if(o.domain){if(!he.test(o.domain))throw new TypeError(`option domain is invalid: ${o.domain}`);r+="; Domain="+o.domain}if(o.path){if(!me.test(o.path))throw new TypeError(`option path is invalid: ${o.path}`);r+="; Path="+o.path}if(o.expires){if(!be(o.expires)||!Number.isFinite(o.expires.valueOf()))throw new TypeError(`option expires is invalid: ${o.expires}`);r+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(r+="; HttpOnly"),o.secure&&(r+="; Secure"),o.partitioned&&(r+="; Partitioned"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():void 0){case"low":r+="; Priority=Low";break;case"medium":r+="; Priority=Medium";break;case"high":r+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"none":r+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${o.sameSite}`)}return r}function be(e){return ge.call(e)==="[object Date]"}function g(e){if(typeof e!="object")return e;var a,t,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){t=new e.constructor;for(a in e)e.hasOwnProperty(a)&&t[a]!==e[a]&&(t[a]=g(e[a]))}else{t={};for(a in e)a==="__proto__"?Object.defineProperty(t,a,{value:g(e[a]),configurable:!0,enumerable:!0,writable:!0}):t[a]=g(e[a])}return t}if(n==="[object Array]"){for(a=e.length,t=Array(a);a--;)t[a]=g(e[a]);return t}return n==="[object Set]"?(t=new Set,e.forEach(function(i){t.add(g(i))}),t):n==="[object Map]"?(t=new Map,e.forEach(function(i,l){t.set(g(l),g(i))}),t):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(t=new RegExp(e.source,e.flags),t.lastIndex=e.lastIndex,t):n==="[object DataView]"?new e.constructor(g(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}function ye(e){if(e!=="undefined")try{const a=JSON.parse(e);return typeof a=="number"&&String(a)!==e?e:a}catch{return e}}const Se={path:"/",watch:!0,decode:e=>e&&ye(decodeURIComponent(e)),encode:e=>{if(typeof e!="string"||e==="undefined")return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!="string")return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},j=globalThis.cookieStore;function we(e,a){const t={...Se,...a};t.filter??=r=>r===e;const n=B(t)||{};let i;t.maxAge!==void 0?i=t.maxAge*1e3:t.expires&&(i=t.expires.getTime()-Date.now());const l=i!==void 0&&i<=0,o=l||n[e]===void 0||n[e]===null,c=g(l?void 0:n[e]??t.default?.()),u=i&&!l?Oe(c,i,t.watch&&t.watch!=="shallow"):C(c);{let r=null;try{!j&&typeof BroadcastChannel<"u"&&(r=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const f=(h=!1)=>{if(!h&&(t.readonly||K(u.value,n[e])))return;const b=u.value===null||u.value===void 0?void 0:t.encode(u.value);Ee(e,b,t),n[e]=g(u.value),r?.postMessage({value:t.encode(u.value)})},d=h=>{const b=h.refresh?B(t)?.[e]:t.decode(h.value);y=!0,u.value=b,n[e]=g(b),G(()=>{y=!1})};let y=!1;const S=!!N();if(S&&D(()=>{y=!0,f(),r?.close()}),j){const h=b=>{const A=b.changed.find(E=>E.name===e),L=b.deleted.find(E=>E.name===e);A&&d({value:A.value}),L&&d({value:null})};j.addEventListener("change",h),S&&D(()=>j.removeEventListener("change",h))}else r&&(r.onmessage=({data:h})=>d(h));t.watch&&I(u,()=>{y||f(t.refresh)},{deep:t.watch!=="shallow"}),o&&f(o)}return u}function B(e={}){return de(document.cookie,e)}const Ce=e=>e;function ke(e){const{encode:a,decode:t,...n}=e;return{...n,encode:Ce}}function ze(e,a,t={}){const n=ke(t);return a===void 0?$(e,"",{...n,maxAge:-1}):$(e,a,n)}function Ee(e,a,t={}){document.cookie=ze(e,a,t)}const P=2147483647;function Oe(e,a,t){let n,i,l=0;const o=t?C(e):{value:e};return N()&&D(()=>{i?.(),clearTimeout(n)}),X((c,u)=>{t&&(i=I(o,u));function r(){const d=a-l,y=d<P?d:P;n=setTimeout(()=>{if(l+=y,l<a)return r();o.value=void 0,u()},y)}function f(){l=0,clearTimeout(n),r()}return{get(){return c(),o.value},set(d){f(),o.value=d,u()}}})}const[qe,xe]=Y("DashboardGroup"),Te={base:"lg:hidden",variants:{side:{left:"",right:""}}},Re=Object.assign({inheritAttrs:!1},{__name:"UDashboardSidebarToggle",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},ui:{type:Object,required:!1},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(e){const t=U("dashboardSidebarToggle",e),n=Q(Z(t,"icon","side","class")),{t:i}=V(),l=H(),{sidebarOpen:o,toggleSidebar:c}=qe({sidebarOpen:C(!1),toggleSidebar:()=>{}}),u=z(()=>J({extend:Te,...l.ui?.dashboardSidebarToggle||{}}));return(r,f)=>(W(),F(te,ee({...p(n),icon:p(t).icon||(p(o)?p(l).ui.icons.close:p(l).ui.icons.menu),"aria-label":p(o)?p(i)("dashboardSidebarToggle.close"):p(i)("dashboardSidebarToggle.open"),...r.$attrs},{class:u.value({class:[p(t).ui?.base,p(t).class],side:p(t).side}),onClick:p(c)}),null,16,["class","onClick"]))}});function je(e,a={},{collapsed:t=C(!1)}={}){const n=C(null),i=z(()=>({side:"left",minSize:0,maxSize:100,defaultSize:0,storage:"cookie",persistent:!0,collapsible:!1,collapsedSize:0,resizable:!0,unit:"%",...R(a)?a.value:a})),{dir:l}=V(),o={size:i.value.defaultSize,collapsed:p(t)??!1},c=i.value.persistent&&(i.value.resizable||i.value.collapsible)?i.value.storage==="cookie"?we(e,{...i.value.storageOptions,default:()=>o}):oe(e,o,void 0,i.value.storageOptions):C(o),u=s=>{c.value?Object.assign(c.value,s):c.value={...o,...s}},r=z({get:()=>c.value?.collapsed??o.collapsed,set:s=>{i.value.collapsible&&(R(t)&&(t.value=s),u({collapsed:s}))}}),f=C(i.value.defaultSize),d=z({get:()=>c.value?.size??i.value.defaultSize,set:s=>{u({size:s})}}),y=z(()=>r.value?i.value.collapsedSize:d.value),S=C(!1),h=()=>i.value.unit==="rem"?Number.parseFloat(getComputedStyle(document.documentElement).fontSize):1,b=(s,v,O,q)=>{if(!n.value||!i.value.resizable)return;const T=n.value.parentElement?.offsetWidth||1,k=l.value==="rtl";let m;k?m=i.value.side==="left"?v-s:s-v:m=i.value.side==="left"?s-v:v-s;const w=O+m;let _;if(i.value.unit==="rem"?_=w/q:i.value.unit==="px"?_=w:_=w/T*100,i.value.collapsible&&_<i.value.collapsedSize+4){x(!0);return}else r.value&&x(!1);d.value=Math.min(i.value.maxSize,Math.max(i.value.minSize,_))},A=s=>{if(!n.value||!i.value.resizable)return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.clientX,q=v,T=h();S.value=!0;const k=w=>{b(w.clientX,O,q,T)},m=()=>{S.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",m)},L=s=>{if(!n.value||!i.value.resizable||!s.touches[0])return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.touches[0].clientX,q=v,T=h();S.value=!0;const k=w=>{w.touches[0]&&b(w.touches[0].clientX,O,q,T)},m=()=>{S.value=!1,document.removeEventListener("touchmove",k),document.removeEventListener("touchend",m),document.removeEventListener("touchcancel",m)};document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",m),document.addEventListener("touchcancel",m)},E=s=>{!n.value||!i.value.resizable||(s.preventDefault(),s.stopPropagation(),r.value&&x(!1),d.value=i.value.defaultSize)},x=s=>{if(!i.value.collapsible)return;const v=s??!r.value;v&&!r.value?f.value=d.value:!v&&r.value&&(d.value=f.value),r.value=v};return R(t)&&c.value?.collapsed&&(t.value=c.value.collapsed),R(t)&&I(t,s=>{i.value.collapsible&&c.value?.collapsed!==s&&(r.value=s)}),{el:n,size:y,isDragging:S,isCollapsed:r,onMouseDown:A,onTouchStart:L,onDoubleClick:E,collapse:x}}const _e={base:"hidden lg:block touch-none select-none cursor-ew-resize relative before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:z-1"},Le={__name:"UDashboardResizeHandle",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){const t=U("dashboardResizeHandle",e),n=H(),i=z(()=>J({extend:_e,...n.ui?.dashboardResizeHandle||{}}));return(l,o)=>(W(),F(p(re),{as:p(t).as,role:"separator",class:ae(i.value({class:[p(t).ui?.base,p(t).class]}))},{default:ne(()=>[ie(l.$slots,"default")]),_:3},8,["as","class"]))}};export{Re as _,qe as a,je as b,Le as c,xe as p,we as u};
@@ -0,0 +1 @@
1
+ import{_ as S}from"./9N6hSApy.js";import{_ as $}from"./B0hK-xDF.js";import{_ as q}from"./BKJetfRH.js";import{d as T,b as j,w as F,aw as N,c as y,j as n,g as r,o as m,k as e,f as O,v as P,i as c,q as B,F as E,y as I,E as M,_ as R,m as k,r as A,M as K}from"./h49q_GXF.js";import{_ as L}from"./DLNNAYfu.js";import{u as W}from"./Cd8r0xk5.js";import"./D4UlSVir.js";import"./xbO0VmDX.js";import"./B9FSuKdA.js";import"./BNAHBHbY.js";import"./BtSJxOdh.js";import"./BjaRappk.js";import"./CWoSSKhQ.js";const z={class:"space-y-6"},D={class:"space-y-4"},G={class:"flex items-center justify-between gap-2"},H={class:"flex items-center gap-2 shrink-0"},ce=T({__name:"pr-feedback",async setup(J){let u,p;const d=j(),{data:o,refresh:f}=([u,p]=F(()=>W("/api/settings/pr-feedback","$vSS3KCMfao")),u=await u,p(),u),l=A(!1),t=K({enabled:!1,comment:!0,status:!0,onlyOnFailure:!1,statusContext:"piwi/tests"});N(()=>{o.value&&Object.assign(t,o.value.settings)});const v=[{key:"comment",label:"Post a summary comment",description:"Creates one comment on the pull request and edits it on every later run, so a busy branch gets one comment rather than one per push."},{key:"status",label:"Set a commit status",description:"Marks the run’s commit passed or failed, so the pull request shows the result in its checks list. Still set on a green run when the comment is suppressed."},{key:"onlyOnFailure",label:"Only comment on failures",description:"Keeps green runs from adding a comment. The commit status is still set either way."}];async function g(){l.value=!0;try{const i=await $fetch("/api/settings/pr-feedback",{method:"PUT",body:{settings:{...t}}});o.value=i,Object.assign(t,i.settings),d.add({title:"Saved",color:"success"}),await f()}catch{d.add({title:"Save failed",color:"error"})}finally{l.value=!1}}async function w(){l.value=!0;try{const i=await $fetch("/api/settings/pr-feedback",{method:"PUT",body:{settings:null}});o.value=i,Object.assign(t,i.settings),d.add({title:"Reset to defaults",color:"success"}),await f()}catch{d.add({title:"Reset failed",color:"error"})}finally{l.value=!1}}return(i,s)=>{const x=S,h=$,_=q,C=M,b=R,V=L;return m(),y("div",z,[n(V,{icon:"i-lucide-git-pull-request",title:"Pull-request feedback",help:"settings.pr-feedback"},{subtitle:r(()=>[...s[2]||(s[2]=[k(" When a run finishes on a branch with an open pull request, post the result back to it — new failures separated from pre-existing ones, the failure clusters behind them, and the locator to use instead of the one that broke. ",-1)])]),footer:r(()=>[c("div",G,[s[4]||(s[4]=c("p",{class:"text-xs text-muted"}," Needs an SCM token with write access to the repository — set it globally, or per project in the project’s edit page. ",-1)),c("div",H,[n(b,{variant:"ghost",color:"neutral",disabled:e(l),label:"Reset to defaults",onClick:w},null,8,["disabled"]),n(b,{color:"primary",loading:e(l),icon:"i-lucide-save",onClick:g},{default:r(()=>[...s[3]||(s[3]=[k("Save",-1)])]),_:1},8,["loading"])])])]),default:r(()=>[e(o)&&!e(o).siteUrlConfigured?(m(),O(x,{key:0,color:"warning",variant:"soft",icon:"i-lucide-triangle-alert",title:"PIWI_SITE_URL is not set",description:"Nothing is posted until it is — every link in the comment is built from it, and a comment full of unreachable links is worse than no comment.",class:"mb-4"})):P("",!0),c("div",D,[n(h,{modelValue:e(t).enabled,"onUpdate:modelValue":s[0]||(s[0]=a=>e(t).enabled=a),label:"Post feedback to pull requests"},null,8,["modelValue"]),c("div",{class:B(["space-y-4 pl-1",!e(t).enabled&&"opacity-50 pointer-events-none"])},[(m(),y(E,null,I(v,a=>n(_,{key:a.key,label:a.label,description:a.description},{default:r(()=>[n(h,{modelValue:e(t)[a.key],"onUpdate:modelValue":U=>e(t)[a.key]=U},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label","description"])),64)),n(_,{label:"Commit status context",description:"The name shown next to the status in the pull request’s checks list.",hint:`default ${e(o)?.defaults.statusContext??""}`},{default:r(()=>[n(C,{modelValue:e(t).statusContext,"onUpdate:modelValue":s[1]||(s[1]=a=>e(t).statusContext=a),placeholder:e(o)?.defaults.statusContext,class:"w-full max-w-sm"},null,8,["modelValue","placeholder"])]),_:1},8,["hint"])],2)])]),_:1})])}}});export{ce as default};
@@ -1 +1 @@
1
- import{$ as D,d as G,U as K,Z as J,at as L,o as i,c as B,f,g as v,V as C,k as e,W as _,S as Q,C as Y,ag as T,X as $,v as x,F as ee,h as m,b0 as E,aN as P,j as R,aD as ae,a2 as re,a3 as te,a5 as se,a6 as le,a7 as ie,aO as oe,aP as ne,i as de,q as c,p as j,m as N,t as M,a8 as ue}from"./Du2W7Jne.js";import{i as O}from"./DfgOx_ou.js";import{u as ce}from"./UdR3DBPS.js";import{u as pe}from"./Nn93e_Mz.js";import{V as fe}from"./DmkUdSS4.js";import{R as ve}from"./pQqGiNch.js";import{L as U}from"./L3kAWB2a.js";const[be]=D("CheckboxGroupRoot");function A(o){return o==="indeterminate"}function H(o){return A(o)?"indeterminate":o?"checked":"unchecked"}const[me,he]=D("CheckboxRoot");var ge=G({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(o,{emit:h}){const r=o,l=h,{forwardRef:g,currentElement:a}=K(),s=be(null),d=J(r,"modelValue",l,{defaultValue:r.defaultValue??r.falseValue,passive:r.modelValue===void 0}),p=m(()=>s?.disabled.value||r.disabled),q=m(()=>P(d.value,r.trueValue)),u=m(()=>E(s?.modelValue.value)?d.value==="indeterminate"?"indeterminate":q.value:O(s.modelValue.value,r.value));function z(){if(E(s?.modelValue.value))d.value==="indeterminate"?d.value=r.trueValue:d.value=q.value?r.falseValue:r.trueValue;else{const t=[...s.modelValue.value||[]];if(O(t,r.value)){const y=t.findIndex(I=>P(I,r.value));t.splice(y,1)}else t.push(r.value);s.modelValue.value=t}}const F=ce(a),k=pe(),S=L(),V=m(()=>{if(!S["aria-label"])return r.id&&a.value?document.querySelector(`[for="${r.id}"]`)?.innerText:void 0});return he({disabled:p,state:u}),(t,y)=>(i(),B(ee,null,[(i(),f(T(e(s)?.rovingFocus.value?e(ve):e($)),_({...t.$attrs,...e(k)},{id:t.id,ref:e(g),role:"checkbox","as-child":t.asChild,as:t.as,type:t.as==="button"?"button":void 0,"aria-checked":e(A)(u.value)?"mixed":u.value,"aria-required":t.required,"aria-label":t.$attrs["aria-label"]||V.value,"data-state":e(H)(u.value),"data-disabled":p.value?"":void 0,disabled:p.value,focusable:e(s)?.rovingFocus.value?!p.value:void 0,onKeydown:Q(Y(()=>{},["prevent"]),["enter"]),onClick:z}),{default:v(()=>[C(t.$slots,"default",{modelValue:e(d),state:u.value})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])),e(F)&&t.name&&!e(s)?(i(),f(e(fe),_({key:0,type:"checkbox",checked:!!u.value,name:t.name,value:t.value,disabled:p.value,required:t.required},e(k)),null,16,["checked","name","value","disabled","required"])):x("v-if",!0)],64))}}),ye=ge,qe=G({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(o){const{forwardRef:h}=K(),r=me();return(l,g)=>(i(),f(e(ae),{present:l.forceMount||e(A)(e(r).state.value)||e(r).state.value===!0},{default:v(()=>[R(e($),_({ref:e(h),"data-state":e(H)(e(r).state.value),"data-disabled":e(r).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":l.asChild,as:l.as},l.$attrs),{default:v(()=>[C(l.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),ke=qe;const Ve={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-3",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"outline-primary/25 focus-visible:ring-primary",indicator:"bg-primary"},secondary:{base:"outline-secondary/25 focus-visible:ring-secondary",indicator:"bg-secondary"},success:{base:"outline-success/25 focus-visible:ring-success",indicator:"bg-success"},info:{base:"outline-info/25 focus-visible:ring-info",indicator:"bg-info"},warning:{base:"outline-warning/25 focus-visible:ring-warning",indicator:"bg-warning"},error:{base:"outline-error/25 focus-visible:ring-error",indicator:"bg-error"},neutral:{base:"outline-inverted/25 focus-visible:ring-inverted",indicator:"bg-inverted"}},variant:{list:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},highlight:{true:""},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"cursor-not-allowed"}},{color:"primary",highlight:!0,class:{base:"ring-primary"}},{color:"secondary",highlight:!0,class:{base:"ring-secondary"}},{color:"success",highlight:!0,class:{base:"ring-success"}},{color:"info",highlight:!0,class:{base:"ring-info"}},{color:"warning",highlight:!0,class:{base:"ring-warning"}},{color:"error",highlight:!0,class:{base:"ring-error"}},{color:"neutral",highlight:!0,class:{base:"ring-inverted"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},Ie=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:{as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},highlight:{type:Boolean,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},trueValue:{type:null,required:!1},falseValue:{type:null,required:!1}},emits:["change","update:modelValue"],setup(o,{emit:h}){const r=o,l=re(),g=h,a=te("checkbox",r),s=se(),d=le(ie(a,"required","value","defaultValue","modelValue","trueValue","falseValue"),g),{id:p,emitFormChange:q,emitFormInput:u,size:z,color:F,highlight:k,name:S,disabled:V,ariaAttrs:t}=oe(r),y=p.value??ne(),I=L(),W=m(()=>{const{"data-state":b,...w}=I;return w}),n=m(()=>ue({extend:Ve,...s.ui?.checkbox||{}})({size:z.value??a.size,color:F.value??a.color,variant:a.variant,indicator:a.indicator,highlight:k.value??a.highlight,required:a.required,disabled:V.value}));function X(b){const w=new Event("change",{target:{value:b}});g("change",w),q(),u()}return(b,w)=>(i(),f(e($),{as:!e(a).variant||e(a).variant==="list"?e(a).as:e(U),"data-slot":b.$attrs["data-slot"]??"root",class:c(n.value.root({class:[e(a).ui?.root,e(a).class]}))},{default:v(()=>[de("div",{"data-slot":"container",class:c(n.value.container({class:e(a).ui?.container}))},[R(e(ye),_({id:e(y)},{...e(d),...W.value,...e(t)},{name:e(S),disabled:e(V),"data-slot":"base",class:n.value.base({class:e(a).ui?.base}),"onUpdate:modelValue":X}),{default:v(({state:Z})=>[R(e(ke),{"data-slot":"indicator",class:c(n.value.indicator({class:e(a).ui?.indicator}))},{default:v(()=>[Z==="indeterminate"?(i(),f(j,{key:0,name:e(a).indeterminateIcon||e(s).ui.icons.minus,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"])):(i(),f(j,{key:1,name:e(a).icon||e(s).ui.icons.check,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","name","disabled","class"])],2),e(a).label||l.label||e(a).description||l.description?(i(),B("div",{key:0,"data-slot":"wrapper",class:c(n.value.wrapper({class:e(a).ui?.wrapper}))},[e(a).label||l.label?(i(),f(T(!e(a).variant||e(a).variant==="list"?e(U):"p"),{key:0,for:e(y),"data-slot":"label",class:c(n.value.label({class:e(a).ui?.label}))},{default:v(()=>[C(b.$slots,"label",{label:e(a).label},()=>[N(M(e(a).label),1)])]),_:3},8,["for","class"])):x("",!0),e(a).description||l.description?(i(),B("p",{key:1,"data-slot":"description",class:c(n.value.description({class:e(a).ui?.description}))},[C(b.$slots,"description",{description:e(a).description},()=>[N(M(e(a).description),1)])],2)):x("",!0)],2)):x("",!0)]),_:3},8,["as","data-slot","class"]))}});export{Ie as _};
1
+ import{$ as D,d as G,U as K,Z as J,at as O,o as i,c as R,f,g as v,V as C,k as e,W as _,S as Q,C as Y,ag as T,X as $,v as x,F as ee,h as m,a$ as E,aR as P,j as B,aD as ae,a2 as re,a3 as te,a5 as se,a6 as le,a7 as ie,aL as oe,aS as ne,i as de,q as c,p as j,m as N,t as L,a8 as ue}from"./h49q_GXF.js";import{i as M}from"./x8w_1_rn.js";import{u as ce}from"./xbO0VmDX.js";import{u as pe}from"./B9FSuKdA.js";import{V as fe}from"./BNAHBHbY.js";import{R as ve}from"./Hot1UcKY.js";import{L as U}from"./D4UlSVir.js";const[be]=D("CheckboxGroupRoot");function A(o){return o==="indeterminate"}function H(o){return A(o)?"indeterminate":o?"checked":"unchecked"}const[me,he]=D("CheckboxRoot");var ge=G({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(o,{emit:h}){const r=o,l=h,{forwardRef:g,currentElement:a}=K(),s=be(null),d=J(r,"modelValue",l,{defaultValue:r.defaultValue??r.falseValue,passive:r.modelValue===void 0}),p=m(()=>s?.disabled.value||r.disabled),q=m(()=>P(d.value,r.trueValue)),u=m(()=>E(s?.modelValue.value)?d.value==="indeterminate"?"indeterminate":q.value:M(s.modelValue.value,r.value));function z(){if(E(s?.modelValue.value))d.value==="indeterminate"?d.value=r.trueValue:d.value=q.value?r.falseValue:r.trueValue;else{const t=[...s.modelValue.value||[]];if(M(t,r.value)){const y=t.findIndex(I=>P(I,r.value));t.splice(y,1)}else t.push(r.value);s.modelValue.value=t}}const S=ce(a),k=pe(),F=O(),V=m(()=>{if(!F["aria-label"])return r.id&&a.value?document.querySelector(`[for="${r.id}"]`)?.innerText:void 0});return he({disabled:p,state:u}),(t,y)=>(i(),R(ee,null,[(i(),f(T(e(s)?.rovingFocus.value?e(ve):e($)),_({...t.$attrs,...e(k)},{id:t.id,ref:e(g),role:"checkbox","as-child":t.asChild,as:t.as,type:t.as==="button"?"button":void 0,"aria-checked":e(A)(u.value)?"mixed":u.value,"aria-required":t.required,"aria-label":t.$attrs["aria-label"]||V.value,"data-state":e(H)(u.value),"data-disabled":p.value?"":void 0,disabled:p.value,focusable:e(s)?.rovingFocus.value?!p.value:void 0,onKeydown:Q(Y(()=>{},["prevent"]),["enter"]),onClick:z}),{default:v(()=>[C(t.$slots,"default",{modelValue:e(d),state:u.value})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])),e(S)&&t.name&&!e(s)?(i(),f(e(fe),_({key:0,type:"checkbox",checked:!!u.value,name:t.name,value:t.value,disabled:p.value,required:t.required},e(k)),null,16,["checked","name","value","disabled","required"])):x("v-if",!0)],64))}}),ye=ge,qe=G({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(o){const{forwardRef:h}=K(),r=me();return(l,g)=>(i(),f(e(ae),{present:l.forceMount||e(A)(e(r).state.value)||e(r).state.value===!0},{default:v(()=>[B(e($),_({ref:e(h),"data-state":e(H)(e(r).state.value),"data-disabled":e(r).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":l.asChild,as:l.as},l.$attrs),{default:v(()=>[C(l.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),ke=qe;const Ve={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-3",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"outline-primary/25 focus-visible:ring-primary",indicator:"bg-primary"},secondary:{base:"outline-secondary/25 focus-visible:ring-secondary",indicator:"bg-secondary"},success:{base:"outline-success/25 focus-visible:ring-success",indicator:"bg-success"},info:{base:"outline-info/25 focus-visible:ring-info",indicator:"bg-info"},warning:{base:"outline-warning/25 focus-visible:ring-warning",indicator:"bg-warning"},error:{base:"outline-error/25 focus-visible:ring-error",indicator:"bg-error"},neutral:{base:"outline-inverted/25 focus-visible:ring-inverted",indicator:"bg-inverted"}},variant:{list:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},highlight:{true:""},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"cursor-not-allowed"}},{color:"primary",highlight:!0,class:{base:"ring-primary"}},{color:"secondary",highlight:!0,class:{base:"ring-secondary"}},{color:"success",highlight:!0,class:{base:"ring-success"}},{color:"info",highlight:!0,class:{base:"ring-info"}},{color:"warning",highlight:!0,class:{base:"ring-warning"}},{color:"error",highlight:!0,class:{base:"ring-error"}},{color:"neutral",highlight:!0,class:{base:"ring-inverted"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},Ie=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:{as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},highlight:{type:Boolean,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},trueValue:{type:null,required:!1},falseValue:{type:null,required:!1}},emits:["change","update:modelValue"],setup(o,{emit:h}){const r=o,l=re(),g=h,a=te("checkbox",r),s=se(),d=le(ie(a,"required","value","defaultValue","modelValue","trueValue","falseValue"),g),{id:p,emitFormChange:q,emitFormInput:u,size:z,color:S,highlight:k,name:F,disabled:V,ariaAttrs:t}=oe(r),y=p.value??ne(),I=O(),W=m(()=>{const{"data-state":b,...w}=I;return w}),n=m(()=>ue({extend:Ve,...s.ui?.checkbox||{}})({size:z.value??a.size,color:S.value??a.color,variant:a.variant,indicator:a.indicator,highlight:k.value??a.highlight,required:a.required,disabled:V.value}));function X(b){const w=new Event("change",{target:{value:b}});g("change",w),q(),u()}return(b,w)=>(i(),f(e($),{as:!e(a).variant||e(a).variant==="list"?e(a).as:e(U),"data-slot":b.$attrs["data-slot"]??"root",class:c(n.value.root({class:[e(a).ui?.root,e(a).class]}))},{default:v(()=>[de("div",{"data-slot":"container",class:c(n.value.container({class:e(a).ui?.container}))},[B(e(ye),_({id:e(y)},{...e(d),...W.value,...e(t)},{name:e(F),disabled:e(V),"data-slot":"base",class:n.value.base({class:e(a).ui?.base}),"onUpdate:modelValue":X}),{default:v(({state:Z})=>[B(e(ke),{"data-slot":"indicator",class:c(n.value.indicator({class:e(a).ui?.indicator}))},{default:v(()=>[Z==="indeterminate"?(i(),f(j,{key:0,name:e(a).indeterminateIcon||e(s).ui.icons.minus,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"])):(i(),f(j,{key:1,name:e(a).icon||e(s).ui.icons.check,"data-slot":"icon",class:c(n.value.icon({class:e(a).ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","name","disabled","class"])],2),e(a).label||l.label||e(a).description||l.description?(i(),R("div",{key:0,"data-slot":"wrapper",class:c(n.value.wrapper({class:e(a).ui?.wrapper}))},[e(a).label||l.label?(i(),f(T(!e(a).variant||e(a).variant==="list"?e(U):"p"),{key:0,for:e(y),"data-slot":"label",class:c(n.value.label({class:e(a).ui?.label}))},{default:v(()=>[C(b.$slots,"label",{label:e(a).label},()=>[N(L(e(a).label),1)])]),_:3},8,["for","class"])):x("",!0),e(a).description||l.description?(i(),R("p",{key:1,"data-slot":"description",class:c(n.value.description({class:e(a).ui?.description}))},[C(b.$slots,"description",{description:e(a).description},()=>[N(L(e(a).description),1)])],2)):x("",!0)],2)):x("",!0)]),_:3},8,["as","data-slot","class"]))}});export{Ie as _};
@@ -0,0 +1,6 @@
1
+ import{_ as ie}from"./3xlGO1qT.js";import{d as re,b as de,w as A,c as r,j as a,ac as ce,k as s,g as d,F as y,f as v,h as D,r as k,o as l,i,E as ue,l as me,_ as pe,m as c,p as fe,t as p,v as _,y as R,s as _e,q as ge,M as ye,A as ve}from"./h49q_GXF.js";import{_ as he}from"./Dj-TetcW.js";import{_ as ke}from"./BtSJxOdh.js";import{_ as xe}from"./DLNNAYfu.js";import{_ as be}from"./BKJetfRH.js";import{_ as Se}from"./DDN2tt0a.js";import{_ as we}from"./CRPt9SfB.js";import{_ as Te}from"./9N6hSApy.js";import{u as F}from"./Cd8r0xk5.js";import"./CD3R-ggS.js";import"./BjaRappk.js";import"./CWoSSKhQ.js";import"./D4UlSVir.js";import"./xbO0VmDX.js";const Pe={class:"space-y-6"},Ue={class:"space-y-3"},Ce={key:0,class:"flex items-center gap-2 text-sm text-success-600 dark:text-success-400"},Ie={key:1,class:"flex items-center gap-2 text-sm text-warning-600 dark:text-warning-400"},Me={key:2,class:"grid grid-cols-2 gap-2 text-sm"},$e={class:"font-mono"},Ve={class:"font-mono"},Ee={key:3,class:"text-sm text-muted space-y-1"},Ne={class:"flex items-center gap-2 w-full"},ze={key:0,class:"mb-4 p-4 rounded-lg border border-primary/30 bg-primary/5 space-y-3"},Ae={class:"grid grid-cols-2 gap-3"},De={class:"flex justify-end gap-2"},Re={key:1,class:"text-sm text-muted py-4 text-center"},Fe={class:"space-y-2"},We={class:"flex-1 min-w-0"},Le={class:"font-medium text-sm flex items-center gap-1.5"},Oe={class:"text-xs text-muted"},Be={key:3,class:"ml-1 text-primary text-xs"},je={class:"flex items-center gap-1"},He={key:0,class:"text-sm text-muted py-4 text-center"},qe={class:"space-y-2"},Ye={class:"flex-1 min-w-0 space-y-0.5"},Je={class:"font-medium text-sm"},Qe={class:"text-xs text-muted flex flex-wrap gap-x-3"},Xe={key:0},Ge={key:1},Ke={key:2,class:"text-warning-500"},Ze={class:"flex flex-wrap gap-1 mt-1"},et={class:"flex items-center gap-1"},yt=re({__name:"notifications",async setup(tt){let f,x;const u=de(),j=ve(),I=D(()=>j.public.authEnabled),H=["PIWI_SMTP_HOST","PIWI_SMTP_PORT","PIWI_SMTP_USER","PIWI_SMTP_PASS","PIWI_SMTP_FROM","PIWI_SMTP_FROM_NAME","PIWI_SMTP_SECURE"],{data:m}=([f,x]=A(()=>F("/api/settings/smtp","$v5NL0FLSog")),f=await f,x(),f),h=k(""),M=k(!1);async function q(){if(h.value){M.value=!0;try{const o=await $fetch("/api/settings/smtp/test",{method:"POST",body:{to:h.value}});o.success?u.add({title:"Test email sent",description:`Check ${h.value}`,color:"success"}):u.add({title:"Send failed",description:o.error||"Unknown error",color:"error"})}catch(o){u.add({title:"Send failed",description:String(o?.message??o),color:"error"})}finally{M.value=!1}}}const{data:Y,refresh:W}=I.value?([f,x]=A(()=>F("/api/channels","$rT8YNpmgfl")),f=await f,x(),f):{data:k(null),refresh:()=>{}},$=D(()=>Y.value?.channels??[]),b=k(!1),n=ye({name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),V=k(!1),E=k(null),J=[{label:"Email",value:"email"},{label:"Slack webhook",value:"slack"},{label:"Webhook",value:"webhook"}];async function Q(){V.value=!0;try{const o={};n.type==="email"?o.address=n.address:n.type==="slack"?o.webhookUrl=n.webhookUrl:n.type==="webhook"&&(o.url=n.url,n.secret&&(o.secret=n.secret)),await $fetch("/api/channels",{method:"POST",body:{name:n.name,type:n.type,config:o,global:n.global}}),b.value=!1,Object.assign(n,{name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),await W(),u.add({title:"Channel created",color:"success"})}catch(o){u.add({title:"Failed to create channel",description:String(o?.message??o),color:"error"})}finally{V.value=!1}}async function X(o){try{await $fetch(`/api/channels/${o}`,{method:"DELETE"}),await W(),u.add({title:"Channel deleted",color:"success"})}catch(e){u.add({title:"Failed to delete channel",description:String(e?.message??e),color:"error"})}}async function G(o){E.value=o;try{const e=await $fetch(`/api/channels/${o}/test`,{method:"POST"});e.success?u.add({title:"Test notification sent",color:"success"}):u.add({title:"Test failed",description:e.error,color:"error"})}catch(e){u.add({title:"Test failed",description:String(e?.message??e),color:"error"})}finally{E.value=null}}const{data:K,refresh:L}=I.value?([f,x]=A(()=>F("/api/subscriptions","$J_5QzL_eLh")),f=await f,x(),f):{data:k(null),refresh:()=>{}},N=D(()=>K.value?.subscriptions??[]);async function Z(o){try{await $fetch(`/api/subscriptions/${o}`,{method:"DELETE"}),await L(),u.add({title:"Subscription removed",color:"success"})}catch(e){u.add({title:"Failed to remove subscription",description:String(e?.message??e),color:"error"})}}async function ee(o){const e=o.mutedUntil&&new Date(o.mutedUntil)>new Date;try{await $fetch(`/api/subscriptions/${o.id}`,{method:"PATCH",body:{mutedUntil:e?null:new Date(Date.now()+10080*60*1e3).toISOString()}}),await L(),u.add({title:e?"Unmuted":"Muted for 7 days",color:"success"})}catch(U){u.add({title:"Failed to update subscription",description:String(U?.message??U),color:"error"})}}function P(o){return o.mutedUntil&&new Date(o.mutedUntil)>new Date}function O(o){return o==="personal_email"?"i-lucide-user-round":o==="email"?"i-lucide-mail":o==="slack"?"i-lucide-slack":"i-lucide-webhook"}function te(o){return o.replace(/\./g," › ")}return(o,e)=>{const U=ie,C=fe,se=he,oe=ke,S=ue,g=pe,z=xe,w=be,le=Se,B=_e,ne=we,ae=Te;return l(),r("div",Pe,[a(z,{icon:"i-lucide-mail",title:"SMTP email delivery",help:"settings.smtp"},ce({subtitle:d(()=>[e[9]||(e[9]=c(" Configure SMTP via environment variables. The connection cannot be changed here. ",-1))]),actions:d(()=>[s(m)?.configured?(l(),v(U,{key:0,"env-vars":H,size:"md"})):_("",!0)]),default:d(()=>[i("div",Ue,[s(m)?.configured?(l(),r("div",Ce,[a(C,{name:"i-lucide-circle-check-big",class:"size-4"}),e[10]||(e[10]=c(" Configured ",-1))])):(l(),r("div",Ie,[a(C,{name:"i-lucide-circle-alert",class:"size-4"}),e[11]||(e[11]=c(" Not configured ",-1))])),s(m)?.configured?(l(),r("div",Me,[e[12]||(e[12]=i("div",{class:"text-muted"},"Host",-1)),i("div",$e,p(s(m)?.host)+":"+p(s(m)?.port),1),e[13]||(e[13]=i("div",{class:"text-muted"},"From",-1)),i("div",null,p(s(m)?.fromName?`${s(m).fromName} <${s(m).from}>`:s(m)?.from),1),e[14]||(e[14]=i("div",{class:"text-muted"},"User",-1)),i("div",Ve,p(s(m)?.user),1),e[15]||(e[15]=i("div",{class:"text-muted"},"TLS",-1)),i("div",null,p(s(m)?.secure?"Yes (port 465)":"STARTTLS / plain"),1)])):_("",!0),s(m)?.configured?_("",!0):(l(),r("div",Ee,[e[16]||(e[16]=i("p",null,"Set these environment variables to enable email notifications:",-1)),a(se,{code:`PIWI_SMTP_HOST=smtp.example.com
2
+ PIWI_SMTP_PORT=465
3
+ PIWI_SMTP_USER=user@example.com
4
+ PIWI_SMTP_PASS=secret
5
+ PIWI_SMTP_FROM=noreply@example.com
6
+ PIWI_SMTP_FROM_NAME=Piwi Dashboard`,lang:"bash"})]))])]),_:2},[s(m)?.configured?{name:"footer",fn:d(()=>[i("div",Ne,[a(oe,{topic:"notifications.test-email"}),a(S,{modelValue:s(h),"onUpdate:modelValue":e[0]||(e[0]=t=>me(h)?h.value=t:null),type:"email",placeholder:"Send test to email address…",class:"flex-1"},null,8,["modelValue"]),a(g,{color:"neutral",variant:"soft",icon:"i-lucide-send",loading:s(M),disabled:!s(h),onClick:q},{default:d(()=>[...e[17]||(e[17]=[c(" Send test ",-1)])]),_:1},8,["loading","disabled"])])]),key:"0"}:void 0]),1024),s(I)?(l(),r(y,{key:0},[a(z,{icon:"i-lucide-radio",title:"Notification channels",count:s($).length,help:"notifications.channels"},{actions:d(()=>[a(g,{size:"sm",icon:"i-lucide-plus",onClick:e[1]||(e[1]=t=>b.value=!s(b))},{default:d(()=>[...e[18]||(e[18]=[c(" Add channel ",-1)])]),_:1})]),default:d(()=>[s(b)?(l(),r("div",ze,[e[21]||(e[21]=i("h4",{class:"font-medium text-sm"},"New channel",-1)),i("div",Ae,[a(w,{label:"Name"},{default:d(()=>[a(S,{modelValue:s(n).name,"onUpdate:modelValue":e[2]||(e[2]=t=>s(n).name=t),placeholder:"e.g. My email",class:"w-full"},null,8,["modelValue"])]),_:1}),a(w,{label:"Type"},{default:d(()=>[a(le,{modelValue:s(n).type,"onUpdate:modelValue":e[3]||(e[3]=t=>s(n).type=t),items:J,class:"w-full"},null,8,["modelValue"])]),_:1})]),s(n).type==="email"?(l(),v(w,{key:0,label:"Email address"},{default:d(()=>[a(S,{modelValue:s(n).address,"onUpdate:modelValue":e[4]||(e[4]=t=>s(n).address=t),type:"email",placeholder:"you@example.com",class:"w-full"},null,8,["modelValue"])]),_:1})):s(n).type==="slack"?(l(),v(w,{key:1,label:"Slack webhook URL"},{default:d(()=>[a(S,{modelValue:s(n).webhookUrl,"onUpdate:modelValue":e[5]||(e[5]=t=>s(n).webhookUrl=t),placeholder:"https://hooks.slack.com/…",class:"w-full"},null,8,["modelValue"])]),_:1})):s(n).type==="webhook"?(l(),r(y,{key:2},[a(w,{label:"Endpoint URL"},{default:d(()=>[a(S,{modelValue:s(n).url,"onUpdate:modelValue":e[6]||(e[6]=t=>s(n).url=t),placeholder:"https://your-server.com/webhook",class:"w-full"},null,8,["modelValue"])]),_:1}),a(w,{label:"Secret (optional)",description:"Used to sign requests with X-Piwi-Signature header"},{default:d(()=>[a(S,{modelValue:s(n).secret,"onUpdate:modelValue":e[7]||(e[7]=t=>s(n).secret=t),type:"password",placeholder:"Shared secret",class:"w-full"},null,8,["modelValue"])]),_:1})],64)):_("",!0),i("div",De,[a(g,{color:"neutral",variant:"ghost",size:"sm",onClick:e[8]||(e[8]=t=>b.value=!1)},{default:d(()=>[...e[19]||(e[19]=[c("Cancel",-1)])]),_:1}),a(g,{color:"primary",size:"sm",loading:s(V),disabled:!s(n).name,onClick:Q},{default:d(()=>[...e[20]||(e[20]=[c(" Save channel ",-1)])]),_:1},8,["loading","disabled"])])])):_("",!0),s($).length===0&&!s(b)?(l(),r("div",Re," No channels yet. Add one to start receiving notifications. ")):_("",!0),i("div",Fe,[(l(!0),r(y,null,R(s($),t=>(l(),r("div",{key:t.id,class:"flex items-center gap-3 rounded-lg border border-default px-4 py-3"},[a(C,{name:O(t.type),class:"size-5 text-muted shrink-0"},null,8,["name"]),i("div",We,[i("div",Le,[c(p(t.name)+" ",1),t.type==="personal_email"?(l(),v(B,{key:0,size:"xs",variant:"soft",color:"neutral"},{default:d(()=>[...e[22]||(e[22]=[c("auto",-1)])]),_:1})):_("",!0)]),i("div",Oe,[t.type==="personal_email"||t.type==="email"?(l(),r(y,{key:0},[c(p(t.config.address),1)],64)):t.type==="slack"?(l(),r(y,{key:1},[c("Slack webhook")],64)):(l(),r(y,{key:2},[c(p(t.config.url),1)],64)),t.userId===null?(l(),r("span",Be,"(global)")):_("",!0)])]),i("div",je,[a(g,{icon:"i-lucide-send",color:"neutral",variant:"ghost",size:"sm",title:"Send test notification",loading:s(E)===t.id,onClick:T=>G(t.id)},null,8,["loading","onClick"]),t.type==="personal_email"?(l(),v(ne,{key:0,text:"Remove your email in Account settings to disconnect"},{default:d(()=>[a(g,{icon:"i-lucide-trash-2",color:"neutral",variant:"ghost",size:"sm",disabled:""})]),_:1})):(l(),v(g,{key:1,icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"sm",title:"Delete channel",onClick:T=>X(t.id)},null,8,["onClick"]))])]))),128))])]),_:1},8,["count"]),a(z,{icon:"i-lucide-bell",title:"My subscriptions",count:s(N).length,help:"notifications.subscriptions"},{default:d(()=>[s(N).length===0?(l(),r("div",He,[...e[23]||(e[23]=[c(" No subscriptions yet. Use the ",-1),i("strong",null,"Subscribe",-1),c(" bell on a project page to get started. ",-1)])])):_("",!0),i("div",qe,[(l(!0),r(y,null,R(s(N),t=>(l(),r("div",{key:t.id,class:ge(["flex items-center gap-3 rounded-lg border border-default px-4 py-3",P(t)?"opacity-60":""])},[a(C,{name:O(t.channel.type),class:"size-5 text-muted shrink-0"},null,8,["name"]),i("div",Ye,[i("div",Je,p(t.channel.name),1),i("div",Qe,[t.projectId?(l(),r("span",Xe,"Project #"+p(t.projectId),1)):(l(),r("span",Ge,"All projects")),i("span",null,p(t.mode),1),P(t)?(l(),r("span",Ke,"Muted until "+p(new Date(t.mutedUntil).toLocaleDateString()),1)):_("",!0)]),i("div",Ze,[(l(!0),r(y,null,R(t.events??[],T=>(l(),v(B,{key:T,size:"xs",variant:"soft",color:"neutral"},{default:d(()=>[c(p(te(T)),1)]),_:2},1024))),128))])]),i("div",et,[a(g,{icon:P(t)?"i-lucide-bell":"i-lucide-bell-off",color:"neutral",variant:"ghost",size:"sm",title:P(t)?"Unmute":"Mute for 7 days",onClick:T=>ee(t)},null,8,["icon","title","onClick"]),a(g,{icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"sm",title:"Remove subscription",onClick:T=>Z(t.id)},null,8,["onClick"])])],2))),128))])]),_:1},8,["count"])],64)):(l(),v(ae,{key:1,color:"info",icon:"i-lucide-info",title:"Authentication required",description:"Channels and subscriptions require authentication (PIWI_AUTH_ENABLED=true)."}))])}}});export{yt as default};
@@ -0,0 +1,2 @@
1
+ import{am as he,h as V,ao as O,r as x,ap as be,d as D,H as oe,J as Y,o as r,f as C,g as f,i as d,k as e,s as ae,m as b,t as $,c as h,j as c,_ as ie,v as I,F,p as J,l as A,E as ye,y as re,q,I as ue,L as ke,B as xe,V as G}from"./h49q_GXF.js";import{_ as we}from"./CRPt9SfB.js";import{_ as $e}from"./9N6hSApy.js";import{_ as ce}from"./DDN2tt0a.js";import{_ as Se}from"./BKJetfRH.js";import{_ as je}from"./B0hK-xDF.js";import{_ as Ce}from"./Dj-TetcW.js";import{_ as Ie}from"./jjOqY9Tv.js";import{e as Me,t as se,u as Ue}from"./BZnfiR67.js";import{e as Ve,j as Le,B as Re,A as ze,k as Pe}from"./CD3R-ggS.js";import{_ as Be}from"./BtSJxOdh.js";import{_ as Ee}from"./CDh_Qt7h.js";const Fe={normal:[],headed:["--headed"],debug:["--debug"],ui:["--ui"]};function De(t){const n=new Map;for(const o of t){const l=o.projectName||"";n.has(l)||n.set(l,[]),n.get(l).push(o)}return n}function Te(t,n){if(n==="grep"){const a=t.map(p=>Me(p.title));return["--grep",a.length===1?a[0]:`(${a.join("|")})`]}const o=new Set,l=[];for(const a of t){const p=n==="file-line"&&a.line?`${se(a.filePath)}:${a.line}`:se(a.filePath);o.has(p)||(o.add(p),l.push(p))}return l}function Ne(t){return/[\s"'()|]/.test(t)?`"${t.replace(/"/g,'\\"')}"`:t}function Ae(t,n={}){if(t.length===0)return[];const o=n.mode??"file-line",l=n.runMode??"normal",a=Math.min(1e3,Math.max(1,Math.floor(n.repeatEach??1))),p=[];for(const[i,u]of De(t)){const m=Te(u,o);i&&m.push(`--project=${i}`),m.push(...Fe[l]),n.trace&&m.push("--trace=on"),a>1&&m.push(`--repeat-each=${a}`),p.push({args:m,display:["playwright","test",...m.map(Ne)].join(" ")})}return p}const le=2e3;function He(){const t=x("idle"),n=x([]),o=x(null),l=x(0),a=x(0),p=V(()=>t.value==="running");let i=null,u=!1,m=!1,S=[],j=null,v=null;function T(g,_){n.value.push({text:g,error:_}),n.value.length>le&&n.value.splice(0,n.value.length-le)}function N(g){if(g.kind==="exit"){v?.(g.code);return}T(g.line??"",g.kind!=="stdout")}async function z(){if(j)return;const g=be();if(!g)throw new Error("The desktop bridge is unavailable.");j=await g.listen("piwi:local-run",({payload:_})=>{_.id===i?N(_):u&&S.push(_)})}async function P(g,_){const k=O();if(!k)throw new Error("The desktop bridge is unavailable.");const L=new Promise(M=>{v=M});u=!0,S=[];try{i=await k.invoke("desktop_run_local_tests",{projectId:String(g),args:_.args})}finally{u=!1}for(const M of S)M.id===i&&N(M);S=[];const w=await L;return i=null,v=null,w}async function B(g,_){if(!(p.value||_.length===0)){m=!1,n.value=[],o.value=null,a.value=_.length,l.value=0,t.value="running";try{await z();let k=0;for(const[L,w]of _.entries()){if(m)break;l.value=L,_.length>1&&T(`$ ${w.display}`,!1);const M=await P(g,w);if(m)break;M!==0&&(k=M??1)}m?t.value="stopped":(o.value=typeof k=="number"?k:1,t.value=k===0?"passed":"failed")}catch(k){T(Ve(k),!0),t.value="error"}}}async function R(){if(!p.value)return;m=!0;const g=O(),_=i;if(g&&_!=null)try{await g.invoke("desktop_stop_local_tests",{runId:_})}catch{}v?.(null),t.value="stopped"}return he(()=>{p.value&&R(),j?.(),j=null}),{status:t,running:p,lines:n,exitCode:o,stepIndex:l,stepCount:a,start:B,stop:R}}const Oe={class:"flex items-center gap-2 min-w-0"},qe={class:"space-y-4"},Ge={key:0,class:"space-y-3"},Je={class:"text-sm text-muted"},Xe={class:"flex items-center justify-between gap-3"},Ke={class:"flex items-center gap-2 min-w-0 text-sm"},Qe={class:"text-xs break-all"},We={class:"grid grid-cols-2 gap-3"},Ye={class:"text-xs"},Ze={class:"text-xs"},et={key:0},tt={class:"mt-1"},nt={class:"space-y-1"},st={key:1,class:"space-y-2"},lt={class:"flex items-center justify-between w-full gap-3"},ot={key:1},at={class:"flex items-center gap-2"},it=D({__name:"DesktopRunLocallyModal",props:ue({projectId:{},projectLabel:{},cases:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(t){const n=t,o=oe(t,"open"),{link:l,busy:a,pickAndLink:p}=Ue(()=>n.projectId),{status:i,running:u,lines:m,exitCode:S,stepIndex:j,stepCount:v,start:T,stop:N}=He(),z=x("file-line"),P=x("normal"),B=x(!1),R=x(1),g=[{label:"File:line",value:"file-line"},{label:"Title (grep)",value:"grep"},{label:"File only",value:"file"}],_=[{label:"Headless",value:"normal"},{label:"Headed",value:"headed"},{label:"Debug (inspector)",value:"debug"},{label:"UI mode",value:"ui"}],k=V(()=>!!l.value?.exists),L=V(()=>[...new Set(n.cases.map(U=>U.filePath).filter(Boolean))]),w=x([]);async function M(){const U=O();if(w.value=[],!(!U||!k.value||L.value.length===0))try{const s=await U.invoke("desktop_check_local_specs",{projectId:String(n.projectId),files:L.value});w.value=s?.missing??[]}catch{}}Y([o,()=>l.value?.path,k],()=>{o.value&&M()});const X=V(()=>L.value.length>0&&w.value.length===L.value.length),K=V(()=>Ae(n.cases,{mode:z.value,runMode:P.value,trace:B.value,repeatEach:R.value})),de=V(()=>K.value.map(U=>U.display).join(`
2
+ `)),Q=V(()=>{switch(i.value){case"running":return{label:v.value>1?`Running ${j.value+1}/${v.value}…`:"Running…",color:"info"};case"passed":return{label:"Passed",color:"success"};case"failed":return{label:S.value!=null?`Failed (exit ${S.value})`:"Failed",color:"error"};case"stopped":return{label:"Stopped",color:"neutral"};case"error":return{label:"Could not run",color:"error"};default:return null}});async function pe(){await T(n.projectId,K.value)}Y(o,U=>{!U&&u.value&&N()});const W=x(null);return Y(()=>m.value.length,async()=>{await ke(),W.value?.scrollTo({top:W.value.scrollHeight})}),(U,s)=>{const Z=J,ee=ae,te=$e,E=ie,ne=ce,H=Se,me=ye,fe=je,ve=Ce,ge=Ie;return r(),C(ge,{open:o.value,"onUpdate:open":s[7]||(s[7]=y=>o.value=y),ui:{content:"max-w-2xl"}},{header:f(()=>[d("div",Oe,[c(Z,{name:"i-lucide-monitor-play",class:"size-5 text-primary shrink-0"}),s[8]||(s[8]=d("h2",{class:"text-base font-semibold truncate"},"Run tests locally",-1)),c(ee,{color:"neutral",variant:"subtle",size:"sm"},{default:f(()=>[b($(t.cases.length)+" test"+$(t.cases.length===1?"":"s"),1)]),_:1})])]),body:f(()=>[d("div",qe,[e(k)?(r(),h(F,{key:1},[d("div",Xe,[d("div",Ke,[c(Z,{name:"i-lucide-folder-check",class:"size-4 text-success shrink-0"}),d("code",Qe,$(e(l)?.path),1)]),c(E,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-folder-search",loading:e(a),disabled:e(u),onClick:e(p)},{default:f(()=>[...s[10]||(s[10]=[b(" Change ",-1)])]),_:1},8,["loading","disabled","onClick"])]),d("div",We,[c(H,{label:"Select tests by",name:"mode"},{default:f(()=>[c(ne,{modelValue:e(z),"onUpdate:modelValue":s[0]||(s[0]=y=>A(z)?z.value=y:null),items:g,disabled:e(u),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),c(H,{label:"Browser",name:"runMode"},{default:f(()=>[c(ne,{modelValue:e(P),"onUpdate:modelValue":s[1]||(s[1]=y=>A(P)?P.value=y:null),items:_,disabled:e(u),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),c(H,{label:"Repeat each",name:"repeatEach",description:"Run every test N times — flake reproduction."},{default:f(()=>[c(me,{modelValue:e(R),"onUpdate:modelValue":s[2]||(s[2]=y=>A(R)?R.value=y:null),modelModifiers:{number:!0},type:"number",min:"1",max:"1000",disabled:e(u),class:"w-full"},null,8,["modelValue","disabled"])]),_:1}),c(H,{label:"Trace",name:"trace",description:"Force trace recording (--trace=on)."},{default:f(()=>[c(fe,{modelValue:e(B),"onUpdate:modelValue":s[3]||(s[3]=y=>A(B)?B.value=y:null),disabled:e(u)},null,8,["modelValue","disabled"])]),_:1})]),e(w).length>0?(r(),C(te,{key:0,color:"warning",variant:"soft",icon:"i-lucide-file-question",title:e(X)?"None of these tests are in the linked folder":"Some tests are not in the linked folder"},{description:f(()=>[d("p",null,[s[11]||(s[11]=b(" Not found under ",-1)),d("code",Ye,$(e(l)?.path),1),s[12]||(s[12]=b(": ",-1)),d("code",Ze,$(e(w)[0]),1),e(w).length>1?(r(),h("span",et," and "+$(e(w).length-1)+" more",1)):I("",!0),s[13]||(s[13]=b(". ",-1))]),d("p",tt,[e(X)?(r(),h(F,{key:0},[b(" This project is probably linked to a different checkout than the one these tests come from. ")],64)):(r(),h(F,{key:1},[b(" Running anyway is fine when your Playwright config puts them elsewhere. ")],64))]),e(X)?(r(),C(E,{key:0,size:"xs",color:"warning",variant:"soft",icon:"i-lucide-folder-search",class:"mt-2",loading:e(a),disabled:e(u),onClick:e(p)},{default:f(()=>[...s[14]||(s[14]=[b(" Choose the right folder… ",-1)])]),_:1},8,["loading","disabled","onClick"])):I("",!0)]),_:1},8,["title"])):I("",!0),d("div",nt,[s[15]||(s[15]=d("div",{class:"text-xs text-muted"},"Runs in the linked folder",-1)),c(ve,{code:e(de),lang:"sh"},null,8,["code"])]),s[16]||(s[16]=d("p",{class:"text-xs text-muted"}," Results are reported by the folder's own Playwright config — with the Piwi reporter set up, the new run appears in this app automatically. ",-1)),e(i)!=="idle"?(r(),h("div",st,[d("div",{ref_key:"outputEl",ref:W,class:"h-64 overflow-y-auto rounded-md bg-zinc-950 p-3"},[(r(!0),h(F,null,re(e(m),(y,_e)=>(r(),h("p",{key:_e,class:q(["font-mono text-xs whitespace-pre-wrap",y.error?"text-red-400":"text-zinc-300"])},$(y.text||" "),3))),128))],512)])):I("",!0)],64)):(r(),h("div",Ge,[d("p",Je," Link "+$(t.projectLabel||"this project")+" to its local checkout — the folder that contains these tests. Piwi runs that folder's own Playwright with the app's bundled Node, so nothing else needs to be installed. ",1),e(l)&&!e(l).exists?(r(),C(te,{key:0,color:"warning",variant:"soft",icon:"i-lucide-folder-x",title:"The linked folder no longer exists",description:e(l).path},null,8,["description"])):I("",!0),c(E,{icon:"i-lucide-folder-plus",loading:e(a),onClick:e(p)},{default:f(()=>[...s[9]||(s[9]=[b("Choose folder…",-1)])]),_:1},8,["loading","onClick"])]))])]),footer:f(()=>[d("div",lt,[e(Q)?(r(),C(ee,{key:0,color:e(Q).color,variant:"subtle"},{default:f(()=>[b($(e(Q).label),1)]),_:1},8,["color"])):(r(),h("span",ot)),d("div",at,[c(E,{color:"neutral",variant:"ghost",onClick:s[4]||(s[4]=y=>o.value=!1)},{default:f(()=>[...s[17]||(s[17]=[b("Close",-1)])]),_:1}),e(u)?(r(),C(E,{key:0,color:"error",icon:"i-lucide-square",onClick:s[5]||(s[5]=y=>e(N)())},{default:f(()=>[...s[18]||(s[18]=[b("Stop",-1)])]),_:1})):(r(),C(E,{key:1,icon:"i-lucide-play",disabled:!e(k)||e(K).length===0||e(a),onClick:s[6]||(s[6]=y=>pe())},{default:f(()=>[b($(e(i)==="idle"?"Run":"Run again"),1)]),_:1},8,["disabled"]))])])]),_:1},8,["open"])}}}),rt=Object.assign(it,{__name:"DesktopRunLocallyModal"}),ut={key:0,class:"inline-flex"},ct=D({__name:"DesktopRunLocallyButton",props:{projectId:{},projectLabel:{},cases:{}},setup(t){const n=t,o=x(!1);xe(()=>{o.value=!!O()});const l=x(!1),a=V(()=>o.value&&n.projectId!=null&&n.cases.length>0);return(p,i)=>{const u=ie,m=we,S=rt;return e(a)?(r(),h("span",ut,[c(m,{text:"Run these tests on this machine"},{default:f(()=>[c(u,{size:"xs",color:"warning",variant:"subtle",icon:"i-lucide-monitor-play",onClick:i[0]||(i[0]=j=>l.value=!0)},{default:f(()=>[...i[2]||(i[2]=[b(" Run locally ",-1)])]),_:1})]),_:1}),c(S,{open:e(l),"onUpdate:open":i[1]||(i[1]=j=>A(l)?l.value=j:null),"project-id":t.projectId,"project-label":t.projectLabel,cases:t.cases},null,8,["open","project-id","project-label","cases"])])):I("",!0)}}}),Lt=Object.assign(ct,{__name:"DesktopRunLocallyButton"}),dt=D({__name:"StatusChip",props:{status:{},size:{}},setup(t){return(n,o)=>{const l=J,a=ae;return r(),C(a,{color:("getStatusColor"in n?n.getStatusColor:e(Le))(t.status),size:t.size,variant:"subtle",class:"capitalize gap-1 items-center font-semibold shrink-0"},{default:f(()=>[c(l,{name:("getStatusIcon"in n?n.getStatusIcon:e(ze))(t.status),class:q(["size-3.5 shrink-0",{"animate-spin":("isStatusInFlight"in n?n.isStatusInFlight:e(Re))(t.status)}])},null,8,["name","class"]),b(" "+$(("formatStatusLabel"in n?n.formatStatusLabel:e(Pe))(t.status)),1)]),_:1},8,["color","size"])}}}),Rt=Object.assign(dt,{__name:"StatusChip"}),pt=["title"],mt=D({__name:"MetaStripGroup",props:{label:{},icon:{},help:{}},setup(t){return(n,o)=>{const l=J,a=Be;return r(),h("div",{class:"inline-flex items-center flex-wrap gap-x-1.5 gap-y-1 min-w-0 py-0.5 mr-3 [&:not(:first-child)]:border-l [&:not(:first-child)]:border-default [&:not(:first-child)]:pl-3",title:t.label},[t.icon?(r(),C(l,{key:0,name:t.icon,class:"w-3.5 h-3.5 text-dimmed shrink-0"},null,8,["name"])):I("",!0),G(n.$slots,"default"),t.help?(r(),C(a,{key:1,topic:t.help},null,8,["topic"])):I("",!0)],8,pt)}}}),zt=Object.assign(mt,{__name:"MetaStripGroup"}),ft={class:"flex flex-wrap items-center gap-y-1 text-sm min-w-0"},vt=D({__name:"SummaryMetaStrip",setup(t){return(n,o)=>(r(),h("div",ft,[G(n.$slots,"default")]))}}),Pt=Object.assign(vt,{__name:"SummaryMetaStrip"}),gt={class:"flex flex-col h-full gap-4 p-1 max-lg:overflow-y-auto lg:overflow-hidden"},_t={key:0,class:"lg:shrink-0"},ht={class:"lg:shrink-0 max-lg:sticky max-lg:top-0 max-lg:z-10 max-lg:-mx-1 max-lg:bg-(--ui-bg-canvas) max-lg:px-1 max-lg:py-1.5"},bt=D({__name:"DetailPageLayout",props:ue({tabItems:{},tabPanelClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=t,o=oe(t,"modelValue"),l=x(!1),a=V(()=>n.tabItems.find(i=>i.value===o.value)?.icon);function p(i){return["min-h-0","lg:flex-1",n.tabPanelClass?.[i]??"overflow-y-auto","max-lg:!block","max-lg:!overflow-visible"]}return(i,u)=>{const m=J,S=ce,j=Ee;return r(),h("div",gt,[i.$slots.summary?(r(),h("div",_t,[d("div",{class:q(e(l)?"max-lg:hidden":"")},[G(i.$slots,"summary")],2),d("button",{type:"button",class:"lg:hidden mt-2 w-full flex items-center justify-center gap-1 rounded-md border border-default py-1.5 text-xs font-medium text-muted hover:bg-elevated/60 transition-colors",onClick:u[0]||(u[0]=v=>l.value=!e(l))},[c(m,{name:e(l)?"i-lucide-chevron-down":"i-lucide-chevron-up",class:"size-3.5"},null,8,["name"]),b(" "+$(e(l)?"Show summary":"Hide summary"),1)])])):I("",!0),d("div",ht,[c(S,{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=v=>o.value=v),items:t.tabItems,icon:e(a),size:"md",class:"w-full sm:hidden"},null,8,["modelValue","items","icon"]),c(j,{modelValue:o.value,"onUpdate:modelValue":u[2]||(u[2]=v=>o.value=v),items:t.tabItems,size:"sm",class:"hidden sm:flex",ui:{list:"overflow-x-auto",trigger:"shrink-0"}},null,8,["modelValue","items"])]),(r(!0),h(F,null,re(t.tabItems,v=>(r(),h(F,{key:v.value},[o.value===v.value?(r(),h("div",{key:0,class:q(p(v.value))},[G(i.$slots,`tab-${v.slot??v.value}`)],2)):I("",!0)],64))),128))])}}}),Bt=Object.assign(bt,{__name:"DetailPageLayout"});export{Rt as _,Pt as a,zt as b,Bt as c,Lt as d};
@@ -0,0 +1 @@
1
+ import{_ as be,a as Re}from"./C9p0YCAi.js";import{d as ee,o as a,c as u,f as p,g as i,i as n,j as o,p as te,q as j,t as c,l as Q,k as t,v as g,m as k,h as _,_ as ne,G as le,F as E,y as M,r as re,e as Te,ac as $e}from"./h49q_GXF.js";import{_ as we}from"./BH-ym1CI.js";import{_ as Fe}from"./BlRWlfdD.js";import{_ as je,a as Se}from"./B_mN5eMV.js";import{_ as Ce}from"./CWw9WGlv.js";import{_ as Ve}from"./CAZpjzvB.js";import{_ as Ne}from"./9N6hSApy.js";import{_ as ze}from"./BFcdtAzg.js";import{_ as Pe}from"./DSvBQHzW.js";import{_ as oe}from"./C0v6l4pr.js";import{_ as ie}from"./DWEkQ7bl.js";import{_ as Ue}from"./DGyGmFem.js";import{_ as Ee}from"./BVN50jIb.js";import{_ as ue}from"./DLNNAYfu.js";import{f as Z,F as L,e as Oe}from"./CD3R-ggS.js";import{_ as De}from"./DwyFnMoY.js";import{_ as Ie}from"./CWoSSKhQ.js";import{u as se}from"./Cd8r0xk5.js";import{u as Ae}from"./CNcu4khZ.js";import{u as Be}from"./BhH0TNTi.js";import"./xbO0VmDX.js";import"./BNAHBHbY.js";import"./B6s20NbT.js";import"./x8w_1_rn.js";import"./B9FSuKdA.js";import"./Hot1UcKY.js";import"./D4UlSVir.js";import"./BtSJxOdh.js";import"./BjaRappk.js";import"./Dj-TetcW.js";import"./BaDhDBCV.js";const Le={class:"flex items-center gap-3 flex-wrap"},Me={class:"flex items-center gap-1.5"},He={key:0,class:"text-gray-500"},Ge={key:1},Ke={key:2},We={class:"flex items-center gap-1.5 cursor-pointer select-none text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors"},Je=ee({__name:"HomeFilters",props:{modelValue:{},availableEnvironments:{}},emits:["update:modelValue"],setup(O,{emit:b}){const T=O,R=b,N=_({get:()=>T.modelValue.environments,set:S=>R("update:modelValue",{...T.modelValue,environments:S})}),$=_({get:()=>T.modelValue.fullRunsOnly,set:S=>R("update:modelValue",{...T.modelValue,fullRunsOnly:S})}),D=_(()=>T.modelValue.environments.length>0||!T.modelValue.fullRunsOnly);function z(){R("update:modelValue",{environments:[],fullRunsOnly:!0})}return(S,v)=>{const H=te,r=we,f=Fe,x=ne;return a(),u("div",Le,[O.availableEnvironments.length>0?(a(),p(r,{key:0,modelValue:t(N),"onUpdate:modelValue":v[0]||(v[0]=m=>Q(N)?N.value=m:null),items:O.availableEnvironments,multiple:"",placeholder:"All environments",size:"sm",class:"min-w-[160px]"},{default:i(({modelValue:m})=>[n("div",Me,[o(H,{name:"i-lucide-server",class:j(["size-3.5 shrink-0",m.length?"text-primary":"text-gray-400"])},null,8,["class"]),m.length?m.length===1?(a(),u("span",Ge,c(m[0]),1)):(a(),u("span",Ke,c(m.length)+" environments",1)):(a(),u("span",He,"All environments"))])]),_:1},8,["modelValue","items"])):g("",!0),n("label",We,[o(f,{modelValue:t($),"onUpdate:modelValue":v[1]||(v[1]=m=>Q($)?$.value=m:null),size:"sm"},null,8,["modelValue"]),v[2]||(v[2]=k(" Full runs only ",-1))]),t(D)?(a(),p(x,{key:1,variant:"ghost",size:"sm",color:"neutral",icon:"i-lucide-x",onClick:z},{default:i(()=>[...v[3]||(v[3]=[k(" Reset ",-1)])]),_:1})):g("",!0)])}}}),Ye=Object.assign(Je,{__name:"HomeFilters"}),qe={class:"hidden md:block overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0"},Xe={key:0,class:"flex flex-wrap gap-1 mt-0.5"},Qe={class:"w-40"},Ze={key:1,class:"text-gray-400 text-sm"},et={class:"text-xs text-gray-500 dark:text-gray-400"},tt={key:1,class:"text-gray-400 text-sm"},nt={key:0,class:"tabular-nums text-sm text-gray-600 dark:text-gray-400"},st={key:1,class:"text-gray-400"},at={class:"space-y-2 md:hidden"},lt={class:"flex items-start justify-between gap-2"},rt={key:0,class:"flex flex-wrap gap-1"},ot={class:"flex items-center justify-between gap-2 text-xs"},it={class:"text-gray-500 dark:text-gray-400 truncate"},ut={key:1,class:"text-gray-400"},ct={key:2,class:"shrink-0 tabular-nums text-gray-500 dark:text-gray-400"},dt=ee({__name:"ProjectTrendTable",props:{projects:{},limit:{default:10}},setup(O){const b=O,T={failing:0,flaky:1,passing:2,unknown:3},R=re(!1),N=_(()=>b.projects.length>b.limit),$=_(()=>{const r=[...b.projects].sort((f,x)=>{const m=T[f.tendency]-T[x.tendency];if(m!==0)return m;const C=f.latestFullRun?new Date(f.latestFullRun.startTime).getTime():0;return(x.latestFullRun?new Date(x.latestFullRun.startTime).getTime():0)-C});return R.value?r:r.slice(0,b.limit)});function D(r){return r>=90?"text-green-600 dark:text-green-400":r>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function z(r){switch(r){case"failing":return"text-red-700 dark:text-red-400 bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800";case"flaky":return"text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800";case"passing":return"text-green-700 dark:text-green-400 bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800";default:return"text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 border-gray-200 dark:border-gray-700"}}function S(r){return r==="unknown"?"Unknown":r.charAt(0).toUpperCase()+r.slice(1)}function v(r){switch(r){case"failing":return"i-lucide-trending-down";case"flaky":return"i-lucide-shuffle";case"passing":return"i-lucide-trending-up";default:return"i-lucide-minus"}}const H=[{accessorKey:"name",header:"Project"},{id:"recentRuns",header:"Last 20 runs"},{accessorKey:"tendency",header:"Tendency"},{id:"passRate",header:"Pass rate"},{id:"latestRun",header:"Latest run"},{id:"tests",header:"Tests"}];return(r,f)=>{const x=ne,m=le,C=ze,h=Pe,I=te,V=oe,A=ie,Y=Ue,q=Ee,G=ue;return a(),p(G,{icon:"i-lucide-layout-dashboard",title:"Project health",help:"home.project-health"},{actions:i(()=>[t(N)&&!t(R)?(a(),p(x,{key:0,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-down",onClick:f[0]||(f[0]=e=>R.value=!0)},{default:i(()=>[k(" Show all "+c(b.projects.length),1)]),_:1})):t(R)?(a(),p(x,{key:1,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-up",onClick:f[1]||(f[1]=e=>R.value=!1)},{default:i(()=>[...f[2]||(f[2]=[k(" Show less ",-1)])]),_:1})):g("",!0),o(x,{to:"/projects",variant:"outline",size:"sm"},{default:i(()=>[...f[3]||(f[3]=[k("View all",-1)])]),_:1})]),default:i(()=>[n("div",qe,[o(Y,{data:t($),columns:H,ui:{base:"min-w-[700px]",td:"py-3",th:"py-3 text-xs uppercase tracking-wide"}},{"name-cell":i(({row:e})=>[o(m,{to:`/projects/${e.original.id}`,class:"font-medium text-primary hover:underline truncate block max-w-[200px]"},{default:i(()=>[k(c(e.original.label||e.original.name),1)]),_:2},1032,["to"]),e.original.tags.length>0?(a(),u("div",Xe,[(a(!0),u(E,null,M(e.original.tags,w=>(a(),p(C,{key:w.id,text:w.text,color:w.color},null,8,["text","color"]))),128))])):g("",!0)]),"recentRuns-cell":i(({row:e})=>[n("div",Qe,[o(h,{runs:e.original.recentRuns,height:28},null,8,["runs"])])]),"tendency-cell":i(({row:e})=>[n("span",{class:j(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium border whitespace-nowrap",z(e.original.tendency)])},[o(I,{name:v(e.original.tendency),class:"size-3 shrink-0"},null,8,["name"]),k(" "+c(S(e.original.tendency)),1)],2)]),"passRate-cell":i(({row:e})=>[e.original.latestFullRun?(a(),u("span",{key:0,class:j(["font-semibold tabular-nums text-sm",D(("passRate"in r?r.passRate:t(L))(e.original.latestFullRun))])},c(("passRate"in r?r.passRate:t(L))(e.original.latestFullRun))+"% ",3)):(a(),u("span",Ze,"—"))]),"latestRun-cell":i(({row:e})=>[e.original.latestFullRun?(a(),p(m,{key:0,to:`/test-runs/${e.original.latestFullRun.id}`,class:"flex items-center gap-2 min-w-[140px] hover:opacity-80 transition-opacity"},{default:i(()=>[o(V,{status:e.original.latestFullRun.status},null,8,["status"]),n("div",et,[n("div",null,c(("formatRelativeTime"in r?r.formatRelativeTime:t(Z))(e.original.latestFullRun.startTime)),1),e.original.latestFullRun.duration?(a(),p(A,{key:0,ms:e.original.latestFullRun.duration},null,8,["ms"])):g("",!0)])]),_:2},1032,["to"])):(a(),u("span",tt,"No full runs"))]),"tests-cell":i(({row:e})=>[e.original.latestFullRun?(a(),u("span",nt,c(e.original.latestFullRun.passedTests)+"/"+c(e.original.latestFullRun.totalTests),1)):(a(),u("span",st,"—"))]),_:1},8,["data"])]),n("div",at,[(a(!0),u(E,null,M(t($),e=>(a(),u("div",{key:e.id,class:"rounded-lg border border-default p-3 space-y-2"},[n("div",lt,[o(m,{to:`/projects/${e.id}`,class:"font-medium text-primary hover:underline truncate"},{default:i(()=>[k(c(e.label||e.name),1)]),_:2},1032,["to"]),n("span",{class:j(["inline-flex shrink-0 items-center gap-1 rounded border px-1.5 py-0.5 text-xs font-medium whitespace-nowrap",z(e.tendency)])},[o(I,{name:v(e.tendency),class:"size-3 shrink-0"},null,8,["name"]),k(" "+c(S(e.tendency)),1)],2)]),e.tags.length>0?(a(),u("div",rt,[(a(!0),u(E,null,M(e.tags,w=>(a(),p(C,{key:w.id,text:w.text,color:w.color},null,8,["text","color"]))),128))])):g("",!0),o(h,{runs:e.recentRuns,height:24},null,8,["runs"]),n("div",ot,[e.latestFullRun?(a(),p(m,{key:0,to:`/test-runs/${e.latestFullRun.id}`,class:"flex items-center gap-1.5 min-w-0 hover:opacity-80"},{default:i(()=>[o(V,{status:e.latestFullRun.status},null,8,["status"]),n("span",it,c(("formatRelativeTime"in r?r.formatRelativeTime:t(Z))(e.latestFullRun.startTime)),1)]),_:2},1032,["to"])):(a(),u("span",ut,"No full runs")),e.latestFullRun?(a(),u("span",ct,[n("span",{class:j(["font-semibold",D(("passRate"in r?r.passRate:t(L))(e.latestFullRun))])},c(("passRate"in r?r.passRate:t(L))(e.latestFullRun))+"% ",3),k(" · "+c(e.latestFullRun.passedTests)+"/"+c(e.latestFullRun.totalTests),1)])):g("",!0)])]))),128))]),t($).length===0?(a(),p(q,{key:0,text:"No projects yet",padded:!1,class:"py-8"})):g("",!0)]),_:1})}}}),mt=Object.assign(dt,{__name:"ProjectTrendTable"}),pt={key:0,class:"p-6"},gt={key:1,class:"p-6 space-y-8","aria-busy":"true"},_t={class:"grid grid-cols-1 xl:grid-cols-3 gap-6 items-start"},ft={class:"xl:col-span-2 space-y-3"},yt={class:"space-y-3"},vt={key:2,class:"p-6 space-y-8"},ht={key:1,class:"flex flex-wrap items-center gap-x-8 gap-y-3 text-sm border border-gray-200 dark:border-gray-700 rounded-xl px-6 py-4 bg-gray-50 dark:bg-gray-900/50"},xt={class:"flex items-center gap-1.5"},kt={class:"font-semibold tabular-nums"},bt={class:"flex items-center gap-1.5"},Rt={class:"flex items-center gap-1.5"},Tt={key:0,class:"flex items-center gap-1.5"},$t={class:"font-semibold tabular-nums"},wt={class:"flex items-center gap-1.5"},Ft={class:"font-semibold tabular-nums"},jt={key:2,class:"grid grid-cols-1 xl:grid-cols-3 gap-6 items-start"},St={class:"xl:col-span-2"},Ct={class:"divide-y divide-gray-100 dark:divide-gray-800 text-sm"},Vt={class:"flex-1 min-w-0"},Nt={class:"font-medium truncate"},zt={class:"text-xs text-gray-400"},Pt={class:"text-right tabular-nums shrink-0"},Ut={key:3,class:"text-center py-12 text-gray-500 dark:text-gray-400"},Et={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"},Ot={class:"flex flex-col gap-3 h-full"},Dt={class:"p-2 bg-primary/10 rounded-lg w-fit"},It={class:"text-xs font-semibold uppercase tracking-wide text-primary mb-1"},At={class:"font-semibold mb-1"},Bt={class:"text-sm text-gray-600 dark:text-gray-400"},ae=6,kn=ee({__name:"index",setup(O){Te({title:"Piwi Dashboard"});const{data:b,error:T,refresh:R,status:N}=se("/api/projects/overview",{lazy:!0,default:()=>[]},"$LKtEy4Bi96"),{data:$,error:D,refresh:z}=se("/api/test-runs/recent",{lazy:!0},"$tXxkP3waVF");Ae(()=>Promise.all([R(),z()]));const S=_(()=>N.value==="pending"&&!b.value?.length),v=_(()=>T.value||D.value);function H(){R(),z()}const r=Be("piwi-home-filters",{default:()=>({environments:[],fullRunsOnly:!0}),encode:l=>JSON.stringify(l),decode:l=>{try{return l?JSON.parse(l):{environments:[],fullRunsOnly:!0}}catch{return{environments:[],fullRunsOnly:!0}}}}),f=_(()=>{const l=new Set;for(const s of $.value??[])s.environment&&l.add(s.environment);for(const s of b.value??[])for(const y of s.recentRuns)y.environment&&l.add(y.environment);return[...l].sort()});function x(l){return r.value.environments.length===0?!0:!!l&&r.value.environments.includes(l)}const m=_(()=>{let l=$.value??[];return r.value.fullRunsOnly&&(l=l.filter(s=>s.isFullRun)),r.value.environments.length>0&&(l=l.filter(s=>x(s.environment))),l}),C=_(()=>{let l=b.value??[];return r.value.environments.length>0&&(l=l.map(s=>({...s,recentRuns:s.recentRuns.filter(y=>x(y.environment))})).filter(s=>s.recentRuns.length>0)),l}),h=_(()=>{const l=C.value,s=l.length,y=l.filter(F=>F.tendency==="failing").length,B=l.filter(F=>F.tendency==="flaky").length;let P=0,K=0;for(const F of l)F.latestFullRun&&(P+=F.latestFullRun.passedTests,K+=F.latestFullRun.totalTests);const W=K>0?Math.round(P/K*100):null,X=Date.now()-1440*60*1e3,U=m.value.filter(F=>new Date(F.startTime).getTime()>X).length;return{totalProjects:s,failingNow:y,flakyNow:B,avgPassRate:W,runs24h:U}}),I=new Set(["running","initialising","finalizing"]),V=re(!1),A=_(()=>[...m.value].sort((s,y)=>{const B=I.has(s.status)?0:1,P=I.has(y.status)?0:1;return B!==P?B-P:new Date(y.startTime).getTime()-new Date(s.startTime).getTime()})),Y=_(()=>V.value?A.value:A.value.slice(0,ae)),q=_(()=>A.value.length>ae),G=_(()=>m.value.length>0),e=_(()=>(b.value?.length??0)>0),w=_(()=>r.value.fullRunsOnly?($.value??[]).filter(y=>x(y.environment)).filter(y=>!y.isFullRun).length:0);function ce(){r.value={...r.value,fullRunsOnly:!1}}function de(l){const s=L(l);return s>=90?"text-green-600 dark:text-green-400":s>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function me(l){return I.has(l)?"border-l-blue-400":l==="passed"?"border-l-green-500":l==="failed"||l==="timedout"||l==="interrupted"?"border-l-red-500":"border-l-gray-300 dark:border-l-gray-600"}const pe=[{icon:"i-lucide-radio",tagline:"Watch your CI run live",title:"Live streaming",description:"Follow test execution in real time. Investigate failures while the suite is still running — no waiting for the CI job to finish."},{icon:"i-lucide-layers",tagline:"10 failures, 2 root causes",title:"Failure clustering",description:"Tests sharing the same error are grouped automatically. Triage one cluster instead of scrolling through unrelated failures."},{icon:"i-lucide-brain-circuit",tagline:"Diagnosis grounded in your code",title:"AI diagnosis",description:"AI analyzes failure clusters using your actual SCM diff, trace files, and run history — not a generic prompt."},{icon:"i-lucide-archive",tagline:"Every run, forever",title:"Permanent test intelligence",description:"Test results, traces, and HTML reports stored permanently. Compare runs, track flakiness trends, and never lose a CI result again."}];return(l,s)=>{const y=be,B=Re,P=Ye,K=Se,W=ne,X=Ce,U=Ve,F=Ne,J=te,ge=mt,_e=oe,fe=ie,ye=le,ve=ue,he=De,xe=Ie,ke=je;return a(),p(ke,{id:"home"},{header:i(()=>[o(K,null,$e({leading:i(()=>[o(y),o(B,{items:[{label:"Home",icon:"i-lucide-house",to:"/"}]})]),_:2},[t(e)?{name:"trailing",fn:i(()=>[o(P,{modelValue:t(r),"onUpdate:modelValue":s[0]||(s[0]=d=>Q(r)?r.value=d:null),"available-environments":t(f)},null,8,["modelValue","available-environments"])]),key:"0"}:void 0]),1024)]),body:i(()=>[t(v)?(a(),u("div",pt,[o(X,{text:`Couldn't load the dashboard: ${t(Oe)(t(v))}`},{action:i(()=>[o(W,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:H},{default:i(()=>[...s[3]||(s[3]=[k(" Retry ",-1)])]),_:1})]),_:1},8,["text"])])):t(S)?(a(),u("div",gt,[s[4]||(s[4]=n("span",{class:"sr-only",role:"status"},"Loading dashboard…",-1)),o(U,{class:"h-14 w-full rounded-xl"}),n("div",_t,[n("div",ft,[o(U,{class:"h-7 w-40"}),o(U,{class:"h-72 w-full rounded-lg"})]),n("div",yt,[o(U,{class:"h-7 w-32"}),(a(),u(E,null,M(5,d=>o(U,{key:d,class:"h-12 w-full rounded-lg"})),64))])])])):(a(),u("div",vt,[t(w)>0?(a(),p(F,{key:0,icon:"i-lucide-info",color:"primary",variant:"subtle",title:t(w)===1?"1 partial run is hidden":`${t(w)} partial runs are hidden`,description:"The “Full runs only” filter hides runs that only cover part of the suite (e.g. a single spec or --grep).",actions:[{label:"Show them",color:"primary",variant:"solid",size:"xs",onClick:ce}]},null,8,["title","actions"])):g("",!0),t(e)?(a(),u("div",ht,[n("div",xt,[o(J,{name:"i-lucide-folder",class:"size-4 text-primary shrink-0"}),n("span",kt,c(t(h).totalProjects),1),s[5]||(s[5]=n("span",{class:"text-gray-500"},"projects",-1))]),n("div",bt,[n("div",{class:j(["w-2 h-2 rounded-full shrink-0",t(h).failingNow>0?"bg-red-500":"bg-green-500"])},null,2),n("span",{class:j(["font-semibold tabular-nums",t(h).failingNow>0?"text-red-600 dark:text-red-400":""])},c(t(h).failingNow),3),s[6]||(s[6]=n("span",{class:"text-gray-500"},"failing now",-1))]),n("div",Rt,[n("div",{class:j(["w-2 h-2 rounded-full shrink-0",t(h).flakyNow>0?"bg-amber-400":"bg-gray-300 dark:bg-gray-600"])},null,2),n("span",{class:j(["font-semibold tabular-nums",t(h).flakyNow>0?"text-amber-600 dark:text-amber-400":""])},c(t(h).flakyNow),3),s[7]||(s[7]=n("span",{class:"text-gray-500"},"flaky",-1))]),t(h).avgPassRate!==null?(a(),u("div",Tt,[o(J,{name:"i-lucide-check-circle",class:"size-4 text-green-500 shrink-0"}),n("span",$t,c(t(h).avgPassRate)+"%",1),s[8]||(s[8]=n("span",{class:"text-gray-500"},"avg pass rate",-1))])):g("",!0),n("div",wt,[o(J,{name:"i-lucide-play-circle",class:"size-4 text-primary shrink-0"}),n("span",Ft,c(t(h).runs24h),1),s[9]||(s[9]=n("span",{class:"text-gray-500"},"runs today",-1))])])):g("",!0),t(e)||t(G)?(a(),u("div",jt,[n("div",St,[t(e)?(a(),p(ge,{key:0,projects:t(C)},null,8,["projects"])):g("",!0)]),t(G)?(a(),p(ve,{key:0,icon:"i-lucide-activity",title:"Recent activity"},{actions:i(()=>[t(q)&&!t(V)?(a(),p(W,{key:0,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-down",onClick:s[1]||(s[1]=d=>V.value=!0)},{default:i(()=>[k(" Show all "+c(t(A).length),1)]),_:1})):t(V)?(a(),p(W,{key:1,variant:"ghost",size:"sm","trailing-icon":"i-lucide-chevron-up",onClick:s[2]||(s[2]=d=>V.value=!1)},{default:i(()=>[...s[10]||(s[10]=[k(" Show less ",-1)])]),_:1})):g("",!0)]),default:i(()=>[n("div",Ct,[(a(!0),u(E,null,M(t(Y),d=>(a(),p(ye,{key:d.id,to:`/test-runs/${d.id}`,class:j(["flex items-center gap-3 py-3 pl-3 border-l-2 hover:bg-gray-50 dark:hover:bg-gray-800/60 rounded-r transition-colors",me(d.status)])},{default:i(()=>[o(_e,{status:d.status},null,8,["status"]),n("div",Vt,[n("div",Nt,c(d.projectLabel||d.projectName),1),n("div",zt,"Run #"+c(d.id)+" · "+c(("formatRelativeTime"in l?l.formatRelativeTime:t(Z))(d.startTime)),1)]),n("div",Pt,[n("div",{class:j(de(d))},c(("passRate"in l?l.passRate:t(L))(d))+"%",3),d.duration?(a(),p(fe,{key:0,ms:d.duration,class:"block text-xs text-gray-400"},null,8,["ms"])):g("",!0)])]),_:2},1032,["to","class"]))),128))])]),_:1})):g("",!0)])):g("",!0),t(e)&&!t(G)&&t(C).length===0?(a(),u("div",Ut,[o(J,{name:"i-lucide-filter-x",class:"size-8 mx-auto mb-2 opacity-40"}),s[11]||(s[11]=n("p",null,"No runs match the current filters.",-1))])):g("",!0),t(e)?g("",!0):(a(),u(E,{key:4},[o(he),n("div",Et,[(a(),u(E,null,M(pe,d=>o(xe,{key:d.title,class:"flex flex-col"},{default:i(()=>[n("div",Ot,[n("div",Dt,[o(J,{name:d.icon,class:"size-5 text-primary"},null,8,["name"])]),n("div",null,[n("p",It,c(d.tagline),1),n("h3",At,c(d.title),1),n("p",Bt,c(d.description),1)])])]),_:2},1024)),64))])],64))]))]),_:1})}}});export{kn as default};
@@ -0,0 +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 +1 @@
1
- import{d as W,o as r,f as m,x,k as e,g as u,V as M,p as v,v as s,h as o,m as y,J as L,l as D,j as C,c as _,t as p,i as E,F as N,y as k,r as U,_ as H}from"./Du2W7Jne.js";import{H as w}from"./BjaRappk.js";import{u as G}from"./DSqHUrvO.js";const B="https://piwitests.github.io";function X(t){return`${B}/${t.replace(/^\//,"")}`}const Y=W({__name:"DocLink",props:{to:{},noIcon:{type:Boolean}},setup(t){const a=t,h=o(()=>X(a.to));return(c,n)=>{const g=v,I=x;return r(),m(I,{to:e(h),target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 text-primary hover:underline"},{default:u(()=>[M(c.$slots,"default",{},()=>[n[0]||(n[0]=y("Learn more",-1))]),t.noIcon?s("",!0):(r(),m(g,{key:0,name:"i-lucide-external-link",class:"w-3.5 h-3.5 shrink-0"}))]),_:3},8,["to"])}}}),V=Object.assign(Y,{__name:"DocLink"}),P={PIWI_SITE_URL:{description:"Public base URL of the instance (e.g. https://piwi.example.com). Used to build links in emails.",category:"general",type:"url",example:"https://piwi.example.com",notes:"When unset, links in emails point to http://localhost:3000 and OAuth callback URLs are inferred from the request host — set it when running behind a reverse proxy."},PIWI_SECRET_KEY:{description:"Master key for AES-256-GCM encryption of secrets stored in the database (AI API keys, webhook/SCM secrets). Strongly recommended in production.",category:"general",secret:!0,example:"a 64-char random hex string",notes:"Falls back to an insecure built-in development key (with a startup warning in production). Generate one with `node -e \"console.log(require('node:crypto').randomBytes(32).toString('hex'))\"`."},PIWI_BUILD_DIR:{description:"Overrides the Nuxt build output directory. Used by the test harness to isolate parallel builds.",category:"build",runtimeOnly:!0,type:"path"},PIWI_BUILD_SHA:{description:"Commit SHA baked into the build for provenance. Shown on Settings → About. Set as a build-time arg.",category:"build",runtimeOnly:!0},PIWI_DESKTOP_TOKEN:{description:"Per-install access token the desktop (Tauri) app injects to gate its local server. Set automatically by the desktop shell — not user-configurable. Absent on the server build.",category:"desktop",secret:!0,runtimeOnly:!0,since:"0.16.0"},PIWI_DATABASE_PATH:{description:"Path to the SQLite database file (used when PIWI_DATABASE_URL is not set).",category:"database",type:"path",default:".data/piwi.db",relevantWhen:{PIWI_DATABASE_URL:""}},PIWI_DATABASE_URL:{description:"PostgreSQL connection string. When set, PostgreSQL is used instead of SQLite and migrations run automatically on startup.",category:"database",secret:!0,example:"postgres://piwi:piwi@db:5432/piwi",docs:"deployment#docker-compose-with-postgresql"},PIWI_RETENTION_DAYS:{description:"Days of test-run history the nightly retention sweep keeps. Unset or 0 disables automatic run pruning (the default — pruning is opt-in).",category:"database",type:"number",min:0,docs:"storage#data-retention"},PIWI_RETENTION_NOTIFICATION_DAYS:{description:"Days to keep sent/failed notification outbox rows before the nightly sweep prunes them (default 30; 0 keeps them forever).",category:"database",type:"number",default:"30",min:0},PIWI_RETENTION_DIAGNOSIS_VERSIONS:{description:"AI-diagnosis history versions kept per diagnosis by the nightly sweep (default 20; 0 disables capping).",category:"database",type:"number",default:"20",min:0},PIWI_STORAGE_TYPE:{description:'Storage backend for test artifacts (HTML reports, traces, attachments): "local" or "s3".',category:"storage",type:"enum",enum:["local","s3"],default:"local",notes:"Only the exact value `s3` selects S3; any other value falls back to local storage."},PIWI_STORAGE_PATH:{description:'Directory for local file storage (when PIWI_STORAGE_TYPE is "local").',category:"storage",type:"path",default:".data/storage",relevantWhen:{PIWI_STORAGE_TYPE:"local"}},PIWI_S3_BUCKET:{description:'S3 bucket name for artifact storage (when PIWI_STORAGE_TYPE is "s3").',category:"storage",relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"},docs:"storage#s3-compatible-storage"},PIWI_S3_REGION:{description:'S3 bucket region (when PIWI_STORAGE_TYPE is "s3").',category:"storage",example:"us-east-1",relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_ACCESS_KEY_ID:{description:"S3 access key id with write access to the bucket.",category:"storage",secret:!0,relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_SECRET_ACCESS_KEY:{description:"S3 secret access key.",category:"storage",secret:!0,relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_ENDPOINT:{description:"Custom endpoint for S3-compatible services (MinIO, R2, Spaces).",category:"storage",type:"url",example:"https://minio.example.com",relevantWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_FORCE_PATH_STYLE:{description:"Use path-style addressing (required by some S3-compatible services).",category:"storage",type:"boolean",relevantWhen:{PIWI_STORAGE_TYPE:"s3"},notes:"Defaults to on when a custom endpoint is set, off otherwise; only the exact value `false` turns it off explicitly."},PIWI_AUTH_ENABLED:{description:'Set to "true" to enable role-based access control and API keys. Off by default.',category:"auth",type:"boolean",default:"false"},PIWI_AUTH_SECRET:{description:"Secret used to sign/encrypt session cookies. Required when PIWI_AUTH_ENABLED is true.",category:"auth",secret:!0,relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_AUTH_ENABLED:"true"},notes:"The server refuses to start when auth is enabled and this is unset."},PIWI_OAUTH_GOOGLE_CLIENT_ID:{description:"Google OAuth client id (optional single sign-on).",category:"oauth",relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GOOGLE_CLIENT_SECRET:"*"},docs:"authentication#oauth-google-github"},PIWI_OAUTH_GOOGLE_CLIENT_SECRET:{description:"Google OAuth client secret.",category:"oauth",secret:!0,relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GOOGLE_CLIENT_ID:"*"}},PIWI_OAUTH_GITHUB_CLIENT_ID:{description:"GitHub OAuth client id (optional single sign-on).",category:"oauth",relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GITHUB_CLIENT_SECRET:"*"},docs:"authentication#oauth-google-github"},PIWI_OAUTH_GITHUB_CLIENT_SECRET:{description:"GitHub OAuth client secret.",category:"oauth",secret:!0,relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GITHUB_CLIENT_ID:"*"}},PIWI_OAUTH_ALLOWED_DOMAINS:{description:"Comma-separated verified email domains allowed to sign in via OAuth (all providers).",category:"oauth",type:"list",example:"example.com,corp.example.com",relevantWhen:{PIWI_AUTH_ENABLED:"true"},notes:"Only verified emails in these domains are accepted. Empty means no domain restriction."},PIWI_OAUTH_GITHUB_ALLOWED_ORGS:{description:"Comma-separated GitHub org logins a user must belong to (requests read:org scope).",category:"oauth",type:"list",relevantWhen:{PIWI_OAUTH_GITHUB_CLIENT_ID:"*"}},PIWI_AI_PROVIDER:{description:'AI provider for failure diagnosis: "anthropic" or "openai" (OpenAI-compatible).',category:"ai",type:"enum",enum:["anthropic","openai"]},PIWI_AI_API_KEY:{description:"API key for the diagnosis provider. Takes precedence over the DB-stored key.",category:"ai",secret:!0,relevantWhen:{PIWI_AI_PROVIDER:"*"},requiredWhen:{PIWI_AI_PROVIDER:"anthropic"},notes:"Optional for OpenAI-compatible providers that need no key (e.g. a local model)."},PIWI_AI_MODEL:{description:"Diagnosis model name (default: claude-opus-4-8 for Anthropic).",category:"ai",example:"claude-opus-4-8",relevantWhen:{PIWI_AI_PROVIDER:"*"},requiredWhen:{PIWI_AI_PROVIDER:"openai"}},PIWI_AI_BASE_URL:{description:"Base URL for OpenAI-compatible providers (e.g. http://localhost:11434/v1).",category:"ai",type:"url",example:"http://localhost:11434/v1",relevantWhen:{PIWI_AI_PROVIDER:"*"},requiredWhen:{PIWI_AI_PROVIDER:"openai"}},PIWI_AI_AUTO_DIAGNOSE:{description:'Set to "true" to auto-diagnose new failure clusters when a run finishes.',category:"ai",type:"boolean",default:"false",relevantWhen:{PIWI_AI_PROVIDER:"*"}},PIWI_AI_AUTO_DIAGNOSE_MAX:{description:"Max clusters auto-diagnosed per finished run (budget cap; default 3).",category:"ai",type:"number",default:"3",min:1,relevantWhen:{PIWI_AI_AUTO_DIAGNOSE:"true"}},PIWI_AI_RESEARCH_PROVIDER:{description:"Provider for the optional research (pre-analysis) stage. Falls back to PIWI_AI_PROVIDER.",category:"ai",type:"enum",enum:["anthropic","openai"],relevantWhen:{PIWI_AI_RESEARCH_MODEL:"*"}},PIWI_AI_RESEARCH_MODEL:{description:"Cheaper/faster model for the research stage. Empty disables the two-stage pipeline.",category:"ai",relevantWhen:{PIWI_AI_PROVIDER:"*"}},PIWI_AI_RESEARCH_BASE_URL:{description:"Base URL for the research-stage provider. Falls back to PIWI_AI_BASE_URL.",category:"ai",type:"url",relevantWhen:{PIWI_AI_RESEARCH_MODEL:"*"}},PIWI_AI_RESEARCH_API_KEY:{description:"API key for the research-stage provider. Falls back to PIWI_AI_API_KEY.",category:"ai",secret:!0,relevantWhen:{PIWI_AI_RESEARCH_MODEL:"*"}},PIWI_AI_EMBEDDING_PROVIDER:{description:"Provider for embeddings (semantic failure clustering). Falls back to PIWI_AI_PROVIDER.",category:"ai",type:"enum",enum:["openai"],relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"},notes:'Must resolve to an OpenAI-compatible provider — Anthropic has no embeddings API — so the fallback only helps when the main provider is "openai".'},PIWI_AI_EMBEDDING_MODEL:{description:"Embedding model name (e.g. text-embedding-3-small).",category:"ai",example:"text-embedding-3-small",relevantWhen:{PIWI_AI_PROVIDER:"*"},notes:"Empty disables semantic clustering (and the embedding fallbacks)."},PIWI_AI_EMBEDDING_BASE_URL:{description:"Base URL for the embedding provider. Falls back to PIWI_AI_BASE_URL.",category:"ai",type:"url",relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"}},PIWI_AI_EMBEDDING_API_KEY:{description:"API key for the embedding provider. Falls back to PIWI_AI_API_KEY.",category:"ai",secret:!0,relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"}},PIWI_AI_MAX_SAMPLE_ERROR_CHARS:{description:"Max characters of raw error text (per error block).",category:"ai-limits",type:"number",default:"10000",min:200,max:5e4},PIWI_AI_MAX_SCM_PATCH_BUDGET:{description:"Total characters of diff patches across changed files.",category:"ai-limits",type:"number",default:"15000",min:0,max:5e4},PIWI_AI_MAX_AFFECTED_TESTS:{description:"Max affected tests listed in the diagnosis context.",category:"ai-limits",type:"number",default:"30",min:1,max:200},PIWI_AI_MAX_STEPS:{description:"Max recent test steps included.",category:"ai-limits",type:"number",default:"50",min:1,max:200},PIWI_AI_MAX_CONSOLE_ENTRIES:{description:"Max console error/warning entries included.",category:"ai-limits",type:"number",default:"30",min:0,max:200},PIWI_AI_MAX_CONSOLE_ENTRY_CHARS:{description:"Max characters per console entry.",category:"ai-limits",type:"number",default:"1000",min:50,max:5e3},PIWI_AI_MAX_NETWORK_REQUESTS:{description:"Max failed network requests included.",category:"ai-limits",type:"number",default:"25",min:0,max:200},PIWI_AI_MAX_ARIA_SNAPSHOT_CHARS:{description:"Max characters of the page ARIA snapshot.",category:"ai-limits",type:"number",default:"12000",min:0,max:5e4},PIWI_AI_MAX_TEST_SOURCE_CHARS:{description:"Max characters of the test source snippet.",category:"ai-limits",type:"number",default:"8000",min:0,max:5e4},PIWI_AI_MAX_SOURCE_FILES:{description:"Max full source files fetched from SCM to ground patches (0 disables).",category:"ai-limits",type:"number",default:"4",min:0,max:20},PIWI_AI_MAX_SOURCE_FILE_CHARS:{description:"Max characters per fetched full source file.",category:"ai-limits",type:"number",default:"12000",min:0,max:5e4},PIWI_AI_MAX_SERVER_LOG_ENTRIES:{description:"Max backend server log entries (from X-Piwi-Logs header) included.",category:"ai-limits",type:"number",default:"50",min:0,max:200},PIWI_AI_MAX_SERVER_LOG_ENTRY_CHARS:{description:"Max characters per backend server log entry.",category:"ai-limits",type:"number",default:"1000",min:50,max:5e3},PIWI_AI_MAX_SERVER_TRACE_SPANS:{description:"Max backend server spans (from X-Piwi-Trace header) included in AI diagnosis (0 disables).",category:"ai-limits",type:"number",default:"40",min:0,max:500,since:"0.16.0"},PIWI_AI_MAX_IMAGES:{description:"Max screenshots auto-included in the diagnosis context.",category:"ai-limits",type:"number",default:"5",min:0,max:20},PIWI_AI_MAX_PASSED_PEERS:{description:"Max peer tests in the same file listed when they passed.",category:"ai-limits",type:"number",default:"20",min:0,max:100},PIWI_AI_MAX_CONSOLE_WINDOW:{description:"Max console entries of any type in the window before failure.",category:"ai-limits",type:"number",default:"50",min:0,max:200},PIWI_AI_SLOW_REQUEST_MS:{description:"Network request duration (ms) threshold for flagging as slow.",category:"ai-limits",type:"number",default:"1500",min:100,max:3e4},PIWI_AI_MAX_TRACE_ACTIONS:{description:"Max actions extracted from trace ZIP for failing-action context (0 disables).",category:"ai-limits",type:"number",default:"10",min:0,max:50},PIWI_AI_TRACE_DOM_CHARS:{description:"Max characters for the trace-derived DOM/ARIA excerpt in failing-action context.",category:"ai-limits",type:"number",default:"6000",min:0,max:2e4},PIWI_AI_MAX_TRACE_STACK_FRAMES:{description:"Max call-stack frames (with source windows) from the trace call-stack section (0 disables).",category:"ai-limits",type:"number",default:"10",min:0,max:50},PIWI_AI_MAX_TRACE_NETWORK_REQUESTS:{description:"Max requests included from the trace network stream (0 disables).",category:"ai-limits",type:"number",default:"20",min:0,max:200},PIWI_AI_MAX_DOM_SNAPSHOT_CHARS:{description:"Max characters of the failure-time DOM snapshot rendered from the trace (0 disables).",category:"ai-limits",type:"number",default:"8000",min:0,max:5e4},PIWI_AI_IMAGE_MAX_EDGE:{description:"Screenshots are downscaled to at most this many pixels on the long edge before being sent.",category:"ai-limits",type:"number",default:"1920",min:512,max:8192},PIWI_INGEST_MAX_CONSOLE_ENTRIES:{description:"Max console entries stored per test execution.",category:"ingest",type:"number",default:"200",min:10,max:5e3},PIWI_IMPORT_MAX_BYTES:{description:"Max size of a single multipart upload (report upload or blob-report import), in bytes. Lower it to match a reverse proxy that rejects large bodies, so the import page rejects an oversized archive before uploading it.",category:"ingest",type:"number",default:String(500*1024*1024),min:1024*1024,max:5*1024*1024*1024,since:"0.19.0"},PIWI_EXPORT_MAX_INLINE_BYTES:{description:"Max size of a single evidence file embedded as a data: URI in an HTML export, in bytes. Larger files are left out of the single-file HTML (and listed as omitted); the ZIP export still carries them at full size.",category:"export",type:"number",default:String(8*1024*1024),min:64*1024,max:512*1024*1024,since:"0.19.0"},PIWI_EXPORT_MAX_BYTES:{description:"Max total size of one export, in bytes. Evidence is added largest-last until the budget is reached; the rest is listed as omitted. The archive is built in memory, so this also bounds what a single export costs the server.",category:"export",type:"number",default:String(500*1024*1024),min:1024*1024,max:4*1024*1024*1024,since:"0.19.0"},PIWI_EXPORT_MAX_CASES:{description:"Max member executions carrying full evidence in a failure-cluster export. Remaining affected tests are listed by name without their evidence.",category:"export",type:"number",default:"25",min:1,max:200,since:"0.19.0"},PIWI_INGEST_MAX_CONSOLE_ENTRY_CHARS:{description:"Max characters stored per console entry.",category:"ingest",type:"number",default:"2000",min:200,max:2e4},PIWI_INGEST_MAX_STEPS:{description:"Max test steps stored per execution.",category:"ingest",type:"number",default:"500",min:20,max:5e3},PIWI_INGEST_MAX_STEP_EVENTS:{description:"Max step events stored per execution.",category:"ingest",type:"number",default:"1000",min:20,max:1e4},PIWI_INGEST_MAX_ARIA_CHARS:{description:"Max characters of the ARIA snapshot stored per failing execution.",category:"ingest",type:"number",default:"100000",min:1e3,max:1e6},PIWI_INGEST_MAX_ERROR_CHARS:{description:"Max characters of error text stored per execution (head and tail are kept).",category:"ingest",type:"number",default:"20000",min:1e3,max:1e5},PIWI_INGEST_MAX_SAMPLE_ERROR_CHARS:{description:"Max characters of the sample error stored per failure cluster.",category:"ingest",type:"number",default:"50000",min:1e3,max:2e5},PIWI_INGEST_MAX_TEST_SOURCE_CHARS:{description:"Max characters of the test source snippet stored per failing execution.",category:"ingest",type:"number",default:"50000",min:1e3,max:2e5},PIWI_INGEST_MAX_SOURCE_FRAMES:{description:"Max source stack frames stored per failing execution.",category:"ingest",type:"number",default:"8",min:1,max:32},PIWI_INGEST_MAX_SOURCE_FRAME_CHARS:{description:"Max characters per stored source frame snippet.",category:"ingest",type:"number",default:"4000",min:500,max:2e4},PIWI_AUTO_MARKERS:{description:"Automatically create a timeline marker when a run’s environment, Playwright version, or reporter version changes from the previous run (default: enabled). Set to false to disable.",category:"markers",type:"boolean",default:"true",docs:"timeline-markers",notes:"Only the exact value `false` disables auto-markers."},PIWI_TEST_LOGS_DISABLED:{description:"Disable X-Piwi-Logs response header emission (default: auto-disabled in production, enabled in development).",category:"testing",type:"boolean",docs:"backend-logs",notes:"Unset: capture is on in development and off in production builds; `true` forces it off everywhere, `false` forces it on even in production."},PIWI_CLUSTER_SIMILARITY_THRESHOLD:{description:"Cosine similarity (0–1) above which two failure embeddings merge into one cluster.",category:"clustering",type:"number",default:"0.92",min:0,max:1,relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"},notes:"Must be greater than 0 and at most 1; invalid values fall back to the default."},PIWI_CLUSTER_SUGGEST_THRESHOLD:{description:"Similarity at which a failure is suggested (not auto-merged) as related to a cluster.",category:"clustering",type:"number",default:"0.80",min:0,max:1,relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"},notes:"Capped at the merge threshold."},PIWI_SMTP_HOST:{description:"SMTP server hostname for outbound email.",category:"smtp",example:"smtp.example.com"},PIWI_SMTP_PORT:{description:"SMTP port (default 587; 465 for implicit TLS).",category:"smtp",type:"number",default:"587",min:1,max:65535,relevantWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_USER:{description:"SMTP username.",category:"smtp",relevantWhen:{PIWI_SMTP_HOST:"*"},requiredWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_PASS:{description:"SMTP password. Never returned by the API.",category:"smtp",secret:!0,relevantWhen:{PIWI_SMTP_HOST:"*"},requiredWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_FROM:{description:"From address for outbound email (e.g. noreply@example.com).",category:"smtp",example:"noreply@example.com",relevantWhen:{PIWI_SMTP_HOST:"*"},requiredWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_FROM_NAME:{description:"Display name for the from address (optional).",category:"smtp",default:"Piwi Dashboard",relevantWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_SECURE:{description:'Set to "true" for implicit TLS on port 465 (default false → STARTTLS/plain).',category:"smtp",type:"boolean",relevantWhen:{PIWI_SMTP_HOST:"*"},notes:"Defaults to on when the port is 465, off otherwise."},PIWI_WASTED_WAIT_PATTERNS:{description:"Glob patterns (comma or newline separated) defining which wait steps count as wasted time. Locks the UI when set.",category:"wasted-time",type:"list",default:"Wait for timeout*,*waitForTimeout*",notes:"Case-insensitive globs (`*` and `?`) matched against a wait step’s title or source location. Use `*` to count every wait."},PIWI_DEMO_MODE:{description:'Set to "true" to build the standalone client-side demo SPA (no server).',category:"demo",runtimeOnly:!0,type:"boolean"},PIWI_BASE_URL:{description:"Base URL the metadata test spec targets (defaults to http://localhost:3000).",category:"test",runtimeOnly:!0},PIWI_POSTGRES_TEST_URL:{description:"PostgreSQL connection string used by the Postgres test suite.",category:"test",runtimeOnly:!0,secret:!0},PIWI_S3_TEST_BUCKET:{description:"S3 bucket for the storage integration tests.",category:"test",runtimeOnly:!0},PIWI_S3_TEST_REGION:{description:"Region for the S3 storage integration tests.",category:"test",runtimeOnly:!0},PIWI_S3_TEST_ACCESS_KEY_ID:{description:"Access key id for the S3 storage integration tests.",category:"test",runtimeOnly:!0,secret:!0},PIWI_S3_TEST_SECRET_ACCESS_KEY:{description:"Secret access key for the S3 storage integration tests.",category:"test",runtimeOnly:!0,secret:!0},PIWI_S3_TEST_ENDPOINT:{description:"Custom endpoint for the S3 storage integration tests.",category:"test",runtimeOnly:!0},PIWI_MAILPIT_URL:{description:"Mailpit base URL; when set, the email/notification E2E tests run against it.",category:"test",runtimeOnly:!0},PIWI_MAILPIT_SMTP_PORT:{description:"SMTP port the email E2E tests send to (Mailpit).",category:"test",runtimeOnly:!0},PIWI_EMAIL_SERVER_URL:{description:"Base URL the email test spec targets.",category:"test",runtimeOnly:!0},PIWI_TEST_CLEANUP_ENABLED:{description:"Allow the E2E cleanup endpoint (`DELETE /api/tests/cleanup`) on a production build, which CI needs because it runs the suite against one. Never set it on a real deployment.",category:"test",runtimeOnly:!0,type:"boolean",since:"0.19.0"}};function T(t){return P[t]}function ne(t){return Object.keys(P).filter(a=>P[a].category===t)}const q={key:0,class:"font-medium mb-1"},F={class:"text-muted"},K={key:1,class:"mt-2 space-y-1"},$={class:"text-muted text-xs"},z={class:"flex flex-col gap-1.5"},Q=["title","onClick"],j={class:"block font-mono text-xs bg-elevated rounded px-1.5 py-0.5 select-all cursor-pointer group-hover:ring-1 ring-default"},Z={key:0,class:"block text-muted text-[11px] mt-0.5"},J={key:2,class:"mt-2 flex flex-col gap-1"},ee=W({__name:"HelpHint",props:{topic:{},title:{},text:{},doc:{},envVars:{},size:{}},setup(t){const a=t,{copy:h}=G(),c=o(()=>a.topic?w[a.topic]:null),n=o(()=>a.title??c.value?.title),g=o(()=>a.text??c.value?.text??""),I=o(()=>a.doc??c.value?.doc),d=o(()=>a.envVars??c.value?.envVars),A=U(!1),S=o(()=>n.value?`Help: ${n.value}`:"Help"),b=o(()=>({side:"bottom","aria-label":S.value}));return(te,l)=>{const R=H,f=V,O=L;return r(),m(O,{open:e(A),"onUpdate:open":l[0]||(l[0]=i=>D(A)?A.value=i:null),content:e(b),ui:{content:"max-w-xs p-3 text-sm"}},{content:u(()=>[e(n)?(r(),_("p",q,p(e(n)),1)):s("",!0),E("p",F,p(e(g)),1),e(d)?.length?(r(),_("div",K,[E("p",$,"Environment variable"+p(e(d).length>1?"s":"")+":",1),E("div",z,[(r(!0),_(N,null,k(e(d),i=>(r(),_("button",{key:i,type:"button",class:"group text-left",title:`Click to copy ${i}`,onClick:re=>e(h)(i,{toast:`Copied ${i}`})},[E("code",j,p(i),1),e(T)(i).description?(r(),_("span",Z,p(e(T)(i).description),1)):s("",!0)],8,Q))),128))])])):s("",!0),e(I)||e(d)?.length?(r(),_("div",J,[e(I)?(r(),m(f,{key:0,to:e(I)},{default:u(()=>[...l[1]||(l[1]=[y("Learn more",-1)])]),_:1},8,["to"])):s("",!0),e(d)?.length?(r(),m(f,{key:1,to:"configuration"},{default:u(()=>[...l[2]||(l[2]=[y("Configuration reference",-1)])]),_:1})):s("",!0)])):s("",!0)]),default:u(()=>[C(R,{size:t.size??"xs",variant:"ghost",color:"neutral",icon:"i-lucide-circle-help","aria-label":e(S),title:"What is this?",class:"text-muted hover:text-default align-middle"},null,8,["size","aria-label"])]),_:1},8,["open","content"])}}}),se=Object.assign(ee,{__name:"HelpHint"});export{se as _,V as a,X as d,ne as e,T as g};
1
+ import{d as W,o as r,f as m,x,k as e,g as u,V as M,p as v,v as s,h as o,m as y,K as L,l as D,j as C,c as _,t as p,i as E,F as N,y as k,r as U,_ as H}from"./h49q_GXF.js";import{H as w}from"./BjaRappk.js";import{a as G}from"./Cd8r0xk5.js";const B="https://piwitests.github.io";function X(t){return`${B}/${t.replace(/^\//,"")}`}const Y=W({__name:"DocLink",props:{to:{},noIcon:{type:Boolean}},setup(t){const a=t,h=o(()=>X(a.to));return(c,n)=>{const g=v,I=x;return r(),m(I,{to:e(h),target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 text-primary hover:underline"},{default:u(()=>[M(c.$slots,"default",{},()=>[n[0]||(n[0]=y("Learn more",-1))]),t.noIcon?s("",!0):(r(),m(g,{key:0,name:"i-lucide-external-link",class:"w-3.5 h-3.5 shrink-0"}))]),_:3},8,["to"])}}}),V=Object.assign(Y,{__name:"DocLink"}),P={PIWI_SITE_URL:{description:"Public base URL of the instance (e.g. https://piwi.example.com). Used to build links in emails.",category:"general",type:"url",example:"https://piwi.example.com",notes:"When unset, links in emails point to http://localhost:3000 and OAuth callback URLs are inferred from the request host — set it when running behind a reverse proxy."},PIWI_SECRET_KEY:{description:"Master key for AES-256-GCM encryption of secrets stored in the database (AI API keys, webhook/SCM secrets). Strongly recommended in production.",category:"general",secret:!0,example:"a 64-char random hex string",notes:"Falls back to an insecure built-in development key (with a startup warning in production). Generate one with `node -e \"console.log(require('node:crypto').randomBytes(32).toString('hex'))\"`."},PIWI_BUILD_DIR:{description:"Overrides the Nuxt build output directory. Used by the test harness to isolate parallel builds.",category:"build",runtimeOnly:!0,type:"path"},PIWI_BUILD_SHA:{description:"Commit SHA baked into the build for provenance. Shown on Settings → About. Set as a build-time arg.",category:"build",runtimeOnly:!0},PIWI_DESKTOP_TOKEN:{description:"Per-install access token the desktop (Tauri) app injects to gate its local server. Set automatically by the desktop shell — not user-configurable. Absent on the server build.",category:"desktop",secret:!0,runtimeOnly:!0,since:"0.16.0"},PIWI_DATABASE_PATH:{description:"Path to the SQLite database file (used when PIWI_DATABASE_URL is not set).",category:"database",type:"path",default:".data/piwi.db",relevantWhen:{PIWI_DATABASE_URL:""}},PIWI_DATABASE_URL:{description:"PostgreSQL connection string. When set, PostgreSQL is used instead of SQLite and migrations run automatically on startup.",category:"database",secret:!0,example:"postgres://piwi:piwi@db:5432/piwi",docs:"deployment#docker-compose-with-postgresql"},PIWI_RETENTION_DAYS:{description:"Days of test-run history the nightly retention sweep keeps. Unset or 0 disables automatic run pruning (the default — pruning is opt-in).",category:"database",type:"number",min:0,docs:"storage#data-retention"},PIWI_RETENTION_NOTIFICATION_DAYS:{description:"Days to keep sent/failed notification outbox rows before the nightly sweep prunes them (default 30; 0 keeps them forever).",category:"database",type:"number",default:"30",min:0},PIWI_RETENTION_DIAGNOSIS_VERSIONS:{description:"AI-diagnosis history versions kept per diagnosis by the nightly sweep (default 20; 0 disables capping).",category:"database",type:"number",default:"20",min:0},PIWI_STORAGE_TYPE:{description:'Storage backend for test artifacts (HTML reports, traces, attachments): "local" or "s3".',category:"storage",type:"enum",enum:["local","s3"],default:"local",notes:"Only the exact value `s3` selects S3; any other value falls back to local storage."},PIWI_STORAGE_PATH:{description:'Directory for local file storage (when PIWI_STORAGE_TYPE is "local").',category:"storage",type:"path",default:".data/storage",relevantWhen:{PIWI_STORAGE_TYPE:"local"}},PIWI_S3_BUCKET:{description:'S3 bucket name for artifact storage (when PIWI_STORAGE_TYPE is "s3").',category:"storage",relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"},docs:"storage#s3-compatible-storage"},PIWI_S3_REGION:{description:'S3 bucket region (when PIWI_STORAGE_TYPE is "s3").',category:"storage",example:"us-east-1",relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_ACCESS_KEY_ID:{description:"S3 access key id with write access to the bucket.",category:"storage",secret:!0,relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_SECRET_ACCESS_KEY:{description:"S3 secret access key.",category:"storage",secret:!0,relevantWhen:{PIWI_STORAGE_TYPE:"s3"},requiredWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_ENDPOINT:{description:"Custom endpoint for S3-compatible services (MinIO, R2, Spaces).",category:"storage",type:"url",example:"https://minio.example.com",relevantWhen:{PIWI_STORAGE_TYPE:"s3"}},PIWI_S3_FORCE_PATH_STYLE:{description:"Use path-style addressing (required by some S3-compatible services).",category:"storage",type:"boolean",relevantWhen:{PIWI_STORAGE_TYPE:"s3"},notes:"Defaults to on when a custom endpoint is set, off otherwise; only the exact value `false` turns it off explicitly."},PIWI_AUTH_ENABLED:{description:'Set to "true" to enable role-based access control and API keys. Off by default.',category:"auth",type:"boolean",default:"false"},PIWI_AUTH_SECRET:{description:"Secret used to sign/encrypt session cookies. Required when PIWI_AUTH_ENABLED is true.",category:"auth",secret:!0,relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_AUTH_ENABLED:"true"},notes:"The server refuses to start when auth is enabled and this is unset."},PIWI_OAUTH_GOOGLE_CLIENT_ID:{description:"Google OAuth client id (optional single sign-on).",category:"oauth",relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GOOGLE_CLIENT_SECRET:"*"},docs:"authentication#oauth-google-github"},PIWI_OAUTH_GOOGLE_CLIENT_SECRET:{description:"Google OAuth client secret.",category:"oauth",secret:!0,relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GOOGLE_CLIENT_ID:"*"}},PIWI_OAUTH_GITHUB_CLIENT_ID:{description:"GitHub OAuth client id (optional single sign-on).",category:"oauth",relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GITHUB_CLIENT_SECRET:"*"},docs:"authentication#oauth-google-github"},PIWI_OAUTH_GITHUB_CLIENT_SECRET:{description:"GitHub OAuth client secret.",category:"oauth",secret:!0,relevantWhen:{PIWI_AUTH_ENABLED:"true"},requiredWhen:{PIWI_OAUTH_GITHUB_CLIENT_ID:"*"}},PIWI_OAUTH_ALLOWED_DOMAINS:{description:"Comma-separated verified email domains allowed to sign in via OAuth (all providers).",category:"oauth",type:"list",example:"example.com,corp.example.com",relevantWhen:{PIWI_AUTH_ENABLED:"true"},notes:"Only verified emails in these domains are accepted. Empty means no domain restriction."},PIWI_OAUTH_GITHUB_ALLOWED_ORGS:{description:"Comma-separated GitHub org logins a user must belong to (requests read:org scope).",category:"oauth",type:"list",relevantWhen:{PIWI_OAUTH_GITHUB_CLIENT_ID:"*"}},PIWI_AI_PROVIDER:{description:'AI provider for failure diagnosis: "anthropic" or "openai" (OpenAI-compatible).',category:"ai",type:"enum",enum:["anthropic","openai"]},PIWI_AI_API_KEY:{description:"API key for the diagnosis provider. Takes precedence over the DB-stored key.",category:"ai",secret:!0,relevantWhen:{PIWI_AI_PROVIDER:"*"},requiredWhen:{PIWI_AI_PROVIDER:"anthropic"},notes:"Optional for OpenAI-compatible providers that need no key (e.g. a local model)."},PIWI_AI_MODEL:{description:"Diagnosis model name (default: claude-opus-4-8 for Anthropic).",category:"ai",example:"claude-opus-4-8",relevantWhen:{PIWI_AI_PROVIDER:"*"},requiredWhen:{PIWI_AI_PROVIDER:"openai"}},PIWI_AI_BASE_URL:{description:"Base URL for OpenAI-compatible providers (e.g. http://localhost:11434/v1).",category:"ai",type:"url",example:"http://localhost:11434/v1",relevantWhen:{PIWI_AI_PROVIDER:"*"},requiredWhen:{PIWI_AI_PROVIDER:"openai"}},PIWI_AI_AUTO_DIAGNOSE:{description:'Set to "true" to auto-diagnose new failure clusters when a run finishes.',category:"ai",type:"boolean",default:"false",relevantWhen:{PIWI_AI_PROVIDER:"*"}},PIWI_AI_AUTO_DIAGNOSE_MAX:{description:"Max clusters auto-diagnosed per finished run (budget cap; default 3).",category:"ai",type:"number",default:"3",min:1,relevantWhen:{PIWI_AI_AUTO_DIAGNOSE:"true"}},PIWI_AI_RESEARCH_PROVIDER:{description:"Provider for the optional research (pre-analysis) stage. Falls back to PIWI_AI_PROVIDER.",category:"ai",type:"enum",enum:["anthropic","openai"],relevantWhen:{PIWI_AI_RESEARCH_MODEL:"*"}},PIWI_AI_RESEARCH_MODEL:{description:"Cheaper/faster model for the research stage. Empty disables the two-stage pipeline.",category:"ai",relevantWhen:{PIWI_AI_PROVIDER:"*"}},PIWI_AI_RESEARCH_BASE_URL:{description:"Base URL for the research-stage provider. Falls back to PIWI_AI_BASE_URL.",category:"ai",type:"url",relevantWhen:{PIWI_AI_RESEARCH_MODEL:"*"}},PIWI_AI_RESEARCH_API_KEY:{description:"API key for the research-stage provider. Falls back to PIWI_AI_API_KEY.",category:"ai",secret:!0,relevantWhen:{PIWI_AI_RESEARCH_MODEL:"*"}},PIWI_AI_EMBEDDING_PROVIDER:{description:"Provider for embeddings (semantic failure clustering). Falls back to PIWI_AI_PROVIDER.",category:"ai",type:"enum",enum:["openai"],relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"},notes:'Must resolve to an OpenAI-compatible provider — Anthropic has no embeddings API — so the fallback only helps when the main provider is "openai".'},PIWI_AI_EMBEDDING_MODEL:{description:"Embedding model name (e.g. text-embedding-3-small).",category:"ai",example:"text-embedding-3-small",relevantWhen:{PIWI_AI_PROVIDER:"*"},notes:"Empty disables semantic clustering (and the embedding fallbacks)."},PIWI_AI_EMBEDDING_BASE_URL:{description:"Base URL for the embedding provider. Falls back to PIWI_AI_BASE_URL.",category:"ai",type:"url",relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"}},PIWI_AI_EMBEDDING_API_KEY:{description:"API key for the embedding provider. Falls back to PIWI_AI_API_KEY.",category:"ai",secret:!0,relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"}},PIWI_AI_MAX_SAMPLE_ERROR_CHARS:{description:"Max characters of raw error text (per error block).",category:"ai-limits",type:"number",default:"10000",min:200,max:5e4},PIWI_AI_MAX_SCM_PATCH_BUDGET:{description:"Total characters of diff patches across changed files.",category:"ai-limits",type:"number",default:"15000",min:0,max:5e4},PIWI_AI_MAX_AFFECTED_TESTS:{description:"Max affected tests listed in the diagnosis context.",category:"ai-limits",type:"number",default:"30",min:1,max:200},PIWI_AI_MAX_STEPS:{description:"Max recent test steps included.",category:"ai-limits",type:"number",default:"50",min:1,max:200},PIWI_AI_MAX_CONSOLE_ENTRIES:{description:"Max console error/warning entries included.",category:"ai-limits",type:"number",default:"30",min:0,max:200},PIWI_AI_MAX_CONSOLE_ENTRY_CHARS:{description:"Max characters per console entry.",category:"ai-limits",type:"number",default:"1000",min:50,max:5e3},PIWI_AI_MAX_NETWORK_REQUESTS:{description:"Max failed network requests included.",category:"ai-limits",type:"number",default:"25",min:0,max:200},PIWI_AI_MAX_ARIA_SNAPSHOT_CHARS:{description:"Max characters of the page ARIA snapshot.",category:"ai-limits",type:"number",default:"12000",min:0,max:5e4},PIWI_AI_MAX_TEST_SOURCE_CHARS:{description:"Max characters of the test source snippet.",category:"ai-limits",type:"number",default:"8000",min:0,max:5e4},PIWI_AI_MAX_SOURCE_FILES:{description:"Max full source files fetched from SCM to ground patches (0 disables).",category:"ai-limits",type:"number",default:"4",min:0,max:20},PIWI_AI_MAX_SOURCE_FILE_CHARS:{description:"Max characters per fetched full source file.",category:"ai-limits",type:"number",default:"12000",min:0,max:5e4},PIWI_AI_MAX_SERVER_LOG_ENTRIES:{description:"Max backend server log entries (from X-Piwi-Logs header) included.",category:"ai-limits",type:"number",default:"50",min:0,max:200},PIWI_AI_MAX_SERVER_LOG_ENTRY_CHARS:{description:"Max characters per backend server log entry.",category:"ai-limits",type:"number",default:"1000",min:50,max:5e3},PIWI_AI_MAX_SERVER_TRACE_SPANS:{description:"Max backend server spans (from X-Piwi-Trace header) included in AI diagnosis (0 disables).",category:"ai-limits",type:"number",default:"40",min:0,max:500,since:"0.16.0"},PIWI_AI_MAX_IMAGES:{description:"Max screenshots auto-included in the diagnosis context.",category:"ai-limits",type:"number",default:"5",min:0,max:20},PIWI_AI_MAX_PASSED_PEERS:{description:"Max peer tests in the same file listed when they passed.",category:"ai-limits",type:"number",default:"20",min:0,max:100},PIWI_AI_MAX_CONSOLE_WINDOW:{description:"Max console entries of any type in the window before failure.",category:"ai-limits",type:"number",default:"50",min:0,max:200},PIWI_AI_SLOW_REQUEST_MS:{description:"Network request duration (ms) threshold for flagging as slow.",category:"ai-limits",type:"number",default:"1500",min:100,max:3e4},PIWI_AI_MAX_TRACE_ACTIONS:{description:"Max actions extracted from trace ZIP for failing-action context (0 disables).",category:"ai-limits",type:"number",default:"10",min:0,max:50},PIWI_AI_TRACE_DOM_CHARS:{description:"Max characters for the trace-derived DOM/ARIA excerpt in failing-action context.",category:"ai-limits",type:"number",default:"6000",min:0,max:2e4},PIWI_AI_MAX_TRACE_STACK_FRAMES:{description:"Max call-stack frames (with source windows) from the trace call-stack section (0 disables).",category:"ai-limits",type:"number",default:"10",min:0,max:50},PIWI_AI_MAX_TRACE_NETWORK_REQUESTS:{description:"Max requests included from the trace network stream (0 disables).",category:"ai-limits",type:"number",default:"20",min:0,max:200},PIWI_AI_MAX_DOM_SNAPSHOT_CHARS:{description:"Max characters of the failure-time DOM snapshot rendered from the trace (0 disables).",category:"ai-limits",type:"number",default:"8000",min:0,max:5e4},PIWI_AI_IMAGE_MAX_EDGE:{description:"Screenshots are downscaled to at most this many pixels on the long edge before being sent.",category:"ai-limits",type:"number",default:"1920",min:512,max:8192},PIWI_INGEST_MAX_CONSOLE_ENTRIES:{description:"Max console entries stored per test execution.",category:"ingest",type:"number",default:"200",min:10,max:5e3},PIWI_IMPORT_MAX_BYTES:{description:"Max size of a single multipart upload (report upload or blob-report import), in bytes. Lower it to match a reverse proxy that rejects large bodies, so the import page rejects an oversized archive before uploading it.",category:"ingest",type:"number",default:String(500*1024*1024),min:1024*1024,max:5*1024*1024*1024,since:"0.19.0"},PIWI_EXPORT_MAX_INLINE_BYTES:{description:"Max size of a single evidence file embedded as a data: URI in an HTML export, in bytes. Larger files are left out of the single-file HTML (and listed as omitted); the ZIP export still carries them at full size.",category:"export",type:"number",default:String(8*1024*1024),min:64*1024,max:512*1024*1024,since:"0.19.0"},PIWI_EXPORT_MAX_BYTES:{description:"Max total size of one export, in bytes. Evidence is added largest-last until the budget is reached; the rest is listed as omitted. The archive is built in memory, so this also bounds what a single export costs the server.",category:"export",type:"number",default:String(500*1024*1024),min:1024*1024,max:4*1024*1024*1024,since:"0.19.0"},PIWI_EXPORT_MAX_CASES:{description:"Max member executions carrying full evidence in a failure-cluster export. Remaining affected tests are listed by name without their evidence.",category:"export",type:"number",default:"25",min:1,max:200,since:"0.19.0"},PIWI_INGEST_MAX_CONSOLE_ENTRY_CHARS:{description:"Max characters stored per console entry.",category:"ingest",type:"number",default:"2000",min:200,max:2e4},PIWI_INGEST_MAX_STEPS:{description:"Max test steps stored per execution.",category:"ingest",type:"number",default:"500",min:20,max:5e3},PIWI_INGEST_MAX_STEP_EVENTS:{description:"Max step events stored per execution.",category:"ingest",type:"number",default:"1000",min:20,max:1e4},PIWI_INGEST_MAX_ARIA_CHARS:{description:"Max characters of the ARIA snapshot stored per failing execution.",category:"ingest",type:"number",default:"100000",min:1e3,max:1e6},PIWI_INGEST_MAX_ERROR_CHARS:{description:"Max characters of error text stored per execution (head and tail are kept).",category:"ingest",type:"number",default:"20000",min:1e3,max:1e5},PIWI_INGEST_MAX_SAMPLE_ERROR_CHARS:{description:"Max characters of the sample error stored per failure cluster.",category:"ingest",type:"number",default:"50000",min:1e3,max:2e5},PIWI_INGEST_MAX_TEST_SOURCE_CHARS:{description:"Max characters of the test source snippet stored per failing execution.",category:"ingest",type:"number",default:"50000",min:1e3,max:2e5},PIWI_INGEST_MAX_SOURCE_FRAMES:{description:"Max source stack frames stored per failing execution.",category:"ingest",type:"number",default:"8",min:1,max:32},PIWI_INGEST_MAX_SOURCE_FRAME_CHARS:{description:"Max characters per stored source frame snippet.",category:"ingest",type:"number",default:"4000",min:500,max:2e4},PIWI_AUTO_MARKERS:{description:"Automatically create a timeline marker when a run’s environment, Playwright version, or reporter version changes from the previous run (default: enabled). Set to false to disable.",category:"markers",type:"boolean",default:"true",docs:"timeline-markers",notes:"Only the exact value `false` disables auto-markers."},PIWI_TEST_LOGS_DISABLED:{description:"Disable X-Piwi-Logs response header emission (default: auto-disabled in production, enabled in development).",category:"testing",type:"boolean",docs:"backend-logs",notes:"Unset: capture is on in development and off in production builds; `true` forces it off everywhere, `false` forces it on even in production."},PIWI_CLUSTER_SIMILARITY_THRESHOLD:{description:"Cosine similarity (0–1) above which two failure embeddings merge into one cluster.",category:"clustering",type:"number",default:"0.92",min:0,max:1,relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"},notes:"Must be greater than 0 and at most 1; invalid values fall back to the default."},PIWI_CLUSTER_SUGGEST_THRESHOLD:{description:"Similarity at which a failure is suggested (not auto-merged) as related to a cluster.",category:"clustering",type:"number",default:"0.80",min:0,max:1,relevantWhen:{PIWI_AI_EMBEDDING_MODEL:"*"},notes:"Capped at the merge threshold."},PIWI_SMTP_HOST:{description:"SMTP server hostname for outbound email.",category:"smtp",example:"smtp.example.com"},PIWI_SMTP_PORT:{description:"SMTP port (default 587; 465 for implicit TLS).",category:"smtp",type:"number",default:"587",min:1,max:65535,relevantWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_USER:{description:"SMTP username.",category:"smtp",relevantWhen:{PIWI_SMTP_HOST:"*"},requiredWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_PASS:{description:"SMTP password. Never returned by the API.",category:"smtp",secret:!0,relevantWhen:{PIWI_SMTP_HOST:"*"},requiredWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_FROM:{description:"From address for outbound email (e.g. noreply@example.com).",category:"smtp",example:"noreply@example.com",relevantWhen:{PIWI_SMTP_HOST:"*"},requiredWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_FROM_NAME:{description:"Display name for the from address (optional).",category:"smtp",default:"Piwi Dashboard",relevantWhen:{PIWI_SMTP_HOST:"*"}},PIWI_SMTP_SECURE:{description:'Set to "true" for implicit TLS on port 465 (default false → STARTTLS/plain).',category:"smtp",type:"boolean",relevantWhen:{PIWI_SMTP_HOST:"*"},notes:"Defaults to on when the port is 465, off otherwise."},PIWI_WASTED_WAIT_PATTERNS:{description:"Glob patterns (comma or newline separated) defining which wait steps count as wasted time. Locks the UI when set.",category:"wasted-time",type:"list",default:"Wait for timeout*,*waitForTimeout*",notes:"Case-insensitive globs (`*` and `?`) matched against a wait step’s title or source location. Use `*` to count every wait."},PIWI_DEMO_MODE:{description:'Set to "true" to build the standalone client-side demo SPA (no server).',category:"demo",runtimeOnly:!0,type:"boolean"},PIWI_BASE_URL:{description:"Base URL the metadata test spec targets (defaults to http://localhost:3000).",category:"test",runtimeOnly:!0},PIWI_POSTGRES_TEST_URL:{description:"PostgreSQL connection string used by the Postgres test suite.",category:"test",runtimeOnly:!0,secret:!0},PIWI_S3_TEST_BUCKET:{description:"S3 bucket for the storage integration tests.",category:"test",runtimeOnly:!0},PIWI_S3_TEST_REGION:{description:"Region for the S3 storage integration tests.",category:"test",runtimeOnly:!0},PIWI_S3_TEST_ACCESS_KEY_ID:{description:"Access key id for the S3 storage integration tests.",category:"test",runtimeOnly:!0,secret:!0},PIWI_S3_TEST_SECRET_ACCESS_KEY:{description:"Secret access key for the S3 storage integration tests.",category:"test",runtimeOnly:!0,secret:!0},PIWI_S3_TEST_ENDPOINT:{description:"Custom endpoint for the S3 storage integration tests.",category:"test",runtimeOnly:!0},PIWI_MAILPIT_URL:{description:"Mailpit base URL; when set, the email/notification E2E tests run against it.",category:"test",runtimeOnly:!0},PIWI_MAILPIT_SMTP_PORT:{description:"SMTP port the email E2E tests send to (Mailpit).",category:"test",runtimeOnly:!0},PIWI_EMAIL_SERVER_URL:{description:"Base URL the email test spec targets.",category:"test",runtimeOnly:!0},PIWI_TEST_CLEANUP_ENABLED:{description:"Allow the E2E cleanup endpoint (`DELETE /api/tests/cleanup`) on a production build, which CI needs because it runs the suite against one. Never set it on a real deployment.",category:"test",runtimeOnly:!0,type:"boolean",since:"0.19.0"}};function T(t){return P[t]}function ne(t){return Object.keys(P).filter(a=>P[a].category===t)}const q={key:0,class:"font-medium mb-1"},F={class:"text-muted"},K={key:1,class:"mt-2 space-y-1"},$={class:"text-muted text-xs"},z={class:"flex flex-col gap-1.5"},Q=["title","onClick"],j={class:"block font-mono text-xs bg-elevated rounded px-1.5 py-0.5 select-all cursor-pointer group-hover:ring-1 ring-default"},Z={key:0,class:"block text-muted text-[11px] mt-0.5"},J={key:2,class:"mt-2 flex flex-col gap-1"},ee=W({__name:"HelpHint",props:{topic:{},title:{},text:{},doc:{},envVars:{},size:{}},setup(t){const a=t,{copy:h}=G(),c=o(()=>a.topic?w[a.topic]:null),n=o(()=>a.title??c.value?.title),g=o(()=>a.text??c.value?.text??""),I=o(()=>a.doc??c.value?.doc),d=o(()=>a.envVars??c.value?.envVars),A=U(!1),S=o(()=>n.value?`Help: ${n.value}`:"Help"),b=o(()=>({side:"bottom","aria-label":S.value}));return(te,l)=>{const R=H,f=V,O=L;return r(),m(O,{open:e(A),"onUpdate:open":l[0]||(l[0]=i=>D(A)?A.value=i:null),content:e(b),ui:{content:"max-w-xs p-3 text-sm"}},{content:u(()=>[e(n)?(r(),_("p",q,p(e(n)),1)):s("",!0),E("p",F,p(e(g)),1),e(d)?.length?(r(),_("div",K,[E("p",$,"Environment variable"+p(e(d).length>1?"s":"")+":",1),E("div",z,[(r(!0),_(N,null,k(e(d),i=>(r(),_("button",{key:i,type:"button",class:"group text-left",title:`Click to copy ${i}`,onClick:re=>e(h)(i,{toast:`Copied ${i}`})},[E("code",j,p(i),1),e(T)(i).description?(r(),_("span",Z,p(e(T)(i).description),1)):s("",!0)],8,Q))),128))])])):s("",!0),e(I)||e(d)?.length?(r(),_("div",J,[e(I)?(r(),m(f,{key:0,to:e(I)},{default:u(()=>[...l[1]||(l[1]=[y("Learn more",-1)])]),_:1},8,["to"])):s("",!0),e(d)?.length?(r(),m(f,{key:1,to:"configuration"},{default:u(()=>[...l[2]||(l[2]=[y("Configuration reference",-1)])]),_:1})):s("",!0)])):s("",!0)]),default:u(()=>[C(R,{size:t.size??"xs",variant:"ghost",color:"neutral",icon:"i-lucide-circle-help","aria-label":e(S),title:"What is this?",class:"text-muted hover:text-default align-middle"},null,8,["size","aria-label"])]),_:1},8,["open","content"])}}}),se=Object.assign(ee,{__name:"HelpHint"});export{se as _,V as a,X as d,ne as e,T as g};
@@ -1,5 +1,5 @@
1
- import{_ as me,a as de}from"./CXEH9OPk.js";import{_ as pe,a as fe}from"./5A6ITZXj.js";import{_ as he}from"./CzAPFPpL.js";import{d as H,o as n,c as a,F as B,y as T,i,t as c,k as s,v as g,m as R,f as U,h as x,ay as _e,L as se,r as N,j as $,_ as Y,I as oe,l as Z,s as ee,g as P,q as Q,A as ae,p as xe,e as ye}from"./Du2W7Jne.js";import{_ as ge}from"./CAvY22RE.js";import{_ as be}from"./BrQEE053.js";import{_ as ve}from"./A1pj0VnG.js";import{_ as ke}from"./DsesNydr.js";import{_ as $e}from"./B3obW6cw.js";import{g as we}from"./DuwtTfO8.js";import{_ as Ae}from"./C1gTN4Q8.js";import{u as je}from"./DSqHUrvO.js";import{u as re}from"./BgRu_3tT.js";import{u as Ue}from"./B8zkOmwo.js";import"./KyA_4Ks-.js";import"./UdR3DBPS.js";import"./_mj6CfPa.js";const Ce=["get","post","put","patch","delete","head","options","trace"];function Se(e){switch(e.toLowerCase()){case"get":return"success";case"post":return"info";case"put":case"patch":return"warning";case"delete":return"error";default:return"neutral"}}function Oe(e,t){return`op-${e}-${t}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function qe(e){const t=new Map;for(const[r,o]of Object.entries(e?.paths??{})){if(!o)continue;const u=o.parameters??[];for(const p of Ce){const v=o[p];if(!v)continue;const f=v.tags?.[0]??"Other",y={path:r,method:p,operation:v,parameters:[...u,...v.parameters??[]],tag:f,anchor:Oe(p,r)},A=t.get(f);A?A.push(y):t.set(f,[y])}}return[...t.entries()].map(([r,o])=>({tag:r,operations:o})).sort((r,o)=>r.tag.localeCompare(o.tag))}function ie(e,t){return Array.isArray(e.security)?e.security.length>0:Array.isArray(t?.security)&&t.security.length>0}function Be(e){return Array.isArray(e.security)&&e.security.length===0}function D(e,t){if(!e?.$ref)return e;const r=/^#\/components\/schemas\/(.+)$/.exec(e.$ref);return r?.[1]?t?.components?.schemas?.[r[1]]??e:e}const Re=["administrator","reporter","user"];function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Te(e){const t=e["x-required-roles"];if(!t||t.length===0)return null;const r=Re.every(o=>t.includes(o));return{roles:t,label:r?"Any signed-in user":t.map(ne).join(" or "),shortLabel:r?"Any user":t.map(o=>o==="administrator"?"Admin":ne(o)).join(" / "),elevated:!r&&!t.includes("user")}}function te(e){if(!e)return"any";if(e.$ref)return e.$ref.split("/").pop()??"object";const t=Array.isArray(e.type)?e.type.join(" | "):e.type;if(t==="array"){const r=e.items;return`array<${r?te(r):"any"}>`}return!t&&e.properties||!t&&(e.oneOf||e.anyOf||e.allOf)?"object":t??"any"}const Pe={class:"space-y-2"},Ve={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Le={class:"font-mono text-primary"},ze={class:"text-xs text-muted font-mono"},Ie={key:0,class:"text-xs text-dimmed font-mono"},Ne={key:1,class:"text-xs font-medium text-error"},De={key:0,class:"text-muted mt-0.5"},Ee={key:1,class:"text-xs text-dimmed mt-0.5"},Je={class:"font-mono"},Me=H({__name:"ApiSchema",props:{schema:{},spec:{default:null},depth:{default:0}},setup(e){const t=e,r=x(()=>D(t.schema,t.spec)??t.schema),o=x(()=>{const f=r.value.type==="array"?D(r.value.items,t.spec):r.value,y=f?.properties;if(!y)return[];const A=new Set(f?.required??[]);return Object.entries(y).map(([h,j])=>({name:h,required:A.has(h),schema:D(j,t.spec)??j}))}),u=x(()=>(t.depth??0)<6);function p(f){const y=f.type==="array"?D(f.items,t.spec):f;return!!(y?.properties&&Object.keys(y.properties).length>0)}function v(f){return(f.enum??[]).map(y=>JSON.stringify(y)).join(", ")}return(f,y)=>{const A=le;return n(),a("div",Pe,[(n(!0),a(B,null,T(s(o),h=>(n(),a("div",{key:h.name,class:"text-sm"},[i("div",Ve,[i("code",Le,c(h.name),1),i("span",ze,c(("schemaTypeLabel"in f?f.schemaTypeLabel:s(te))(h.schema)),1),h.schema.format?(n(),a("span",Ie,"("+c(h.schema.format)+")",1)):g("",!0),h.required?(n(),a("span",Ne,"required")):g("",!0)]),h.schema.description?(n(),a("p",De,c(h.schema.description),1)):g("",!0),h.schema.enum?.length?(n(),a("p",Ee,[y[0]||(y[0]=R(" Allowed values: ",-1)),i("span",Je,c(v(h.schema)),1)])):g("",!0),s(u)&&p(h.schema)?(n(),U(A,{key:2,schema:h.schema,spec:e.spec,depth:(e.depth??0)+1,class:"mt-1.5 border-l border-default pl-3"},null,8,["schema","spec","depth"])):g("",!0)]))),128))])}}}),le=Object.assign(Me,{__name:"ApiSchema"});function He(){return{token:_e("piwi-api-token","")}}function We(e,t){return e.replace(/\{([^}]+)\}/g,(r,o)=>{const u=t[o];return u?encodeURIComponent(u):r})}function Fe(e){const t=new URLSearchParams;for(const[o,u]of Object.entries(e))u!==void 0&&u!==""&&t.append(o,u);const r=t.toString();return r?`?${r}`:""}function K(e,t,r=0){const o=D(e,t);if(!o||r>6)return null;if(o.example!==void 0)return o.example;if(o.default!==void 0)return o.default;if(o.enum?.length)return o.enum[0];const u=Array.isArray(o.type)?o.type.find(p=>p!=="null"):o.type;if(u==="object"||!u&&o.properties){const p={};for(const[v,f]of Object.entries(o.properties??{}))p[v]=K(f,t,r+1);return p}if(u==="array")return[K(o.items,t,r+1)];switch(u){case"string":return o.format==="date-time"?"2024-01-01T00:00:00Z":o.format==="date"?"2024-01-01":o.format==="uuid"?"00000000-0000-0000-0000-000000000000":"string";case"integer":case"number":return 0;case"boolean":return!1;default:return null}}function Qe(e,t){const r=e.requestBody?.content?.["application/json"]?.schema;return r?JSON.stringify(K(r,t),null,2):null}function Ge(e){return!!e.requestBody?.content?.["application/json"]}function X(e){return`'${e.replace(/'/g,"'\\''")}'`}function Xe({method:e,url:t,headers:r,body:o}){const u=["curl"];e.toUpperCase()!=="GET"&&u.push("-X",e.toUpperCase());for(const[p,v]of Object.entries(r))u.push("-H",X(`${p}: ${v}`));return o&&u.push("-d",X(o)),u.push(X(t)),u.join(" ")}function Ze({method:e,url:t,headers:r,body:o}){const u=[` method: ${JSON.stringify(e.toUpperCase())},`];return Object.keys(r).length&&u.push(` headers: ${JSON.stringify(r)},`),o&&u.push(` body: ${JSON.stringify(o)},`),`const res = await fetch(${JSON.stringify(t)}, {
1
+ import{_ as me,a as de}from"./C9p0YCAi.js";import{_ as pe,a as fe}from"./B_mN5eMV.js";import{_ as he}from"./DHUT-BKj.js";import{d as H,o as n,c as a,F as B,y as T,i,t as c,k as s,v as g,m as R,f as U,h as x,ay as _e,M as se,r as N,j as $,_ as Y,E as oe,l as Z,s as ee,g as P,q as Q,A as ae,p as xe,e as ye}from"./h49q_GXF.js";import{_ as ge}from"./CWw9WGlv.js";import{_ as be}from"./9N6hSApy.js";import{_ as ve}from"./DDN2tt0a.js";import{_ as ke}from"./CScusXhF.js";import{_ as $e}from"./Dj-TetcW.js";import{e as we}from"./CD3R-ggS.js";import{_ as Ae}from"./BVN50jIb.js";import{a as je,u as Ue}from"./Cd8r0xk5.js";import{u as re}from"./BDQCwxpX.js";import"./BhH0TNTi.js";import"./xbO0VmDX.js";import"./BaDhDBCV.js";const Se=["get","post","put","patch","delete","head","options","trace"];function Ce(e){switch(e.toLowerCase()){case"get":return"success";case"post":return"info";case"put":case"patch":return"warning";case"delete":return"error";default:return"neutral"}}function Oe(e,t){return`op-${e}-${t}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function qe(e){const t=new Map;for(const[r,o]of Object.entries(e?.paths??{})){if(!o)continue;const u=o.parameters??[];for(const p of Se){const v=o[p];if(!v)continue;const f=v.tags?.[0]??"Other",y={path:r,method:p,operation:v,parameters:[...u,...v.parameters??[]],tag:f,anchor:Oe(p,r)},A=t.get(f);A?A.push(y):t.set(f,[y])}}return[...t.entries()].map(([r,o])=>({tag:r,operations:o})).sort((r,o)=>r.tag.localeCompare(o.tag))}function ie(e,t){return Array.isArray(e.security)?e.security.length>0:Array.isArray(t?.security)&&t.security.length>0}function Be(e){return Array.isArray(e.security)&&e.security.length===0}function D(e,t){if(!e?.$ref)return e;const r=/^#\/components\/schemas\/(.+)$/.exec(e.$ref);return r?.[1]?t?.components?.schemas?.[r[1]]??e:e}const Re=["administrator","reporter","user"];function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Te(e){const t=e["x-required-roles"];if(!t||t.length===0)return null;const r=Re.every(o=>t.includes(o));return{roles:t,label:r?"Any signed-in user":t.map(ne).join(" or "),shortLabel:r?"Any user":t.map(o=>o==="administrator"?"Admin":ne(o)).join(" / "),elevated:!r&&!t.includes("user")}}function te(e){if(!e)return"any";if(e.$ref)return e.$ref.split("/").pop()??"object";const t=Array.isArray(e.type)?e.type.join(" | "):e.type;if(t==="array"){const r=e.items;return`array<${r?te(r):"any"}>`}return!t&&e.properties||!t&&(e.oneOf||e.anyOf||e.allOf)?"object":t??"any"}const Pe={class:"space-y-2"},Ve={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Le={class:"font-mono text-primary"},ze={class:"text-xs text-muted font-mono"},Ie={key:0,class:"text-xs text-dimmed font-mono"},Ne={key:1,class:"text-xs font-medium text-error"},De={key:0,class:"text-muted mt-0.5"},Ee={key:1,class:"text-xs text-dimmed mt-0.5"},Je={class:"font-mono"},Me=H({__name:"ApiSchema",props:{schema:{},spec:{default:null},depth:{default:0}},setup(e){const t=e,r=x(()=>D(t.schema,t.spec)??t.schema),o=x(()=>{const f=r.value.type==="array"?D(r.value.items,t.spec):r.value,y=f?.properties;if(!y)return[];const A=new Set(f?.required??[]);return Object.entries(y).map(([h,j])=>({name:h,required:A.has(h),schema:D(j,t.spec)??j}))}),u=x(()=>(t.depth??0)<6);function p(f){const y=f.type==="array"?D(f.items,t.spec):f;return!!(y?.properties&&Object.keys(y.properties).length>0)}function v(f){return(f.enum??[]).map(y=>JSON.stringify(y)).join(", ")}return(f,y)=>{const A=le;return n(),a("div",Pe,[(n(!0),a(B,null,T(s(o),h=>(n(),a("div",{key:h.name,class:"text-sm"},[i("div",Ve,[i("code",Le,c(h.name),1),i("span",ze,c(("schemaTypeLabel"in f?f.schemaTypeLabel:s(te))(h.schema)),1),h.schema.format?(n(),a("span",Ie,"("+c(h.schema.format)+")",1)):g("",!0),h.required?(n(),a("span",Ne,"required")):g("",!0)]),h.schema.description?(n(),a("p",De,c(h.schema.description),1)):g("",!0),h.schema.enum?.length?(n(),a("p",Ee,[y[0]||(y[0]=R(" Allowed values: ",-1)),i("span",Je,c(v(h.schema)),1)])):g("",!0),s(u)&&p(h.schema)?(n(),U(A,{key:2,schema:h.schema,spec:e.spec,depth:(e.depth??0)+1,class:"mt-1.5 border-l border-default pl-3"},null,8,["schema","spec","depth"])):g("",!0)]))),128))])}}}),le=Object.assign(Me,{__name:"ApiSchema"});function He(){return{token:_e("piwi-api-token","")}}function We(e,t){return e.replace(/\{([^}]+)\}/g,(r,o)=>{const u=t[o];return u?encodeURIComponent(u):r})}function Fe(e){const t=new URLSearchParams;for(const[o,u]of Object.entries(e))u!==void 0&&u!==""&&t.append(o,u);const r=t.toString();return r?`?${r}`:""}function K(e,t,r=0){const o=D(e,t);if(!o||r>6)return null;if(o.example!==void 0)return o.example;if(o.default!==void 0)return o.default;if(o.enum?.length)return o.enum[0];const u=Array.isArray(o.type)?o.type.find(p=>p!=="null"):o.type;if(u==="object"||!u&&o.properties){const p={};for(const[v,f]of Object.entries(o.properties??{}))p[v]=K(f,t,r+1);return p}if(u==="array")return[K(o.items,t,r+1)];switch(u){case"string":return o.format==="date-time"?"2024-01-01T00:00:00Z":o.format==="date"?"2024-01-01":o.format==="uuid"?"00000000-0000-0000-0000-000000000000":"string";case"integer":case"number":return 0;case"boolean":return!1;default:return null}}function Qe(e,t){const r=e.requestBody?.content?.["application/json"]?.schema;return r?JSON.stringify(K(r,t),null,2):null}function Ge(e){return!!e.requestBody?.content?.["application/json"]}function X(e){return`'${e.replace(/'/g,"'\\''")}'`}function Xe({method:e,url:t,headers:r,body:o}){const u=["curl"];e.toUpperCase()!=="GET"&&u.push("-X",e.toUpperCase());for(const[p,v]of Object.entries(r))u.push("-H",X(`${p}: ${v}`));return o&&u.push("-d",X(o)),u.push(X(t)),u.join(" ")}function Ze({method:e,url:t,headers:r,body:o}){const u=[` method: ${JSON.stringify(e.toUpperCase())},`];return Object.keys(r).length&&u.push(` headers: ${JSON.stringify(r)},`),o&&u.push(` body: ${JSON.stringify(o)},`),`const res = await fetch(${JSON.stringify(t)}, {
2
2
  ${u.join(`
3
3
  `)}
4
4
  });
5
- const data = await res.json();`}const Ke={class:"rounded-lg border border-default bg-default/50 p-3 space-y-3"},Ye={class:"flex items-center justify-between gap-2"},et={key:0,class:"space-y-1"},tt={key:1,class:"space-y-1.5"},st=["title"],nt={key:2,class:"space-y-1.5"},ot=["title"],at={key:3,class:"space-y-1"},rt={key:4,class:"text-xs text-dimmed"},it={key:5,class:"space-y-1.5"},lt={class:"flex items-center gap-2 text-xs"},ct={class:"text-dimmed"},ut={class:"max-h-80 overflow-auto"},mt={key:6,class:"text-xs text-error"},dt={class:"space-y-1.5"},pt={class:"flex gap-1"},ft=H({__name:"ApiTryIt",props:{item:{},spec:{}},setup(e){const t=e,r=ae(),o=r.public.demoMode,u=(r.app?.baseURL??"/").replace(/\/$/,""),{token:p}=He(),v=x(()=>ie(t.item.operation,t.spec)),f=x(()=>t.item.parameters.filter(O=>O.in==="path")),y=x(()=>t.item.parameters.filter(O=>O.in==="query")),A=se(Object.fromEntries(f.value.map(O=>[O.name,""]))),h=se(Object.fromEntries(y.value.map(O=>[O.name,""]))),j=x(()=>Ge(t.item.operation)),C=x(()=>!!t.item.operation.requestBody?.content?.["multipart/form-data"]&&!j.value),w=N(Qe(t.item.operation,t.spec)??""),l=x(()=>j.value&&w.value.trim()?w.value:void 0),d=x(()=>u+We(t.item.path,A)+Fe(h)),S=x(()=>{const O={};return l.value&&(O["Content-Type"]="application/json"),v.value&&p.value&&(O.Authorization=`Bearer ${p.value}`),O}),q=x(()=>window.location.origin+d.value),L=x(()=>Xe({method:t.item.method,url:q.value,headers:S.value,body:l.value})),I=x(()=>Ze({method:t.item.method,url:q.value,headers:S.value,body:l.value})),_=N("curl"),m=N(!1),V=N(null),z=N(null);async function ce(){m.value=!0,V.value=null,z.value=null;const O=performance.now();try{const b={...S.value};o&&(b["x-demo-user-id"]=localStorage.getItem("piwi-demo-user-id")||"1");const E=await fetch(d.value,{method:t.item.method.toUpperCase(),headers:b,body:l.value,credentials:"same-origin"}),J=Math.round(performance.now()-O),W=await E.text();let F=W;try{F=JSON.stringify(JSON.parse(W),null,2)}catch{}z.value={status:E.status,statusText:E.statusText,ok:E.ok,timeMs:J,body:F}}catch(b){V.value=we(b)}finally{m.value=!1}}return(O,b)=>{const E=Y,J=oe,W=ve,F=ke,ue=ee,G=$e;return n(),a("div",Ke,[i("div",Ye,[b[4]||(b[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Try it out",-1)),$(E,{size:"xs",color:"primary",icon:"i-lucide-play",loading:s(m),label:"Send",onClick:ce},null,8,["loading"])]),s(v)?(n(),a("div",et,[b[5]||(b[5]=i("label",{class:"text-xs text-dimmed"},"Authorization — Bearer token",-1)),$(J,{modelValue:s(p),"onUpdate:modelValue":b[0]||(b[0]=k=>Z(p)?p.value=k:null),type:"password",placeholder:"pd_…",size:"sm",class:"w-full",ui:{base:"font-mono"}},null,8,["modelValue"])])):g("",!0),s(f).length?(n(),a("div",tt,[b[6]||(b[6]=i("label",{class:"text-xs text-dimmed"},"Path parameters",-1)),(n(!0),a(B,null,T(s(f),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,st),$(J,{modelValue:s(A)[k.name],"onUpdate:modelValue":M=>s(A)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))])):g("",!0),s(y).length?(n(),a("div",nt,[b[7]||(b[7]=i("label",{class:"text-xs text-dimmed"},"Query parameters",-1)),(n(!0),a(B,null,T(s(y),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,ot),k.schema?.enum?.length?(n(),U(W,{key:0,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,items:["",...k.schema.enum.map(String)],size:"sm",class:"flex-1"},null,8,["modelValue","onUpdate:modelValue","items"])):(n(),U(J,{key:1,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"]))]))),128))])):g("",!0),s(j)?(n(),a("div",at,[b[8]||(b[8]=i("label",{class:"text-xs text-dimmed"},"Request body — application/json",-1)),$(F,{modelValue:s(w),"onUpdate:modelValue":b[1]||(b[1]=k=>Z(w)?w.value=k:null),rows:6,class:"w-full",ui:{base:"font-mono text-xs"}},null,8,["modelValue"])])):s(C)?(n(),a("p",rt,[...b[9]||(b[9]=[R(" This endpoint expects ",-1),i("code",{class:"font-mono"},"multipart/form-data",-1),R(" (file upload) — use the cURL sample below as a starting point. ",-1)])])):g("",!0),s(z)?(n(),a("div",it,[i("div",lt,[$(ue,{color:s(z).ok?"success":"error",variant:"subtle",class:"font-mono"},{default:P(()=>[R(c(s(z).status)+" "+c(s(z).statusText),1)]),_:1},8,["color"]),i("span",ct,c(s(z).timeMs)+" ms",1)]),i("div",ut,[$(G,{code:s(z).body,lang:"json"},null,8,["code"])])])):s(V)?(n(),a("p",mt,"Request failed: "+c(s(V)),1)):g("",!0),i("div",dt,[i("div",pt,[i("button",{type:"button",class:Q(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="curl"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[2]||(b[2]=k=>_.value="curl")}," cURL ",2),i("button",{type:"button",class:Q(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="fetch"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[3]||(b[3]=k=>_.value="fetch")}," JavaScript ",2)]),s(_)==="curl"?(n(),U(G,{key:0,code:s(L),lang:"bash"},null,8,["code"])):(n(),U(G,{key:1,code:s(I),lang:"javascript"},null,8,["code"]))])])}}}),ht=Object.assign(ft,{__name:"ApiTryIt"}),_t=["id"],xt=["aria-expanded"],yt={class:"font-mono text-sm text-highlighted break-all"},gt={class:"text-sm text-muted truncate hidden sm:inline flex-1"},bt={key:0,class:"px-3 pb-3 pt-1 space-y-4 border-t border-default"},vt={key:0,class:"text-sm font-medium text-highlighted sm:hidden"},kt={key:1,class:"text-sm text-muted"},$t={key:2,class:"flex items-center gap-1.5 text-xs"},wt={class:"text-muted font-medium"},At={key:0,class:"space-y-1.5"},jt={class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},Ut={class:"space-y-2"},Ct={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},St={class:"font-mono text-primary"},Ot={class:"text-xs text-muted font-mono"},qt={key:0,class:"text-xs font-medium text-error"},Bt={key:0,class:"text-muted mt-0.5"},Rt={key:1,class:"text-xs text-dimmed mt-0.5"},Tt={class:"font-mono"},Pt={key:3,class:"space-y-1.5"},Vt={class:"text-xs text-dimmed font-mono"},Lt={key:4,class:"space-y-1.5"},zt={class:"flex items-baseline gap-2"},It={class:"text-muted"},Nt={class:"text-xs text-dimmed font-mono"},Dt=H({__name:"ApiOperation",props:{item:{},spec:{}},setup(e){const t=e,r=N(!1),o=x(()=>ie(t.item.operation,t.spec)),u=x(()=>Be(t.item.operation)),p=x(()=>Te(t.item.operation)),v=x(()=>u.value?"Public — no authentication required":p.value?p.value.label:o.value?"Requires authentication":null),f=x(()=>t.item.parameters.filter(l=>l.in==="path")),y=x(()=>t.item.parameters.filter(l=>l.in==="query")),A=x(()=>t.item.parameters.filter(l=>l.in==="header")),h=x(()=>Object.entries(t.item.operation.requestBody?.content??{}).map(([l,d])=>({contentType:l,schema:D(d.schema,t.spec)}))),j=x(()=>Object.entries(t.item.operation.responses??{}).map(([l,d])=>({status:l,description:d.description,entries:Object.entries(d.content??{}).map(([S,q])=>({contentType:S,schema:D(q.schema,t.spec)}))}))),C=x(()=>t.item.path.split(/(\{[^}]+\})/g).map(l=>({text:l,isParam:l.startsWith("{")})));function w(l){return l.startsWith("2")?"text-success":l.startsWith("3")?"text-info":l.startsWith("4")?"text-warning":l.startsWith("5")?"text-error":"text-muted"}return(l,d)=>{const S=ee,q=xe,L=le,I=ht;return n(),a("div",{id:e.item.anchor,class:"border border-default rounded-lg bg-elevated/20 scroll-mt-20"},[i("button",{type:"button",class:"w-full flex items-center gap-3 px-3 py-2.5 text-left cursor-pointer","aria-expanded":s(r),onClick:d[0]||(d[0]=_=>r.value=!s(r))},[$(S,{color:("methodBadgeColor"in l?l.methodBadgeColor:s(Se))(e.item.method),variant:"subtle",class:"font-mono uppercase shrink-0 w-16 justify-center"},{default:P(()=>[R(c(e.item.method),1)]),_:1},8,["color"]),i("code",yt,[(n(!0),a(B,null,T(s(C),(_,m)=>(n(),a("span",{key:m,class:Q(_.isParam?"text-warning":"")},c(_.text),3))),128))]),i("span",gt,c(e.item.operation.summary),1),s(p)?.elevated?(n(),U(S,{key:0,color:"warning",variant:"subtle",size:"sm",icon:"i-lucide-shield",class:"shrink-0 ml-auto sm:ml-0",title:`Requires role: ${s(p).label}`},{default:P(()=>[R(c(s(p).shortLabel),1)]),_:1},8,["title"])):s(u)?(n(),U(S,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"shrink-0 ml-auto sm:ml-0"},{default:P(()=>[...d[1]||(d[1]=[R(" Public ",-1)])]),_:1})):s(o)?(n(),U(q,{key:2,name:"i-lucide-lock",class:"size-3.5 text-dimmed shrink-0 ml-auto sm:ml-0",title:"Requires authentication"})):g("",!0),$(q,{name:s(r)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-4 text-dimmed shrink-0"},null,8,["name"])],8,xt),s(r)?(n(),a("div",bt,[e.item.operation.summary?(n(),a("p",vt,c(e.item.operation.summary),1)):g("",!0),e.item.operation.description?(n(),a("p",kt,c(e.item.operation.description),1)):g("",!0),s(v)?(n(),a("div",$t,[$(q,{name:s(p)?.elevated?"i-lucide-shield":"i-lucide-users",class:"size-3.5 text-dimmed shrink-0"},null,8,["name"]),d[2]||(d[2]=i("span",{class:"text-dimmed"},"Access",-1)),i("span",wt,c(s(v)),1)])):g("",!0),(n(!0),a(B,null,T([{label:"Path parameters",params:s(f)},{label:"Query parameters",params:s(y)},{label:"Header parameters",params:s(A)}],_=>(n(),a(B,{key:_.label},[_.params.length?(n(),a("div",At,[i("h4",jt,c(_.label),1),i("div",Ut,[(n(!0),a(B,null,T(_.params,m=>(n(),a("div",{key:m.name,class:"text-sm"},[i("div",Ct,[i("code",St,c(m.name),1),i("span",Ot,c(("schemaTypeLabel"in l?l.schemaTypeLabel:s(te))(m.schema)),1),m.required?(n(),a("span",qt,"required")):g("",!0)]),m.description?(n(),a("p",Bt,c(m.description),1)):g("",!0),m.schema?.enum?.length?(n(),a("p",Rt,[d[3]||(d[3]=R(" Allowed values: ",-1)),i("span",Tt,c(m.schema.enum.map(V=>JSON.stringify(V)).join(", ")),1)])):g("",!0)]))),128))])])):g("",!0)],64))),128)),s(h).length?(n(),a("div",Pt,[d[4]||(d[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Request body",-1)),(n(!0),a(B,null,T(s(h),_=>(n(),a("div",{key:_.contentType,class:"space-y-1.5"},[i("code",Vt,c(_.contentType),1),_.schema?(n(),U(L,{key:0,schema:_.schema,spec:e.spec},null,8,["schema","spec"])):g("",!0)]))),128))])):g("",!0),s(j).length?(n(),a("div",Lt,[d[5]||(d[5]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Responses",-1)),(n(!0),a(B,null,T(s(j),_=>(n(),a("div",{key:_.status,class:"text-sm"},[i("div",zt,[i("code",{class:Q(["font-mono font-semibold",w(_.status)])},c(_.status),3),i("span",It,c(_.description),1)]),(n(!0),a(B,null,T(_.entries,m=>(n(),a("div",{key:m.contentType,class:"mt-1 pl-3 border-l border-default"},[i("code",Nt,c(m.contentType),1),m.schema?(n(),U(L,{key:0,schema:m.schema,spec:e.spec,class:"mt-1"},null,8,["schema","spec"])):g("",!0)]))),128))]))),128))])):g("",!0),$(I,{item:e.item,spec:e.spec},null,8,["item","spec"])])):g("",!0)],8,_t)}}}),Et=Object.assign(Dt,{__name:"ApiOperation"}),Jt={class:"max-w-4xl mx-auto px-4 sm:px-6 py-6 space-y-6"},Mt={class:"space-y-3"},Ht={class:"flex flex-wrap items-center gap-2"},Wt={class:"text-xl font-semibold text-highlighted"},Ft={key:0,class:"text-sm text-muted"},Qt={key:1,class:"flex items-center gap-2 text-sm"},Gt={class:"flex flex-wrap items-center gap-2"},Xt={class:"text-xs text-dimmed"},Zt={key:0,class:"flex flex-wrap gap-1.5"},Kt=["href"],Yt={class:"text-dimmed"},es={key:1,class:"space-y-8"},ts=["id"],ss={class:"text-sm font-semibold uppercase tracking-wide text-dimmed"},ns={class:"text-dimmed/60"},os=H({__name:"ApiReference",props:{spec:{},specUrl:{}},setup(e){const t=e,{copy:r,copied:o}=je(),{isDesktop:u,download:p}=re(),v=N("");function f(w){u&&(w.preventDefault(),p(t.specUrl,"piwi-openapi.json"))}const y=x(()=>qe(t.spec)),A=x(()=>y.value.reduce((w,l)=>w+l.operations.length,0)),h=x(()=>{const w=v.value.trim().toLowerCase();return w?y.value.map(l=>({tag:l.tag,operations:l.operations.filter(d=>`${d.method} ${d.path} ${d.operation.summary??""} ${d.operation.description??""} ${d.tag}`.toLowerCase().includes(w))})).filter(l=>l.operations.length>0):y.value}),j=x(()=>t.spec.servers?.[0]?.url??"");function C(w){return`tag-${w.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`}return(w,l)=>{const d=ee,S=Y,q=be,L=oe,I=Et,_=Ae;return n(),a("div",Jt,[i("header",Mt,[i("div",Ht,[i("h1",Wt,c(e.spec.info?.title??"API Reference"),1),e.spec.info?.version?(n(),U(d,{key:0,color:"neutral",variant:"subtle",class:"font-mono"},{default:P(()=>[R(" v"+c(e.spec.info.version),1)]),_:1})):g("",!0)]),e.spec.info?.description?(n(),a("p",Ft,c(e.spec.info.description),1)):g("",!0),s(j)?(n(),a("div",Qt,[l[2]||(l[2]=i("span",{class:"text-dimmed"},"Base URL",-1)),$(S,{label:s(j),color:"neutral",variant:"subtle",size:"xs",icon:s(o)?"i-lucide-check":"i-lucide-copy",class:"font-mono",onClick:l[0]||(l[0]=m=>s(r)(s(j),{toast:!0}))},null,8,["label","icon"])])):g("",!0),i("div",Gt,[$(S,{to:e.specUrl,target:"_blank",external:"",color:"neutral",variant:"outline",size:"xs",icon:"i-lucide-file-json",label:"Raw OpenAPI spec",onClick:f},null,8,["to"]),i("span",Xt,c(s(A))+" endpoints",1)]),$(q,{color:"info",variant:"subtle",icon:"i-lucide-terminal",title:"Windows users",description:"curl examples below use Unix syntax — run them in Git Bash / WSL, or use PowerShell's Invoke-RestMethod instead."})]),$(L,{modelValue:s(v),"onUpdate:modelValue":l[1]||(l[1]=m=>Z(v)?v.value=m:null),icon:"i-lucide-search",placeholder:"Filter endpoints by path, method, or description…",size:"md",class:"w-full",ui:{root:"sticky top-0 z-10"}},null,8,["modelValue"]),!s(v)&&s(y).length>1?(n(),a("div",Zt,[(n(!0),a(B,null,T(s(y),m=>(n(),a("a",{key:m.tag,href:`#${C(m.tag)}`,class:"text-xs px-2 py-1 rounded-md bg-elevated text-muted hover:text-highlighted hover:bg-accented transition-colors"},[R(c(m.tag)+" ",1),i("span",Yt,c(m.operations.length),1)],8,Kt))),128))])):g("",!0),s(h).length?(n(),a("div",es,[(n(!0),a(B,null,T(s(h),m=>(n(),a("section",{key:m.tag,id:C(m.tag),class:"space-y-2 scroll-mt-4"},[i("h2",ss,[R(c(m.tag)+" ",1),i("span",ns,"("+c(m.operations.length)+")",1)]),(n(!0),a(B,null,T(m.operations,V=>(n(),U(I,{key:V.anchor,item:V,spec:e.spec},null,8,["item","spec"]))),128))],8,ts))),128))])):(n(),U(_,{key:2,icon:"i-lucide-search-x",text:"No endpoints match your filter."}))])}}}),as=Object.assign(os,{__name:"ApiReference"}),rs={key:1,class:"p-6"},is={class:"flex flex-wrap justify-center gap-2 mt-1"},As=H({__name:"docs",setup(e){const r=ae().public.demoMode,o=r?"/demo/_openapi.json":"/_openapi.json",{isDesktop:u,download:p}=re();function v(j){u&&(j.preventDefault(),p(o,"piwi-openapi.json"))}ye({title:"API Reference — Piwi Dashboard"});const{data:f,status:y,error:A,refresh:h}=Ue(o,{key:"openapi-spec",lazy:!0,server:!r},"$jVU__ibpQM");return(j,C)=>{const w=me,l=de,d=fe,S=he,q=Y,L=ge,I=as,_=pe;return n(),U(_,{id:"docs"},{header:P(()=>[$(d,null,{leading:P(()=>[$(w),$(l,{items:[{label:"API Reference",icon:"i-lucide-book-open"}]})]),_:1})]),body:P(()=>[s(y)==="pending"||!s(f)&&!s(A)?(n(),U(S,{key:0,text:"Loading API reference…"})):s(A)||!s(f)?(n(),a("div",rs,[$(L,{text:"Couldn't load the API reference UI."},{action:P(()=>[C[3]||(C[3]=i("p",{class:"text-sm text-muted max-w-sm"},"The raw OpenAPI spec is still available directly.",-1)),i("div",is,[$(q,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:C[0]||(C[0]=()=>s(h)())},{default:P(()=>[...C[1]||(C[1]=[R(" Retry ",-1)])]),_:1}),$(q,{to:s(o),target:"_blank",external:"",size:"sm",variant:"outline",icon:"i-lucide-file-json",onClick:v},{default:P(()=>[...C[2]||(C[2]=[R(" Raw OpenAPI spec ",-1)])]),_:1},8,["to"])])]),_:1})])):(n(),U(I,{key:2,spec:s(f),"spec-url":s(o)},null,8,["spec","spec-url"]))]),_:1})}}});export{As as default};
5
+ const data = await res.json();`}const Ke={class:"rounded-lg border border-default bg-default/50 p-3 space-y-3"},Ye={class:"flex items-center justify-between gap-2"},et={key:0,class:"space-y-1"},tt={key:1,class:"space-y-1.5"},st=["title"],nt={key:2,class:"space-y-1.5"},ot=["title"],at={key:3,class:"space-y-1"},rt={key:4,class:"text-xs text-dimmed"},it={key:5,class:"space-y-1.5"},lt={class:"flex items-center gap-2 text-xs"},ct={class:"text-dimmed"},ut={class:"max-h-80 overflow-auto"},mt={key:6,class:"text-xs text-error"},dt={class:"space-y-1.5"},pt={class:"flex gap-1"},ft=H({__name:"ApiTryIt",props:{item:{},spec:{}},setup(e){const t=e,r=ae(),o=r.public.demoMode,u=(r.app?.baseURL??"/").replace(/\/$/,""),{token:p}=He(),v=x(()=>ie(t.item.operation,t.spec)),f=x(()=>t.item.parameters.filter(O=>O.in==="path")),y=x(()=>t.item.parameters.filter(O=>O.in==="query")),A=se(Object.fromEntries(f.value.map(O=>[O.name,""]))),h=se(Object.fromEntries(y.value.map(O=>[O.name,""]))),j=x(()=>Ge(t.item.operation)),S=x(()=>!!t.item.operation.requestBody?.content?.["multipart/form-data"]&&!j.value),w=N(Qe(t.item.operation,t.spec)??""),l=x(()=>j.value&&w.value.trim()?w.value:void 0),d=x(()=>u+We(t.item.path,A)+Fe(h)),C=x(()=>{const O={};return l.value&&(O["Content-Type"]="application/json"),v.value&&p.value&&(O.Authorization=`Bearer ${p.value}`),O}),q=x(()=>window.location.origin+d.value),L=x(()=>Xe({method:t.item.method,url:q.value,headers:C.value,body:l.value})),I=x(()=>Ze({method:t.item.method,url:q.value,headers:C.value,body:l.value})),_=N("curl"),m=N(!1),V=N(null),z=N(null);async function ce(){m.value=!0,V.value=null,z.value=null;const O=performance.now();try{const b={...C.value};o&&(b["x-demo-user-id"]=localStorage.getItem("piwi-demo-user-id")||"1");const E=await fetch(d.value,{method:t.item.method.toUpperCase(),headers:b,body:l.value,credentials:"same-origin"}),J=Math.round(performance.now()-O),W=await E.text();let F=W;try{F=JSON.stringify(JSON.parse(W),null,2)}catch{}z.value={status:E.status,statusText:E.statusText,ok:E.ok,timeMs:J,body:F}}catch(b){V.value=we(b)}finally{m.value=!1}}return(O,b)=>{const E=Y,J=oe,W=ve,F=ke,ue=ee,G=$e;return n(),a("div",Ke,[i("div",Ye,[b[4]||(b[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Try it out",-1)),$(E,{size:"xs",color:"primary",icon:"i-lucide-play",loading:s(m),label:"Send",onClick:ce},null,8,["loading"])]),s(v)?(n(),a("div",et,[b[5]||(b[5]=i("label",{class:"text-xs text-dimmed"},"Authorization — Bearer token",-1)),$(J,{modelValue:s(p),"onUpdate:modelValue":b[0]||(b[0]=k=>Z(p)?p.value=k:null),type:"password",placeholder:"pd_…",size:"sm",class:"w-full",ui:{base:"font-mono"}},null,8,["modelValue"])])):g("",!0),s(f).length?(n(),a("div",tt,[b[6]||(b[6]=i("label",{class:"text-xs text-dimmed"},"Path parameters",-1)),(n(!0),a(B,null,T(s(f),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,st),$(J,{modelValue:s(A)[k.name],"onUpdate:modelValue":M=>s(A)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))])):g("",!0),s(y).length?(n(),a("div",nt,[b[7]||(b[7]=i("label",{class:"text-xs text-dimmed"},"Query parameters",-1)),(n(!0),a(B,null,T(s(y),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,ot),k.schema?.enum?.length?(n(),U(W,{key:0,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,items:["",...k.schema.enum.map(String)],size:"sm",class:"flex-1"},null,8,["modelValue","onUpdate:modelValue","items"])):(n(),U(J,{key:1,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"]))]))),128))])):g("",!0),s(j)?(n(),a("div",at,[b[8]||(b[8]=i("label",{class:"text-xs text-dimmed"},"Request body — application/json",-1)),$(F,{modelValue:s(w),"onUpdate:modelValue":b[1]||(b[1]=k=>Z(w)?w.value=k:null),rows:6,class:"w-full",ui:{base:"font-mono text-xs"}},null,8,["modelValue"])])):s(S)?(n(),a("p",rt,[...b[9]||(b[9]=[R(" This endpoint expects ",-1),i("code",{class:"font-mono"},"multipart/form-data",-1),R(" (file upload) — use the cURL sample below as a starting point. ",-1)])])):g("",!0),s(z)?(n(),a("div",it,[i("div",lt,[$(ue,{color:s(z).ok?"success":"error",variant:"subtle",class:"font-mono"},{default:P(()=>[R(c(s(z).status)+" "+c(s(z).statusText),1)]),_:1},8,["color"]),i("span",ct,c(s(z).timeMs)+" ms",1)]),i("div",ut,[$(G,{code:s(z).body,lang:"json"},null,8,["code"])])])):s(V)?(n(),a("p",mt,"Request failed: "+c(s(V)),1)):g("",!0),i("div",dt,[i("div",pt,[i("button",{type:"button",class:Q(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="curl"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[2]||(b[2]=k=>_.value="curl")}," cURL ",2),i("button",{type:"button",class:Q(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="fetch"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[3]||(b[3]=k=>_.value="fetch")}," JavaScript ",2)]),s(_)==="curl"?(n(),U(G,{key:0,code:s(L),lang:"bash"},null,8,["code"])):(n(),U(G,{key:1,code:s(I),lang:"javascript"},null,8,["code"]))])])}}}),ht=Object.assign(ft,{__name:"ApiTryIt"}),_t=["id"],xt=["aria-expanded"],yt={class:"font-mono text-sm text-highlighted break-all"},gt={class:"text-sm text-muted truncate hidden sm:inline flex-1"},bt={key:0,class:"px-3 pb-3 pt-1 space-y-4 border-t border-default"},vt={key:0,class:"text-sm font-medium text-highlighted sm:hidden"},kt={key:1,class:"text-sm text-muted"},$t={key:2,class:"flex items-center gap-1.5 text-xs"},wt={class:"text-muted font-medium"},At={key:0,class:"space-y-1.5"},jt={class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},Ut={class:"space-y-2"},St={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Ct={class:"font-mono text-primary"},Ot={class:"text-xs text-muted font-mono"},qt={key:0,class:"text-xs font-medium text-error"},Bt={key:0,class:"text-muted mt-0.5"},Rt={key:1,class:"text-xs text-dimmed mt-0.5"},Tt={class:"font-mono"},Pt={key:3,class:"space-y-1.5"},Vt={class:"text-xs text-dimmed font-mono"},Lt={key:4,class:"space-y-1.5"},zt={class:"flex items-baseline gap-2"},It={class:"text-muted"},Nt={class:"text-xs text-dimmed font-mono"},Dt=H({__name:"ApiOperation",props:{item:{},spec:{}},setup(e){const t=e,r=N(!1),o=x(()=>ie(t.item.operation,t.spec)),u=x(()=>Be(t.item.operation)),p=x(()=>Te(t.item.operation)),v=x(()=>u.value?"Public — no authentication required":p.value?p.value.label:o.value?"Requires authentication":null),f=x(()=>t.item.parameters.filter(l=>l.in==="path")),y=x(()=>t.item.parameters.filter(l=>l.in==="query")),A=x(()=>t.item.parameters.filter(l=>l.in==="header")),h=x(()=>Object.entries(t.item.operation.requestBody?.content??{}).map(([l,d])=>({contentType:l,schema:D(d.schema,t.spec)}))),j=x(()=>Object.entries(t.item.operation.responses??{}).map(([l,d])=>({status:l,description:d.description,entries:Object.entries(d.content??{}).map(([C,q])=>({contentType:C,schema:D(q.schema,t.spec)}))}))),S=x(()=>t.item.path.split(/(\{[^}]+\})/g).map(l=>({text:l,isParam:l.startsWith("{")})));function w(l){return l.startsWith("2")?"text-success":l.startsWith("3")?"text-info":l.startsWith("4")?"text-warning":l.startsWith("5")?"text-error":"text-muted"}return(l,d)=>{const C=ee,q=xe,L=le,I=ht;return n(),a("div",{id:e.item.anchor,class:"border border-default rounded-lg bg-elevated/20 scroll-mt-20"},[i("button",{type:"button",class:"w-full flex items-center gap-3 px-3 py-2.5 text-left cursor-pointer","aria-expanded":s(r),onClick:d[0]||(d[0]=_=>r.value=!s(r))},[$(C,{color:("methodBadgeColor"in l?l.methodBadgeColor:s(Ce))(e.item.method),variant:"subtle",class:"font-mono uppercase shrink-0 w-16 justify-center"},{default:P(()=>[R(c(e.item.method),1)]),_:1},8,["color"]),i("code",yt,[(n(!0),a(B,null,T(s(S),(_,m)=>(n(),a("span",{key:m,class:Q(_.isParam?"text-warning":"")},c(_.text),3))),128))]),i("span",gt,c(e.item.operation.summary),1),s(p)?.elevated?(n(),U(C,{key:0,color:"warning",variant:"subtle",size:"sm",icon:"i-lucide-shield",class:"shrink-0 ml-auto sm:ml-0",title:`Requires role: ${s(p).label}`},{default:P(()=>[R(c(s(p).shortLabel),1)]),_:1},8,["title"])):s(u)?(n(),U(C,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"shrink-0 ml-auto sm:ml-0"},{default:P(()=>[...d[1]||(d[1]=[R(" Public ",-1)])]),_:1})):s(o)?(n(),U(q,{key:2,name:"i-lucide-lock",class:"size-3.5 text-dimmed shrink-0 ml-auto sm:ml-0",title:"Requires authentication"})):g("",!0),$(q,{name:s(r)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-4 text-dimmed shrink-0"},null,8,["name"])],8,xt),s(r)?(n(),a("div",bt,[e.item.operation.summary?(n(),a("p",vt,c(e.item.operation.summary),1)):g("",!0),e.item.operation.description?(n(),a("p",kt,c(e.item.operation.description),1)):g("",!0),s(v)?(n(),a("div",$t,[$(q,{name:s(p)?.elevated?"i-lucide-shield":"i-lucide-users",class:"size-3.5 text-dimmed shrink-0"},null,8,["name"]),d[2]||(d[2]=i("span",{class:"text-dimmed"},"Access",-1)),i("span",wt,c(s(v)),1)])):g("",!0),(n(!0),a(B,null,T([{label:"Path parameters",params:s(f)},{label:"Query parameters",params:s(y)},{label:"Header parameters",params:s(A)}],_=>(n(),a(B,{key:_.label},[_.params.length?(n(),a("div",At,[i("h4",jt,c(_.label),1),i("div",Ut,[(n(!0),a(B,null,T(_.params,m=>(n(),a("div",{key:m.name,class:"text-sm"},[i("div",St,[i("code",Ct,c(m.name),1),i("span",Ot,c(("schemaTypeLabel"in l?l.schemaTypeLabel:s(te))(m.schema)),1),m.required?(n(),a("span",qt,"required")):g("",!0)]),m.description?(n(),a("p",Bt,c(m.description),1)):g("",!0),m.schema?.enum?.length?(n(),a("p",Rt,[d[3]||(d[3]=R(" Allowed values: ",-1)),i("span",Tt,c(m.schema.enum.map(V=>JSON.stringify(V)).join(", ")),1)])):g("",!0)]))),128))])])):g("",!0)],64))),128)),s(h).length?(n(),a("div",Pt,[d[4]||(d[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Request body",-1)),(n(!0),a(B,null,T(s(h),_=>(n(),a("div",{key:_.contentType,class:"space-y-1.5"},[i("code",Vt,c(_.contentType),1),_.schema?(n(),U(L,{key:0,schema:_.schema,spec:e.spec},null,8,["schema","spec"])):g("",!0)]))),128))])):g("",!0),s(j).length?(n(),a("div",Lt,[d[5]||(d[5]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Responses",-1)),(n(!0),a(B,null,T(s(j),_=>(n(),a("div",{key:_.status,class:"text-sm"},[i("div",zt,[i("code",{class:Q(["font-mono font-semibold",w(_.status)])},c(_.status),3),i("span",It,c(_.description),1)]),(n(!0),a(B,null,T(_.entries,m=>(n(),a("div",{key:m.contentType,class:"mt-1 pl-3 border-l border-default"},[i("code",Nt,c(m.contentType),1),m.schema?(n(),U(L,{key:0,schema:m.schema,spec:e.spec,class:"mt-1"},null,8,["schema","spec"])):g("",!0)]))),128))]))),128))])):g("",!0),$(I,{item:e.item,spec:e.spec},null,8,["item","spec"])])):g("",!0)],8,_t)}}}),Et=Object.assign(Dt,{__name:"ApiOperation"}),Jt={class:"max-w-4xl mx-auto px-4 sm:px-6 py-6 space-y-6"},Mt={class:"space-y-3"},Ht={class:"flex flex-wrap items-center gap-2"},Wt={class:"text-xl font-semibold text-highlighted"},Ft={key:0,class:"text-sm text-muted"},Qt={key:1,class:"flex items-center gap-2 text-sm"},Gt={class:"flex flex-wrap items-center gap-2"},Xt={class:"text-xs text-dimmed"},Zt={key:0,class:"flex flex-wrap gap-1.5"},Kt=["href"],Yt={class:"text-dimmed"},es={key:1,class:"space-y-8"},ts=["id"],ss={class:"text-sm font-semibold uppercase tracking-wide text-dimmed"},ns={class:"text-dimmed/60"},os=H({__name:"ApiReference",props:{spec:{},specUrl:{}},setup(e){const t=e,{copy:r,copied:o}=je(),{isDesktop:u,download:p}=re(),v=N("");function f(w){u&&(w.preventDefault(),p(t.specUrl,"piwi-openapi.json"))}const y=x(()=>qe(t.spec)),A=x(()=>y.value.reduce((w,l)=>w+l.operations.length,0)),h=x(()=>{const w=v.value.trim().toLowerCase();return w?y.value.map(l=>({tag:l.tag,operations:l.operations.filter(d=>`${d.method} ${d.path} ${d.operation.summary??""} ${d.operation.description??""} ${d.tag}`.toLowerCase().includes(w))})).filter(l=>l.operations.length>0):y.value}),j=x(()=>t.spec.servers?.[0]?.url??"");function S(w){return`tag-${w.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`}return(w,l)=>{const d=ee,C=Y,q=be,L=oe,I=Et,_=Ae;return n(),a("div",Jt,[i("header",Mt,[i("div",Ht,[i("h1",Wt,c(e.spec.info?.title??"API Reference"),1),e.spec.info?.version?(n(),U(d,{key:0,color:"neutral",variant:"subtle",class:"font-mono"},{default:P(()=>[R(" v"+c(e.spec.info.version),1)]),_:1})):g("",!0)]),e.spec.info?.description?(n(),a("p",Ft,c(e.spec.info.description),1)):g("",!0),s(j)?(n(),a("div",Qt,[l[2]||(l[2]=i("span",{class:"text-dimmed"},"Base URL",-1)),$(C,{label:s(j),color:"neutral",variant:"subtle",size:"xs",icon:s(o)?"i-lucide-check":"i-lucide-copy",class:"font-mono",onClick:l[0]||(l[0]=m=>s(r)(s(j),{toast:!0}))},null,8,["label","icon"])])):g("",!0),i("div",Gt,[$(C,{to:e.specUrl,target:"_blank",external:"",color:"neutral",variant:"outline",size:"xs",icon:"i-lucide-file-json",label:"Raw OpenAPI spec",onClick:f},null,8,["to"]),i("span",Xt,c(s(A))+" endpoints",1)]),$(q,{color:"info",variant:"subtle",icon:"i-lucide-terminal",title:"Windows users",description:"curl examples below use Unix syntax — run them in Git Bash / WSL, or use PowerShell's Invoke-RestMethod instead."})]),$(L,{modelValue:s(v),"onUpdate:modelValue":l[1]||(l[1]=m=>Z(v)?v.value=m:null),icon:"i-lucide-search",placeholder:"Filter endpoints by path, method, or description…",size:"md",class:"w-full",ui:{root:"sticky top-0 z-10"}},null,8,["modelValue"]),!s(v)&&s(y).length>1?(n(),a("div",Zt,[(n(!0),a(B,null,T(s(y),m=>(n(),a("a",{key:m.tag,href:`#${S(m.tag)}`,class:"text-xs px-2 py-1 rounded-md bg-elevated text-muted hover:text-highlighted hover:bg-accented transition-colors"},[R(c(m.tag)+" ",1),i("span",Yt,c(m.operations.length),1)],8,Kt))),128))])):g("",!0),s(h).length?(n(),a("div",es,[(n(!0),a(B,null,T(s(h),m=>(n(),a("section",{key:m.tag,id:S(m.tag),class:"space-y-2 scroll-mt-4"},[i("h2",ss,[R(c(m.tag)+" ",1),i("span",ns,"("+c(m.operations.length)+")",1)]),(n(!0),a(B,null,T(m.operations,V=>(n(),U(I,{key:V.anchor,item:V,spec:e.spec},null,8,["item","spec"]))),128))],8,ts))),128))])):(n(),U(_,{key:2,icon:"i-lucide-search-x",text:"No endpoints match your filter."}))])}}}),as=Object.assign(os,{__name:"ApiReference"}),rs={key:1,class:"p-6"},is={class:"flex flex-wrap justify-center gap-2 mt-1"},ws=H({__name:"docs",setup(e){const r=ae().public.demoMode,o=r?"/demo/_openapi.json":"/_openapi.json",{isDesktop:u,download:p}=re();function v(j){u&&(j.preventDefault(),p(o,"piwi-openapi.json"))}ye({title:"API Reference — Piwi Dashboard"});const{data:f,status:y,error:A,refresh:h}=Ue(o,{key:"openapi-spec",lazy:!0,server:!r},"$4tSR2TuzBP");return(j,S)=>{const w=me,l=de,d=fe,C=he,q=Y,L=ge,I=as,_=pe;return n(),U(_,{id:"docs"},{header:P(()=>[$(d,null,{leading:P(()=>[$(w),$(l,{items:[{label:"API Reference",icon:"i-lucide-book-open"}]})]),_:1})]),body:P(()=>[s(y)==="pending"||!s(f)&&!s(A)?(n(),U(C,{key:0,text:"Loading API reference…"})):s(A)||!s(f)?(n(),a("div",rs,[$(L,{text:"Couldn't load the API reference UI."},{action:P(()=>[S[3]||(S[3]=i("p",{class:"text-sm text-muted max-w-sm"},"The raw OpenAPI spec is still available directly.",-1)),i("div",is,[$(q,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:S[0]||(S[0]=()=>s(h)())},{default:P(()=>[...S[1]||(S[1]=[R(" Retry ",-1)])]),_:1}),$(q,{to:s(o),target:"_blank",external:"",size:"sm",variant:"outline",icon:"i-lucide-file-json",onClick:v},{default:P(()=>[...S[2]||(S[2]=[R(" Raw OpenAPI spec ",-1)])]),_:1},8,["to"])])]),_:1})])):(n(),U(I,{key:2,spec:s(f),"spec-url":s(o)},null,8,["spec","spec-url"]))]),_:1})}}});export{ws as default};