@hot-updater/console 1.2.0-rc.4 → 1.2.0-rc.41

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 (394) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/-native-builds-search-BFcW2mlI.js +1 -0
  3. package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +1 -0
  4. package/.output/public/assets/ChannelBadge-BgVCJfJs.js +1 -0
  5. package/.output/public/assets/ChannelPicker-BQKoyxnf.js +1 -0
  6. package/.output/public/assets/CompositeItem-B7uxFM46.js +1 -0
  7. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-B3VCINom.js} +1 -1
  8. package/.output/public/assets/EventDetails-CWiI1CXb.js +1 -0
  9. package/.output/public/assets/HashValueDisplay-DvwvQchI.js +1 -0
  10. package/.output/public/assets/InsightsPageHeader-BjUAikRe.js +1 -0
  11. package/.output/public/assets/IosInstall-B5IdjCP2.js +1 -0
  12. package/.output/public/assets/NativeBuildsNav-BKdnlKMN.js +1 -0
  13. package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-BEpesHEm.js} +1 -1
  14. package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-D4KPXCHL.js} +1 -1
  15. package/.output/public/assets/QrCode-BFSCkbPj.js +1 -0
  16. package/.output/public/assets/RelativeTime-5ZP9WlQ6.js +1 -0
  17. package/.output/public/assets/RolloutPercentageBadge-DCtG7c1o.js +1 -0
  18. package/.output/public/assets/RowReason-CXMCJ-Jc.js +1 -0
  19. package/.output/public/assets/SandboxBadge-PM92jCk6.js +1 -0
  20. package/.output/public/assets/TargetDisplay-DG_I3qln.js +1 -0
  21. package/.output/public/assets/alert-dialog-DGPqJBCk.js +1 -0
  22. package/.output/public/assets/api-eO-sq3Jd.js +1 -0
  23. package/.output/public/assets/api-keys-CAVLgicI.js +1 -0
  24. package/.output/public/assets/api-keys-ztwXoKcj.js +1 -0
  25. package/.output/public/assets/arrow-left-68S4uy4I.js +1 -0
  26. package/.output/public/assets/arrow-right-DjRwIoF1.js +1 -0
  27. package/.output/public/assets/arrow-up-right-C_1ALUCD.js +1 -0
  28. package/.output/public/assets/badge-zMibJGR5.js +1 -0
  29. package/.output/public/assets/card-BAs80yql.js +1 -0
  30. package/.output/public/assets/check-C3VCvMOV.js +1 -0
  31. package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
  32. package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-DvYMC5yF.js} +1 -1
  33. package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-D0JWZ1KF.js} +1 -1
  34. package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-CtbGqKyr.js} +1 -1
  35. package/.output/public/assets/{uuidv7-zXMtwR9Q.js → constants-C5gi7fdZ.js} +1 -1
  36. package/.output/public/assets/{copy-DsuLj3oj.js → copy-BjVLMKbo.js} +1 -1
  37. package/.output/public/assets/dialog-BvZDZzdQ.js +1 -0
  38. package/.output/public/assets/dist-BEmib-ZM.js +1 -0
  39. package/.output/public/assets/{download-Cf24LBde.js → download-CgpaZb23.js} +1 -1
  40. package/.output/public/assets/empty-C5GqArX9.js +1 -0
  41. package/.output/public/assets/field-DInLQ5oV.js +1 -0
  42. package/.output/public/assets/git-branch-BGatQV8Q.js +1 -0
  43. package/.output/public/assets/history-Ci4dhphE.js +1 -0
  44. package/.output/public/assets/index-Ck4fZq4M.js +10 -0
  45. package/.output/public/assets/input-group-CIjTdxCW.js +1 -0
  46. package/.output/public/assets/insights-V3D8tYPQ.js +1 -0
  47. package/.output/public/assets/insights-api-D4-FZeEI.js +1 -0
  48. package/.output/public/assets/insights-fSY6n4k3.js +42 -0
  49. package/.output/public/assets/insights-osTmFzzR.js +2 -0
  50. package/.output/public/assets/insights-search-CZtvD-Vf.js +1 -0
  51. package/.output/public/assets/insights-usage-rpc-Dw5_pmRH.js +1 -0
  52. package/.output/public/assets/insights_.distribution-Cws8lYLC.js +1 -0
  53. package/.output/public/assets/insights_.distribution-DpppHhaU.js +2 -0
  54. package/.output/public/assets/insights_.distribution-oIFSv2TC.js +1 -0
  55. package/.output/public/assets/installations-Byojb0Rv.js +2 -0
  56. package/.output/public/assets/installations-CFGDrY-W.js +1 -0
  57. package/.output/public/assets/installations-CcPrSZwW.js +1 -0
  58. package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-BkeLvA1m.js} +1 -1
  59. package/.output/public/assets/{link-DTEyW70e.js → link-CRMwpc7-.js} +2 -2
  60. package/.output/public/assets/{list--NIee1FZ.js → list-DQ9YBIDW.js} +1 -1
  61. package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
  62. package/.output/public/assets/native-builds-C4u6JvxV.js +2 -0
  63. package/.output/public/assets/native-builds-D9hoJd6W.js +1 -0
  64. package/.output/public/assets/native-builds-zwqucwx2.js +1 -0
  65. package/.output/public/assets/native-builds_._buildId-CXx2xjoI.js +1 -0
  66. package/.output/public/assets/native-builds_._buildId-DymsEZlO.js +2 -0
  67. package/.output/public/assets/native-builds_.devices-DF3g--dt.js +1 -0
  68. package/.output/public/assets/native-builds_.devices-QToUV8FB.js +2 -0
  69. package/.output/public/assets/plus-DztQIXYL.js +1 -0
  70. package/.output/public/assets/preload-helper-CE9OukVC.js +1 -0
  71. package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-RUNbaMyO.js} +1 -1
  72. package/.output/public/assets/remote-config-BIIj0Faf.js +1 -0
  73. package/.output/public/assets/remote-config-BJJAxy_g.js +6 -0
  74. package/.output/public/assets/remote-config-Dm1MCHDN.js +1 -0
  75. package/.output/public/assets/rotate-ccw-tITIe0Bd.js +1 -0
  76. package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-BFQcpUTO.js} +1 -1
  77. package/.output/public/assets/routes-9gxYg__u.js +1 -0
  78. package/.output/public/assets/routes-CUsayL0T.js +2 -0
  79. package/.output/public/assets/search-BfEqtE64.js +1 -0
  80. package/.output/public/assets/select-Bk52fOVX.js +1 -0
  81. package/.output/public/assets/sidebar-BmzmPGuv.js +3 -0
  82. package/.output/public/assets/smartphone-Dy13ukaU.js +1 -0
  83. package/.output/public/assets/styles-C1iqL6CR.css +2 -0
  84. package/.output/public/assets/switch-CI393qIT.js +1 -0
  85. package/.output/public/assets/table-DbZPkzdz.js +1 -0
  86. package/.output/public/assets/tabs-BnpNC0zf.js +1 -0
  87. package/.output/public/assets/trash-2-DI0biNI-.js +1 -0
  88. package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CxhBbgJw.js} +1 -1
  89. package/.output/public/assets/useAnchoredPopupScrollLock-Cvx6CdPD.js +1 -0
  90. package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-Cbk_weKW.js} +1 -1
  91. package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-D7IuoOLE.js} +1 -1
  92. package/.output/public/assets/valueToPercent-Db73Kirz.js +1 -0
  93. package/.output/server/{__23tanstack-start-server-fn-resolver-X9YQcrQI.mjs → __23tanstack-start-server-fn-resolver-76SKGuoc.mjs} +94 -46
  94. package/.output/server/_chunks/ssr-renderer.mjs +2 -2
  95. package/.output/server/_libs/@base-ui/react+[...].mjs +4436 -3131
  96. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  97. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
  98. package/.output/server/_libs/_.mjs +2 -0
  99. package/.output/server/_libs/lucide-react.mjs +34 -28
  100. package/.output/server/_libs/next-themes.mjs +1 -1
  101. package/.output/server/_libs/react-redux+[...].mjs +1 -1
  102. package/.output/server/_libs/recharts+[...].mjs +1 -1
  103. package/.output/server/_libs/sonner.mjs +1 -1
  104. package/.output/server/_libs/tanstack__react-query.mjs +1 -1
  105. package/.output/server/_ssr/-native-builds-search-Bwt8tQzp.mjs +55 -0
  106. package/.output/server/_ssr/{BundleIdDisplay-BVrZXzTm.mjs → BundleIdDisplay-By3CbbRM.mjs} +3 -3
  107. package/.output/server/_ssr/ChannelBadge-CDup7l56.mjs +23 -0
  108. package/.output/server/_ssr/ChannelPicker-Du2TmP3P.mjs +251 -0
  109. package/.output/server/_ssr/{ConsoleFeatureUnavailable-CULyV3nR.mjs → ConsoleFeatureUnavailable-C6aGoKDE.mjs} +8 -8
  110. package/.output/server/_ssr/{EventDetails-DeI1rOQc.mjs → EventDetails-VbcnMnSs.mjs} +9 -9
  111. package/.output/server/_ssr/{HashValueDisplay-DpnPD3U2.mjs → HashValueDisplay-CnC2fHER.mjs} +7 -7
  112. package/.output/server/_ssr/{InsightsPageHeader-Dwmdtelg.mjs → InsightsPageHeader-BuOanVZL.mjs} +13 -13
  113. package/.output/server/_ssr/IosInstall-BAFhW7Q9.mjs +751 -0
  114. package/.output/server/_ssr/NativeBuildsNav-BoTu4aLF.mjs +38 -0
  115. package/.output/server/_ssr/{NotFoundPage-Dddp1HSc.mjs → NotFoundPage-Bz05xF5Q.mjs} +3 -3
  116. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-C22qEcwo.mjs} +13 -3
  117. package/.output/server/_ssr/QrCode-DWshAW81.mjs +50 -0
  118. package/.output/server/_ssr/RelativeTime-D5kDQVn1.mjs +242 -0
  119. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-Dwx7dEeQ.mjs} +20 -4
  120. package/.output/server/_ssr/RowReason-pVOWQ7t5.mjs +186 -0
  121. package/.output/server/_ssr/SandboxBadge-DFbUYwhO.mjs +85 -0
  122. package/.output/server/_ssr/TargetDisplay-BtE5vntq.mjs +105 -0
  123. package/.output/server/_ssr/{alert-dialog-ei2c1b6A.mjs → alert-dialog-tcfkkNUX.mjs} +4 -4
  124. package/.output/server/_ssr/{api-keys-CVi7E0qS.mjs → api-keys-12_U0SQM.mjs} +14 -11
  125. package/.output/server/_ssr/{api-keys-BLHCygD_.mjs → api-keys-Bm8uDp2u.mjs} +2 -2
  126. package/.output/server/_ssr/{api-keys-rpc-CLZsTwih.mjs → api-keys-rpc-BxkfToWI.mjs} +4 -4
  127. package/.output/server/_ssr/{api-rpc-p-7EhGIG.mjs → api-rpc-TSnLWB7e.mjs} +83 -35
  128. package/.output/server/_ssr/{api-CvwqILEx.mjs → api-xOHZxbzu.mjs} +174 -37
  129. package/.output/server/_ssr/{auth-rpc-B1W4-hxa.mjs → auth-rpc-D3w54vsW.mjs} +5 -5
  130. package/.output/server/_ssr/{auth.server-CVKs7SWJ.mjs → auth.server-a2eP6q5P.mjs} +952 -186
  131. package/.output/server/_ssr/{badge-nS9EbEA0.mjs → badge-DrfbN1n0.mjs} +4 -45
  132. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
  133. package/.output/server/_ssr/card-DEItjgKG.mjs +49 -0
  134. package/.output/server/_ssr/{config.server-BAdvotbH.mjs → config.server-K8dd4dRv.mjs} +4 -4
  135. package/.output/server/_ssr/{console-access-BiuC2QFp.mjs → console-access-D-DHU4YH.mjs} +2 -2
  136. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-DTYyXrWO.mjs} +1 -1
  137. package/.output/server/_ssr/{console-features-api-FvbqhbTg.mjs → console-features-api-Chy2PrzZ.mjs} +5 -5
  138. package/.output/server/_ssr/{console-features-rpc-Cl3J66aP.mjs → console-features-rpc-_31L0k1i.mjs} +4 -4
  139. package/.output/server/_ssr/constants-BjsJZqaU.mjs +10 -0
  140. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  141. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-B56IJxlu.mjs} +1 -1
  142. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  143. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BZMFl5QV.mjs} +3 -3
  144. package/.output/server/_ssr/deviceProfileToken-xzDLfE0T.mjs +98 -0
  145. package/.output/server/_ssr/{dialog-GmTPeUS4.mjs → dialog-SAl1vP74.mjs} +5 -5
  146. package/.output/server/_ssr/dist-CiOq3ygH.mjs +148 -0
  147. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-C1KOnpiF.mjs} +1 -1
  148. package/.output/server/_ssr/{empty-CXWKv24M.mjs → empty-opJc9Fjw.mjs} +3 -3
  149. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  150. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BVufgM3l.mjs} +3 -3
  151. package/.output/server/_ssr/{field-lwIHAwLc.mjs → field-D6Y7zDZd.mjs} +3 -3
  152. package/.output/server/_ssr/foldedPage-CUjJqtlF.mjs +176 -0
  153. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CnOf4Frp.mjs} +2 -2
  154. package/.output/server/_ssr/{input-group-Dgr4DNbE.mjs → input-group-D2PvPRdm.mjs} +3 -3
  155. package/.output/server/_ssr/{insights-BxtyBLt0.mjs → insights-Cro4cYp7.mjs} +2 -2
  156. package/.output/server/_ssr/{insights-api-PN_9ilr8.mjs → insights-api-BPyvQert.mjs} +5 -5
  157. package/.output/server/_ssr/{insights-DSnQTQw1.mjs → insights-dWeLneo1.mjs} +45 -191
  158. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
  159. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
  160. package/.output/server/_ssr/{insights-failures-rpc-Cxu3UtyB.mjs → insights-failures-rpc-D7M8-Et9.mjs} +11 -11
  161. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
  162. package/.output/server/_ssr/{insights-recovery-rpc--c6kBp3k.mjs → insights-recovery-rpc-BUMK4m4H.mjs} +7 -7
  163. package/.output/server/_ssr/{insights-rpc-oTMaAqc1.mjs → insights-rpc-BZZ4U2Ll.mjs} +4 -4
  164. package/.output/server/_ssr/{insights-search-r-Z50f0Y.mjs → insights-search-Czi553oN.mjs} +6 -8
  165. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
  166. package/.output/server/_ssr/{insights-usage-rpc-DoElOI5b.mjs → insights-usage-rpc-BXvUr-z6.mjs} +7 -7
  167. package/.output/server/_ssr/{insights-usage-rpc-B00vjt0a.mjs → insights-usage-rpc-HOr6mniz.mjs} +5 -5
  168. package/.output/server/_ssr/{insights-B9NvjAWc.mjs → insights-vmCmvfXx.mjs} +5 -5
  169. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
  170. package/.output/server/_ssr/{insights_.distribution-CnYddZ2Y.mjs → insights_.distribution-B2dxcCd_.mjs} +2 -2
  171. package/.output/server/_ssr/{insights_.distribution-mpZ0wS_R.mjs → insights_.distribution-B5V_NbK4.mjs} +17 -16
  172. package/.output/server/_ssr/{insights_.distribution-B8AMBp-Q.mjs → insights_.distribution-DongF2jp.mjs} +5 -5
  173. package/.output/server/_ssr/{installations-BfhcY_XQ.mjs → installations-B7w4LGJp.mjs} +4 -4
  174. package/.output/server/_ssr/{installations-CWTRzcR7.mjs → installations-B84kSetd.mjs} +2 -2
  175. package/.output/server/_ssr/{installations-O6Jzc5PO.mjs → installations-bieZA3xt.mjs} +13 -13
  176. package/.output/server/_ssr/ios-devices-rpc-DOQg4dpb.mjs +137 -0
  177. package/.output/server/_ssr/iosDeviceCookie-DhWNFpC6.mjs +155 -0
  178. package/.output/server/_ssr/iosDeviceProfile-jC8w4zEF.mjs +176 -0
  179. package/.output/server/_ssr/iosDevices-B4kQLURA.mjs +113 -0
  180. package/.output/server/_ssr/listReleases-QF91GLE7.mjs +94 -0
  181. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  182. package/.output/server/_ssr/native-artifact-D4ZISXRZ.mjs +1517 -0
  183. package/.output/server/_ssr/native-builds-BU9Njiwm.mjs +696 -0
  184. package/.output/server/_ssr/native-builds-lEyKQemV.mjs +262 -0
  185. package/.output/server/_ssr/{native-builds-UIgRLMb8.mjs → native-builds-zpCsEYyA.mjs} +3 -3
  186. package/.output/server/_ssr/{native-builds_._buildId-DjUqI5sa.mjs → native-builds_._buildId-BJ4R32fq.mjs} +3 -3
  187. package/.output/server/_ssr/native-builds_._buildId-RHUotAYb.mjs +1148 -0
  188. package/.output/server/_ssr/native-builds_.devices-C0IlQkLv.mjs +10 -0
  189. package/.output/server/_ssr/native-builds_.devices-D1Ke-Fc-.mjs +820 -0
  190. package/.output/server/_ssr/nativeBuildDownloadLink-MCd5xUqP.mjs +96 -0
  191. package/.output/server/_ssr/nativeBuildInstall-DcsqDS-O.mjs +253 -0
  192. package/.output/server/_ssr/nativeBuilds-CRa36wNn.mjs +287 -0
  193. package/.output/server/_ssr/plistText-DkzlCfPI.mjs +15 -0
  194. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-D9CCkDjn.mjs} +7 -6
  195. package/.output/server/_ssr/publicConsoleBase-wTKw3_iB.mjs +15 -0
  196. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-gfhE5tz5.mjs} +2 -2
  197. package/.output/server/_ssr/{release-adoption-rpc-PLyiDnas.mjs → release-adoption-rpc-C4G_d8qK.mjs} +9 -9
  198. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-DfEYq7I4.mjs} +4 -4
  199. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-CJ2Shida.mjs} +4 -3
  200. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-CqIc-SDE.mjs} +1 -1
  201. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-Ch1JpJkY.mjs} +2 -2
  202. package/.output/server/_ssr/{remote-config-C5j4CfGa.mjs → remote-config-1QZ0HgEu.mjs} +3 -3
  203. package/.output/server/_ssr/{remote-config-eNxv5Kzc.mjs → remote-config-CsbpqWAR.mjs} +24 -23
  204. package/.output/server/_ssr/{remote-config-tOdzsFMi.mjs → remote-config-DkgBxBka.mjs} +2 -2
  205. package/.output/server/_ssr/{remote-config-rpc-Cy4VwdMt.mjs → remote-config-rpc-KjJA9DC-.mjs} +5 -5
  206. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  207. package/.output/server/_ssr/{router-DaQ6OkIp.mjs → router-Dy3fmb8q.mjs} +137 -64
  208. package/.output/server/_ssr/{routes-Drni4c1E.mjs → routes-68rZQGee.mjs} +470 -474
  209. package/.output/server/_ssr/{routes-BYmUIYfN.mjs → routes-Ug9uqzob.mjs} +50 -18
  210. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BUbb281Z.mjs} +4 -4
  211. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-CaIuQCXb.mjs} +1 -1
  212. package/.output/server/_ssr/{schema-migration-rpc-mZ_19Wt_.mjs → schema-migration-rpc-kntY9oPm.mjs} +4 -4
  213. package/.output/server/_ssr/{select-Cjrp1Sl9.mjs → select-BOKFFr_G.mjs} +12 -10
  214. package/.output/server/_ssr/{server-y3KoaSil.mjs → server-DetMvRBJ.mjs} +7 -7
  215. package/.output/server/_ssr/{sidebar-tRHVNWpo.mjs → sidebar-B46houn0.mjs} +17 -10
  216. package/.output/server/_ssr/ssr.mjs +1 -1
  217. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-BSkL2B6C.mjs} +2 -2
  218. package/.output/server/_ssr/{switch-YrqCYfP-.mjs → switch-BMYzd71j.mjs} +4 -4
  219. package/.output/server/_ssr/{table-NHakBPSp.mjs → table-DWrYwJ_a.mjs} +2 -2
  220. package/.output/server/_ssr/tabs-DusHAcYy.mjs +45 -0
  221. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-BwDwIoNu.mjs} +3 -3
  222. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → uuid-kZvLA0Ly-DNL0qBSj.mjs} +2 -147
  223. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-C0jNe2Om.mjs} +2 -2
  224. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-zW2fpHOZ.mjs} +1 -1
  225. package/.output/server/_tanstack-start-manifest_v-CD1q5k0m.mjs +228 -0
  226. package/.output/server/index.mjs +503 -391
  227. package/lib/index.d.mts +9 -0
  228. package/package.json +7 -30
  229. package/src/components/AppSidebar.tsx +11 -2
  230. package/src/components/ChannelBadge.tsx +9 -9
  231. package/src/components/ChannelPicker.tsx +227 -0
  232. package/src/components/DataTable.tsx +363 -0
  233. package/src/components/FoldedRows.tsx +219 -0
  234. package/src/components/HashValueDisplay.tsx +6 -3
  235. package/src/components/PlatformIcon.tsx +10 -0
  236. package/src/components/RelativeTime.tsx +31 -0
  237. package/src/components/RowReason.tsx +56 -0
  238. package/src/components/TargetDisplay.tsx +95 -0
  239. package/src/components/ThemeProvider.tsx +11 -2
  240. package/src/components/features/api-keys/ApiKeysPage.tsx +5 -3
  241. package/src/components/features/bundles/BundleMetadata.tsx +1 -1
  242. package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
  243. package/src/components/features/channels/ChannelManagementDialog.tsx +10 -11
  244. package/src/components/features/insights/AppUsage.tsx +3 -5
  245. package/src/components/features/insights/FailureReports.tsx +3 -2
  246. package/src/components/features/insights/InsightsControls.tsx +10 -69
  247. package/src/components/features/insights/InsightsOverview.tsx +7 -1
  248. package/src/components/features/insights/InsightsPageHeader.tsx +10 -15
  249. package/src/components/features/insights/ReleaseActivity.tsx +6 -2
  250. package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
  251. package/src/components/features/insights/UpdateFailures.tsx +1 -0
  252. package/src/components/features/native-builds/BuiltInBundleCard.tsx +122 -61
  253. package/src/components/features/native-builds/CommitLink.tsx +3 -2
  254. package/src/components/features/native-builds/ImportBuild.tsx +1 -1
  255. package/src/components/features/native-builds/InstallCard.tsx +316 -91
  256. package/src/components/features/native-builds/IosDevicesPage.tsx +1100 -0
  257. package/src/components/features/native-builds/IosInstall.tsx +732 -0
  258. package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
  259. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +30 -6
  260. package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
  261. package/src/components/features/native-builds/NativeBuildsPage.tsx +94 -108
  262. package/src/components/features/native-builds/NativeBuildsTable.tsx +649 -323
  263. package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
  264. package/src/components/features/native-builds/PatchesCard.tsx +28 -19
  265. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +5 -5
  266. package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
  267. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  268. package/src/components/features/native-builds/ShortHash.tsx +6 -3
  269. package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
  270. package/src/components/features/native-builds/playTracks.ts +7 -0
  271. package/src/components/features/releases/ReleaseEditorSheet.tsx +8 -6
  272. package/src/components/features/remote-config/PublishDialog.tsx +4 -1
  273. package/src/components/features/remote-config/VersionsCard.tsx +5 -2
  274. package/src/components/ui/alert-dialog.tsx +2 -2
  275. package/src/components/ui/badge.tsx +2 -0
  276. package/src/components/ui/button.tsx +11 -2
  277. package/src/components/ui/combobox.tsx +2 -2
  278. package/src/components/ui/dialog.tsx +3 -3
  279. package/src/components/ui/input.tsx +1 -1
  280. package/src/components/ui/select.tsx +15 -7
  281. package/src/components/ui/sheet.tsx +1 -1
  282. package/src/components/ui/sidebar.tsx +2 -2
  283. package/src/components/ui/slider.tsx +1 -1
  284. package/src/components/ui/sonner.tsx +3 -1
  285. package/src/components/ui/switch.tsx +1 -1
  286. package/src/components/ui/tabs.tsx +1 -1
  287. package/src/components/ui/textarea.tsx +1 -1
  288. package/src/index.ts +9 -0
  289. package/src/lib/api-rpc.ts +125 -35
  290. package/src/lib/api.ts +160 -16
  291. package/src/lib/constants.ts +15 -0
  292. package/src/lib/insights-search.ts +0 -3
  293. package/src/lib/ios-devices-api.ts +290 -0
  294. package/src/lib/ios-devices-rpc.ts +188 -0
  295. package/src/lib/native-builds.ts +261 -20
  296. package/src/lib/server/console-runtime.server.ts +9 -2
  297. package/src/lib/server/deviceProfileToken.ts +221 -0
  298. package/src/lib/server/foldedPage.ts +360 -0
  299. package/src/lib/server/iosDeviceCookie.ts +239 -0
  300. package/src/lib/server/iosDeviceProfile.ts +232 -0
  301. package/src/lib/server/iosDevices.ts +193 -0
  302. package/src/lib/server/listReleases.ts +101 -62
  303. package/src/lib/server/local-console.ts +1 -1
  304. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  305. package/src/lib/server/nativeBuildInstall.ts +502 -0
  306. package/src/lib/server/nativeBuilds.ts +314 -58
  307. package/src/lib/server/plistText.ts +17 -0
  308. package/src/lib/server/publicConsoleBase.ts +17 -0
  309. package/src/routeTree.gen.ts +129 -18
  310. package/src/routes/-native-builds-search.ts +52 -4
  311. package/src/routes/-releases-search.ts +63 -2
  312. package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
  313. package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
  314. package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
  315. package/src/routes/[_]hot-updater/devices/request.ts +28 -0
  316. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  317. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  318. package/src/routes/index.tsx +657 -577
  319. package/src/routes/insights.tsx +3 -5
  320. package/src/routes/insights_.distribution.tsx +2 -2
  321. package/src/routes/native-builds_.devices.tsx +21 -0
  322. package/src/styles.css +24 -0
  323. package/.output/public/assets/-native-builds-search-C-TGpFAm.js +0 -1
  324. package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
  325. package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
  326. package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +0 -1
  327. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  328. package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
  329. package/.output/public/assets/alert-dialog-BqYScr9y.js +0 -1
  330. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  331. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  332. package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
  333. package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
  334. package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
  335. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
  336. package/.output/public/assets/badge-DWFcDWho.js +0 -1
  337. package/.output/public/assets/check-CXVR3s3X.js +0 -1
  338. package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
  339. package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
  340. package/.output/public/assets/dist-CPlO6ko9.js +0 -1
  341. package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
  342. package/.output/public/assets/field-D-2-mnNh.js +0 -1
  343. package/.output/public/assets/history-DqHlgSuV.js +0 -1
  344. package/.output/public/assets/index-CqP5HPV6.js +0 -10
  345. package/.output/public/assets/input-group-D3OUBk4n.js +0 -1
  346. package/.output/public/assets/insights-B-0odqpt.js +0 -42
  347. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  348. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  349. package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
  350. package/.output/public/assets/insights-search-DghCbEnk.js +0 -1
  351. package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
  352. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  353. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  354. package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
  355. package/.output/public/assets/installations-B674P5Z5.js +0 -2
  356. package/.output/public/assets/installations-BWxczZ2t.js +0 -1
  357. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  358. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  359. package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
  360. package/.output/public/assets/native-builds-DAy2678K.js +0 -1
  361. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  362. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  363. package/.output/public/assets/plus-BReVKct-.js +0 -1
  364. package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
  365. package/.output/public/assets/refresh-cw-B9HHjLej.js +0 -1
  366. package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
  367. package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
  368. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  369. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  370. package/.output/public/assets/routes-CCD33Azv.js +0 -2
  371. package/.output/public/assets/search-BCel4Oy6.js +0 -1
  372. package/.output/public/assets/select-CBIU0_M1.js +0 -1
  373. package/.output/public/assets/sidebar-Di9SN47G.js +0 -3
  374. package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
  375. package/.output/public/assets/styles-uK-0vUMk.css +0 -2
  376. package/.output/public/assets/switch-BpdiHL_t.js +0 -1
  377. package/.output/public/assets/table-Bpy3SvSo.js +0 -1
  378. package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
  379. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
  380. package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
  381. package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +0 -37
  382. package/.output/server/_ssr/RolloutPercentageBadge-CoBhJtv9.mjs +0 -21
  383. package/.output/server/_ssr/StoreSubmission-CPg_Rn5E.mjs +0 -139
  384. package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
  385. package/.output/server/_ssr/native-builds-BDcOlKnd.mjs +0 -510
  386. package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
  387. package/.output/server/_ssr/native-builds_._buildId-BjsdQO93.mjs +0 -813
  388. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  389. package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
  390. package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
  391. package/.output/server/_ssr/tabs-BgTTFotk.mjs +0 -45
  392. package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
  393. package/src/lib/server/nativeBuildQr.ts +0 -73
  394. package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
