@hot-updater/console 1.2.0-rc.5 → 1.2.0-rc.50

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 (398) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/-native-builds-search-6aptbS4G.js +1 -0
  3. package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +1 -0
  4. package/.output/public/assets/ChannelPicker-DPR-7lqV.js +1 -0
  5. package/.output/public/assets/CompositeItem-UhIlCBg4.js +1 -0
  6. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-B3VCINom.js} +1 -1
  7. package/.output/public/assets/EventDetails-LQ8ejbsd.js +1 -0
  8. package/.output/public/assets/FoldedRows-1NvB9gAS.js +1 -0
  9. package/.output/public/assets/HashValueDisplay-DTSMSH9O.js +1 -0
  10. package/.output/public/assets/InsightsPageHeader-ypKKV3rL.js +1 -0
  11. package/.output/public/assets/IosInstall-BRuSakxm.js +1 -0
  12. package/.output/public/assets/NativeBuildsNav-ChBahvFN.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-m-FKh1Jb.js +1 -0
  17. package/.output/public/assets/RolloutPercentageBadge-DF4EeZIJ.js +1 -0
  18. package/.output/public/assets/RowReason-BvIxbpPP.js +1 -0
  19. package/.output/public/assets/SandboxBadge-DPmJn40v.js +1 -0
  20. package/.output/public/assets/TargetDisplay-Ctuz3qIp.js +1 -0
  21. package/.output/public/assets/alert-dialog-DGPqJBCk.js +1 -0
  22. package/.output/public/assets/api-keys-CAVLgicI.js +1 -0
  23. package/.output/public/assets/api-keys-ztwXoKcj.js +1 -0
  24. package/.output/public/assets/api-znPyglTl.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-down-BkoJHAll.js +1 -0
  32. package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
  33. package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-DvYMC5yF.js} +1 -1
  34. package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-D0JWZ1KF.js} +1 -1
  35. package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-CtbGqKyr.js} +1 -1
  36. package/.output/public/assets/{uuidv7-zXMtwR9Q.js → constants-yj-e3ahf.js} +1 -1
  37. package/.output/public/assets/{copy-DsuLj3oj.js → copy-BjVLMKbo.js} +1 -1
  38. package/.output/public/assets/dialog-BvZDZzdQ.js +1 -0
  39. package/.output/public/assets/dist-BEmib-ZM.js +1 -0
  40. package/.output/public/assets/{download-Cf24LBde.js → download-CgpaZb23.js} +1 -1
  41. package/.output/public/assets/empty-C5GqArX9.js +1 -0
  42. package/.output/public/assets/field-DInLQ5oV.js +1 -0
  43. package/.output/public/assets/git-branch-BGatQV8Q.js +1 -0
  44. package/.output/public/assets/history-Ci4dhphE.js +1 -0
  45. package/.output/public/assets/index-oTXLdUR-.js +10 -0
  46. package/.output/public/assets/input-group-CIjTdxCW.js +1 -0
  47. package/.output/public/assets/insights-BL6Z8zFv.js +42 -0
  48. package/.output/public/assets/insights-BMjBMtJU.js +2 -0
  49. package/.output/public/assets/insights-V3D8tYPQ.js +1 -0
  50. package/.output/public/assets/insights-api-C4Dmm34n.js +1 -0
  51. package/.output/public/assets/insights-search-B4NkHGeC.js +1 -0
  52. package/.output/public/assets/insights-usage-rpc-Dw5_pmRH.js +1 -0
  53. package/.output/public/assets/insights_.distribution-Br_CW9s9.js +2 -0
  54. package/.output/public/assets/insights_.distribution-C4E-JuVI.js +1 -0
  55. package/.output/public/assets/insights_.distribution-oIFSv2TC.js +1 -0
  56. package/.output/public/assets/installations-CcPrSZwW.js +1 -0
  57. package/.output/public/assets/installations-Cjx0648C.js +1 -0
  58. package/.output/public/assets/installations-m1v6oE-2.js +2 -0
  59. package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-BkeLvA1m.js} +1 -1
  60. package/.output/public/assets/{link-DTEyW70e.js → link-CRMwpc7-.js} +2 -2
  61. package/.output/public/assets/{list--NIee1FZ.js → list-DQ9YBIDW.js} +1 -1
  62. package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
  63. package/.output/public/assets/native-builds-B0zJ4wjg.js +1 -0
  64. package/.output/public/assets/native-builds-BC0sjxPC.js +2 -0
  65. package/.output/public/assets/native-builds-B_pQ4D5H.js +1 -0
  66. package/.output/public/assets/native-builds_._buildId-CSyC7YAA.js +1 -0
  67. package/.output/public/assets/native-builds_._buildId-GPlkI_2m.js +2 -0
  68. package/.output/public/assets/native-builds_.devices-Cox001IR.js +2 -0
  69. package/.output/public/assets/native-builds_.devices-DAW19hcQ.js +1 -0
  70. package/.output/public/assets/plus-DztQIXYL.js +1 -0
  71. package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-RUNbaMyO.js} +1 -1
  72. package/.output/public/assets/remote-config-BCQHNGRY.js +1 -0
  73. package/.output/public/assets/remote-config-BIIj0Faf.js +1 -0
  74. package/.output/public/assets/remote-config-CDlB7JK8.js +6 -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-C7Pv3Cfg.js +1 -0
  78. package/.output/public/assets/routes-JJGRGqsf.js +2 -0
  79. package/.output/public/assets/search-BfEqtE64.js +1 -0
  80. package/.output/public/assets/select-iSWTEY9t.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-D5kpHu-Z.css +2 -0
  84. package/.output/public/assets/switch-ByNYRVTN.js +1 -0
  85. package/.output/public/assets/table-DbZPkzdz.js +1 -0
  86. package/.output/public/assets/tabs-Byfy8Qls.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-BEDqZ9Ni.js +1 -0
  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-BsXXRtkN.mjs → __23tanstack-start-server-fn-resolver-DY-niJR4.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 +50 -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-D10dMZzL.mjs +62 -0
  106. package/.output/server/_ssr/{BundleIdDisplay-CFz1sCQl.mjs → BundleIdDisplay-CGdSiouM.mjs} +3 -3
  107. package/.output/server/_ssr/ChannelPicker-J5HfKxSS.mjs +251 -0
  108. package/.output/server/_ssr/{ConsoleFeatureUnavailable-CGHVL37b.mjs → ConsoleFeatureUnavailable-C52o4oew.mjs} +8 -8
  109. package/.output/server/_ssr/{EventDetails-DdJyaBZ5.mjs → EventDetails-CDLSkVNA.mjs} +9 -9
  110. package/.output/server/_ssr/FoldedRows-CrRYEVkd.mjs +152 -0
  111. package/.output/server/_ssr/HashValueDisplay-BrT2wgxk.mjs +65 -0
  112. package/.output/server/_ssr/{InsightsPageHeader-KtHEf8Q0.mjs → InsightsPageHeader-DVrudLMJ.mjs} +13 -13
  113. package/.output/server/_ssr/IosInstall-DcKlZU_q.mjs +767 -0
  114. package/.output/server/_ssr/NativeBuildsNav-BC1WIQ1W.mjs +39 -0
  115. package/.output/server/_ssr/{NotFoundPage-DZB6K98c.mjs → NotFoundPage-CEhZtcst.mjs} +3 -3
  116. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-C22qEcwo.mjs} +13 -3
  117. package/.output/server/_ssr/QrCode-Dj9BKV3l.mjs +50 -0
  118. package/.output/server/_ssr/RelativeTime-Dgbh4UPb.mjs +242 -0
  119. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-BYEDUW1d.mjs} +20 -4
  120. package/.output/server/_ssr/RowReason-BweNBWkA.mjs +59 -0
  121. package/.output/server/_ssr/SandboxBadge-O8-kbXAw.mjs +85 -0
  122. package/.output/server/_ssr/TargetDisplay-D3JAXwcF.mjs +105 -0
  123. package/.output/server/_ssr/{alert-dialog-CDr-Nsoo.mjs → alert-dialog-CxEcyUb6.mjs} +4 -4
  124. package/.output/server/_ssr/{api-DGWwi1WN.mjs → api-IIqxWeDx.mjs} +186 -39
  125. package/.output/server/_ssr/{api-keys-e_eDCNr2.mjs → api-keys-CYefExfc.mjs} +2 -2
  126. package/.output/server/_ssr/{api-keys-rpc-BXiXUAm9.mjs → api-keys-rpc-qkGQ3Sp3.mjs} +4 -4
  127. package/.output/server/_ssr/{api-keys-BBb3xSox.mjs → api-keys-wFak2vKN.mjs} +14 -11
  128. package/.output/server/_ssr/{api-rpc-CLreF5Vr.mjs → api-rpc-3NKc545A.mjs} +83 -35
  129. package/.output/server/_ssr/{auth-rpc-Bbf80tQK.mjs → auth-rpc-PCSJzNJf.mjs} +5 -5
  130. package/.output/server/_ssr/{auth.server-DGwe3eds.mjs → auth.server-NGj7G3bq.mjs} +1334 -279
  131. package/.output/server/_ssr/{badge-BXk5c2yv.mjs → badge-CxSJ-pjU.mjs} +4 -45
  132. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
  133. package/.output/server/_ssr/card-BDXDcrk_.mjs +49 -0
  134. package/.output/server/_ssr/{config.server-BIBSZpZE.mjs → config.server-CwUGPk-F.mjs} +4 -4
  135. package/.output/server/_ssr/{console-access-Cwha8dww.mjs → console-access-BOt-Xxd7.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-Bk24XYA5.mjs → console-features-api-Dw_Tktev.mjs} +5 -5
  138. package/.output/server/_ssr/{console-features-rpc-5WFiUFxb.mjs → console-features-rpc-D8VFHwYj.mjs} +4 -4
  139. package/.output/server/_ssr/constants-D-2jpCiJ.mjs +11 -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-BG-juN_g.mjs → dialog-CJ4zMagm.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-DF3o-H8c.mjs → empty-DYy36pwa.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-5zvNofJH.mjs → field-MI8oNc5n.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-rcPxMqYq.mjs → input-group-Bf7wHa21.mjs} +3 -3
  155. package/.output/server/_ssr/{insights-BwEiSUUy.mjs → insights-CKTR62Ox.mjs} +5 -5
  156. package/.output/server/_ssr/{insights-BDa6T_cj.mjs → insights-CbGG5htV.mjs} +2 -2
  157. package/.output/server/_ssr/{insights-api-BESfPrTq.mjs → insights-api-CqjIxe1A.mjs} +5 -5
  158. package/.output/server/_ssr/{insights-Din0R0k-.mjs → insights-b3XeQlzF.mjs} +62 -203
  159. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
  160. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
  161. package/.output/server/_ssr/{insights-failures-rpc-BD3vjHse.mjs → insights-failures-rpc-fmWHkLhL.mjs} +11 -11
  162. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
  163. package/.output/server/_ssr/{insights-recovery-rpc-sVwplV7s.mjs → insights-recovery-rpc-BpwoS9XL.mjs} +7 -7
  164. package/.output/server/_ssr/{insights-rpc-BdtBheBi.mjs → insights-rpc-qwXzuBUQ.mjs} +4 -4
  165. package/.output/server/_ssr/{insights-search-BAaycSRp.mjs → insights-search-B_8PizlM.mjs} +6 -8
  166. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
  167. package/.output/server/_ssr/{insights-usage-rpc-Bo5p-cuB.mjs → insights-usage-rpc-Cbg82l2g.mjs} +5 -5
  168. package/.output/server/_ssr/{insights-usage-rpc-DCkLNAlG.mjs → insights-usage-rpc-D8lgk1Sk.mjs} +7 -7
  169. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
  170. package/.output/server/_ssr/{insights_.distribution-D4QQxZmG.mjs → insights_.distribution--XTBM-oT.mjs} +17 -16
  171. package/.output/server/_ssr/{insights_.distribution-DoO2NDvS.mjs → insights_.distribution-DTaKryjw.mjs} +2 -2
  172. package/.output/server/_ssr/{insights_.distribution-5sgau7rB.mjs → insights_.distribution-Ed2vqrwP.mjs} +5 -5
  173. package/.output/server/_ssr/{installations-W6DXZ5Tp.mjs → installations-Ce_9dNq0.mjs} +2 -2
  174. package/.output/server/_ssr/{installations-C4MwFvp6.mjs → installations-DyfuFp3L.mjs} +13 -13
  175. package/.output/server/_ssr/{installations-CZZsFoXb.mjs → installations-W8W7AYwn.mjs} +4 -4
  176. package/.output/server/_ssr/ios-devices-rpc-5kZM1bgU.mjs +149 -0
  177. package/.output/server/_ssr/iosDeviceCookie-BTfPOUhS.mjs +155 -0
  178. package/.output/server/_ssr/iosDeviceProfile-BAoo32s_.mjs +176 -0
  179. package/.output/server/_ssr/iosDevices-DuNmS3td.mjs +132 -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-0tXDLTsd.mjs +1517 -0
  183. package/.output/server/_ssr/{native-builds-BhBltXq2.mjs → native-builds-1s5DIHa2.mjs} +3 -3
  184. package/.output/server/_ssr/native-builds-DEyFHKDa.mjs +696 -0
  185. package/.output/server/_ssr/native-builds-lEyKQemV.mjs +262 -0
  186. package/.output/server/_ssr/native-builds_._buildId-ElCXKaXI.mjs +1194 -0
  187. package/.output/server/_ssr/{native-builds_._buildId-B5QgMg7D.mjs → native-builds_._buildId-mJ8i0pL8.mjs} +3 -3
  188. package/.output/server/_ssr/native-builds_.devices-DNWZLCra.mjs +858 -0
  189. package/.output/server/_ssr/native-builds_.devices-Dz8b48Fo.mjs +10 -0
  190. package/.output/server/_ssr/nativeBuildDownloadLink-D8Se_CCi.mjs +96 -0
  191. package/.output/server/_ssr/nativeBuildInstall-DemC_4Zc.mjs +256 -0
  192. package/.output/server/_ssr/nativeBuilds-BFSeuC75.mjs +306 -0
  193. package/.output/server/_ssr/plistText-BORUpyEb.mjs +15 -0
  194. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-D9CCkDjn.mjs} +7 -6
  195. package/.output/server/_ssr/publicConsoleBase-C3sNbafy.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-T00z1y9o.mjs → release-adoption-rpc-1mKibOdV.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-CuL3ptgg.mjs} +5 -4
  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-bTCPTVky.mjs → remote-config-C_HNYPZ_.mjs} +24 -23
  203. package/.output/server/_ssr/{remote-config-Wjia3haX.mjs → remote-config-D2Cohnwn.mjs} +3 -3
  204. package/.output/server/_ssr/{remote-config-D6YMPi4J.mjs → remote-config-q9fegj-G.mjs} +2 -2
  205. package/.output/server/_ssr/{remote-config-rpc-7Zvra2dm.mjs → remote-config-rpc-6hfHFrO6.mjs} +5 -5
  206. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  207. package/.output/server/_ssr/{router-CLK13IPD.mjs → router-DODxASKG.mjs} +137 -64
  208. package/.output/server/_ssr/{routes-CbdYptnV.mjs → routes-BJjTUNSe.mjs} +489 -474
  209. package/.output/server/_ssr/{routes-h_nOUmOr.mjs → routes-C-nYThl0.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-yB9ioGZE.mjs → schema-migration-rpc-C31JquTn.mjs} +5 -5
  213. package/.output/server/_ssr/{select-BdzEzz-x.mjs → select-CjACvu9s.mjs} +12 -10
  214. package/.output/server/_ssr/{server-CddZkHk2.mjs → server-Dyw2qgSR.mjs} +7 -7
  215. package/.output/server/_ssr/{sidebar-DabmjV5E.mjs → sidebar-DQkRAO_e.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-84dzb1yG.mjs → switch-DZJSRVl3.mjs} +4 -4
  219. package/.output/server/_ssr/{table-DP978C4F.mjs → table-BA-6GQFs.mjs} +2 -2
  220. package/.output/server/_ssr/tabs-CtB3PIts.mjs +45 -0
  221. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DcCONz23.mjs} +8 -5
  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-Bfv6fYk6.mjs +229 -0
  226. package/.output/server/index.mjs +487 -375
  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 +27 -8
  235. package/src/components/PlatformIcon.tsx +10 -0
  236. package/src/components/RelativeTime.tsx +31 -0
  237. package/src/components/RowReason.tsx +63 -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 +22 -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 +36 -10
  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 +378 -93
  256. package/src/components/features/native-builds/IosDevicesPage.tsx +1145 -0
  257. package/src/components/features/native-builds/IosInstall.tsx +732 -0
  258. package/src/components/features/native-builds/IpaDevicesCard.tsx +123 -0
  259. package/src/components/features/native-builds/NativeBuildDetailPage.tsx +36 -9
  260. package/src/components/features/native-builds/NativeBuildsNav.tsx +45 -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 +171 -16
  291. package/src/lib/constants.ts +18 -0
  292. package/src/lib/insights-search.ts +0 -3
  293. package/src/lib/ios-devices-api.ts +304 -0
  294. package/src/lib/ios-devices-rpc.ts +215 -0
  295. package/src/lib/native-builds.ts +261 -20
  296. package/src/lib/schema-migration-rpc.ts +1 -1
  297. package/src/lib/server/console-runtime.server.ts +9 -2
  298. package/src/lib/server/deviceProfileToken.ts +221 -0
  299. package/src/lib/server/foldedPage.ts +360 -0
  300. package/src/lib/server/iosDeviceCookie.ts +239 -0
  301. package/src/lib/server/iosDeviceProfile.ts +232 -0
  302. package/src/lib/server/iosDevices.ts +232 -0
  303. package/src/lib/server/listReleases.ts +101 -62
  304. package/src/lib/server/local-console.ts +1 -1
  305. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  306. package/src/lib/server/nativeBuildInstall.ts +513 -0
  307. package/src/lib/server/nativeBuilds.ts +327 -59
  308. package/src/lib/server/plistText.ts +17 -0
  309. package/src/lib/server/publicConsoleBase.ts +17 -0
  310. package/src/lib/server/updateFailures.ts +6 -1
  311. package/src/routeTree.gen.ts +129 -18
  312. package/src/routes/-native-builds-search.ts +61 -4
  313. package/src/routes/-releases-search.ts +63 -2
  314. package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
  315. package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
  316. package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
  317. package/src/routes/[_]hot-updater/devices/request.ts +28 -0
  318. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  319. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  320. package/src/routes/index.tsx +657 -577
  321. package/src/routes/insights.tsx +3 -5
  322. package/src/routes/insights_.distribution.tsx +2 -2
  323. package/src/routes/native-builds_.devices.tsx +21 -0
  324. package/src/styles.css +24 -0
  325. package/.output/public/assets/-native-builds-search-C-TGpFAm.js +0 -1
  326. package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
  327. package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
  328. package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +0 -1
  329. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  330. package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
  331. package/.output/public/assets/alert-dialog-BqYScr9y.js +0 -1
  332. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  333. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  334. package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
  335. package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
  336. package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
  337. package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
  338. package/.output/public/assets/badge-DWFcDWho.js +0 -1
  339. package/.output/public/assets/check-CXVR3s3X.js +0 -1
  340. package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
  341. package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
  342. package/.output/public/assets/dist-CPlO6ko9.js +0 -1
  343. package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
  344. package/.output/public/assets/field-D-2-mnNh.js +0 -1
  345. package/.output/public/assets/history-DqHlgSuV.js +0 -1
  346. package/.output/public/assets/index-CqP5HPV6.js +0 -10
  347. package/.output/public/assets/input-group-D3OUBk4n.js +0 -1
  348. package/.output/public/assets/insights-B-0odqpt.js +0 -42
  349. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  350. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  351. package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
  352. package/.output/public/assets/insights-search-DghCbEnk.js +0 -1
  353. package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
  354. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  355. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  356. package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
  357. package/.output/public/assets/installations-B674P5Z5.js +0 -2
  358. package/.output/public/assets/installations-BWxczZ2t.js +0 -1
  359. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  360. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  361. package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
  362. package/.output/public/assets/native-builds-DAy2678K.js +0 -1
  363. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  364. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  365. package/.output/public/assets/plus-BReVKct-.js +0 -1
  366. package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
  367. package/.output/public/assets/refresh-cw-B9HHjLej.js +0 -1
  368. package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
  369. package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
  370. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  371. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  372. package/.output/public/assets/routes-CCD33Azv.js +0 -2
  373. package/.output/public/assets/search-BCel4Oy6.js +0 -1
  374. package/.output/public/assets/select-CBIU0_M1.js +0 -1
  375. package/.output/public/assets/sidebar-Di9SN47G.js +0 -3
  376. package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
  377. package/.output/public/assets/styles-uK-0vUMk.css +0 -2
  378. package/.output/public/assets/switch-BpdiHL_t.js +0 -1
  379. package/.output/public/assets/table-Bpy3SvSo.js +0 -1
  380. package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
  381. package/.output/public/assets/useCompositeListItem-JmyDfo3-.js +0 -1
  382. package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
  383. package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
  384. package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +0 -37
  385. package/.output/server/_ssr/HashValueDisplay-B85-LoBW.mjs +0 -55
  386. package/.output/server/_ssr/RolloutPercentageBadge-CKFY5OIh.mjs +0 -21
  387. package/.output/server/_ssr/StoreSubmission-CNukW8xF.mjs +0 -139
  388. package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
  389. package/.output/server/_ssr/native-builds-CoOxssXa.mjs +0 -510
  390. package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
  391. package/.output/server/_ssr/native-builds_._buildId-CysSVBT5.mjs +0 -813
  392. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  393. package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
  394. package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
  395. package/.output/server/_ssr/tabs-kQRMEiQT.mjs +0 -45
  396. package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
  397. package/src/lib/server/nativeBuildQr.ts +0 -73
  398. package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
