@aeolus-fleet/gateway 0.36.0 → 0.36.1

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 (202) hide show
  1. package/dist/person-waiters.js +3 -1
  2. package/dist/person-waiters.js.map +1 -1
  3. package/package.json +1 -1
  4. package/web/.next/BUILD_ID +1 -1
  5. package/web/.next/build-manifest.json +3 -3
  6. package/web/.next/diagnostics/route-bundle-stats.json +40 -40
  7. package/web/.next/fallback-build-manifest.json +3 -3
  8. package/web/.next/prerender-manifest.json +3 -3
  9. package/web/.next/server/app/(console)/bridge/basket/page/server-reference-manifest.json +7 -7
  10. package/web/.next/server/app/(console)/bridge/basket/page.js.nft.json +1 -1
  11. package/web/.next/server/app/(console)/bridge/basket/page_client-reference-manifest.js +1 -1
  12. package/web/.next/server/app/(console)/bridge/done/page/server-reference-manifest.json +7 -7
  13. package/web/.next/server/app/(console)/bridge/done/page.js.nft.json +1 -1
  14. package/web/.next/server/app/(console)/bridge/done/page_client-reference-manifest.js +1 -1
  15. package/web/.next/server/app/(console)/bridge/page/server-reference-manifest.json +6 -6
  16. package/web/.next/server/app/(console)/bridge/page.js.nft.json +1 -1
  17. package/web/.next/server/app/(console)/bridge/page_client-reference-manifest.js +1 -1
  18. package/web/.next/server/app/(console)/bridge/settings/page/server-reference-manifest.json +1 -1
  19. package/web/.next/server/app/(console)/bridge/settings/page.js.nft.json +1 -1
  20. package/web/.next/server/app/(console)/bridge/settings/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(console)/bridge/settings/requests/[requestId]/page/server-reference-manifest.json +2 -2
  22. package/web/.next/server/app/(console)/bridge/settings/requests/[requestId]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(console)/bridge/settings/requests/[requestId]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(console)/bridge/settings/routing/page/server-reference-manifest.json +5 -5
  25. package/web/.next/server/app/(console)/bridge/settings/routing/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(console)/bridge/settings/routing/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  28. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  29. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  30. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  31. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  32. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +17 -17
  34. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +8 -8
  37. package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +17 -17
  40. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  41. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  42. package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +10 -10
  43. package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
  44. package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
  46. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
  49. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
  52. package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
  53. package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +9 -9
  55. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  56. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  58. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +11 -11
  61. package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +11 -11
  64. package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +11 -11
  67. package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
  68. package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +11 -11
  70. package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
  71. package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/_global-error.html +1 -1
  73. package/web/.next/server/app/_global-error.rsc +1 -1
  74. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  75. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  76. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  77. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  78. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  79. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  81. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  82. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  84. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  85. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  87. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  88. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/chunks/ssr/01fr_app_(console)_bridge_settings_requests_[requestId]_page_actions_1au-p5lgnv5e-.js +1 -1
  90. package/web/.next/server/chunks/ssr/01fr_app_(console)_bridge_settings_requests_[requestId]_page_actions_1au-p5lgnv5e-.js.map +1 -1
  91. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_bridge_settings_routing_page_actions_136lm_jip4d_x.js +1 -1
  92. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_bridge_settings_routing_page_actions_136lm_jip4d_x.js.map +1 -1
  93. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
  94. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
  95. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
  96. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
  97. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
  98. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
  100. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
  102. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a6a1yc_ac-qt._.js +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js +1 -1
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__18v7b5ga58a9n._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  120. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/_0a_nsm-ye2r6v._.js +1 -1
  122. package/web/.next/server/chunks/ssr/_0a_nsm-ye2r6v._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  124. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  126. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  128. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/_10-gn6g9yc63s._.js +3 -0
  130. package/web/.next/server/chunks/ssr/{_0swrejvekuzfx._.js.map → _10-gn6g9yc63s._.js.map} +1 -1
  131. package/web/.next/server/chunks/ssr/_177fdczus39s7._.js +3 -0
  132. package/web/.next/server/chunks/ssr/{_1qdpkpsskm5wj._.js.map → _177fdczus39s7._.js.map} +1 -1
  133. package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
  134. package/web/.next/server/chunks/ssr/_1e2o809f0ekry._.js +1 -1
  135. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  136. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  138. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
  140. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_basket_page_actions_102xk3g8eko_q.js +1 -1
  142. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_basket_page_actions_102xk3g8eko_q.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_done_page_actions_0mm90xd2feta2.js +1 -1
  144. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_done_page_actions_0mm90xd2feta2.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_page_actions_082880qz6xa5k.js +1 -1
  146. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_page_actions_082880qz6xa5k.js.map +1 -1
  147. package/web/.next/server/chunks/ssr/web_features_16cy3vmcijydk._.js +3 -0
  148. package/web/.next/server/chunks/ssr/{web_features_1je122n6carea._.js.map → web_features_16cy3vmcijydk._.js.map} +1 -1
  149. package/web/.next/server/chunks/ssr/web_features_1iiqi6dhrst33._.js +3 -0
  150. package/web/.next/server/chunks/ssr/{web_features_1nrnskep6p8ci._.js.map → web_features_1iiqi6dhrst33._.js.map} +1 -1
  151. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  152. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  154. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  156. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js +1 -1
  158. package/web/.next/server/chunks/ssr/web_features_bridge_state_0354e3wb0dzx1._.js +1 -1
  159. package/web/.next/server/chunks/ssr/web_features_bridge_state_0354e3wb0dzx1._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js +1 -1
  161. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js +1 -1
  163. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js +1 -1
  165. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
  167. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  169. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  171. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  173. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  174. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
  175. package/web/.next/server/middleware-build-manifest.js +3 -3
  176. package/web/.next/server/pages/500.html +1 -1
  177. package/web/.next/server/preview-props.json +3 -3
  178. package/web/.next/server/server-reference-manifest.js +1 -1
  179. package/web/.next/server/server-reference-manifest.json +50 -50
  180. package/web/.next/static/chunks/0az9upwm-8_q9.js +1 -0
  181. package/web/.next/static/chunks/0gbozvd_yh421.js +1 -0
  182. package/web/.next/static/chunks/{1lyv8ukt_q3ph.js → 0l9_oie6xi0kd.js} +1 -1
  183. package/web/.next/static/chunks/{3rt603msircrl.js → 0m512dxdcrv-b.js} +1 -1
  184. package/web/.next/static/chunks/{2799kv0y5g2va.js → 1485slb5zus5p.js} +1 -1
  185. package/web/.next/static/chunks/{36fnm0ezsx1eh.js → 24olc0btcvn7q.js} +1 -1
  186. package/web/.next/static/chunks/{1ymfhxs-xqiy6.js → 296w-74ry5lzk.js} +1 -1
  187. package/web/.next/static/chunks/{40j58bya72xh1.js → 2z2auwx1s2mgl.js} +1 -1
  188. package/web/.next/static/chunks/{0fu7je2vzzzh7.js → 397zvdr6xr5pq.js} +1 -1
  189. package/web/.next/static/chunks/{3hvw5n04pbwg8.js → 3db90zxmny2y-.js} +1 -1
  190. package/web/.next/static/chunks/{322fzslly9wpf.js → 3x0p-z3zdrk_b.js} +1 -1
  191. package/web/.next/static/chunks/{1ehmzxr697ifa.js → 3yq9jt4p_0uid.js} +1 -1
  192. package/web/.next/trace +1 -1
  193. package/web/.next/trace-build +1 -1
  194. package/web/.next/server/chunks/ssr/_0swrejvekuzfx._.js +0 -3
  195. package/web/.next/server/chunks/ssr/_1qdpkpsskm5wj._.js +0 -3
  196. package/web/.next/server/chunks/ssr/web_features_1je122n6carea._.js +0 -3
  197. package/web/.next/server/chunks/ssr/web_features_1nrnskep6p8ci._.js +0 -3
  198. package/web/.next/static/chunks/2jr8r6g9kk42a.js +0 -1
  199. package/web/.next/static/chunks/3f2trjz7_wrzh.js +0 -1
  200. /package/web/.next/static/{IMWKx2sJwt7EwwpStr8tb → CMppMkysNciqc8k4TWwia}/_buildManifest.js +0 -0
  201. /package/web/.next/static/{IMWKx2sJwt7EwwpStr8tb → CMppMkysNciqc8k4TWwia}/_clientMiddlewareManifest.js +0 -0
  202. /package/web/.next/static/{IMWKx2sJwt7EwwpStr8tb → CMppMkysNciqc8k4TWwia}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
1
  (()=>{"use strict";module.exports=[13095,(a,b,c)=>{function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},81140,a=>{var b=a.i(18379);a.s(["f",0,function(a){return Object.keys(a).flatMap(a=>a.startsWith(b.u)?[a.slice(b.u.length)]:[])}])},1324,a=>{a.s(["H",0,"fleet","v",0,function(a,b){let c=a.get(b);return"string"==typeof c?c:""},"O",0,function(a){return Object.fromEntries([...a.entries()].flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[]))}])},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"400c56f98daea692f14f4050874c69aaecc487ee9a",null),a.s(["f",0,e])},18379,a=>{var b=a.i(29517);let c=["messages:send","messages:receive"],d="scope:",e="scopesShown";a.s(["_",0,c,"e",0,e,"u",0,d,"t",0,function(a,f){let g,{form:h,scopes:i}=f,j=h.ownerShipId?.trim();if(void 0!==j&&j!==a.ownerShipId){let a=(0,b.f)("ship").safeParse(j);if(!a.success)return{kind:"refused",message:"The owner's ship id is not a ship id (shp_...)"};g=a.data}let k=void 0===g?{}:{ownerShipId:g},l=a.scopes;if("true"!==h[e]||null===l)return{kind:"changes",...k,grant:[],revoke:[]};let m=i.filter(a=>!c.includes(a)),n=a=>void 0!==h[`${d}${a}`];return{kind:"changes",...k,grant:m.filter(a=>n(a)&&!l.includes(a)),revoke:m.filter(a=>!n(a)&&l.includes(a))}}])}]})();
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},81140,a=>{var b=a.i(18379);a.s(["f",0,function(a){return Object.keys(a).flatMap(a=>a.startsWith(b.u)?[a.slice(b.u.length)]:[])}])},1324,a=>{a.s(["H",0,"fleet","v",0,function(a,b){let c=a.get(b);return"string"==typeof c?c:""},"O",0,function(a){return Object.fromEntries([...a.entries()].flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[]))}])},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"4050b261d17e2b265fd019f61804f3eae3b8901966",null),a.s(["f",0,e])},18379,a=>{var b=a.i(29517);let c=["messages:send","messages:receive"],d="scope:",e="scopesShown";a.s(["_",0,c,"e",0,e,"u",0,d,"t",0,function(a,f){let g,{form:h,scopes:i}=f,j=h.ownerShipId?.trim();if(void 0!==j&&j!==a.ownerShipId){let a=(0,b.f)("ship").safeParse(j);if(!a.success)return{kind:"refused",message:"The owner's ship id is not a ship id (shp_...)"};g=a.data}let k=void 0===g?{}:{ownerShipId:g},l=a.scopes;if("true"!==h[e]||null===l)return{kind:"changes",...k,grant:[],revoke:[]};let m=i.filter(a=>!c.includes(a)),n=a=>void 0!==h[`${d}${a}`];return{kind:"changes",...k,grant:m.filter(a=>n(a)&&!l.includes(a)),revoke:m.filter(a=>!n(a)&&l.includes(a))}}])}]})();
3
3
 
4
4
  //# sourceMappingURL=_1_wav28san6dm._.js.map
@@ -1,4 +1,4 @@
1
1
  (()=>{"use strict";module.exports=[13095,(a,b,c)=>{function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},1324,a=>{a.s(["H",0,"fleet","v",0,function(a,b){let c=a.get(b);return"string"==typeof c?c:""},"O",0,function(a){return Object.fromEntries([...a.entries()].flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[]))}])},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"400c56f98daea692f14f4050874c69aaecc487ee9a",null),a.s(["f",0,e])},72913,a=>{let b="/outside-parties",c=`${b}/add`,d=`${b}/add-a2a-client`,e=`${b}/add-a2a-agent`;a.s(["u",0,e,"Z",0,d,"y",0,c,"$",0,b,"N",0,function(a,c){return`${b}/${encodeURIComponent(a)}${void 0===c?"":`/${c}`}`}])},18379,a=>{var b=a.i(29517);let c=["messages:send","messages:receive"],d="scope:",e="scopesShown";a.s(["_",0,c,"e",0,e,"u",0,d,"t",0,function(a,f){let g,{form:h,scopes:i}=f,j=h.ownerShipId?.trim();if(void 0!==j&&j!==a.ownerShipId){let a=(0,b.f)("ship").safeParse(j);if(!a.success)return{kind:"refused",message:"The owner's ship id is not a ship id (shp_...)"};g=a.data}let k=void 0===g?{}:{ownerShipId:g},l=a.scopes;if("true"!==h[e]||null===l)return{kind:"changes",...k,grant:[],revoke:[]};let m=i.filter(a=>!c.includes(a)),n=a=>void 0!==h[`${d}${a}`];return{kind:"changes",...k,grant:m.filter(a=>n(a)&&!l.includes(a)),revoke:m.filter(a=>!n(a)&&l.includes(a))}}])}]})();
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},1324,a=>{a.s(["H",0,"fleet","v",0,function(a,b){let c=a.get(b);return"string"==typeof c?c:""},"O",0,function(a){return Object.fromEntries([...a.entries()].flatMap(([a,b])=>"string"==typeof b?[[a,b]]:[]))}])},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"4050b261d17e2b265fd019f61804f3eae3b8901966",null),a.s(["f",0,e])},72913,a=>{let b="/outside-parties",c=`${b}/add`,d=`${b}/add-a2a-client`,e=`${b}/add-a2a-agent`;a.s(["u",0,e,"Z",0,d,"y",0,c,"$",0,b,"N",0,function(a,c){return`${b}/${encodeURIComponent(a)}${void 0===c?"":`/${c}`}`}])},18379,a=>{var b=a.i(29517);let c=["messages:send","messages:receive"],d="scope:",e="scopesShown";a.s(["_",0,c,"e",0,e,"u",0,d,"t",0,function(a,f){let g,{form:h,scopes:i}=f,j=h.ownerShipId?.trim();if(void 0!==j&&j!==a.ownerShipId){let a=(0,b.f)("ship").safeParse(j);if(!a.success)return{kind:"refused",message:"The owner's ship id is not a ship id (shp_...)"};g=a.data}let k=void 0===g?{}:{ownerShipId:g},l=a.scopes;if("true"!==h[e]||null===l)return{kind:"changes",...k,grant:[],revoke:[]};let m=i.filter(a=>!c.includes(a)),n=a=>void 0!==h[`${d}${a}`];return{kind:"changes",...k,grant:m.filter(a=>n(a)&&!l.includes(a)),revoke:m.filter(a=>!n(a)&&l.includes(a))}}])}]})();
3
3
 
4
4
  //# sourceMappingURL=_1e2o809f0ekry._.js.map
@@ -1,4 +1,4 @@
1
1
  (()=>{"use strict";module.exports=[13095,(a,b,c)=>{function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},73290,a=>{var b=a.i(70043);a.S([b,"400c56f98daea692f14f4050874c69aaecc487ee9a,f"],73290)},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"400c56f98daea692f14f4050874c69aaecc487ee9a",null),a.s(["f",0,e])}]})();
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},73290,a=>{var b=a.i(70043);a.S([b,"4050b261d17e2b265fd019f61804f3eae3b8901966,f"],73290)},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"4050b261d17e2b265fd019f61804f3eae3b8901966",null),a.s(["f",0,e])}]})();
3
3
 