@@ -0,0 +1 @@
1
+ import{$ as e,$n as t,Ar as n,Br as r,Cn as i,Di as a,Ei as o,F as s,Fr as c,H as l,I as u,Ir as d,L as f,Ln as p,M as m,Mr as h,Nn as g,On as _,P as v,Q as y,Qn as b,R as x,Ri as S,Sn as C,Tr as w,U as T,Un as ee,Vi as E,Vr as D,Xn as O,Zn as te,_ as ne,_r as re,b as ie,bn as ae,dt as oe,et as se,ft as ce,g as le,gn as ue,gr as k,h as A,jr as de,kr as fe,p as pe,v as j,vn as M,vr as N,w as me,wr as P,xn as F,xr as he,y as I,yn as ge}from"./sidebar-BmzmPGuv.js";import{t as L}from"./link-CRMwpc7-.js";import{t as R}from"./arrow-right-DjRwIoF1.js";import{t as _e}from"./arrow-up-right-C_1ALUCD.js";import{a as ve,i as ye,l as be,n as z,o as xe,r as Se,s as Ce,t as B}from"./routes-CUsayL0T.js";import{t as V}from"./check-C3VCvMOV.js";import{a as we,i as Te,n as Ee,r as De}from"./useCompositeListItem-Cbk_weKW.js";import{i as Oe,r as ke}from"./TargetDisplay-DG_I3qln.js";import{t as Ae}from"./chevron-right-RAuPv9r1.js";import{a as je,d as Me,i as H,n as U,o as Ne,r as Pe,t as Fe,u as W}from"./select-Bk52fOVX.js";import{t as Ie}from"./circle-off-DvYMC5yF.js";import{t as Le}from"./download-CgpaZb23.js";import{t as Re}from"./list-DQ9YBIDW.js";import{t as G}from"./loader-circle-8lunBReu.js";import{C as ze,O as Be,T as Ve,h as He}from"./native-builds-zwqucwx2.js";import{t as Ue}from"./plus-DztQIXYL.js";import{n as K,r as We}from"./dist-BEmib-ZM.js";import{t as Ge}from"./rotate-ccw-tITIe0Bd.js";import{n as Ke,t as qe}from"./switch-CI393qIT.js";import{t as Je}from"./trash-2-DI0biNI-.js";import{a as Ye,i as Xe,n as Ze,o as Qe,r as $e,t as q}from"./badge-zMibJGR5.js";import{S as et,_ as tt,a as nt,i as rt,r as it,v as at,w as ot,y as st}from"./useAnchoredPopupScrollLock-Cvx6CdPD.js";import{a as ct}from"./insights-search-CZtvD-Vf.js";import{a as lt,n as ut,o as dt,r as ft,t as pt}from"./card-BAs80yql.js";import{a as mt,c as ht,d as gt,f as _t,i as vt,l as yt,o as bt,s as xt,u as St}from"./constants-C5gi7fdZ.js";import{a as Ct,c as wt,i as Tt,n as Et,r as Dt,t as Ot}from"./field-DInLQ5oV.js";import{C as kt,S as At,_ as jt,a as Mt,b as Nt,c as Pt,i as Ft,n as It,o as Lt,r as Rt,s as zt,t as Bt,v as Vt,w as Ht,x as Ut,y as Wt}from"./api-eO-sq3Jd.js";import{a as Gt,i as Kt,l as qt,n as Jt,o as Yt,r as Xt,s as Zt,t as Qt}from"./alert-dialog-DGPqJBCk.js";import{n as $t,t as en}from"./PlatformIcon-D4KPXCHL.js";import{a as tn,i as nn,n as rn,o as an,r as on,s as sn,t as cn}from"./dialog-BvZDZzdQ.js";import{a as ln,i as un,n as dn,o as fn,t as pn}from"./input-group-CIjTdxCW.js";import{a as mn,i as J,n as hn,o as gn,r as Y,t as _n}from"./table-DbZPkzdz.js";import{t as vn}from"./BundleIdDisplay-C0X-k49t.js";import{t as yn}from"./ChannelBadge-BgVCJfJs.js";import{t as bn}from"./ChannelPicker-BQKoyxnf.js";import{n as xn,t as Sn}from"./valueToPercent-Db73Kirz.js";import{a as Cn,c as wn,d as Tn,f as En,i as Dn,l as On,n as kn,o as An,p as jn,r as Mn,s as Nn,t as Pn,u as Fn}from"./RelativeTime-5ZP9WlQ6.js";import{n as In,r as Ln,t as Rn}from"./RolloutPercentageBadge-DCtG7c1o.js";import{t as zn}from"./HashValueDisplay-DvwvQchI.js";import{a as Bn,c as Vn,i as Hn,l as Un,n as Wn,o as Gn,r as Kn,s as qn,t as Jn}from"./RowReason-CXMCJ-Jc.js";var Yn=D(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Xn=D(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Zn=D(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Qn=D(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),$n=D(`tags`,[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]),er=o();function tr(){return P}function nr(){return!1}function rr(){return!0}function ir(){return(0,er.useSyncExternalStore)(tr,nr,rr)}function ar(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function or(e,t){return e-t}function sr(e,t,n){let r=e.slice();return r[t]=n,r.sort(or)}function cr(e,t,n,r,i,a){let o=e;return o=W(o,n,r),i&&(o=sr(a,t,W(o,a[t-1]||-1/0,a[t+1]||1/0))),o}function lr(e,t,n){if(!Array.isArray(e))return!0;let r=e.reduce((e,t,n,r)=>(n===r.length-1||e.push(Math.abs(t-r[n+1])),e),[]);return Math.min(...r)>=t*n}var ur={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...ot},X=E(S()),dr=X.createContext(void 0);function fr(){let e=X.useContext(dr);if(e===void 0)throw Error(fe(62));return e}var Z=a();function pr(e){return`key`in e?p:g}function mr(e,t){return typeof e==`number`&&typeof t==`number`?e===t:Array.isArray(e)&&Array.isArray(t)?ar(e,t):!1}var hr=X.forwardRef(function(e,t){let{"aria-labelledby":n,className:r,defaultValue:a,disabled:o=!1,id:s,format:c,largeStep:l=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:m=0,form:g,name:_,onValueChange:v,onValueCommitted:y,orientation:x=`horizontal`,step:S=1,thumbCollisionBehavior:w=`push`,thumbAlignment:T=`center`,value:ee,style:E,...D}=e,O=ce(s),ne=it(O),re=h(v),ie=h(y),{clearErrors:oe}=nt(),{state:se,disabled:le,name:ue,setTouched:k,setDirty:A,validityData:fe,shouldValidateOnChange:pe,validation:j}=et(),{labelId:N}=at(),[P,F]=X.useState(),I=n??rt(N,P),ge=le||o,L=ue??_,[R,_e]=Te({controlled:ee,default:a??p,name:`Slider`}),ve=X.useRef(null),ye=X.useRef(null),be=X.useRef([]),z=X.useRef(null),xe=X.useRef(null),Se=X.useRef(-1),Ce=X.useRef(null),B=X.useRef(null),V=X.useRef(`none`),we=ae(c),[Ee,Oe]=X.useState(-1),[ke,Ae]=X.useState(-1),[je,Me]=X.useState(!1),[H,U]=X.useState(()=>new Map),[Ne,Pe]=X.useState([void 0,void 0]),Fe=h(e=>{Oe(e),e!==-1&&Ae(e)});st(ye,O,R),me(R,()=>{oe(L),pe()?j.commit(R):j.commit(R,!0);let e=fe.initialValue,t;t=Array.isArray(R)&&Array.isArray(e)?!ar(R,e):R!==e,A(t)});let Ie=h(e=>{e&&(ye.current=e)}),Le=Array.isArray(R),Re=X.useMemo(()=>Le?R.slice().sort(or):[W(R,p,f)],[f,p,Le,R]),G=h((e,t)=>{if(Number.isNaN(e)||mr(e,R))return;let n=t??C(`none`,void 0,void 0,{activeThumbIndex:-1});V.current=n.reason;let r=n.event,i=new(r.constructor??Event)(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:e,name:L}}),n.event=i,B.current=e,re(e,n),!n.isCanceled&&_e(e)}),ze=h((e,t,n)=>{let r=cr(e,t,p,f,Le,Re);if(lr(r,S,m)){let e=pr(n);G(r,C(e,n.nativeEvent,void 0,{activeThumbIndex:t})),k(!0),ie(B.current??r,i(e,n.nativeEvent))}});de(()=>{let e=te(M(ve.current));ge&&b(ve.current,e)&&e.blur()},[ge]),ge&&Ee!==-1&&Fe(-1);let Be=X.useMemo(()=>({...se,activeThumbIndex:Ee,disabled:ge,dragging:je,orientation:x,max:f,min:p,minStepsBetweenValues:m,step:S,values:Re}),[se,Ee,ge,je,f,p,m,x,S,Re]),Ve=X.useMemo(()=>({active:Ee,controlRef:ye,disabled:ge,dragging:je,validation:j,formatOptionsRef:we,handleInputChange:ze,indicatorPosition:Ne,inset:T!==`center`,labelId:I,rootLabelId:ne,largeStep:l,lastUsedThumbIndex:ke,lastChangedValueRef:B,lastChangeReasonRef:V,form:g,locale:u,max:f,min:p,minStepsBetweenValues:m,name:L,onValueCommitted:ie,orientation:x,pressedInputRef:z,pressedThumbCenterOffsetRef:xe,pressedThumbIndexRef:Se,pressedValuesRef:Ce,registerFieldControlRef:Ie,renderBeforeHydration:T===`edge`,setActive:Fe,setDragging:Me,setIndicatorPosition:Pe,setLabelId:F,setValue:G,state:Be,step:S,thumbCollisionBehavior:w,thumbMap:H,thumbRefs:be,values:Re}),[Ee,ye,I,ne,ge,je,j,we,ze,Ne,l,ke,B,V,g,u,f,p,m,L,ie,x,z,xe,Se,Ce,Ie,Fe,Me,Pe,F,G,Be,S,w,T,H,be,Re]),He=he(`div`,e,{state:Be,ref:[t,ve],props:[{"aria-labelledby":I,id:O,role:`group`},j.getValidationProps,D],stateAttributesMapping:ur});return(0,Z.jsx)(dr.Provider,{value:Ve,children:(0,Z.jsx)(De,{elementsRef:be,onMapChange:U,children:He})})});function gr(e){let t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function _r(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function vr(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(_r(t),_r(n))))}function yr({values:e,index:t,nextValue:n,min:r,max:i,step:a,minStepsBetweenValues:o,initialValues:s}){if(e.length===0)return[];let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=W(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e]??c[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=W(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e]??c[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=W(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function br({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;switch(e){case`swap`:{let e=u[i],t=1e-7,n=u.slice(),r=n[i-1],p=n[i+1],m=W(a,r==null?o:r+f,p==null?s:p-f),h=Number(m.toFixed(12));n[i]=h;let g=a>e,_=a<e,v=g&&p!=null&&a>=p-t,y=_&&r!=null&&a<=r+t;if(!v&&!y)return{value:n,thumbIndex:i,didSwap:!1};let b=v?i+1:i-1,x=n.map((e,t)=>t===i?h:d[t]??u[t]),S=a;S=v?Math.max(a,n[b]):Math.min(a,n[b]);let C=yr({values:n,index:b,nextValue:S,min:o,max:s,step:c,minStepsBetweenValues:l,initialValues:x}),w=v?b-1:b+1;if(w>=0&&w<C.length){let e=C[w-1],t=C[w+1],n=e==null?o:e+f;n=Math.max(n,o+w*f);let r=t==null?s:t-f;r=Math.min(r,s-(C.length-1-w)*f);let i=W(h,n,r);C[w]=Number(i.toFixed(12))}return{value:C,thumbIndex:b,didSwap:!0}}case`push`:return{value:yr({values:u,index:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}),thumbIndex:i,didSwap:!1};default:{let e=u.slice(),t=e[i-1],n=e[i+1],r=W(a,t==null?o:t+f,n==null?s:n-f);return e[i]=Number(r.toFixed(12)),{value:e,thumbIndex:i,didSwap:!1}}}}var xr=2;function Sr(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function Cr(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var wr=X.forwardRef(function(e,n){let{render:r,className:a,style:o,...s}=e,{disabled:l,dragging:u,inset:f,lastChangedValueRef:p,lastChangeReasonRef:m,max:g,min:v,minStepsBetweenValues:y,onValueCommitted:x,orientation:S,pressedInputRef:w,pressedThumbCenterOffsetRef:T,pressedThumbIndexRef:E,pressedValuesRef:D,registerFieldControlRef:O,renderBeforeHydration:ne,setActive:re,setDragging:ie,setValue:se,state:ce,step:le,thumbCollisionBehavior:ue,thumbRefs:k,values:A}=fr(),de=oe(),fe=A.length>1,pe=S===`vertical`,j=X.useRef(null),N=X.useRef(null),me=h(e=>{e&&N.current==null&&(N.current=c(e).getComputedStyle(e))}),P=X.useRef(null),I=X.useRef(0),L=X.useRef(0),R=ae(A);function _e(e){E.current!==e&&(E.current=e);let t=k.current[e];if(!t){T.current=null,w.current=null;return}w.current=t.querySelector(`input[type="range"]`)}function ve(e){let t=j.current;if(!t)return null;let{width:n,height:r,bottom:i,left:a,right:o}=t.getBoundingClientRect(),s=Sr(N.current,pe),c=L.current,l=(pe?r:n)-s.start-s.end-c*2,u=T.current??0,d=e.x-u,f=e.y-u,p=W(((pe?i-f-s.end:(de===`rtl`?o-d:d-a)-s.start)-c)/l,0,1),m=(g-v)*p+v;if(m=vr(m,le,v),m=W(m,v,g),!fe)return{value:m,thumbIndex:0,didSwap:!1};let h=E.current;if(h<0)return null;let _=br({behavior:ue,values:A,currentValues:R.current??A,initialValues:D.current,pressedIndex:h,nextValue:m,min:v,max:g,step:le,minStepsBetweenValues:y});return ue===`swap`&&_.didSwap?_e(_.thumbIndex):E.current=_.thumbIndex,_}function ye(e){D.current=fe?A.slice():null,R.current=A;let t=E.current,n=t;if(t>-1&&t<A.length){if(A[t]===g){let e=t;for(;e>0&&A[e-1]===g;)--e;n=e}}else{let t=pe?`y`:`x`,r;n=-1;for(let i=0;i<k.current.length;i+=1){let a=k.current[i];if(d(a)){let o=gr(a),s=Math.abs(e[t]-o[t]);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&_e(n),f){let e=k.current[n];d(e)&&(L.current=e.getBoundingClientRect()[pe?`height`:`width`]/2)}}function be(e){let t=k.current?.[e]?.querySelector(`input[type="range"]`);t&&t.focus({preventScroll:!0,focusVisible:!1})}let z=h(e=>{let t=Cr(e,P);if(t==null)return;if(I.current+=1,e.type===`pointermove`&&e.buttons===0){xe(e);return}let n=ve(t);n!=null&&lr(n.value,le,y)&&(!u&&I.current>xr&&ie(!0),se(n.value,C(_,e,void 0,{activeThumbIndex:n.thumbIndex})),R.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&be(n.thumbIndex))});function xe(e){re(-1),ie(!1),w.current=null,T.current=null;let t=Cr(e,P),n=t==null?null:ve(t);if(n!=null){let t=m.current;x(p.current??n.value,i(t,e))}`pointerType`in e&&j.current?.hasPointerCapture(e.pointerId)&&j.current?.releasePointerCapture(e.pointerId),E.current=-1,P.current=null,D.current=null,Ce()}let Se=h(e=>{if(l)return;let t=e.changedTouches[0];t!=null&&(P.current=t.identifier);let n=Cr(e,P);if(n!=null){ye(n);let t=ve(n);if(t==null)return;be(t.thumbIndex),se(t.value,C(ee,e,void 0,{activeThumbIndex:t.thumbIndex})),R.current=Array.isArray(t.value)?t.value:[t.value],t.didSwap&&be(t.thumbIndex)}I.current=0;let r=M(j.current);r.addEventListener(`touchmove`,z,{passive:!0}),r.addEventListener(`touchend`,xe,{passive:!0})}),Ce=h(()=>{let e=M(j.current);e.removeEventListener(`pointermove`,z),e.removeEventListener(`pointerup`,xe),e.removeEventListener(`touchmove`,z),e.removeEventListener(`touchend`,xe),D.current=null}),B=ge();return X.useEffect(()=>{let e=j.current;if(!e)return()=>Ce();let t=F(e,`touchstart`,Se,{passive:!0});return()=>{t(),B.cancel(),Ce()}},[Ce,Se,j,B]),X.useEffect(()=>{l&&Ce()},[l,Ce]),he(`div`,e,{state:ce,ref:[n,O,j,me],props:[{"data-base-ui-slider-control":ne?``:void 0,onPointerDown(e){let n=j.current,r=t(e.nativeEvent);if(!n||l||e.defaultPrevented||!d(r)||e.button!==0)return;let i=Cr(e,P);if(i!=null){ye(i);let t=ve(i);if(t==null)return;b(k.current[t.thumbIndex],te(M(n)))?e.preventDefault():B.request(()=>{be(t.thumbIndex)}),ie(!0),T.current??(se(t.value,C(ee,e.nativeEvent,void 0,{activeThumbIndex:t.thumbIndex})),R.current=Array.isArray(t.value)?t.value:[t.value],t.didSwap&&be(t.thumbIndex))}e.nativeEvent.pointerId&&n.setPointerCapture(e.nativeEvent.pointerId),I.current=0;let a=M(j.current);a.addEventListener(`pointermove`,z,{passive:!0}),a.addEventListener(`pointerup`,xe,{once:!0})}},s],stateAttributesMapping:ur})}),Tr=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=fr();return he(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:ur})}),Er=function(e){return e.index=`data-index`,e.dragging=`data-dragging`,e.orientation=`data-orientation`,e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.focused=`data-focused`,e}({}),Dr=new Set([...f,T,l]);function Or(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${xn(e[t],r,n)} start range`:`${xn(e[t],r,n)} end range`:n?xn(e[t],r,n):void 0}function kr(e,t,n,r,i){let a=n===1?e+t:e-t;return W(Number(a.toFixed(Math.max(_r(e),_r(t),_r(r)))),r,i)}var Ar=X.forwardRef(function(e,t){let{render:r,children:i,className:a,"aria-describedby":o,"aria-label":d,"aria-labelledby":p,disabled:g=!1,getAriaLabel:_,getAriaValueText:y,id:b,index:S,inputRef:C,onBlur:ee,onFocus:E,onKeyDown:D,tabIndex:te,style:ne,...re}=e,{nonce:ie}=Me(),ae=ce(b),{active:se,lastUsedThumbIndex:le,controlRef:k,disabled:A,validation:fe,formatOptionsRef:pe,handleInputChange:j,inset:M,labelId:N,largeStep:me,locale:P,max:F,min:I,minStepsBetweenValues:ge,form:L,name:R,orientation:_e,pressedInputRef:ve,pressedThumbCenterOffsetRef:ye,pressedThumbIndexRef:be,renderBeforeHydration:z,setActive:xe,setIndicatorPosition:Se,state:Ce,step:B,values:V}=fr(),we=oe(),Te=g||A,De=V.length>1,Oe=_e===`vertical`,ke=we===`rtl`,{setTouched:Ae,setFocused:je,validationMode:H}=et(),U=X.useRef(null),Ne=X.useRef(null),Pe=X.useRef(!1),Fe=ce(),W=tt(),Ie=De?Fe:W,{ref:Le,index:Re}=Ee({metadata:X.useMemo(()=>({inputId:Ie}),[Ie])}),G=De?S??Re:0,ze=G===V.length-1,Be=V[G],Ve=Sn(Be,I,F),[He,Ue]=X.useState(),K=ir(),We=le>=0&&le<V.length?le:-1,Ge=h(()=>{let e=k.current,t=U.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=Oe?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*Ve/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;Ue(s),G===0?Se(e=>[s,e[1]]):ze&&Se(e=>[e[0],s])});de(()=>{M&&queueMicrotask(Ge)},[Ge,M]),de(()=>{M&&Ge()},[Ge,M,Ve]),de(()=>{if(!M)return;let e=k.current,t=U.current;if(!e||!t)return;let n=c(e).ResizeObserver;if(typeof n!=`function`)return;let r=new n(Ge);return r.observe(e),r.observe(t),()=>{r.disconnect()}},[k,Ge,M]);let Ke=Oe?`bottom`:`insetInlineStart`,qe=Oe?`left`:`top`,Je;De?se===G?Je=2:We===G&&(Je=1):se===G&&(Je=1);let Ye;Ye=M?{"--position":`${He??0}%`,visibility:z&&K||He===void 0?`hidden`:void 0,position:`absolute`,[Ke]:`var(--position)`,[qe]:`50%`,translate:`${(Oe||!ke?-1:1)*50}% ${(Oe?1:-1)*50}%`,zIndex:Je}:Number.isFinite(Ve)?{position:`absolute`,[Ke]:`${Ve}%`,[qe]:`50%`,translate:`${(Oe||!ke?-1:1)*50}% ${(Oe?1:-1)*50}%`,zIndex:Je}:ue;let Xe;_e===`vertical`&&(Xe=ke?`vertical-rl`:`vertical-lr`);let Ze=typeof _==`function`?_(G):d,Qe=n({"aria-label":Ze,"aria-labelledby":p??(Ze==null?N:void 0),"aria-describedby":o,"aria-orientation":_e,"aria-valuenow":Be,"aria-valuetext":typeof y==`function`?y(xn(Be,P,pe.current??void 0),Be,G):Or(V,G,pe.current??void 0,P),disabled:Te,form:L,id:Ie,max:F,min:I,name:R,onChange(e){j(e.currentTarget.valueAsNumber,G,e)},onFocus(e){let t=Pe.current;Pe.current=!1,xe(G),je(!0),t&&e.stopPropagation()},onBlur(e){if(Pe.current){e.stopPropagation();return}U.current&&(xe(-1),Ae(!0),je(!1),H===`onBlur`&&fe.commit(cr(Be,G,I,F,De,V)))},onKeyDown(e){if(!Dr.has(e.key))return;f.has(e.key)&&e.stopPropagation();let t=null,n=vr(Be,B,I);switch(e.key){case u:t=kr(n,e.shiftKey?me:B,1,I,F);break;case s:t=kr(n,e.shiftKey?me:B,ke?-1:1,I,F);break;case m:t=kr(n,e.shiftKey?me:B,-1,I,F);break;case v:t=kr(n,e.shiftKey?me:B,ke?1:-1,I,F);break;case T:t=kr(n,me,1,I,F);break;case l:t=kr(n,me,-1,I,F);break;case`End`:t=F,De&&(t=Number.isFinite(V[G+1])?V[G+1]-B*ge:F);break;case x:t=I,De&&(t=Number.isFinite(V[G-1])?V[G-1]+B*ge:I);break;default:break}if(t!==null){let n=e.currentTarget;O(n)||(Pe.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),j(t,G,e),e.preventDefault()}},step:B,style:{...ue,width:`100%`,height:`100%`,writingMode:Xe},tabIndex:te??void 0,type:`range`,value:Be??``},fe.getInputValidationProps),$e=w(Ne,fe.inputRef,C);return he(`div`,e,{state:Ce,ref:[t,Le,U],props:[{[Er.index]:G,children:(0,Z.jsxs)(X.Fragment,{children:[i,(0,Z.jsx)(`input`,{ref:$e,...Qe,suppressHydrationWarning:!0}),M&&K&&z&&ze&&(0,Z.jsx)(`script`,{nonce:ie,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();'},suppressHydrationWarning:!0})]}),id:ae,onBlur:ee,onFocus:E,onPointerDown(e){if(be.current=G,U.current!=null){let t=_e===`horizontal`?`x`:`y`,n=gr(U.current);ye.current=(_e===`horizontal`?e.clientX:e.clientY)-n[t]}Ne.current!=null&&ve.current!==Ne.current&&(ve.current=Ne.current)},style:Ye,suppressHydrationWarning:z||void 0},re],stateAttributesMapping:ur})});function jr(e,t,n,r,i,a){let o=n===void 0||t&&r===void 0?`hidden`:void 0,s=e?`bottom`:`insetInlineStart`,c=e?`height`:`width`,l={visibility:i&&a?`hidden`:o,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};return l[`--start-position`]=`${n??0}%`,t?(l[`--relative-size`]=`${(r??0)-(n??0)}%`,l[s]=`var(--start-position)`,l[c]=`var(--relative-size)`,l):(l[s]=0,l[c]=`var(--start-position)`,l)}function Mr(e,t,n,r){let i=e?`bottom`:`insetInlineStart`,a=e?`height`:`width`,o={position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};if(!t)return o[i]=0,o[a]=`${n}%`,o;let s=r-n;return o[i]=`${n}%`,o[a]=`${s}%`,o}var Nr=X.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=fr(),m=ir(),h=u===`vertical`,g=p.length>1,_=s?jr(h,g,o[0],o[1],d,m):Mr(h,g,Sn(p[0],l,c),Sn(p[p.length-1],l,c));return he(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:_,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:ur})});function Pr({enabled:e,className:t,falseIcon:n=`x`,colorMode:i=`semantic`}){let a=i===`inherit`?`text-current`:void 0;return e?(0,Z.jsx)(V,{className:N(`h-4 w-4`,a??`text-green-600 dark:text-green-400`,t)}):n===`minus`?(0,Z.jsx)(Zn,{className:N(`h-4 w-4`,a??`text-muted-foreground`,t)}):(0,Z.jsx)(r,{className:N(`h-4 w-4`,a??`text-red-600 dark:text-red-400`,t)})}function Fr({panelId:t,bundle:n,bundles:r,loading:i,onDetailClick:a}){let o=A();return(0,Z.jsx)(`div`,{"aria-live":`polite`,className:`border-t bg-muted/10 p-3 sm:p-4`,id:t,children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,children:`Advanced artifact diagnostics`}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 text-sm sm:items-center`,children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`Base artifact ID`}),(0,Z.jsx)(vn,{bundleId:n.id,fullOnMobile:!0,maxLength:18})]}),(0,Z.jsxs)(q,{variant:`outline`,children:[r.length,` `,r.length===1?`patch`:`patches`]})]}),i?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(e,{className:`h-10 w-full`}),(0,Z.jsx)(e,{className:`h-10 w-full`})]}):r.length>0?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`text-xs font-semibold uppercase text-muted-foreground/70`,children:`Patch artifacts from this base`}),o?(0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,children:r.map(e=>(0,Z.jsx)(`div`,{className:`rounded-md border bg-background p-3`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Target artifact ID`}),(0,Z.jsx)(vn,{bundleId:e.id,fullOnMobile:!0,maxLength:18})]}),(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Relation`}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-1 text-sm`,children:[(0,Z.jsx)(vn,{bundleId:n.id,fullOnMobile:!0,maxLength:12}),(0,Z.jsx)(R,{className:`size-4 rotate-90 text-muted-foreground`}),(0,Z.jsx)(vn,{bundleId:e.id,fullOnMobile:!0,maxLength:12})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Artifact`}),(0,Z.jsx)(q,{variant:`secondary`,children:`bsdiff`})]}),(0,Z.jsxs)(`div`,{className:`space-y-1 text-right`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Created`}),(0,Z.jsx)(`div`,{className:`text-xs tabular-nums text-foreground`,children:(0,Z.jsx)(Ln,{uuid:e.id})})]})]}),(0,Z.jsx)(k,{className:`w-full`,onClick:()=>a(e),size:`sm`,type:`button`,variant:`outline`,children:`Detail`})]})},e.id))}):(0,Z.jsx)(`div`,{className:`overflow-x-auto rounded-md border bg-background`,children:(0,Z.jsxs)(_n,{className:`min-w-max`,children:[(0,Z.jsx)(mn,{children:(0,Z.jsxs)(gn,{className:`hover:bg-transparent`,children:[(0,Z.jsx)(J,{children:`Target artifact ID`}),(0,Z.jsx)(J,{children:`Relation`}),(0,Z.jsx)(J,{children:`Artifact`}),(0,Z.jsx)(J,{children:`Created`}),(0,Z.jsx)(J,{className:`w-24 text-right`,children:`Detail`})]})}),(0,Z.jsx)(hn,{children:r.map(e=>(0,Z.jsxs)(gn,{children:[(0,Z.jsx)(Y,{children:(0,Z.jsx)(vn,{bundleId:e.id,fullOnMobile:!0,maxLength:18})}),(0,Z.jsx)(Y,{children:(0,Z.jsxs)(`div`,{className:`flex min-w-[280px] flex-col items-start gap-1 sm:flex-row sm:items-center sm:gap-2`,children:[(0,Z.jsx)(vn,{bundleId:n.id,fullOnMobile:!0,maxLength:12}),(0,Z.jsx)(R,{className:`size-4 shrink-0 rotate-90 text-muted-foreground sm:rotate-0`}),(0,Z.jsx)(vn,{bundleId:e.id,fullOnMobile:!0,maxLength:12})]})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(q,{variant:`secondary`,children:`bsdiff`})}),(0,Z.jsx)(Y,{className:`tabular-nums`,children:(0,Z.jsx)(Ln,{uuid:e.id})}),(0,Z.jsx)(Y,{className:`text-right`,children:(0,Z.jsx)(k,{onClick:()=>a(e),size:`sm`,type:`button`,variant:`outline`,children:`Detail`})})]},e.id))})]})})]}):(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`text-xs font-semibold uppercase text-muted-foreground/70`,children:`Patch artifacts from this base`}),(0,Z.jsx)(`div`,{className:`rounded-md border bg-background p-3 text-sm text-muted-foreground`,children:`No direct patch artifacts.`})]})]})})}function Ir({open:e,onOpenChange:t}){let[n,r]=(0,X.useState)(``),[i,a]=(0,X.useState)(null),o=Ke(i),{data:s=[],isPending:c}=Ft(),l=Lt(),u=zt(),d=n.trim(),f=async e=>{if(e.preventDefault(),!(!d||l.isPending))try{let e=await l.mutateAsync({name:d});r(``),e.inserted?K.success(`Channel ${e.row.name} created`):K.info(`Channel ${e.row.name} already exists`)}catch(e){K.error(`Failed to create channel`),console.error(e)}},p=async()=>{if(!(!i||u.isPending))try{let e=await u.mutateAsync({id:i.id});e.deleted?K.success(`Channel ${i.name} deleted`):e.reason===`not_empty`?K.error(`Channel ${i.name} is still in use and cannot be deleted`):K.error(`Channel ${i.name} no longer exists`),a(null)}catch(e){K.error(`Failed to delete channel`),console.error(e)}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(cn,{open:e,onOpenChange:t,children:(0,Z.jsxs)(rn,{className:`sm:max-w-lg`,children:[(0,Z.jsxs)(tn,{children:[(0,Z.jsxs)(an,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Qn,{className:`size-4 text-muted-foreground`}),`Channels`]}),(0,Z.jsx)(on,{children:`Create deployment channels and remove them when no bundle uses them. Empty channels remain available until you delete them.`})]}),(0,Z.jsx)(`form`,{onSubmit:f,children:(0,Z.jsx)(Tt,{className:`gap-2`,children:(0,Z.jsxs)(Ot,{orientation:`horizontal`,children:[(0,Z.jsx)(Ct,{htmlFor:`channel-name`,className:`sr-only`,children:`Channel name`}),(0,Z.jsx)(y,{id:`channel-name`,value:n,onChange:e=>r(e.target.value),placeholder:`Channel name`,autoComplete:`off`,disabled:l.isPending}),(0,Z.jsxs)(k,{className:`max-md:h-11`,type:`submit`,disabled:!d||l.isPending,children:[l.isPending?(0,Z.jsx)(G,{"data-icon":`inline-start`,className:`animate-spin motion-reduce:animate-none`}):(0,Z.jsx)(Ue,{"data-icon":`inline-start`}),`Create`]})]})})}),(0,Z.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-lg border`,children:c?(0,Z.jsxs)(`div`,{className:`flex h-20 items-center justify-center text-muted-foreground`,children:[(0,Z.jsx)(G,{className:`mr-2 size-3.5 animate-spin motion-reduce:animate-none`}),`Loading channels`]}):s.length===0?(0,Z.jsx)(`div`,{className:`flex h-20 items-center justify-center text-muted-foreground`,children:`No channels yet`}):(0,Z.jsx)(`ul`,{className:`divide-y`,children:s.map(e=>(0,Z.jsxs)(`li`,{className:`flex min-h-12 items-center gap-3 px-3 py-2`,children:[(0,Z.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,title:e.name,children:e.name}),(0,Z.jsx)(k,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Delete ${e.name}`,title:`Delete ${e.name}`,disabled:u.isPending,onClick:()=>a(e),className:`text-muted-foreground hover:text-destructive max-md:size-11`,children:(0,Z.jsx)(Je,{"data-icon":`inline-start`})})]},e.id))})})]})}),(0,Z.jsx)(Qt,{open:i!==null,onOpenChange:e=>{!e&&!u.isPending&&a(null)},children:(0,Z.jsxs)(Kt,{children:[(0,Z.jsxs)(Zt,{children:[(0,Z.jsxs)(qt,{children:[`Delete `,o?.name,`?`]}),(0,Z.jsx)(Gt,{children:`Only empty channels can be removed. The server checks this when you delete it, and the channel can be created again later with a new ID.`})]}),(0,Z.jsxs)(Yt,{children:[(0,Z.jsx)(Xt,{disabled:u.isPending,children:`Cancel`}),(0,Z.jsx)(Jt,{variant:`destructive`,disabled:u.isPending,onClick:e=>{e.preventDefault(),p()},children:u.isPending?`Deleting...`:`Delete channel`})]})]})})]})}var Lr=`[a-zA-Z0-9-]`,Rr=String.raw`0|[1-9]\d*`,zr=String.raw`\d+`,Br=String.raw`\d*[a-zA-Z-]${Lr}*`,Vr=String.raw`(${Rr})\.(${Rr})\.(${Rr})`,Hr=String.raw`(${zr})\.(${zr})\.(${zr})`,Ur=`(?:${Br}|${Rr})`,Wr=`(?:${Br}|${zr})`,Gr=String.raw`(?:-(${Ur}(?:\.${Ur})*))`,Kr=String.raw`(?:-?(${Wr}(?:\.${Wr})*))`,qr=`${Lr}+`,Jr=String.raw`(?:\+(${qr}(?:\.${qr})*))`,Yr=`v?${Vr}${Gr}?${Jr}?`,Xr=String.raw`[v=\s]*${Hr}${Kr}?${Jr}?`,Zr=`((?:<|>)?=?)`,Qr=String.raw`${Rr}|x|X|\*`,$r=String.raw`${zr}|x|X|\*`,ei=String.raw`[v=\s]*(${Qr})(?:\.(${Qr})(?:\.(${Qr})(?:${Gr})?${Jr}?)?)?`,ti=String.raw`[v=\s]*(${$r})(?:\.(${$r})(?:\.(${$r})(?:${Kr})?${Jr}?)?)?`,ni=`(?:~>?)`,ri=String.raw`(?:\^)`,ii=String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;String.raw`${ii}(?:$|[^\d])`,String.raw`${ii}(?:${Gr})?(?:${Jr})?(?:$|[^\d])`;function ai(e){let t=[[String.raw`\s`,1],[String.raw`\d`,256],[Lr,250]];for(let[n,r]of t)e=e.split(`${n}*`).join(`${n}{0,${r}}`).split(`${n}+`).join(`${n}{1,${r}}`);return e}function Q(e,t){return new RegExp(ai(e),t)}var oi=Q(`^${Yr}$`),si=Q(`^${Xr}$`),ci=/^\d+$/;function li(e){let t=`${e.major}.${e.minor}.${e.patch}`;return e.prerelease?.length?`${t}-${e.prerelease.join(`.`)}`:t}function ui(e,t={}){if(typeof e!=`string`)return e;if(e.length>256)throw TypeError(`Version exceeds the maximum length of 256 characters`);let n=e.trim().match(t.loose?si:oi);if(!n)throw TypeError(`Invalid version syntax: ${e}`);let r=Number(n[1]),i=Number(n[2]),a=Number(n[3]);if(r>2**53-1||r<0)throw TypeError(`Invalid major version: ${n[1]}`);if(i>2**53-1||i<0)throw TypeError(`Invalid minor version: ${n[2]}`);if(a>2**53-1||a<0)throw TypeError(`Invalid patch version: ${n[3]}`);let o=n[4]?n[4].split(`.`).map(e=>{if(ci.test(e)){let t=Number(e);if(t>=0&&t<2**53-1)return t}return e}):void 0;return{build:n[5]?.split(`.`),major:r,minor:i,patch:a,prerelease:o}}var di=Q(String.raw`^${Zr}\s*(${Yr})$|^$`),fi=Q(String.raw`^${Zr}\s*(${Xr})$|^$`);function pi(e){return e.version?`${e.operator}${li(e.version)}`:``}function mi(e,t={}){if(typeof e!=`string`)return e;let n=e.trim().replaceAll(/\s+/g,` `),r=n.match(t.loose?fi:di);if(!r)throw TypeError(`Invalid comparator: ${n}`);let i=r[1]===`=`?``:r[1]||``,a=r[2]?ui(r[2],t):null;return{operator:i,options:t,value:a?`${i}${li(a)}`:``,version:a}}function hi(e){return e.sets.map(e=>e.map(pi).join(` `)).join(`||`)}var gi=new RegExp(Jr,`g`),_i=Q(Jr),vi=Q(String.raw`^\s*(${ei})\s+-\s+(${ei})\s*$`),yi=Q(String.raw`^\s*(${ti})\s+-\s+(${ti})\s*$`),bi=Q(String.raw`(\s*)${Zr}\s*(${Xr}|${ei})`,`g`),xi=Q(String.raw`(\s*)${ni}\s+`,`g`),Si=Q(String.raw`(\s*)${ri}\s+`,`g`),Ci=Q(`^${ni}${ei}$`),wi=Q(`^${ni}${ti}$`),Ti=Q(`^${ri}${ei}$`),Ei=Q(`^${ri}${ti}$`),Di=Q(String.raw`^${Zr}\s*${ei}$`),Oi=Q(String.raw`^${Zr}\s*${ti}$`),ki=Q(String.raw`(<|>)?=?\s*\*`),Ai=/^\s*>=\s*0\.0\.0\s*$/,ji=/^\s*>=\s*0\.0\.0-0\s*$/,Mi=Q(String.raw`^${Zr}\s*(${Xr})$|^$`);function $(e){return!e||String(e).toLowerCase()===`x`||String(e)===`*`}function Ni(e,t,n){return $(e)&&!$(t)||$(t)&&!!n&&!$(n)}function Pi(e,t){let n=t.loose?wi:Ci,r=t.includePrerelease?`-0`:``;return e.replace(n,(e,t,n,i,a)=>$(t)?``:$(n)?`>=${t}.0.0${r} <${Number(t)+1}.0.0-0`:$(i)?`>=${t}.${n}.0${r} <${t}.${Number(n)+1}.0-0`:a?`>=${t}.${n}.${i}-${a} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${i} <${t}.${Number(n)+1}.0-0`)}function Fi(e,t){return e.trim().split(/\s+/).map(e=>Pi(e,t)).join(` `)}function Ii(e,t){let n=t.loose?Ei:Ti,r=t.includePrerelease?`-0`:``;return e.replace(n,(e,t,n,i,a)=>$(t)?``:$(n)?`>=${t}.0.0${r} <${Number(t)+1}.0.0-0`:$(i)?t===`0`?`>=${t}.${n}.0${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0${r} <${Number(t)+1}.0.0-0`:a?t===`0`?n===`0`?`>=${t}.${n}.${i}-${a} <${t}.${n}.${Number(i)+1}-0`:`>=${t}.${n}.${i}-${a} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${i}-${a} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${i} <${t}.${n}.${Number(i)+1}-0`:`>=${t}.${n}.${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${i} <${Number(t)+1}.0.0-0`)}function Li(e,t){return e.trim().split(/\s+/).map(e=>Ii(e,t)).join(` `)}function Ri(e,t){let n=t.loose?Oi:Di;return e.trim().replace(n,(n,r,i,a,o)=>{let s=r,c=i,l=a,u=o;if(Ni(String(c),l===void 0?void 0:String(l),u===void 0?void 0:String(u)))return e;let d=$(c),f=d||$(l),p=f||$(u);if(s===`=`&&p&&(s=``),d)return s===`>`||s===`<`?`<0.0.0-0`:`*`;let m=t.includePrerelease?`-0`:``;return s&&p?(f&&(l=0),u=0,s===`>`?(s=`>=`,f?(c=Number(c)+1,l=0):l=Number(l)+1):s===`<=`&&(s=`<`,f?c=Number(c)+1:l=Number(l)+1),s===`<`&&(m=`-0`),`${s}${c}.${l}.${u}${m}`):f?`>=${c}.0.0${m} <${Number(c)+1}.0.0-0`:p?`>=${c}.${l}.0${m} <${c}.${Number(l)+1}.0-0`:n})}function zi(e,t){return e.split(/\s+/).map(e=>Ri(e,t)).join(` `)}function Bi(e,t){let n=t.loose?yi:vi;return e.replace(n,(e,n,r,i,a,o,s,c,l,u,d,f)=>{let p=n,m=c;return p=$(r)?``:$(i)?`>=${r}.0.0${t.includePrerelease?`-0`:``}`:$(a)?`>=${r}.${i}.0${t.includePrerelease?`-0`:``}`:o?`>=${p}`:`>=${p}${t.includePrerelease?`-0`:``}`,m=$(l)?``:$(u)?`<${Number(l)+1}.0.0-0`:$(d)?`<${l}.${Number(u)+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:t.includePrerelease?`<${l}.${u}.${Number(d)+1}-0`:`<=${m}`,`${p} ${m}`.trim()})}function Vi(e,t){return zi(Fi(Li(e.replace(_i,``),t),t),t).trim().replace(ki,``)}function Hi(e,t){let n=Bi(e.replace(gi,``),t).replace(bi,`$1$2$3`).replace(xi,`$1~`).replace(Si,`$1^`).split(` `).map(e=>Vi(e,t)).join(` `).split(/\s+/).map(e=>e.trim().replace(t.includePrerelease?ji:Ai,``));t.loose&&(n=n.filter(e=>Mi.test(e)));let r=new Map;for(let e of n.map(e=>mi(e,t))){if(e.value===`<0.0.0-0`)return[e];r.set(e.value,e)}return r.size>1&&r.delete(``),[...r.values()]}function Ui(e,t={}){if(typeof e!=`string`)return e;let n={...t},r=e.trim().replaceAll(/\s+/g,` `),i=r.split(`||`).map(e=>Hi(e.trim(),n)).filter(e=>e.length);if(!i.length)throw TypeError(`Range contains no valid comparator sets: ${r}`);if(i.length>1){let e=i[0];if(i=i.filter(e=>e[0]?.value!==`<0.0.0-0`),!i.length)i=[e];else if(i.length>1){let e=i.find(e=>e.length===1&&e[0]?.value===``);e&&(i=[e])}}return{options:n,sets:i}}function Wi(e,t={}){try{return Ui(e,t)}catch{return null}}function Gi(e,t={}){let n=Wi(e,t);return n?hi(n)||`*`:null}function Ki({label:e,value:t}){return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 sm:flex-row sm:items-start sm:justify-between sm:gap-4`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,Z.jsx)(`dd`,{className:`min-w-0 text-left text-sm sm:text-right`,children:t})]})}function qi({bundle:e,release:t}){let{data:n,isFetched:r}=Mt(),i=e?yt(e):null,a=e?ht(e):null,o=e?.gitCommitHash&&r?In(n?.console.gitUrl,e.gitCommitHash):null,s=t.strategy===`APP_VERSION`?t.target_app_version:t.fingerprint_hash;return s||e?.gitCommitHash||e?.manifestFileHash||a||i?(0,Z.jsxs)(pt,{children:[(0,Z.jsx)(lt,{className:`p-4 pb-3`,children:(0,Z.jsx)(dt,{className:`text-sm font-medium`,children:`Metadata`})}),(0,Z.jsx)(ut,{className:`px-4 pb-4`,children:(0,Z.jsxs)(`dl`,{className:`flex flex-col gap-3 text-sm`,children:[(0,Z.jsx)(Ki,{label:t.strategy===`APP_VERSION`?`Target app version`:`Fingerprint target`,value:(0,Z.jsx)(`span`,{className:`break-all font-mono text-xs`,translate:`no`,children:s??`—`})}),e?.gitCommitHash?(0,Z.jsx)(Ki,{label:`Git commit`,value:(0,Z.jsxs)(`div`,{className:`flex items-center justify-start gap-1 sm:justify-end`,children:[(0,Z.jsx)(zn,{className:o?`text-primary`:void 0,maxLength:12,value:e.gitCommitHash}),o?(0,Z.jsx)(`a`,{"aria-label":`Open git commit`,className:`relative shrink-0 text-primary after:absolute after:-inset-2.5 hover:underline md:after:hidden`,href:o,rel:`noopener noreferrer`,target:`_blank`,children:(0,Z.jsx)(Yn,{"aria-hidden":`true`})}):null]})}):null,e?.manifestFileHash?(0,Z.jsx)(Ki,{label:`Manifest hash`,value:(0,Z.jsx)(zn,{maxLength:16,value:e.manifestFileHash})}):null,a?(0,Z.jsx)(Ki,{label:`Base hash`,value:(0,Z.jsx)(zn,{maxLength:16,value:a})}):null,i?(0,Z.jsx)(Ki,{label:`Patch hash`,value:(0,Z.jsx)(zn,{maxLength:16,value:i})}):null]})})]}):null}var Ji=Array.from({length:mt},(e,t)=>t+1);function Yi({releaseId:e,rolloutCohortCount:t,targetCohorts:n}){let r=_t(t),i=n??[],a=i.length>0,o=r>0&&r<1e3,s=r===mt,c=A(),l=s?Ji:o?Ji.filter(t=>bt(e,t)<r):[],u=(r/10).toFixed(1),d=s?mt:l.length,f=mt-d,p=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,Z.jsx)(pt,{children:(0,Z.jsxs)(lt,{className:`p-4`,children:[(0,Z.jsx)(ft,{children:`Selected cohorts`}),(0,Z.jsx)(dt,{className:`font-mono text-2xl tabular-nums`,children:d})]})}),(0,Z.jsx)(pt,{children:(0,Z.jsxs)(lt,{className:`p-4`,children:[(0,Z.jsx)(ft,{children:`Excluded cohorts`}),(0,Z.jsx)(dt,{className:`font-mono text-2xl tabular-nums`,children:f})]})})]}),a?(0,Z.jsxs)(pt,{children:[(0,Z.jsxs)(lt,{className:`p-4 pb-3`,children:[(0,Z.jsx)(dt,{className:`text-sm`,children:`Additional cohorts`}),(0,Z.jsx)(ft,{children:`Always included in addition to the percentage rollout.`})]}),(0,Z.jsx)(ut,{className:`p-4 pt-0`,children:(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2 rounded-lg border bg-muted/20 p-3`,children:i.map(e=>(0,Z.jsx)(q,{className:`max-w-full font-mono`,variant:`secondary`,children:(0,Z.jsx)(`span`,{className:`truncate`,children:e})},e))})})]}):null,(0,Z.jsxs)(pt,{children:[(0,Z.jsx)(lt,{className:`p-4 pb-3`,children:(0,Z.jsx)(dt,{className:`text-sm`,children:`Numeric cohorts`})}),(0,Z.jsx)(ut,{className:`p-4 pt-0`,children:(0,Z.jsx)(`div`,{className:`max-h-[50vh] overflow-y-auto overscroll-contain rounded-lg border bg-muted/20 p-3 sm:max-h-[45vh]`,children:l.length>0?(0,Z.jsx)(`div`,{"aria-label":`Included numeric cohorts`,className:`grid grid-cols-3 gap-2 sm:grid-cols-6 lg:grid-cols-8`,role:`list`,children:l.map(e=>(0,Z.jsx)(q,{className:`justify-center font-mono tabular-nums`,role:`listitem`,variant:`outline`,children:e},e))}):(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No numeric cohorts are included.`})})})]})]});return(0,Z.jsxs)(cn,{children:[(0,Z.jsxs)(sn,{render:(0,Z.jsx)(k,{className:`max-md:h-11`,size:`sm`,type:`button`,variant:`outline`}),children:[(0,Z.jsx)(Re,{"data-icon":`inline-start`}),`Preview cohorts`]}),(0,Z.jsx)(rn,{className:c?`top-0 left-0 h-dvh max-w-none translate-x-0 translate-y-0 rounded-none border-0 p-0`:`sm:max-w-3xl`,children:c?(0,Z.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden`,children:[(0,Z.jsxs)(tn,{className:`shrink-0 border-b border-border/70 px-4 py-4`,children:[(0,Z.jsx)(an,{children:`Rolled out cohorts`}),(0,Z.jsxs)(on,{children:[u,`% includes `,d,` of`,` `,mt,` numeric cohorts.`,a?` Additional cohorts are always included.`:``]})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto overscroll-contain px-4 py-4`,children:p}),(0,Z.jsx)(nn,{className:`shrink-0 border-t border-border/70 px-4 py-3`,showCloseButton:!0})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(tn,{children:[(0,Z.jsx)(an,{children:`Rolled out cohorts`}),(0,Z.jsxs)(on,{children:[u,`% includes `,d,` of`,` `,mt,` numeric cohorts.`,a?` Additional cohorts are always included.`:``]})]}),p,(0,Z.jsx)(nn,{showCloseButton:!0})]})})]})}function Xi({release:t,channel:n,bundle:r}){let i=t.bundle_id===null?null:{platform:t.platform,channel:n,fingerprintHash:t.fingerprint_hash,targetAppVersion:t.target_app_version},a=i!==null&&Ve(i)!==null,o=Ut(a?i:null);if(!a)return null;let s=o.data;return(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Native build`}),o.isPending?(0,Z.jsx)(e,{className:`h-4 w-40`}):s?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(L,{className:`inline-flex flex-wrap items-center gap-x-1 gap-y-0.5 text-xs text-foreground underline-offset-4 hover:underline`,params:{buildId:s.id},to:`/native-builds/$buildId`,children:[ze(s.platform),` `,He[s.artifact_kind].label,` ·`,` `,(0,Z.jsx)(`span`,{className:`font-mono`,translate:`no`,children:s.min_bundle_id}),(0,Z.jsx)(_e,{"aria-hidden":`true`,className:`size-3`})]}),r?(0,Z.jsx)(q,{variant:`secondary`,children:(r.patches??[]).some(({baseBundleId:e})=>e===s.min_bundle_id)?`Patches from it`:`No patch from it`}):null]}):o.isError?(0,Z.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`Couldn't load the scope's native build.`,` `,(0,Z.jsx)(`button`,{className:`underline underline-offset-4`,onClick:()=>void o.refetch(),type:`button`,children:`Retry`})]}):(0,Z.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`None tracked for this scope ·`,` `,(0,Z.jsx)(L,{className:`relative underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-4 hover:text-foreground hover:underline md:after:hidden`,search:{channel:n},to:`/native-builds`,children:`This channel's builds`})]})]})}function Zi({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=Array.isArray(n)?n:n===void 0?Array.isArray(t)?t:t===void 0?[r]:[t]:[n];return(0,Z.jsx)(hr,{className:N(`data-horizontal:w-full data-vertical:h-full`,e),"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,thumbAlignment:`edge`,...a,children:(0,Z.jsxs)(wr,{className:`relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col`,children:[(0,Z.jsx)(Tr,{"data-slot":`slider-track`,className:`relative grow overflow-hidden rounded-full bg-primary/20 select-none data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5`,children:(0,Z.jsx)(Nr,{"data-slot":`slider-range`,className:`bg-primary select-none data-horizontal:h-full data-vertical:w-full`})}),Array.from({length:o.length},(e,t)=>(0,Z.jsx)(Ar,{"data-slot":`slider-thumb`,className:`relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow transition-colors select-none after:absolute after:-inset-2 max-md:after:-inset-3.5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-50`},t))]})})}var Qi=[{label:`Move bundle`,value:`move`},{label:`Copy bundle`,value:`copy`}],$i=e=>({enabled:e.enabled,message:e.message??``,rolloutCohortCount:e.rollout_cohort_count,shouldForceUpdate:e.should_force_update,targetAppVersion:e.target_app_version??``,targetCohorts:[...e.target_cohorts]}),ea=(e,t)=>({enabled:t.enabled,message:t.message.trim()||null,rolloutCohortCount:t.rolloutCohortCount,shouldForceUpdate:t.shouldForceUpdate,...e.strategy===`APP_VERSION`?{targetAppVersion:t.targetAppVersion.trim()}:{},targetCohorts:t.targetCohorts}),ta=e=>(e/10).toFixed(1),na=e=>{let t=e.replace(`,`,`.`),[n=``,...r]=t.split(`.`),i=n.replace(/\D/g,``).slice(0,3),a=r.join(``).replace(/\D/g,``).slice(0,1);return t.includes(`.`)?`${i}.${a}`:i},ra=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?Math.min(1e3,Math.max(0,Math.trunc(t*10))):null};function ia({value:e,onChange:t}){let[n,r]=(0,X.useState)(ta(e)),[i,a]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{i||r(ta(e))},[i,e]),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(Zi,{"aria-label":`Rollout percentage`,max:1e3,min:0,onValueChange:n=>t(Array.isArray(n)?n[0]??e:n),step:1,value:e}),(0,Z.jsxs)(pn,{className:`w-24 shrink-0`,children:[(0,Z.jsx)(un,{"aria-label":`Rollout percentage`,autoComplete:`off`,className:`text-right tabular-nums`,id:`release-rollout-percentage`,inputMode:`decimal`,name:`rolloutPercentage`,onBlur:()=>{let i=ra(n)??e;a(!1),r(ta(i)),t(i)},onChange:e=>{let n=na(e.target.value);r(n);let i=ra(n);i!==null&&t(i)},onFocus:()=>a(!0),value:n}),(0,Z.jsx)(dn,{align:`inline-end`,children:(0,Z.jsx)(ln,{children:`%`})})]})]})}function aa({channels:t,onOpenChange:n,onShowScope:i,open:a,releaseId:o}){let s=At(o),c=s.data,l=Rt(c?.bundle_id??``),u=l.data,d=u?xt(u):null,f=Wt(c?.scope_key??``),p=Ht(),m=jt(),h=Pt(),g=Vt(),[_,v]=(0,X.useState)(null),[b,x]=(0,X.useState)(``),[S,C]=(0,X.useState)(``),[w,T]=(0,X.useState)(!1),[ee,E]=(0,X.useState)(!1),[D,O]=(0,X.useState)(!1),[te,re]=(0,X.useState)(``),[ae,oe]=(0,X.useState)(`move`);(0,X.useEffect)(()=>{v(c?$i(c):null),C(``)},[c]);let ce=c?$i(c):null,ue=_!==null&&ce!==null&&JSON.stringify(_)!==JSON.stringify(ce),A=m.isPending||p.isPending||h.isPending||g.isPending,de=()=>{if(!A){if(ue){T(!0);return}n(!1)}},fe=()=>{if(!_)return;let e=gt(b);if(!St(e)){C(vt);return}v({..._,targetCohorts:Array.from(new Set([..._.targetCohorts,e]))}),x(``),C(``)},pe=async()=>{if(!c||!_)return;let e=_.targetCohorts.map(gt);if(e.some(e=>!St(e))){C(vt);return}if(c.strategy===`APP_VERSION`&&!Gi(_.targetAppVersion.trim())){C(`Enter a valid target app version range.`);return}let t={expectedRevision:c.revision,patch:ea(c,{..._,targetCohorts:e}),releaseId:c.id};C(``);try{await m.mutateAsync(t),await p.mutateAsync(t),K.success(`Bundle settings saved`),n(!1)}catch(e){C(e instanceof Error?e.message:`Bundle settings could not be saved.`)}},M=t.find(e=>e.id===c?.channel_id)?.name??c?.channel_id,N=t.filter(e=>e.id!==c?.channel_id),me=N.map(e=>({label:e.name,value:e.name})),P=te.trim(),F=ae===`copy`,he=_?Gi(_.targetAppVersion.trim()):null,ge=()=>{re(``),oe(`move`)},L=e=>{!e&&g.isPending||(O(e),e||ge())};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(le,{onOpenChange:e=>e?void 0:de(),open:a,children:(0,Z.jsxs)(ne,{className:`min-w-0 overflow-hidden data-[side=right]:w-full sm:max-w-[600px]`,children:[(0,Z.jsxs)(I,{className:`shrink-0 pr-12`,children:[(0,Z.jsx)(ie,{children:`Bundle Detail`}),(0,Z.jsx)(j,{className:`sr-only`,children:`Edit bundle delivery settings.`}),c?(0,Z.jsxs)(`div`,{className:`mt-1 flex min-w-0 flex-col gap-3 text-sm`,children:[(0,Z.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(en,{className:`size-4`,platform:c.platform}),(0,Z.jsx)(`span`,{className:`font-medium`,children:c.platform===`ios`?`iOS`:`Android`})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`ID`}),(0,Z.jsxs)(`span`,{className:`min-w-0 basis-full sm:basis-auto`,children:[(0,Z.jsx)(vn,{bundleId:c.id,fullOnMobile:!0,maxLength:18}),c.bundle_id?null:(0,Z.jsx)(`span`,{className:`text-xs text-foreground`,children:`Built-in bundle`})]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Channel`}),(0,Z.jsx)(`span`,{className:`text-xs text-foreground`,translate:`no`,children:M})]}),M?(0,Z.jsx)(Xi,{bundle:u,channel:M,release:c}):null,(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Platform`}),(0,Z.jsx)(`span`,{className:`text-xs text-foreground`,children:c.platform===`ios`?`iOS`:`Android`})]})]}):(0,Z.jsx)(e,{className:`h-12 w-full`})]}),(0,Z.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:[s.isError?(0,Z.jsxs)(Ze,{className:`m-4 sm:m-6`,variant:`destructive`,children:[(0,Z.jsx)(Qe,{}),(0,Z.jsx)(Ye,{children:`Bundle details could not be loaded`}),(0,Z.jsx)(Xe,{children:s.error.message})]}):null,c&&_?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6 px-4 pb-4 sm:px-6 sm:pb-6`,children:[M?(0,Z.jsx)(Ce,{release:{platform:c.platform,channel:M,releaseId:c.id,builtIn:!c.bundle_id}}):null,(0,Z.jsxs)(`section`,{"aria-labelledby":`delivery-settings-heading`,className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,id:`delivery-settings-heading`,children:`Delivery settings`}),(0,Z.jsxs)(Tt,{className:`gap-6`,children:[(0,Z.jsxs)(Ot,{children:[(0,Z.jsx)(Ct,{htmlFor:`release-message`,children:`Message`}),(0,Z.jsx)(fn,{autoComplete:`off`,id:`release-message`,name:`message`,onChange:e=>v({..._,message:e.target.value}),rows:3,value:_.message})]}),c.strategy===`APP_VERSION`?(0,Z.jsxs)(Ot,{children:[(0,Z.jsx)(Ct,{htmlFor:`release-target`,children:`Target app version`}),(0,Z.jsx)(y,{autoComplete:`off`,id:`release-target`,name:`targetAppVersion`,onChange:e=>v({..._,targetAppVersion:e.target.value}),value:_.targetAppVersion}),he?(0,Z.jsx)(Et,{children:he}):null]}):null,(0,Z.jsx)(Ot,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(Ct,{htmlFor:`release-enabled`,children:`Enabled`}),(0,Z.jsx)(ct,{label:`About Enabled`,children:`Disabling rolls devices back to the previous enabled bundle on their next check, or to the built-in app when none remains.`})]}),(0,Z.jsx)(qe,{"aria-label":`Enabled`,checked:_.enabled,id:`release-enabled`,name:`enabled`,onCheckedChange:e=>v({..._,enabled:e})})]})}),(0,Z.jsx)(Ot,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(Ct,{htmlFor:`release-force-update`,children:`Force update`}),(0,Z.jsx)(ct,{label:`About Force update`,children:`Devices apply this bundle right away, and so do devices that skip it to update straight to a newer bundle.`})]}),(0,Z.jsx)(qe,{"aria-label":`Force update`,checked:_.shouldForceUpdate,id:`release-force-update`,name:`shouldForceUpdate`,onCheckedChange:e=>v({..._,shouldForceUpdate:e})})]})}),(0,Z.jsxs)(Ot,{children:[(0,Z.jsx)(Ct,{htmlFor:`release-rollout-percentage`,children:`Rollout percentage`}),(0,Z.jsx)(ia,{onChange:e=>v({..._,rolloutCohortCount:e}),value:_.rolloutCohortCount})]}),(0,Z.jsxs)(Ot,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Z.jsx)(Ct,{htmlFor:`release-cohort`,children:`Additional cohorts (optional)`}),(0,Z.jsx)(Yi,{releaseId:c.id,rolloutCohortCount:_.rolloutCohortCount,targetCohorts:_.targetCohorts})]}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(y,{autoComplete:`off`,id:`release-cohort`,name:`targetCohort`,onChange:e=>x(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),fe())},placeholder:`e.g. qa-team…`,value:b}),(0,Z.jsx)(k,{"aria-label":`Add cohort`,className:`max-md:size-11`,disabled:!b.trim(),onClick:fe,size:`icon`,type:`button`,variant:`outline`,children:(0,Z.jsx)(Ue,{})})]}),_.targetCohorts.length?(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:_.targetCohorts.map(e=>(0,Z.jsxs)(q,{className:`gap-1 font-mono`,variant:`secondary`,children:[e,(0,Z.jsx)(`button`,{"aria-label":`Remove cohort ${e}`,className:`rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>v({..._,targetCohorts:_.targetCohorts.filter(t=>t!==e)}),type:`button`,children:(0,Z.jsx)(r,{className:`size-3`})})]},e))}):null,(0,Z.jsx)(Et,{children:`Public names—no IDs or secrets.`})]})]}),S?(0,Z.jsx)(Dt,{children:S}):null,(0,Z.jsx)(k,{className:`w-full max-md:h-11`,disabled:!ue||A,onClick:pe,size:`lg`,children:m.isPending||p.isPending?`Saving…`:`Save changes`})]}),(0,Z.jsx)(se,{className:`my-2`}),(0,Z.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,children:`Actions`}),(0,Z.jsx)(k,{className:`w-full max-md:h-11`,disabled:!c.bundle_id||A,onClick:()=>O(!0),size:`sm`,variant:`outline`,children:`Promote to channel`}),c.bundle_id?(0,Z.jsxs)(k,{className:`w-full max-md:h-11`,disabled:A,onClick:()=>{window.open(`/api/bundles/${encodeURIComponent(c.bundle_id)}/download`,`_blank`,`noopener,noreferrer`),K.success(`Bundle download started`)},size:`sm`,variant:`outline`,children:[(0,Z.jsx)(Le,{"data-icon":`inline-start`}),`Download manifest`]}):null,(0,Z.jsx)(k,{className:`w-full max-md:h-11`,disabled:c.enabled||A,onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:`Remove from channel`})]}),c.bundle_id&&l.isPending?(0,Z.jsx)(e,{className:`h-40 w-full`}):null,c.bundle_id&&l.isError?(0,Z.jsxs)(Ze,{variant:`destructive`,children:[(0,Z.jsx)(Qe,{}),(0,Z.jsx)(Ye,{children:`Build details are unavailable`}),(0,Z.jsx)(Xe,{children:`Delivery settings are unaffected.`})]}):null,!c.bundle_id||!l.isPending?(0,Z.jsx)(qi,{bundle:u,release:c}):null,(0,Z.jsxs)(`details`,{className:`rounded-lg border bg-muted/10 p-4 text-xs`,children:[(0,Z.jsx)(`summary`,{className:`cursor-pointer font-medium`,children:`Advanced diagnostics`}),(0,Z.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-muted-foreground sm:grid-cols-2`,children:[(0,Z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Z.jsx)(`dt`,{children:`Artifact ID`}),(0,Z.jsx)(`dd`,{className:`mt-1 break-all font-mono text-foreground`,children:c.bundle_id??`Built-in bundle`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{children:`Revision`}),(0,Z.jsx)(`dd`,{className:`mt-1 font-mono text-foreground`,children:c.revision})]}),d?(0,Z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Z.jsx)(`dt`,{children:`Patch base artifact ID`}),(0,Z.jsx)(`dd`,{className:`mt-1 break-all font-mono text-foreground`,children:d})]}):null,(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{children:`Catalog generation`}),(0,Z.jsx)(`dd`,{className:`mt-1 font-mono text-foreground`,children:f.data?.generation??`—`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{children:`Catalog size`}),(0,Z.jsx)(`dd`,{className:`mt-1 font-mono text-foreground`,children:f.data?`${f.data.byte_size} bytes`:`—`})]}),(0,Z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Z.jsx)(`dt`,{children:`Scope key`}),(0,Z.jsx)(`dd`,{className:`mt-1 break-all font-mono text-foreground`,children:c.scope_key}),i?(0,Z.jsx)(k,{className:`mt-1 h-auto px-0 text-xs max-md:min-h-11`,onClick:()=>i(c.scope_key),size:`sm`,variant:`link`,children:`Show bundles for this target`}):null]})]}),f.isError?(0,Z.jsx)(`p`,{className:`mt-3 text-destructive`,children:`Diagnostics are unavailable. Bundle settings are unaffected.`}):null]})]}):null]})]})}),(0,Z.jsx)(Qt,{onOpenChange:T,open:w,children:(0,Z.jsxs)(Kt,{children:[(0,Z.jsxs)(Zt,{children:[(0,Z.jsx)(qt,{children:`Discard unsaved changes?`}),(0,Z.jsx)(Gt,{children:`Your Bundle changes will be lost.`})]}),(0,Z.jsxs)(Yt,{children:[(0,Z.jsx)(Xt,{children:`Keep editing`}),(0,Z.jsx)(Jt,{onClick:()=>{T(!1),n(!1)},variant:`destructive`,children:`Discard changes`})]})]})}),(0,Z.jsx)(Qt,{onOpenChange:E,open:ee,children:(0,Z.jsxs)(Kt,{children:[(0,Z.jsxs)(Zt,{children:[(0,Z.jsxs)(qt,{children:[`Remove this Bundle from `,M??`the channel`,`?`]}),(0,Z.jsx)(Gt,{children:`The uploaded artifact stays available. This only removes the Bundle from the channel.`})]}),(0,Z.jsxs)(Yt,{children:[(0,Z.jsx)(Xt,{children:`Cancel`}),(0,Z.jsx)(Jt,{onClick:async()=>{if(c)try{await h.mutateAsync({expectedRevision:c.revision,releaseId:c.id}),K.success(`Bundle removed from ${M??`the channel`}`),E(!1),n(!1)}catch(e){C(e instanceof Error?e.message:`Bundle could not be removed from the channel.`)}},variant:`destructive`,children:`Remove from channel`})]})]})}),(0,Z.jsx)(cn,{onOpenChange:L,open:D,children:(0,Z.jsxs)(rn,{showCloseButton:!g.isPending,children:[(0,Z.jsxs)(tn,{children:[(0,Z.jsx)(an,{children:`Promote to Channel`}),(0,Z.jsx)(on,{children:`Choose how to promote this Bundle, then select the target channel.`})]}),(0,Z.jsxs)(`div`,{className:`space-y-4 py-4`,children:[(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(wt,{htmlFor:`promote-action`,children:`Action`}),(0,Z.jsxs)(Fe,{disabled:g.isPending,items:Qi,onValueChange:e=>oe(e),value:ae,children:[(0,Z.jsx)(je,{className:`w-full`,id:`promote-action`,children:(0,Z.jsx)(Ne,{placeholder:`Select an action`})}),(0,Z.jsx)(U,{children:(0,Z.jsxs)(Pe,{children:[(0,Z.jsx)(H,{value:`move`,children:`Move bundle`}),(0,Z.jsx)(H,{value:`copy`,children:`Copy bundle`})]})})]}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:F?`Make this Bundle available in the target channel and keep it in the current channel.`:`Move this Bundle to the target channel. Devices in the current channel may fall back to an earlier Bundle.`})]}),(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(wt,{htmlFor:`target-channel`,children:`Target Channel`}),(0,Z.jsxs)(Fe,{disabled:g.isPending,items:me,onValueChange:e=>re(e??``),value:te||null,children:[(0,Z.jsx)(je,{className:`w-full`,id:`target-channel`,children:(0,Z.jsx)(Ne,{placeholder:`Select a channel`})}),(0,Z.jsx)(U,{className:`md:max-h-64`,children:(0,Z.jsx)(Pe,{children:N.map(e=>(0,Z.jsx)(H,{value:e.name,children:e.name},e.id))})})]})]})]}),(0,Z.jsxs)(nn,{children:[(0,Z.jsx)(k,{disabled:g.isPending,onClick:()=>L(!1),variant:`outline`,children:`Cancel`}),(0,Z.jsx)(k,{disabled:!P||g.isPending,onClick:async()=>{if(c)try{await g.mutateAsync({action:ae,expectedRevision:c.revision,releaseId:c.id,targetChannel:P}),L(!1),K.success(F?`Bundle copied to ${P}`:`Bundle moved to ${P}`)}catch(e){K.error(e instanceof Error?e.message:`Bundle could not be promoted.`)}},children:g.isPending?F?`Copying…`:`Moving…`:F?`Copy`:`Move`})]})]})})]})}function oa({release:e}){return(0,Z.jsxs)(q,{className:`gap-1 font-normal text-muted-foreground`,variant:e.enabled?`outline`:`secondary`,children:[e.enabled?(0,Z.jsx)(V,{className:`size-3`}):(0,Z.jsx)(Ie,{className:`size-3`}),e.enabled?`Enabled`:`Disabled`]})}var sa={data:void 0,error:null,isError:!1,isPending:!0,isPlaceholderData:!1},ca={one:`unreachable bundle`,other:`unreachable bundles`},la=[{label:`iOS`,value:`ios`},{label:`Android`,value:`android`}],ua=[{label:`Any Status`,value:`all`},{label:`Enabled`,value:`enabled`},{label:`Disabled`,value:`disabled`}];function da({channels:e,clearable:t,onChange:n,onClear:i,onManageChannels:a,pending:o,search:s}){let c=s.channelId!==void 0;return(0,Z.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-2 border-b bg-background px-3 py-3 sm:h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:py-0 sm:backdrop-blur-sm`,children:[(0,Z.jsx)(pe,{className:`-ml-1 size-11 lg:size-7`}),(0,Z.jsx)(`h1`,{className:`sr-only`,children:`Bundles`}),(0,Z.jsxs)(`div`,{className:`ml-1 flex items-center gap-1.5 text-muted-foreground sm:ml-2`,children:[(0,Z.jsx)(Xn,{className:`size-3.5`}),(0,Z.jsx)(`span`,{className:`text-xs font-medium`,children:`Filters`})]}),(0,Z.jsx)(bn,{allChannels:!0,className:`max-sm:order-1 max-sm:min-w-0 max-sm:basis-full`,onValueChange:t=>n(t===void 0?{channelId:void 0,channels:`all`}:{channelId:e.find(e=>e.name===t)?.id??t}),pending:o,value:s.channelId===void 0?void 0:e.find(({id:e})=>e===s.channelId)?.name??s.channelId}),(0,Z.jsxs)(Fe,{disabled:!c,items:la,onValueChange:e=>n({platform:e===`android`?`android`:`ios`}),value:s.platform??`ios`,children:[(0,Z.jsx)(je,{"aria-label":`Platform`,className:`w-[calc(50%-0.25rem)] min-w-[132px] text-sm data-[size=default]:h-11 max-sm:order-2 sm:w-[140px] sm:text-xs sm:data-[size=default]:h-8`,title:c?void 0:`Choose a channel first`,children:(0,Z.jsx)(Ne,{})}),(0,Z.jsx)(U,{children:(0,Z.jsxs)(Pe,{children:[(0,Z.jsx)(H,{value:`ios`,children:`iOS`}),(0,Z.jsx)(H,{value:`android`,children:`Android`})]})})]}),(0,Z.jsxs)(Fe,{disabled:!c&&s.scopeKey===void 0,items:ua,onValueChange:e=>n({enabled:e===`enabled`?!0:e===`disabled`?!1:void 0}),value:s.enabled===void 0?`all`:s.enabled?`enabled`:`disabled`,children:[(0,Z.jsx)(je,{"aria-label":`Status`,className:`w-[calc(50%-0.25rem)] min-w-[132px] text-sm data-[size=default]:h-11 max-sm:order-2 sm:w-[140px] sm:text-xs sm:data-[size=default]:h-8`,children:(0,Z.jsx)(Ne,{})}),(0,Z.jsx)(U,{children:(0,Z.jsxs)(Pe,{children:[(0,Z.jsx)(H,{value:`all`,children:`Any Status`}),(0,Z.jsx)(H,{value:`enabled`,children:`Enabled`}),(0,Z.jsx)(H,{value:`disabled`,children:`Disabled`})]})})]}),(0,Z.jsx)(k,{"aria-label":`Manage channels`,className:`size-11 max-sm:ml-auto sm:size-7`,onClick:a,size:`icon-sm`,title:`Manage channels`,variant:`outline`,children:(0,Z.jsx)($n,{})}),s.bundleId?(0,Z.jsxs)(q,{className:`max-w-48 gap-1 max-sm:order-3`,variant:`secondary`,children:[`Artifact filter`,(0,Z.jsx)(`button`,{"aria-label":`Clear artifact filter`,className:`relative rounded-sm after:absolute after:-inset-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:after:hidden`,onClick:()=>n({bundleId:void 0}),type:`button`,children:(0,Z.jsx)(r,{className:`size-3`})})]}):null,s.scopeKey?(0,Z.jsxs)(q,{className:`max-w-48 gap-1 max-sm:order-3`,variant:`secondary`,children:[`Target filter`,(0,Z.jsx)(`button`,{"aria-label":`Clear target filter`,className:`relative rounded-sm after:absolute after:-inset-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:after:hidden`,onClick:()=>n({scopeKey:void 0}),type:`button`,children:(0,Z.jsx)(r,{className:`size-3`})})]}):null,t?(0,Z.jsxs)(k,{className:`h-11 px-2 text-xs text-muted-foreground hover:text-foreground max-sm:order-3 sm:ml-auto sm:h-8`,onClick:i,size:`sm`,variant:`ghost`,children:[(0,Z.jsx)(r,{"data-icon":`inline-start`}),`Clear`]}):null]})}function fa({expanded:e,onOpen:t,onToggleExpand:n,release:r}){let i=r.operation===`PROMOTE`?`Promoted`:r.operation===`ROLLBACK`?`Rollback`:null;return(0,Z.jsxs)(`div`,{className:`flex min-w-[240px] items-center gap-3`,children:[r.bundle_id?(0,Z.jsx)(k,{"aria-controls":`bundle-lineage-panel-${r.id}`,"aria-expanded":e,"aria-label":e?`Hide advanced artifact diagnostics`:`Show advanced artifact diagnostics`,title:`Advanced artifact diagnostics`,className:`size-11 shrink-0 touch-manipulation sm:size-8`,onClick:n,size:`icon`,type:`button`,variant:`ghost`,children:e?(0,Z.jsx)(we,{}):(0,Z.jsx)(Ae,{})}):(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-11 shrink-0 sm:size-8`}),(0,Z.jsxs)(`button`,{"aria-label":`Open details for ID ${r.id}`,className:`min-w-0 rounded-sm text-left text-foreground transition-colors underline-offset-4 hover:text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:t,title:r.id,type:`button`,children:[(0,Z.jsx)(vn,{bundleId:r.id,fullOnMobile:!0}),r.bundle_id?null:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-sm`,children:[(0,Z.jsx)(Ge,{className:`size-3.5`}),` Built-in bundle`]})]}),i?(0,Z.jsx)(q,{className:`shrink-0 font-normal`,variant:`secondary`,children:i}):null,r.currentlyUnreachable?(0,Z.jsx)(Jn,{icon:Ie,label:`Unreachable: no device gets this bundle with the current delivery settings.`,reason:`No device gets this bundle with the current delivery settings.`,children:`Unreachable`}):null]})}function pa({onDetailClick:t,panelId:n,release:r}){let i=r.bundle_id??``,a=Rt(i),o=It(i);return a.isError||o.isError?(0,Z.jsx)(`div`,{"aria-live":`polite`,className:`border-t bg-muted/10 p-4 text-sm text-muted-foreground`,id:n,children:`Patch lineage could not be loaded.`}):a.isPending?(0,Z.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2 border-t bg-muted/10 p-4`,id:n,children:[(0,Z.jsx)(e,{className:`h-10 w-full`}),(0,Z.jsx)(e,{className:`h-10 w-full`})]}):a.data?(0,Z.jsx)(Fr,{bundle:a.data,bundles:o.data??[],loading:o.isPending,onDetailClick:t,panelId:n}):(0,Z.jsx)(`div`,{"aria-live":`polite`,className:`border-t bg-muted/10 p-4 text-sm text-muted-foreground`,id:n,children:`Bundle details are unavailable.`})}function ma(e,t){return{patchCounts:Bt(Array.from(new Set(e.flatMap(e=>e.bundle_id?[e.bundle_id]:[])))).data??{},slotReleases:e.flatMap(e=>{let n=t.find(t=>t.id===e.channel_id)?.name;return n?[{releaseId:e.id,platform:e.platform,channel:n,builtIn:!e.bundle_id}]:[]})}}var ha=(e,t)=>t>=e.to&&(e.from===void 0||t<e.from);function ga({fold:e,filter:t,channels:n,columns:r,isMobile:i,open:a,onOpenChange:o,render:s}){let c=Nt(t,{...e.from===void 0?{}:{from:e.from},to:e.to},a),l=c.data?.pages.flatMap(e=>e.rows)??[],u=ma(l,n),d=i?void 0:r,f=c.isError?(0,Z.jsx)(Hn,{columns:d,label:`Unreachable bundles`,onRetry:()=>void c.refetch(),state:`error`}):c.isPending||c.isFetchingNextPage?(0,Z.jsx)(Hn,{columns:d,label:`Loading unreachable bundles`,state:`loading`}):c.hasNextPage?(0,Z.jsx)(Hn,{columns:d,label:`Unreachable bundles`,onMore:()=>void c.fetchNextPage(),state:`more`}):null,p={label:Gn(e,ca),open:a,onOpenChange:o,panelId:`bundle-fold-${e.to}`};return i?(0,Z.jsxs)(Wn,{...p,children:[l.map(e=>s(e,u)),f]}):(0,Z.jsxs)(Kn,{...p,columns:r,children:[l.map(e=>s(e,u)),f]})}function _a(){let e=B.useSearch(),t=B.useNavigate(),n=A(),[r,i]=(0,X.useState)(!1),[a,o]=(0,X.useState)(),s=Un(),c=Ft(),l=c.data??[],u=c.data,d=ye(e,u),f=d===void 0&&c.isError,p=d??e,m=Se(p),h=kt({afterReleaseId:p.afterReleaseId,beforeReleaseId:p.beforeReleaseId,filter:m,releaseId:p.releaseId},{enabled:d!==void 0}),g=!ve(e,u),_=d===void 0?sa:h,v=_.data?.entries??[],y=v.flatMap(e=>e.kind===`row`?[e.row]:[]),b=ma(y,l),x=_.data?.next,S=_.data?.previous,C=be(),w=10+C.length,T=new Map(l.map(e=>[e.id,e.name])),ee=a!==void 0&&(e=>y.some(t=>t.id===e)||v.some(t=>t.kind===`fold`&&s.isOpen(Bn(t))&&ha(t,e)))(a);(0,X.useEffect)(()=>{a!==void 0&&!ee&&o(void 0)},[a,ee]);let E=(e,n=!0)=>void t({resetScroll:n,search:e,to:`/`}),D=e=>E(xe(p,e)),O=e=>{y.some(({id:t})=>t===e.id)||s.set(e.id,!0),E({...p,releaseId:e.id},!1)},te=e=>{let t=y.find(t=>t.bundle_id===e.id);if(o(void 0),t){E({...p,releaseId:t.id},!1);return}D({bundleId:e.id})},ne=p.afterReleaseId!==void 0||p.beforeReleaseId!==void 0,ie=S?{...p,afterReleaseId:`after`in S?S.after:void 0,beforeReleaseId:`before`in S?S.before:void 0,releaseId:void 0}:null,ae=x?{...p,afterReleaseId:void 0,beforeReleaseId:x,releaseId:void 0}:null,oe={...p,afterReleaseId:void 0,beforeReleaseId:void 0,releaseId:void 0},se=(e,t)=>{let n=T.get(e.channel_id)??e.channel_id,r=e.bundle_id?t.patchCounts[e.bundle_id]:0,i=ee&&a===e.id,s=`bundle-lineage-panel-${e.id}`;return(0,Z.jsxs)(X.Fragment,{children:[(0,Z.jsxs)(kn,{"aria-label":`Bundle ${e.id}`,className:N(`gap-3`,e.currentlyUnreachable&&`bg-muted/60 saturate-50 hover:bg-muted/60 hover:saturate-100 focus-within:saturate-100`,i&&`border-b-0 bg-primary/5`),"data-state":p.releaseId===e.id?`selected`:void 0,onClick:jn(()=>O(e)),children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Z.jsx)(fa,{expanded:i,onOpen:()=>O(e),onToggleExpand:()=>o(i?void 0:e.id),release:e}),(0,Z.jsx)(yn,{channel:n,className:`shrink-0`})]}),(0,Z.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-foreground`,children:[(0,Z.jsx)(en,{className:`size-4`,platform:e.platform}),e.platform===`ios`?`iOS`:`Android`]}),r===void 0||r>0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,Z.jsx)(`span`,{children:r===void 0?`Checking patches`:`${r} ${r===1?`patch`:`patches`}`})]}):null,(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,Z.jsx)(Pn,{ms:e.created_at_ms})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 text-xs`,children:[(0,Z.jsx)(Rn,{percentage:e.rollout_cohort_count/10}),(0,Z.jsx)(oa,{release:e}),e.should_force_update?(0,Z.jsx)(q,{variant:`secondary`,children:`Force update`}):null,(0,Z.jsxs)(`span`,{className:`flex items-center`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,Z.jsx)(ke,{appVersion:e.target_app_version,fingerprintHash:e.fingerprint_hash})]})]}),C.map(({Cell:n,feature:r,label:i})=>(0,Z.jsxs)(`div`,{className:`mt-3 text-xs`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:i}),(0,Z.jsx)(n,{releaseId:e.id,releases:t.slotReleases})]},r)),e.message?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:e.message}):null]}),i&&e.bundle_id?(0,Z.jsx)(pa,{onDetailClick:te,panelId:s,release:e}):null]},e.id)},ce=(e,t)=>{let n=ee&&a===e.id,r=`bundle-lineage-panel-${e.id}`;return(0,Z.jsxs)(X.Fragment,{children:[(0,Z.jsxs)(Tn,{"aria-label":`Open bundle ${e.id}`,className:N(e.currentlyUnreachable&&`bg-muted/60 saturate-50 hover:bg-muted/60 hover:saturate-100 focus-within:saturate-100`,n&&`bg-primary/5`),"data-state":p.releaseId===e.id?`selected`:void 0,onOpen:()=>O(e),children:[(0,Z.jsx)(Y,{children:(0,Z.jsx)(fa,{expanded:n,onOpen:()=>O(e),onToggleExpand:()=>o(n?void 0:e.id),release:e})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(yn,{channel:T.get(e.channel_id)??e.channel_id})}),(0,Z.jsx)(Y,{className:`whitespace-nowrap`,children:(0,Z.jsx)($t,{platform:e.platform})}),(0,Z.jsx)(Y,{children:e.bundle_id&&t.patchCounts[e.bundle_id]===void 0?(0,Z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Checking`}):e.bundle_id&&t.patchCounts[e.bundle_id]>0?(0,Z.jsxs)(q,{variant:`secondary`,children:[t.patchCounts[e.bundle_id],` `,t.patchCounts[e.bundle_id]===1?`patch`:`patches`]}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(ke,{appVersion:e.target_app_version,fingerprintHash:e.fingerprint_hash})}),(0,Z.jsx)(Y,{children:(0,Z.jsxs)(`span`,{className:`flex items-center`,children:[(0,Z.jsx)(Pr,{enabled:e.enabled}),(0,Z.jsx)(`span`,{className:`sr-only`,children:e.enabled?`Enabled`:`Disabled`})]})}),(0,Z.jsx)(Y,{children:(0,Z.jsxs)(`span`,{className:`flex items-center`,children:[(0,Z.jsx)(Pr,{enabled:e.should_force_update,falseIcon:`minus`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:e.should_force_update?`Required`:`Optional`})]})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(Rn,{percentage:e.rollout_cohort_count/10})}),C.map(({Cell:n,feature:r})=>(0,Z.jsx)(Y,{children:(0,Z.jsx)(n,{releaseId:e.id,releases:t.slotReleases})},r)),(0,Z.jsx)(Y,{className:`text-sm text-muted-foreground`,title:e.message??void 0,children:e.message||`-`}),(0,Z.jsx)(Y,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(Pn,{ms:e.created_at_ms})})]}),n&&e.bundle_id?(0,Z.jsx)(gn,{className:`hover:bg-transparent`,children:(0,Z.jsx)(Y,{className:`border-t-0 p-0`,colSpan:w,children:(0,Z.jsx)(pa,{onDetailClick:te,panelId:r,release:e})})}):null]},e.id)},le=(e,t)=>(0,Z.jsx)(ga,{channels:l,columns:w,filter:m,fold:e,isMobile:n,onOpenChange:t=>s.set(Bn(e),t),open:s.isOpen(Bn(e)),render:t},`fold-${e.to}`),ue=(0,Z.jsxs)(Z.Fragment,{children:[`No `,p.platform===`android`?`Android`:`iOS`,` bundles in`,` `,(0,Z.jsx)(`span`,{translate:`no`,children:T.get(p.channelId??``)??p.channelId})]}),de=(0,Z.jsx)(Nn,{icon:Be,title:y.length===0&&v.length>0?`No device gets the bundles here`:ne?`No more bundles`:z(p)?g?`No bundles match these filters`:ue:`No bundles yet`,children:ne?(0,Z.jsx)(L,{className:re({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:oe,to:`/`,children:`Show the newest bundles`}):g?(0,Z.jsx)(k,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:()=>E({}),variant:`outline`,children:`Clear filters`}):z(p)?(0,Z.jsx)(k,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:()=>D({channelId:void 0,channels:`all`}),variant:`outline`,children:`Show all channels`}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`p`,{children:`Deploy one from your app's project:`}),(0,Z.jsx)(`div`,{className:`w-full text-left`,children:(0,Z.jsx)(Oe,{label:`the deploy command`,value:`npx hot-updater deploy`,wrap:!0})})]})});return(0,Z.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,Z.jsx)(da,{channels:l,clearable:g,onChange:D,onClear:()=>E({}),onManageChannels:()=>i(!0),pending:d===void 0,search:p}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-6 bg-muted/5 p-3 sm:p-6`,children:[f?(0,Z.jsxs)(Ze,{variant:`destructive`,children:[(0,Z.jsx)(Qe,{}),(0,Z.jsx)(Ye,{children:`Channels couldn't be loaded`}),(0,Z.jsx)(Xe,{children:`Bundles show once the channels load.`}),(0,Z.jsx)($e,{children:(0,Z.jsxs)(k,{className:`min-h-11 sm:min-h-7`,onClick:()=>void c.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(We,{"data-icon":`inline-start`}),`Retry`]})})]}):_.isError?(0,Z.jsxs)(Ze,{variant:`destructive`,children:[(0,Z.jsx)(Qe,{}),(0,Z.jsx)(Ye,{children:`Bundles could not be loaded`}),(0,Z.jsx)(Xe,{children:_.error?.message})]}):(0,Z.jsx)(wn,{children:n?(0,Z.jsx)(`div`,{className:`h-full overflow-y-auto`,children:_.isPending?(0,Z.jsx)(Mn,{}):(0,Z.jsxs)(Z.Fragment,{children:[y.length===0?(0,Z.jsx)(Dn,{children:de}):null,v.map(e=>e.kind===`row`?se(e.row,b):le(e,se))]})}):(0,Z.jsx)(Cn,{rowGroups:!0,header:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(J,{children:`ID`}),(0,Z.jsx)(J,{children:`Channel`}),(0,Z.jsx)(J,{children:`Platform`}),(0,Z.jsx)(J,{children:`Patches`}),(0,Z.jsx)(J,{children:`Target`}),(0,Z.jsx)(J,{children:`Enabled`}),(0,Z.jsx)(J,{children:`Force update`}),(0,Z.jsx)(J,{children:`Rollout`}),C.map(({feature:e,label:t})=>(0,Z.jsx)(J,{children:t},e)),(0,Z.jsx)(J,{children:`Message`}),(0,Z.jsx)(J,{children:`Created`})]}),children:_.isPending?(0,Z.jsx)(An,{children:(0,Z.jsx)(En,{columns:w})}):(0,Z.jsxs)(Z.Fragment,{children:[y.length===0?(0,Z.jsx)(An,{children:(0,Z.jsx)(On,{columns:w,children:de})}):null,Vn(v).map(e=>e.kind===`fold`?le(e.fold,ce):(0,Z.jsx)(An,{children:e.rows.map(e=>ce(e,b))},`rows-${e.rows[0].id}`))]})})}),!f&&!_.isError&&!_.isPending?(0,Z.jsx)(Fn,{count:y.length,folded:{...qn(v),label:`unreachable`},label:`Bundle pagination`,noun:[`bundle`,`bundles`],pending:_.isPlaceholderData,newest:ne?{search:oe,to:`/`}:void 0,next:ae?{search:ae,to:`/`}:void 0,previous:ie?{search:ie,to:`/`}:void 0}):null]}),(0,Z.jsx)(aa,{channels:l,onOpenChange:e=>!e&&E({...p,releaseId:void 0},!1),onShowScope:e=>D({scopeKey:e}),open:!!p.releaseId,releaseId:p.releaseId??``}),(0,Z.jsx)(Ir,{onOpenChange:i,open:r})]})}export{_a as component};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-9gxYg__u.js","assets/sidebar-BmzmPGuv.js","assets/alert-dialog-DGPqJBCk.js","assets/ChannelPicker-BQKoyxnf.js","assets/useAnchoredPopupScrollLock-Cvx6CdPD.js","assets/useCompositeListItem-Cbk_weKW.js","assets/check-C3VCvMOV.js","assets/dist-BEmib-ZM.js","assets/input-group-CIjTdxCW.js","assets/api-eO-sq3Jd.js","assets/preload-helper-CE9OukVC.js","assets/link-CRMwpc7-.js","assets/useMutation-D7IuoOLE.js","assets/constants-C5gi7fdZ.js","assets/select-Bk52fOVX.js","assets/switch-CI393qIT.js","assets/valueToPercent-Db73Kirz.js","assets/arrow-right-DjRwIoF1.js","assets/arrow-up-right-C_1ALUCD.js","assets/TargetDisplay-DG_I3qln.js","assets/copy-BjVLMKbo.js","assets/key-round-BkeLvA1m.js","assets/native-builds-zwqucwx2.js","assets/HashValueDisplay-DvwvQchI.js","assets/chevron-right-RAuPv9r1.js","assets/circle-off-DvYMC5yF.js","assets/download-CgpaZb23.js","assets/list-DQ9YBIDW.js","assets/loader-circle-8lunBReu.js","assets/plus-DztQIXYL.js","assets/rotate-ccw-tITIe0Bd.js","assets/trash-2-DI0biNI-.js","assets/badge-zMibJGR5.js","assets/BundleIdDisplay-C0X-k49t.js","assets/ChannelBadge-BgVCJfJs.js","assets/RelativeTime-5ZP9WlQ6.js","assets/relativeTime-RUNbaMyO.js","assets/table-DbZPkzdz.js","assets/RowReason-CXMCJ-Jc.js","assets/insights-search-CZtvD-Vf.js","assets/insights-api-D4-FZeEI.js","assets/PlatformIcon-D4KPXCHL.js","assets/RolloutPercentageBadge-DCtG7c1o.js","assets/card-BAs80yql.js","assets/dialog-BvZDZzdQ.js","assets/field-DInLQ5oV.js"])))=>i.map(i=>d[i]);
2
+ import{$ as e,Di as t,Hr as n,Oi as r,Vr as i,_r as a,et as o,vr as s,wi as c,zr as ee}from"./sidebar-BmzmPGuv.js";import{t as l}from"./link-CRMwpc7-.js";import{i as u,r as d,t as f}from"./preload-helper-CE9OukVC.js";import{a as p,i as te,o as m}from"./console-features-api-CtbGqKyr.js";import{_ as h,m as g,s as _,x as v}from"./insights-api-D4-FZeEI.js";import{t as y}from"./key-round-BkeLvA1m.js";import{i as b}from"./switch-CI393qIT.js";import{a as x,t as S}from"./insights-search-CZtvD-Vf.js";import{a as C,i as w,n as T,o as E,t as D}from"./card-BAs80yql.js";import{n as O}from"./constants-C5gi7fdZ.js";var k=i(`chart-line`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),A=t(),j={apiKeys:{navigation:{icon:(0,A.jsx)(y,{}),paths:[`/api-keys`],link:({onClick:e})=>(0,A.jsx)(l,{to:`/api-keys`,onClick:e})}}},M=c({method:`GET`}).middleware([ee]).handler(r(`b4bf4c461903edcdc44eea52468c737b5b600a586f542138ff022dcbbe86c45c`));function N(e){let t=e.map(({releaseId:e,platform:t,channel:n})=>({releaseId:e,platform:t,channel:n})).sort((e,t)=>e.releaseId.localeCompare(t.releaseId));return n({queryKey:[`bundle-activity`,t],queryFn:()=>M({data:t}),enabled:t.length>0,staleTime:3e4})}var P=[{label:`Downloaded`,field:`downloads`,color:`text-primary/85`},{label:`Launched`,field:`launched`,color:`text-success/85`},{label:`Crashed`,field:`failedLaunches`,color:`text-warning/85`}],F=e=>{let t=e.launched+e.failedLaunches;return t===0?`—`:`${(e.failedLaunches/t*100).toFixed(2)}%`},I=e=>Math.max(0,e.downloads-e.launched-e.failedLaunches);function L(){return(0,A.jsx)(x,{label:`About release insight metrics`,children:`Downloaded: got this bundle. Launched: ran it. Crashed: crashed on it and rolled back. Once every installation restarts, Downloaded = Launched + Crashed.`})}function R({report:t,loading:n=!1,input:r,variant:i=`inline`}){if(!t)return n?(0,A.jsx)(e,{"aria-label":`Loading release insights`,className:i===`card`?`h-16 w-full`:`h-4 w-40`}):(0,A.jsx)(`span`,{"aria-label":`Release insights unavailable`,className:`text-sm text-muted-foreground`,children:`—`});let a=r?.builtIn===!0,o=a?0:I(t),c=(0,A.jsx)(`dl`,{className:s(i===`card`?`grid grid-cols-[1fr_1fr_auto] gap-4`:`flex min-w-[220px] flex-wrap items-baseline gap-x-3 gap-y-1`),children:P.map(({label:e,field:n,color:r})=>(0,A.jsxs)(`div`,{className:s(`flex`,i===`card`?`min-w-0 flex-col gap-1`:`items-baseline gap-1.5 whitespace-nowrap`),children:[(0,A.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,A.jsxs)(`dd`,{className:s(`flex flex-wrap items-baseline gap-x-1.5 tabular-nums`,i===`card`?`text-xl font-semibold`:`text-sm font-medium`,t[n]>0&&!(n===`downloads`&&a)?r:`text-muted-foreground`),children:[n===`downloads`&&a?(0,A.jsx)(`span`,{title:`The built-in bundle is never downloaded`,children:`—`}):t[n].toLocaleString(),n===`failedLaunches`?(0,A.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,F(t),`)`]}):null]})]},n))});return(0,A.jsxs)(`div`,{className:s(`flex`,i===`card`?`flex-col gap-2`:`items-center gap-1`),children:[r?(0,A.jsx)(l,{className:`relative min-w-0 rounded-sm after:absolute after:inset-x-0 after:-inset-y-3 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:after:hidden`,to:`/insights`,search:{platform:r.platform,channel:r.channel,releaseId:r.releaseId,bundleWindow:S(r.releaseId)},children:c}):c,i===`card`&&o>0?(0,A.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[o.toLocaleString(),` downloaded but not launched yet: waiting for a restart, or passed over for a newer bundle.`]}):null,i===`inline`?(0,A.jsx)(L,{}):null]})}function z({input:t}){let n=_({platform:t.platform,channel:t.channel,releaseId:t.releaseId}),r=n.data;return(0,A.jsxs)(`div`,{className:`flex items-center gap-1`,children:[r?(0,A.jsx)(`dl`,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-1.5`,children:[(0,A.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Download failures`}),(0,A.jsxs)(`dd`,{className:s(`flex items-baseline gap-1.5 text-sm font-medium tabular-nums`,r.failedUpdates>0?`text-warning/85`:`text-muted-foreground`),children:[r.failedUpdates.toLocaleString(),(0,A.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,h(g(r)),`)`]})]})]})}):n.isPending?(0,A.jsx)(e,{"aria-label":`Loading download failures`,className:`h-4 w-40`}):(0,A.jsx)(`span`,{"aria-label":`Download failures unavailable`,className:`text-sm text-muted-foreground`,children:`—`}),(0,A.jsx)(x,{label:`About download failures`,children:`Failed downloads or installs of this bundle, at most one per installation a day. Rate = failures ÷ (failures + downloads).`})]})}function B({input:e}){let t=N([e]);return(0,A.jsxs)(D,{children:[(0,A.jsxs)(C,{className:`flex-row items-center justify-between px-4 pt-4 pb-3`,children:[(0,A.jsx)(E,{className:`text-sm font-medium`,children:`Insights`}),(0,A.jsx)(L,{})]}),(0,A.jsxs)(T,{className:`flex flex-col gap-3 px-4 pb-4`,children:[(0,A.jsx)(R,{variant:`card`,input:e,loading:t.isFetching,report:t.data?.[e.releaseId]}),(0,A.jsx)(o,{}),(0,A.jsx)(z,{input:e})]}),(0,A.jsx)(w,{className:`px-4 pb-4`,children:(0,A.jsxs)(l,{className:a({className:`max-md:h-11`,variant:`outline`,size:`sm`}),to:`/insights`,search:{platform:e.platform,channel:e.channel,releaseId:e.releaseId,bundleWindow:S(e.releaseId),healthChart:`adoption`},children:[(0,A.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`View adoption`]})})]})}function V({input:e}){return te(`insightsAnalytics`)?null:(0,A.jsxs)(D,{children:[(0,A.jsx)(C,{className:`px-4 pt-4 pb-3`,children:(0,A.jsx)(E,{className:`text-sm font-medium`,children:`Insights`})}),(0,A.jsx)(T,{className:`px-4 pb-4`,children:(0,A.jsx)(z,{input:e})})]})}function ne({releaseId:e,releases:t}){let n=N(t);return(0,A.jsx)(R,{input:t.find(t=>t.releaseId===e),loading:n.isFetching,report:n.data?.[e]})}var H={Cell:ne},U={insights:{navigation:{icon:(0,A.jsx)(v,{}),paths:[`/insights`,`/insights/distribution`,`/installations`],link:({features:e,onClick:t})=>e.insightsAnalytics?(0,A.jsx)(l,{to:`/insights`,onClick:t}):(0,A.jsx)(l,{to:`/installations`,onClick:t})},releaseSection:({release:e})=>(0,A.jsx)(V,{input:e})},insightsAnalytics:{releaseColumn:H,releaseSection:({release:e})=>(0,A.jsx)(B,{input:e})}},W={remoteConfig:{navigation:{icon:(0,A.jsx)(b,{}),paths:[`/remote-config`],link:({onClick:e})=>(0,A.jsx)(l,{to:`/remote-config`,onClick:e})}}},G={...U,...j,...W},K=Object.keys(m),q=()=>{let e=p().data?.features;return e===void 0?[]:K.flatMap(t=>{let n=G[t];return n!==void 0&&e[t]?[{...n,feature:t,label:m[t].label,features:e}]:[]})},J=()=>q().flatMap(({feature:e,label:t,releaseColumn:n})=>n===void 0?[]:[{...n,feature:e,label:t}]);function Y({release:e}){return q().map(({feature:t,releaseSection:n})=>n===void 0?null:(0,A.jsx)(n,{release:e},t))}var X=e=>typeof e==`string`&&e.trim().length>0?e.trim():void 0;function Z(e){let t=X(e.beforeReleaseId),n=t?void 0:X(e.afterReleaseId),r=e.enabled===!0||e.enabled===`true`?!0:e.enabled===!1||e.enabled===`false`?!1:void 0,i=X(e.bundleId),a=i?void 0:X(e.scopeKey),o=i||a?void 0:X(e.channelId),s=o===void 0?void 0:e.platform===`android`?`android`:`ios`;return{afterReleaseId:n,beforeReleaseId:t,bundleId:i,channelId:o,channels:!i&&!a&&!o&&e.channels===`all`?`all`:void 0,enabled:a||o?r:void 0,platform:s,releaseId:X(e.releaseId),scopeKey:a}}function Q(e){let t=e.enabled===void 0?{}:{enabled:e.enabled};return e.bundleId?{kind:`bundle`,bundleId:e.bundleId}:e.scopeKey?{kind:`scope`,scopeKey:e.scopeKey,...t}:e.channelId&&e.platform?{kind:`channelPlatform`,channelId:e.channelId,platform:e.platform,...t}:{kind:`all`}}function re(e){return Q(e).kind!==`all`}function $(e,t){if(e.bundleId||e.scopeKey||e.channelId||e.channels===`all`)return e;if(e.releaseId)return{...e,channels:`all`};if(t===void 0)return;let n=t.find(({name:e})=>e===O);return n?Z({...e,channelId:n.id}):e}function ie(e,t){let n={...e,...t};return t.bundleId?Z({bundleId:n.bundleId}):t.scopeKey?Z({scopeKey:n.scopeKey,enabled:n.enabled}):`channelId`in t||`platform`in t?Z({channelId:n.channelId,channels:n.channels,enabled:n.enabled,platform:n.platform}):Z({bundleId:n.bundleId,channelId:n.channelId,channels:n.channels,enabled:n.enabled,platform:n.platform,scopeKey:n.scopeKey})}function ae(e,t){let n=$(e,t),r=$({},t);return n===void 0||r===void 0||JSON.stringify(Q(n))===JSON.stringify(Q(r))}var oe=u(`/`)({component:d(()=>f(()=>import(`./routes-9gxYg__u.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])),`component`),validateSearch:Z});export{ae as a,q as c,$ as i,J as l,re as n,ie as o,Q as r,Y as s,oe as t};
@@ -0,0 +1 @@
1
+ import{Vr as e}from"./sidebar-BmzmPGuv.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{A as e,Ar as t,Bn as n,Bt as r,C as i,Cr as a,Di as o,Er as s,Fr as c,Ht as l,In as u,It as d,Jn as f,L as p,Lt as m,Mr as h,Mt as g,Nr as _,Nt as v,Qn as y,Ri as b,Rt as x,Sn as S,Sr as C,Tr as w,Vi as T,Vr as E,Vt as ee,Xt as D,Yt as O,_n as k,bn as te,bt as ne,ct as A,dr as j,dt as M,fr as N,gn as re,h as P,ht as F,ir as I,jr as L,kr as R,kt as ie,lt as z,mn as ae,mt as oe,ot as se,pr as ce,pt as B,qn as le,st as ue,vn as V,vr as H,w as de,wn as fe,wt as pe,xn as U,xr as W,yn as G,zt as K}from"./sidebar-BmzmPGuv.js";import{t as me}from"./check-C3VCvMOV.js";import{a as q,i as he,n as ge,r as J,t as _e}from"./useCompositeListItem-Cbk_weKW.js";import{E as ve,S as ye,T as be,_ as xe,a as Se,c as Ce,d as we,f as Te,g as Ee,h as De,i as Oe,l as ke,m as Ae,n as je,o as Me,p as Ne,t as Pe,u as Fe,v as Ie,w as Le,y as Re}from"./useAnchoredPopupScrollLock-Cvx6CdPD.js";var ze=E(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Y=T(b());function Be(e){let[t,n]=Y.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var X=o(),Ve=Y.createContext(void 0),He={disableStyleElements:!1};function Ue(){return Y.useContext(Ve)??He}var We=Y.createContext(null),Ge=Y.createContext(null);function Z(){let e=Y.useContext(We);if(e===null)throw Error(R(60));return e}function Ke(){let e=Y.useContext(Ge);if(e===null)throw Error(R(61));return e}var Q={id:x(e=>e.id),labelId:x(e=>e.labelId),modal:x(e=>e.modal),multiple:x(e=>e.multiple),items:x(e=>e.items),itemToStringLabel:x(e=>e.itemToStringLabel),itemToStringValue:x(e=>e.itemToStringValue),isItemEqualToValue:x(e=>e.isItemEqualToValue),value:x(e=>e.value),hasSelectedValue:x(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:we(t,r)!==``}),hasNullItemLabel:x((e,t)=>t?Me(e.items):!1),open:x(e=>e.open),mounted:x(e=>e.mounted),forceMount:x(e=>e.forceMount),transitionStatus:x(e=>e.transitionStatus),openMethod:x(e=>e.openMethod),activeIndex:x(e=>e.activeIndex),selectedIndex:x(e=>e.selectedIndex),isActive:x((e,t)=>e.activeIndex===t),isSelected:x((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Te(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Te(n,i,r)}),isSelectedByFocus:x((e,t)=>e.selectedIndex===t),popupProps:x(e=>e.popupProps),triggerProps:x(e=>e.triggerProps),triggerElement:x(e=>e.triggerElement),positionerElement:x(e=>e.positionerElement),listElement:x(e=>e.listElement),popupSide:x(e=>e.popupSide),scrollUpArrowVisible:x(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:x(e=>e.scrollDownArrowVisible),hasScrollArrows:x(e=>e.hasScrollArrows)};function qe(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Je(e,t){return Math.max(0,e-t)}function Ye(e,t){if(t<=0)return 0;let n=qe(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function $(e){let{id:o,value:s,defaultValue:c=null,onValueChange:l,open:u,defaultOpen:f=!1,onOpenChange:p,name:g,form:y,autoComplete:b,disabled:x=!1,readOnly:T=!1,required:E=!1,modal:D=!0,actionsRef:O,inputRef:A,onOpenChangeComplete:j,items:M,multiple:N=!1,itemToStringLabel:P,itemToStringValue:F,isItemEqualToValue:I=Ne,highlightItemOnHover:R=!0,children:z}=e,{clearErrors:ae}=Se(),{setDirty:oe,setTouched:se,setFocused:B,shouldValidateOnChange:le,validityData:ue,setFilled:V,name:H,disabled:fe,validation:U,validationMode:W}=ye(),G=xe({id:o}),K=fe||x,me=H??g,[q,ge]=he({controlled:s,default:N?c??C:c,name:`Select`,state:`value`}),[J,_e]=he({controlled:u,default:f,name:`Select`,state:`open`}),Ce=Y.useRef([]),Te=Y.useRef([]),Ee=Y.useRef(null),De=Y.useRef(null),Oe=Y.useRef(0),ke=Y.useRef(null),je=Y.useRef([]),Me=Y.useRef(!1),Pe=Y.useRef(!1),Ie=Y.useRef(null),Le=Y.useRef(null),ze=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Ve=Y.useRef(!1),{mounted:He,setMounted:Ue,transitionStatus:Z}=v(J),{openMethod:Ke,triggerProps:qe}=i(J),$=_(()=>new d({id:G,labelId:void 0,modal:D,multiple:N,itemToStringLabel:P,itemToStringValue:F,isItemEqualToValue:I,value:q,open:J,mounted:He,transitionStatus:Z,items:M,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Xe=m($,Q.activeIndex),Ze=m($,Q.selectedIndex),Qe=m($,Q.triggerElement),$e=m($,Q.positionerElement),et=Be(Ke),tt=Ke??et,nt=Y.useMemo(()=>N&&Array.isArray(q)&&q.length===0?``:we(q,F),[N,q,F]),rt=Y.useMemo(()=>N&&Array.isArray(q)?q.map(e=>we(e,F)):we(q,F),[N,q,F]);Re(te($.state.triggerElement),G,q,h(()=>rt));let it=Y.useRef(q),at=N?Array.isArray(q)&&q.length>0:q!=null;L(()=>{q!==it.current&&$.set(`forceMount`,!0)},[$,q]),L(()=>{V(at)},[at,V]),L(function(){let e=je.current,t;if(N){let n=Array.isArray(q)?q:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=Ae(e,r,I);t=i===-1?null:i}}else{let n=Ae(e,q,I);t=n===-1?null:n}t===null&&(Le.current=null),!J&&$.set(`selectedIndex`,t)},[at,N,J,q,je,I,$,Le]),de(q,()=>{ae(me),oe(q!==ue.initialValue),le()?U.commit(q):U.commit(q,!0)});let ot=h((e,t)=>{if(p?.(e,t),!t.isCanceled&&(_e(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(se(!0),B(!1),W===`onBlur`&&U.commit(q)),!e&&$.state.activeIndex!==null)){let e=Ce.current[$.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),st=h(()=>{Ue(!1),$.update({activeIndex:null,openMethod:null}),j?.(!1)});ie({enabled:!O,open:J,ref:Ee,onComplete(){J||st()}}),Y.useImperativeHandle(O,()=>({unmount:st}),[st]);let ct=h((e,t)=>{l?.(e,t),!t.isCanceled&&ge(e)}),lt=h(()=>{let e=$.state.listElement||Ee.current;if(!e)return;let t=Je(e.scrollHeight,e.clientHeight),n=Ye(e.scrollTop,t),r=n>0,i=n<t;$.state.scrollUpArrowVisible!==r&&$.set(`scrollUpArrowVisible`,r),$.state.scrollDownArrowVisible!==i&&$.set(`scrollDownArrowVisible`,i)}),ut=ne({open:J,onOpenChange:ot,elements:{reference:Qe,floating:$e}}),dt=ee(ut,{enabled:!T&&!K,event:`mousedown`}),ft=r(ut),pt=ve(ut,{enabled:!T&&!K,listRef:Ce,activeIndex:Xe,selectedIndex:Ze,disabledIndices:C,onNavigate(e){e===null&&!J||$.set(`activeIndex`,e)},focusItemOnHover:R}),mt=be(ut,{enabled:!T&&!K&&(J||!N),listRef:Te,activeIndex:Xe,selectedIndex:Ze,onMatch(e){J?$.set(`activeIndex`,e):ct(je.current[e],S(`none`))},onTyping(e){Me.current=e}}),ht=Y.useMemo(()=>{let e=t(mt.reference,pt.reference,ft.reference,dt.reference,qe);return G&&(e.id=G),e},[dt.reference,mt.reference,pt.reference,ft.reference,qe,G]),gt=Y.useMemo(()=>t(pe,mt.floating,pt.floating,ft.floating),[mt.floating,pt.floating,ft.floating]),_t=pt.item??a;ce(()=>{$.update({popupProps:gt,triggerProps:ht})}),L(()=>{$.update({id:G,modal:D,multiple:N,value:q,open:J,mounted:He,transitionStatus:Z,popupProps:gt,triggerProps:ht,items:M,itemToStringLabel:P,itemToStringValue:F,isItemEqualToValue:I,openMethod:tt})},[$,G,D,N,q,J,He,Z,gt,ht,M,P,F,I,tt]);let vt=Y.useMemo(()=>({store:$,name:me,required:E,disabled:K,readOnly:T,multiple:N,highlightItemOnHover:R,setValue:ct,setOpen:ot,listRef:Ce,popupRef:Ee,scrollHandlerRef:De,handleScrollArrowVisibility:lt,scrollArrowsMountedCountRef:Oe,itemProps:_t,events:ut.context.events,valueRef:ke,valuesRef:je,labelsRef:Te,typingRef:Me,selectionRef:ze,firstItemTextRef:Ie,selectedItemTextRef:Le,validation:U,onOpenChangeComplete:j,keyboardActiveRef:Pe,alignItemWithTriggerActiveRef:Ve,initialValueRef:it}),[$,me,E,K,T,N,R,ct,ot,_t,ut.context.events,U,j,lt]),yt=w(A,U.inputRef),bt=N&&Array.isArray(q)&&q.length>0,xt=N?void 0:me,St=Y.useMemo(()=>!N||!Array.isArray(q)||!me?null:q.map(e=>{let t=we(e,F);return(0,X.jsx)(`input`,{type:`hidden`,form:y,name:me,value:t},t)}),[N,q,y,me,F]);return(0,X.jsx)(We.Provider,{value:vt,children:(0,X.jsxs)(Ge.Provider,{value:ut,children:[z,(0,X.jsx)(`input`,{...U.getInputValidationProps({onFocus(){$.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||K||T){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,r=S(n,e.nativeEvent);function i(){if(N)return;let e=je.current.find(e=>we(e,F).toLowerCase()===t.toLowerCase()||Fe(e,P).toLowerCase()===t.toLowerCase());e!=null&&(oe(e!==ue.initialValue),ct(e,r),le()&&U.commit(e))}$.set(`forceMount`,!0),queueMicrotask(i)}}),id:G&&xt==null?`${G}-hidden-input`:void 0,form:y,name:xt,autoComplete:b,value:nt,disabled:K,required:E&&!bt,readOnly:T,ref:yt,style:me?k:re,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),St]})})}var Xe=2,Ze=400,Qe={...oe,...Le,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},$e=Y.forwardRef(function(e,r){let{render:i,className:a,id:o,disabled:c=!1,nativeButton:l=!0,style:u,...d}=e,{setTouched:p,setFocused:g,validationMode:_,state:v,disabled:b}=ye(),{labelId:x}=Ie(),{store:C,setOpen:T,selectionRef:E,validation:ee,readOnly:D,required:O,alignItemWithTriggerActiveRef:k,disabled:ne,keyboardActiveRef:A}=Z(),j=b||ne||c,M=m(C,Q.open),re=m(C,Q.mounted),P=m(C,Q.value),F=m(C,Q.triggerProps),I=m(C,Q.positionerElement),L=m(C,Q.listElement),R=m(C,Q.popupSide),ie=m(C,Q.id),z=m(C,Q.labelId),ae=m(C,Q.hasSelectedValue),oe=re&&I?R:null,se=o??ie,ce=Oe(x,z);xe({id:se});let B=te(I),le=Y.useRef(null),{getButtonProps:ue,buttonRef:H}=s({disabled:j,native:l}),de=w(r,le,H,h(e=>{C.set(`triggerElement`,e)})),pe=N(),U=N(),G=N();Y.useEffect(()=>{if(M)return G.start(Ze,()=>{E.current.allowUnselectedMouseUp=!0,E.current.allowSelectedMouseUp=!0}),()=>{G.clear()};E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},U.clear()},[M,E,U,G]);let K=t(F,{id:se,role:`combobox`,"aria-expanded":M?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":M?L?.id??f(I)?.id:void 0,"aria-labelledby":ce,"aria-readonly":D||void 0,"aria-required":O||void 0,tabIndex:j?-1:0,ref:de,onFocus(e){g(!0),M&&k.current&&T(!1,S(n,e.nativeEvent)),pe.start(0,()=>{C.set(`forceMount`,!0)})},onBlur(e){y(I,e.relatedTarget)||(p(!0),g(!1),_===`onBlur`&&ee.commit(P))},onPointerMove(){A.current=!1},onKeyDown(){A.current=!0},onMouseDown(e){if(M)return;let t=V(e.currentTarget);function n(e){if(!le.current)return;let t=e.target;if(y(le.current,t)||y(B.current,t)||t===le.current)return;let n=je(le.current);e.clientX>=n.left-Xe&&e.clientX<=n.right+Xe&&e.clientY>=n.top-Xe&&e.clientY<=n.bottom+Xe||T(!1,S(fe,e))}U.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},ee.getValidationProps,d,ue);K.role=`combobox`;let me={...v,open:M,disabled:j,value:P,readOnly:D,popupSide:oe,placeholder:!ae};return W(`button`,e,{ref:[r,le],state:me,stateAttributesMapping:Qe,props:K})}),et={value:()=>null},tt=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=Z(),u=m(c,Q.value),d=m(c,Q.items),f=m(c,Q.itemToStringLabel),p=m(c,Q.hasSelectedValue),h=!p&&a!=null&&i==null,g=m(c,Q.hasNullItemLabel,h),_={value:u,placeholder:!p},v=null;return v=typeof i==`function`?i(u):i??(!p&&a!=null&&!g?a:Array.isArray(u)?Ce(u,d,f):ke(u,d,f)),W(`span`,e,{state:_,ref:[t,l],props:[{children:v},s],stateAttributesMapping:et})}),nt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=Z();return W(`span`,e,{state:{open:m(o,Q.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:F})}),rt=Y.createContext(void 0),it=Y.forwardRef(function(e,t){let{store:n}=Z(),r=m(n,Q.mounted),i=m(n,Q.forceMount);return r||i?(0,X.jsx)(rt.Provider,{value:!0,children:(0,X.jsx)(O,{ref:t,...e})}):null}),at=Y.createContext(void 0);function ot(){let e=Y.useContext(at);if(!e)throw Error(R(59));return e}function st(e,t){e&&Object.assign(e.style,t)}var ct={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},lt={position:`fixed`},ut=Y.forwardRef(function(t,r){let{anchor:i,positionMethod:a=`absolute`,className:o,render:s,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:g=5,sticky:_=!1,disableAnchorTracking:v,alignItemWithTrigger:y=!0,collisionAvoidance:b=D,style:x,...C}=t,{store:w,listRef:T,labelsRef:E,alignItemWithTriggerActiveRef:ee,selectedItemTextRef:O,valuesRef:k,initialValueRef:te,popupRef:ne,setValue:A}=Z(),j=Ke(),M=m(w,Q.open),N=m(w,Q.mounted),re=m(w,Q.modal),P=m(w,Q.value),F=m(w,Q.openMethod),I=m(w,Q.positionerElement),R=m(w,Q.triggerElement),ie=m(w,Q.isItemEqualToValue),ae=m(w,Q.transitionStatus),oe=Y.useRef(null),ce=Y.useRef(null),[B,le]=Y.useState(y),V=N&&B&&F!==`touch`;!N&&B!==y&&le(y),L(()=>{N||(Q.scrollUpArrowVisible(w.state)&&w.set(`scrollUpArrowVisible`,!1),Q.scrollDownArrowVisible(w.state)&&w.set(`scrollDownArrowVisible`,!1))},[w,N]),Y.useImperativeHandle(ee,()=>V),Pe((V||re)&&M,F===`touch`,I,R);let H=z({anchor:i,floatingRootContext:j,positionMethod:a,mounted:N,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:g,collisionBoundary:f,collisionPadding:p,sticky:_,disableAnchorTracking:v??V,collisionAvoidance:b,keepMounted:!0}),de=V?`none`:H.side,fe=V?lt:H.positionerStyles,pe={open:M,side:de,align:H.align,anchorHidden:H.anchorHidden};L(()=>{w.set(`popupSide`,H.side)},[w,H.side]);let U=ue(t,pe,{styles:fe,transitionStatus:ae,props:C,refs:[r,h(e=>{w.set(`positionerElement`,e)})],hidden:!N,inert:!M}),W=Y.useRef(0),G=h(e=>{if(e.size===0&&W.current===0||k.current.length===0)return;let t=W.current;if(W.current=e.size,e.size===t)return;let r=S(n);if(t!==0&&!w.state.multiple&&P!==null&&Ae(k.current,P,ie)===-1){let e=te.current,t=e!=null&&Ae(k.current,e,ie)!==-1?e:null;A(t,r),t===null&&(w.set(`selectedIndex`,null),O.current=null)}if(t!==0&&w.state.multiple&&Array.isArray(P)){let e=e=>Ae(k.current,e,ie)!==-1,t=P.filter(t=>e(t));(t.length!==P.length||t.some(e=>!Ee(P,e,ie)))&&(A(t,r),t.length===0&&(w.set(`selectedIndex`,null),O.current=null))}if(M&&V){w.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};st(I,e),st(ne.current,e)}}),K=Y.useMemo(()=>({...H,side:de,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:le,scrollUpArrowRef:oe,scrollDownArrowRef:ce}),[H,de,V,le]);return(0,X.jsx)(J,{elementsRef:T,labelsRef:E,onMapChange:G,children:(0,X.jsxs)(at.Provider,{value:K,children:[N&&re&&(0,X.jsx)(e,{inert:se(!M),cutout:R}),U]})})}),dt=`base-ui-disable-scrollbar`,ft={className:dt,getElement(e){return(0,X.jsx)(`style`,{nonce:e,href:dt,precedence:`base-ui:low`,children:`.${dt}{scrollbar-width:none}.${dt}::-webkit-scrollbar{display:none}`})}},pt=Y.createContext(void 0);function mt(e){let t=Y.useContext(pt);if(t===void 0&&!e)throw Error(R(69));return t}var ht={...B,...g},gt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:g,firstItemTextRef:_,selectedItemTextRef:v,keyboardActiveRef:y,multiple:b,handleScrollArrowVisibility:x,scrollHandlerRef:C,listRef:w,highlightItemOnHover:T}=Z(),{side:E,align:ee,alignItemWithTriggerActive:D,isPositioned:O,setControlledAlignItemWithTrigger:k,scrollDownArrowRef:te,scrollUpArrowRef:ne}=ot(),N=mt(!0)!=null,re=Ke(),P=M(),{nonce:F,disableStyleElements:I}=Ue(),R=m(s,Q.id),z=m(s,Q.open),ae=m(s,Q.mounted),oe=m(s,Q.popupProps),se=m(s,Q.transitionStatus),ce=m(s,Q.triggerElement),B=m(s,Q.positionerElement),ue=m(s,Q.listElement),H=Y.useRef(!1),de=Y.useRef(!1),fe=Y.useRef({}),pe=G(),K=h(e=>{if(!B||!u.current||!de.current)return;if(H.current||!D){x();return}let t=B.style.top===`0px`,n=B.style.bottom===`0px`;if(!t&&!n){x();return}let r=yt(B),i=bt(B.getBoundingClientRect().height,`y`,r),a=V(B),o=getComputedStyle(B),s=parseFloat(o.marginTop),c=parseFloat(o.marginBottom),l=_t(getComputedStyle(u.current)),d=Math.min(a.documentElement.clientHeight-s-c,l),f=e.scrollTop,p=vt(e),m=0,h=null,g=!1,_=!1,v=e=>{B.style.height=`${e}px`},y=(t,n)=>{let r=qe(t,0,d-i);r>0&&v(i+r),e.scrollTop=n,d-(i+r)<=1&&(H.current=!0),x()},b=t?p-f:f,S=Math.min(i+b,d);if(m=S,b<=1){y(b,t?p:0);return}if(d-S>1?t?_=!0:h=0:(g=!0,n&&f<p&&(h=f-(b-(i+b-d)))),m=Math.ceil(m),m!==0&&v(m),_||h!=null){let t=vt(e),n=_?t:qe(h,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(g||m>=d-1)&&(H.current=!0),x()});Y.useImperativeHandle(C,()=>K,[K]),ie({open:z,ref:u,onComplete(){z&&d?.(!0)}});let me={open:z,transitionStatus:se,side:E,align:ee};L(()=>{!B||!u.current||Object.keys(fe.current).length||(fe.current={top:B.style.top||`0`,left:B.style.left||`0`,right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[u,B]),L(()=>{z||D||(de.current=!1,H.current=!1,st(B,fe.current))},[z,D,B,u]),L(()=>{let e=u.current;if(!z||!ce||!B||!e||D&&!O||s.state.transitionStatus===`ending`)return;if(!D){de.current=!0,pe.request(x),e.style.removeProperty(`--transform-origin`);return}let t=Ct(e);e.style.removeProperty(`--transform-origin`);try{let t=v.current;t?.isConnected||(t=!Q.hasSelectedValue(s.state)&&_.current?.isConnected?_.current:null);let n=g.current,r=getComputedStyle(B),i=getComputedStyle(e),a=V(ce),o=c(B),l=yt(ce),u=xt(ce.getBoundingClientRect(),l),d=xt(B.getBoundingClientRect(),l),f=u.height,p=ue||e,m=p.scrollHeight,h=parseFloat(i.borderBottomWidth),y=parseFloat(r.marginTop)||10,b=parseFloat(r.marginBottom)||10,S=parseFloat(r.minHeight)||100,C=_t(i),E=a.documentElement.clientHeight-y-b,ee=a.documentElement.clientWidth,D=E-u.bottom+f,O,te=P===`rtl`?u.right-d.width:u.left,ne=0;if(t&&n){let e=xt(n.getBoundingClientRect(),l);O=xt(t.getBoundingClientRect(),l),te=d.left+(P===`rtl`?e.right-O.right:e.left-O.left);let r=e.top-u.top+e.height/2;ne=O.top-d.top+O.height/2-r}let A=D+ne+b+h,M=Math.min(E,A),N=E-y-b,re=A-M,F=ee-5;B.style.left=`${qe(te,5,F-d.width)}px`,B.style.height=`${M}px`,B.style.maxHeight=`auto`,B.style.marginTop=`${y}px`,B.style.marginBottom=`${b}px`,e.style.height=`100%`;let I=vt(p),L=re>=I-1;L&&(M=Math.min(E,d.height)-(re-I));let R=u.top<20||u.bottom>E-20||Math.ceil(M)+1<Math.min(m,S),ie=(o.visualViewport?.scale??1)!==1&&j;if(R||ie){de.current=!0,st(B,fe.current),k(!1);return}let z=Math.max(S,M);if(L){let e=Math.max(0,E-A);B.style.top=d.height>=N?`0`:`${e}px`,B.style.height=`${M}px`,p.scrollTop=vt(p)}else B.style.bottom=`0`,p.scrollTop=re;if(O){let t=d.top,n=d.height,r=O.top+O.height/2,i=qe(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(z===E||M>=C)&&(H.current=!0),x(),T&&s.state.selectedIndex===null&&s.state.activeIndex===null&&w.current[0]!=null&&s.set(`activeIndex`,0),de.current=!0}finally{t()}},[s,z,B,ce,g,_,v,u,x,D,k,pe,te,ne,ue,w,T,P,O]),Y.useEffect(()=>{if(!D||!B||!z)return;let e=c(B);function t(e){f(!1,S(le,e))}return U(e,`resize`,t)},[f,D,B,z]);let q={...ue?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":b||void 0,id:`${R}-list`},onKeyDown(e){y.current=!0,N&&p.has(e.key)&&e.stopPropagation()},onMouseMove(){y.current=!1},onScroll(e){ue||K(e.currentTarget)},...D&&{style:ue?{height:`100%`}:ct}},he=W(`div`,e,{ref:[t,u],state:me,stateAttributesMapping:ht,props:[oe,q,A(se),{className:!ue&&D?ft.className:void 0},o]});return(0,X.jsxs)(Y.Fragment,{children:[!I&&ft.getElement(F),(0,X.jsx)(l,{context:re,modal:!1,disabled:!ae,returnFocus:a,restoreFocus:!0,children:he})]})});function _t(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function vt(e){return Je(e.scrollHeight,e.clientHeight)}function yt(e){return K.getScale(e)}function bt(e,t,n){return e/n[t]}function xt(e,t){return ae({x:bt(e.x,`x`,t),y:bt(e.y,`y`,t),width:bt(e.width,`x`,t),height:bt(e.height,`y`,t)})}var St=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Ct(e){let{style:t}=e,n={};for(let[e,r]of St)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of St){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var wt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=Z(),{alignItemWithTriggerActive:c}=ot(),l=m(o,Q.hasScrollArrows),u=m(o,Q.openMethod),d=m(o,Q.multiple),f={id:`${m(o,Q.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:ct},className:l&&u!==`touch`?ft.className:void 0};return W(`div`,e,{ref:[t,h(e=>{o.set(`listElement`,e)})],props:[f,a]})}),Tt=Y.createContext(void 0);function Et(){let e=Y.useContext(Tt);if(!e)throw Error(R(57));return e}var Dt=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:c=!1,nativeButton:l=!1,...d}=e,f=Y.useRef(null),p=ge({label:o,textRef:f,indexGuessBehavior:_e.GuessFromOrder}),{store:h,itemProps:g,setOpen:_,setValue:v,selectionRef:y,typingRef:b,valuesRef:x,multiple:C,selectedItemTextRef:w}=Z(),T=m(h,Q.isActive,p.index),E=m(h,Q.isSelected,p.index,a),ee=m(h,Q.isSelectedByFocus,p.index),D=m(h,Q.isItemEqualToValue),O=p.index,k=O!==-1,te=Y.useRef(null);L(()=>{if(!k)return;let e=x.current;return e[O]=a,()=>{delete e[O]}},[k,O,a,x]),L(()=>{if(!k)return;let e=h.state.value,t=e;C&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&Te(a,t,D)&&(h.set(`selectedIndex`,O),f.current&&(w.current=f.current))},[k,O,C,D,h,a,w]);let ne=Y.useRef(null),A=Y.useRef(`mouse`),j=Y.useRef(!1),{getButtonProps:M,buttonRef:N}=s({disabled:c,focusableWhenDisabled:!0,native:l,composite:!0}),re={disabled:c,selected:E,highlighted:T};function P(e){let t=h.state.value;if(C){let n=Array.isArray(t)?t:[];v(E?De(n,a,D):[...n,a],S(u,e))}else v(a,S(u,e)),_(!1,S(u,e))}function F(){y.current.dragY=0}let R={role:`option`,"aria-selected":E,tabIndex:T?0:-1,onKeyDown(e){ne.current=e.key,h.set(`activeIndex`,O),e.key===` `&&b.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&A.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&I(e.nativeEvent)&&(n!==void 0||T),i=t&&!r&&!j.current;j.current=!1,!(e.type===`keydown`&&ne.current===null)&&(c||e.type===`keydown`&&ne.current===` `&&b.current||i||(ne.current=null,P(e.nativeEvent)))},onPointerEnter(e){A.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=y.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){A.current=e.pointerType,j.current=!0,F()},onMouseUp(){if(F(),c||A.current===`touch`||j.current)return;let e=!y.current.allowSelectedMouseUp&&E,t=!y.current.allowUnselectedMouseUp&&!E;e||t||(j.current=!0,te.current?.click(),j.current=!1)}},ie=W(`div`,e,{ref:[N,t,p.ref,te],state:re,props:[g,R,d,M]}),z=Y.useMemo(()=>({selected:E,index:O,textRef:f,selectedByFocus:ee,hasRegistered:k}),[E,O,f,ee,k]);return(0,X.jsx)(Tt.Provider,{value:z,children:ie})})),Ot=Y.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=Et();return n||r?(0,X.jsx)(kt,{...e,ref:t}):null}),kt=Y.memo(Y.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=Et(),c=Y.useRef(null),{transitionStatus:l,setMounted:u}=v(s),d=W(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:g});return ie({open:s,ref:c,onComplete(){s||u(!1)}}),d})),At=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=Et(),{firstItemTextRef:o,selectedItemTextRef:s}=Z(),{render:c,className:l,style:u,...d}=e;return W(`div`,e,{ref:[Y.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:d})})),jt=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=Z(),{side:h,scrollDownArrowRef:g,scrollUpArrowRef:_}=ot(),y=m(l,c?Q.scrollUpArrowVisible:Q.scrollDownArrowVisible),b=m(l,Q.openMethod),x=y&&b!==`touch`,S=N(),C=c?_:g,{transitionStatus:w,setMounted:T}=v(x);L(()=>(p.current+=1,l.state.hasScrollArrows||l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set(`hasScrollArrows`,!1)}),[l,p]),ie({open:x,ref:C,onComplete(){x||T(!1)}});let E=W(`div`,e,{ref:[t,C],state:{direction:a,visible:x,side:h,transitionStatus:w},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f();let n=Je(e.scrollHeight,e.clientHeight),r=Ye(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&l.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=Mt(a,c,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},s]});return x||o?E:null});function Mt(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Ye(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Ye(l.offsetTop+l.offsetHeight-r+i,a):a}var Nt=Y.forwardRef(function(e,t){return(0,X.jsx)(jt,{...e,ref:t,direction:`down`})}),Pt=Y.forwardRef(function(e,t){return(0,X.jsx)(jt,{...e,ref:t,direction:`up`})}),Ft=Y.createContext(void 0),It=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Y.useState(),c=Y.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=W(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,X.jsx)(Ft.Provider,{value:c,children:l})}),Lt=$;function Rt({className:e,...t}){return(0,X.jsx)(It,{"data-slot":`select-group`,className:H(`scroll-my-1 p-1`,e),...t})}function zt({className:e,...t}){return(0,X.jsx)(tt,{"data-slot":`select-value`,className:H(`flex flex-1 text-left`,e),...t})}function Bt({className:e,size:t=`default`,children:n,...r}){return(0,X.jsxs)($e,{"data-slot":`select-trigger`,"data-size":t,className:H(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,e),...r,children:[n,(0,X.jsx)(nt,{render:(0,X.jsx)(q,{className:`pointer-events-none size-3.5 text-muted-foreground`})})]})}function Vt({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){let c=P(),l=o&&!c;return(0,X.jsx)(it,{children:(0,X.jsx)(ut,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:l,className:`isolate z-50`,children:(0,X.jsxs)(gt,{"data-slot":`select-content`,"data-align-trigger":l,className:H(`dark relative isolate z-50 max-h-(--available-height) w-max max-w-(--available-width) min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[(0,X.jsx)(Ut,{}),(0,X.jsx)(wt,{children:t}),(0,X.jsx)(Wt,{})]})})})}function Ht({className:e,children:t,...n}){return(0,X.jsxs)(Dt,{"data-slot":`select-item`,className:H(`relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-2 text-xs/relaxed max-md:min-h-11 outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,X.jsx)(At,{className:`flex min-w-0 flex-1 gap-2 [overflow-wrap:anywhere]`,children:t}),(0,X.jsx)(Ot,{render:(0,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`}),children:(0,X.jsx)(me,{className:`pointer-events-none`})})]})}function Ut({className:e,...t}){return(0,X.jsx)(Pt,{"data-slot":`select-scroll-up-button`,className:H(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 max-md:hidden [&_svg:not([class*='size-'])]:size-3.5`,e),...t,children:(0,X.jsx)(ze,{})})}function Wt({className:e,...t}){return(0,X.jsx)(Nt,{"data-slot":`select-scroll-down-button`,className:H(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 max-md:hidden [&_svg:not([class*='size-'])]:size-3.5`,e),...t,children:(0,X.jsx)(q,{})})}export{Bt as a,ft as c,Ue as d,Ht as i,Ye as l,Vt as n,zt as o,Rt as r,mt as s,Lt as t,qe as u};