@@ -0,0 +1,767 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { l as createServerFn } from "./createServerFn-AQvBMBjJ.mjs";
3
+ import { Et as require_react, Tt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
4
+ import { D as LoaderCircle, _ as RefreshCw, i as TriangleAlert, p as Send, u as Smartphone } from "../_libs/lucide-react.mjs";
5
+ import { A as createSsrRpc, C as Skeleton, O as buttonVariants, n as Input, t as Button$1 } from "./sidebar-DQkRAO_e.mjs";
6
+ import { t as consoleAccess } from "./console-access-BOt-Xxd7.mjs";
7
+ import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
8
+ import { i as useQuery, n as useMutation, s as useQueryClient } from "../_libs/tanstack__react-query.mjs";
9
+ import { l as keepPreviousData } from "../_libs/tanstack__query-core.mjs";
10
+ import { i as AlertTitle, r as AlertDescription, t as Alert } from "./badge-CxSJ-pjU.mjs";
11
+ import { a as FieldLabel, n as FieldDescription, r as FieldError, t as Field } from "./field-MI8oNc5n.mjs";
12
+ import { M as readPendingReceipt, P as releasePendingReceipt, T as nativeBuildItmsUrl, c as NATIVE_BUILD_INSTALL_LINK_TTL_MS, f as consolePathOf, g as iosDeviceProfileUrl, h as holdPendingReceipt, i as IOS_DEVICE_RECEIPT_STORAGE_KEY, o as IOS_UDID_PATTERN, p as consolePathOfNativeBuildsPage, s as IOS_UDID_STORAGE_KEY } from "./native-builds-lEyKQemV.mjs";
13
+ import { m as useNativeBuildInstallEligibilityQuery } from "./api-IIqxWeDx.mjs";
14
+ import { n as require_dayjs_min } from "../_libs/dayjs.mjs";
15
+ //#region node_modules/.nitro/vite/services/ssr/assets/IosInstall-DcKlZU_q.js
16
+ var import_react = /* @__PURE__ */ __toESM(require_react());
17
+ var import_jsx_runtime = require_jsx_runtime();
18
+ var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min());
19
+ var STATUSES = [
20
+ "pending",
21
+ "approved",
22
+ "registered"
23
+ ];
24
+ var record = (input) => {
25
+ if (typeof input !== "object" || input === null) throw new TypeError("Invalid input.");
26
+ return input;
27
+ };
28
+ var text = (input, field, max = 2048) => {
29
+ const value = record(input)[field];
30
+ if (typeof value !== "string" || value.length === 0 || value.length > max) throw new TypeError(`Invalid ${field}.`);
31
+ return value;
32
+ };
33
+ /**
34
+ * The registry over the Console's own assembly, with the signed-in viewer's
35
+ * rights: the access check runs first, in the middleware and again here.
36
+ */
37
+ /** A device ID, the page cursor. */
38
+ var cursor = (input, field) => record(input)[field] === void 0 ? {} : { [field]: text(input, field, 36) };
39
+ /** A page of the registry, or of one status of it, with what the viewer may do. */
40
+ var getIosDevices = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => {
41
+ const status = input?.status;
42
+ if (status !== void 0 && !STATUSES.includes(status)) throw new TypeError("Invalid status.");
43
+ return {
44
+ ...status === void 0 ? {} : { status },
45
+ ...input === void 0 ? {} : {
46
+ ...cursor(input, "before"),
47
+ ...cursor(input, "after")
48
+ }
49
+ };
50
+ }).handler(createSsrRpc("3a62744a539db57f5a29f39cec7fb03fd2817703b40d98e6da69e2f5e7ae6f3d"));
51
+ /**
52
+ * The registry's row of one UDID, or null: what an iPhone back from its
53
+ * profile reads of itself. One keyed read, whatever the list's filter. A
54
+ * POST, as the install check is, so the UDID stays out of the URL.
55
+ */
56
+ var getIosDevice = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => ({ udid: text(input, "udid", 64) })).handler(createSsrRpc("7138a71df2ede8dd2c3db732d8d0ae10c56b85a8177dcdacf4e747b8087177c6"));
57
+ /**
58
+ * A new link to the profile that reads this iPhone's UDID: `register` saves
59
+ * it as requested under `name`, `identify` tells build `buildId`'s page which
60
+ * iPhone it is. A POST, since it signs the link.
61
+ */
62
+ var createIosDeviceProfileLink = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => {
63
+ const mode = record(input).mode;
64
+ if (mode === "register") return {
65
+ mode,
66
+ name: text(input, "name", 100)
67
+ };
68
+ if (mode === "identify") return {
69
+ mode,
70
+ buildId: text(input, "buildId", 36)
71
+ };
72
+ throw new TypeError("Invalid mode.");
73
+ }).handler(createSsrRpc("4b173c2b2f5ea074a1f10862282308f11f5a043c044d64b6f63e6a29d571ec64"));
74
+ /** Approves a requested device, with its name: approvers only. */
75
+ var approveIosDevice = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => ({
76
+ id: text(input, "id", 36),
77
+ name: text(input, "name", 100)
78
+ })).handler(createSsrRpc("7908c24ccc2674ce07a553a645b8f4790889975a80f424a05d71a9fb8ab49787"));
79
+ /** Renames a device in the registry: approvers only. */
80
+ var renameIosDevice = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => ({
81
+ id: text(input, "id", 36),
82
+ name: text(input, "name", 100)
83
+ })).handler(createSsrRpc("4c92dfeae76a6fc898d6f38941eeedaec1f3d118f51a6f31ebf0bb1cea3fcea4"));
84
+ /**
85
+ * Removes a device from the registry: an approver any, the person who asked
86
+ * their own requested one. Apple keeps it.
87
+ */
88
+ var removeIosDevice = createServerFn({ method: "POST" }).middleware([consoleAccess]).validator((input) => ({ udid: text(input, "udid", 40) })).handler(createSsrRpc("8e37ec67413ceba554adb2d4b15e53682595a089d4b431ba7965d4347fb500fc"));
89
+ /**
90
+ * The devices an ad hoc build's IPA lists, read from its profile in storage,
91
+ * each with its registry name when the registry knows it: one row read, the
92
+ * IPA's few parts, and one page of the registry.
93
+ */
94
+ var getNativeBuildIpaDevices = createServerFn({ method: "GET" }).middleware([consoleAccess]).validator((input) => ({ id: text(input, "id", 36) })).handler(createSsrRpc("a11cb4014e6b23528f76382c43684798b0e84a6936aaba02c918e8f4e216e282"));
95
+ var iosDeviceKeys = {
96
+ all: ["ios-devices"],
97
+ list: (page) => [
98
+ "ios-devices",
99
+ page.status ?? "all",
100
+ {
101
+ before: page.before,
102
+ after: page.after
103
+ }
104
+ ],
105
+ device: (udid) => [
106
+ "ios-devices",
107
+ "device",
108
+ udid
109
+ ],
110
+ kept: (receipt) => [
111
+ "ios-devices",
112
+ "kept",
113
+ receipt ?? ""
114
+ ],
115
+ ipa: (buildId) => ["native-build-ipa-devices", buildId]
116
+ };
117
+ /**
118
+ * How long a profile link is used before the page signs a new one: its
119
+ * capability works 15 minutes, and a tester may leave the page open.
120
+ */
121
+ var PROFILE_LINK_REFRESH_MS = 600 * 1e3;
122
+ /**
123
+ * One page of the registry, one status or all, kept on screen while it
124
+ * reloads, so a filter or page change never blanks the table. It reads
125
+ * again on focus: an approver sees a new request without reloading.
126
+ */
127
+ function useIosDevicesQuery(page) {
128
+ return useQuery({
129
+ queryKey: iosDeviceKeys.list(page),
130
+ queryFn: () => getIosDevices({ data: page }),
131
+ placeholderData: keepPreviousData
132
+ });
133
+ }
134
+ /**
135
+ * This iPhone's registry row, by the UDID its profile reported, or null once
136
+ * it's gone; nothing is read without a UDID. Under `iosDeviceKeys.all`, so
137
+ * an approval or a removal reads it again.
138
+ */
139
+ function useIosDeviceQuery(udid) {
140
+ return useQuery({
141
+ queryKey: iosDeviceKeys.device(udid ?? ""),
142
+ queryFn: () => getIosDevice({ data: { udid } }),
143
+ enabled: udid !== null
144
+ });
145
+ }
146
+ /**
147
+ * A signed link to this iPhone's profile, signed again before it expires:
148
+ * the link stays a plain `<a href>`, so nothing waits on a request when it is
149
+ * tapped. The token signs its input, the name to register or the build to
150
+ * return to, so it has no data while another input's token loads: keeping
151
+ * the previous one would register the old name.
152
+ */
153
+ function useIosDeviceProfileLinkQuery(input, enabled = true) {
154
+ return useQuery({
155
+ queryKey: ["ios-device-profile-link", input],
156
+ queryFn: () => createIosDeviceProfileLink({ data: input }),
157
+ enabled,
158
+ staleTime: PROFILE_LINK_REFRESH_MS,
159
+ refetchInterval: PROFILE_LINK_REFRESH_MS
160
+ });
161
+ }
162
+ /** The devices an IPA lists, by registry name where it has one. */
163
+ function useNativeBuildIpaDevicesQuery(buildId) {
164
+ return useQuery({
165
+ queryKey: iosDeviceKeys.ipa(buildId),
166
+ queryFn: () => getNativeBuildIpaDevices({ data: { id: buildId } })
167
+ });
168
+ }
169
+ var useInvalidatingMutation = (mutationFn) => {
170
+ const queryClient = useQueryClient();
171
+ return useMutation({
172
+ mutationFn,
173
+ onSettled: async () => {
174
+ await Promise.all([queryClient.invalidateQueries({ queryKey: iosDeviceKeys.all }), queryClient.invalidateQueries({ queryKey: ["native-build-install-eligibility"] })]);
175
+ }
176
+ });
177
+ };
178
+ var useApproveIosDeviceMutation = () => useInvalidatingMutation((input) => approveIosDevice({ data: input }));
179
+ var useRenameIosDeviceMutation = () => useInvalidatingMutation((input) => renameIosDevice({ data: input }));
180
+ var useRemoveIosDeviceMutation = () => useInvalidatingMutation((input) => removeIosDevice({ data: input }));
181
+ /** The routes this iPhone's kept proof is sent to, under the Console's path. */
182
+ var deviceRoute = (consolePath, name) => `${consolePath}/_hot-updater/devices/${name}`;
183
+ var sendDeviceRoute = async (url, init = {}) => {
184
+ const { json, ...rest } = init;
185
+ const response = await fetch(url, {
186
+ credentials: "same-origin",
187
+ ...rest,
188
+ ...json === void 0 ? {} : {
189
+ headers: { "content-type": "application/json" },
190
+ body: JSON.stringify(json)
191
+ }
192
+ });
193
+ const body = await response.json().catch(() => null);
194
+ if (!response.ok || body === null) throw new Error(body?.error ?? `Request failed (${response.status}).`);
195
+ return body;
196
+ };
197
+ /** Told when a trade sets the cookie, so a cached "no proof" is read again. */
198
+ var KEPT_EVENT = "hot-updater-ios-device-kept";
199
+ /**
200
+ * The same news for this Safari's other tabs, which share the cookie: a
201
+ * timestamp only, written where their `storage` event hears it.
202
+ */
203
+ var KEPT_PING_KEY = "hot-updater-ios-device-kept";
204
+ /** Trades in flight or done, one per receipt: a failed one is forgotten. */
205
+ var trades = /* @__PURE__ */ new Map();
206
+ /**
207
+ * Trades the profile answer's fresh receipt for this Safari's HttpOnly cookie,
208
+ * wherever the answer lands: whatever the build page or the registry says, the
209
+ * proof is kept. One request per receipt while it is in flight or once it has
210
+ * succeeded; a failed one rejects and is forgotten, so the next refresh,
211
+ * refocus, or reload trades it again while it is still valid. Once traded,
212
+ * the receipt leaves this tab's session storage.
213
+ */
214
+ var keepIosDeviceReceipt = (consolePath, receipt) => {
215
+ let trade = trades.get(receipt);
216
+ if (trade === void 0) {
217
+ trade = sendDeviceRoute(deviceRoute(consolePath, "receipt"), {
218
+ method: "POST",
219
+ json: { receipt }
220
+ }).then((answer) => {
221
+ releasePendingReceipt(receipt);
222
+ window.dispatchEvent(new Event(KEPT_EVENT));
223
+ try {
224
+ window.localStorage.setItem(KEPT_PING_KEY, String(Date.now()));
225
+ } catch {}
226
+ return answer;
227
+ }, (error) => {
228
+ trades.delete(receipt);
229
+ throw error;
230
+ });
231
+ trades.set(receipt, trade);
232
+ }
233
+ return trade;
234
+ };
235
+ /**
236
+ * The UDID this Safari has proved for the signed-in person, from its HttpOnly
237
+ * cookie, or null, read after the page's fresh receipt, if any, is traded for
238
+ * it. Read on an iPhone only.
239
+ */
240
+ function useKeptIosDeviceQuery(consolePath, receipt, enabled) {
241
+ const queryClient = useQueryClient();
242
+ (0, import_react.useEffect)(() => {
243
+ const onKept = () => void queryClient.invalidateQueries({
244
+ queryKey: iosDeviceKeys.kept(null),
245
+ exact: true
246
+ });
247
+ const onStorage = (event) => {
248
+ if (event.key === KEPT_PING_KEY) onKept();
249
+ };
250
+ window.addEventListener(KEPT_EVENT, onKept);
251
+ window.addEventListener("storage", onStorage);
252
+ return () => {
253
+ window.removeEventListener(KEPT_EVENT, onKept);
254
+ window.removeEventListener("storage", onStorage);
255
+ };
256
+ }, [queryClient]);
257
+ return useQuery({
258
+ queryKey: iosDeviceKeys.kept(receipt),
259
+ queryFn: async () => {
260
+ let failed = null;
261
+ if (receipt !== null) await keepIosDeviceReceipt(consolePath, receipt).catch((error) => {
262
+ failed = error;
263
+ });
264
+ const kept = await sendDeviceRoute(deviceRoute(consolePath, "receipt"));
265
+ if (failed !== null && kept.udid === null) throw failed;
266
+ return kept;
267
+ },
268
+ enabled,
269
+ retry: false,
270
+ staleTime: Number.POSITIVE_INFINITY
271
+ });
272
+ }
273
+ /**
274
+ * Forgets this Safari's proof of its iPhone before sign-out, so the next
275
+ * person on this Safari starts from the profile. Only an iPhone or iPad holds
276
+ * one; a failure leaves the cookie, which the next email ignores anyway.
277
+ */
278
+ var forgetKeptIosDevice = async (consolePath) => {
279
+ await sendDeviceRoute(deviceRoute(consolePath, "receipt"), { method: "DELETE" }).catch(() => void 0);
280
+ };
281
+ /**
282
+ * Requests this iPhone for the signed-in person, under `name`: the UDID comes
283
+ * from the profile's fresh receipt when the page has one, else from the
284
+ * cookie that proved it before.
285
+ */
286
+ var useRequestThisIphoneMutation = (consolePath) => useInvalidatingMutation((input) => sendDeviceRoute(deviceRoute(consolePath, "request"), {
287
+ method: "POST",
288
+ json: input.receipt === null ? { name: input.name } : {
289
+ name: input.name,
290
+ receipt: input.receipt
291
+ }
292
+ }));
293
+ /** Whether the cookie's UDID is this iPhone's, whatever its case. */
294
+ var keptIsThisIphone = (kept, udid) => kept != null && udid !== null && kept.toLowerCase() === udid.toLowerCase();
295
+ /**
296
+ * What an install does to the App Store's copy of the app on this iPhone, with
297
+ * the same bundle ID. The one line to change after trying it on a real iPhone.
298
+ */
299
+ var IOS_STORE_APP_NOTE = "With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.";
300
+ var ACTION_CLASS = "h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit";
301
+ /** Whether this browser runs on an iPhone or iPad: an iPad says it is a Mac. */
302
+ var isIosBrowser = (browser) => /iPhone|iPod|iPad/u.test(browser.userAgent) || /Macintosh/u.test(browser.userAgent) && browser.maxTouchPoints > 1;
303
+ /**
304
+ * What the profile's answer passed back in the fragment: the UDID, with a
305
+ * receipt of it from a check, or `requested` from a registration.
306
+ */
307
+ var fragmentOf = () => {
308
+ if (typeof window === "undefined") return {
309
+ udid: null,
310
+ receipt: null,
311
+ requested: false
312
+ };
313
+ const params = new URLSearchParams(window.location.hash.slice(1));
314
+ const udid = params.get("udid");
315
+ const valid = udid !== null && IOS_UDID_PATTERN.test(udid) ? udid : null;
316
+ return {
317
+ udid: valid,
318
+ receipt: valid === null ? null : params.get("r"),
319
+ requested: valid !== null && params.get("requested") === "1"
320
+ };
321
+ };
322
+ var readKept = (key) => {
323
+ try {
324
+ return window.localStorage.getItem(key);
325
+ } catch {
326
+ return null;
327
+ }
328
+ };
329
+ var keep = (key, value) => {
330
+ try {
331
+ window.localStorage.setItem(key, value);
332
+ } catch {}
333
+ };
334
+ /**
335
+ * Whether this page is open on an iPhone, its UDID, and a receipt of it: the
336
+ * ones this phone kept, else the ones the profile's answer passed in the
337
+ * fragment, which are kept then, whether the answer opened this page or came
338
+ * back to it already open. Read after the page mounts: the server
339
+ * renders it without a browser. Null until then.
340
+ */
341
+ /** Tells this page's `useIosDevice` that the ID it keeps was just written. */
342
+ var ADOPTED_EVENT = "hot-updater-ios-device-adopted";
343
+ /**
344
+ * Adopts the UDID this Safari's cookie names, when the page kept none: Safari
345
+ * wipes script storage after a week away while the 30-day HttpOnly cookie
346
+ * stays, and the cookie is the proof. Kept again, so every page knows it.
347
+ */
348
+ var useAdoptKeptIosDevice = (device, kept) => {
349
+ const adopt = device?.ios === true && device.udid === null && kept != null && IOS_UDID_PATTERN.test(kept) ? kept : null;
350
+ (0, import_react.useEffect)(() => {
351
+ if (adopt === null) return;
352
+ keep(IOS_UDID_STORAGE_KEY, adopt);
353
+ window.dispatchEvent(new Event(ADOPTED_EVENT));
354
+ }, [adopt]);
355
+ };
356
+ var useIosDevice = () => {
357
+ const [device, setDevice] = (0, import_react.useState)(null);
358
+ const [passed] = (0, import_react.useState)(fragmentOf);
359
+ (0, import_react.useEffect)(() => {
360
+ const valid = (udid) => udid != null && IOS_UDID_PATTERN.test(udid) ? udid : null;
361
+ let latest = passed;
362
+ let answers = 0;
363
+ const absorb = (fragment) => {
364
+ const answered = fragment.receipt !== null || fragment.requested;
365
+ if (fragment.udid !== null && answered) {
366
+ answers += 1;
367
+ keep(IOS_UDID_STORAGE_KEY, fragment.udid);
368
+ if (fragment.receipt !== null) {
369
+ holdPendingReceipt(fragment.udid, fragment.receipt);
370
+ keepIosDeviceReceipt(consolePathOfNativeBuildsPage(window.location), fragment.receipt).catch(() => void 0);
371
+ }
372
+ }
373
+ if (fragment.udid !== null && window.location.hash !== "") window.history.replaceState(window.history.state, "", `${window.location.pathname}${window.location.search}`);
374
+ };
375
+ absorb(passed);
376
+ try {
377
+ window.localStorage.removeItem(IOS_DEVICE_RECEIPT_STORAGE_KEY);
378
+ } catch {}
379
+ const read = () => {
380
+ const udid = valid(readKept("hot-updater-ios-udid")) ?? latest.udid;
381
+ const receipt = (latest.udid === udid ? latest.receipt : null) ?? readPendingReceipt(udid);
382
+ const requested = latest.requested;
383
+ const taken = answers;
384
+ setDevice((current) => current !== null && current.udid === udid && current.receipt === receipt && current.requested === requested && current.answers === taken ? current : {
385
+ ios: isIosBrowser(navigator),
386
+ udid,
387
+ receipt,
388
+ requested,
389
+ answers: taken
390
+ });
391
+ };
392
+ read();
393
+ const onStorage = (event) => {
394
+ if (event.key === null || event.key === "hot-updater-ios-udid") read();
395
+ };
396
+ const onReturn = () => {
397
+ const fragment = fragmentOf();
398
+ if (fragment.udid !== null) {
399
+ latest = fragment;
400
+ absorb(fragment);
401
+ }
402
+ read();
403
+ };
404
+ window.addEventListener("storage", onStorage);
405
+ window.addEventListener(ADOPTED_EVENT, read);
406
+ window.addEventListener("hashchange", onReturn);
407
+ window.addEventListener("pageshow", onReturn);
408
+ document.addEventListener("visibilitychange", onReturn);
409
+ return () => {
410
+ window.removeEventListener("storage", onStorage);
411
+ window.removeEventListener(ADOPTED_EVENT, read);
412
+ window.removeEventListener("hashchange", onReturn);
413
+ window.removeEventListener("pageshow", onReturn);
414
+ document.removeEventListener("visibilitychange", onReturn);
415
+ };
416
+ }, [passed]);
417
+ return device;
418
+ };
419
+ /**
420
+ * How long before its link expires the page stops offering it: the installer
421
+ * fetches the manifest, then the IPA, only after the tester confirms the prompt.
422
+ */
423
+ var INSTALL_LINK_MARGIN_MS = 300 * 1e3;
424
+ /**
425
+ * Whether a link read at `readAtMs` is past offering, measured on this phone's
426
+ * clock from when it arrived, since the phone's clock may disagree with the
427
+ * server's. A failed refresh leaves `readAtMs` where it was. Timers stop while
428
+ * the phone sleeps, so coming back to the page checks again.
429
+ */
430
+ var useInstallLinkExpired = (readAtMs, holdsLink) => {
431
+ const [, check] = (0, import_react.useReducer)((count) => count + 1, 0);
432
+ const expiresAtMs = readAtMs + NATIVE_BUILD_INSTALL_LINK_TTL_MS - INSTALL_LINK_MARGIN_MS;
433
+ (0, import_react.useEffect)(() => {
434
+ if (!holdsLink) return;
435
+ const timer = setTimeout(check, Math.max(0, expiresAtMs - Date.now()));
436
+ document.addEventListener("visibilitychange", check);
437
+ window.addEventListener("pageshow", check);
438
+ return () => {
439
+ clearTimeout(timer);
440
+ document.removeEventListener("visibilitychange", check);
441
+ window.removeEventListener("pageshow", check);
442
+ };
443
+ }, [expiresAtMs, holdsLink]);
444
+ return holdsLink && Date.now() >= expiresAtMs;
445
+ };
446
+ /** In place of Install once its link has expired: it never offers a dead link. */
447
+ function RenewInstallLink({ fetching, onRenew }) {
448
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
449
+ className: "flex min-w-0 flex-col gap-2",
450
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
451
+ className: "text-xs text-muted-foreground",
452
+ role: "status",
453
+ children: ["This install link has expired.", fetching ? " Getting a new one." : ""]
454
+ }), fetching ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
455
+ className: ACTION_CLASS,
456
+ onClick: onRenew,
457
+ variant: "outline",
458
+ children: "Get a new link"
459
+ })]
460
+ });
461
+ }
462
+ function InstallButton({ build, token }) {
463
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
464
+ className: buttonVariants({ className: ACTION_CLASS }),
465
+ href: nativeBuildItmsUrl(window.location, build.id, token),
466
+ children: "Install"
467
+ });
468
+ }
469
+ /** What a tester reads before Install opens the system's install prompt. */
470
+ function InstallNotes() {
471
+ return /* @__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-xs text-muted-foreground",
475
+ children: "On iOS 16 or later, the app opens only with Developer Mode on: Settings, Privacy & Security, Developer Mode."
476
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
477
+ className: "text-xs text-muted-foreground",
478
+ children: IOS_STORE_APP_NOTE
479
+ })]
480
+ });
481
+ }
482
+ /**
483
+ * The link that hands this iPhone the profile that reads its UDID, signed for
484
+ * this person, under the Console's path. A plain link, so iOS offers the
485
+ * profile; the page signs a new one before it expires. Once it's installed,
486
+ * the phone comes back to this page with the UDID and a receipt of it.
487
+ */
488
+ function CheckThisIphone({ build, again = false }) {
489
+ const link = useIosDeviceProfileLinkQuery({
490
+ mode: "identify",
491
+ buildId: build.id
492
+ });
493
+ if (link.data?.status === "no-secret") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
494
+ className: "text-xs text-muted-foreground",
495
+ role: "status",
496
+ children: [
497
+ "Set ",
498
+ link.data.secretName,
499
+ " on the Console to check iPhones from this page."
500
+ ]
501
+ });
502
+ if (link.data?.status !== "issued") return link.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
503
+ variant: "destructive",
504
+ children: [
505
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
506
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "The check couldn't start" }),
507
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: "Check your connection and try again." })
508
+ ]
509
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
510
+ className: ACTION_CLASS,
511
+ disabled: link.isFetching,
512
+ onClick: () => void link.refetch(),
513
+ variant: "outline",
514
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCw, { "data-icon": "inline-start" }), "Reload"]
515
+ })] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, {
516
+ "aria-label": "Preparing the check",
517
+ className: "h-11 w-full"
518
+ });
519
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
520
+ className: buttonVariants({
521
+ className: ACTION_CLASS,
522
+ variant: again ? "secondary" : "default"
523
+ }),
524
+ href: iosDeviceProfileUrl(consolePathOf(window.location, build.id), link.data.token),
525
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Smartphone, { "data-icon": "inline-start" }), again ? "Check this iPhone again" : "Check this iPhone"]
526
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
527
+ className: "text-xs text-muted-foreground",
528
+ children: "Allow the download, then install it in Settings, where iOS calls it not signed. Nothing stays installed."
529
+ })] });
530
+ }
531
+ var shortDate = (ms) => (0, import_dayjs_min.default)(ms).format("MMM D");
532
+ /**
533
+ * Apple's refusal of this iPhone, in its own words, and the one next step: the
534
+ * iOS devices page for an approver, unless this is that page, else whom to
535
+ * ask.
536
+ */
537
+ function AppleRefusal({ device, canApprove, onDevicesPage = false }) {
538
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
539
+ className: "flex min-w-0 flex-col gap-3",
540
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
541
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
542
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Apple didn't register this iPhone" }),
543
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDescription, { children: device.apple_error })
544
+ ] }), canApprove ? onDevicesPage ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
545
+ className: buttonVariants({
546
+ className: ACTION_CLASS,
547
+ variant: "outline"
548
+ }),
549
+ to: "/native-builds/devices",
550
+ children: "iOS devices"
551
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
552
+ className: "text-xs text-muted-foreground",
553
+ children: device.status === "approved" ? "Ask a maintainer to free a device slot." : "Ask a maintainer to check it on the iOS devices page."
554
+ })]
555
+ });
556
+ }
557
+ /**
558
+ * What an iPhone the IPA doesn't list sees: the registry's word on it, or
559
+ * Request access, which takes the UDID from this person's receipt alone.
560
+ */
561
+ function NotInThisBuild({ build, device, registry, newerBuild, canApprove, registryReadAt }) {
562
+ const consolePath = consolePathOf(window.location, build.id);
563
+ const request = useRequestThisIphoneMutation(consolePath);
564
+ const kept = useKeptIosDeviceQuery(consolePath, device.receipt, device.ios && device.udid !== null && registry === null);
565
+ const proved = device.receipt !== null || keptIsThisIphone(kept.data?.udid, device.udid);
566
+ const [name, setName] = (0, import_react.useState)("");
567
+ const [requested, setRequested] = (0, import_react.useState)(null);
568
+ const standIn = requested !== null && registryReadAt <= requested.readBefore;
569
+ const row = standIn ? requested.device : registry;
570
+ const heading = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
571
+ className: "flex min-w-0 flex-col gap-1",
572
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
573
+ className: "text-sm font-medium",
574
+ children: "Not in this build"
575
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
576
+ className: "text-xs text-muted-foreground",
577
+ children: "This IPA was signed without this iPhone, and iOS won't install it here."
578
+ })]
579
+ });
580
+ if (row !== null) {
581
+ const newer = standIn ? null : newerBuild;
582
+ if (row.apple_error !== null && newer === null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppleRefusal, {
583
+ canApprove,
584
+ device: row
585
+ });
586
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
587
+ className: "flex min-w-0 flex-col gap-3",
588
+ children: [
589
+ heading,
590
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
591
+ className: "text-sm",
592
+ role: "status",
593
+ children: row.status === "pending" ? `${row.name} was requested on ${shortDate(row.created_at_ms)}. A maintainer approves it next.` : newer !== null ? `A newer build has ${row.name}.` : `${row.name} is ${row.status}. It joins the next ad hoc build.`
594
+ }),
595
+ newer !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
596
+ className: buttonVariants({ className: ACTION_CLASS }),
597
+ params: { buildId: newer },
598
+ to: "/native-builds/$buildId",
599
+ children: "Open the newer build"
600
+ }) : null
601
+ ]
602
+ });
603
+ }
604
+ if (!proved && kept.isPending && device.udid !== null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, {
605
+ "aria-label": "Reading this iPhone",
606
+ className: "h-11 w-full"
607
+ });
608
+ if (!proved) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
609
+ className: "flex min-w-0 flex-col gap-3",
610
+ children: [
611
+ heading,
612
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
613
+ className: "text-xs text-muted-foreground",
614
+ children: "Check this iPhone once more to request it for the next ad hoc build."
615
+ }),
616
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckThisIphone, {
617
+ build,
618
+ again: true
619
+ })
620
+ ]
621
+ });
622
+ const trimmed = name.trim();
623
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
624
+ className: "flex min-w-0 flex-col gap-3",
625
+ onSubmit: (event) => {
626
+ event.preventDefault();
627
+ if (trimmed === "") return;
628
+ const readBefore = registryReadAt;
629
+ request.mutate({
630
+ receipt: device.receipt,
631
+ name: trimmed
632
+ }, { onSuccess: ({ device: saved }) => setRequested({
633
+ device: saved,
634
+ readBefore
635
+ }) });
636
+ },
637
+ children: [
638
+ heading,
639
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, {
640
+ "data-invalid": request.isError || void 0,
641
+ children: [
642
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
643
+ htmlFor: "ios-device-name",
644
+ children: "This iPhone's name"
645
+ }),
646
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
647
+ autoComplete: "off",
648
+ className: "h-11 sm:h-8",
649
+ id: "ios-device-name",
650
+ maxLength: 100,
651
+ onChange: (event) => setName(event.target.value),
652
+ placeholder: "Kim's iPhone",
653
+ value: name
654
+ }),
655
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldDescription, { children: "A maintainer approves it, and it joins the next ad hoc build." }),
656
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldError, { children: request.isError ? "The request didn't go through. Check this iPhone again, then try once more." : null })
657
+ ]
658
+ }),
659
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
660
+ className: ACTION_CLASS,
661
+ disabled: trimmed === "" || request.isPending,
662
+ type: "submit",
663
+ children: [request.isPending ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, {
664
+ className: "animate-spin motion-reduce:animate-none",
665
+ "data-icon": "inline-start"
666
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Send, { "data-icon": "inline-start" }), "Request access"]
667
+ }),
668
+ request.isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckThisIphone, {
669
+ again: true,
670
+ build
671
+ }) : null
672
+ ]
673
+ });
674
+ }
675
+ /**
676
+ * Installing an IPA from this iPhone: the build's IPA says what it allows, read
677
+ * once when the page opens here, so a phone it doesn't list goes to Request
678
+ * access rather than a download iOS refuses at the end. App Store Connect isn't
679
+ * asked: a device registered after this IPA was signed still isn't in it.
680
+ */
681
+ function IosInstall({ build, device }) {
682
+ useAdoptKeptIosDevice(device, useKeptIosDeviceQuery(consolePathOf(window.location, build.id), device.receipt, device.ios && device.udid === null).data?.udid);
683
+ const { udid } = device;
684
+ const eligibility = useNativeBuildInstallEligibilityQuery(build.id, udid);
685
+ const { refetch } = eligibility;
686
+ const expired = useInstallLinkExpired(eligibility.dataUpdatedAt, eligibility.data?.status === "installable" && eligibility.data.device === "included");
687
+ (0, import_react.useEffect)(() => {
688
+ if (expired) refetch();
689
+ }, [expired, refetch]);
690
+ if (eligibility.isPending) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, {
691
+ "aria-label": "Reading this IPA",
692
+ className: "h-11 w-full"
693
+ });
694
+ const result = eligibility.data;
695
+ if (result === void 0 || result.status === "unavailable") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, { children: [
696
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
697
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "Installation details unavailable" }),
698
+ /* @__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. Other ways to install still work from a computer." })
699
+ ] });
700
+ if (result.status === "store") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
701
+ className: "text-xs text-muted-foreground",
702
+ children: build.is_sandbox ? "This IPA is an App Store export, which doesn't install from this page." : "This IPA is an App Store export, which installs through TestFlight, not from this page."
703
+ });
704
+ if (result.status === "expired") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
705
+ variant: "destructive",
706
+ children: [
707
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, {}),
708
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertTitle, { children: "This build's profile has expired" }),
709
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertDescription, { children: [
710
+ "It expired on ",
711
+ (0, import_dayjs_min.default)(result.expiresAt).format("YYYY-MM-DD"),
712
+ ". A maintainer rebuilds it to install again."
713
+ ] })
714
+ ]
715
+ });
716
+ const token = result.link.status === "issued" ? result.link.token : null;
717
+ if (result.link.status === "no-secret") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
718
+ className: "text-xs text-muted-foreground",
719
+ role: "status",
720
+ children: [
721
+ "Set ",
722
+ result.link.secretName,
723
+ " on the Console to install from this page."
724
+ ]
725
+ });
726
+ if (token === null) return null;
727
+ if (result.device === "included") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
728
+ className: "flex min-w-0 flex-col gap-3",
729
+ children: [
730
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
731
+ className: "text-sm font-medium",
732
+ children: "In this build"
733
+ }),
734
+ expired ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RenewInstallLink, {
735
+ fetching: eligibility.isFetching,
736
+ onRenew: () => void refetch()
737
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallButton, {
738
+ build,
739
+ token
740
+ }),
741
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstallNotes, {})
742
+ ]
743
+ });
744
+ if (result.device === "not-included") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotInThisBuild, {
745
+ build,
746
+ device,
747
+ registry: result.registry,
748
+ newerBuild: result.newerBuild,
749
+ canApprove: result.canApprove,
750
+ registryReadAt: eligibility.dataUpdatedAt
751
+ });
752
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
753
+ className: "flex min-w-0 flex-col gap-3",
754
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
755
+ className: "flex min-w-0 flex-col gap-1",
756
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
757
+ className: "text-sm font-medium",
758
+ children: "Check this iPhone first"
759
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
760
+ className: "text-xs text-muted-foreground",
761
+ children: "iOS installs this IPA only on the devices it lists. A profile reads this iPhone's ID, then Safari comes back here."
762
+ })]
763
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckThisIphone, { build })]
764
+ });
765
+ }
766
+ //#endregion
767
+ export { useRequestThisIphoneMutation as _, isIosBrowser as a, useApproveIosDeviceMutation as c, useIosDeviceQuery as d, useIosDevicesQuery as f, useRenameIosDeviceMutation as g, useRemoveIosDeviceMutation as h, iosDeviceKeys as i, useIosDevice as l, useNativeBuildIpaDevicesQuery as m, IosInstall as n, keptIsThisIphone as o, useKeptIosDeviceQuery as p, forgetKeptIosDevice as r, useAdoptKeptIosDevice as s, AppleRefusal as t, useIosDeviceProfileLinkQuery as u };