4
4
  //# sourceMappingURL=_1pjtire7rqla0._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '400c56f98daea692f14f4050874c69aaecc487ee9a'} from 'ACTIONS_MODULE0'\n","'use server';\n\n/** The header's theme choice, kept for this browser for a year. */\nimport { cookies } from 'next/headers';\n\nimport { isTheme, THEME_COOKIE } from './theme';\n\nconst YEAR_SECONDS = 365 * 24 * 60 * 60;\n\nexport async function setTheme(theme: unknown): Promise<void> {\n if (!isTheme(theme)) {\n return;\n }\n (await cookies()).set(THEME_COOKIE, theme, { path: '/', sameSite: 'lax', maxAge: YEAR_SECONDS });\n}\n"],"names":["ensureServerEntryExports","actions","i","length","action","Error","registerServerReference","YEAR_SECONDS","setTheme","theme","set","path","sameSite","maxAge"],"mappings":"mDAGO,SAASA,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAUC,AAAJ,MACJ,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,CAG1J,CACF,0EATgBJ,2BAAAA,qCAAAA,sBCHoC,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CM,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,cCDxC,IAAA,EAAA,EAAA,CAAA,CAAA,iGCGA,EAAA,EAAA,CAAA,CAAA,MAEA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeE,EAASC,CAAc,EACtC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACA,IAGb,CAAC,GAHoB,GAGd,CAAA,EAAA,EAAA,OAAA,AAAO,GAAA,CAAE,CAAEC,GAAG,CAAC,EAAA,CAAY,CAAED,EAAO,CAAEE,KAAM,IAAKC,SAAU,MAAOC,OANtD,CAM8DN,KANxD,CAMqE,EAChG,EAPgC,KAAK,mCAEfC,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA","ignoreList":[0,1]}
1
+ {"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '4050b261d17e2b265fd019f61804f3eae3b8901966'} from 'ACTIONS_MODULE0'\n","'use server';\n\n/** The header's theme choice, kept for this browser for a year. */\nimport { cookies } from 'next/headers';\n\nimport { isTheme, THEME_COOKIE } from './theme';\n\nconst YEAR_SECONDS = 365 * 24 * 60 * 60;\n\nexport async function setTheme(theme: unknown): Promise<void> {\n if (!isTheme(theme)) {\n return;\n }\n (await cookies()).set(THEME_COOKIE, theme, { path: '/', sameSite: 'lax', maxAge: YEAR_SECONDS });\n}\n"],"names":["ensureServerEntryExports","actions","i","length","action","Error","registerServerReference","YEAR_SECONDS","setTheme","theme","set","path","sameSite","maxAge"],"mappings":"mDAGO,SAASA,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAUC,AAAJ,MACJ,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,CAG1J,CACF,0EATgBJ,2BAAAA,qCAAAA,sBCHoC,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CM,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,cCDxC,IAAA,EAAA,EAAA,CAAA,CAAA,iGCGA,EAAA,EAAA,CAAA,CAAA,MAEA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeE,EAASC,CAAc,EACtC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACA,IAGb,CAAC,GAHoB,GAGd,CAAA,EAAA,EAAA,OAAA,AAAO,GAAA,CAAE,CAAEC,GAAG,CAAC,EAAA,CAAY,CAAED,EAAO,CAAEE,KAAM,IAAKC,SAAU,MAAOC,OANtD,CAM8DN,KANxD,CAMqE,EAChG,EAPgC,KAAK,mCAEfC,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA","ignoreList":[0,1]}
@@ -1,4 +1,4 @@
1
1
  (()=>{"use strict";module.exports=[13095,(a,b,c)=>{function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},33170,a=>{var b=a.i(70043);a.S([b,"400c56f98daea692f14f4050874c69aaecc487ee9a,f"],33170)},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"400c56f98daea692f14f4050874c69aaecc487ee9a",null),a.s(["f",0,e])}]})();
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},33170,a=>{var b=a.i(70043);a.S([b,"4050b261d17e2b265fd019f61804f3eae3b8901966,f"],33170)},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"4050b261d17e2b265fd019f61804f3eae3b8901966",null),a.s(["f",0,e])}]})();
3
3
 
4
4
  //# sourceMappingURL=_1qbsmlji34yph._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/authorize/pick/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '400c56f98daea692f14f4050874c69aaecc487ee9a'} from 'ACTIONS_MODULE0'\n","'use server';\n\n/** The header's theme choice, kept for this browser for a year. */\nimport { cookies } from 'next/headers';\n\nimport { isTheme, THEME_COOKIE } from './theme';\n\nconst YEAR_SECONDS = 365 * 24 * 60 * 60;\n\nexport async function setTheme(theme: unknown): Promise<void> {\n if (!isTheme(theme)) {\n return;\n }\n (await cookies()).set(THEME_COOKIE, theme, { path: '/', sameSite: 'lax', maxAge: YEAR_SECONDS });\n}\n"],"names":["ensureServerEntryExports","actions","i","length","action","Error","registerServerReference","YEAR_SECONDS","setTheme","theme","set","path","sameSite","maxAge"],"mappings":"mDAGO,SAASA,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAUC,AAAJ,MACJ,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,CAG1J,CACF,0EATgBJ,2BAAAA,qCAAAA,sBCHoC,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CM,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,cCDxC,IAAA,EAAA,EAAA,CAAA,CAAA,iGCGA,EAAA,EAAA,CAAA,CAAA,MAEA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeE,EAASC,CAAc,EACtC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACA,IAGb,CAAC,GAHoB,GAGd,CAAA,EAAA,EAAA,OAAA,AAAO,GAAA,CAAE,CAAEC,GAAG,CAAC,EAAA,CAAY,CAAED,EAAO,CAAEE,KAAM,IAAKC,SAAU,MAAOC,OANtD,CAM8DN,KANxD,CAMqE,EAChG,EAPgC,KAAK,mCAEfC,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA","ignoreList":[0,1]}
1
+ {"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/authorize/pick/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '4050b261d17e2b265fd019f61804f3eae3b8901966'} from 'ACTIONS_MODULE0'\n","'use server';\n\n/** The header's theme choice, kept for this browser for a year. */\nimport { cookies } from 'next/headers';\n\nimport { isTheme, THEME_COOKIE } from './theme';\n\nconst YEAR_SECONDS = 365 * 24 * 60 * 60;\n\nexport async function setTheme(theme: unknown): Promise<void> {\n if (!isTheme(theme)) {\n return;\n }\n (await cookies()).set(THEME_COOKIE, theme, { path: '/', sameSite: 'lax', maxAge: YEAR_SECONDS });\n}\n"],"names":["ensureServerEntryExports","actions","i","length","action","Error","registerServerReference","YEAR_SECONDS","setTheme","theme","set","path","sameSite","maxAge"],"mappings":"mDAGO,SAASA,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAUC,AAAJ,MACJ,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,CAG1J,CACF,0EATgBJ,2BAAAA,qCAAAA,sBCHoC,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CM,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,cCDxC,IAAA,EAAA,EAAA,CAAA,CAAA,iGCGA,EAAA,EAAA,CAAA,CAAA,MAEA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeE,EAASC,CAAc,EACtC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACA,IAGb,CAAC,GAHoB,GAGd,CAAA,EAAA,EAAA,OAAA,AAAO,GAAA,CAAE,CAAEC,GAAG,CAAC,EAAA,CAAY,CAAED,EAAO,CAAEE,KAAM,IAAKC,SAAU,MAAOC,OANtD,CAM8DN,KANxD,CAMqE,EAChG,EAPgC,KAAK,mCAEfC,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA","ignoreList":[0,1]}
@@ -1,3 +1,3 @@
1
- (()=>{"use strict";module.exports=[50088,a=>{var b=a.i(70043),c=a.i(37936),d=a.i(29517);a.i(70396);var e=a.i(73727),f=a.i(55476),g=a.i(66283),h=a.i(81140),i=a.i(1324),j=a.i(29493),k=a.i(72913),l=a.i(13095);let m=new Set(["token","clientSecret"]);async function n(a,b){let c,l=(0,i.v)(b,i.H),n=Object.fromEntries(Object.entries((0,i.O)(b)).filter(([a])=>!m.has(a))),o=(0,d.f)("ship").safeParse((0,i.v)(b,"ownerShipId"));if(!o.success)return{kind:"refused",message:"Pick its owner",fields:n};let p=await (0,g.z)(l);try{c=(await p.parties.addA2aAgent.mutate({requestId:(0,i.v)(b,"requestId"),name:(0,i.v)(b,"name"),cardUrl:(0,i.v)(b,"cardUrl"),credential:(0,j.y)({credentialKind:(0,i.v)(b,"credentialKind"),token:(0,i.v)(b,"token"),clientId:(0,i.v)(b,"clientId"),clientSecret:(0,i.v)(b,"clientSecret"),issuer:(0,i.v)(b,"issuer"),scope:(0,i.v)(b,"scope")}),concurrencyLimit:Number((0,i.v)(b,"concurrencyLimit")),ownerShipId:o.data,scopes:(0,h.f)((0,i.O)(b))})).name}catch(a){return{kind:"refused",message:(0,g.s)(a),fields:n}}(0,e.redirect)((0,f.i)((0,k.N)(c),l))}(0,l.ensureServerEntryExports)([n]),(0,c.registerServerReference)(n,"6076aa2e7bb55e2ef41915944adf76318c50c9d874",null),a.s(["400c56f98daea692f14f4050874c69aaecc487ee9a",()=>b.f,"6076aa2e7bb55e2ef41915944adf76318c50c9d874",0,n],50088)},81140,a=>{var b=a.i(18379);a.s(["f",0,function(a){return Object.keys(a).flatMap(a=>a.startsWith(b.u)?[a.slice(b.u.length)]:[])}])},29493,a=>{let b=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}],c={kind:"personSignIn",label:"Each person signs in"},d=[...b,c];function e(a){var c;let d=(c=a.credentialKind,b.find(({kind:a})=>a===c)?.kind??"bearer");switch(d){case"none":return{kind:d};case"bearer":return{kind:d,token:a.token};case"clientCredentials":return{kind:d,clientId:a.clientId,clientSecret:a.clientSecret,issuer:a.issuer,...""===a.scope?{}:{scope:a.scope}}}}a.s(["a",0,d,"x",0,b,"m",0,c,"G",0,function(a){var b;return(b=a.credentialKind,(d.find(({kind:a})=>a===b)?.kind??"bearer")===c.kind)?{kind:c.kind}:e(a)},"y",0,e])}]})();
1
+ (()=>{"use strict";module.exports=[50088,a=>{var b=a.i(70043),c=a.i(37936),d=a.i(29517);a.i(70396);var e=a.i(73727),f=a.i(55476),g=a.i(66283),h=a.i(81140),i=a.i(1324),j=a.i(29493),k=a.i(72913),l=a.i(13095);let m=new Set(["token","clientSecret"]);async function n(a,b){let c,l=(0,i.v)(b,i.H),n=Object.fromEntries(Object.entries((0,i.O)(b)).filter(([a])=>!m.has(a))),o=(0,d.f)("ship").safeParse((0,i.v)(b,"ownerShipId"));if(!o.success)return{kind:"refused",message:"Pick its owner",fields:n};let p=await (0,g.z)(l);try{c=(await p.parties.addA2aAgent.mutate({requestId:(0,i.v)(b,"requestId"),name:(0,i.v)(b,"name"),cardUrl:(0,i.v)(b,"cardUrl"),credential:(0,j.y)({credentialKind:(0,i.v)(b,"credentialKind"),token:(0,i.v)(b,"token"),clientId:(0,i.v)(b,"clientId"),clientSecret:(0,i.v)(b,"clientSecret"),issuer:(0,i.v)(b,"issuer"),scope:(0,i.v)(b,"scope")}),concurrencyLimit:Number((0,i.v)(b,"concurrencyLimit")),ownerShipId:o.data,scopes:(0,h.f)((0,i.O)(b))})).name}catch(a){return{kind:"refused",message:(0,g.s)(a),fields:n}}(0,e.redirect)((0,f.i)((0,k.N)(c),l))}(0,l.ensureServerEntryExports)([n]),(0,c.registerServerReference)(n,"608ddc2429cd652b9135768f59e77d96531624d7b3",null),a.s(["4050b261d17e2b265fd019f61804f3eae3b8901966",()=>b.f,"608ddc2429cd652b9135768f59e77d96531624d7b3",0,n],50088)},81140,a=>{var b=a.i(18379);a.s(["f",0,function(a){return Object.keys(a).flatMap(a=>a.startsWith(b.u)?[a.slice(b.u.length)]:[])}])},29493,a=>{let b=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}],c={kind:"personSignIn",label:"Each person signs in"},d=[...b,c];function e(a){var c;let d=(c=a.credentialKind,b.find(({kind:a})=>a===c)?.kind??"bearer");switch(d){case"none":return{kind:d};case"bearer":return{kind:d,token:a.token};case"clientCredentials":return{kind:d,clientId:a.clientId,clientSecret:a.clientSecret,issuer:a.issuer,...""===a.scope?{}:{scope:a.scope}}}}a.s(["a",0,d,"x",0,b,"m",0,c,"G",0,function(a){var b;return(b=a.credentialKind,(d.find(({kind:a})=>a===b)?.kind??"bearer")===c.kind)?{kind:c.kind}:e(a)},"y",0,e])}]})();
2
2
 
