@hot-updater/console 1.2.0-rc.2 → 1.2.0-rc.21

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 (251) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-OlRj4Jz0.js} +1 -1
  3. package/.output/public/assets/BundleIdDisplay-CP6rsdFO.js +1 -0
  4. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-DUqlpHCp.js} +1 -1
  5. package/.output/public/assets/EventDetails-Dcpdu7re.js +1 -0
  6. package/.output/public/assets/HashValueDisplay-MoZMmTeP.js +1 -0
  7. package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-CSas9gM0.js} +1 -1
  8. package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-CJ69KopR.js} +1 -1
  9. package/.output/public/assets/RelativeTime-CiZ7yXNJ.js +1 -0
  10. package/.output/public/assets/RolloutPercentageBadge-D-tZKnX7.js +1 -0
  11. package/.output/public/assets/StoreSubmission-F00RL5rI.js +1 -0
  12. package/.output/public/assets/TargetDisplay-CoYY8Fs4.js +1 -0
  13. package/.output/public/assets/api-LQJH44FU.js +1 -0
  14. package/.output/public/assets/api-keys-3IL4dIHe.js +1 -0
  15. package/.output/public/assets/api-keys-4w2-ofii.js +1 -0
  16. package/.output/public/assets/badge-laIuYW1U.js +1 -0
  17. package/.output/public/assets/card-ulgg5xHn.js +1 -0
  18. package/.output/public/assets/{index-CqP5HPV6.js → index-Cde2QQJq.js} +3 -3
  19. package/.output/public/assets/insights-0TUItqwh.js +1 -0
  20. package/.output/public/assets/insights-DDRfERph.js +2 -0
  21. package/.output/public/assets/insights-_6iMn8GR.js +42 -0
  22. package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-CYPrQVUC.js} +1 -1
  23. package/.output/public/assets/{insights-usage-rpc-CKQH0pUS.js → insights-usage-rpc-BbFllvi_.js} +1 -1
  24. package/.output/public/assets/insights_.distribution-AZcfvK7x.js +1 -0
  25. package/.output/public/assets/insights_.distribution-BGAqgPi0.js +1 -0
  26. package/.output/public/assets/insights_.distribution-CjYkDRA4.js +2 -0
  27. package/.output/public/assets/installations-Ap2G2tDs.js +1 -0
  28. package/.output/public/assets/{installations-B674P5Z5.js → installations-CSZfo1rG.js} +2 -2
  29. package/.output/public/assets/installations-CwQYwQ6K.js +1 -0
  30. package/.output/public/assets/native-builds-cT9Ha-jZ.js +1 -0
  31. package/.output/public/assets/native-builds-v5wez34c.js +2 -0
  32. package/.output/public/assets/native-builds_._buildId-BBwE8Pcc.js +2 -0
  33. package/.output/public/assets/native-builds_._buildId-DZPcR_up.js +1 -0
  34. package/.output/public/assets/package-ytYrywZH.js +1 -0
  35. package/.output/public/assets/remote-config-CIAEArwq.js +1 -0
  36. package/.output/public/assets/{remote-config-WjpozBG5.js → remote-config-Dwdc-sij.js} +1 -1
  37. package/.output/public/assets/remote-config-ZJ_IRSKE.js +6 -0
  38. package/.output/public/assets/routes-BUWLcUqW.js +1 -0
  39. package/.output/public/assets/routes-Rtz-KcQO.js +2 -0
  40. package/.output/public/assets/styles-bNNic0NS.css +2 -0
  41. package/.output/public/assets/valueToPercent-B6X9rUJM.js +1 -0
  42. package/.output/server/{__23tanstack-start-server-fn-resolver-BcDgi7Q7.mjs → __23tanstack-start-server-fn-resolver-C-9gAWtP.mjs} +58 -46
  43. package/.output/server/_chunks/ssr-renderer.mjs +2 -2
  44. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  45. package/.output/server/_libs/_.mjs +2 -0
  46. package/.output/server/_libs/lucide-react.mjs +1 -27
  47. package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Cl8EZ0Ud.mjs} +2 -2
  48. package/.output/server/_ssr/{BundleIdDisplay-ys5eRBiX.mjs → BundleIdDisplay-gVoZLoqU.mjs} +2 -2
  49. package/.output/server/_ssr/{ConsoleFeatureUnavailable-DFrogDwc.mjs → ConsoleFeatureUnavailable-Dcibk9QQ.mjs} +7 -7
  50. package/.output/server/_ssr/{EventDetails-BOJR7vO-.mjs → EventDetails-CCZ9mS_F.mjs} +8 -8
  51. package/.output/server/_ssr/{HashValueDisplay-d4OxpYG1.mjs → HashValueDisplay-BxHC8iAG.mjs} +6 -6
  52. package/.output/server/_ssr/{InsightsPageHeader-D_ON_oXO.mjs → InsightsPageHeader-CqJqdi-m.mjs} +8 -8
  53. package/.output/server/_ssr/{NotFoundPage-BJKqYxfO.mjs → NotFoundPage-BLIrdxfa.mjs} +2 -2
  54. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-Cuhy0CIO.mjs} +12 -2
  55. package/.output/server/_ssr/RelativeTime-B1Sy1q_O.mjs +209 -0
  56. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-BmWPR_Tb.mjs} +19 -3
  57. package/.output/server/_ssr/StoreSubmission-DIsoEgf-.mjs +65 -0
  58. package/.output/server/_ssr/TargetDisplay-C2ROSppY.mjs +100 -0
  59. package/.output/server/_ssr/{alert-dialog-BU7QeAL9.mjs → alert-dialog-C1y2G90R.mjs} +1 -1
  60. package/.output/server/_ssr/{api-Dn2NwWiq.mjs → api-D8gN7V0h.mjs} +99 -22
  61. package/.output/server/_ssr/{api-keys-D5rW-eAH.mjs → api-keys-DybL9aTC.mjs} +2 -2
  62. package/.output/server/_ssr/{api-keys-Ckoc4av7.mjs → api-keys-W6eabF-V.mjs} +10 -9
  63. package/.output/server/_ssr/{api-keys-rpc-Bf2x7mQb.mjs → api-keys-rpc-CEaSDqVK.mjs} +4 -4
  64. package/.output/server/_ssr/{api-rpc-Bg7CTu5A.mjs → api-rpc-DloD35JY.mjs} +43 -18
  65. package/.output/server/_ssr/{auth-rpc-C41fl9Q5.mjs → auth-rpc-DOGHWAlV.mjs} +5 -5
  66. package/.output/server/_ssr/{auth.server-Dfa8DroN.mjs → auth.server-BO8fBOxh.mjs} +165 -149
  67. package/.output/server/_ssr/{badge-B-YGm4ng.mjs → badge-DFQ0dCIK.mjs} +2 -44
  68. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BGVvqWx7.mjs} +1 -1
  69. package/.output/server/_ssr/card-Ec0pJUEs.mjs +49 -0
  70. package/.output/server/_ssr/{config.server-DBX318ww.mjs → config.server-AfVsZPlA.mjs} +4 -4
  71. package/.output/server/_ssr/{console-access-CwSkUsOn.mjs → console-access-fb0N6Nkh.mjs} +2 -2
  72. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-CgdQJQlX.mjs} +1 -1
  73. package/.output/server/_ssr/{console-features-api-BbojT91g.mjs → console-features-api-VIcoTdNC.mjs} +5 -5
  74. package/.output/server/_ssr/{console-features-rpc-3bq2wS5U.mjs → console-features-rpc-BNjlCLLR.mjs} +4 -4
  75. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  76. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
  77. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  78. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
  79. package/.output/server/_ssr/{dialog-RPz_4IaA.mjs → dialog-CqqX-d24.mjs} +1 -1
  80. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
  81. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-BX8ODCZT.mjs} +1 -1
  82. package/.output/server/_ssr/{empty-BE1Gn6IB.mjs → empty-o55VPF-m.mjs} +2 -2
  83. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  84. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-C_CmBF4x.mjs} +3 -3
  85. package/.output/server/_ssr/{field-DUwSBic5.mjs → field-yKSsJRQo.mjs} +2 -2
  86. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-BJTufthT.mjs} +2 -2
  87. package/.output/server/_ssr/{input-group-BHI0ziHT.mjs → input-group-DlSVwRKN.mjs} +1 -1
  88. package/.output/server/_ssr/{insights-DVvFyEOH.mjs → insights-D1hSSSnf.mjs} +5 -5
  89. package/.output/server/_ssr/{insights-BGzKbtLf.mjs → insights-DmskI16o.mjs} +28 -27
  90. package/.output/server/_ssr/{insights-api-Bw_ZEDUY.mjs → insights-api-BedUQeHn.mjs} +5 -5
  91. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-Bz3sWNZm.mjs} +2 -2
  92. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DNQ9qVVf.mjs} +2 -2
  93. package/.output/server/_ssr/{insights-failures-rpc-BuRU2I5g.mjs → insights-failures-rpc-pyvkJiMW.mjs} +11 -11
  94. package/.output/server/_ssr/{insights-DF0SkYDy.mjs → insights-oydyzlp4.mjs} +2 -2
  95. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-DOkpqnQ8.mjs} +1 -1
  96. package/.output/server/_ssr/{insights-recovery-rpc-CsWe72mW.mjs → insights-recovery-rpc-C8oSWMSL.mjs} +7 -7
  97. package/.output/server/_ssr/{insights-rpc-CD5VaLy2.mjs → insights-rpc-Bt3dM8UW.mjs} +4 -4
  98. package/.output/server/_ssr/{insights-search-C3R6mzW-.mjs → insights-search-CH_Q2pPQ.mjs} +4 -4
  99. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-4KDIN3Kg.mjs} +1 -1
  100. package/.output/server/_ssr/{insights-usage-rpc-Bbg14JFS.mjs → insights-usage-rpc-CTZ63vhq.mjs} +7 -7
  101. package/.output/server/_ssr/{insights-usage-rpc-Duqu3q-H.mjs → insights-usage-rpc-CTt1yIIY.mjs} +4 -4
  102. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-DmQdJZqT.mjs} +3 -3
  103. package/.output/server/_ssr/{insights_.distribution-HZrwJteU.mjs → insights_.distribution-CxB6jrKu.mjs} +5 -5
  104. package/.output/server/_ssr/{insights_.distribution-DH_9B5XU.mjs → insights_.distribution-DG4pvrB8.mjs} +16 -15
  105. package/.output/server/_ssr/{insights_.distribution-DIA0Gi7f.mjs → insights_.distribution-DS8Dc6_5.mjs} +2 -2
  106. package/.output/server/_ssr/{installations-SuuoQ-xH.mjs → installations-BgVrlTdW.mjs} +12 -12
  107. package/.output/server/_ssr/{installations-Ct7njvit.mjs → installations-ChOjrcPZ.mjs} +4 -4
  108. package/.output/server/_ssr/{installations-D-O92-Nr.mjs → installations-_PSpNZM6.mjs} +2 -2
  109. package/.output/server/_ssr/{listReleases-D_GY00SQ.mjs → listReleases-CQEceg8j.mjs} +1 -1
  110. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  111. package/.output/server/_ssr/native-artifact-H1MDP0Jz.mjs +593 -0
  112. package/.output/server/_ssr/native-builds-CHOxmjmm.mjs +548 -0
  113. package/.output/server/_ssr/{native-builds-DhXL5zf_.mjs → native-builds-CWA9Y__P.mjs} +58 -20
  114. package/.output/server/_ssr/{native-builds-DhVG-4du.mjs → native-builds-DqJ41IA-.mjs} +3 -3
  115. package/.output/server/_ssr/{native-builds_._buildId-dDLkfNFZ.mjs → native-builds_._buildId-Bb-mVQnh.mjs} +3 -3
  116. package/.output/server/_ssr/native-builds_._buildId-C1lMUjaj.mjs +1294 -0
  117. package/.output/server/_ssr/nativeBuildDevice-Dn16gNmZ.mjs +230 -0
  118. package/.output/server/_ssr/nativeBuildDownloadLink-wyUj7Oyi.mjs +96 -0
  119. package/.output/server/_ssr/nativeBuildInstall-i5f-2-qd.mjs +203 -0
  120. package/.output/server/_ssr/nativeBuildQr-P9qKcI7l.mjs +115 -0
  121. package/.output/server/_ssr/{nativeBuilds-B_7BPjt_.mjs → nativeBuilds-ByQdDnHG.mjs} +61 -29
  122. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
  123. package/.output/server/_ssr/publicConsoleBase-3IHSHvqd.mjs +27 -0
  124. package/.output/server/_ssr/{qr-code-C7kNRIDX.mjs → qr-code-pENFuyy9.mjs} +1 -1
  125. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-C7sUFDwa.mjs} +2 -2
  126. package/.output/server/_ssr/{release-adoption-rpc-Cc2AJ-yS.mjs → release-adoption-rpc-BUPLEJYw.mjs} +9 -9
  127. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-LLYlRnUB.mjs} +4 -4
  128. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
  129. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
  130. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
  131. package/.output/server/_ssr/{remote-config-BYyQFBG8.mjs → remote-config-BMdoiYuB.mjs} +2 -2
  132. package/.output/server/_ssr/{remote-config-CTZ_zxNg.mjs → remote-config-DvM_KKl6.mjs} +20 -19
  133. package/.output/server/_ssr/{remote-config-DvMHWxja.mjs → remote-config-XmtJFUKn.mjs} +2 -2
  134. package/.output/server/_ssr/{remote-config-rpc-DibiGuw7.mjs → remote-config-rpc-DFRsn7f8.mjs} +5 -5
  135. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  136. package/.output/server/_ssr/{router-Da0sMVN2.mjs → router-KM_t8okm.mjs} +103 -52
  137. package/.output/server/_ssr/{routes-CHl0_VK3.mjs → routes-Beckr53C.mjs} +260 -383
  138. package/.output/server/_ssr/{routes-FE2SJgBr.mjs → routes-MrSajWvI.mjs} +14 -18
  139. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BsTTLV-B.mjs} +4 -4
  140. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
  141. package/.output/server/_ssr/{schema-migration-rpc-Bh7oEZEG.mjs → schema-migration-rpc-BqNKpOrg.mjs} +4 -4
  142. package/.output/server/_ssr/{select-BhPCNdHx.mjs → select-CUCLbsEW.mjs} +2 -2
  143. package/.output/server/_ssr/{server-BjkQXKZR.mjs → server-DpE_idiZ.mjs} +6 -6
  144. package/.output/server/_ssr/{sidebar-B7OTpt-8.mjs → sidebar-xs2XmYh9.mjs} +2 -2
  145. package/.output/server/_ssr/ssr.mjs +1 -1
  146. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-C0XSSCq4.mjs} +2 -2
  147. package/.output/server/_ssr/{switch-CIkMfFrN.mjs → switch-CWp_RWCq.mjs} +2 -2
  148. package/.output/server/_ssr/{table-BIzH49v-.mjs → table-DtPvFx_v.mjs} +1 -1
  149. package/.output/server/_ssr/{tabs-WDYlrXEm.mjs → tabs-D0Jdy8v4.mjs} +2 -2
  150. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DPYzv9bE.mjs} +3 -3
  151. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
  152. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
  153. package/.output/server/_tanstack-start-manifest_v-AYP07Vaf.mjs +194 -0
  154. package/.output/server/index.mjs +318 -297
  155. package/package.json +7 -7
  156. package/src/components/ChannelBadge.tsx +9 -9
  157. package/src/components/DataTable.tsx +303 -0
  158. package/src/components/HashValueDisplay.tsx +6 -3
  159. package/src/components/PlatformIcon.tsx +10 -0
  160. package/src/components/RelativeTime.tsx +31 -0
  161. package/src/components/TargetDisplay.tsx +69 -0
  162. package/src/components/features/channels/ChannelManagementDialog.tsx +3 -8
  163. package/src/components/features/insights/ReleaseActivity.tsx +1 -1
  164. package/src/components/features/native-builds/BuiltInBundleCard.tsx +108 -58
  165. package/src/components/features/native-builds/CommitLink.tsx +1 -1
  166. package/src/components/features/native-builds/ImportBuild.tsx +1 -1
  167. package/src/components/features/native-builds/InstallCard.tsx +246 -46
  168. package/src/components/features/native-builds/IosInstall.tsx +300 -0
  169. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +4 -1
  170. package/src/components/features/native-builds/NativeBuildsPage.tsx +63 -76
  171. package/src/components/features/native-builds/NativeBuildsTable.tsx +436 -315
  172. package/src/components/features/native-builds/PatchesCard.tsx +3 -2
  173. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
  174. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  175. package/src/components/features/native-builds/ShortHash.tsx +1 -1
  176. package/src/components/features/native-builds/StoreSubmission.tsx +12 -3
  177. package/src/lib/api-rpc.ts +55 -6
  178. package/src/lib/api.ts +85 -12
  179. package/src/lib/native-builds.ts +95 -17
  180. package/src/lib/server/local-console.ts +1 -1
  181. package/src/lib/server/nativeBuildDevice.ts +274 -0
  182. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  183. package/src/lib/server/nativeBuildInstall.ts +355 -0
  184. package/src/lib/server/nativeBuildQr.ts +114 -24
  185. package/src/lib/server/nativeBuilds.ts +87 -33
  186. package/src/lib/server/plistText.ts +17 -0
  187. package/src/lib/server/publicConsoleBase.ts +17 -0
  188. package/src/routeTree.gen.ts +114 -0
  189. package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +17 -0
  190. package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +17 -0
  191. package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +17 -0
  192. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  193. package/src/routes/[_]hot-updater/native-builds/preview-qr.ts +14 -0
  194. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  195. package/src/routes/index.tsx +290 -429
  196. package/src/styles.css +16 -0
  197. package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
  198. package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
  199. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  200. package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
  201. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  202. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  203. package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
  204. package/.output/public/assets/badge-DWFcDWho.js +0 -1
  205. package/.output/public/assets/download-Cf24LBde.js +0 -1
  206. package/.output/public/assets/insights-B-0odqpt.js +0 -42
  207. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  208. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  209. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  210. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  211. package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
  212. package/.output/public/assets/installations-BWxczZ2t.js +0 -1
  213. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  214. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  215. package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
  216. package/.output/public/assets/native-builds-DAy2678K.js +0 -1
  217. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  218. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  219. package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
  220. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  221. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  222. package/.output/public/assets/routes-CCD33Azv.js +0 -2
  223. package/.output/public/assets/styles-uK-0vUMk.css +0 -2
  224. package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
  225. package/.output/server/_ssr/RolloutPercentageBadge-BpI_iTsm.mjs +0 -21
  226. package/.output/server/_ssr/StoreSubmission-CXMFpHyp.mjs +0 -139
  227. package/.output/server/_ssr/native-builds-bTSKsvYp.mjs +0 -510
  228. package/.output/server/_ssr/native-builds_._buildId-D20tGR3l.mjs +0 -813
  229. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  230. package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
  231. /package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-Ckb5GMhh.js} +0 -0
  232. /package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-DiRLrFVe.js} +0 -0
  233. /package/.output/public/assets/{dialog-CNUPxNxH.js → dialog-CLIaC82_.js} +0 -0
  234. /package/.output/public/assets/{dist-CPlO6ko9.js → dist-Bf1BPKMs.js} +0 -0
  235. /package/.output/public/assets/{empty-B3Uwdd6k.js → empty-Bhlj8PEo.js} +0 -0
  236. /package/.output/public/assets/{field-D-2-mnNh.js → field-q4sTYzNU.js} +0 -0
  237. /package/.output/public/assets/{history-DqHlgSuV.js → history-DakJoeSM.js} +0 -0
  238. /package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-D_NfhUbX.js} +0 -0
  239. /package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-DzBe6DHr.js} +0 -0
  240. /package/.output/public/assets/{list--NIee1FZ.js → list-B6GeoQ_b.js} +0 -0
  241. /package/.output/public/assets/{plus-BReVKct-.js → plus-BVhOauU3.js} +0 -0
  242. /package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-C-tvoCcE.js} +0 -0
  243. /package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-DvyxGIsm.js} +0 -0
  244. /package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-Clk5xTeE.js} +0 -0
  245. /package/.output/public/assets/{search-BCel4Oy6.js → search-nnvSOTEB.js} +0 -0
  246. /package/.output/public/assets/{smartphone-CMaSy_ir.js → smartphone-r0rRdPas.js} +0 -0
  247. /package/.output/public/assets/{switch-BpdiHL_t.js → switch-CP6GsHmN.js} +0 -0
  248. /package/.output/public/assets/{table-Bpy3SvSo.js → table-TUtVz-2l.js} +0 -0
  249. /package/.output/public/assets/{tabs-Xmt7tZeG.js → tabs-CP3CSmtI.js} +0 -0
  250. /package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-Bt0YXG26.js} +0 -0
  251. /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-cI6C63Fm.js} +0 -0