3
3
  //# sourceMappingURL=web_0wys4l6za8umr._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/outside-parties/add-a2a-agent/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/add-a2a-agent/actions.ts","../../../../../web/features/add-a2a-client/ticked-scopes.ts","../../../../../web/features/forms/server-credential.ts"],"sourcesContent":["export {setTheme as '400c56f98daea692f14f4050874c69aaecc487ee9a'} from 'ACTIONS_MODULE0'\nexport {addA2aAgent as '6076aa2e7bb55e2ef41915944adf76318c50c9d874'} from 'ACTIONS_MODULE1'\n","'use server';\n\n/**\n * Adding an outside A2A agent by its card address (slice 5), as the account\n * signed in: the API checks it holds gateway:approve and grants only scopes\n * it holds, and the gateway reads the card before it commissions anything.\n * Added, the page goes to the agent's own page.\n */\nimport { idSchema } from '@aeolus-fleet/common';\nimport { redirect } from 'next/navigation';\n\nimport { inFleet } from '../../lib/gateway-api/page-account';\nimport { refusalMessageOf, requestApi } from '../../lib/gateway-api/page-api';\nimport { tickedScopes } from '../add-a2a-client/ticked-scopes';\nimport { FLEET_FIELD, fieldOf, fieldsOf } from '../forms/form-state';\nimport { serverCredentialOf } from '../forms/server-credential';\nimport { partyPath } from '../outside-parties/paths';\n\n/** The fields that never travel back to the browser: the credential's secrets. */\nconst SECRET_FIELDS: ReadonlySet<string> = new Set(['token', 'clientSecret']);\n\n/** Where adding stands: not sent, or refused with why and what the browser sent, its secrets aside. */\nexport type AddA2aAgentState = { kind: 'idle' } | { kind: 'refused'; message: string; fields: Record<string, string> };\n\nexport async function addA2aAgent(_previous: AddA2aAgentState, form: FormData): Promise<AddA2aAgentState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const fields = Object.fromEntries(Object.entries(fieldsOf(form)).filter(([field]) => !SECRET_FIELDS.has(field)));\n const ownerShipId = idSchema('ship').safeParse(fieldOf(form, 'ownerShipId'));\n if (!ownerShipId.success) {\n return { kind: 'refused', message: 'Pick its owner', fields };\n }\n const api = await requestApi(fleetId);\n let name: string;\n try {\n const added = await api.parties.addA2aAgent.mutate({\n requestId: fieldOf(form, 'requestId'),\n name: fieldOf(form, 'name'),\n cardUrl: fieldOf(form, 'cardUrl'),\n credential: serverCredentialOf({\n credentialKind: fieldOf(form, 'credentialKind'),\n token: fieldOf(form, 'token'),\n clientId: fieldOf(form, 'clientId'),\n clientSecret: fieldOf(form, 'clientSecret'),\n issuer: fieldOf(form, 'issuer'),\n scope: fieldOf(form, 'scope'),\n }),\n concurrencyLimit: Number(fieldOf(form, 'concurrencyLimit')),\n ownerShipId: ownerShipId.data,\n scopes: tickedScopes(fieldsOf(form)),\n });\n name = added.name;\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error), fields };\n }\n redirect(inFleet(partyPath(name), fleetId));\n}\n","import { SCOPE_FIELD_PREFIX } from '../outside-party/scope-changes';\n\n/** The scopes a form ticks, one `scope:<scope>` field each. */\nexport function tickedScopes(fields: Readonly<Record<string, string>>): string[] {\n return Object.keys(fields).flatMap((field) => (field.startsWith(SCOPE_FIELD_PREFIX) ? [field.slice(SCOPE_FIELD_PREFIX.length)] : []));\n}\n","/**\n * An outside MCP server's credential, as the add, Parties and decision forms\n * take it: none for a server reached only on a private network, a static\n * bearer, or OAuth client credentials. A server being added may instead\n * have each person sign in to it for themselves (decision 0067).\n */\n\n/** The credential kinds a form offers, with the words it shows. */\nexport const CREDENTIAL_KINDS = [\n { kind: 'none', label: 'No credential' },\n { kind: 'bearer', label: 'Bearer token' },\n { kind: 'clientCredentials', label: 'OAuth client credentials' },\n] as const;\n\nexport type CredentialKind = (typeof CREDENTIAL_KINDS)[number]['kind'];\n\nexport type ServerCredential =\n | { kind: 'none' }\n | { kind: 'bearer'; token: string }\n | { kind: 'clientCredentials'; clientId: string; clientSecret: string; issuer: string; scope?: string };\n\n/** The kind only adding a server offers: the gateway registers the party's client, and each person signs in (decision 0067). */\nexport const SIGN_IN_CREDENTIAL = { kind: 'personSignIn', label: 'Each person signs in' } as const;\n\n/** The credential kinds the add page offers, with the words it shows. */\nexport const ADDED_CREDENTIAL_KINDS = [...CREDENTIAL_KINDS, SIGN_IN_CREDENTIAL] as const;\n\nexport type AddedCredentialKind = (typeof ADDED_CREDENTIAL_KINDS)[number]['kind'];\n\nexport type AddedServerCredential = ServerCredential | { kind: typeof SIGN_IN_CREDENTIAL.kind };\n\n/** The kind a form sent, a bearer when it sent none it knows. */\nexport function credentialKindOf(sent: string): CredentialKind {\n return CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the fields name: only the fields of its kind are read. */\nexport function serverCredentialOf(fields: { credentialKind: string; token: string; clientId: string; clientSecret: string; issuer: string; scope: string }): ServerCredential {\n const kind = credentialKindOf(fields.credentialKind);\n switch (kind) {\n case 'none':\n return { kind };\n case 'bearer':\n return { kind, token: fields.token };\n case 'clientCredentials':\n return { kind, clientId: fields.clientId, clientSecret: fields.clientSecret, issuer: fields.issuer, ...(fields.scope === '' ? {} : { scope: fields.scope }) };\n }\n}\n\n/** The kind the add page sent, a bearer when it sent none it knows. */\nexport function addedCredentialKindOf(sent: string): AddedCredentialKind {\n return ADDED_CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the add page's fields name: each person signing in takes no field. */\nexport function addedServerCredentialOf(fields: Parameters<typeof serverCredentialOf>[0]): AddedServerCredential {\n return addedCredentialKindOf(fields.credentialKind) === SIGN_IN_CREDENTIAL.kind ? { kind: SIGN_IN_CREDENTIAL.kind } : serverCredentialOf(fields);\n}\n"],"names":["SECRET_FIELDS","Set","addA2aAgent","_previous","form","fleetId","fields","Object","fromEntries","entries","filter","field","has","ownerShipId","safeParse","success","kind","message","api","name","added","parties","mutate","requestId","cardUrl","credential","credentialKind","token","clientId","clientSecret","issuer","scope","concurrencyLimit","Number","data","scopes","error","tickedScopes","keys","flatMap","startsWith","slice","length","CREDENTIAL_KINDS","label","SIGN_IN_CREDENTIAL","ADDED_CREDENTIAL_KINDS","credentialKindOf","sent","find","serverCredentialOf","addedCredentialKindOf","addedServerCredentialOf"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,oBCQA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA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J,IAAMU,GANyBgC,EAMD1C,EANa,AAM9ByC,AAAwBrB,cAAc,CAL5CiB,EAAiBM,IAAI,CAAC,CAAC,MAAEjC,CAAI,CAAE,GAAKA,IAASgC,IAAOhC,MAAQ,UAMnE,OAAQA,GACN,IAAK,OACH,MAAO,MAAEA,CAAK,CAChB,KAAK,SACH,MAAO,MAAEA,EAAMW,MAAOrB,EAAOqB,KAAK,AAAC,CACrC,KAAK,oBACH,MAAO,MAAEX,EAAMY,SAAUtB,EAAOsB,QAAQ,CAAEC,aAAcvB,EAAOuB,YAAY,CAAEC,OAAQxB,EAAOwB,MAAM,CAAE,GAAqB,KAAjBxB,EAAOyB,KAAK,CAAU,CAAC,EAAI,CAAEA,MAAOzB,EAAOyB,KAAK,AAAC,CAAC,AAAE,CAChK,CACF,oCAQO,SAASqB,AAAwB9C,CAAgD,QACtF,OANoC0C,AAM7BG,EAAsB7C,EANmB,AAMZoB,cAAc,EAL3CoB,EAAuBG,IAAI,CAAC,CAAC,MAAEjC,CAAI,CAAE,GAAKA,IAASgC,IAAOhC,MAAQ,QAAA,IAKjB6B,EAAmB7B,IAAAA,AAAI,EAAG,CAAEA,KAAM6B,EAAmB7B,IAAI,AAAC,EAAIkC,EAAmB5C,EAC3I"}