@@ -0,0 +1,1294 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { bt as require_react, yt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { K as ChevronRight, M as HardDrive, N as GitBranch, R as ExternalLink, S as PackageOpen, U as CircleCheck, _ as RefreshCw, et as ArrowUpRight, i as TriangleAlert, j as History, q as ChevronLeft, u as Smartphone, z as Download } from "../_libs/lucide-react.mjs";
4
+ import { C as Skeleton, O as buttonVariants, S as SidebarTrigger, k as cn, t as Button$1 } from "./sidebar-xs2XmYh9.mjs";
5
+ import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
6
+ import { a as EmptyMedia, i as EmptyHeader, n as EmptyContent, o as EmptyTitle, r as EmptyDescription, t as Empty } from "./empty-o55VPF-m.mjs";
7
+ import { a as CardHeader, n as CardContent, o as CardTitle, t as Card } from "./card-Ec0pJUEs.mjs";
8
+ import { a as Badge, i as AlertTitle, n as AlertAction, r as AlertDescription, t as Alert } from "./badge-DFQ0dCIK.mjs";
9
+ import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-DtPvFx_v.mjs";
10
+ import { n as toast } from "../_libs/sonner.mjs";
11
+ import { i as NUMERIC_COHORT_SIZE } from "./dist-B6-irDRA.mjs";
12
+ import { C as shellQuote, _ as nativeBuildLabel, a as consolePathOf, b as nativeBuildSignedDownloadUrl, d as nativeBuildDeviceAddCommand, f as nativeBuildDeviceProfilePath, g as nativeBuildItmsUrl, h as nativeBuildInstallCommand, m as nativeBuildFileName, n as IOS_UDID_STORAGE_KEY, o as formatByteSize, p as nativeBuildDownloadPath, r as NATIVE_BUILD_INSTALL_LINK_TTL_MS, s as nativeBuildArtifacts, t as IOS_UDID_PATTERN, x as platformLabel } from "./native-builds-CWA9Y__P.mjs";
13
+ import { t as PlatformIcon } from "./PlatformIcon-Cuhy0CIO.mjs";
14
+ import { a as useConfigQuery, d as useNativeBuildDownloadLinkQuery, f as useNativeBuildDownloadUrlQuery, l as useMarkNativeBuildMutation, m as useNativeBuildPatchesQuery, p as useNativeBuildInstallEligibilityQuery, u as useNativeBuildDetailQuery } from "./api-D8gN7V0h.mjs";
15
+ import { t as BundleIdDisplay } from "./BundleIdDisplay-gVoZLoqU.mjs";
16
+ import { a as TargetDisplay, n as ChannelBadge, r as CopyableText, t as BuildKeyDisplay } from "./TargetDisplay-C2ROSppY.mjs";
17
+ import { n as require_dayjs_min } from "../_libs/dayjs.mjs";
18
+ import { n as isSubmitted, t as StoreSubmissionBadge } from "./StoreSubmission-DIsoEgf-.mjs";
19
+ import { t as qrCodePath } from "./qr-code-pENFuyy9.mjs";
20
+ import { t as Route } from "./native-builds_._buildId-Bb-mVQnh.mjs";
21
+ import { n as TimestampDisplay, r as getCommitUrl, t as RolloutPercentageBadge } from "./RolloutPercentageBadge-BmWPR_Tb.mjs";
22
+ //#region node_modules/.nitro/vite/services/ssr/assets/native-builds_._buildId-C1lMUjaj.js
23
+ var import_react = /* @__PURE__ */ __toESM(require_react());
24
+ var import_jsx_runtime = require_jsx_runtime();
25
+ var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min());
26
+ /**
27
+ * A hash shortened to its prefix, as git shows a commit: never cut in the
28
+ * middle, the full value on hover, and copied on click.
29
+ */
30
+ function ShortHash({ value, length, label }) {
31
+ const copy = async () => {
32
+ try {
33
+ await navigator.clipboard.writeText(value);
34
+ toast.success("Copied to clipboard", { description: value });
35
+ } catch {
36
+ toast.error(`Could not copy the ${label}`);
37
+ }
38
+ };
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
40
+ "aria-label": `Copy the ${label} ${value}`,
41
+ className: "relative cursor-copy rounded-sm font-mono after:absolute after:-inset-x-2 after:-inset-y-4 sm:after:hidden text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
42
+ onClick: (event) => {
43
+ event.stopPropagation();
44
+ copy();
45
+ },
46
+ title: value,
47
+ translate: "no",
48
+ type: "button",
49
+ children: value.slice(0, length)
50
+ });
51
+ }
52
+ /**
53
+ * A build's commit as git shows it, its first 7 characters: a link to the
54
+ * commit when `console.gitUrl` is set, else a button that copies the full
55
+ * SHA. The full SHA shows on hover either way.
56
+ */
57
+ function CommitLink({ hash }) {
58
+ const config = useConfigQuery();
59
+ if (hash === null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
60
+ className: "text-muted-foreground",
61
+ children: "—"
62
+ });
63
+ const url = getCommitUrl(config.data?.console.gitUrl, hash);
64
+ return url === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShortHash, {
65
+ label: "commit",
66
+ length: 7,
67
+ value: hash
68
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
69
+ className: "relative font-mono text-xs whitespace-nowrap underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-4 hover:underline sm:after:hidden",
70
+ href: url,
71
+ onClick: (event) => event.stopPropagation(),
72
+ rel: "noreferrer",
73
+ target: "_blank",
74
+ title: hash,
75
+ translate: "no",
76
+ children: hash.slice(0, 7)
77
+ });
78
+ }
79
+ function Row({ label, children }) {
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
81
+ className: "grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4",
82
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
83
+ className: "text-xs font-medium text-muted-foreground",
84
+ children: label
85
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
86
+ className: "min-w-0 text-sm",
87
+ children
88
+ })]
89
+ });
90
+ }
91
+ /** Marks or clears the build where the card says what the mark does. */
92
+ function StoreBuildAction({ detail }) {
93
+ const { build, channel } = detail;
94
+ const mark = useMarkNativeBuildMutation();
95
+ if (channel.startsWith("sandbox-")) return null;
96
+ const storeBuild = build.store_build !== true;
97
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
98
+ className: "min-h-11 shrink-0 sm:min-h-8",
99
+ disabled: mark.isPending,
100
+ onClick: () => mark.mutate({
101
+ id: build.id,
102
+ storeBuild
103
+ }, {
104
+ onSuccess: () => {
105
+ toast.success(storeBuild ? "Marked as the store build" : "Mark cleared");
106
+ },
107
+ onError: (error) => {
108
+ toast.error("Could not change the mark", { description: error.message });
109
+ }
110
+ }),
111
+ size: "sm",
112
+ type: "button",
113
+ variant: "outline",
114
+ children: storeBuild ? "Mark as store build" : "Clear mark"
115
+ });
116
+ }
117
+ /**
118
+ * Which build new deploys patch from: this one, as the store build or as the
119
+ * newest with no mark, or another, which it links to.
120
+ */
121
+ function BaselineStatus({ detail }) {
122
+ const { build, newestInScope, storeBuildInScope } = detail;
123
+ const base = storeBuildInScope ?? newestInScope;
124
+ if (base === null) return null;
125
+ const isBase = base.id === build.id;
126
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
127
+ className: "flex flex-col gap-3 rounded-md border bg-muted/40 p-3 text-xs sm:flex-row sm:items-center sm:justify-between",
128
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
129
+ className: "flex items-start gap-2",
130
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(isBase ? CircleCheck : History, {
131
+ "aria-hidden": "true",
132
+ className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground"
133
+ }), storeBuildInScope?.id === build.id ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
134
+ className: "font-medium",
135
+ children: "Store build."
136
+ }), " New deploys to this scope patch from this build."] }) : isBase ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
137
+ className: "font-medium",
138
+ children: "Current baseline."
139
+ }), " The newest build, and no store build is marked. New deploys to this scope patch from this build."] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
140
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
141
+ className: "font-medium",
142
+ children: "Not the base."
143
+ }),
144
+ " New deploys patch from",
145
+ " ",
146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
147
+ className: "inline-flex items-center gap-0.5 font-medium underline underline-offset-4",
148
+ params: { buildId: base.id },
149
+ to: "/native-builds/$buildId",
150
+ children: [nativeBuildLabel(base) ?? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
151
+ platformLabel(base.platform),
152
+ " ",
153
+ nativeBuildArtifacts[base.artifact_kind].label,
154
+ " ·",
155
+ " ",
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TimestampDisplay, { uuid: base.id })
157
+ ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
158
+ "aria-hidden": "true",
159
+ className: "size-3"
160
+ })]
161
+ }),
162
+ ", so this one gets no new patches."
163
+ ] })]
164
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StoreBuildAction, { detail })]
165
+ });
166
+ }
167
+ /**
168
+ * The build's built-in bundle: the bundle every install runs until its
169
+ * first OTA, and the base that OTA's patch starts from.
170
+ */
171
+ function BuiltInBundleCard({ detail }) {
172
+ const { build, builtInBundle, channel } = detail;
173
+ const childCount = builtInBundle?.childCount ?? 0;
174
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
175
+ className: "overflow-hidden shadow-sm",
176
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
177
+ className: "border-b px-4 py-3",
178
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
179
+ className: "text-sm",
180
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Built-in bundle" })
181
+ })
182
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
183
+ className: "flex flex-col gap-4 p-4 sm:p-6",
184
+ children: [
185
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
186
+ className: "flex flex-col gap-3",
187
+ children: [
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
189
+ label: "Bundle ID",
190
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BundleIdDisplay, { bundleId: build.min_bundle_id })
191
+ }),
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
193
+ label: "OTAs patching from it",
194
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
195
+ className: "tabular-nums",
196
+ children: childCount === 1 ? "1 bundle" : `${childCount} bundles`
197
+ })
198
+ }),
199
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
200
+ label: "Scope",
201
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
202
+ className: "flex flex-wrap items-center gap-1.5",
203
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
204
+ "aria-label": `Show the builds that embed ${channel}`,
205
+ className: "relative rounded-md after:absolute after:inset-x-0 after:-inset-y-[11px] sm:after:hidden",
206
+ search: { channel },
207
+ to: "/native-builds",
208
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChannelBadge, { channel })
209
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
210
+ className: "text-xs",
211
+ children: platformLabel(build.platform)
212
+ })]
213
+ })
214
+ }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
216
+ label: "Target",
217
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
218
+ className: "text-xs",
219
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TargetDisplay, {
220
+ appVersion: build.app_version,
221
+ fingerprintHash: build.fingerprint_hash
222
+ })
223
+ })
224
+ }),
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
226
+ label: "Build key",
227
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
228
+ className: "text-xs",
229
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BuildKeyDisplay, { value: build.build_key })
230
+ })
231
+ }),
232
+ !build.build_number ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
233
+ label: "Build",
234
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
235
+ className: "font-mono text-xs tabular-nums",
236
+ translate: "no",
237
+ children: build.build_number
238
+ })
239
+ }),
240
+ isSubmitted(build) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
241
+ label: "Store",
242
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StoreSubmissionBadge, {
243
+ build,
244
+ withTime: true
245
+ })
246
+ }) : null,
247
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
248
+ label: "Commit",
249
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommitLink, { hash: build.git_commit_hash })
250
+ }),
251
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, {
252
+ label: "Created",
253
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TimestampDisplay, {
254
+ format: "both",
255
+ uuid: build.id
256
+ })
257
+ })
258
+ ]
259
+ }),
260
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaselineStatus, { detail }),
261
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
262
+ className: "text-xs text-muted-foreground",
263
+ children: "A store or test install of this build runs this bundle until its first OTA. That OTA downloads as a patch from this bundle when one exists, and as the full bundle otherwise."
264
+ })
265
+ ]
266
+ })]
267
+ });
268
+ }
269
+ /**
270
+ * A QR code of `value`, drawn as one SVG path with the standard four-module
271
+ * quiet zone. Phone cameras read dark modules on a light ground, so the code
272
+ * keeps its own two colors in both themes instead of the theme's tokens.
273
+ */
274
+ function QrCode({ value, label, className }) {
275
+ const { size, path } = (0, import_react.useMemo)(() => qrCodePath(value), [value]);
276
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
277
+ "aria-label": label,
278
+ className: cn("aspect-square rounded-md", className),
279
+ role: "img",
280
+ shapeRendering: "crispEdges",
281
+ viewBox: `0 0 ${size} ${size}`,
282
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
283
+ fill: "#fff",
284
+ height: size,
285
+ width: size
286
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
287
+ d: path,
288
+ fill: "#000"
289
+ })]
290
+ });
291
+ }
292
+ /**
293
+ * What an install does to the App Store's copy of the app on this iPhone, with
294
+ * the same bundle ID. The one line to change after trying it on a real iPhone.
295
+ */
296
+ var IOS_STORE_APP_NOTE = "With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.";
297
+ var ACTION_CLASS = "h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit";
298
+ /** Whether this browser runs on an iPhone or iPad: an iPad says it is a Mac. */
299
+ var isIosBrowser = (browser) => /iPhone|iPod|iPad/u.test(browser.userAgent) || /Macintosh/u.test(browser.userAgent) && browser.maxTouchPoints > 1;
300
+ /**
301
+ * Whether this page is open on an iPhone, and the UDID the phone kept when it
302
+ * checked itself. Read after the page mounts: the server renders it without a
303
+ * browser. Null until then.
304
+ */
305
+ var useIosDevice = () => {
306
+ const [device, setDevice] = (0, import_react.useState)(null);
307
+ (0, import_react.useEffect)(() => {
308
+ let udid = null;
309
+ try {
310
+ udid = window.localStorage.getItem(IOS_UDID_STORAGE_KEY);
311
+ } catch {}
312
+ setDevice({
313
+ ios: isIosBrowser(navigator),
314
+ udid: udid !== null && IOS_UDID_PATTERN.test(udid) ? udid : null
315
+ });
316
+ }, []);
317
+ return device;
318
+ };
319
+ /**
320
+ * How long before its link expires the page stops offering it: the installer
321
+ * fetches the manifest, then the IPA, only after the tester confirms the prompt.
322
+ */
323
+ var INSTALL_LINK_MARGIN_MS = 300 * 1e3;
324
+ /**
325
+ * Whether a link read at `readAtMs` is past offering, measured on this phone's
326
+ * clock from when it arrived, since the phone's clock may disagree with the
327
+ * server's. A failed refresh leaves `readAtMs` where it was. Timers stop while
328
+ * the phone sleeps, so coming back to the page checks again.
329
+ */
330
+ var useInstallLinkExpired = (readAtMs, holdsLink) => {
331
+ const [, check] = (0, import_react.useReducer)((count) => count + 1, 0);
332
+ const expiresAtMs = readAtMs + NATIVE_BUILD_INSTALL_LINK_TTL_MS - INSTALL_LINK_MARGIN_MS;
333
+ (0, import_react.useEffect)(() => {
334
+ if (!holdsLink) return;
335
+ const timer = setTimeout(check, Math.max(0, expiresAtMs - Date.now()));
336
+ document.addEventListener("visibilitychange", check);
337
+ window.addEventListener("pageshow", check);
338
+ return () => {
339
+ clearTimeout(timer);
340
+ document.removeEventListener("visibilitychange", check);
341
+ window.removeEventListener("pageshow", check);
342
+ };
343
+ }, [expiresAtMs, holdsLink]);
344
+ return holdsLink && Date.now() >= expiresAtMs;
345
+ };
346
+ /** In place of Install once its link has expired: it never offers a dead link. */
347
+ function RenewInstallLink({ fetching, onRenew }) {
348
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
349
+ className: "flex min-w-0 flex-col gap-2",
350
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
351
+ className: "text-xs text-muted-foreground",
352
+ role: "status",
353
+ children: ["This install link has expired.", fetching ? " Getting a new one." : ""]
354
+ }), fetching ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
355
+ className: ACTION_CLASS,
356
+ onClick: onRenew,
357
+ variant: "outline",
358
+ children: "Get a new link"
359
+ })]
360
+ });
361
+ }
362
+ function InstallButton({ build, token, secondary = false }) {
363
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
364
+ className: buttonVariants({
365
+ className: ACTION_CLASS,
366
+ variant: secondary ? "outline" : "default"
367
+ }),
368
+ href: nativeBuildItmsUrl(window.location, build.id, token),
369
+ children: secondary ? "Install anyway" : "Install"
370
+ });
371
+ }
372
+ /** What a tester reads before Install opens the system's install prompt. */
373
+ function InstallNotes() {
374
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
375
+ className: "flex min-w-0 flex-col gap-1",
376
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
377
+ className: "text-xs text-muted-foreground",
378
+ children: "On iOS 16 or later, the app opens only with Developer Mode on: Settings, Privacy & Security, Developer Mode."
379
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
380
+ className: "text-xs text-muted-foreground",
381
+ children: IOS_STORE_APP_NOTE
382
+ })]
383
+ });
384
+ }
385
+ /**
386
+ * The link that hands this iPhone the profile that reads its UDID, under the
387
+ * console's path. A plain link, so iOS offers the profile.
388
+ */
389
+ function CheckThisIphone({ build, outline = false }) {
390
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
391
+ className: buttonVariants({
392
+ className: ACTION_CLASS,
393
+ variant: outline ? "outline" : "default"
394
+ }),
395
+ href: `${consolePathOf(window.location, build.id)}${nativeBuildDeviceProfilePath(build.id)}`,
396
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Smartphone, { "data-icon": "inline-start" }), "Check this iPhone"]
397
+ });
398
+ }
399
+ /**
400
+ * Installing an IPA from this iPhone: the build's IPA says what it allows, read
401
+ * once when the page opens here, so a phone it doesn't list goes to its UDID
402
+ * rather than a download iOS refuses at the end. App Store Connect isn't asked:
403
+ * a device registered after this IPA was signed still isn't in it.
404
+ */
405
+ function IosInstall({ build, udid }) {
406
+ const eligibility = useNativeBuildInstallEligibilityQuery(build.id, udid);
407
+ const { refetch } = eligibility;
408
+ const expired = useInstallLinkExpired(eligibility.dataUpdatedAt, eligibility.data?.status === "installable");
409
+ (0, import_react.useEffect)(() => {
410
+ if (expired) refetch();
411
+ }, [expired, refetch]);
412
+ if (eligibility.isPending) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, {
413
+ "aria-label": "Reading this IPA",
414
+ className: "h-11 w-full"
415
+ });
416
+ const result = eligibility.data;
417
+ if (result === void 0 || result.status === "unavailable") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
418
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
419
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Installation details unavailable" }),
420
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "The Console couldn't read this IPA from storage in parts, which takes an HTTPS download link that answers Range requests. Xcode or Apple Configurator still installs the download over USB." })
421
+ ] });
422
+ if (result.status === "store") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
423
+ className: "text-xs text-muted-foreground",
424
+ children: "This IPA is an App Store export, which installs through TestFlight, not from this page."
425
+ });
426
+ if (result.status === "expired") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
427
+ variant: "destructive",
428
+ children: [
429
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
430
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "This build's profile has expired" }),
431
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertDescription, { children: [
432
+ "It expired on ",
433
+ (0, import_dayjs_min.default)(result.expiresAt).format("YYYY-MM-DD"),
434
+ ". A maintainer rebuilds it to install again."
435
+ ] })
436
+ ]
437
+ });
438
+ const token = result.link.status === "issued" ? result.link.token : null;
439
+ if (result.link.status === "no-secret") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
440
+ className: "text-xs text-muted-foreground",
441
+ role: "status",
442
+ children: [
443
+ "Set ",
444
+ result.link.secretName,
445
+ " on the Console to install from this page."
446
+ ]
447
+ });
448
+ if (token === null) return null;
449
+ const install = ({ secondary = false } = {}) => expired ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RenewInstallLink, {
450
+ fetching: eligibility.isFetching,
451
+ onRenew: () => void refetch()
452
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallButton, {
453
+ build,
454
+ secondary,
455
+ token
456
+ });
457
+ if (result.device === "included") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
458
+ className: "flex min-w-0 flex-col gap-3",
459
+ children: [
460
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
461
+ className: "text-sm font-medium",
462
+ children: "This iPhone is in this build."
463
+ }),
464
+ install(),
465
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallNotes, {})
466
+ ]
467
+ });
468
+ if (result.device === "not-included") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
469
+ className: "flex min-w-0 flex-col gap-3",
470
+ children: [
471
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
472
+ className: "flex min-w-0 flex-col gap-1",
473
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
474
+ className: "text-sm font-medium",
475
+ children: "Not in this build"
476
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
477
+ className: "text-xs text-muted-foreground",
478
+ children: "This IPA was signed without this iPhone. Send a maintainer this command, then open the newer build once they've rebuilt. Send it only if this is your iPhone."
479
+ })]
480
+ }),
481
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
482
+ label: "the command that registers this iPhone",
483
+ value: nativeBuildDeviceAddCommand(udid ?? ""),
484
+ wrap: true
485
+ }),
486
+ install({ secondary: true }),
487
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallNotes, {})
488
+ ]
489
+ });
490
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
491
+ className: "flex min-w-0 flex-col gap-3",
492
+ children: [
493
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
494
+ className: "flex min-w-0 flex-col gap-1",
495
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
496
+ className: "text-sm font-medium",
497
+ children: "Is this iPhone in this build?"
498
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
499
+ className: "text-xs text-muted-foreground",
500
+ children: "iOS installs this IPA only on the devices it lists. A profile reads this iPhone's ID and nothing else: allow the download, then install it from Settings, where iOS calls it not signed. Nothing stays installed."
501
+ })]
502
+ }),
503
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
504
+ className: "flex flex-col gap-2 sm:flex-row sm:flex-wrap",
505
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckThisIphone, { build }), install({ secondary: true })]
506
+ }),
507
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallNotes, {})
508
+ ]
509
+ });
510
+ }
511
+ /**
512
+ * What an artifact installs on, where the file alone isn't enough: the card
513
+ * says it once, under the QR code, or without one, in its place.
514
+ */
515
+ var INSTALL_LIMITS = {
516
+ ipa: "The .ipa installs only on devices its signing profile allows (development or ad hoc); an App Store export reaches testers through TestFlight.",
517
+ aab: "The .aab installs through Google Play or bundletool, not from the file."
518
+ };
519
+ /**
520
+ * What scanning a build's QR code gets, by its artifact. The install steps
521
+ * beside it add only what this doesn't say, so the card says each thing once.
522
+ */
523
+ var QR_CAPTIONS = {
524
+ apk: "Scan with an Android phone's camera, then open the APK to install it.",
525
+ ipa: `Scan to download. ${INSTALL_LIMITS.ipa}`,
526
+ aab: `Scan to download. ${INSTALL_LIMITS.aab}`,
527
+ app: "Scan to download the .app.zip on a Mac."
528
+ };
529
+ /**
530
+ * An IPA's QR code holds this page rather than a file: the iPhone that scans it
531
+ * checks whether the IPA lists it before anything downloads, and installs here.
532
+ */
533
+ function ScannablePage() {
534
+ const { origin, pathname } = window.location;
535
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
536
+ className: "flex flex-col items-center gap-2",
537
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(QrCode, {
538
+ className: "size-48",
539
+ label: "Open this page on an iPhone",
540
+ value: `${origin}${pathname}`
541
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
542
+ className: "max-w-56 text-center text-xs text-muted-foreground",
543
+ children: "Scan with an iPhone to install this build from here. The phone signs in to the Console first."
544
+ })]
545
+ });
546
+ }
547
+ /** A QR code of the build's download URL, with what scanning it gets. */
548
+ function ScannableUrl({ build, url, note }) {
549
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
550
+ className: "flex flex-col items-center gap-2",
551
+ children: [
552
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QrCode, {
553
+ className: "size-48",
554
+ label: `Download ${nativeBuildFileName(build)}`,
555
+ value: url
556
+ }),
557
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
558
+ className: "max-w-56 text-center text-xs text-muted-foreground",
559
+ children: QR_CAPTIONS[build.artifact_kind]
560
+ }),
561
+ note ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
562
+ className: "max-w-56 text-center text-xs text-muted-foreground",
563
+ children: note
564
+ }) : null
565
+ ]
566
+ });
567
+ }
568
+ function QrProblem({ message }) {
569
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
570
+ variant: "destructive",
571
+ children: [
572
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
573
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "The download link couldn't be created" }),
574
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: message })
575
+ ]
576
+ });
577
+ }
578
+ /**
579
+ * The QR code when the Console can't sign a link: the storage's URL, which a
580
+ * phone opens without the Console's sign-in, but only until it expires.
581
+ */
582
+ function StorageQrCode({ build }) {
583
+ const downloadUrl = useNativeBuildDownloadUrlQuery(build.id);
584
+ const url = downloadUrl.data?.url;
585
+ if (url === null) {
586
+ const limits = INSTALL_LIMITS[build.artifact_kind];
587
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
588
+ className: "flex flex-col gap-2 text-xs text-muted-foreground",
589
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "This storage gives no download link a phone can open without signing in, so there is no QR code. Download the build here, or open this page on the phone signed in to the console." }), limits ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: limits }) : null]
590
+ });
591
+ }
592
+ if (url !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScannableUrl, {
593
+ build,
594
+ note: "This link expires. If the download fails, reload this page.",
595
+ url
596
+ });
597
+ return downloadUrl.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QrProblem, { message: downloadUrl.error.message }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "size-48" });
598
+ }
599
+ /** The store's label of a submitted build. */
600
+ function SubmittedVersion({ build }) {
601
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
602
+ className: "font-mono text-foreground",
603
+ translate: "no",
604
+ children: build.submitted_version ?? "this build"
605
+ });
606
+ }
607
+ /**
608
+ * Where a store's testers and its people get a build: a tester's own link needs
609
+ * the app's ID in the store, which only the pull request's comment has.
610
+ */
611
+ var STORE_CONSOLES = {
612
+ testflight: {
613
+ name: "App Store Connect",
614
+ url: "https://appstoreconnect.apple.com/apps"
615
+ },
616
+ "play-internal": {
617
+ name: "Play Console",
618
+ url: "https://play.google.com/console"
619
+ }
620
+ };
621
+ /**
622
+ * A build a store took installs from the store, so the card leads with it, and
623
+ * the file stays for keeping, with no QR code or signed link to ask for.
624
+ */
625
+ function StoreInstallCard({ build }) {
626
+ const store = STORE_CONSOLES[build.submitted_to];
627
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
628
+ className: "overflow-hidden shadow-sm",
629
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
630
+ className: "border-b px-4 py-3",
631
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
632
+ className: "text-sm",
633
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Install" })
634
+ })
635
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
636
+ className: "flex min-w-0 flex-col gap-4 p-4 sm:p-6",
637
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallSteps, { build }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
638
+ className: "flex flex-col gap-2 sm:flex-row sm:flex-wrap",
639
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
640
+ className: buttonVariants({ className: "h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit" }),
641
+ href: store.url,
642
+ rel: "noreferrer",
643
+ target: "_blank",
644
+ children: [
645
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExternalLink, { "data-icon": "inline-start" }),
646
+ "Open ",
647
+ store.name
648
+ ]
649
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
650
+ className: buttonVariants({
651
+ className: "h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit",
652
+ variant: "outline"
653
+ }),
654
+ download: true,
655
+ href: nativeBuildDownloadPath(build.id),
656
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Download, { "data-icon": "inline-start" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
657
+ className: "text-left [overflow-wrap:anywhere]",
658
+ children: ["Download ", nativeBuildFileName(build)]
659
+ })]
660
+ })]
661
+ })]
662
+ })]
663
+ });
664
+ }
665
+ /**
666
+ * How else the artifact installs, beside its QR code's caption and its
667
+ * download: none of it repeats the caption.
668
+ */
669
+ function InstallSteps({ build }) {
670
+ switch (build.artifact_kind) {
671
+ case "apk": return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
672
+ className: "flex min-w-0 flex-col gap-2",
673
+ children: [
674
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
675
+ className: "text-xs text-muted-foreground",
676
+ children: "Your browser needs the \"Install unknown apps\" permission."
677
+ }),
678
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
679
+ className: "text-xs text-muted-foreground",
680
+ children: "If this package is already installed with another signing key, such as a Play copy, the install fails. Uninstall that copy first, or build with sandbox: true, whose .sandbox ID installs beside it."
681
+ }),
682
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
683
+ className: "text-xs text-muted-foreground",
684
+ children: "On an emulator or a phone over USB, install and open it from your project:"
685
+ }),
686
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
687
+ label: "the install command",
688
+ value: nativeBuildInstallCommand(build)
689
+ })
690
+ ]
691
+ });
692
+ case "app": return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
693
+ className: "flex min-w-0 flex-col gap-2",
694
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
695
+ className: "text-xs text-muted-foreground",
696
+ children: "It runs only in the iOS Simulator. In your project, install and open it on the booted one:"
697
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
698
+ label: "the install command",
699
+ value: nativeBuildInstallCommand(build)
700
+ })]
701
+ });
702
+ case "aab": return isSubmitted(build) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
703
+ className: "text-xs text-muted-foreground",
704
+ children: [
705
+ "Submitted to Google Play internal testing as",
706
+ " ",
707
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubmittedVersion, { build }),
708
+ ". Testers get it once its release is rolled out; on an app Play Console hasn't published, the release is a draft you roll out in Play Console."
709
+ ]
710
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
711
+ className: "flex min-w-0 flex-col gap-2",
712
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
713
+ className: "text-xs text-muted-foreground",
714
+ children: "For testers, build and release to internal testing:"
715
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
716
+ label: "the Google Play command",
717
+ value: "npx hot-updater google-play upload"
718
+ })]
719
+ });
720
+ case "ipa": return isSubmitted(build) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
721
+ className: "text-xs text-muted-foreground",
722
+ children: [
723
+ "On TestFlight as ",
724
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubmittedVersion, { build }),
725
+ ". Internal testers install it from the TestFlight app once App Store Connect has processed it, and a preview's pull request comment shows that state."
726
+ ]
727
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
728
+ className: "flex min-w-0 flex-col gap-2",
729
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
730
+ className: "text-xs text-muted-foreground",
731
+ children: "Over USB, Xcode or Apple Configurator installs it. For testers without a registered device:"
732
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
733
+ label: "the TestFlight command",
734
+ value: "npx hot-updater testflight"
735
+ })]
736
+ });
737
+ }
738
+ }
739
+ /**
740
+ * The signed link to copy, which a script or a teammate uses without signing
741
+ * in. A local Console has none, and says nothing about it on every build.
742
+ */
743
+ function SignedLink({ link, url }) {
744
+ if (link?.status === "no-secret") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
745
+ className: "text-xs text-muted-foreground",
746
+ role: "status",
747
+ children: [
748
+ "Set ",
749
+ link.secretName,
750
+ " on the Console to create links."
751
+ ]
752
+ });
753
+ if (link?.status !== "issued" || url === null) return null;
754
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
755
+ className: "flex min-w-0 flex-col gap-2",
756
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
757
+ label: "the download link",
758
+ value: url
759
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
760
+ className: "text-xs text-muted-foreground",
761
+ children: [
762
+ "Anyone with this link can download this build until",
763
+ " ",
764
+ (0, import_dayjs_min.default)(link.expiresAt).format("YYYY-MM-DD"),
765
+ "."
766
+ ]
767
+ })]
768
+ });
769
+ }
770
+ /**
771
+ * Installs one native build: an IPA or AAB a store took, from the store; an IPA
772
+ * on the iPhone that opens this page, whose QR code on any other screen holds
773
+ * this page; every other artifact by a QR code of its signed link, which a phone
774
+ * without a session scans, and by download here or the link itself; an APK or a
775
+ * simulator app also with `native-build install`, and an IPA's or an AAB's
776
+ * testers through its store. Where the Console can't sign, the QR code holds the
777
+ * storage's URL and the download asks for the session.
778
+ */
779
+ function InstallCard({ build }) {
780
+ return isSubmitted(build) && (build.artifact_kind === "ipa" || build.artifact_kind === "aab") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StoreInstallCard, { build }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileInstallCard, { build });
781
+ }
782
+ function FileInstallCard({ build }) {
783
+ const fileName = nativeBuildFileName(build);
784
+ const link = useNativeBuildDownloadLinkQuery(build.id);
785
+ const signedUrl = link.data?.status === "issued" ? nativeBuildSignedDownloadUrl(window.location, build.id, link.data.token) : null;
786
+ const device = useIosDevice();
787
+ const ipa = build.artifact_kind === "ipa";
788
+ const onPhone = ipa && device?.ios === true;
789
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
790
+ className: "overflow-hidden shadow-sm",
791
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
792
+ className: "border-b px-4 py-3",
793
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
794
+ className: "text-sm",
795
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Install" })
796
+ })
797
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
798
+ className: onPhone ? "flex min-w-0 flex-col gap-6 p-4 sm:p-6" : "grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6",
799
+ children: [onPhone ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IosInstall, {
800
+ build,
801
+ udid: device.udid
802
+ }) : ipa && signedUrl !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScannablePage, {}) : signedUrl !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScannableUrl, {
803
+ build,
804
+ url: signedUrl
805
+ }) : link.data !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StorageQrCode, { build }) : link.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QrProblem, { message: link.error.message }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "size-48" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
806
+ className: "flex min-w-0 flex-col gap-4",
807
+ children: [
808
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallSteps, { build }),
809
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
810
+ className: buttonVariants({
811
+ className: "h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit",
812
+ variant: "outline"
813
+ }),
814
+ download: true,
815
+ href: signedUrl ?? nativeBuildDownloadPath(build.id),
816
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Download, { "data-icon": "inline-start" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
817
+ className: "text-left [overflow-wrap:anywhere]",
818
+ children: ["Download ", fileName]
819
+ })]
820
+ }),
821
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignedLink, {
822
+ link: link.data,
823
+ url: signedUrl
824
+ })
825
+ ]
826
+ })]
827
+ })]
828
+ });
829
+ }
830
+ var BUNDLE_DIFFING_GUIDE_URL = "https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update";
831
+ /**
832
+ * The bundles that patch from the build's built-in bundle, newest first, a
833
+ * page at a time: the newest page comes with the build's page, and others
834
+ * are read as they are asked for.
835
+ */
836
+ function PatchesCard({ detail, page, onPage }) {
837
+ const paged = page.before !== void 0 || page.after !== void 0;
838
+ const query = useNativeBuildPatchesQuery(detail.build.min_bundle_id, page, paged);
839
+ const patches = paged ? query.data : detail.patches;
840
+ const { next, previous } = patches ?? {};
841
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
842
+ className: "overflow-hidden shadow-sm",
843
+ id: "patches",
844
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
845
+ className: "border-b px-4 py-3",
846
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
847
+ className: "text-sm",
848
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Patches from this build" })
849
+ })
850
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardContent, {
851
+ className: "p-0",
852
+ children: [paged && query.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
853
+ className: "p-4",
854
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
855
+ variant: "destructive",
856
+ children: [
857
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
858
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Patches couldn't be loaded" }),
859
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: query.error.message }),
860
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertAction, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
861
+ onClick: () => void query.refetch(),
862
+ size: "xs",
863
+ variant: "outline",
864
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCw, { "data-icon": "inline-start" }), "Retry"]
865
+ }) })
866
+ ]
867
+ })
868
+ }) : patches === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
869
+ className: "flex flex-col gap-2 p-4",
870
+ children: [
871
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
872
+ className: "sr-only",
873
+ children: "Loading patches"
874
+ }),
875
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-full" }),
876
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-2/3" })
877
+ ]
878
+ }) : patches.data.length === 0 ? paged ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Empty, {
879
+ className: "py-10",
880
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: "No more patches" }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
881
+ className: "min-h-11 sm:min-h-8",
882
+ onClick: () => onPage({}),
883
+ variant: "outline",
884
+ children: "Show the newest patches"
885
+ })]
886
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Empty, {
887
+ className: "py-10",
888
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyHeader, { children: [
889
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyMedia, {
890
+ variant: "icon",
891
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitBranch, {})
892
+ }),
893
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: "No patches from this build" }),
894
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyDescription, { children: [
895
+ "A deploy adds a patch from this build's bundle while it is its scope's store build, or its newest build with none marked, and the deploy config turns patches on, with",
896
+ " ",
897
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
898
+ className: "font-mono",
899
+ children: "patch"
900
+ }),
901
+ " in",
902
+ " ",
903
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
904
+ className: "font-mono",
905
+ children: "hot-updater.config.ts"
906
+ }),
907
+ "."
908
+ ] })
909
+ ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
910
+ className: buttonVariants({
911
+ className: "min-h-11 sm:min-h-8",
912
+ variant: "outline"
913
+ }),
914
+ href: BUNDLE_DIFFING_GUIDE_URL,
915
+ rel: "noreferrer",
916
+ target: "_blank",
917
+ children: ["Bundle diffing guide", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, { "data-icon": "inline-end" })]
918
+ }) })]
919
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Table, {
920
+ "aria-busy": paged && query.isPlaceholderData,
921
+ "aria-label": "Patches from this build",
922
+ className: "table-fixed",
923
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { children: [
924
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Target bundle" }),
925
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, {
926
+ className: "w-28",
927
+ children: "Patch size"
928
+ }),
929
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, {
930
+ className: "hidden w-32 sm:table-cell",
931
+ children: "Created"
932
+ })
933
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableBody, { children: patches.data.map((patch) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { children: [
934
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
935
+ className: "py-3 whitespace-normal",
936
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
937
+ className: "block font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline",
938
+ search: { bundleId: patch.bundleId },
939
+ title: patch.bundleId,
940
+ to: "/",
941
+ translate: "no",
942
+ children: patch.bundleId
943
+ })
944
+ }),
945
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
946
+ className: "text-xs tabular-nums",
947
+ children: formatByteSize(patch.byteSize)
948
+ }),
949
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
950
+ className: "hidden sm:table-cell",
951
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TimestampDisplay, { uuid: patch.bundleId })
952
+ })
953
+ ] }, patch.bundleId)) })]
954
+ }), next !== void 0 || previous !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", {
955
+ "aria-label": "Patch pages",
956
+ className: "flex items-center justify-end gap-2 border-t px-4 py-2",
957
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
958
+ className: "min-h-11 sm:min-h-7",
959
+ disabled: previous === void 0 || paged && query.isPlaceholderData,
960
+ onClick: () => onPage({ after: previous }),
961
+ size: "sm",
962
+ variant: "ghost",
963
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronLeft, { "data-icon": "inline-start" }), "Newer"]
964
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
965
+ className: "min-h-11 sm:min-h-7",
966
+ disabled: next === void 0 || paged && query.isPlaceholderData,
967
+ onClick: () => onPage({ before: next }),
968
+ size: "sm",
969
+ variant: "ghost",
970
+ children: ["Older", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { "data-icon": "inline-end" })]
971
+ })]
972
+ }) : null]
973
+ })]
974
+ });
975
+ }
976
+ /**
977
+ * How an install of the build downloads `bundleId` as its first OTA: as the
978
+ * patch from the built-in bundle when one exists, else the full bundle. The
979
+ * newest page of patches decides it for every bundle down to the page's
980
+ * oldest; an older bundle is unknown only when the page is full.
981
+ */
982
+ var firstDownloadOf = (patches, bundleId) => {
983
+ const patch = patches.data.find((row) => row.bundleId === bundleId);
984
+ if (patch !== void 0) return {
985
+ kind: "patch",
986
+ byteSize: patch.byteSize
987
+ };
988
+ const oldest = patches.data.at(-1)?.bundleId;
989
+ return patches.next !== void 0 && oldest !== void 0 && bundleId < oldest ? { kind: "unknown" } : { kind: "full" };
990
+ };
991
+ function FirstDownloadCell({ download }) {
992
+ switch (download.kind) {
993
+ case "patch": return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
994
+ className: "text-xs",
995
+ children: [
996
+ "Patch",
997
+ " ",
998
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
999
+ className: "text-muted-foreground tabular-nums",
1000
+ children: [
1001
+ "(",
1002
+ formatByteSize(download.byteSize),
1003
+ ")"
1004
+ ]
1005
+ })
1006
+ ]
1007
+ });
1008
+ case "full": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1009
+ className: "text-xs text-muted-foreground",
1010
+ children: "Full bundle"
1011
+ });
1012
+ case "unknown": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
1013
+ className: "text-xs underline-offset-4 hover:underline",
1014
+ href: "#patches",
1015
+ children: "See patches"
1016
+ });
1017
+ }
1018
+ }
1019
+ /**
1020
+ * What the update check offers an install of the build now: its scope's
1021
+ * catalog at the build's app version, down to the built-in bundle, newest
1022
+ * first. It is the catalog of now, not the history.
1023
+ */
1024
+ function ServedNowCard({ detail }) {
1025
+ const { build, channel, servedNow, patches, catalogScopeKey } = detail;
1026
+ const firstOta = servedNow.find(({ rolloutCohortCount, targetCohorts }) => rolloutCohortCount > 0 || targetCohorts.length > 0)?.bundleId;
1027
+ const missingPatch = build.store_build === true && firstOta !== void 0 && firstOta !== null && firstDownloadOf(patches, firstOta).kind === "full" ? [
1028
+ "npx hot-updater patch",
1029
+ `-p ${build.platform}`,
1030
+ `-c ${shellQuote(channel)}`,
1031
+ `-b ${shellQuote(firstOta)}`,
1032
+ `--base-artifact-id ${shellQuote(build.min_bundle_id)}`
1033
+ ].join(" ") : null;
1034
+ const scopeLink = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
1035
+ className: "inline-flex items-center gap-0.5 underline-offset-4 hover:underline",
1036
+ search: { scopeKey: catalogScopeKey },
1037
+ to: "/",
1038
+ children: ["All releases in this scope", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
1039
+ "aria-hidden": "true",
1040
+ className: "size-3"
1041
+ })]
1042
+ });
1043
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
1044
+ className: "overflow-hidden shadow-sm",
1045
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardHeader, {
1046
+ className: "border-b px-4 py-3",
1047
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
1048
+ className: "text-sm",
1049
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Served now" })
1050
+ })
1051
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
1052
+ className: "p-0",
1053
+ children: servedNow.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Empty, {
1054
+ className: "py-10",
1055
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyHeader, { children: [
1056
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyMedia, {
1057
+ variant: "icon",
1058
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PackageOpen, {})
1059
+ }),
1060
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: "No OTA for this build yet" }),
1061
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyDescription, { children: [
1062
+ "No release in this build's scope is newer than its built-in bundle. Deploy one with",
1063
+ " ",
1064
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
1065
+ className: "font-mono",
1066
+ children: "hot-updater deploy"
1067
+ }),
1068
+ ", and it shows here."
1069
+ ] })
1070
+ ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
1071
+ className: buttonVariants({
1072
+ className: "min-h-11 sm:min-h-8",
1073
+ variant: "outline"
1074
+ }),
1075
+ search: { scopeKey: catalogScopeKey },
1076
+ to: "/",
1077
+ children: "All releases in this scope"
1078
+ }) })]
1079
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1080
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Table, {
1081
+ "aria-label": "Served now",
1082
+ className: "table-fixed",
1083
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { children: [
1084
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, { children: "Bundle" }),
1085
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, {
1086
+ className: "hidden w-40 md:table-cell",
1087
+ children: "Rollout"
1088
+ }),
1089
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, {
1090
+ className: "hidden w-32 sm:table-cell",
1091
+ children: "Created"
1092
+ }),
1093
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHead, {
1094
+ className: "w-32",
1095
+ children: "First OTA download"
1096
+ })
1097
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableBody, { children: servedNow.map((release) => {
1098
+ const bundleId = release.bundleId;
1099
+ const percentage = release.rolloutCohortCount / NUMERIC_COHORT_SIZE * 100;
1100
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, { children: [
1101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
1102
+ className: "py-3 whitespace-normal",
1103
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1104
+ className: "flex min-w-0 flex-col gap-1",
1105
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
1106
+ className: "font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline",
1107
+ search: { releaseId: release.releaseId },
1108
+ title: bundleId,
1109
+ to: "/",
1110
+ translate: "no",
1111
+ children: bundleId
1112
+ }), release.message ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1113
+ className: "text-xs text-muted-foreground",
1114
+ children: release.message
1115
+ }) : null]
1116
+ })
1117
+ }),
1118
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
1119
+ className: "hidden md:table-cell",
1120
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1121
+ className: "flex flex-wrap gap-1",
1122
+ children: [release.targetCohorts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
1123
+ variant: "secondary",
1124
+ children: release.targetCohorts.length === 1 ? "1 cohort" : `${release.targetCohorts.length} cohorts`
1125
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RolloutPercentageBadge, { percentage }), release.shouldForceUpdate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
1126
+ variant: "outline",
1127
+ children: "Forced"
1128
+ }) : null]
1129
+ })
1130
+ }),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, {
1132
+ className: "hidden sm:table-cell",
1133
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TimestampDisplay, { uuid: bundleId })
1134
+ }),
1135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FirstDownloadCell, { download: firstDownloadOf(patches, bundleId) }) })
1136
+ ] }, release.releaseId);
1137
+ }) })]
1138
+ }),
1139
+ missingPatch === null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1140
+ className: "flex flex-col gap-2 border-t px-4 py-3 text-xs",
1141
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "The OTA fresh installs get first has no patch from this store build, so they download all of it. Add one from your project:" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyableText, {
1142
+ label: "the patch command",
1143
+ value: missingPatch
1144
+ })]
1145
+ }),
1146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
1147
+ className: "border-t px-4 py-3 text-xs text-muted-foreground",
1148
+ children: ["What the update check serves an install of this build now, newest first: not the history. ", scopeLink]
1149
+ })
1150
+ ] })
1151
+ })]
1152
+ });
1153
+ }
1154
+ /**
1155
+ * One native build: how to install it, its built-in bundle as the base its
1156
+ * OTAs patch from, what an install is served now, and the patches from it.
1157
+ * The patch page is in the URL, so a link opens it.
1158
+ */
1159
+ function NativeBuildDetailPage({ buildId, search, onSearchChange }) {
1160
+ const query = useNativeBuildDetailQuery(buildId);
1161
+ const detail = query.data;
1162
+ const page = {
1163
+ ...search.patchesBefore === void 0 ? {} : { before: search.patchesBefore },
1164
+ ...search.patchesAfter === void 0 ? {} : { after: search.patchesAfter }
1165
+ };
1166
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1167
+ className: "flex h-svh min-h-0 flex-col",
1168
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
1169
+ className: "sticky top-0 z-10 flex shrink-0 items-center gap-x-2 border-b bg-background px-3 py-3 sm:min-h-12 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm",
1170
+ children: [
1171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1 size-11 lg:size-7" }),
1172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
1173
+ className: buttonVariants({
1174
+ className: "min-h-11 sm:min-h-7",
1175
+ size: "sm",
1176
+ variant: "ghost"
1177
+ }),
1178
+ to: "/native-builds",
1179
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronLeft, { "data-icon": "inline-start" }), "Native builds"]
1180
+ }),
1181
+ detail ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h1", {
1182
+ className: "flex min-w-0 items-center gap-1.5 text-sm font-medium",
1183
+ children: [
1184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PlatformIcon, {
1185
+ className: "size-3.5 shrink-0 text-muted-foreground",
1186
+ platform: detail.build.platform
1187
+ }),
1188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1189
+ className: "min-w-0 [overflow-wrap:anywhere]",
1190
+ children: [
1191
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1192
+ className: "sr-only",
1193
+ children: [platformLabel(detail.build.platform), " "]
1194
+ }),
1195
+ nativeBuildArtifacts[detail.build.artifact_kind].label,
1196
+ " ·",
1197
+ " ",
1198
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1199
+ translate: "no",
1200
+ children: detail.channel
1201
+ })
1202
+ ]
1203
+ }),
1204
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1205
+ className: "hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline",
1206
+ children: formatByteSize(detail.build.byte_size)
1207
+ })
1208
+ ]
1209
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
1210
+ className: "sr-only",
1211
+ children: "Native build"
1212
+ })
1213
+ ]
1214
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1215
+ className: "min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
1216
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1217
+ className: "mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6",
1218
+ children: query.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
1219
+ variant: "destructive",
1220
+ children: [
1221
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
1222
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "The native build couldn't be loaded" }),
1223
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: query.error.message }),
1224
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertAction, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
1225
+ onClick: () => void query.refetch(),
1226
+ size: "xs",
1227
+ variant: "outline",
1228
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCw, { "data-icon": "inline-start" }), "Retry"]
1229
+ }) })
1230
+ ]
1231
+ }) : detail === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1232
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1233
+ className: "sr-only",
1234
+ children: "Loading the native build"
1235
+ }),
1236
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-56 w-full rounded-xl" }),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-64 w-full rounded-xl" })
1238
+ ] }) : detail === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Empty, {
1239
+ className: "border py-16",
1240
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyHeader, { children: [
1241
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyMedia, {
1242
+ variant: "icon",
1243
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HardDrive, {})
1244
+ }),
1245
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: "Native build not found" }),
1246
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyDescription, { children: [
1247
+ "No native build has this ID. It may have been deleted with",
1248
+ " ",
1249
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
1250
+ className: "font-mono",
1251
+ children: "native-build delete"
1252
+ }),
1253
+ ", or be from another console."
1254
+ ] })
1255
+ ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
1256
+ className: buttonVariants({
1257
+ className: "min-h-11 sm:min-h-8",
1258
+ variant: "outline"
1259
+ }),
1260
+ to: "/native-builds",
1261
+ children: "Show all native builds"
1262
+ }) })]
1263
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1264
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallCard, { build: detail.build }),
1265
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BuiltInBundleCard, { detail }),
1266
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServedNowCard, { detail }),
1267
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PatchesCard, {
1268
+ detail,
1269
+ onPage: (next) => onSearchChange({
1270
+ ...next.before === void 0 ? {} : { patchesBefore: next.before },
1271
+ ...next.after === void 0 ? {} : { patchesAfter: next.after }
1272
+ }),
1273
+ page
1274
+ })
1275
+ ] })
1276
+ })
1277
+ })]
1278
+ });
1279
+ }
1280
+ function NativeBuildDetailRoute() {
1281
+ const { buildId } = Route.useParams();
1282
+ const search = Route.useSearch();
1283
+ const navigate = Route.useNavigate();
1284
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeBuildDetailPage, {
1285
+ buildId,
1286
+ onSearchChange: (next) => void navigate({
1287
+ search: next,
1288
+ replace: true
1289
+ }),
1290
+ search
1291
+ });
1292
+ }
1293
+ //#endregion
1294
+ export { NativeBuildDetailRoute as component };