1
+ {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/outside-parties/add-a2a-agent/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/add-a2a-agent/actions.ts","../../../../../web/features/add-a2a-client/ticked-scopes.ts","../../../../../web/features/forms/server-credential.ts"],"sourcesContent":["export {setTheme as '4050b261d17e2b265fd019f61804f3eae3b8901966'} from 'ACTIONS_MODULE0'\nexport {addA2aAgent as '608ddc2429cd652b9135768f59e77d96531624d7b3'} from 'ACTIONS_MODULE1'\n","'use server';\n\n/**\n * Adding an outside A2A agent by its card address (slice 5), as the account\n * signed in: the API checks it holds gateway:approve and grants only scopes\n * it holds, and the gateway reads the card before it commissions anything.\n * Added, the page goes to the agent's own page.\n */\nimport { idSchema } from '@aeolus-fleet/common';\nimport { redirect } from 'next/navigation';\n\nimport { inFleet } from '../../lib/gateway-api/page-account';\nimport { refusalMessageOf, requestApi } from '../../lib/gateway-api/page-api';\nimport { tickedScopes } from '../add-a2a-client/ticked-scopes';\nimport { FLEET_FIELD, fieldOf, fieldsOf } from '../forms/form-state';\nimport { serverCredentialOf } from '../forms/server-credential';\nimport { partyPath } from '../outside-parties/paths';\n\n/** The fields that never travel back to the browser: the credential's secrets. */\nconst SECRET_FIELDS: ReadonlySet<string> = new Set(['token', 'clientSecret']);\n\n/** Where adding stands: not sent, or refused with why and what the browser sent, its secrets aside. */\nexport type AddA2aAgentState = { kind: 'idle' } | { kind: 'refused'; message: string; fields: Record<string, string> };\n\nexport async function addA2aAgent(_previous: AddA2aAgentState, form: FormData): Promise<AddA2aAgentState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const fields = Object.fromEntries(Object.entries(fieldsOf(form)).filter(([field]) => !SECRET_FIELDS.has(field)));\n const ownerShipId = idSchema('ship').safeParse(fieldOf(form, 'ownerShipId'));\n if (!ownerShipId.success) {\n return { kind: 'refused', message: 'Pick its owner', fields };\n }\n const api = await requestApi(fleetId);\n let name: string;\n try {\n const added = await api.parties.addA2aAgent.mutate({\n requestId: fieldOf(form, 'requestId'),\n name: fieldOf(form, 'name'),\n cardUrl: fieldOf(form, 'cardUrl'),\n credential: serverCredentialOf({\n credentialKind: fieldOf(form, 'credentialKind'),\n token: fieldOf(form, 'token'),\n clientId: fieldOf(form, 'clientId'),\n clientSecret: fieldOf(form, 'clientSecret'),\n issuer: fieldOf(form, 'issuer'),\n scope: fieldOf(form, 'scope'),\n }),\n concurrencyLimit: Number(fieldOf(form, 'concurrencyLimit')),\n ownerShipId: ownerShipId.data,\n scopes: tickedScopes(fieldsOf(form)),\n });\n name = added.name;\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error), fields };\n }\n redirect(inFleet(partyPath(name), fleetId));\n}\n","import { SCOPE_FIELD_PREFIX } from '../outside-party/scope-changes';\n\n/** The scopes a form ticks, one `scope:<scope>` field each. */\nexport function tickedScopes(fields: Readonly<Record<string, string>>): string[] {\n return Object.keys(fields).flatMap((field) => (field.startsWith(SCOPE_FIELD_PREFIX) ? [field.slice(SCOPE_FIELD_PREFIX.length)] : []));\n}\n","/**\n * An outside MCP server's credential, as the add, Parties and decision forms\n * take it: none for a server reached only on a private network, a static\n * bearer, or OAuth client credentials. A server being added may instead\n * have each person sign in to it for themselves (decision 0067).\n */\n\n/** The credential kinds a form offers, with the words it shows. */\nexport const CREDENTIAL_KINDS = [\n { kind: 'none', label: 'No credential' },\n { kind: 'bearer', label: 'Bearer token' },\n { kind: 'clientCredentials', label: 'OAuth client credentials' },\n] as const;\n\nexport type CredentialKind = (typeof CREDENTIAL_KINDS)[number]['kind'];\n\nexport type ServerCredential =\n | { kind: 'none' }\n | { kind: 'bearer'; token: string }\n | { kind: 'clientCredentials'; clientId: string; clientSecret: string; issuer: string; scope?: string };\n\n/** The kind only adding a server offers: the gateway registers the party's client, and each person signs in (decision 0067). */\nexport const SIGN_IN_CREDENTIAL = { kind: 'personSignIn', label: 'Each person signs in' } as const;\n\n/** The credential kinds the add page offers, with the words it shows. */\nexport const ADDED_CREDENTIAL_KINDS = [...CREDENTIAL_KINDS, SIGN_IN_CREDENTIAL] as const;\n\nexport type AddedCredentialKind = (typeof ADDED_CREDENTIAL_KINDS)[number]['kind'];\n\nexport type AddedServerCredential = ServerCredential | { kind: typeof SIGN_IN_CREDENTIAL.kind };\n\n/** The kind a form sent, a bearer when it sent none it knows. */\nexport function credentialKindOf(sent: string): CredentialKind {\n return CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the fields name: only the fields of its kind are read. */\nexport function serverCredentialOf(fields: { credentialKind: string; token: string; clientId: string; clientSecret: string; issuer: string; scope: string }): ServerCredential {\n const kind = credentialKindOf(fields.credentialKind);\n switch (kind) {\n case 'none':\n return { kind };\n case 'bearer':\n return { kind, token: fields.token };\n case 'clientCredentials':\n return { kind, clientId: fields.clientId, clientSecret: fields.clientSecret, issuer: fields.issuer, ...(fields.scope === '' ? {} : { scope: fields.scope }) };\n }\n}\n\n/** The kind the add page sent, a bearer when it sent none it knows. */\nexport function addedCredentialKindOf(sent: string): AddedCredentialKind {\n return ADDED_CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the add page's fields name: each person signing in takes no field. */\nexport function addedServerCredentialOf(fields: Parameters<typeof serverCredentialOf>[0]): AddedServerCredential {\n return addedCredentialKindOf(fields.credentialKind) === SIGN_IN_CREDENTIAL.kind ? { kind: SIGN_IN_CREDENTIAL.kind } : serverCredentialOf(fields);\n}\n"],"names":["SECRET_FIELDS","Set","addA2aAgent","_previous","form","fleetId","fields","Object","fromEntries","entries","filter","field","has","ownerShipId","safeParse","success","kind","message","api","name","added","parties","mutate","requestId","cardUrl","credential","credentialKind","token","clientId","clientSecret","issuer","scope","concurrencyLimit","Number","data","scopes","error","tickedScopes","keys","flatMap","startsWith","slice","length","CREDENTIAL_KINDS","label","SIGN_IN_CREDENTIAL","ADDED_CREDENTIAL_KINDS","credentialKindOf","sent","find","serverCredentialOf","addedCredentialKindOf","addedServerCredentialOf"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,oBCQA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,oBAGA,IAAMA,EAAqC,IAAIC,IAAI,CAAC,QAAS,eAAe,EAKrE,eAAeC,EAAYC,CAA2B,CAAEC,CAAc,EAC3E,IAOIe,EAPEd,EAAU,CA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B,EAAOqB,KAAK,AAAC,CACrC,KAAK,oBACH,MAAO,MAAEX,EAAMY,SAAUtB,EAAOsB,QAAQ,CAAEC,aAAcvB,EAAOuB,YAAY,CAAEC,OAAQxB,EAAOwB,MAAM,CAAE,GAAqB,KAAjBxB,EAAOyB,KAAK,CAAU,CAAC,EAAI,CAAEA,MAAOzB,EAAOyB,KAAK,AAAC,CAAC,AAAE,CAChK,CACF,oCAQO,SAASqB,AAAwB9C,CAAgD,QACtF,OANoC0C,AAM7BG,EAAsB7C,EANmB,AAMZoB,cAAc,EAL3CoB,EAAuBG,IAAI,CAAC,CAAC,MAAEjC,CAAI,CAAE,GAAKA,IAASgC,IAAOhC,MAAQ,QAAA,IAKjB6B,EAAmB7B,IAAAA,AAAI,EAAG,CAAEA,KAAM6B,EAAmB7B,IAAI,AAAC,EAAIkC,EAAmB5C,EAC3I"}
@@ -1,3 +1,3 @@
1
- module.exports=[45419,a=>{"use strict";var b=a.i(70043),c=a.i(43889);a.S([b,"400c56f98daea692f14f4050874c69aaecc487ee9a,f",0,c,"408a5fadf58977f6b55557119e3557d884605ebbcf,y,409343274cfb1997696f97d13e70128feeaadc81b0,G,40b44086e3707ca8b788d4ad4b3ef6615138ffe27a,K,40edad5bc6caa482ec57bdf504a9545c453e286344,q,6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324,v,60573c940559fe36ec3489b04906d9407ddf5822ef,D"],45419)}];
1
+ module.exports=[45419,a=>{"use strict";var b=a.i(70043),c=a.i(43889);a.S([b,"4050b261d17e2b265fd019f61804f3eae3b8901966,f",0,c,"40312d708ed123f3bff12a0e5d5ab7bdd456131901,q,407bae59090ef46e76fb8d952969288e5bb4583e21,K,407cf7e8bf1a43e93e600808ccd1631dfd13c9b490,G,40c05f98915a7c9661aa8f801d392296ba8350eeba,y,60c205c99f267754b5cb7b09118fdaf91f419555a5,v,60cb932106ab7fdcbd18e33041be499ed83080592f,D"],45419)}];
2
2
 
3
3
  //# sourceMappingURL=web__next-internal_server_app_%28console%29_bridge_basket_page_actions_102xk3g8eko_q.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/bridge/basket/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '400c56f98daea692f14f4050874c69aaecc487ee9a'} from 'ACTIONS_MODULE0'\nexport {removeFromBasket as '60573c940559fe36ec3489b04906d9407ddf5822ef'} from 'ACTIONS_MODULE1'\nexport {sendBasket as '40b44086e3707ca8b788d4ad4b3ef6615138ffe27a'} from 'ACTIONS_MODULE1'\nexport {answerDelivery as '40edad5bc6caa482ec57bdf504a9545c453e286344'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '409343274cfb1997696f97d13e70128feeaadc81b0'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324'} from 'ACTIONS_MODULE1'\nexport {putInBasket as '408a5fadf58977f6b55557119e3557d884605ebbcf'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/bridge/basket/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '4050b261d17e2b265fd019f61804f3eae3b8901966'} from 'ACTIONS_MODULE0'\nexport {removeFromBasket as '60cb932106ab7fdcbd18e33041be499ed83080592f'} from 'ACTIONS_MODULE1'\nexport {sendBasket as '407bae59090ef46e76fb8d952969288e5bb4583e21'} from 'ACTIONS_MODULE1'\nexport {answerDelivery as '40312d708ed123f3bff12a0e5d5ab7bdd456131901'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '407cf7e8bf1a43e93e600808ccd1631dfd13c9b490'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '60c205c99f267754b5cb7b09118fdaf91f419555a5'} from 'ACTIONS_MODULE1'\nexport {putInBasket as '40c05f98915a7c9661aa8f801d392296ba8350eeba'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -1,3 +1,3 @@
1
- module.exports=[65146,a=>{"use strict";var b=a.i(70043),c=a.i(43889);a.S([b,"400c56f98daea692f14f4050874c69aaecc487ee9a,f",0,c,"408a5fadf58977f6b55557119e3557d884605ebbcf,y,409343274cfb1997696f97d13e70128feeaadc81b0,G,40edad5bc6caa482ec57bdf504a9545c453e286344,q,6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324,v,603b4af3b6ef322d88de132c92a8286173f7a791b6,F,60573c940559fe36ec3489b04906d9407ddf5822ef,D"],65146)}];
1
+ module.exports=[65146,a=>{"use strict";var b=a.i(70043),c=a.i(43889);a.S([b,"4050b261d17e2b265fd019f61804f3eae3b8901966,f",0,c,"40312d708ed123f3bff12a0e5d5ab7bdd456131901,q,407cf7e8bf1a43e93e600808ccd1631dfd13c9b490,G,40c05f98915a7c9661aa8f801d392296ba8350eeba,y,601621f5cf585bae9e540db5aa6e2c5d2a6bbcd72c,F,60c205c99f267754b5cb7b09118fdaf91f419555a5,v,60cb932106ab7fdcbd18e33041be499ed83080592f,D"],65146)}];
2
2
 
3
3
  //# sourceMappingURL=web__next-internal_server_app_%28console%29_bridge_done_page_actions_0mm90xd2feta2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/bridge/done/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '400c56f98daea692f14f4050874c69aaecc487ee9a'} from 'ACTIONS_MODULE0'\nexport {readMoreRecord as '603b4af3b6ef322d88de132c92a8286173f7a791b6'} from 'ACTIONS_MODULE1'\nexport {answerDelivery as '40edad5bc6caa482ec57bdf504a9545c453e286344'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '409343274cfb1997696f97d13e70128feeaadc81b0'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324'} from 'ACTIONS_MODULE1'\nexport {putInBasket as '408a5fadf58977f6b55557119e3557d884605ebbcf'} from 'ACTIONS_MODULE1'\nexport {removeFromBasket as '60573c940559fe36ec3489b04906d9407ddf5822ef'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/bridge/done/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '4050b261d17e2b265fd019f61804f3eae3b8901966'} from 'ACTIONS_MODULE0'\nexport {readMoreRecord as '601621f5cf585bae9e540db5aa6e2c5d2a6bbcd72c'} from 'ACTIONS_MODULE1'\nexport {answerDelivery as '40312d708ed123f3bff12a0e5d5ab7bdd456131901'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '407cf7e8bf1a43e93e600808ccd1631dfd13c9b490'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '60c205c99f267754b5cb7b09118fdaf91f419555a5'} from 'ACTIONS_MODULE1'\nexport {putInBasket as '40c05f98915a7c9661aa8f801d392296ba8350eeba'} from 'ACTIONS_MODULE1'\nexport {removeFromBasket as '60cb932106ab7fdcbd18e33041be499ed83080592f'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -1,3 +1,3 @@
1
- module.exports=[91409,a=>{"use strict";var b=a.i(70043),c=a.i(43889);a.S([b,"400c56f98daea692f14f4050874c69aaecc487ee9a,f",0,c,"408a5fadf58977f6b55557119e3557d884605ebbcf,y,409343274cfb1997696f97d13e70128feeaadc81b0,G,40edad5bc6caa482ec57bdf504a9545c453e286344,q,6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324,v,60573c940559fe36ec3489b04906d9407ddf5822ef,D"],91409)}];
1
+ module.exports=[91409,a=>{"use strict";var b=a.i(70043),c=a.i(43889);a.S([b,"4050b261d17e2b265fd019f61804f3eae3b8901966,f",0,c,"40312d708ed123f3bff12a0e5d5ab7bdd456131901,q,407cf7e8bf1a43e93e600808ccd1631dfd13c9b490,G,40c05f98915a7c9661aa8f801d392296ba8350eeba,y,60c205c99f267754b5cb7b09118fdaf91f419555a5,v,60cb932106ab7fdcbd18e33041be499ed83080592f,D"],91409)}];
2
2
 
3
3
  //# sourceMappingURL=web__next-internal_server_app_%28console%29_bridge_page_actions_082880qz6xa5k.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/bridge/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '400c56f98daea692f14f4050874c69aaecc487ee9a'} from 'ACTIONS_MODULE0'\nexport {answerDelivery as '40edad5bc6caa482ec57bdf504a9545c453e286344'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '409343274cfb1997696f97d13e70128feeaadc81b0'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324'} from 'ACTIONS_MODULE1'\nexport {putInBasket as '408a5fadf58977f6b55557119e3557d884605ebbcf'} from 'ACTIONS_MODULE1'\nexport {removeFromBasket as '60573c940559fe36ec3489b04906d9407ddf5822ef'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/bridge/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '4050b261d17e2b265fd019f61804f3eae3b8901966'} from 'ACTIONS_MODULE0'\nexport {answerDelivery as '40312d708ed123f3bff12a0e5d5ab7bdd456131901'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '407cf7e8bf1a43e93e600808ccd1631dfd13c9b490'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '60c205c99f267754b5cb7b09118fdaf91f419555a5'} from 'ACTIONS_MODULE1'\nexport {putInBasket as '40c05f98915a7c9661aa8f801d392296ba8350eeba'} from 'ACTIONS_MODULE1'\nexport {removeFromBasket as '60cb932106ab7fdcbd18e33041be499ed83080592f'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -0,0 +1,3 @@
1
+ (()=>{"use strict";module.exports=[2305,a=>{var b=a.i(5050);let c=(0,b.createServerReference)("60cb932106ab7fdcbd18e33041be499ed83080592f",b.callServer,void 0,b.findSourceMapURL,"removeFromBasket");a.s(["f",0,c])},91777,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(52779),e=a.i(25959),f=a.i(37569),g=a.i(4952),h=a.i(15247),i=a.i(92748),j=a.i(2305),k=a.i(16550),l=a.i(32043),m=a.i(10039);function n({inBasket:a,basketHref:c,isRemoving:d,isWorking:e,onRemove:f}){return(0,b.jsxs)("div",{"data-testid":"bridge-in-basket",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,b.jsxs)("span",{className:"font-medium",children:["In the basket: option ",a.option,", not sent"]}),null===a.note?null:(0,b.jsxs)("span",{className:"text-caption",children:["“",a.note,"”"]}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"Pick another option to change it."}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("a",{"data-testid":"bridge-basket-open",href:c,className:"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent",children:"Open the basket"}),(0,b.jsx)(l.f,{"data-testid":"bridge-basket-remove",isPending:d,pendingLabel:"Removing...",disabled:e,onClick:f,children:"Remove"})]})]})}function o({question:a,chosen:c,isStale:d,onChoose:e}){return(0,b.jsxs)("fieldset",{className:`grid gap-2 ${d?"opacity-60":""}`,disabled:d,children:[(0,b.jsx)("legend",{className:"sr-only",children:"Options"}),a.options.map(f=>(0,b.jsxs)("label",{className:`flex items-start gap-3 rounded-md border p-3 ${f.key===c&&!d?"border-ring bg-accent":"border-border"}`,children:[(0,b.jsx)("input",{type:"radio",name:"option",value:f.key,checked:f.key===c&&!d,onChange:()=>{e(f.key)},className:"mt-1"}),(0,b.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,b.jsxs)("span",{className:"font-medium",children:[f.key,". ",f.label]}),""===f.detail?null:(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:f.detail})]}),f.key===a.pick.option?(0,b.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},f.key))]})}function p({stale:a,from:c,onOpen:d}){let{replacementId:e}=a;return(0,b.jsxs)("div",{"data-testid":"bridge-stale",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,b.jsx)("span",{children:"withdrawn"===a.kind?`Withdrawn by ${c}. Nothing to answer: it is done.`:`Replaced by ${c}. Answer the new question.`}),null===e?null:(0,b.jsx)(l.f,{"data-testid":"bridge-replacement",className:"justify-self-start",isPending:!1,pendingLabel:"Opening...",onClick:()=>{d(e)},children:"Open the new question"})]})}function q({step:a}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"whitespace-pre-wrap",children:a.why}),void 0===a.link?null:(0,b.jsxs)("a",{"data-testid":"bridge-step-link",href:a.link.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent",children:["Open on ",a.link.host]})]})}function r({from:a,note:c,working:d,failure:e,onNoteChange:f,onFinish:g}){let h=void 0!==d;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Note"}),(0,b.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:c,onChange:a=>{f(a.target.value)},placeholder:"Optional, goes with Done or Cannot",className:"rounded-md border border-input bg-background p-2"})]}),void 0===e?null:(0,b.jsx)(m.f,{message:e,isFailure:!0}),(0,b.jsxs)("div",{className:"grid gap-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(l.f,{"data-testid":"bridge-step-done",variant:"primary",isPending:d?.kind==="done",pendingLabel:"Sending...",disabled:h,onClick:()=>{g("done")},children:"Done"}),(0,b.jsx)(l.f,{"data-testid":"bridge-step-cannot",isPending:d?.kind==="cannot",pendingLabel:"Sending...",disabled:h,onClick:()=>{g("cannot")},children:"Cannot"})]}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:[a," is told at once, with your note."]})]})]})}function s({delivery:a,isDoneOnSeeing:d,meetingHref:e,basketHref:f,inBasket:g,note:h,working:i,failure:j,onNoteChange:k,onAnswer:t,onPut:u,onRemove:v,onDone:w,onFinishStep:x,onOpen:y,onBack:z}){let{question:A,step:B,stale:C}=a,[D,E]=(0,c.useState)(g?.option??A?.pick.option),F=void 0!==i;return(0,b.jsxs)("section",{"data-testid":"bridge-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:[a.from," · ",new Date(a.sentAt).toUTCString()]}),(0,b.jsx)("h2",{className:"text-heading font-semibold",children:A?.title??a.title}),void 0===e?null:(0,b.jsx)("a",{"data-testid":"bridge-meeting",href:e,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0!==B?(0,b.jsx)(q,{step:B}):void 0===A?(0,b.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:a.body}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"whitespace-pre-wrap",children:A.context}),(0,b.jsx)(o,{question:A,chosen:D,isStale:null!==C,onChoose:E}),(0,b.jsxs)("p",{className:"text-caption text-muted-foreground",children:[a.from," picks ",A.pick.option,": ",A.pick.why]})]}),null===C?null:(0,b.jsx)(p,{stale:C,from:a.from,onOpen:y}),null===g||null!==C?null:(0,b.jsx)(n,{inBasket:g,basketHref:f,isRemoving:i?.kind==="remove",isWorking:F,onRemove:v}),d?(0,b.jsx)("p",{"data-testid":"bridge-seen-done",className:"text-muted-foreground",children:"Seen now, so done: it asks nothing more."}):null!==C?null:void 0!==B?(0,b.jsx)(r,{from:a.from,note:h,working:i,failure:j,onNoteChange:k,onFinish:x}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:void 0===A?"Your answer":"Note"}),(0,b.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:h,onChange:a=>{k(a.target.value)},placeholder:void 0===A?"":"Optional, goes with the answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===j?null:(0,b.jsx)(m.f,{message:j,isFailure:!0}),void 0===A?(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(l.f,{"data-testid":"bridge-answer",variant:"primary",isPending:i?.kind==="note",pendingLabel:"Sending...",disabled:F,onClick:()=>{t(void 0)},children:"Answer"}),(0,b.jsx)(l.f,{"data-testid":"bridge-done",isPending:i?.kind==="done",pendingLabel:"Marking done...",disabled:F,onClick:w,children:"Done"})]}):void 0===D?null:(0,b.jsxs)("div",{className:"grid gap-1",children:[(0,b.jsxs)(l.f,{"data-testid":"bridge-put-in-basket",variant:"primary",className:"justify-self-start",isPending:i?.kind==="option",pendingLabel:"Putting in the basket...",disabled:F,onClick:()=>{u(D)},children:["Put option ",D," in the basket"]}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:["Nothing is sent yet. ",a.from," receives this answer when you send the basket."]})]})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,b.jsx)("button",{type:"button",onClick:z,disabled:F,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back"})})]})}a.s(["f",0,function({fleetId:a,children:l}){let[n,o]=(0,c.useState)(),[p,q]=(0,c.useState)(""),[r,t]=(0,c.useState)(),[u,v]=(0,c.useState)(),[w,x]=(0,c.useState)(),[y,z]=(0,c.useState)(),[A,B]=(0,c.useState)(),[,C]=(0,c.useTransition)(),D=b=>{t(b.deliveryId),x(void 0),B(void 0),C(async()=>{let c=await (0,h.f)(a,b.deliveryId);if(t(void 0),c.isOk){let a=b.inBasket??null;o({delivery:c.value,isDoneOnSeeing:"stay-aware"===b.job,inBasket:a}),q(a?.note??""),z(void 0)}else x({deliveryId:b.deliveryId,message:c.message})})},E=({control:a,action:b,said:c})=>{v(a),z(void 0),C(async()=>{let a=await b();v(void 0),a.isOk?(o(void 0),B(c)):z(a.message)})};if(void 0!==n){let{delivery:c,inBasket:h}=n,l=c.question?.id;return(0,b.jsx)(s,{delivery:c,isDoneOnSeeing:n.isDoneOnSeeing,meetingHref:void 0===c.meetingId?void 0:(0,d.f)({fleetId:a,meetingId:c.meetingId}),basketHref:(0,e.f)(k.H,a),inBasket:h,note:p,working:u,failure:y,onNoteChange:q,onAnswer:b=>{E({control:void 0===b?{kind:"note"}:{kind:"option",option:b},action:()=>(0,f.f)({fleet:a,deliveryId:c.deliveryId,input:{questionId:c.question?.id,option:b,note:p}}),said:`Your answer went to ${c.from}.`})},onPut:b=>{E({control:{kind:"option",option:b},action:()=>(0,i.f)({fleet:a,deliveryId:c.deliveryId,option:b,note:p}),said:`Option ${String(b)} is in the basket, not sent: ${c.from} receives it when you send the basket.`})},onRemove:()=>{void 0!==l&&E({control:{kind:"remove"},action:()=>(0,j.f)(a,l),said:`Your answer to “${c.title}” is out of the basket; the question still waits on you.`})},onDone:()=>{E({control:{kind:"done"},action:()=>(0,g.f)({fleet:a,deliveryId:c.deliveryId}),said:`Done with “${c.title}”.`})},onFinishStep:b=>{E({control:{kind:b},action:()=>(0,g.f)({fleet:a,deliveryId:c.deliveryId,step:{outcome:b,note:p}}),said:"done"===b?`Done: ${c.from} is told “${c.title}” is done.`:`Cannot: ${c.from} is told you cannot do “${c.title}”.`})},onOpen:a=>{D({deliveryId:a,job:"decide"})},onBack:()=>{o(void 0)}},c.deliveryId)}return(0,b.jsxs)("div",{className:"grid gap-4",children:[void 0===A?null:(0,b.jsx)(m.f,{message:A,isFailure:!1}),l({open:D,openingId:r,failure:w})]})}],91777)},21938,a=>{var b=a.i(87924),c=a.i(50944),d=a.i(72131);a.s(["RecordUnreadable",0,function({message:a}){let e=(0,c.useRouter)();return(0,d.useEffect)(()=>{let a=setInterval(()=>{e.refresh()},1e4);return()=>{clearInterval(a)}},[e]),(0,b.jsxs)("section",{role:"alert","data-testid":"bridge-unreadable",className:"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:[(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"font-semibold",children:"The record cannot be read now"}),(0,b.jsxs)("span",{className:"text-caption",children:[a," Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s."]})]}),(0,b.jsx)("button",{type:"button","data-testid":"bridge-try-now",onClick:()=>{e.refresh()},className:"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent",children:"Try now"})]})}])},52779,37569,4952,15247,92748,a=>{a.s(["f",0,function(a){let b=new URLSearchParams({fleet:a.fleetId,...void 0===a.cursor?{}:{cursor:a.cursor}});return`/meetings/${encodeURIComponent(a.meetingId)}?${b.toString()}`}],52779);var b=a.i(5050);let c=(0,b.createServerReference)("40312d708ed123f3bff12a0e5d5ab7bdd456131901",b.callServer,void 0,b.findSourceMapURL,"answerDelivery");a.s(["f",0,c],37569);let d=(0,b.createServerReference)("407cf7e8bf1a43e93e600808ccd1631dfd13c9b490",b.callServer,void 0,b.findSourceMapURL,"doneDelivery");a.s(["f",0,d],4952);let e=(0,b.createServerReference)("60c205c99f267754b5cb7b09118fdaf91f419555a5",b.callServer,void 0,b.findSourceMapURL,"openDelivery");a.s(["f",0,e],15247);let f=(0,b.createServerReference)("40c05f98915a7c9661aa8f801d392296ba8350eeba",b.callServer,void 0,b.findSourceMapURL,"putInBasket");a.s(["f",0,f],92748)}]})();
2
+
3
+ //# sourceMappingURL=web_features_16cy3vmcijydk._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/bridge/hooks/data%3A295c5e%20%3Ctext/javascript%3E","../../../../../web/features/bridge/state/item-focus.tsx","../../../../../web/features/bridge/ui/delivery-card.tsx","../../../../../web/features/bridge/state/record-unreadable.tsx","../../../../../web/features/meeting/paths.ts","../../../../../web/features/bridge/hooks/data%3Ae3e416%20%3Ctext/javascript%3E","../../../../../web/features/bridge/hooks/data%3A65d48d%20%3Ctext/javascript%3E","../../../../../web/features/bridge/hooks/data%3A78203e%20%3Ctext/javascript%3E","../../../../../web/features/bridge/hooks/data%3Aeb01f1%20%3Ctext/javascript%3E"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"60573c940559fe36ec3489b04906d9407ddf5822ef\":{\"name\":\"removeFromBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_4=/*#__PURE__*/createServerReference(\"60573c940559fe36ec3489b04906d9407ddf5822ef\",callServer,void 0,findSourceMapURL,\"removeFromBasket\");export{$$RSC_SERVER_ACTION_4 as removeFromBasket};","'use client';\n\nimport { useState, useTransition, type ReactNode } from 'react';\n\nimport { meetingPathOf } from '../../meeting/paths';\nimport { inFleet } from '../../../lib/gateway-api/page-account';\nimport { answerDelivery, doneDelivery, openDelivery, putInBasket, removeFromBasket, type ActionOutcome } from '../hooks/bridge-actions';\nimport { BRIDGE_BASKET_PATH } from '../paths';\nimport type { FocusedDelivery } from '../services/deliveries';\nimport type { HomeItem } from '../services/items';\nimport { DeliveryCard, type DeliveryControl, type InBasket } from '../ui/delivery-card';\nimport { Notice } from '../ui/notice';\n\n/** An item to open: by its delivery, with its job, and the answer to it in the basket, if any. */\nexport interface ToOpen {\n readonly deliveryId: string;\n readonly job: HomeItem['job'];\n readonly inBasket?: InBasket | null;\n}\n\n/** What a list of items gets to open one: the press, the one opening, and why one could not be opened. */\nexport interface ItemOpening {\n readonly open: (item: ToOpen) => void;\n readonly openingId: string | undefined;\n readonly failure: { deliveryId: string; message: string } | undefined;\n}\n\n/**\n * A list of Bridge's items with one in focus at a time. Opening is the\n * person's own act, so it is a press, never a link: the gateway acknowledges\n * the item for them, and it is shown whole. An alert or a notice seen is\n * done at once (CC16), so it shows with no answer to give, as does a\n * question its asker withdrew or replaced; a replaced one opens its\n * replacement. A step ends done or cannot with the note, sent at once,\n * never through the basket (CC23). A question's answer goes in the basket (CC24), and comes\n * out of it there. Answering, being done or putting in the basket says so\n * in place, and the page reads itself again.\n */\nexport function ItemFocus({ fleetId, children }: { fleetId: string; children: (opening: ItemOpening) => ReactNode }) {\n const [focus, setFocus] = useState<{ delivery: FocusedDelivery; isDoneOnSeeing: boolean; inBasket: InBasket | null } | undefined>();\n const [note, setNote] = useState('');\n const [openingId, setOpeningId] = useState<string | undefined>();\n const [working, setWorking] = useState<DeliveryControl | undefined>();\n const [openFailure, setOpenFailure] = useState<{ deliveryId: string; message: string } | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [done, setDone] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n\n const open = (item: ToOpen) => {\n setOpeningId(item.deliveryId);\n setOpenFailure(undefined);\n setDone(undefined);\n startTransition(async () => {\n const outcome = await openDelivery(fleetId, item.deliveryId);\n setOpeningId(undefined);\n if (outcome.isOk) {\n const inBasket = item.inBasket ?? null;\n setFocus({ delivery: outcome.value, isDoneOnSeeing: item.job === 'stay-aware', inBasket });\n setNote(inBasket?.note ?? '');\n setFailure(undefined);\n } else {\n setOpenFailure({ deliveryId: item.deliveryId, message: outcome.message });\n }\n });\n };\n\n const settle = ({ control, action, said }: { control: DeliveryControl; action: () => Promise<ActionOutcome<undefined>>; said: string }) => {\n setWorking(control);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await action();\n setWorking(undefined);\n if (outcome.isOk) {\n setFocus(undefined);\n setDone(said);\n } else {\n setFailure(outcome.message);\n }\n });\n };\n\n if (focus !== undefined) {\n const { delivery, inBasket } = focus;\n const questionId = delivery.question?.id;\n return (\n <DeliveryCard\n key={delivery.deliveryId}\n delivery={delivery}\n isDoneOnSeeing={focus.isDoneOnSeeing}\n meetingHref={delivery.meetingId === undefined ? undefined : meetingPathOf({ fleetId, meetingId: delivery.meetingId })}\n basketHref={inFleet(BRIDGE_BASKET_PATH, fleetId)}\n inBasket={inBasket}\n note={note}\n working={working}\n failure={failure}\n onNoteChange={setNote}\n onAnswer={(option) => { settle({ control: option === undefined ? { kind: 'note' } : { kind: 'option', option }, action: () => answerDelivery({ fleet: fleetId, deliveryId: delivery.deliveryId, input: { questionId: delivery.question?.id, option, note } }), said: `Your answer went to ${delivery.from}.` }); }\n }\n onPut={(option) => { settle({ control: { kind: 'option', option }, action: () => putInBasket({ fleet: fleetId, deliveryId: delivery.deliveryId, option, note }), said: `Option ${String(option)} is in the basket, not sent: ${delivery.from} receives it when you send the basket.` }); }}\n onRemove={() => {\n if (questionId !== undefined) {\n settle({ control: { kind: 'remove' }, action: () => removeFromBasket(fleetId, questionId), said: `Your answer to “${delivery.title}” is out of the basket; the question still waits on you.` });\n }\n }}\n onDone={() => { settle({ control: { kind: 'done' }, action: () => doneDelivery({ fleet: fleetId, deliveryId: delivery.deliveryId }), said: `Done with “${delivery.title}”.` }); }}\n onFinishStep={(outcome) => {\n settle({\n control: { kind: outcome },\n action: () => doneDelivery({ fleet: fleetId, deliveryId: delivery.deliveryId, step: { outcome, note } }),\n said: outcome === 'done' ? `Done: ${delivery.from} is told “${delivery.title}” is done.` : `Cannot: ${delivery.from} is told you cannot do “${delivery.title}”.`,\n });\n }}\n onOpen={(deliveryId) => { open({ deliveryId, job: 'decide' }); }}\n onBack={() => { setFocus(undefined); }}\n />\n );\n }\n return (\n <div className=\"grid gap-4\">\n {done === undefined ? null : <Notice message={done} isFailure={false} />}\n {children({ open, openingId, failure: openFailure })}\n </div>\n );\n}\n","import { useState } from 'react';\n\nimport type { Question } from '@aeolus-fleet/common';\n\nimport type { FocusedDelivery, Stale, StepView } from '../services/deliveries';\nimport { ActionButton } from './action-button';\nimport { Notice } from './notice';\n\n/** Which of the card's controls is working: an option of the question put in the basket, its entry removed, the note alone, done, or a step's cannot. */\nexport type DeliveryControl = { kind: 'option'; option: number } | { kind: 'remove' } | { kind: 'note' } | { kind: 'done' } | { kind: 'cannot' };\n\n/** How the person ends a step: they did it, or cannot. */\nexport type StepOutcome = 'done' | 'cannot';\n\n/** The answer to a question in the basket (Bridge, section 9): its option and its note, none when the person wrote none. */\nexport interface InBasket {\n readonly option: number;\n readonly note: string | null;\n}\n\n/** What a question in the basket says: in it, not sent, with its note; picking another option changes it. */\nfunction InBasketNotice({ inBasket, basketHref, isRemoving, isWorking, onRemove }: { inBasket: InBasket; basketHref: string; isRemoving: boolean; isWorking: boolean; onRemove: () => void }) {\n return (\n <div data-testid=\"bridge-in-basket\" className=\"grid gap-2 rounded-md border border-border bg-muted p-3\">\n <span className=\"font-medium\">In the basket: option {inBasket.option}, not sent</span>\n {inBasket.note === null ? null : <span className=\"text-caption\">“{inBasket.note}”</span>}\n <span className=\"text-caption text-muted-foreground\">Pick another option to change it.</span>\n <div className=\"flex flex-wrap gap-2\">\n <a data-testid=\"bridge-basket-open\" href={basketHref} className=\"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent\">\n Open the basket\n </a>\n <ActionButton data-testid=\"bridge-basket-remove\" isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={onRemove}>\n Remove\n </ActionButton>\n </div>\n </div>\n );\n}\n\n/** The options of a question, one to choose, the asker's pick marked; none to choose once it is stale. */\nfunction QuestionOptions({ question, chosen, isStale, onChoose }: { question: Question; chosen: number | undefined; isStale: boolean; onChoose: (option: number) => void }) {\n return (\n <fieldset className={`grid gap-2 ${isStale ? 'opacity-60' : ''}`} disabled={isStale}>\n <legend className=\"sr-only\">Options</legend>\n {question.options.map((option) => (\n <label key={option.key} className={`flex items-start gap-3 rounded-md border p-3 ${option.key === chosen && !isStale ? 'border-ring bg-accent' : 'border-border'}`}>\n <input type=\"radio\" name=\"option\" value={option.key} checked={option.key === chosen && !isStale} onChange={() => { onChoose(option.key); }} className=\"mt-1\" />\n <span className=\"grid flex-1 gap-0.5\">\n <span className=\"font-medium\">\n {option.key}. {option.label}\n </span>\n {option.detail === '' ? null : <span className=\"text-caption text-muted-foreground\">{option.detail}</span>}\n </span>\n {option.key === question.pick.option ? <span className=\"rounded-sm border border-border px-1.5 text-caption\">Their pick</span> : null}\n </label>\n ))}\n </fieldset>\n );\n}\n\n/** What a stale question says: withdrawn, done; or replaced, with the replacement to open. */\nfunction StaleNotice({ stale, from, onOpen }: { stale: Stale; from: string; onOpen: (deliveryId: string) => void }) {\n const { replacementId } = stale;\n return (\n <div data-testid=\"bridge-stale\" className=\"grid gap-2 rounded-md border border-border bg-muted p-3\">\n <span>{stale.kind === 'withdrawn' ? `Withdrawn by ${from}. Nothing to answer: it is done.` : `Replaced by ${from}. Answer the new question.`}</span>\n {replacementId === null ? null : (\n <ActionButton data-testid=\"bridge-replacement\" className=\"justify-self-start\" isPending={false} pendingLabel=\"Opening...\" onClick={() => { onOpen(replacementId); }}>\n Open the new question\n </ActionButton>\n )}\n </div>\n );\n}\n\n/** What a step asks: why, and the link where it is done, shown with its host and opened only by the person's own press (Bridge, section 9). */\nfunction StepAsked({ step }: { step: StepView }) {\n return (\n <>\n <p className=\"whitespace-pre-wrap\">{step.why}</p>\n {step.link === undefined ? null : (\n <a data-testid=\"bridge-step-link\" href={step.link.href} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent\">\n Open on {step.link.host}\n </a>\n )}\n </>\n );\n}\n\n/** A step's note field, shown before Done or Cannot is pressed, and the two: the outcome goes to the asker at once, with the note (CC14, CC23). */\nfunction StepControls({ from, note, working, failure, onNoteChange, onFinish }: { from: string; note: string; working: DeliveryControl | undefined; failure: string | undefined; onNoteChange: (note: string) => void; onFinish: (outcome: StepOutcome) => void }) {\n const isWorking = working !== undefined;\n return (\n <>\n <label className=\"grid gap-1\">\n <span>Note</span>\n <textarea\n data-testid=\"bridge-note\"\n rows={2}\n value={note}\n onChange={(event) => { onNoteChange(event.target.value); }}\n placeholder=\"Optional, goes with Done or Cannot\"\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n <div className=\"grid gap-1\">\n <div className=\"flex flex-wrap gap-2\">\n <ActionButton data-testid=\"bridge-step-done\" variant=\"primary\" isPending={working?.kind === 'done'} pendingLabel=\"Sending...\" disabled={isWorking} onClick={() => { onFinish('done'); }}>\n Done\n </ActionButton>\n <ActionButton data-testid=\"bridge-step-cannot\" isPending={working?.kind === 'cannot'} pendingLabel=\"Sending...\" disabled={isWorking} onClick={() => { onFinish('cannot'); }}>\n Cannot\n </ActionButton>\n </div>\n <span className=\"text-caption text-muted-foreground\">{from} is told at once, with your note.</span>\n </div>\n </>\n );\n}\n\n/**\n * One item in focus (design B, Signal). A question opens with the asker's\n * pick chosen (CC11), or the option in the basket; its one button puts that\n * option in the basket with the note, if any, and sends nothing (CC24): the\n * person sends the basket. A step (CC14) shows why and its link, then its\n * note field before Done and Cannot, each sending its outcome at once with\n * the note. Any other item may get a note as its answer, and may\n * be done with; one of a meeting leads to the meeting. An alert or a notice\n * is done once seen (Bridge, CC16): it asks nothing more. So is a question\n * its asker withdrew or replaced: stale, nothing to send, a replaced one\n * leading to its replacement.\n */\nexport function DeliveryCard({\n delivery,\n isDoneOnSeeing,\n meetingHref,\n basketHref,\n inBasket,\n note,\n working,\n failure,\n onNoteChange,\n onAnswer,\n onPut,\n onRemove,\n onDone,\n onFinishStep,\n onOpen,\n onBack,\n}: {\n delivery: FocusedDelivery;\n /** Whether seeing it was all it asked, so it is done: an alert or a notice. */\n isDoneOnSeeing: boolean;\n /** The page of the meeting it belongs to, if it belongs to one. */\n meetingHref: string | undefined;\n /** Bridge's basket. */\n basketHref: string;\n /** The answer to the question in the basket, if any. */\n inBasket: InBasket | null;\n note: string;\n working: DeliveryControl | undefined;\n failure: string | undefined;\n onNoteChange: (note: string) => void;\n /** Answers any item but a question with the note. */\n onAnswer: (option: number | undefined) => void;\n /** Puts the option chosen of a question in the basket, with the note. */\n onPut: (option: number) => void;\n /** Takes the question's answer out of the basket. */\n onRemove: () => void;\n onDone: () => void;\n /** Ends a step done or cannot, with the note. */\n onFinishStep: (outcome: StepOutcome) => void;\n /** Opens another item: a replaced question's replacement. */\n onOpen: (deliveryId: string) => void;\n onBack: () => void;\n}) {\n const { question, step, stale } = delivery;\n const [chosen, setChosen] = useState(inBasket?.option ?? question?.pick.option);\n const isWorking = working !== undefined;\n return (\n <section data-testid=\"bridge-delivery\" className=\"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm\">\n <span className=\"text-caption text-muted-foreground\">\n {delivery.from} · {new Date(delivery.sentAt).toUTCString()}\n </span>\n <h2 className=\"text-heading font-semibold\">{question?.title ?? delivery.title}</h2>\n {meetingHref === undefined ? null : (\n <a data-testid=\"bridge-meeting\" href={meetingHref} className=\"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover\">\n Go to the meeting\n </a>\n )}\n {step !== undefined ? (\n <StepAsked step={step} />\n ) : question === undefined ? (\n <pre className=\"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption\">{delivery.body}</pre>\n ) : (\n <>\n <p className=\"whitespace-pre-wrap\">{question.context}</p>\n <QuestionOptions question={question} chosen={chosen} isStale={stale !== null} onChoose={setChosen} />\n <p className=\"text-caption text-muted-foreground\">\n {delivery.from} picks {question.pick.option}: {question.pick.why}\n </p>\n </>\n )}\n {stale === null ? null : <StaleNotice stale={stale} from={delivery.from} onOpen={onOpen} />}\n {inBasket === null || stale !== null ? null : <InBasketNotice inBasket={inBasket} basketHref={basketHref} isRemoving={working?.kind === 'remove'} isWorking={isWorking} onRemove={onRemove} />}\n {isDoneOnSeeing ? (\n <p data-testid=\"bridge-seen-done\" className=\"text-muted-foreground\">\n Seen now, so done: it asks nothing more.\n </p>\n ) : stale !== null ? null : step !== undefined ? (\n <StepControls from={delivery.from} note={note} working={working} failure={failure} onNoteChange={onNoteChange} onFinish={onFinishStep} />\n ) : (\n <>\n <label className=\"grid gap-1\">\n <span>{question === undefined ? 'Your answer' : 'Note'}</span>\n <textarea\n data-testid=\"bridge-note\"\n rows={2}\n value={note}\n onChange={(event) => { onNoteChange(event.target.value); }}\n placeholder={question === undefined ? '' : 'Optional, goes with the answer'}\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {question === undefined ? (\n <div className=\"flex flex-wrap gap-2\">\n <ActionButton data-testid=\"bridge-answer\" variant=\"primary\" isPending={working?.kind === 'note'} pendingLabel=\"Sending...\" disabled={isWorking} onClick={() => { onAnswer(undefined); }}>\n Answer\n </ActionButton>\n <ActionButton data-testid=\"bridge-done\" isPending={working?.kind === 'done'} pendingLabel=\"Marking done...\" disabled={isWorking} onClick={onDone}>\n Done\n </ActionButton>\n </div>\n ) : chosen === undefined ? null : (\n <div className=\"grid gap-1\">\n <ActionButton data-testid=\"bridge-put-in-basket\" variant=\"primary\" className=\"justify-self-start\" isPending={working?.kind === 'option'} pendingLabel=\"Putting in the basket...\" disabled={isWorking} onClick={() => { onPut(chosen); }}>\n Put option {chosen} in the basket\n </ActionButton>\n <span className=\"text-caption text-muted-foreground\">Nothing is sent yet. {delivery.from} receives this answer when you send the basket.</span>\n </div>\n )}\n </>\n )}\n <div className=\"flex flex-wrap gap-2\">\n <button type=\"button\" onClick={onBack} disabled={isWorking} className=\"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70\">\n Back\n </button>\n </div>\n </section>\n );\n}\n","'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useEffect } from 'react';\n\n/** How long Bridge waits before it reads the record again by itself. */\nconst TRY_AGAIN_MS = 10_000;\n\n/**\n * The record cannot be read now (Bridge, section 9: core does not answer):\n * why, that nothing is lost, since nothing was acknowledged, and the page\n * reads itself again every 10 seconds, or at once on Try now.\n */\nexport function RecordUnreadable({ message }: { message: string }) {\n const router = useRouter();\n useEffect(() => {\n const again = setInterval(() => {\n router.refresh();\n }, TRY_AGAIN_MS);\n return () => {\n clearInterval(again);\n };\n }, [router]);\n return (\n <section role=\"alert\" data-testid=\"bridge-unreadable\" className=\"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\">\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"font-semibold\">The record cannot be read now</span>\n <span className=\"text-caption\">\n {message} Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s.\n </span>\n </span>\n <button type=\"button\" data-testid=\"bridge-try-now\" onClick={() => { router.refresh(); }} className=\"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent\">\n Try now\n </button>\n </section>\n );\n}\n","/** Where a meeting's page is, for server and client code alike. */\n\n/** The meeting page's address, before the meeting's id. */\nexport const MEETINGS_PATH = '/meetings';\n\n/** The address of a meeting's page in a fleet, at the page of contributions after the cursor, if one is given. */\nexport function meetingPathOf(meeting: { fleetId: string; meetingId: string; cursor?: string }): string {\n const query = new URLSearchParams({ fleet: meeting.fleetId, ...(meeting.cursor === undefined ? {} : { cursor: meeting.cursor }) });\n return `${MEETINGS_PATH}/${encodeURIComponent(meeting.meetingId)}?${query.toString()}`;\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40edad5bc6caa482ec57bdf504a9545c453e286344\":{\"name\":\"answerDelivery\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_2=/*#__PURE__*/createServerReference(\"40edad5bc6caa482ec57bdf504a9545c453e286344\",callServer,void 0,findSourceMapURL,\"answerDelivery\");export{$$RSC_SERVER_ACTION_2 as answerDelivery};","/* __next_internal_action_entry_do_not_use__ [{\"409343274cfb1997696f97d13e70128feeaadc81b0\":{\"name\":\"doneDelivery\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"409343274cfb1997696f97d13e70128feeaadc81b0\",callServer,void 0,findSourceMapURL,\"doneDelivery\");export{$$RSC_SERVER_ACTION_6 as doneDelivery};","/* __next_internal_action_entry_do_not_use__ [{\"6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324\":{\"name\":\"openDelivery\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324\",callServer,void 0,findSourceMapURL,\"openDelivery\");export{$$RSC_SERVER_ACTION_1 as openDelivery};","/* __next_internal_action_entry_do_not_use__ [{\"408a5fadf58977f6b55557119e3557d884605ebbcf\":{\"name\":\"putInBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"408a5fadf58977f6b55557119e3557d884605ebbcf\",callServer,void 0,findSourceMapURL,\"putInBasket\");export{$$RSC_SERVER_ACTION_3 as putInBasket};"],"names":["$$RSC_SERVER_ACTION_4","InBasketNotice","inBasket","basketHref","isRemoving","isWorking","onRemove","className","option","note","href","isPending","pendingLabel","disabled","onClick","QuestionOptions","question","chosen","isStale","onChoose","options","map","key","type","name","value","checked","onChange","label","detail","pick","StaleNotice","stale","from","onOpen","replacementId","kind","StepAsked","step","why","link","undefined","target","rel","host","StepControls","working","failure","onNoteChange","onFinish","rows","event","placeholder","message","isFailure","variant","DeliveryCard","delivery","isDoneOnSeeing","meetingHref","onAnswer","onPut","onDone","onFinishStep","onBack","setChosen","Date","sentAt","toUTCString","title","body","context","TRY_AGAIN_MS","RecordUnreadable","router","again","setInterval","refresh","clearInterval","role","MEETINGS_PATH","meetingPathOf","meeting","query","URLSearchParams","fleet","fleetId","cursor","encodeURIComponent","meetingId","toString"],"mappings":"6CAA8M,IAAA,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAkC,AAArB,EAAsB,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,+DCEnc,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCFA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAeA,SAASC,EAAe,UAAEC,CAAQ,YAAEC,CAAU,YAAEC,CAAU,WAAEC,CAAS,UAAEC,CAAQ,CAA6G,EAC1L,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,cAAY,mBAAmBC,UAAU,oEAC5C,CAAA,EAA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/item-focus.tsx","../../../../../web/features/bridge/ui/delivery-card.tsx","../../../../../web/features/bridge/state/record-unreadable.tsx","../../../../../web/features/meeting/paths.ts","../../../../../web/features/bridge/hooks/data%3Acc8e61%20%3Ctext/javascript%3E","../../../../../web/features/bridge/hooks/data%3A40dcc4%20%3Ctext/javascript%3E","../../../../../web/features/bridge/hooks/data%3Ab02790%20%3Ctext/javascript%3E","../../../../../web/features/bridge/hooks/data%3A2985b6%20%3Ctext/javascript%3E"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"60cb932106ab7fdcbd18e33041be499ed83080592f\":{\"name\":\"removeFromBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_4=/*#__PURE__*/createServerReference(\"60cb932106ab7fdcbd18e33041be499ed83080592f\",callServer,void 0,findSourceMapURL,\"removeFromBasket\");export{$$RSC_SERVER_ACTION_4 as removeFromBasket};","'use client';\n\nimport { useState, useTransition, type ReactNode } from 'react';\n\nimport { meetingPathOf } from '../../meeting/paths';\nimport { inFleet } from '../../../lib/gateway-api/page-account';\nimport { answerDelivery, doneDelivery, openDelivery, putInBasket, removeFromBasket, type ActionOutcome } from '../hooks/bridge-actions';\nimport { BRIDGE_BASKET_PATH } from '../paths';\nimport type { FocusedDelivery } from '../services/deliveries';\nimport type { HomeItem } from '../services/items';\nimport { DeliveryCard, type DeliveryControl, type InBasket } from '../ui/delivery-card';\nimport { Notice } from '../ui/notice';\n\n/** An item to open: by its delivery, with its job, and the answer to it in the basket, if any. */\nexport interface ToOpen {\n readonly deliveryId: string;\n readonly job: HomeItem['job'];\n readonly inBasket?: InBasket | null;\n}\n\n/** What a list of items gets to open one: the press, the one opening, and why one could not be opened. */\nexport interface ItemOpening {\n readonly open: (item: ToOpen) => void;\n readonly openingId: string | undefined;\n readonly failure: { deliveryId: string; message: string } | undefined;\n}\n\n/**\n * A list of Bridge's items with one in focus at a time. Opening is the\n * person's own act, so it is a press, never a link: the gateway acknowledges\n * the item for them, and it is shown whole. An alert or a notice seen is\n * done at once (CC16), so it shows with no answer to give, as does a\n * question its asker withdrew or replaced; a replaced one opens its\n * replacement. A step ends done or cannot with the note, sent at once,\n * never through the basket (CC23). A question's answer goes in the basket (CC24), and comes\n * out of it there. Answering, being done or putting in the basket says so\n * in place, and the page reads itself again.\n */\nexport function ItemFocus({ fleetId, children }: { fleetId: string; children: (opening: ItemOpening) => ReactNode }) {\n const [focus, setFocus] = useState<{ delivery: FocusedDelivery; isDoneOnSeeing: boolean; inBasket: InBasket | null } | undefined>();\n const [note, setNote] = useState('');\n const [openingId, setOpeningId] = useState<string | undefined>();\n const [working, setWorking] = useState<DeliveryControl | undefined>();\n const [openFailure, setOpenFailure] = useState<{ deliveryId: string; message: string } | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [done, setDone] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n\n const open = (item: ToOpen) => {\n setOpeningId(item.deliveryId);\n setOpenFailure(undefined);\n setDone(undefined);\n startTransition(async () => {\n const outcome = await openDelivery(fleetId, item.deliveryId);\n setOpeningId(undefined);\n if (outcome.isOk) {\n const inBasket = item.inBasket ?? null;\n setFocus({ delivery: outcome.value, isDoneOnSeeing: item.job === 'stay-aware', inBasket });\n setNote(inBasket?.note ?? '');\n setFailure(undefined);\n } else {\n setOpenFailure({ deliveryId: item.deliveryId, message: outcome.message });\n }\n });\n };\n\n const settle = ({ control, action, said }: { control: DeliveryControl; action: () => Promise<ActionOutcome<undefined>>; said: string }) => {\n setWorking(control);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await action();\n setWorking(undefined);\n if (outcome.isOk) {\n setFocus(undefined);\n setDone(said);\n } else {\n setFailure(outcome.message);\n }\n });\n };\n\n if (focus !== undefined) {\n const { delivery, inBasket } = focus;\n const questionId = delivery.question?.id;\n return (\n <DeliveryCard\n key={delivery.deliveryId}\n delivery={delivery}\n isDoneOnSeeing={focus.isDoneOnSeeing}\n meetingHref={delivery.meetingId === undefined ? undefined : meetingPathOf({ fleetId, meetingId: delivery.meetingId })}\n basketHref={inFleet(BRIDGE_BASKET_PATH, fleetId)}\n inBasket={inBasket}\n note={note}\n working={working}\n failure={failure}\n onNoteChange={setNote}\n onAnswer={(option) => { settle({ control: option === undefined ? { kind: 'note' } : { kind: 'option', option }, action: () => answerDelivery({ fleet: fleetId, deliveryId: delivery.deliveryId, input: { questionId: delivery.question?.id, option, note } }), said: `Your answer went to ${delivery.from}.` }); }\n }\n onPut={(option) => { settle({ control: { kind: 'option', option }, action: () => putInBasket({ fleet: fleetId, deliveryId: delivery.deliveryId, option, note }), said: `Option ${String(option)} is in the basket, not sent: ${delivery.from} receives it when you send the basket.` }); }}\n onRemove={() => {\n if (questionId !== undefined) {\n settle({ control: { kind: 'remove' }, action: () => removeFromBasket(fleetId, questionId), said: `Your answer to “${delivery.title}” is out of the basket; the question still waits on you.` });\n }\n }}\n onDone={() => { settle({ control: { kind: 'done' }, action: () => doneDelivery({ fleet: fleetId, deliveryId: delivery.deliveryId }), said: `Done with “${delivery.title}”.` }); }}\n onFinishStep={(outcome) => {\n settle({\n control: { kind: outcome },\n action: () => doneDelivery({ fleet: fleetId, deliveryId: delivery.deliveryId, step: { outcome, note } }),\n said: outcome === 'done' ? `Done: ${delivery.from} is told “${delivery.title}” is done.` : `Cannot: ${delivery.from} is told you cannot do “${delivery.title}”.`,\n });\n }}\n onOpen={(deliveryId) => { open({ deliveryId, job: 'decide' }); }}\n onBack={() => { setFocus(undefined); }}\n />\n );\n }\n return (\n <div className=\"grid gap-4\">\n {done === undefined ? null : <Notice message={done} isFailure={false} />}\n {children({ open, openingId, failure: openFailure })}\n </div>\n );\n}\n","import { useState } from 'react';\n\nimport type { Question } from '@aeolus-fleet/common';\n\nimport type { FocusedDelivery, Stale, StepView } from '../services/deliveries';\nimport { ActionButton } from './action-button';\nimport { Notice } from './notice';\n\n/** Which of the card's controls is working: an option of the question put in the basket, its entry removed, the note alone, done, or a step's cannot. */\nexport type DeliveryControl = { kind: 'option'; option: number } | { kind: 'remove' } | { kind: 'note' } | { kind: 'done' } | { kind: 'cannot' };\n\n/** How the person ends a step: they did it, or cannot. */\nexport type StepOutcome = 'done' | 'cannot';\n\n/** The answer to a question in the basket (Bridge, section 9): its option and its note, none when the person wrote none. */\nexport interface InBasket {\n readonly option: number;\n readonly note: string | null;\n}\n\n/** What a question in the basket says: in it, not sent, with its note; picking another option changes it. */\nfunction InBasketNotice({ inBasket, basketHref, isRemoving, isWorking, onRemove }: { inBasket: InBasket; basketHref: string; isRemoving: boolean; isWorking: boolean; onRemove: () => void }) {\n return (\n <div data-testid=\"bridge-in-basket\" className=\"grid gap-2 rounded-md border border-border bg-muted p-3\">\n <span className=\"font-medium\">In the basket: option {inBasket.option}, not sent</span>\n {inBasket.note === null ? null : <span className=\"text-caption\">“{inBasket.note}”</span>}\n <span className=\"text-caption text-muted-foreground\">Pick another option to change it.</span>\n <div className=\"flex flex-wrap gap-2\">\n <a data-testid=\"bridge-basket-open\" href={basketHref} className=\"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent\">\n Open the basket\n </a>\n <ActionButton data-testid=\"bridge-basket-remove\" isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={onRemove}>\n Remove\n </ActionButton>\n </div>\n </div>\n );\n}\n\n/** The options of a question, one to choose, the asker's pick marked; none to choose once it is stale. */\nfunction QuestionOptions({ question, chosen, isStale, onChoose }: { question: Question; chosen: number | undefined; isStale: boolean; onChoose: (option: number) => void }) {\n return (\n <fieldset className={`grid gap-2 ${isStale ? 'opacity-60' : ''}`} disabled={isStale}>\n <legend className=\"sr-only\">Options</legend>\n {question.options.map((option) => (\n <label key={option.key} className={`flex items-start gap-3 rounded-md border p-3 ${option.key === chosen && !isStale ? 'border-ring bg-accent' : 'border-border'}`}>\n <input type=\"radio\" name=\"option\" value={option.key} checked={option.key === chosen && !isStale} onChange={() => { onChoose(option.key); }} className=\"mt-1\" />\n <span className=\"grid flex-1 gap-0.5\">\n <span className=\"font-medium\">\n {option.key}. {option.label}\n </span>\n {option.detail === '' ? null : <span className=\"text-caption text-muted-foreground\">{option.detail}</span>}\n </span>\n {option.key === question.pick.option ? <span className=\"rounded-sm border border-border px-1.5 text-caption\">Their pick</span> : null}\n </label>\n ))}\n </fieldset>\n );\n}\n\n/** What a stale question says: withdrawn, done; or replaced, with the replacement to open. */\nfunction StaleNotice({ stale, from, onOpen }: { stale: Stale; from: string; onOpen: (deliveryId: string) => void }) {\n const { replacementId } = stale;\n return (\n <div data-testid=\"bridge-stale\" className=\"grid gap-2 rounded-md border border-border bg-muted p-3\">\n <span>{stale.kind === 'withdrawn' ? `Withdrawn by ${from}. Nothing to answer: it is done.` : `Replaced by ${from}. Answer the new question.`}</span>\n {replacementId === null ? null : (\n <ActionButton data-testid=\"bridge-replacement\" className=\"justify-self-start\" isPending={false} pendingLabel=\"Opening...\" onClick={() => { onOpen(replacementId); }}>\n Open the new question\n </ActionButton>\n )}\n </div>\n );\n}\n\n/** What a step asks: why, and the link where it is done, shown with its host and opened only by the person's own press (Bridge, section 9). */\nfunction StepAsked({ step }: { step: StepView }) {\n return (\n <>\n <p className=\"whitespace-pre-wrap\">{step.why}</p>\n {step.link === undefined ? null : (\n <a data-testid=\"bridge-step-link\" href={step.link.href} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent\">\n Open on {step.link.host}\n </a>\n )}\n </>\n );\n}\n\n/** A step's note field, shown before Done or Cannot is pressed, and the two: the outcome goes to the asker at once, with the note (CC14, CC23). */\nfunction StepControls({ from, note, working, failure, onNoteChange, onFinish }: { from: string; note: string; working: DeliveryControl | undefined; failure: string | undefined; onNoteChange: (note: string) => void; onFinish: (outcome: StepOutcome) => void }) {\n const isWorking = working !== undefined;\n return (\n <>\n <label className=\"grid gap-1\">\n <span>Note</span>\n <textarea\n data-testid=\"bridge-note\"\n rows={2}\n value={note}\n onChange={(event) => { onNoteChange(event.target.value); }}\n placeholder=\"Optional, goes with Done or Cannot\"\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n <div className=\"grid gap-1\">\n <div className=\"flex flex-wrap gap-2\">\n <ActionButton data-testid=\"bridge-step-done\" variant=\"primary\" isPending={working?.kind === 'done'} pendingLabel=\"Sending...\" disabled={isWorking} onClick={() => { onFinish('done'); }}>\n Done\n </ActionButton>\n <ActionButton data-testid=\"bridge-step-cannot\" isPending={working?.kind === 'cannot'} pendingLabel=\"Sending...\" disabled={isWorking} onClick={() => { onFinish('cannot'); }}>\n Cannot\n </ActionButton>\n </div>\n <span className=\"text-caption text-muted-foreground\">{from} is told at once, with your note.</span>\n </div>\n </>\n );\n}\n\n/**\n * One item in focus (design B, Signal). A question opens with the asker's\n * pick chosen (CC11), or the option in the basket; its one button puts that\n * option in the basket with the note, if any, and sends nothing (CC24): the\n * person sends the basket. A step (CC14) shows why and its link, then its\n * note field before Done and Cannot, each sending its outcome at once with\n * the note. Any other item may get a note as its answer, and may\n * be done with; one of a meeting leads to the meeting. An alert or a notice\n * is done once seen (Bridge, CC16): it asks nothing more. So is a question\n * its asker withdrew or replaced: stale, nothing to send, a replaced one\n * leading to its replacement.\n */\nexport function DeliveryCard({\n delivery,\n isDoneOnSeeing,\n meetingHref,\n basketHref,\n inBasket,\n note,\n working,\n failure,\n onNoteChange,\n onAnswer,\n onPut,\n onRemove,\n onDone,\n onFinishStep,\n onOpen,\n onBack,\n}: {\n delivery: FocusedDelivery;\n /** Whether seeing it was all it asked, so it is done: an alert or a notice. */\n isDoneOnSeeing: boolean;\n /** The page of the meeting it belongs to, if it belongs to one. */\n meetingHref: string | undefined;\n /** Bridge's basket. */\n basketHref: string;\n /** The answer to the question in the basket, if any. */\n inBasket: InBasket | null;\n note: string;\n working: DeliveryControl | undefined;\n failure: string | undefined;\n onNoteChange: (note: string) => void;\n /** Answers any item but a question with the note. */\n onAnswer: (option: number | undefined) => void;\n /** Puts the option chosen of a question in the basket, with the note. */\n onPut: (option: number) => void;\n /** Takes the question's answer out of the basket. */\n onRemove: () => void;\n onDone: () => void;\n /** Ends a step done or cannot, with the note. */\n onFinishStep: (outcome: StepOutcome) => void;\n /** Opens another item: a replaced question's replacement. */\n onOpen: (deliveryId: string) => void;\n onBack: () => void;\n}) {\n const { question, step, stale } = delivery;\n const [chosen, setChosen] = useState(inBasket?.option ?? question?.pick.option);\n const isWorking = working !== undefined;\n return (\n <section data-testid=\"bridge-delivery\" className=\"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm\">\n <span className=\"text-caption text-muted-foreground\">\n {delivery.from} · {new Date(delivery.sentAt).toUTCString()}\n </span>\n <h2 className=\"text-heading font-semibold\">{question?.title ?? delivery.title}</h2>\n {meetingHref === undefined ? null : (\n <a data-testid=\"bridge-meeting\" href={meetingHref} className=\"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover\">\n Go to the meeting\n </a>\n )}\n {step !== undefined ? (\n <StepAsked step={step} />\n ) : question === undefined ? (\n <pre className=\"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption\">{delivery.body}</pre>\n ) : (\n <>\n <p className=\"whitespace-pre-wrap\">{question.context}</p>\n <QuestionOptions question={question} chosen={chosen} isStale={stale !== null} onChoose={setChosen} />\n <p className=\"text-caption text-muted-foreground\">\n {delivery.from} picks {question.pick.option}: {question.pick.why}\n </p>\n </>\n )}\n {stale === null ? null : <StaleNotice stale={stale} from={delivery.from} onOpen={onOpen} />}\n {inBasket === null || stale !== null ? null : <InBasketNotice inBasket={inBasket} basketHref={basketHref} isRemoving={working?.kind === 'remove'} isWorking={isWorking} onRemove={onRemove} />}\n {isDoneOnSeeing ? (\n <p data-testid=\"bridge-seen-done\" className=\"text-muted-foreground\">\n Seen now, so done: it asks nothing more.\n </p>\n ) : stale !== null ? null : step !== undefined ? (\n <StepControls from={delivery.from} note={note} working={working} failure={failure} onNoteChange={onNoteChange} onFinish={onFinishStep} />\n ) : (\n <>\n <label className=\"grid gap-1\">\n <span>{question === undefined ? 'Your answer' : 'Note'}</span>\n <textarea\n data-testid=\"bridge-note\"\n rows={2}\n value={note}\n onChange={(event) => { onNoteChange(event.target.value); }}\n placeholder={question === undefined ? '' : 'Optional, goes with the answer'}\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {question === undefined ? (\n <div className=\"flex flex-wrap gap-2\">\n <ActionButton data-testid=\"bridge-answer\" variant=\"primary\" isPending={working?.kind === 'note'} pendingLabel=\"Sending...\" disabled={isWorking} onClick={() => { onAnswer(undefined); }}>\n Answer\n </ActionButton>\n <ActionButton data-testid=\"bridge-done\" isPending={working?.kind === 'done'} pendingLabel=\"Marking done...\" disabled={isWorking} onClick={onDone}>\n Done\n </ActionButton>\n </div>\n ) : chosen === undefined ? null : (\n <div className=\"grid gap-1\">\n <ActionButton data-testid=\"bridge-put-in-basket\" variant=\"primary\" className=\"justify-self-start\" isPending={working?.kind === 'option'} pendingLabel=\"Putting in the basket...\" disabled={isWorking} onClick={() => { onPut(chosen); }}>\n Put option {chosen} in the basket\n </ActionButton>\n <span className=\"text-caption text-muted-foreground\">Nothing is sent yet. {delivery.from} receives this answer when you send the basket.</span>\n </div>\n )}\n </>\n )}\n <div className=\"flex flex-wrap gap-2\">\n <button type=\"button\" onClick={onBack} disabled={isWorking} className=\"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70\">\n Back\n </button>\n </div>\n </section>\n );\n}\n","'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useEffect } from 'react';\n\n/** How long Bridge waits before it reads the record again by itself. */\nconst TRY_AGAIN_MS = 10_000;\n\n/**\n * The record cannot be read now (Bridge, section 9: core does not answer):\n * why, that nothing is lost, since nothing was acknowledged, and the page\n * reads itself again every 10 seconds, or at once on Try now.\n */\nexport function RecordUnreadable({ message }: { message: string }) {\n const router = useRouter();\n useEffect(() => {\n const again = setInterval(() => {\n router.refresh();\n }, TRY_AGAIN_MS);\n return () => {\n clearInterval(again);\n };\n }, [router]);\n return (\n <section role=\"alert\" data-testid=\"bridge-unreadable\" className=\"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\">\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"font-semibold\">The record cannot be read now</span>\n <span className=\"text-caption\">\n {message} Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s.\n </span>\n </span>\n <button type=\"button\" data-testid=\"bridge-try-now\" onClick={() => { router.refresh(); }} className=\"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent\">\n Try now\n </button>\n </section>\n );\n}\n","/** Where a meeting's page is, for server and client code alike. */\n\n/** The meeting page's address, before the meeting's id. */\nexport const MEETINGS_PATH = '/meetings';\n\n/** The address of a meeting's page in a fleet, at the page of contributions after the cursor, if one is given. */\nexport function meetingPathOf(meeting: { fleetId: string; meetingId: string; cursor?: string }): string {\n const query = new URLSearchParams({ fleet: meeting.fleetId, ...(meeting.cursor === undefined ? {} : { cursor: meeting.cursor }) });\n return `${MEETINGS_PATH}/${encodeURIComponent(meeting.meetingId)}?${query.toString()}`;\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40312d708ed123f3bff12a0e5d5ab7bdd456131901\":{\"name\":\"answerDelivery\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_2=/*#__PURE__*/createServerReference(\"40312d708ed123f3bff12a0e5d5ab7bdd456131901\",callServer,void 0,findSourceMapURL,\"answerDelivery\");export{$$RSC_SERVER_ACTION_2 as answerDelivery};","/* __next_internal_action_entry_do_not_use__ [{\"407cf7e8bf1a43e93e600808ccd1631dfd13c9b490\":{\"name\":\"doneDelivery\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"407cf7e8bf1a43e93e600808ccd1631dfd13c9b490\",callServer,void 0,findSourceMapURL,\"doneDelivery\");export{$$RSC_SERVER_ACTION_6 as doneDelivery};","/* __next_internal_action_entry_do_not_use__ [{\"60c205c99f267754b5cb7b09118fdaf91f419555a5\":{\"name\":\"openDelivery\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"60c205c99f267754b5cb7b09118fdaf91f419555a5\",callServer,void 0,findSourceMapURL,\"openDelivery\");export{$$RSC_SERVER_ACTION_1 as openDelivery};","/* __next_internal_action_entry_do_not_use__ [{\"40c05f98915a7c9661aa8f801d392296ba8350eeba\":{\"name\":\"putInBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"40c05f98915a7c9661aa8f801d392296ba8350eeba\",callServer,void 0,findSourceMapURL,\"putInBasket\");export{$$RSC_SERVER_ACTION_3 as putInBasket};"],"names":["$$RSC_SERVER_ACTION_4","InBasketNotice","inBasket","basketHref","isRemoving","isWorking","onRemove","className","option","note","href","isPending","pendingLabel","disabled","onClick","QuestionOptions","question","chosen","isStale","onChoose","options","map","key","type","name","value","checked","onChange","label","detail","pick","StaleNotice","stale","from","onOpen","replacementId","kind","StepAsked","step","why","link","undefined","target","rel","host","StepControls","working","failure","onNoteChange","onFinish","rows","event","placeholder","message","isFailure","variant","DeliveryCard","delivery","isDoneOnSeeing","meetingHref","onAnswer","onPut","onDone","onFinishStep","onBack","setChosen","Date","sentAt","toUTCString","title","body","context","TRY_AGAIN_MS","RecordUnreadable","router","again","setInterval","refresh","clearInterval","role","MEETINGS_PATH","meetingPathOf","meeting","query","URLSearchParams","fleet","fleetId","cursor","encodeURIComponent","meetingId","toString"],"mappings":"4CAA8M,IAAA,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAkC,AAArB,EAAsB,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,+DCEnc,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,MAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OCFA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAeA,SAASC,EAAe,UAAEC,CAAQ,YAAEC,CAAU,YAAEC,CAAU,WAAEC,CAAS,UAAEC,CAAQ,CAA6G,EAC1L,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,cAAY,mBAAmBC,UAAU,oEAC5C,CAAA,EAAA,EAAA,IAAA,EAAC,OAAA,CAAKA,UAAU,wBAAc,yBAAuBL,EAASM,MAAM,CAAC,gBAClD,OAAlBN,EAASO,IAAI,CAAY,KAAO,CAAA,EAAA,EAAA,IAAA,EAAC,OAAA,CAAKF,UAAU,yBAAe,IAAEL,EAASO,IAAI,CAAC,OAChF,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKF,UAAU,8CAAqC,sCACrD,CAAA,EAAA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AS0E,AAAcC,CAAgE,EAC5F,IAAMC,EAAQ,IAAIC,gBAAgB,CAAEC,MAAOH,EAAQI,OAAO,CAAE,QAAuB7C,IAAnByC,EAAQK,MAAM,CAAiB,CAAC,EAAI,CAAEA,OAAQL,EAAQK,MAAM,AAAC,CAAC,AAAE,GAChI,MAAO,GAAGP,UAAiBQ,IAAH,CAAC,cAAqBN,EAAQO,SAAS,EAAE,CAAC,EAAEN,EAAMO,QAAQ,IAAI,AACxF,UCT4M,IAAA,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,uCCAjJ,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgBJ,CAAC,oCCA/I,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgBA,CAAC,qCCAhJL,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAACK"}
@@ -0,0 +1,3 @@
1
+ (()=>{"use strict";module.exports=[2305,a=>{var b=a.i(5050);let c=(0,b.createServerReference)("60cb932106ab7fdcbd18e33041be499ed83080592f",b.callServer,void 0,b.findSourceMapURL,"removeFromBasket");a.s(["f",0,c])},91777,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(52779),e=a.i(25959),f=a.i(37569),g=a.i(4952),h=a.i(15247),i=a.i(92748),j=a.i(2305),k=a.i(16550),l=a.i(32043),m=a.i(10039);function n({inBasket:a,basketHref:c,isRemoving:d,isWorking:e,onRemove:f}){return(0,b.jsxs)("div",{"data-testid":"bridge-in-basket",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,b.jsxs)("span",{className:"font-medium",children:["In the basket: option ",a.option,", not sent"]}),null===a.note?null:(0,b.jsxs)("span",{className:"text-caption",children:["“",a.note,"”"]}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"Pick another option to change it."}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("a",{"data-testid":"bridge-basket-open",href:c,className:"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent",children:"Open the basket"}),(0,b.jsx)(l.f,{"data-testid":"bridge-basket-remove",isPending:d,pendingLabel:"Removing...",disabled:e,onClick:f,children:"Remove"})]})]})}function o({question:a,chosen:c,isStale:d,onChoose:e}){return(0,b.jsxs)("fieldset",{className:`grid gap-2 ${d?"opacity-60":""}`,disabled:d,children:[(0,b.jsx)("legend",{className:"sr-only",children:"Options"}),a.options.map(f=>(0,b.jsxs)("label",{className:`flex items-start gap-3 rounded-md border p-3 ${f.key===c&&!d?"border-ring bg-accent":"border-border"}`,children:[(0,b.jsx)("input",{type:"radio",name:"option",value:f.key,checked:f.key===c&&!d,onChange:()=>{e(f.key)},className:"mt-1"}),(0,b.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,b.jsxs)("span",{className:"font-medium",children:[f.key,". ",f.label]}),""===f.detail?null:(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:f.detail})]}),f.key===a.pick.option?(0,b.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},f.key))]})}function p({stale:a,from:c,onOpen:d}){let{replacementId:e}=a;return(0,b.jsxs)("div",{"data-testid":"bridge-stale",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,b.jsx)("span",{children:"withdrawn"===a.kind?`Withdrawn by ${c}. Nothing to answer: it is done.`:`Replaced by ${c}. Answer the new question.`}),null===e?null:(0,b.jsx)(l.f,{"data-testid":"bridge-replacement",className:"justify-self-start",isPending:!1,pendingLabel:"Opening...",onClick:()=>{d(e)},children:"Open the new question"})]})}function q({step:a}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"whitespace-pre-wrap",children:a.why}),void 0===a.link?null:(0,b.jsxs)("a",{"data-testid":"bridge-step-link",href:a.link.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent",children:["Open on ",a.link.host]})]})}function r({from:a,note:c,working:d,failure:e,onNoteChange:f,onFinish:g}){let h=void 0!==d;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Note"}),(0,b.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:c,onChange:a=>{f(a.target.value)},placeholder:"Optional, goes with Done or Cannot",className:"rounded-md border border-input bg-background p-2"})]}),void 0===e?null:(0,b.jsx)(m.f,{message:e,isFailure:!0}),(0,b.jsxs)("div",{className:"grid gap-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(l.f,{"data-testid":"bridge-step-done",variant:"primary",isPending:d?.kind==="done",pendingLabel:"Sending...",disabled:h,onClick:()=>{g("done")},children:"Done"}),(0,b.jsx)(l.f,{"data-testid":"bridge-step-cannot",isPending:d?.kind==="cannot",pendingLabel:"Sending...",disabled:h,onClick:()=>{g("cannot")},children:"Cannot"})]}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:[a," is told at once, with your note."]})]})]})}function s({delivery:a,isDoneOnSeeing:d,meetingHref:e,basketHref:f,inBasket:g,note:h,working:i,failure:j,onNoteChange:k,onAnswer:t,onPut:u,onRemove:v,onDone:w,onFinishStep:x,onOpen:y,onBack:z}){let{question:A,step:B,stale:C}=a,[D,E]=(0,c.useState)(g?.option??A?.pick.option),F=void 0!==i;return(0,b.jsxs)("section",{"data-testid":"bridge-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:[a.from," · ",new Date(a.sentAt).toUTCString()]}),(0,b.jsx)("h2",{className:"text-heading font-semibold",children:A?.title??a.title}),void 0===e?null:(0,b.jsx)("a",{"data-testid":"bridge-meeting",href:e,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0!==B?(0,b.jsx)(q,{step:B}):void 0===A?(0,b.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:a.body}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"whitespace-pre-wrap",children:A.context}),(0,b.jsx)(o,{question:A,chosen:D,isStale:null!==C,onChoose:E}),(0,b.jsxs)("p",{className:"text-caption text-muted-foreground",children:[a.from," picks ",A.pick.option,": ",A.pick.why]})]}),null===C?null:(0,b.jsx)(p,{stale:C,from:a.from,onOpen:y}),null===g||null!==C?null:(0,b.jsx)(n,{inBasket:g,basketHref:f,isRemoving:i?.kind==="remove",isWorking:F,onRemove:v}),d?(0,b.jsx)("p",{"data-testid":"bridge-seen-done",className:"text-muted-foreground",children:"Seen now, so done: it asks nothing more."}):null!==C?null:void 0!==B?(0,b.jsx)(r,{from:a.from,note:h,working:i,failure:j,onNoteChange:k,onFinish:x}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:void 0===A?"Your answer":"Note"}),(0,b.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:h,onChange:a=>{k(a.target.value)},placeholder:void 0===A?"":"Optional, goes with the answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===j?null:(0,b.jsx)(m.f,{message:j,isFailure:!0}),void 0===A?(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(l.f,{"data-testid":"bridge-answer",variant:"primary",isPending:i?.kind==="note",pendingLabel:"Sending...",disabled:F,onClick:()=>{t(void 0)},children:"Answer"}),(0,b.jsx)(l.f,{"data-testid":"bridge-done",isPending:i?.kind==="done",pendingLabel:"Marking done...",disabled:F,onClick:w,children:"Done"})]}):void 0===D?null:(0,b.jsxs)("div",{className:"grid gap-1",children:[(0,b.jsxs)(l.f,{"data-testid":"bridge-put-in-basket",variant:"primary",className:"justify-self-start",isPending:i?.kind==="option",pendingLabel:"Putting in the basket...",disabled:F,onClick:()=>{u(D)},children:["Put option ",D," in the basket"]}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:["Nothing is sent yet. ",a.from," receives this answer when you send the basket."]})]})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,b.jsx)("button",{type:"button",onClick:z,disabled:F,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back"})})]})}a.s(["f",0,function({fleetId:a,children:l}){let[n,o]=(0,c.useState)(),[p,q]=(0,c.useState)(""),[r,t]=(0,c.useState)(),[u,v]=(0,c.useState)(),[w,x]=(0,c.useState)(),[y,z]=(0,c.useState)(),[A,B]=(0,c.useState)(),[,C]=(0,c.useTransition)(),D=b=>{t(b.deliveryId),x(void 0),B(void 0),C(async()=>{let c=await (0,h.f)(a,b.deliveryId);if(t(void 0),c.isOk){let a=b.inBasket??null;o({delivery:c.value,isDoneOnSeeing:"stay-aware"===b.job,inBasket:a}),q(a?.note??""),z(void 0)}else x({deliveryId:b.deliveryId,message:c.message})})},E=({control:a,action:b,said:c})=>{v(a),z(void 0),C(async()=>{let a=await b();v(void 0),a.isOk?(o(void 0),B(c)):z(a.message)})};if(void 0!==n){let{delivery:c,inBasket:h}=n,l=c.question?.id;return(0,b.jsx)(s,{delivery:c,isDoneOnSeeing:n.isDoneOnSeeing,meetingHref:void 0===c.meetingId?void 0:(0,d.f)({fleetId:a,meetingId:c.meetingId}),basketHref:(0,e.f)(k.H,a),inBasket:h,note:p,working:u,failure:y,onNoteChange:q,onAnswer:b=>{E({control:void 0===b?{kind:"note"}:{kind:"option",option:b},action:()=>(0,f.f)({fleet:a,deliveryId:c.deliveryId,input:{questionId:c.question?.id,option:b,note:p}}),said:`Your answer went to ${c.from}.`})},onPut:b=>{E({control:{kind:"option",option:b},action:()=>(0,i.f)({fleet:a,deliveryId:c.deliveryId,option:b,note:p}),said:`Option ${String(b)} is in the basket, not sent: ${c.from} receives it when you send the basket.`})},onRemove:()=>{void 0!==l&&E({control:{kind:"remove"},action:()=>(0,j.f)(a,l),said:`Your answer to “${c.title}” is out of the basket; the question still waits on you.`})},onDone:()=>{E({control:{kind:"done"},action:()=>(0,g.f)({fleet:a,deliveryId:c.deliveryId}),said:`Done with “${c.title}”.`})},onFinishStep:b=>{E({control:{kind:b},action:()=>(0,g.f)({fleet:a,deliveryId:c.deliveryId,step:{outcome:b,note:p}}),said:"done"===b?`Done: ${c.from} is told “${c.title}” is done.`:`Cannot: ${c.from} is told you cannot do “${c.title}”.`})},onOpen:a=>{D({deliveryId:a,job:"decide"})},onBack:()=>{o(void 0)}},c.deliveryId)}return(0,b.jsxs)("div",{className:"grid gap-4",children:[void 0===A?null:(0,b.jsx)(m.f,{message:A,isFailure:!1}),l({open:D,openingId:r,failure:w})]})}],91777)},21938,a=>{var b=a.i(87924),c=a.i(50944),d=a.i(72131);a.s(["RecordUnreadable",0,function({message:a}){let e=(0,c.useRouter)();return(0,d.useEffect)(()=>{let a=setInterval(()=>{e.refresh()},1e4);return()=>{clearInterval(a)}},[e]),(0,b.jsxs)("section",{role:"alert","data-testid":"bridge-unreadable",className:"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:[(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"font-semibold",children:"The record cannot be read now"}),(0,b.jsxs)("span",{className:"text-caption",children:[a," Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s."]})]}),(0,b.jsx)("button",{type:"button","data-testid":"bridge-try-now",onClick:()=>{e.refresh()},className:"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent",children:"Try now"})]})}])},52779,37569,4952,15247,92748,a=>{a.s(["f",0,function(a){let b=new URLSearchParams({fleet:a.fleetId,...void 0===a.cursor?{}:{cursor:a.cursor}});return`/meetings/${encodeURIComponent(a.meetingId)}?${b.toString()}`}],52779);var b=a.i(5050);let c=(0,b.createServerReference)("40312d708ed123f3bff12a0e5d5ab7bdd456131901",b.callServer,void 0,b.findSourceMapURL,"answerDelivery");a.s(["f",0,c],37569);let d=(0,b.createServerReference)("407cf7e8bf1a43e93e600808ccd1631dfd13c9b490",b.callServer,void 0,b.findSourceMapURL,"doneDelivery");a.s(["f",0,d],4952);let e=(0,b.createServerReference)("60c205c99f267754b5cb7b09118fdaf91f419555a5",b.callServer,void 0,b.findSourceMapURL,"openDelivery");a.s(["f",0,e],15247);let f=(0,b.createServerReference)("40c05f98915a7c9661aa8f801d392296ba8350eeba",b.callServer,void 0,b.findSourceMapURL,"putInBasket");a.s(["f",0,f],92748)}]})();
2
+
3
+ //# sourceMappingURL=web_features_1iiqi6dhrst33._.js.map