@p4code/cli 0.9.18 → 0.9.19

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 (362) hide show
  1. package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
  2. package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
  3. package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
  4. package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
  5. package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
  6. package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BU8mTsuy.mjs} +278 -50
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{binCli-DzRO6f_z.mjs → binCli-CJGD6FcB.mjs} +297 -125
  9. package/dist/claude-history-worker.mjs +1 -1
  10. package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
  11. package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
  12. package/dist/client/.vite/manifest.json +2143 -2131
  13. package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-dXNVRqH0.js} +2 -2
  14. package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BnTV2LIU.js} +2 -2
  15. package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-BW_NJOn9.js} +2 -2
  16. package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-zR4M88FU.js} +2 -2
  17. package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-DIzrmjXm.js} +2 -2
  18. package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-D9gz0spY.js} +2 -2
  19. package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-BFO1LsJz.js} +2 -2
  20. package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-CflGSI2z.js} +2 -2
  21. package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-B_-tUtQE.js} +2 -2
  22. package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-CNFGk064.js} +2 -2
  23. package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-DSw7e3qz.js} +2 -2
  24. package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-C1endahg.js} +2 -2
  25. package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DGyrlbqz.js} +2 -2
  26. package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +2 -0
  27. package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-DG3oq8Fl.js} +2 -2
  28. package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-uHFuClfP.js} +2 -2
  29. package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-DJtfqV3f.js} +2 -2
  30. package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-B4MgXIYY.js} +2 -2
  31. package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-CnWbDLSz.js} +2 -2
  32. package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-DdZ6n5qP.js} +2 -2
  33. package/dist/client/assets/ChatGptUsageButton-Dg1SR7pz.js +2 -0
  34. package/dist/client/assets/ChatMarkdown-eJNo9q4b.js +49 -0
  35. package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +2 -0
  36. package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-Cny-j-4e.js} +2 -2
  37. package/dist/client/assets/CodexSetupSection.logic-C4KEUUA1.js +2 -0
  38. package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +2 -0
  39. package/dist/client/assets/ComboboxClear-DI8al7ca.js +2 -0
  40. package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js} +2 -2
  41. package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-BOYakQHx.js} +2 -2
  42. package/dist/client/assets/CompositeRoot-OiiGu5cn.js +2 -0
  43. package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js} +2 -2
  44. package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js} +2 -2
  45. package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-D99K7hWK.js} +2 -2
  46. package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-BF6iP9-o.js} +2 -2
  47. package/dist/client/assets/DevicePanel-BzIRsUjQ.js +2 -0
  48. package/dist/client/assets/DeviceSetup-DQqwNSXQ.js +2 -0
  49. package/dist/client/assets/DialogTitle-BNEjkHZl.js +2 -0
  50. package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-DOn5F9Vx.js} +3 -3
  51. package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-C7d_tSjH.js} +2 -2
  52. package/dist/client/assets/DiffPanel-zzTYLQBt.js +2 -0
  53. package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-CHaL1Ona.js} +3 -3
  54. package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-DZezJSS1.js} +8 -8
  55. package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-BrYDn6tR.js} +2 -2
  56. package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-BsOIEd28.js} +2 -2
  57. package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-B07Bu4_g.js} +2 -2
  58. package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-Ua5R3Une.js} +2 -2
  59. package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-CAhD0qa4.js} +2 -2
  60. package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-Ptxxfl5h.js} +6 -6
  61. package/dist/client/assets/FoldedSettingsSection-C-4eZXtv.js +2 -0
  62. package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-BiCUaNcl.js} +2 -2
  63. package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-MsC8mniI.js} +2 -2
  64. package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-D8Idteuf.js} +2 -2
  65. package/dist/client/assets/Input-BtekXNnW.js +2 -0
  66. package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-Aqwzi0Sz.js} +2 -2
  67. package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +1 -0
  68. package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-CkU_KXkd.js} +2 -2
  69. package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-DLs66X2w.js} +2 -2
  70. package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-DNTed1xn.js} +2 -2
  71. package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BOSadp0O.js} +2 -2
  72. package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-qg2nPaOP.js} +2 -2
  73. package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-CQIJcmq4.js} +2 -2
  74. package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-B_2pC76G.js} +2 -2
  75. package/dist/client/assets/ModelLiveLayer-BdDN1RwJ.js +3 -0
  76. package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-DkFZrX8t.js} +2 -2
  77. package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-DF_hOTNF.js} +2 -2
  78. package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-DIDw2XWy.js} +2 -2
  79. package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-DX7_CzKu.js} +2 -2
  80. package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-mHLqolvI.js} +2 -2
  81. package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-Suig0WTF.js} +2 -2
  82. package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-naPvNZLz.js} +2 -2
  83. package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-D2rgfUAh.js} +2 -2
  84. package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-7rnsehAx.js} +2 -2
  85. package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +216 -0
  86. package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-0R4z7KQU.js} +2 -2
  87. package/dist/client/assets/PopoverHandle-BxV9_kh8.js +2 -0
  88. package/dist/client/assets/PreviewPanel-DCN5UudG.js +2 -0
  89. package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +2 -0
  90. package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-DJmxMkvz.js} +3 -3
  91. package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-3Bcbbvvc.js} +2 -2
  92. package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-Bb9wZVNY.js} +2 -2
  93. package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-mgY-tn0M.js} +2 -2
  94. package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +2 -0
  95. package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-CGySH9bP.js} +2 -2
  96. package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +6 -0
  97. package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-Ddcb7a4G.js} +2 -2
  98. package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-CUrcvaQB.js} +2 -2
  99. package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-DiLAhy4C.js} +2 -2
  100. package/dist/client/assets/RenderErrorBoundary-DNjP1Gq4.js +23 -0
  101. package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-BKZPxtjZ.js} +2 -2
  102. package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-CAdpUQd9.js} +2 -2
  103. package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +6 -0
  104. package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-CjWqxV6P.js} +2 -2
  105. package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-BNGMax5h.js} +2 -2
  106. package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-F_2AS4sm.js} +2 -2
  107. package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +2 -0
  108. package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection-dyJbezur.js} +2 -2
  109. package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-BwrWyM3f.js} +7 -7
  110. package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DWRYwc9b.js} +2 -2
  111. package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-DpC9Q9ae.js} +2 -2
  112. package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-ByWEF0y2.js} +2 -2
  113. package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-BsP9x4U3.js} +2 -2
  114. package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-BONiqXri.js} +2 -2
  115. package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-CLTZIB-s.js} +2 -2
  116. package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-C7o3GtWa.js} +3 -3
  117. package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-Bq_XM62t.js} +40 -40
  118. package/dist/client/assets/ThreadTerminalDrawer-CD5oxZhC.js +5 -0
  119. package/dist/client/assets/TooltipProvider-DPt8xz_3.js +2 -0
  120. package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-BS_wwVFT.js} +2 -2
  121. package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CpDVNtuT.js} +2 -2
  122. package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-BWztABfX.js} +2 -2
  123. package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-4IVaqPOG.js} +2 -2
  124. package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-BHensDdi.js} +2 -2
  125. package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-CCJOwHlv.js} +2 -2
  126. package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-C9Tpr_np.js} +2 -2
  127. package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-DO1k5hPx.js} +2 -2
  128. package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-DR5ebldd.js} +2 -2
  129. package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-D6Kx02Ci.js} +2 -2
  130. package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-B7xQdu1d.js} +2 -2
  131. package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-vpRi9ruy.js} +2 -2
  132. package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-BPr-N_Eh.js} +2 -2
  133. package/dist/client/assets/_chat-B7MuBHoN.js +47 -0
  134. package/dist/client/assets/{_chat.design-C593M39o.js → _chat.design-JY93KEj-.js} +2 -2
  135. package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-BLQil4HT.js} +2 -2
  136. package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-BUUjlaam.js} +3 -3
  137. package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +2 -0
  138. package/dist/client/assets/{alert-BdISKl4u.js → alert-Eh-IusVP.js} +2 -2
  139. package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-BxwvNOYD.js} +2 -2
  140. package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-Bk8CvVQ5.js} +2 -2
  141. package/dist/client/assets/assets-w0TTeveX.js +2 -0
  142. package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-CQgs_U0x.js} +2 -2
  143. package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-BD9wK52f.js} +2 -2
  144. package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-CDoyvSyH.js} +2 -2
  145. package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-BOsv4n_B.js} +2 -2
  146. package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-BJsEk7ze.js} +2 -2
  147. package/dist/client/assets/{command-CeMH9lgx.js → command-Cg83G2rG.js} +2 -2
  148. package/dist/client/assets/{connect-CQUjsv6p.js → connect-C7ENaX3L.js} +2 -2
  149. package/dist/client/assets/connect-agent-BEYL9KOm.js +2 -0
  150. package/dist/client/assets/{design-BL2REeQ-.js → design-pZfTAgOJ.js} +2 -2
  151. package/dist/client/assets/{device-DUMKyegd.js → device-CG5GzxuX.js} +2 -2
  152. package/dist/client/assets/{dialog-BzESHWgr.js → dialog-wBelv1Ac.js} +2 -2
  153. package/dist/client/assets/diffPanelStore-C8bCQWTi.js +2 -0
  154. package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-C_l9f0DJ.js} +2 -2
  155. package/dist/client/assets/{dist--Lo1A95S.js → dist-1X_vspyy.js} +3 -3
  156. package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-BhYlt4Pu.js} +2 -2
  157. package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-C9zEhnho.js} +2 -2
  158. package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic--1QgBotz.js} +3 -3
  159. package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-B_jWJYkI.js} +2 -2
  160. package/dist/client/assets/{empty-CeYEMFdG.js → empty-CJnssipy.js} +2 -2
  161. package/dist/client/assets/entities-CRXY8xy3.js +2 -0
  162. package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-Bg40qEqI.js} +2 -2
  163. package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-C_MZA2Fb.js} +2 -2
  164. package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
  165. package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-PLuWhYlb.js} +2 -2
  166. package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DNX1FsUO.js} +2 -2
  167. package/dist/client/assets/index-BeP8Inse.js +3 -0
  168. package/dist/client/assets/{input-K95B1E2P.js → input-Cd-93Wp0.js} +2 -2
  169. package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-CsS-Psw7.js} +2 -2
  170. package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-DB5SHS11.js} +2 -2
  171. package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-DBugaGH3.js} +2 -2
  172. package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-8c6T_8yh.js} +4 -4
  173. package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-DtOhACEQ.js} +2 -2
  174. package/dist/client/assets/{link-B57I0_wC.js → link-BrJlIcQX.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN6Qis59.js} +2 -2
  176. package/dist/client/assets/main-CNyrs4J_.js +37 -0
  177. package/dist/client/assets/main-h6l_SQzg.css +2 -0
  178. package/dist/client/assets/mediaReference-CJpFszQ0.js +2 -0
  179. package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-D0cInV6V.js} +2 -2
  180. package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-BmBrNhLd.js} +2 -2
  181. package/dist/client/assets/number-field-CSK9SRbZ.js +2 -0
  182. package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-CFw3_anS.js} +2 -2
  183. package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-Eqww5SU9.js} +2 -2
  184. package/dist/client/assets/openFileInPreview-D0wySgTe.js +2 -0
  185. package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-BBI5SxD4.js} +2 -2
  186. package/dist/client/assets/{pair-Bc34xPWk.js → pair-DQR36eTM.js} +2 -2
  187. package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-Dxq1oBH6.js} +2 -2
  188. package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-DLo78qRr.js} +2 -2
  189. package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-uaZzWTro.js} +2 -2
  190. package/dist/client/assets/{popover-CtPuvMeZ.js → popover-DU7x_UNP.js} +2 -2
  191. package/dist/client/assets/{preview-DIIM6Lws.js → preview-CiDRJw3K.js} +2 -2
  192. package/dist/client/assets/{preview-CS0uw3GP.js → preview-DpJtvz_q.js} +2 -2
  193. package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +2 -0
  194. package/dist/client/assets/primary-B5Ds-X9y.js +2 -0
  195. package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +2 -0
  196. package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +2 -0
  197. package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-BvwaSAI1.js} +2 -2
  198. package/dist/client/assets/providerSkills-BzFbjrTC.js +2 -0
  199. package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-D9w_E_Dv.js} +3 -3
  200. package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-gBL3Yt9x.js} +2 -2
  201. package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CDUFfLmu.js} +2 -2
  202. package/dist/client/assets/pullRequests-BZ7PzmTm.js +2 -0
  203. package/dist/client/assets/queries-CzRpIoRQ.js +2 -0
  204. package/dist/client/assets/query-B8d0w621.js +2 -0
  205. package/dist/client/assets/radio-group-XlBZKXvU.js +2 -0
  206. package/dist/client/assets/relay-BWVOLzv_.js +2 -0
  207. package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-B6SrQg1c.js} +2 -2
  208. package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-BuudmoUr.js} +2 -2
  209. package/dist/client/assets/runtime-DYDOkR3G.js +7 -0
  210. package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DyiI0NS9.js} +2 -2
  211. package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-DK9Z9azP.js} +3 -3
  212. package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-B1iVi_db.js} +2 -2
  213. package/dist/client/assets/{select-BtqP8nTL.js → select-Dn3MxyiK.js} +2 -2
  214. package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-D5ELz2sX.js} +2 -2
  215. package/dist/client/assets/server-DQkamj54.js +2 -0
  216. package/dist/client/assets/session-A0FOa5Fv.js +2 -0
  217. package/dist/client/assets/session-logic-21koHfxl.js +27 -0
  218. package/dist/client/assets/{settings-A-pqSt1Y.js → settings-RZUSGfch.js} +2 -2
  219. package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-C2NUZQFB.js} +2 -2
  220. package/dist/client/assets/settings.archived-BOhwFyi3.js +2 -0
  221. package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-BhT0XlhO.js} +2 -2
  222. package/dist/client/assets/settings.connections-CVIPNlOU.js +2 -0
  223. package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-GIrtB4_J.js} +2 -2
  224. package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-BBnbf4E4.js} +2 -2
  225. package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-BrpJ4wJk.js} +2 -2
  226. package/dist/client/assets/settings.diagnostics-H0YPr7JD.js +2 -0
  227. package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CuMxiE8w.js} +2 -2
  228. package/dist/client/assets/settings.integrations-bw-NYX6w.js +2 -0
  229. package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-Mqx8YmX-.js} +2 -2
  230. package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DppmDqdO.js} +2 -2
  231. package/dist/client/assets/settings.plugins-PhsBK5Nz.js +5 -0
  232. package/dist/client/assets/settings.projects-DvjxFMyV.js +4 -0
  233. package/dist/client/assets/settings.providers-DZac28bF.js +3 -0
  234. package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-_8iDYzJF.js} +2 -2
  235. package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-B5WZy_fN.js} +2 -2
  236. package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-BThcjeQt.js} +2 -2
  237. package/dist/client/assets/settings.source-control-Cj9K4HE8.js +2 -0
  238. package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-D3QQPs1U.js} +2 -2
  239. package/dist/client/assets/settingsLayout-LNYGC372.js +3 -0
  240. package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-CCcDCy-Q.js} +2 -2
  241. package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-Bj_Qatcf.js} +2 -2
  242. package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-dlFZVmO8.js} +2 -2
  243. package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-Tyc4OKDH.js} +2 -2
  244. package/dist/client/assets/sourceControlClients-ECBkjM0e.js +2 -0
  245. package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-fU7Q2OR1.js} +2 -2
  246. package/dist/client/assets/src-B7vcPG0D.js +15 -0
  247. package/dist/client/assets/terminal-links-CPJORRle.js +2 -0
  248. package/dist/client/assets/terminalSessions-B00GvWIU.js +2 -0
  249. package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CEng2dlo.js} +2 -2
  250. package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-CcasVi_y.js} +3 -3
  251. package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-D7P5EX0m.js} +2 -2
  252. package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-DN8nwGi8.js} +2 -2
  253. package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-Dx-ruC5S.js} +2 -2
  254. package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-Da633nbs.js} +2 -2
  255. package/dist/client/assets/uiStateStore-aIXF8Zlu.js +2 -0
  256. package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
  257. package/dist/client/assets/{usage-BJA7zQoS.js → usage-DXoXMoKb.js} +2 -2
  258. package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-RRnEiTSy.js} +2 -2
  259. package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-D95Lw1XX.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-3UXG3hMD.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-BkSai4ZH.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-rzE7PQnj.js} +2 -2
  263. package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +2 -0
  264. package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-D7ZCVKu2.js} +2 -2
  265. package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-C6_wm78C.js} +2 -2
  266. package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-iqJmvild.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-CKTZ-MxU.js} +2 -2
  268. package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-DND-Jy5h.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-DFJ-2rdQ.js} +2 -2
  270. package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-EARvZG9w.js} +2 -2
  271. package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-DRrQpPhD.js} +3 -3
  272. package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-Byb-EJOb.js} +2 -2
  273. package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-tXU_0tMY.js} +2 -2
  274. package/dist/client/assets/useSettings-BOuYsEM0.js +3 -0
  275. package/dist/client/assets/utils-DsOiwDNN.js +24 -0
  276. package/dist/client/assets/vcsRefInvalidation-CnjZD1r1.js +2 -0
  277. package/dist/client/assets/welcome-BgxI7gmD.js +2 -0
  278. package/dist/client/index.html +1 -1
  279. package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
  280. package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-C_h8Tda3.mjs} +894 -438
  281. package/dist/{renderer-iWfzRWCX.mjs → renderer-BeTlHpQk.mjs} +2 -2
  282. package/dist/{runtime-CllDK9QU.mjs → runtime-BUfUqrrw.mjs} +3 -3
  283. package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-5R-ZfBsl.mjs} +3152 -2949
  284. package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-DurN_FAN.mjs} +1 -1
  285. package/dist/{server-vm1eH-y1.mjs → server-DuD96ZSr.mjs} +347 -228
  286. package/dist/{sha2-9FUhed4s.mjs → sha2-oCwRxj9g.mjs} +13 -7
  287. package/package.json +1 -1
  288. package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
  289. package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
  290. package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
  291. package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
  292. package/dist/client/assets/CheckboxIndicator-CLFg8-A1.js +0 -2
  293. package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
  294. package/dist/client/assets/CollapsiblePanel-BlUD5mJC.js +0 -2
  295. package/dist/client/assets/ComboboxClear-DKHwuDAL.js +0 -2
  296. package/dist/client/assets/CompositeRoot-_C3uLH2F.js +0 -2
  297. package/dist/client/assets/DevicePanel-Dvozgov3.js +0 -2
  298. package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
  299. package/dist/client/assets/DialogTitle-C9j5Tmuy.js +0 -2
  300. package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
  301. package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
  302. package/dist/client/assets/Input-BWhtnCC0.js +0 -2
  303. package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
  304. package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
  305. package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
  306. package/dist/client/assets/PopoverHandle-BwqnKm9Y.js +0 -2
  307. package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
  308. package/dist/client/assets/ProjectDefaultsSettings-rvN_67Gu.js +0 -2
  309. package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
  310. package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
  311. package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
  312. package/dist/client/assets/ScheduledTasksSettings-CvbQDrJp.js +0 -6
  313. package/dist/client/assets/SelectScrollUpArrow-Dj2om6Qx.js +0 -2
  314. package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
  315. package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
  316. package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
  317. package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
  318. package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
  319. package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
  320. package/dist/client/assets/diffPanelStore-B-hQEy6C.js +0 -2
  321. package/dist/client/assets/entities-CpJdh0W5.js +0 -2
  322. package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
  323. package/dist/client/assets/index-BWKkBtFt.js +0 -3
  324. package/dist/client/assets/main-C8b9a0ht.js +0 -37
  325. package/dist/client/assets/main-CCH0X0zL.css +0 -2
  326. package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
  327. package/dist/client/assets/number-field-D6t0GpAB.js +0 -2
  328. package/dist/client/assets/openFileInPreview-DFpXOfx7.js +0 -2
  329. package/dist/client/assets/previewMiniPlayerStore-oJw0qrRM.js +0 -2
  330. package/dist/client/assets/primary-B0bbGdiR.js +0 -2
  331. package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
  332. package/dist/client/assets/projectFilesQueryState-DpLF9eJd.js +0 -2
  333. package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
  334. package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
  335. package/dist/client/assets/queries-DDAXRF4r.js +0 -2
  336. package/dist/client/assets/query-DpmTmXUV.js +0 -2
  337. package/dist/client/assets/radio-group-DSfZzUu8.js +0 -2
  338. package/dist/client/assets/relay-CnLeC-mg.js +0 -2
  339. package/dist/client/assets/runtime-DUPVFypn.js +0 -7
  340. package/dist/client/assets/server-BYnv0CK4.js +0 -2
  341. package/dist/client/assets/session-BryEqNW-.js +0 -2
  342. package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
  343. package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
  344. package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
  345. package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
  346. package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
  347. package/dist/client/assets/settings.plugins-B6My9wD7.js +0 -5
  348. package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
  349. package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
  350. package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
  351. package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
  352. package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
  353. package/dist/client/assets/src-BZzGU-vc.js +0 -15
  354. package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
  355. package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
  356. package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
  357. package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
  358. package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
  359. package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
  360. package/dist/client/assets/utils-Cs97wR6T.js +0 -24
  361. package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
  362. package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
@@ -1,2 +0,0 @@
1
- import{dr as e,rr as t,tr as n,ur as r}from"./runtime-DUPVFypn.js";import{a as i,i as a,o,r as s}from"./fileLinks-LQyYck3z.js";var c=/^(~\/|\.{1,2}\/)/,l=/^(?:[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*\/)+(?:[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*(?::\d+){0,2})?$/u,u=/^[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*\.[\p{L}\p{M}\p{N}_-]+(?::\d+){0,2}$/u,d=/^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/,f=/:\d+(?::\d+)?$/,p=/^\d+(?::\d+)?$/,m=/[\s`]/,h=/[\\/]/,g=/\.[A-Za-z0-9_-]+$/,_=/\d\.\d[^.]*$/,v=/^\d+(?:\.\d+)+$/,y=[`/Users/`,`/home/`,`/tmp/`,`/var/`,`/etc/`,`/opt/`,`/mnt/`,`/Volumes/`,`/private/`,`/root/`,`/usr/`,`/bin/`,`/sbin/`,`/lib/`,`/lib64/`,`/srv/`,`/dev/`,`/proc/`,`/sys/`,`/run/`,`/boot/`,`/media/`,`/workspace/`,`/workspaces/`],b=new Set(`Makefile.makefile.GNUmakefile.Dockerfile.Containerfile.Justfile.justfile.Rakefile.Gemfile.Procfile.Brewfile.Caddyfile.Vagrantfile.Jenkinsfile.Podfile.Fastfile.BUILD.WORKSPACE.LICENSE.LICENCE.COPYING.NOTICE.AUTHORS.CONTRIBUTORS.CHANGELOG.README.CODEOWNERS`.split(`.`)),x=new Set([`localhost`]),S=new Set([`com`,`net`,`org`,`io`,`dev`,`app`,`ai`,`co`,`edu`,`gov`,`mil`,`info`,`biz`,`xyz`,`me`,`tv`,`cc`,`gg`,`chat`,`cloud`,`site`,`online`,`tech`,`store`,`link`]),C=new Set(`uk.de.fr.nl.se.no.fi.dk.pl.ch.at.be.es.it.pt.eu.us.ca.au.nz.jp.kr.cn.br.ru.mx.ie.cz.tr.sg.hk`.split(`.`));function w(e,t){if(e.startsWith(`.`))return!1;let n=e.toLowerCase();if(x.has(n)||v.test(e))return!0;let r=n.split(`.`),i=r.at(-1);return r.length<2||i===void 0?!1:S.has(i)?!0:!t&&C.has(i)}function T(e){let n=e.trim();if(n.length===0||m.test(n))return null;let r=t(n)?n:n.replaceAll(`\\`,`/`),i=f.test(r);if(!i&&!h.test(r))return null;if(!(c.test(r)||r.startsWith(`/`)||t(r))){let e=r.replace(f,``);if(e.endsWith(`/`)||w(e.split(`/`)[0]??e,i))return null;let t=e.replace(/[/\\]+$/,``).split(/[\\/]/).at(-1)??``;if(_.test(t)||!i&&!g.test(t))return null}return r}function E(e){try{return decodeURIComponent(e)}catch{return e}}function D(e){let t=e.trim();return t.startsWith(`<`)&&t.endsWith(`>`)?t.slice(1,-1):t}function O(e){let t=e.indexOf(`#`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t):``,i=n.indexOf(`?`);return{path:i>=0?n.slice(0,i):n,hash:r}}function k(e,n){let r=P(n);if(!r)return!1;let i=e=>e.replaceAll(`\\`,`/`).replace(/^\.\//,``).replace(/\/+$/,``),a=o(e.trim());if(a.line!==void 0&&a.line!==r.line||a.column!==void 0&&a.column!==r.column)return!1;let s=i(a.path),c=i(r.path);return s.length===0||(t(r.path)&&(s=s.toLowerCase(),c=c.toLowerCase()),c===s||c.endsWith(`/${s}`))}function A(e){return c.test(e)||!e.startsWith(`/`)&&!t(e)}function j(e){if(!e.startsWith(`/`))return!1;if(y.some(t=>e.startsWith(t))||f.test(e))return!0;let t=e.slice(e.lastIndexOf(`/`)+1);return b.has(t)||g.test(t)}function M(e,n){return t(e)||c.test(e)?!0:e.startsWith(`/`)?j(n):b.has(e)?!0:l.test(n)||u.test(e)}function N(e){if(t(e))return!1;let n=e.match(d);if(!n)return!1;let r=n[2]??``;return r.startsWith(`//`)?!0:!p.test(r)}function P(e){let t=D(e);if(t.length===0||t.startsWith(`#`)||t.startsWith(`//`))return null;let n=(t.toLowerCase().startsWith(`file:`)?a(t):null)??O(t),i=r(E(n.path.trim())),s=E(n.hash.trim());if(i.length===0||N(i))return null;let c=o(i,s);return M(c.path,i)?c:null}var F=/(```[\s\S]*?(?:```|$))/,I=/`([^`\n]+)`/g;function L(e){let t=[],n=e.split(F);for(let e=0;e<n.length;e+=2)for(let r of(n[e]??``).matchAll(I)){let e=r[1]?.trim();e&&t.push(e)}return t}function R(e,t){let n=-1,r=-1;return i=>(i>=n&&i<=r||(t.lastIndex=i,n=i,r=t.exec(e)?.index??e.length),r)}function z(e){let t=R(e,/\S/g),n=R(e,/["']/g),r=R(e,/\S/g);return i=>{let a=t(i);if(e[a]===`)`)return a+1;if(a===i||e[a]!==`"`&&e[a]!==`'`)return null;let o=n(a+1);if(o===e.length)return null;let s=r(o+1);return e[s]===`)`?s+1:null}}function B(e){let t=R(e,/\S/g),n=R(e,/[>\n]/g),r=R(e,/[\s)]/g),i=z(e),a=z(e);return o=>{if(e[o]!==`(`)return null;let s=t(o+1);if(e[s]===`<`){let t=n(s+1);if(t>s+1&&e[t]===`>`){let e=i(t+1);if(e!==null)return{hrefStart:s+1,hrefEnd:t,end:e}}}let c=r(s);if(c===s)return null;let l=a(c);return l===null?null:{hrefStart:s,hrefEnd:c,end:l}}}function V(e){let t=[],n=B(e),r=0;for(;r<e.length;){let i=e.indexOf(`[`,r);if(i===-1)break;let a=e.indexOf(`]`,i+1);if(a===-1)break;r=a+1;let o=n(r);if(!o)continue;r=o.end;let s=e.slice(o.hrefStart,o.hrefEnd).trim();s&&t.push(s)}return t}function H(t,r,a=r){if(!t)return null;let o=P(t);if(!o)return null;let c=s(o);return A(c)?a?i(c,a):null:n(o.path)&&e(o.path,r)===null?null:c}function U(e){return/^[A-Za-z]:[\\/]/.test(E(e))}function W(e){let n=t(e)||e.startsWith(`//`),r=n?e.replaceAll(`\\`,`/`):e,i=n?/^(?:[a-z]:\/|\/\/[^/]+\/[^/]+(?:\/|$))/i.exec(r)?.[0]:r.startsWith(`/`)?`/`:void 0;if(!i)return;let a=[];for(let e of r.slice(i.length).split(`/`))e&&e!==`.`&&(e===`..`?a.pop():a.push(e));let o=i.replace(/\/$/,``);return{root:n?o.toLowerCase():o,segments:a,windows:n}}function G(e,t){let n=W(e),r=t?W(t):void 0;return!n||!r||n.windows!==r.windows||n.root!==r.root||n.segments.length<=r.segments.length||!r.segments.every((e,t)=>r.windows?e.toLowerCase()===n.segments[t]?.toLowerCase():e===n.segments[t])?{kind:`file`,path:e}:{kind:`file`,path:e,relativePath:n.segments.slice(r.segments.length).join(`/`)}}function K(e){if(/^(?:https?:\/\/|\/\/)/i.test(e))try{let t=new URL(e.startsWith(`//`)?`https:${e}`:e);return t.protocol===`http:`||t.protocol===`https:`?{kind:`url`,url:e}:void 0}catch{return}}function q(e){if(e.kind===`file`){let n=t(e.path)||e.path.startsWith(`//`);return e.path.split(n?/[\\/]/:`/`).at(-1)||void 0}let n;try{let t=e.url;n=new URL(t.startsWith(`//`)?`https:${t}`:t).pathname.split(`/`).at(-1)}catch{return}return n?E(n):void 0}export{V as a,A as c,H as d,E as f,L as i,U as l,q as n,T as o,O as p,K as r,k as s,G as t,D as u};
2
- //# sourceMappingURL=mediaReference-BIsAfUoY.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Aa as i,Bn as a,Gn as o,Ka as s,Ma as c,Or as l,Qa as u,Sa as d,Sd as f,Ua as p,Un as m,Va as h,Wa as g,Ya as _,Yd as v,ao as y,ba as b,ca as x,fa as S,fo as C,ha as w,io as T,ja as E,la as ee,oo as D,ro as O,sa as te,so as k,t as A,ua as j,uo as ne,xa as M,za as N,zn as P}from"./utils-Cs97wR6T.js";import{d as F,f as re,n as ie,u as ae}from"./useRender-BP5vR6yH.js";import{t as oe}from"./useRegisterFieldControl-BMmbsxkx.js";import{t as se}from"./FormContext-CXpUoAJn.js";import{a as ce}from"./CSPContext-jKZ42W4p.js";var I=e(t());function le(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}var ue=I.createContext(void 0);function de(){let e=I.useContext(ue);if(e===void 0)throw Error(re(43));return e}var L={inputValue:()=>null,value:()=>null,...o},fe=new Map;function R(e,t){let n=JSON.stringify({locale:e,options:t}),r=fe.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return fe.set(n,i),i}function z(e,t,n){return e==null?``:R(t,n).format(e)}function pe(e,t,n){return z(e,t,{...n,maximumFractionDigits:20})}var B=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],me={零:`0`,〇:`0`,一:`1`,二:`2`,三:`3`,四:`4`,五:`5`,六:`6`,七:`7`,八:`8`,九:`9`},he=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],V=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],H=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],ge=[`%`,`٪`,`%`,`﹪`],_e=[`‰`,`؉`],ve=[`−`,`-`,`‒`,`–`,`—`,`﹣`],U=[`+`,`﹢`],ye=RegExp(`[${he.join(``)}]`,`g`),W=RegExp(`[${V.join(``)}]`,`g`),be=RegExp(`[${H.join(``)}]`,`g`),xe=RegExp(`[${B.join(``)}]`,`g`),G=RegExp(`[${ge.join(``)}]`),K=RegExp(`[${_e.join(``)}]`),Se=/[٠١٢٣٤٥٦٧٨٩]/,Ce=/[۰۱۲۳۴۵۶۷۸۹]/,we=/[零〇一二三四五六七八九]/,Te=RegExp(`[${H.join(``)}]`),Ee=[`.`,`,`,`.`,`,`,`٫`,`٬`],De=/\p{Zs}/u,Oe=[`+`,...U],ke=[`-`,...ve],q=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Ae=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),je=e=>`[${e.map(Ae).join(``)}]`,Me=je([`-`].concat(ve)),Ne=je([`+`].concat(U)),Pe=new RegExp(Me,`gu`),J=new RegExp(Ne,`gu`),Y=new RegExp(Me),X=new RegExp(Ne);function Fe(e,t){let n=R(e,t).formatToParts(11111.1),r={};return n.forEach(e=>{r[e.type]=e.value}),R(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(r[e.type]=e.value)}),r}function Z(e,t,n){if(e==null)return null;let r=String(e).replace(/\p{Cf}/gu,``).trim();r=r.replace(Pe,`-`).replace(J,`+`);let i=!1,a=r.match(/([+-])\s*$/);a&&(a[1]===`-`&&(i=!0),r=r.replace(/([+-])\s*$/,``));let o=r.match(/^\s*([+-])/);o&&(o[1]===`-`&&(i=!0),r=r.replace(/^\s*[+-]/,``));let s=t;s===void 0&&(Se.test(r)||Ce.test(r)?s=`ar`:we.test(r)&&(s=`zh`));let{group:c,decimal:l,currency:u}=Fe(s,n),d=R(s,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>q(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;c&&(p=/\p{Zs}/u.test(c)?/\p{Zs}/gu:c===`'`||c===`’`?/['’]/g:new RegExp(q(c),`g`));let m=[{regex:c?p:null,replacement:``},{regex:l?new RegExp(q(l),`g`):null,replacement:`.`},{regex:/./g,replacement:`.`},{regex:/,/g,replacement:``},{regex:/٫/g,replacement:`.`},{regex:/٬/g,replacement:``},{regex:u?new RegExp(q(u),`g`):null,replacement:``},{regex:f,replacement:``},{regex:ye,replacement:e=>String(he.indexOf(e))},{regex:W,replacement:e=>String(V.indexOf(e))},{regex:be,replacement:e=>String(H.indexOf(e))},{regex:xe,replacement:e=>me[e]}].reduce((e,{regex:t,replacement:n})=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=G.test(e)||v===`percent`;return K.test(e)?_/=1e3:!y&&b&&(_/=100),Number.isNaN(_)?null:_}var Ie=1e-10;function Le(e){let t=R(`en-US`).resolvedOptions(),n=e?.minimumFractionDigits??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max(e?.maximumFractionDigits??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Re(e,t){if(!Number.isFinite(e))return e;let n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function Q(e,t){let{maximumFractionDigits:n}=Le(t);return Re(e,n)}function ze(e,t,n,r=`directional`){if(n===0)return e;let i=Math.abs(n),a=Math.sign(n),o=i*Ie*a,s=r===`nearest`?n:i,c=(e-t+o)/s,l;return l=r===`nearest`?Math.round(c):a>0?Math.floor(c):Math.ceil(c),t+l*(r===`nearest`?n:i)}function Be(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:i,format:a,snapOnStep:o,small:s,clamp:c}){if(e===null)return e;let l=c?ce(e,n,r):e;if(t!=null&&o){if(t===0)return Q(l,a);let e=i;return!s&&n!==-(2**53-1)&&(e=n),Q(ze(l,e,t,s?`nearest`:`directional`),a)}return Q(l,a)}var $=e(r()),Ve=I.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:o=1,largeStep:s=10,required:c=!1,disabled:l=!1,readOnly:u=!1,form:d,name:f,defaultValue:h,value:v,onValueChange:y,onValueCommitted:b,allowWheelScrub:T=!1,snapOnStep:D=!1,allowOutOfRange:O=!1,format:k,locale:A,render:ne,className:M,inputRef:F,style:re,...oe}=e,{setDirty:se,validityData:ce,disabled:de,setFilled:fe,invalid:R,name:pe,state:B,validation:me,shouldValidateOnChange:he}=m(),V=de||l,H=pe??f,ve=o===`any`?1:o,[U,ye]=I.useState(!1),W=r??-(2**53-1),be=i??2**53-1,xe=r??0,G=k?.style,K=I.useRef(null),Se=ae(F,me.inputRef),Ce=P({id:n}),[we,Te]=_({controlled:v,default:h,name:`NumberField`,state:`value`}),q=we??null,Ae=j(q);p(()=>{fe(q!==null)},[fe,q]);let je=le(),Me=j(k),Ne=I.useRef(!1),Pe=g((e,t)=>{Ne.current=!1,b?.(e,t)}),J=I.useRef(!0),Y=I.useRef(null),[X,Z]=I.useState(()=>v===void 0?z(q,A,k):He(q,A,k)),[Ie,Le]=I.useState(`numeric`),Re=g(()=>{let{decimal:e,group:t,currency:n,literal:r}=Fe(A,k),i=new Set;Ee.forEach(e=>i.add(e)),e&&i.add(e),t&&(i.add(t),De.test(t)&&i.add(` `));let a=G===`percent`||G===`unit`&&k?.unit===`percent`,o=G===`percent`||G===`unit`&&k?.unit===`permille`;return a&&ge.forEach(e=>i.add(e)),o&&_e.forEach(e=>i.add(e)),G===`currency`&&n&&i.add(n),r&&(Array.from(r).forEach(e=>i.add(e)),De.test(r)&&i.add(` `)),Oe.forEach(e=>i.add(e)),W<0&&ke.forEach(e=>i.add(e)),i}),Q=g(e=>e?.altKey?a:e?.shiftKey?s:ve),ze=g((e,t)=>{let n=t.event,r=t.direction,i=t.reason,a=!O||i!==`input-change`&&i!==`input-blur`&&i!==`input-paste`&&i!==`input-clear`&&i!==`none`,o=Be(e,{step:r?Q(n)*r:void 0,format:Me.current,minWithDefault:W,maxWithDefault:be,minWithZeroDefault:xe,snapOnStep:D,small:n?.altKey??!1,clamp:a}),s=t.reason===`input-change`||t.reason===`input-clear`||t.reason===`input-blur`||t.reason===`input-paste`||t.reason===`none`,c=o!==q||s&&(e!==q||J.current===!1);if(c){if(Y.current=o,y?.(o,t),t.isCanceled)return c;Te(o),se(o!==ce.initialValue),Ne.current=!0}return J.current&&Z(z(o,A,k)),je(),c}),Ve=g((e,{direction:t,currentValue:n,event:i,reason:a})=>{let o=n??Ae.current,s=typeof o==`number`?o+e*t:Math.max(0,r??0);return ze(s,E(a,i,void 0,{direction:t}))});p(function(){if(!J.current)return;let e=v===void 0?z(q,A,k):He(q,A,k);e!==X&&Z(e)}),p(function(){if(!N)return;let e=`text`;W>=0&&(e=`decimal`),Le(e)},[W,G]),I.useEffect(function(){let e=K.current;if(V||u||!T||!e)return;function t(e){if(e.ctrlKey||w(ee(K.current))!==K.current)return;e.preventDefault(),J.current=!0;let t=Q(e)??1;Ve(t,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`})}return S(e,`wheel`,t)},[T,Ve,V,u,Q]);let Ue=I.useMemo(()=>({...B,disabled:V,readOnly:u,required:c,value:q,inputValue:X,scrubbing:U}),[B,V,u,c,q,X,U]),We=I.useMemo(()=>({inputRef:K,inputValue:X,value:q,minWithDefault:W,maxWithDefault:be,disabled:V,readOnly:u,id:Ce,setValue:ze,incrementValue:Ve,getStepAmount:Q,allowInputSyncRef:J,formatOptionsRef:Me,valueRef:Ae,lastChangedValueRef:Y,hasPendingCommitRef:Ne,name:H,required:c,invalid:R,inputMode:Ie,getAllowedNonNumericKeys:Re,min:r,max:i,setInputValue:Z,locale:A,isScrubbing:U,setIsScrubbing:ye,state:Ue,onValueCommitted:Pe}),[K,X,q,W,be,V,u,Ce,ze,Ve,Q,Me,Ae,H,c,R,Ie,Re,r,i,Z,A,U,Ue,Pe]),Ge=ie(`div`,e,{ref:t,state:Ue,props:oe,stateAttributesMapping:L});return(0,$.jsxs)(ue.Provider,{value:We,children:[Ge,(0,$.jsx)(`input`,{...me.getInputValidationProps({onFocus(){K.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||V||u){e.preventBaseUIHandler?.();return}let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=E(C,e.nativeEvent);se(n!==ce.initialValue),ze(n,r),he()&&me.commit(n)}}),ref:Se,type:`number`,form:d,name:H,value:q??``,min:r,max:i,step:o,disabled:V,required:c,"aria-hidden":!0,tabIndex:-1,style:H?x:te,suppressHydrationWarning:!0})]})});function He(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?z(e,t,n):pe(e,t,n)}var Ue=I.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=de();return ie(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:L})}),We=0,Ge=class e extends M{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==We&&(clearInterval(this.currentId),this.currentId=We)}};function Ke(){let e=F(Ge.create).current;return i(e.disposeEffect),e}var qe=60,Je=400,Ye=8,Xe=50,Ze=3;function Qe(e){return e===`touch`||e===`pen`}function $e(e){let{disabled:t,readOnly:n=!1,tick:r,onStop:i,tickDelay:a=qe,startDelay:o=Je,scrollDistance:c=Ye,elementRef:l}=e,u=d(),f=Ke(),p=d(),m=I.useRef(!1),h=I.useRef(0),_=I.useRef({x:0,y:0}),v=I.useRef(!1),y=I.useRef(!1),b=I.useRef(``),x=I.useRef(()=>{}),C=g(()=>{p.clear(),u.clear(),f.clear(),x.current(),h.current=0});function w(e){C();let t=l.current;if(!t)return;let n=s(t);function c(e){e.preventDefault()}x.current=S(n,`contextmenu`,c),S(n,`pointerup`,e=>{m.current=!1,C(),i?.(e)},{once:!0}),r(e)?u.start(o,()=>{f.start(a,()=>{r(e)||C()})}):C()}return I.useEffect(()=>()=>C(),[C]),{pointerHandlers:{onTouchStart(){v.current=!0},onTouchEnd(){v.current=!1},onPointerDown(e){let r=!e.button||e.button===0;e.defaultPrevented||!r||t||n||(b.current=e.pointerType,y.current=!1,m.current=!0,_.current={x:e.clientX,y:e.clientY},Qe(e.pointerType)?p.start(Xe,()=>{let t=h.current;h.current=0,m.current&&t<Ze?(w(e.nativeEvent),y.current=!0):(y.current=!1,C())}):(e.preventDefault(),w(e.nativeEvent)))},onPointerUp(e){Qe(e.pointerType)&&(m.current=!1)},onPointerMove(e){if(t||n||!Qe(e.pointerType)||!m.current)return;h.current!=null&&(h.current+=1);let{x:r,y:i}=_.current,a=r-e.clientX,o=i-e.clientY;a**2+o**2>c**2&&C()},onMouseEnter(e){e.defaultPrevented||t||n||!m.current||v.current||Qe(b.current)||w(e.nativeEvent)},onMouseLeave(){v.current||C()},onMouseUp(){v.current||C()}},shouldSkipClick:g(e=>e.defaultPrevented?!0:Qe(b.current)?y.current:e.detail!==0)}}function et(e){return e===`touch`||e===`pen`}function tt(e){let{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:i,id:a,incrementValue:o,inputRef:s,inputValue:l,isIncrement:d,locale:f,readOnly:p,setValue:m,valueRef:h,lastChangedValueRef:g,onValueCommitted:_}=e,v=d?O:u;function y(e){t.current=!0;let n=Z(l,f,r.current);n!==null&&(h.current=n,m(n,E(v,e,void 0,{direction:d?1:-1})))}let{pointerHandlers:b,shouldSkipClick:x}=$e({disabled:n||p,elementRef:s,tickDelay:60,startDelay:400,scrollDistance:8,tick(e){let t=i(e)??1;return o(t,{direction:d?1:-1,event:e,reason:v})},onStop(e){let t=g.current??h.current;_(t,c(v,e))}});return{disabled:n,"aria-readonly":p||void 0,"aria-label":d?`Increase`:`Decrease`,"aria-controls":a,tabIndex:-1,style:{WebkitUserSelect:`none`,userSelect:`none`},...b,onClick(e){let t=n||p;if(e.defaultPrevented||t||x(e))return;y(e.nativeEvent);let r=i(e)??1,a=h.current;o(r,{direction:d?1:-1,event:e.nativeEvent,reason:v});let s=g.current??h.current;s!==a&&_(s,c(v,e.nativeEvent))},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||p||!t||n||(y(e.nativeEvent),et(e.pointerType)||s.current?.focus(),b.onPointerDown(e))}}}var nt=I.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,{allowInputSyncRef:c,disabled:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,inputValue:g,locale:_,maxWithDefault:v,readOnly:y,setValue:b,state:x,value:S,valueRef:C,lastChangedValueRef:w,onValueCommitted:T}=de(),E=i||l||S!=null&&S>=v,ee=tt({isIncrement:!0,inputRef:m,inputValue:g,disabled:E,readOnly:y,id:f,setValue:b,getStepAmount:d,incrementValue:p,allowInputSyncRef:c,formatOptionsRef:u,valueRef:C,locale:_,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:D,buttonRef:O}=h({disabled:E,native:a,focusableWhenDisabled:!0}),te=I.useMemo(()=>({...x,disabled:E}),[x,E]);return ie(`button`,e,{ref:[t,O],state:te,props:[ee,s,D],stateAttributesMapping:L})}),rt=I.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,{allowInputSyncRef:c,disabled:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,inputValue:g,minWithDefault:_,readOnly:v,setValue:y,state:b,value:x,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}=de(),E=i||l||x!=null&&x<=_,ee=tt({isIncrement:!1,inputRef:m,inputValue:g,disabled:E,readOnly:v,id:f,setValue:y,getStepAmount:d,incrementValue:p,allowInputSyncRef:c,formatOptionsRef:u,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:D,buttonRef:O}=h({disabled:E,native:a,focusableWhenDisabled:!0}),te=I.useMemo(()=>({...b,disabled:E}),[b,E]);return ie(`button`,e,{ref:[t,O],state:te,props:[ee,s,D],stateAttributesMapping:L})}),it={...o,...L},at=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),ot=I.forwardRef(function(e,t){let{render:n,className:r,style:i,...o}=e,{allowInputSyncRef:s,disabled:u,formatOptionsRef:d,getAllowedNonNumericKeys:f,getStepAmount:p,id:h,incrementValue:g,inputMode:_,inputValue:v,max:x,min:S,name:C,readOnly:w,required:ee,setValue:O,state:te,setInputValue:A,locale:j,inputRef:M,value:N,onValueCommitted:P,lastChangedValueRef:F,hasPendingCommitRef:re,valueRef:ae}=de(),{clearErrors:ce}=se(),{validationMode:le,setTouched:ue,setFocused:L,invalid:fe,shouldValidateOnChange:R,validation:B}=m(),{labelId:me}=a(),he=I.useRef(!1),V=I.useRef(!1);return oe(M,h,N),l(N,e=>{let t=R();ce(C),t&&B.commit(N),!(e===N||t)&&(V.current?V.current=!1:B.commit(N,!0))}),ie(`input`,e,{ref:[t,M],state:te,props:[{id:h,required:ee,disabled:u,readOnly:w,inputMode:_,value:v,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":fe||void 0,"aria-labelledby":me,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||w||u||(L(!0),he.current))return;he.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||w||u)return;ue(!0),L(!1);let t=!s.current,n=re.current;if(s.current=!0,v.trim()===``){O(null,E(D,e.nativeEvent)),le===`onBlur`&&B.commit(null),P(null,c(D,e.nativeEvent));return}let r=d.current,i=Z(v,j,r);if(i===null)return;let a=r?.maximumFractionDigits!=null||r?.minimumFractionDigits!=null,o=r?.maximumFractionDigits,l=a&&typeof o==`number`?Number(i.toFixed(o)):i,f=c(T,e.nativeEvent),p=N!==l,m=t||p||n;le===`onBlur`&&B.commit(l),p&&(V.current=!0,O(l,E(T,e.nativeEvent))),m&&P(l,f);let h=z(l,j,r);(a||i!==N||v!==pe(i,j,r))&&v!==h&&A(h)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){A(t),O(null,E(D,e.nativeEvent));return}let n=f();if(!Array.from(t).every(e=>{let t=e>=`0`&&e<=`9`,r=Se.test(e),i=we.test(e),a=Ce.test(e),o=Te.test(e),s=Y.test(e);return t||r||i||a||o||s||n.has(e)}))return;let r=Z(t,j,d.current);A(t),r!==null&&O(r,E(y,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||w||u)return;let t=e.nativeEvent;s.current=!0;let n=f(),r=n.has(e.key),{decimal:i,currency:a,percentSign:o}=Fe(j,d.current),l=e.currentTarget.selectionStart,m=e.currentTarget.selectionEnd,h=l===0&&m===v.length,_=e=>l!=null&&m!=null&&e>=l&&e<m;if(Y.test(e.key)&&Array.from(n).some(e=>Y.test(e||``))){let e=v.search(Pe),t=e!=null&&e!==-1&&_(e);r=!(Y.test(v)||X.test(v))||h||t}if(X.test(e.key)&&Array.from(n).some(e=>X.test(e||``))){let e=v.search(J),t=e!=null&&e!==-1&&_(e);r=!(Y.test(v)||X.test(v))||h||t}[i,a,o].forEach(t=>{if(e.key===t){let e=v.indexOf(t),n=_(e);r=!v.includes(t)||h||n}});let y=e.key>=`0`&&e.key<=`9`,C=Se.test(e.key),T=we.test(e.key),ee=Ce.test(e.key),D=Te.test(e.key),te=at.has(e.key);if(e.which===229||e.altKey||e.ctrlKey||e.metaKey||r||y||C||D||T||ee||te)return;let k=Z(v,j,d.current),A=p(e)??1;b(e);let M=c(ne,t);e.key===`ArrowUp`?(g(A,{direction:1,currentValue:k,event:t,reason:ne}),P(F.current??ae.current,M)):e.key===`ArrowDown`?(g(A,{direction:-1,currentValue:k,event:t,reason:ne}),P(F.current??ae.current,M)):e.key===`Home`&&S!=null?(O(S,E(ne,t)),P(F.current??ae.current,M)):e.key===`End`&&x!=null&&(O(x,E(ne,t)),P(F.current??ae.current,M))},onPaste(e){if(e.defaultPrevented||w||u)return;e.preventDefault();let t=(e.clipboardData||window.Clipboard).getData(`text/plain`),n=Z(t,j,d.current);n!==null&&(s.current=!1,O(n,E(k,e.nativeEvent)),A(t))}},B.getValidationProps(),o],stateAttributesMapping:it})}),st=n();function ct(e){let t=(0,st.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,className:n,size:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s=I.useId(),c=r??s,l;t[5]===n?l=t[6]:(l=A(`flex w-full flex-col items-start gap-2`,n),t[5]=n,t[6]=l);let u;return t[7]!==c||t[8]!==i||t[9]!==o||t[10]!==l?(u=(0,$.jsx)(Ve,{className:l,"data-size":o,"data-slot":`number-field`,id:c,...i}),t[7]=c,t[8]=i,t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function lt(e){let t=(0,st.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,shape:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o=a===`pill`&&`overflow-hidden rounded-xl before:rounded-xl`,s=a===`soft`&&`rounded-lg border-transparent bg-accent shadow-none before:hidden dark:bg-accent`,c;t[4]!==n||t[5]!==o||t[6]!==s?(c=A(`relative flex w-full justify-between rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-inset has-aria-invalid:border-destructive/36 has-autofill:bg-foreground/4 focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/48 data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-within,[aria-invalid]]:shadow-none`,o,s,n),t[4]=n,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==r||t[9]!==c?(l=(0,$.jsx)(Ue,{className:c,"data-slot":`number-field-group`,...r}),t[8]=r,t[9]=c,t[10]=l):l=t[10],l}function ut(e){let t=(0,st.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`relative flex shrink-0 cursor-pointer items-center justify-center rounded-s-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] in-data-[size=compact]:w-8 in-data-[size=compact]:px-0 px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(f,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,$.jsx)(rt,{className:i,"data-slot":`number-field-decrement`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function dt(e){let t=(0,st.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`relative flex shrink-0 cursor-pointer items-center justify-center rounded-e-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] in-data-[size=compact]:w-8 in-data-[size=compact]:px-0 px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(v,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,$.jsx)(nt,{className:i,"data-slot":`number-field-increment`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function ft(e){let t=(0,st.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`h-8.5 in-data-[size=compact]:h-8 in-data-[size=compact]:px-0 in-data-[size=compact]:leading-8 sm:in-data-[size=compact]:h-8 sm:in-data-[size=compact]:leading-8 in-data-[size=lg]:h-9.5 in-data-[size=sm]:h-7.5 w-full min-w-0 grow bg-transparent in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] text-center tabular-nums in-data-[size=lg]:leading-9.5 in-data-[size=sm]:leading-7.5 leading-8.5 outline-none [transition:background-color_5000000s_ease-in-out_0s] sm:h-7.5 sm:in-data-[size=lg]:h-8.5 sm:in-data-[size=sm]:h-6.5 sm:in-data-[size=lg]:leading-8.5 sm:in-data-[size=sm]:leading-8.5 sm:leading-7.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(ot,{className:i,"data-slot":`number-field-input`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{ft as a,dt as i,ut as n,lt as r,ct as t};
2
- //# sourceMappingURL=number-field-D6t0GpAB.js.map
@@ -1,2 +0,0 @@
1
- import{Ao as e,Fo as t,Lo as n,Ro as r,gs as i,zo as a}from"./utils-Cs97wR6T.js";import{Cp as o,Sp as s,nm as c}from"./src-BZzGU-vc.js";import{Cr as l}from"./runtime-DUPVFypn.js";import{s as u,u as d}from"./rightPanelStore-D-meSGn7.js";import{t as f}from"./mediaReference-BIsAfUoY.js";import{u as p}from"./assets-lJdcWn_Q.js";import"./assetUrls-DyJx-URx.js";import{S as m,c as h,d as g,s as _,x as v}from"./browserHistoryStore-zdRsIuMc.js";var y=e=>/\.(?:html?|pdf)$/i.test(e.split(/[?#]/,1)[0]??``),b=class extends c(`BrowserPreviewUnavailableError`){},x=class extends c(`BrowserSettingsReadError`){get message(){return`Saved browser settings could not be loaded.`}};async function S(s){let c=await g().catch(e=>new x({cause:e}));if(c instanceof x)return i(o(c));let f=m(s.threadRef.environmentId),p=t(s.threadRef).activeTabId,v=()=>u(d.getState().byThreadKey,s.threadRef)?.id??null,y=v(),b=await s.openPreview({environmentId:s.threadRef.environmentId,input:{threadId:s.threadRef.threadId,url:s.url,viewport:h(c),profileId:s.profileId??_(c),...f===void 0?{}:{runtime:f}}});return l(b,i=>{n(s.threadRef,s.url),s.background?(a(s.threadRef,i),p&&t(s.threadRef).activeTabId===i.tabId&&v()===y&&r(s.threadRef,p)):(e(s.threadRef,i),d.getState().openBrowser(s.threadRef,i.tabId))})}async function C(e){if(!v(e.threadRef.environmentId))return i(o(new b({message:`The integrated browser is unavailable in this runtime.`})));let t=f(e.filePath,e.workspaceRoot).relativePath!==void 0,n=await e.createAssetUrl({environmentId:e.threadRef.environmentId,input:{resource:{_tag:t?`workspace-file`:`media-file`,threadId:e.threadRef.threadId,path:e.filePath}}});if(n._tag===`Failure`)return i(n.cause);let r=p(e.httpBaseUrl,n.value.relativeUrl);return r===null?i(s(Error(`The environment returned an invalid asset URL.`))):S({threadRef:e.threadRef,url:r,openPreview:e.openPreview})}export{S as a,C as i,x as n,y as r,b as t};
2
- //# sourceMappingURL=openFileInPreview-DFpXOfx7.js.map
@@ -1,2 +0,0 @@
1
- import{W as e,Xs as t}from"./utils-Cs97wR6T.js";function n(e){return e.kind===`browser`?`browser:${e.tabId}`:`device:${encodeURIComponent(e.hostId)}:${encodeURIComponent(e.deviceId)}`}var r=e=>({kind:`browser`,tabId:e}),i=e()(e=>({byThreadKey:{},open:(r,i)=>e(e=>{let a=t(r),o=e.byThreadKey[a];return o&&n(o.source)===n(i)?e:{byThreadKey:{...e.byThreadKey,[a]:{source:i,position:o?.position??null,width:o?.width??null,lastInteraction:o?.lastInteraction??`drag`}}}}),close:n=>e(e=>{let r=t(n);if(!(r in e.byThreadKey))return e;let{[r]:i,...a}=e.byThreadKey;return{byThreadKey:a}}),move:(r,i,a)=>e(e=>{let o=t(r),s=e.byThreadKey[o];return!s||n(s.source)!==i||s.position?.x===a.x&&s.position.y===a.y&&s.lastInteraction===`drag`?e:{byThreadKey:{...e.byThreadKey,[o]:{...s,position:a,lastInteraction:`drag`}}}}),resize:(r,i,a,o)=>e(e=>{let s=t(r),c=e.byThreadKey[s];return!c||n(c.source)!==i||c.width===a&&c.lastInteraction===`resize`&&(!o||c.position?.x===o.x&&c.position.y===o.y)?e:{byThreadKey:{...e.byThreadKey,[s]:{...c,width:a,position:o??c.position,lastInteraction:`resize`}}}}),removeThread:n=>e(e=>{let r=t(n);if(!(r in e.byThreadKey))return e;let{[r]:i,...a}=e.byThreadKey;return{byThreadKey:a}})}));function a(e,n){return n?e[t(n)]??null:null}export{i,n,a as r,r as t};
2
- //# sourceMappingURL=previewMiniPlayerStore-oJw0qrRM.js.map
@@ -1,2 +0,0 @@
1
- import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Jo as t,Wo as n,as as r,es as i,ls as a,os as o,ws as s}from"./utils-Cs97wR6T.js";import{$r as c,$s as l,Au as u,Hc as d,Hd as f,Up as p,Wd as m,X as h,Xc as g,_c as _,ic as v,lc as y,md as b,pc as x,rt as S,sh as ee}from"./src-BZzGU-vc.js";import{B as C,at as w,in as T,nt as E,on as te}from"./runtime-DUPVFypn.js";var D=v([`fetch-session-state`,`exchange-bootstrap-credential`,`fetch-environment-descriptor`,`create-pairing-credential`,`list-pairing-links`,`revoke-pairing-link`,`list-client-sessions`,`revoke-client-session`,`revoke-other-client-sessions`]),O=class e extends _()(`PrimaryEnvironmentRequestError`,{operation:D,status:y,pairingLinkId:g(x),sessionId:g(x),cause:l()}){static fromCause(t){let n=U(t.cause)??500;return new e({operation:t.operation,status:n,...t.pairingLinkId===void 0?{}:{pairingLinkId:t.pairingLinkId},...t.sessionId===void 0?{}:{sessionId:t.sessionId},cause:t.cause})}get message(){return`Primary environment request failed during ${this.operation} (HTTP ${this.status}).`}},ne=d(O),k=class extends _()(`PrimaryEnvironmentPairingCredentialRejectedError`,{providedLength:y,cause:l()}){get message(){return`Invalid pairing token. Check the token and try again.`}};d(k);var A=class extends _()(`PrimaryEnvironmentAuthSessionTimeoutError`,{timeoutMs:y,elapsedMs:y}){get message(){return`Timed out waiting for authenticated session after bootstrap.`}},j=class extends _()(`PrimaryEnvironmentPairingCredentialRequiredError`,{providedLength:y}){get message(){return`Enter a pairing token to continue.`}},M=d(S),N=null,P=null,F=!1,I=2e3,L=100;function R(){return T(new URL(window.location.href))}function z(){let e=new URL(window.location.href),t=te(e);t.toString()!==e.toString()&&window.history.replaceState({},document.title,t.toString())}function B(){let e=R();return e?(z(),e):null}function V(){let e=(window.desktopBridge?.getLocalEnvironmentBootstraps()??[]).find(e=>e.id===h);return typeof e?.bootstrapToken==`string`&&e.bootstrapToken.length>0?e.bootstrapToken:null}async function H(){return X(async()=>{try{return await C(E.pipe(u(e=>e.auth.session({headers:{}}))))}catch(e){throw O.fromCause({operation:`fetch-session-state`,cause:e})}})}function U(e){return M(e)?W(e):c(e)&&e.response!==void 0?e.response.status:null}function W(e){switch(e._tag){case`EnvironmentRequestInvalidError`:return 400;case`EnvironmentAuthInvalidError`:return 401;case`EnvironmentScopeRequiredError`:case`EnvironmentOperationForbiddenError`:return 403;case`EnvironmentResourceNotFoundError`:return 404;case`EnvironmentInternalError`:return 500}}async function G(e){return X(async()=>{try{return await C(E.pipe(u(t=>t.auth.browserSession({payload:{credential:e}}))))}catch(t){throw M(t)&&t._tag===`EnvironmentAuthInvalidError`&&t.reason===`invalid_credential`?new k({providedLength:e.length,cause:t}):O.fromCause({operation:`exchange-bootstrap-credential`,cause:t})}})}async function K(){let e=Date.now();for(;;){let t=await H();if(t.authenticated)return t;let n=Date.now()-e;if(n>=I)throw new A({timeoutMs:I,elapsedMs:n});await Z(L)}}var q=new Set([502,503,504]),J=15e3,Y=500;async function X(e){let t=Date.now();for(;;)try{return await e()}catch(e){if(!re(e)||Date.now()-t>=J)throw e;await Z(Y)}}function Z(e){return new Promise(t=>{setTimeout(t,e)})}function re(e){return ne(e)?q.has(e.status):e instanceof TypeError||e instanceof DOMException&&e.name===`AbortError`}async function Q(e){let t=await H();if(t.authenticated&&!e)return{status:`authenticated`};let n=e??V();if(!n)return{status:`requires-auth`,auth:t.auth};try{return await G(n),await K(),{status:`authenticated`}}catch(e){return{status:`requires-auth`,auth:t.auth,errorMessage:e instanceof Error?e.message:`Authentication failed.`}}}async function ie(e){let t=e.trim();if(!t)throw new j({providedLength:e.length});P=null,await G(t),await K(),P={status:`authenticated`},N=null,F=!1,z()}async function ae(e){let t=e?.label?.trim();try{return await C(E.pipe(u(n=>n.auth.pairingCredential({headers:{},payload:{...t?{label:t}:{},...e?.scopes?{scopes:e.scopes}:{}}}))))}catch(e){throw O.fromCause({operation:`create-pairing-credential`,cause:e})}}async function oe(e){try{await C(E.pipe(u(t=>t.auth.revokePairingLink({headers:{},payload:{id:e}}))))}catch(t){throw O.fromCause({operation:`revoke-pairing-link`,pairingLinkId:e,cause:t})}}async function se(e){try{await C(E.pipe(u(t=>t.auth.revokeClient({headers:{},payload:{sessionId:e}}))))}catch(t){throw O.fromCause({operation:`revoke-client-session`,sessionId:e,cause:t})}}async function ce(){try{return(await C(E.pipe(u(e=>e.auth.revokeOtherClients({headers:{}}))))).revokedCount}catch(e){throw O.fromCause({operation:`revoke-other-client-sessions`,cause:e})}}async function le(){if(window.location.pathname.replace(/\/+$/,``)===`/pair`?R()&&(F=!0):F=!1,F)return{status:`requires-auth`,auth:(await H()).auth};let e=B(),t=N;if(e)P=null;else{if(t)return t;if(P?.status===`authenticated`)return P}let n=t?t.catch(()=>void 0).then(()=>(P=null,Q(e))):Q(e);return N=n,n.then(e=>(N===n&&e.status===`authenticated`&&(P=e),e)).finally(()=>{N===n&&(N=null)})}var ue=e(),$=i(m(()=>w()?f(null):b(H))).pipe(o({staleTime:5e3,revalidateOnMount:!0}),r(3e5),a(`primary-environment:session`));function de(){n.refresh($)}function fe(){let e=(0,ue.c)(8),n=t($),r=pe,i=null;if(n._tag===`Failure`){let t;e[0]===n.cause?t=e[1]:(t=p(n.cause),e[0]=n.cause,e[1]=t);let r=t;i=r instanceof Error?r.message:`Could not read environment session.`}let a;e[2]===n?a=e[3]:(a=ee(s(n)),e[2]=n,e[3]=a);let o;return e[4]!==i||e[5]!==n.waiting||e[6]!==a?(o={data:a,error:i,isPending:n.waiting,refresh:r},e[4]=i,e[5]=n.waiting,e[6]=a,e[7]=o):o=e[7],o}function pe(){de()}export{ce as a,z as c,le as i,ie as l,ae as n,se as o,R as r,oe as s,fe as t};
2
- //# sourceMappingURL=primary-B0bbGdiR.js.map
@@ -1,2 +0,0 @@
1
- import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$o as t,Cs as n,Hc as r,Jo as i,Wo as a,Zo as o,as as s,es as c,is as l,ls as u,os as d,rc as f,ws as p}from"./utils-Cs97wR6T.js";import{$u as ee,Bo as te,Cu as m,Gd as h,Hc as g,Pf as _,Po as v,Q as ne,Qd as re,Sc as ie,Tm as ae,Up as oe,Uu as y,Xc as se,_c as ce,at as le,dh as ue,et as de,hd as b,hu as fe,ic as pe,if as me,it as he,ka as ge,n as x,nm as S,nt as C,ot as w,pc as T,rd as E,sh as D,st as O,td as k,zs as A}from"./src-BZzGU-vc.js";import{Ar as j,G as M,Mr as N,V as P,Vr as F,W as I,ci as L,hi as _e,tt as R}from"./runtime-DUPVFypn.js";import{O as ve}from"./useSettings-C6RmJr-q.js";import{i as ye,n as z}from"./session-BryEqNW-.js";var be=e(),xe=class extends ce()(`RelayClientInstallConfirmationConflictError`,{requestedVersion:T,activeVersion:T,activeDialogStatus:pe([`confirming`,`installing`,`closing`]),activeInstallStage:se(ne)}){get message(){return`Cannot confirm relay client installation ${this.requestedVersion}; installation ${this.activeVersion} has dialog status ${this.activeDialogStatus}.`}},B={status:`idle`},V=B,H=null,U=new Set;function W(e){V=e;for(let e of U)e()}function Se(){return V}function Ce(e){return U.add(e),()=>{U.delete(e)}}function we(e){if(V.status!==`idle`){let t=V.status===`closing`?V.view:V;return Promise.reject(new xe({requestedVersion:e,activeVersion:t.version,activeDialogStatus:V.status,...t.status===`installing`?{activeInstallStage:t.stage}:{}}))}return W({status:`confirming`,version:e}),new Promise(e=>{H=e})}function Te(e){if(V.status!==`confirming`||!H)return;let t=H;H=null,W(e?{status:`installing`,version:V.version,stage:`checking`}:{status:`closing`,view:V}),t(e)}function Ee(e){V.status===`installing`&&e.type===`progress`&&W({...V,stage:e.stage})}function De(){H?.(!1),H=null,(V.status===`confirming`||V.status===`installing`)&&W({status:`closing`,view:V})}function Oe(){V.status===`closing`&&W(B)}function G(){return M().relayUrl}var K=class extends S(`CloudEnvironmentLinkError`){},q=e=>t=>new K({message:e,cause:t});function ke(e){return y(function*(){let t=yield*F,n=yield*t.run(e,j(x.cloudGetRelayClientStatus,{})).pipe(E(q(`Could not check relay client availability.`)));if(n.status===`available`)return;if(n.status===`unsupported`)return yield*new K({message:`P4 Code cannot install the relay client automatically on ${n.platform}-${n.arch}.`});if(!(yield*re({try:()=>we(n.version),catch:q(`Could not confirm relay client installation.`)})))return yield*new K({message:`Relay client installation was cancelled.`});let r=yield*t.runStream(e,N(x.cloudInstallRelayClient,{}).pipe(te(e=>h(()=>Ee(e))))).pipe(v,E(q(`Could not install the relay client.`)),m(h(De)));if(ue(r)||r.value.type!==`complete`)return yield*new K({message:`The relay client install completed without a final status.`});let i=r.value.status;if(i.status!==`available`)return yield*new K({message:i.status===`unsupported`?`P4 Code cannot install the relay client automatically on ${i.platform}-${i.arch}.`:`The relay client is still unavailable after installation.`})})}var Ae=g(ie([C,O,le,he,w,de]));function J(e){return t=>{let n=t._tag===`ManagedRelayRequestFailedError`?t:void 0,r=n?.traceId,i=n?_e(n):null;return new K({message:i?`${e}: ${i}`:e,cause:t,...r?{traceId:r}:{}})}}function Y(e){return Ae(e)?e:typeof e!=`object`||!e?null:`cause`in e?Y(e.cause):null}var X=e=>t=>{let n=Y(t);return new K({message:n?`${e.replace(/[.:]$/,``)}: ${n.message}`:e,cause:t})};function je(e){let t=new URL(e);return{localHttpHost:`127.0.0.1`,localHttpPort:Number(t.port||(t.protocol===`https:`?443:80))}}var Me=`cloudflare_tunnel`;function Ne(e){return e.link.environmentId===e.expectedEnvironmentId?e.link.endpoint.providerKind===e.expectedProviderKind?me:new K({message:`Relay returned credentials for a different endpoint provider.`}):new K({message:`Relay returned credentials for a different environment.`})}function Pe(e){return y(function*(){return yield*(yield*f(e.target.httpBaseUrl)).connect.linkState({headers:{}}).pipe(E(X(`Could not read environment cloud link state.`)))}).pipe(b(R))}function Fe(e){return y(function*(){let t=yield*f(e.target.httpBaseUrl),{target:n,...r}=e;return yield*t.connect.preferences({headers:{},payload:r}).pipe(E(X(`Could not update environment cloud preferences.`)))}).pipe(b(R))}function Ie(e){return y(function*(){yield*(yield*f(e.target.httpBaseUrl)).connect.unlink({headers:{}}).pipe(E(X(`Could not unlink the environment from cloud.`))),G()&&e.clerkToken&&(yield*(yield*L).unlinkEnvironment({clerkToken:e.clerkToken,environmentId:A.make(e.target.environmentId)}).pipe(fe(e=>ee(`Could not revoke cloud environment link after local unlink.`,{cause:e}))))}).pipe(b(R))}var Z=`manual`;function Le(e){return y(function*(){let t=G();if(!t)return yield*new K({message:`P4CODE_RELAY_URL is not configured.`});let n=(e.mode??`managed`)===`managed`,r=n?Me:Z,i=yield*L,a=yield*f(e.target.httpBaseUrl);n&&(yield*ke(A.make(e.target.environmentId)));let o=yield*i.createEnvironmentLinkChallenge({clerkToken:e.clerkToken,payload:{notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:n}}).pipe(E(J(`${t}/v1/client/environment-link-challenges failed`))),s=yield*a.connect.linkProof({headers:{},payload:{challenge:o.challenge,relayIssuer:t,endpoint:{httpBaseUrl:e.target.httpBaseUrl,wsBaseUrl:e.target.wsBaseUrl,providerKind:r},origin:je(e.target.httpBaseUrl)}}).pipe(E(X(`Could not obtain environment link proof.`))),c=yield*i.linkEnvironment({clerkToken:e.clerkToken,payload:{proof:s,notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:n}}).pipe(E(J(`${t}/v1/client/environment-links failed`)));yield*Ne({expectedEnvironmentId:e.target.environmentId,expectedProviderKind:r,link:c}),yield*a.connect.relayConfig({headers:{},payload:{relayUrl:t,relayIssuer:c.relayIssuer,cloudUserId:c.cloudUserId,environmentCredential:c.environmentCredential,cloudMintPublicKey:c.cloudMintPublicKey,endpointRuntime:c.endpointRuntime}}).pipe(E(X(`Could not configure environment relay access.`)))}).pipe(b(R))}var Re=l(_(r,P.contextEffect.pipe(k(e=>ae(e,r))))),Q=o(e=>{let t=JSON.parse(e);return Re.atom(Pe({target:t})).pipe(d({staleTime:5e3,revalidateOnMount:!0}),s(3e5),u(`primary-cloud-link:${t.environmentId}`))}),ze=c(n(null)).pipe(t,u(`primary-cloud-link:null`));function $(e){return JSON.stringify(e)}function Be(e){e&&z(A.make(e.environmentId),`relay:read`)&&a.refresh(Q($(e)))}function Ve(e){if(!z(A.make(e.environmentId),`relay:read`))return null;let t=a.get(Q($(e)));return t._tag===`Success`?t.value:null}function He(){let e=(0,be.c)(17),t=ve(),n=ye(t?.environmentId??null,ge),r;e[0]===t?r=e[1]:(r=t?.entry.target._tag===`PrimaryConnectionTarget`?{environmentId:t.environmentId,label:t.label,httpBaseUrl:t.entry.target.httpBaseUrl,wsBaseUrl:t.entry.target.wsBaseUrl}:null,e[0]=t,e[1]=r);let a=r,o;e[2]!==n||e[3]!==a?(o=a&&I()&&n?Q($(a)):ze,e[2]=n,e[3]=a,e[4]=o):o=e[4];let s=i(o),c;e[5]===a?c=e[6]:(c=()=>{Be(a)},e[5]=a,e[6]=c);let l=c,u=null;if(s._tag===`Failure`){let t;e[7]===s.cause?t=e[8]:(t=oe(s.cause),e[7]=s.cause,e[8]=t);let n=t;u=n instanceof Error?n.message:`Could not read P4 Connect link state.`}let d;e[9]===s?d=e[10]:(d=s._tag===`Failure`?null:D(p(s)),e[9]=s,e[10]=d);let f;return e[11]!==u||e[12]!==l||e[13]!==s.waiting||e[14]!==d||e[15]!==a?(f={data:d,error:u,isPending:s.waiting,refresh:l,target:a},e[11]=u,e[12]=l,e[13]=s.waiting,e[14]=d,e[15]=a,e[16]=f):f=e[16],f}export{Fe as a,Te as c,Ie as i,Ce as l,He as n,Oe as o,Le as r,Se as s,Ve as t};
2
- //# sourceMappingURL=primaryCloudLinkState-B6CxZwAR.js.map
@@ -1,2 +0,0 @@
1
- import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Jo as t,Qo as n,Wo as r,Xo as i,Zo as a,bs as o,es as s,ls as c,qo as l,rs as u,ws as d}from"./utils-Cs97wR6T.js";import{Hc as f,Up as p,dh as m,ji as h,sh as g,uh as _,x as v}from"./src-BZzGU-vc.js";import{xr as y}from"./runtime-DUPVFypn.js";import{s as b}from"./vcsRefInvalidation-CAa5en8i.js";import{G as x}from"./entities-CpJdh0W5.js";import{o as S}from"./queries-DDAXRF4r.js";var C=e(),w=new WeakMap,T=e=>n(e)?e[i].key:e,E=e=>a(t=>u(n=>{if(m(n.self())){let r=w.get(n.registry);r===void 0&&(r=new WeakMap,w.set(n.registry,r)),(r.has(e)?r.get(e)!==t:t!==null&&n.registry.getNodes().has(T(e)))&&n.refresh(e),r.set(e,t)}return n(e)},t=>t(e))),D=new WeakMap,O=e=>{let t=D.get(e);return t===void 0&&(t=E(e),D.set(e,t)),t};function k(e,t){return t===void 0?e:O(e)(t)}var A=``,j=s(o(!1)),M=s(o(!1)).pipe(c(`project-file-query:empty`));function N(e,t,n){return x.optimisticFile({environmentId:e,cwd:t,relativePath:n})}var P=new Map;function F(e){let t=P.get(e);P.delete(e),t?.()}function I(e,t,n){return x.listEntries({environmentId:e,input:{cwd:t,...n===void 0?{}:{directoryPath:n}}})}function L(e,t,n){return x.readFile({environmentId:e,input:{cwd:t,relativePath:n??A}})}function R(e,t,n){return x.readConfiguration({environmentId:e,input:{cwd:t,relativePath:n}})}function z(e,t,n,i){let a=N(e,t,n);P.has(a)||P.set(a,r.mount(a)),r.set(a,{confirmedAgainst:void 0,data:{relativePath:n,contents:i,byteLength:new TextEncoder().encode(i).byteLength,truncated:!1}})}function B(e,t,n){return r.get(N(e,t,n))?.data??null}function V(e,t,n){let i=B(e,t,n);if(i)return i.contents;let a=r.get(L(e,t,n));return _(d(a))?.contents}function H(e,t,n){let i=r.get(N(e,t,n));return i?.confirmedAgainst===void 0?i?.data??null:null}function U(e,t,n,i){let a=N(e,t,n),o=r.get(a);if(o?.data.contents!==i)return!1;let s=L(e,t,n),c={...o,confirmedAgainst:r.get(s)};return r.set(a,c),F(a),r.refresh(s),y(r,s,{reportDefect:!1,reportFailure:!1}).then(async i=>{if(n===`p4.json`){let n=R(e,t,v);r.refresh(n),await y(r,n,{reportDefect:!1,reportFailure:!1})}i._tag===`Success`&&r.get(a)===c&&r.set(a,null)}),!0}function W(e,t,n,i){return n===null?i:r.get(N(e,t,n))?.data??i}function G(e){return e._tag===`Failure`?p(e.cause):null}function K(e){return e===null?null:e instanceof Error?e.message:`Workspace query failed.`}var q=f(h);function J(e,n,r,i){let a=(0,C.c)(22),o=b(e),{canReadFiles:s}=o,c,u,f;a[0]!==s||a[1]!==n||a[2]!==r||a[3]!==e||a[4]!==i?(c=s?I(e,n,r):j,u=t,f=k(c,s?i:void 0),a[0]=s,a[1]=n,a[2]=r,a[3]=e,a[4]=i,a[5]=c,a[6]=u,a[7]=f):(c=a[5],u=a[6],f=a[7]);let p=u(f),m=l(c),h;a[8]===m?h=a[9]:(h=()=>m(),a[8]=m,a[9]=h);let _=h,v;a[10]===p?v=a[11]:(v=g(d(p)),a[10]=p,a[11]=v);let y;a[12]!==s||a[13]!==o.error||a[14]!==o.isPending||a[15]!==p?(y=o.isPending?null:s?K(G(p)):o.error??`This connection cannot read host files.`,a[12]=s,a[13]=o.error,a[14]=o.isPending,a[15]=p,a[16]=y):y=a[16];let x=o.isPending||p.waiting,S;return a[17]!==_||a[18]!==v||a[19]!==y||a[20]!==x?(S={data:v,error:y,isPending:x,refresh:_},a[17]=_,a[18]=v,a[19]=y,a[20]=x,a[21]=S):S=a[21],S}function Y(e,t,n,r,i){let a=(0,C.c)(16),o;a[0]===i?.imageOnly?o=a[1]:(o=i?.imageOnly?{imageOnly:!0}:{},a[0]=i?.imageOnly,a[1]=o);let s;a[2]!==t||a[3]!==e||a[4]!==n||a[5]!==o?(s={environmentId:e,cwd:t,query:n,kind:`file`,...o},a[2]=t,a[3]=e,a[4]=n,a[5]=o,a[6]=s):s=a[6];let c;a[7]===Symbol.for(`react.memo_cache_sentinel`)?(c={allowEmptyQuery:!0},a[7]=c):c=a[7];let l=S(s,r,c),u;a[8]!==l.entries||a[9]!==l.isPending?(u=l.isPending?[]:l.entries,a[8]=l.entries,a[9]=l.isPending,a[10]=u):u=a[10];let d;return a[11]!==l.error||a[12]!==l.isPending||a[13]!==l.searchedQuery||a[14]!==u?(d={entries:u,error:l.error,isPending:l.isPending,matchedQuery:l.searchedQuery},a[11]=l.error,a[12]=l.isPending,a[13]=l.searchedQuery,a[14]=u,a[15]=d):d=a[15],d}function X(e,n,r,i,a){let o=(0,C.c)(36),s=i===void 0||i,c=a!==void 0&&a,u=b(e),{canReadFiles:f}=u,p=s,m;o[0]!==f||o[1]!==c||o[2]!==n||o[3]!==s||o[4]!==e||o[5]!==r?(m=s&&f?c&&r!==null?R(e,n,r):L(e,n,r):M,o[0]=f,o[1]=c,o[2]=n,o[3]=s,o[4]=e,o[5]=r,o[6]=m):m=o[6];let h=m,_=t(h),y=l(h),x;o[7]===y?x=o[8]:(x=()=>y(),o[7]=y,o[8]=x);let S=x,w;o[9]===_?w=o[10]:(w=g(d(_)),o[9]=_,o[10]=w);let T=w,E=T?.relativePath??r??A,D;o[11]!==n||o[12]!==e||o[13]!==E?(D=N(e,n,E),o[11]=n,o[12]=e,o[13]=E,o[14]=D):D=o[14];let O=t(D),k=c?v:A,j;o[15]!==n||o[16]!==e||o[17]!==k?(j=N(e,n,k),o[15]=n,o[16]=e,o[17]=k,o[18]=j):j=o[18];let P=t(j),F=r===null?null:c?P??O:O,I,z,B;if(o[19]!==f||o[20]!==T||o[21]!==u.error||o[22]!==u.isPending||o[23]!==p||o[24]!==F?.data||o[25]!==_){let e=G(_);I=q(e)?e:null,B=f?F?.data??T:null,z=!p||u.isPending?null:f?K(e):u.error??`This connection cannot read host files.`,o[19]=f,o[20]=T,o[21]=u.error,o[22]=u.isPending,o[23]=p,o[24]=F?.data,o[25]=_,o[26]=I,o[27]=z,o[28]=B}else I=o[26],z=o[27],B=o[28];let V=p&&(u.isPending||_.waiting),H=I?.failure===`path_not_file`,U;return o[29]!==I||o[30]!==S||o[31]!==z||o[32]!==V||o[33]!==H||o[34]!==B?(U={data:B,error:z,isPending:V,readError:I,isNotFile:H,refresh:S},o[29]=I,o[30]=S,o[31]=z,o[32]=V,o[33]=H,o[34]=B,o[35]=U):U=o[35],U}export{L as a,W as c,Y as d,X as f,V as i,z as l,B as n,H as o,R as r,N as s,U as t,J as u};
2
- //# sourceMappingURL=projectFilesQueryState-DpLF9eJd.js.map
@@ -1,2 +0,0 @@
1
- import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Jo as t}from"./utils-Cs97wR6T.js";import{B as n,H as r,la as i}from"./src-BZzGU-vc.js";import{or as a,rr as o}from"./runtime-DUPVFypn.js";import{Y as s}from"./entities-CpJdh0W5.js";import{at as c,ot as l}from"./ChatMarkdown-LYkpVHJO.js";import{a as u}from"./relay-CnLeC-mg.js";import{J as d}from"./useSettings-C6RmJr-q.js";import{f}from"./server-BYnv0CK4.js";import{t as p}from"./use-atom-command-DMW6SFOx.js";import{u as m}from"./rightPanelStore-D-meSGn7.js";import{a as h}from"./fileLinks-LQyYck3z.js";var g=e();function _(e){if(e.startsWith(`/`)||o(e)||/^[a-zA-Z]:/.test(e))return null;let t=e.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0&&e!==`.`);return t.length===0||t.includes(`..`)?null:t}function v(e,t){if(!e||!t)return null;let n=a(e),r=a(t);if(n===r)return[];let i=r.includes(`\\`)?`\\`:`/`,o=r.endsWith(i)?r:`${r}${i}`;return n.startsWith(o)?n.slice(o.length).split(/[\\/]+/).filter(Boolean):null}function y(e){let t=_(e.filePath);if(!t)return null;let n=v(e.workspaceRoot,e.repositoryRoot);if(!n||n.length===0)return t.join(`/`);let r=e.repositoryRoot?o(e.repositoryRoot):!1;if(!n.every((e,n)=>{let i=t[n];return i===void 0?!1:r?i.toLowerCase()===e:i===e}))return null;let i=t.slice(n.length);return i.length>0?i.join(`/`):null}function b({threadRef:e,filePath:t,activeCwd:n,repositoryRoot:r,openInEditor:i}){let a=y({filePath:t,workspaceRoot:n,repositoryRoot:r});a&&(e?m.getState().openFile(e,a):i(n?h(a,n):a))}function x(e){let t=y({filePath:e.filePath,workspaceRoot:e.workspaceRoot,repositoryRoot:e.repositoryRoot});return t===null?null:e.workspaceRoot===void 0?t.startsWith(`/`)||/^[a-zA-Z]:/.test(t)?t:null:h(t,e.workspaceRoot)}var S=new Map(r.map(e=>[e.id,e.label]));function C(e){if(!e.hasAbsolutePath)return[];let t=[];e.capabilities.canOpenDefault&&t.push({id:`open`,label:`Open`,icon:`pencil`}),e.capabilities.revealLabel!==void 0&&t.push({id:`reveal-in-folder`,label:e.capabilities.revealLabel,icon:`folder-tree`});let n=e.capabilities.editorIds.filter(e=>e!==`file-manager`);return n.length>0&&t.push({id:`open-with`,label:`Open with`,children:n.map(e=>({id:`editor:${e}`,label:S.get(e)??e}))}),t}function w(e){let n=(0,g.c)(28),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},n[0]=r):r=n[0];let i=p(s.openInEditor,r),a;n[1]===e?a=n[2]:(a=f.configValueAtom(e),n[1]=e,n[2]=a);let o=t(a),m;n[3]===o?.availableEditors?m=n[4]:(m=o?.availableEditors??[],n[3]=o?.availableEditors,n[4]=m);let h=m,_;n[5]!==e||n[6]!==o?(_=e!==null&&o?.shellRevealInFileManager===!0&&o.availableEditors.includes(`file-manager`)?o.shellRevealInFileManagerKind===void 0?l(o.environment.platform.os):c(o.shellRevealInFileManagerKind):void 0,n[5]=e,n[6]=o,n[7]=_):_=n[7];let v;n[8]===h?v=n[9]:(v=h.includes(`file-manager`),n[8]=h,n[9]=v);let y;n[10]!==h||n[11]!==_||n[12]!==v?(y={revealLabel:_,canOpenDefault:v,editorIds:h},n[10]=h,n[11]=_,n[12]=v,n[13]=y):y=n[13];let b=y,w;n[14]!==b||n[15]!==e||n[16]!==i?(w=async(t,n)=>{let r=x(n);if(r===null||e===null)return;let a=t===`reveal-in-folder`,o=t===`open`||a?`file-manager`:t.slice(7);(t===`open`||a||b.editorIds.includes(o))&&(await i({environmentId:e,input:{cwd:r,editor:o,...a?{reveal:!0}:{}}}))._tag===`Failure`&&u.add({type:`error`,title:t===`open`?`Could not open file`:a?`Unable to reveal file`:`Could not open in ${S.get(o)??o}`,description:r})},n[14]=b,n[15]=e,n[16]=i,n[17]=w):w=n[17];let T=w,E;n[18]!==T||n[19]!==b?(E=async(e,t)=>{let n=d(),r=C({hasAbsolutePath:x(e)!==null,capabilities:b});if(r.length===0||n===void 0)return;let i=await n.contextMenu.show(r,t);i!==null&&await T(i,e)},n[18]=T,n[19]=b,n[20]=E):E=n[20];let D=E,O;n[21]===b?O=n[22]:(O=e=>C({hasAbsolutePath:x(e)!==null,capabilities:b}),n[21]=b,n[22]=O);let k;return n[23]!==T||n[24]!==b||n[25]!==D||n[26]!==O?(k={buildItems:O,capabilities:b,activate:T,show:D},n[23]=T,n[24]=b,n[25]=D,n[26]=O,n[27]=k):k=n[27],k}function T(e){let t=(0,g.c)(2),n=w(e),r;return t[0]===n?r=t[1]:(r=(e,t)=>{n.show(e,t?{x:t.clientX,y:t.clientY}:void 0)},t[0]=n,t[1]=r),r}function E(e){return e.replaceAll(`\\`,`/`)}function D(e){let t=new Set;return e.filter(e=>{let n=e.name.trim().toLowerCase();return!t.has(n)&&(t.add(n),!0)})}function O(e){return e.enabled&&e.userInvocable!==!1}function k(e,t){return t?D(e.filter(O)):[]}function A(e,t){let n=new Set(t.map(e=>e.name.trim().toLowerCase()));return e.filter(e=>!n.has(e.name.trim().toLowerCase()))}function j(e){let t=E(e.path);if(t.includes(`/.codex/plugins/`)||t.includes(`/.agents/plugins/`))return`app`;switch(e.scope?.trim().toLowerCase()){case`repo`:case`repository`:return`repo`;case`project`:case`workspace`:case`local`:return`project`;case`user`:case`personal`:return`personal`;case`system`:return`system`;case void 0:case``:return`other`;default:return`other`}}function M(e,t){if(t)return e.workspaceSnapshots?.find(e=>e.cwd===t)}function N(e,t){let n=e&&M(e,t);return!(!n||n.slashCommandsPending)}function P(e,t,n,r){if(!N(t,n))return!1;if(F(t,n,r))return!0;let i=e?M(e,n):void 0;return(t?M(t,n):void 0)?.checkedAt!==i?.checkedAt}function F(e,t,r){let i=e&&M(e,t);return!!(i&&!i.slashCommandsPending&&n(i,r))}function I(e,t,n,r){let a=M(e,t)?.skills??e.skills;if(!n||!i(e.driver))return a;let o=r?n.projectSettingsOverrides[r]?.skillOverrides:void 0;return a.map(e=>({...e,enabled:o?.[e.name]??n.skillOverrides[e.name]??e.enabled}))}function L(e,t,n,r){let a=M(e,t)?.slashCommands??e.slashCommands;if(!n||!i(e.driver))return a;let o=new Set(I(e,t,n,r).filter(e=>!e.enabled).map(e=>e.name));return a.filter(e=>!o.has(e.name))}export{F as a,j as c,w as d,T as f,N as i,I as l,k as n,O as o,b as p,A as r,P as s,D as t,L as u};
2
- //# sourceMappingURL=providerSkills-yqPKKW6i.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Jo as r,Wo as i,Zo as a,as as o,cs as s,es as c,ls as l,ws as u}from"./utils-Cs97wR6T.js";import{Fc as d,Xc as f,Ys as p,br as m,hc as h,kr as ee,pc as g,sh as _,uc as te,vr as ne,xr as v,zs as y}from"./src-BZzGU-vc.js";import{Un as re,ct as ie,ot as ae,st as oe,t as b,zn as se}from"./runtime-DUPVFypn.js";import{z as ce}from"./entities-CpJdh0W5.js";import{t as le}from"./query-DpmTmXUV.js";import{n as x}from"./sourceControlClients-CG8qRQgm.js";import{o as S}from"./threadSort-Bd2rijEy.js";var C=e(t(),1),w=n(),ue=e=>`${e.environmentId??``} ${e.host}`,T={reviewRequested:`Review requested`,authored:`Authored`,others:`Others`};function E(e){let t=e?.trim().toLowerCase()??``;return t.length>0?t:null}function de(e){let t=e?.trim().replace(/^#/,``)??``;return/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:null}function fe(e,t){let n=new Map,r=new Map,i=new Map(e.map(e=>[P(e),e]));for(let e of i.values()){let i=t===`all`||e.state===t;if(e.author!==null){let t=E(e.author.login);if(t!==null){let r=n.get(t);n.set(t,{actor:r?.actor??e.author,count:(r?.count??0)+Number(i),mergedCount:(r?.mergedCount??0)+Number(e.state===`merged`)})}}if(i)for(let t of e.labels){let e=E(t.name);if(e===null)continue;let n=r.get(e);r.set(e,{...t,name:n?.name??t.name,color:n?.color??t.color,count:(n?.count??0)+1})}}return{authors:[...n.values()].filter(e=>e.count>0).toSorted((e,t)=>t.mergedCount-e.mergedCount||t.count-e.count||e.actor.login.localeCompare(t.actor.login)),labels:[...r.values()].toSorted((e,t)=>t.count-e.count||e.name.localeCompare(t.name))}}function D(e,t){return E(t[ue(e)]??t[e.host])}function O(e,t){let n=D(e,t);return n!==null&&E(e.author?.login)===n}var pe={approved:`approved`,changes_requested:`changes-requested`,"changes-requested":`changes-requested`,required:`review-required`,"review-required":`review-required`,none:`none`},me={success:`passing`,passing:`passing`,failure:`failing`,failing:`failing`},he=/(?:[^\s"]|"[^"]*")+/g,k=10,A=200;function j(e){return e.replaceAll(`"`,``).trim()}function M(e){if(/^\s*"[^"]*"\s*$/.test(e)){let t=j(e);return t.length===0?[]:[t]}return e.split(`,`).map(e=>j(e)).filter(e=>e.length>0)}function N(e){return e.slice(0,k).map(e=>e.slice(0,A).trim()).filter(e=>e.length>0)}function ge(e){let t=[],n=[],r=[],i,a,o,s;for(let[c]of e.matchAll(he)){let e=/^(-?)([A-Za-z][A-Za-z0-9_-]*):(.*)$/.exec(c),l=e===null?``:j(e[3]??``),u=e?.[1]===`-`;switch(l.length===0?``:e?.[2]?.toLowerCase()??``){case`label`:{let t=N(M(e?.[3]??``));if(t.length===0)break;u?r.push(...t):n.push(t);continue}case`author`:if(u)break;i=l.slice(0,A).trim();continue;case`draft`:if(u||l.toLowerCase()!==`true`&&l.toLowerCase()!==`false`)break;a=l.toLowerCase()===`true`?`only`:`hide`;continue;case`review`:{let e=u?void 0:pe[l.toLowerCase()];if(e===void 0)break;o=e;continue}case`status`:case`checks`:{let e=u?void 0:me[l.toLowerCase()];if(e===void 0)break;s=e;continue}case``:break;default:if(!l.startsWith(`/`)){let t=N(M(e?.[3]??``).map(t=>t.includes(`:`)?t:`${e?.[2]??``}:${t}`));if(t.length===0)break;u?r.push(...t):n.push(t);continue}}t.push(c)}return{text:t.join(` `),filters:{...n.length===0?{}:{labels:n.slice(0,k)},...r.length===0?{}:{excludedLabels:r.slice(0,k)},...i===void 0?{}:{author:i},...a===void 0?{}:{draft:a},...o===void 0?{}:{review:o},...s===void 0?{}:{checks:s}}}}function _e(e,t){let n=t.trim().toLowerCase();return n.length===0||`#${e.number} ${e.title} ${e.repository} ${e.headBranch} ${e.author?.login??``}`.toLowerCase().includes(n)}function ve(e,t,n){return n===`reviewing`?e.filter(e=>e.viewerReviewRequested):n===`authored`?e.filter(e=>O(e,t)):e}function ye(e,t){return e.filter(e=>(t.state===`all`||e.state===t.state)&&(t.projectId===void 0||e.projectId===t.projectId)&&(t.host===void 0||e.host===t.host))}function be(e,t,n){let r=e.labels.map(e=>e.name.trim().toLowerCase()),i=e=>r.includes(e.trim().toLowerCase());return(t.draft===void 0||e.isDraft===(t.draft===`only`))&&(t.review===void 0||(t.review===`none`?e.reviewDecision===void 0:e.reviewDecision===t.review))&&(t.labels===void 0||t.labels.every(e=>e.some(i)))&&(t.excludedLabels===void 0||!t.excludedLabels.some(i))&&(t.author===void 0||e.author?.login.toLowerCase()===ee(t.author,n).toLowerCase())}function xe(e,t){let n={reviewRequested:[],authored:[],others:[]};for(let r of e)O(r,t)?n.authored.push(r):r.viewerReviewRequested?n.reviewRequested.push(r):n.others.push(r);return[`authored`,`reviewRequested`,`others`].filter(e=>n[e].length>0).map(e=>({key:e,label:T[e],entries:n[e]}))}function P(e){return`${e.environmentId===void 0?``:`${e.environmentId}:`}${e.host}:${e.repository}#${e.number}`}var F=500;function Se(e,t,n,r){let i=new Set(n.flatMap(e=>[...e.keys]));return new Set([...t].filter(t=>{let n=e.get(t);return n!==void 0&&n.additions===0&&n.deletions===0&&!i.has(t)&&!r.has(L(n))}))}function Ce(e,t){let n=new Map;for(let r of t){let t=e.get(r);if(t===void 0)continue;let i=n.get(t.environmentId)??[];i.push({key:r,ref:{projectId:t.projectId,repository:t.repository,number:t.number}}),n.set(t.environmentId,i)}return[...n].flatMap(([e,t])=>{let n=[];for(let r=0;r<t.length;r+=F){let i=t.slice(r,r+F);n.push({environmentId:e,input:{refs:i.map(e=>e.ref)},keys:new Set(i.map(e=>e.key))})}return n})}function I({entriesByKey:e,candidateKeys:t,policy:n,activeBatches:r,statsByRow:i,refresh:a=!1}){let o=n===`eager`?new Set(e.keys()):t;return Ce(e,a?o:Se(e,o,r,i))}function we({requestedScope:e,currentScope:t,entriesByKey:n,candidateKeys:r,statsByRow:i}){return e.key!==t.key||e.policy!==t.policy?null:I({entriesByKey:n,candidateKeys:r,policy:e.policy,activeBatches:[],statsByRow:i,refresh:!0})}function Te(e,t){return e.filter(e=>{for(let n of e.keys)if(t.has(n))return!0;return!1})}function Ee(e,t,n){let r=new Map(t.map(e=>[P(e),e])),i=new Map(n.flatMap(e=>{let t=P(e);return r.has(t)?[]:[[t,e]]})),a=[];for(let t of e){let e=P(t);r.has(e)?r.set(e,t):i.has(e)?i.set(e,t):a.push(t)}return[{key:`authored`,entries:[...r.values()].toSorted(H)},{key:`reviewRequested`,entries:[...i.values()].toSorted(H)},{key:`others`,entries:a}].filter(e=>e.entries.length>0).map(e=>({...e,label:T[e.key]}))}function De(e,t){if(t.length===0)return e;let n=new Map(e);for(let e of t)n.set(L(e),{additions:e.additions,deletions:e.deletions});return n}var L=e=>`${e.environmentId} ${e.projectId} ${e.number}`;function Oe(e){if(e.length===0)return null;let t={},n=[],r=new Map,i=[],a=[],o={},s=!1;for(let[c,l]of e){for(let[e,n]of Object.entries(l.viewers))t[`${c} ${e}`]=n;for(let e of l.providers){let t=r.get(e.host);r.set(e.host,t===void 0?e:{...t.configured?t:e,projectCount:t.projectCount+e.projectCount,searchesOnHost:t.searchesOnHost&&e.searchesOnHost,configured:t.configured||e.configured})}i.push(...l.entries.map(e=>({...e,environmentId:c}))),a.push(...l.errors.map(e=>({...e,environmentId:c}))),s||=l.truncated,l.truncated&&n.push(c),Object.keys(l.nextCursors).length>0&&(o[c]=l.nextCursors)}return{viewers:t,providers:[...r.values()],entries:i.toSorted(H),errors:a,truncated:s,nextCursors:o,truncatedEnvironments:n}}var R=99,ke=e=>[...e].sort((e,t)=>e.localeCompare(t)).join(`,`),z=e=>`p4.pullRequests.list:${e}`,B=h({...ne.fields,environmentId:y}),Ae=h({...m.fields,environmentId:y}),je=d(h({scope:g,data:h({...v.fields,entries:p(B),errors:p(Ae),nextCursors:te(g,v.fields.nextCursors),truncatedEnvironments:p(g)}),partitions:f(h({authored:p(B),reviewing:p(B)}))}));function Me(e,t){try{let n=e?.getItem(z(t));if(!n)return null;let r=je(JSON.parse(n));return r._tag===`Some`?r.value:null}catch{return null}}function Ne(e,t,n){try{e?.setItem(z(t),JSON.stringify({scope:n.scope,data:{...n.data,entries:n.data.entries.slice(0,R),errors:[],nextCursors:{},truncatedEnvironments:[]},...n.partitions===void 0?{}:{partitions:{authored:n.partitions.authored.slice(0,R),reviewing:n.partitions.reviewing.slice(0,R)}}}))}catch{}}function Pe(e,t,n){return e===void 0||!n||t.some(t=>t.id===e)?e:void 0}function Fe(e,t,n){if(n===void 0)return;let r=e.filter(e=>e.id===n);return t==null?r.length===1?r[0]:void 0:r.find(e=>e.environmentId===t)}function Ie(e,t,n,r,i){if(n!==void 0)return e.filter(e=>e===n.environmentId);if(r===void 0||!i)return e;let a=new Set(t.filter(e=>e.id===r).map(e=>e.environmentId));return e.filter(e=>a.has(e))}function Le(e,t,n){return e===void 0?n:t.has(e)?e:n}function V(e,t){let n=t.trim().toLowerCase();if(n.length===0)return 0;let r=n.replace(/^#/u,``);if(/^\d+$/u.test(r))return String(e.number)===r?100:0;let i=e.title.toLowerCase(),a=n.split(/\s+/u).filter(e=>e.length>0);return i===n?90:i.includes(n)?80:a.length>1&&a.every(e=>i.includes(e))?70:e.headBranch.toLowerCase().includes(n)?60:(e.author?.login??``).toLowerCase().includes(n)?50:e.repository.toLowerCase().includes(n)?40:a.some(e=>i.includes(e))?30:10}function Re(e,t){return t.trim().length===0?e:e.toSorted((e,n)=>{let r=V(n,t)-V(e,t);return r===0?H(e,n):r})}function ze(e,t=e=>e.additions+e.deletions>0){let n=e=>e.mergeability===`conflicting`?4:e.state===`open`?e.isDraft?2:e.checksState===`passing`&&e.reviewDecision===`approved`?0:e.checksState===`passing`?1:2:3;return e.toSorted((e,r)=>{let i=n(e)-n(r);if(i!==0)return i;let a=Number(t(r))-Number(t(e)),o=e.additions+e.deletions-(r.additions+r.deletions);return a||o||H(e,r)})}function H(e,t){let n=S(e.updatedAt),r=S(t.updatedAt),i=Number(n===null)-Number(r===null);return i===0?n===null||r===null?0:r-n:i}function U(e,t){return e.toSorted((e,n)=>{let r=t(e)-t(n);return r===0?H(e,n):r})}function Be(e){return U(e,e=>e.state===`open`?e.mergeability===`conflicting`?0:e.reviewDecision===`changes-requested`?1:e.checksState===`failing`?2:e.isDraft?3:e.checksState===`passing`&&e.reviewDecision===`approved`?5:4:6)}function Ve(e){return U(e,e=>e.state===`open`?0:1)}function He(e,t,n,r=e=>e.additions+e.deletions>0,i=`all`){let a=t=>e.map(e=>({...e,entries:t(e.entries)}));if(t===`ready`)return n.trim().length===0?a(e=>ze(e,r)):e;if(t===`blocked`){if(n.trim().length>0)return e;let t=e=>e===`others`?i:e===`authored`?`authored`:`reviewing`;return e.map(e=>{let n=t(e.key);if(n===`all`)return e;let r=n===`authored`?Be:Ve;return{...e,entries:r(e.entries)}})}if(t===`updated`)return e;let o=e=>S(e.updatedAt)??S(e.createdAt)??0;return a(e=>e.toSorted((e,n)=>{if(t===`newest`||t===`oldest`){let r=S(e.createdAt),i=S(n.createdAt),a=Number(i!==null)-Number(r!==null),s=(r??0)-(i??0);return a||(t===`newest`?-s:s)||o(n)-o(e)}let i=Number(r(n))-Number(r(e)),a=e.additions+e.deletions-(n.additions+n.deletions);return i||(t===`largest`?-a:a)||o(n)-o(e)}))}function Ue(e,t){if(e.additions!==0||e.deletions!==0)return e;let n=t.get(L(e));return n===void 0?e:{...e,...n}}function We(e,t,n,r){let i={updatedAt:n.toISOString(),token:r,at:n.getTime()};switch(t){case`close`:return{state:`closed`,...i};case`reopen`:return{state:`open`,...i};case`merge`:return{state:`merged`,...i};case`draft`:return{state:e.state,isDraft:!0,...i};case`ready`:return{state:e.state,isDraft:!1,...i};default:return null}}function Ge(e,t,n,r){if(t.size===0&&r===`all`)return e;let i=[];for(let a of e){let e=t.get(n(a));(r===`all`||(e?.state??a.state)===r)&&i.push(e===void 0?a:{...a,...e})}return t.size===0&&i.length===e.length?e:i}function Ke(e,t,n){if(e.length===0)return t;let r=new Map(e.map(e=>[n(e),e])),i=0,a=t.map(e=>{let t=r.get(n(e));return t!==void 0&&JSON.stringify(t)===JSON.stringify(e)?(i+=1,t):e});return i===t.length&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))?e:a}var qe=6e4;function Je(e,t,n,r){if(e.size===0)return e;let i=new Map(t.map(e=>[n(e),e])),a=new Map;for(let[t,n]of e){let e=i.get(t);if(e===void 0){a.set(t,n);continue}let o=e.state===n.state&&(n.isDraft===void 0||e.isDraft===n.isDraft),s=r-n.at>qe;!o&&!s&&a.set(t,n)}return a.size===e.size?e:a}function Ye(e){let t=new Map(e.flatMap(e=>e.actions===void 0?[]:[[e.host.toLowerCase(),new Set(e.actions)]])),n=new Set([`close`,`merge`,`ready`,`reopen`]),r=new Set;return e=>t.get(e.host.toLowerCase())??(e.provider===`github`?n:r)}function Xe(e,t){return(e.state===`merged`?[]:e.state===`closed`?[`reopen`]:e.isDraft?[`close`,`ready`]:[`close`,`merge`]).filter(e=>t.has(e))}var W=oe(b),Ze=ae(b,W.refreshes),G=a(e=>c(null).pipe(o(3e5),l(`web-pull-requests:observed-summary:${e}`)));function K(e,t){let n=Number(t.state===`merged`)-Number(e.state===`merged`);if(n!==0)return n;let r=Date.parse(t.updatedAt)-Date.parse(e.updatedAt);return r===0?e.observedAt===void 0&&t.observedAt===void 0?0:(t.observedAt??-1/0)-(e.observedAt??-1/0):r}function q(e,t){return e===null?t:t===null?e:K(e,t)>=0?t:e}function J(e){return{provider:e.provider,projectId:e.projectId,repository:e.repository,number:e.number,title:e.title,url:e.url,state:e.state,isDraft:e.isDraft,headBranch:e.headBranch,baseBranch:e.baseBranch,updatedAt:e.updatedAt,...e.observedAt===void 0?{}:{observedAt:e.observedAt},author:e.author,...e.reviewDecision===void 0?{}:{reviewDecision:e.reviewDecision},...e.checksState===void 0?{}:{checksState:e.checksState},mergeability:e.mergeability}}function Y(e,t){return JSON.stringify([e,t.projectId,t.repository.toLowerCase(),t.number])}function X(e,t){if(e===null)return t;if(t===null)return e;let n=K(e.summary,t.summary);return n===0&&e.summary.observedAt===void 0&&t.summary.observedAt===void 0&&(n=t.observedAt-e.observedAt),n>0?{...t,summary:{...t.summary,isDraft:t.summary.isDraft??e.summary.isDraft,mergeability:t.summary.mergeability??e.summary.mergeability,reviewDecision:t.summary.reviewDecision===void 0?e.summary.reviewDecision:t.summary.reviewDecision,checksState:t.summary.checksState===void 0?e.summary.checksState:t.summary.checksState}}:e}function Z(e,t,n,r){let a=G(Y(e,t));i.modify(a,e=>{let t=X(e,{summary:n,observedAt:r});return t===e?[!1,e]:[!0,t]})}function Qe(e,t){let n=e.snapshot?.updatedAt;return e.snapshot===null||n==null?null:{...e.snapshot,provider:(x.findByChangeRequestUrl(e.url)??x.get(void 0)).kind,projectId:t,repository:e.repository,number:e.number,url:e.url,updatedAt:n}}function Q(e,t){return t.host===void 0?``:`${e}:${se({...t,host:t.host})}`}var $e=c(e=>{let t=new Map;for(let n of e(ce.threadShellsAtom))for(let e of re(n.pullRequests)){let r=Qe(e,n.projectId);if(r===null)continue;let i=Q(n.environmentId,e);t.set(i,q(t.get(i)??null,r)??r)}return t}),et=a(e=>c(t=>t($e).get(e)??null).pipe(s((e,t)=>JSON.stringify(e)===JSON.stringify(t)),o(3e5)));function tt(e,t,n,i){let a=(0,w.c)(19),o=i===void 0?null:i,s;a[0]!==e||a[1]!==t?(s=G(e===null||t===null?`none`:Y(e,t)),a[0]=e,a[1]=t,a[2]=s):s=a[2];let c=r(s),l;a[3]!==e||a[4]!==t?(l=et(e===null||t===null?``:Q(e,t)),a[3]=e,a[4]=t,a[5]=l):l=a[5];let u=r(l),d,f;a[6]!==n||a[7]!==e||a[8]!==o||a[9]!==t?(d=()=>{e!==null&&t!==null&&n!==null&&o!==null&&Z(e,t,n,o)},f=[n,e,t,o],a[6]=n,a[7]=e,a[8]=o,a[9]=t,a[10]=d,a[11]=f):(d=a[10],f=a[11]),(0,C.useLayoutEffect)(d,f);let p;a[12]!==n||a[13]!==c||a[14]!==o?(p=X(c,n===null||o===null?null:{summary:n,observedAt:o})?.summary??n,a[12]=n,a[13]=c,a[14]=o,a[15]=p):p=a[15];let m=p,h;return a[16]!==u||a[17]!==m?(h=q(m,u),a[16]=u,a[17]=m,a[18]=h):h=a[18],h}var nt=ie(b,W.refreshes);function $(e,t){let n=a(n=>c(e=>{let r=JSON.parse(n),i=[],a=[],o=null,s=!1;for(let n of r){let r=e(t(n));s||=r.waiting,r._tag===`Failure`&&o===null&&(o=le(r.cause));let c=_(u(r));c!==null&&i.push([n.environmentId,c]),r._tag===`Success`&&a.push([n.environmentId,r.value,r.timestamp])}return{values:i,error:o,isPending:s,observations:a}}).pipe(l(`${e}:${n}`))),o=c({values:[],observations:[],error:null,isPending:!1}).pipe(l(`${e}:empty`));return function(e){let a=JSON.stringify(e),s=r(e.length===0?o:n(a)),c=(0,C.useCallback)(e=>{let n=e??JSON.parse(a);for(let e of new Set(n.map(t)))i.refresh(e)},[a]);return{...s,refresh:c}}}var rt=$(`web-pull-requests:list`,W.list),it=$(`web-pull-requests:list-stats`,W.listStats),at=$(`web-pull-requests:turn-refreshes`,({environmentId:e})=>W.refreshes({environmentId:e,input:{}}));function ot(e){let t=(0,w.c)(2),n;return t[0]===e?n=t[1]:(n=e.map(st),t[0]=e,t[1]=n),at(n).values}function st(e){return{environmentId:e,input:{}}}function ct(e){let t=(0,w.c)(4),n;t[0]===e?n=t[1]:(n=W.refreshes({environmentId:e,input:{}}),t[0]=e,t[1]=n);let i=r(n),a;return t[2]===i?a=t[3]:(a=_(u(i)),t[2]=i,t[3]=a),a}function lt(e){let t=(0,w.c)(10),n=rt(e),r,i;t[0]===n.observations?(r=t[1],i=t[2]):(r=()=>{for(let[e,t,r]of n.observations)for(let n of t.entries)Z(e,{projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},J(n),r)},i=[n.observations],t[0]=n.observations,t[1]=r,t[2]=i),(0,C.useLayoutEffect)(r,i);let a;t[3]===n.values?a=t[4]:(a=Oe(n.values),t[3]=n.values,t[4]=a);let o=a,s;return t[5]!==o||t[6]!==n.error||t[7]!==n.isPending||t[8]!==n.refresh?(s={data:o,error:n.error,isPending:n.isPending,refresh:n.refresh},t[5]=o,t[6]=n.error,t[7]=n.isPending,t[8]=n.refresh,t[9]=s):s=t[9],s}function ut(e){let t=(0,w.c)(6),n=it(e),r;t[0]===n.values?r=t[1]:(r=n.values.length===0?null:n.values.flatMap(dt),t[0]=n.values,t[1]=r);let i=r,a;return t[2]!==n.isPending||t[3]!==n.refresh||t[4]!==i?(a={stats:i,isPending:n.isPending,refresh:n.refresh},t[2]=n.isPending,t[3]=n.refresh,t[4]=i,t[5]=a):a=t[5],a}function dt(e){let[t,n]=e;return n.stats.map(e=>({...e,environmentId:t}))}export{Xe as A,V as B,L as C,Ye as D,ke as E,Pe as F,He as H,Ie as I,Le as L,I as M,Re as N,de as O,Me as P,Te as R,Ee as S,D as T,Ue as U,Je as V,Ne as W,be as _,nt as a,ye as b,ct as c,Ge as d,fe as f,xe as g,Fe as h,J as i,we as j,We as k,ot as l,ve as m,q as n,lt as o,H as p,W as r,ut as s,Ze as t,tt as u,_e as v,P as w,ge as x,De as y,Ke as z};
2
- //# sourceMappingURL=pullRequests-u-PJpGXV.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{$o as r,Jo as i,Wo as a,Zo as o,as as s,dp as c,es as l,fs as u,gs as d,ls as f,up as p,ws as m,xs as h}from"./utils-Cs97wR6T.js";import{$s as g,$u as _,Ao as v,Ap as y,Au as b,Bc as x,C as ee,Cp as te,Cu as ne,Fc as re,Gd as S,Hd as C,Ic as ie,Jd as ae,Kd as oe,Km as se,Ko as ce,Mt as w,N as le,Nu as T,P as ue,Qm as de,Ro as fe,Sc as pe,Sf as me,Tu as E,Up as he,Uu as ge,Wd as _e,Yl as ve,Ys as ye,Zl as be,_c as D,_d as xe,_f as Se,au as O,bo as Ce,cc as k,co as we,dh as Te,eo as Ee,fm as De,gh as Oe,hh as A,hm as ke,hu as j,ic as Ae,if as je,iu as M,jo as Me,lc as Ne,mh as Pe,mo as N,n as P,no as Fe,pc as F,po as Ie,sh as Le,ud as Re,vc as ze,xo as Be,zs as I}from"./src-BZzGU-vc.js";import{Ar as Ve,Hr as He,Ir as Ue,Nr as We,Pr as Ge,Rr as Ke,Ur as L,_r as R,ai as qe,br as Je,gr as z,kr as Ye,t as B,vr as V,yr as Xe,zr as Ze}from"./runtime-DUPVFypn.js";import{a as H,i as U,n as Qe,r as $e,s as et,t as tt}from"./vcsRefInvalidation-CAa5en8i.js";import{G as nt,W as rt}from"./entities-CpJdh0W5.js";import{n as W}from"./query-DpmTmXUV.js";var G=n(),it=x(ze([ye(I),ee.fields.query])),at=re(it);function ot(e,t){return JSON.stringify([[...e].sort((e,t)=>e.localeCompare(t)),t])}function st(e){return at(e)}function ct(e){return JSON.stringify([e.environmentId,e.threadId])}function lt(e){return o(t=>l(n=>{let r=st(t);if(Te(r))return{matches:[],isLoading:!1};let[i,a]=r.value,o=[],s=!1;for(let t of i){let r=n(e.getSearchAtom(t,a));s||=r.waiting;let i=Le(m(r));i!==null&&o.push(...i.matches.map(e=>({...e,environmentId:t})))}return{matches:o,isLoading:s}}).pipe(f(`${e.labelPrefix}:${t}`)))}var K=e(t(),1);function ut(e){return{v2:{dispatchCommand:z(e,{label:`environment-data:orchestration-v2:dispatch-command`,tag:w.dispatchCommand}),threadProjection:R(e,{label:`environment-data:orchestration-v2:thread-projection`,tag:w.getThreadProjection,staleTimeMs:0,idleTtlMs:0}),shell:V(e,{label:`environment-data:orchestration-v2:shell`,tag:w.subscribeShell}),thread:V(e,{label:`environment-data:orchestration-v2:thread`,tag:w.subscribeThread,idleTtlMs:0})},turnDiff:R(e,{label:`environment-data:orchestration:turn-diff`,tag:w.getTurnDiff}),workflowScript:R(e,{label:`environment-data:orchestration:workflow-script`,tag:w.getWorkflowScript,staleTimeMs:3e5,idleTtlMs:3e5}),stopWorkflow:z(e,{label:`environment-data:orchestration:stop-workflow`,tag:w.stopWorkflow}),rankUserInput:z(e,{label:`environment-data:orchestration:rank-user-input`,tag:P.userInputRank,concurrency:{mode:`singleFlight`,key:({environmentId:e,input:t})=>JSON.stringify([e,t])}}),turnItem:R(e,{label:`environment-data:orchestration:turn-item`,tag:w.getTurnItem,staleTimeMs:6e4,idleTtlMs:6e4}),fullThreadDiff:R(e,{label:`environment-data:orchestration:full-thread-diff`,tag:w.getFullThreadDiff}),threadFind:R(e,{label:`environment-data:orchestration:thread-find`,tag:w.searchThread,staleTimeMs:0,idleTtlMs:0}),threadFindProgressive:V(e,{label:`environment-data:orchestration:thread-find-progressive`,tag:w.searchThreadStream,completeWhen:e=>e.complete!==!1,idleTtlMs:0}),threadSearch:R(e,{label:`environment-data:orchestration:thread-search`,tag:w.searchThreads,staleTimeMs:3e4,idleTtlMs:6e4}),archivedShellSnapshot:R(e,{label:`environment-data:orchestration:archived-shell-snapshot`,tag:w.getArchivedShellSnapshot})}}var q=ut(B),dt=96;function ft(e){let t=e.at(-1);return e.length>1&&t?.waiting===!0&&Te(m(t))}function pt({previousScrollTop:e,scrollTop:t,scrollHeight:n,clientHeight:r,distanceThreshold:i=dt}){return e===null||t<=e?!1:n-t-r<=i}var mt=RegExp(`^p4c[-/][0-9a-f]{8}$`);function ht(e){let t=e.indexOf(`/`);return t<=0||t===e.length-1?e:e.slice(t+1)}function gt(e){return mt.test(e.trim().toLowerCase())}function _t(e){return e.trim().replace(/[ \t\n\r\f\v]+/g,`-`)}var vt={hasUpstream:!1,aheadCount:0,behindCount:0,aheadOfDefaultCount:0,pr:null};function J(e,t){return{...e,...t??vt}}function yt(e){return{hasUpstream:e.hasUpstream,aheadCount:e.aheadCount,behindCount:e.behindCount,...e.aheadOfDefaultCount===void 0?{}:{aheadOfDefaultCount:e.aheadOfDefaultCount},pr:e.pr}}function bt(e){return{isRepo:e.isRepo,...e.sourceControlProvider?{sourceControlProvider:e.sourceControlProvider}:{},hasPrimaryRemote:e.hasPrimaryRemote,isDefaultRef:e.isDefaultRef,refName:e.refName,hasWorkingTreeChanges:e.hasWorkingTreeChanges,workingTree:e.workingTree,...e.branchChanges?{branchChanges:e.branchChanges}:{}}}function xt(e,t){switch(t._tag){case`snapshot`:return J(t.local,t.remote);case`localUpdated`:return J(t.local,e?yt(e):null);case`remoteUpdated`:return J(e===null?{isRepo:!0,hasPrimaryRemote:!1,isDefaultRef:!1,refName:null,hasWorkingTreeChanges:!1,workingTree:{files:[],insertions:0,deletions:0}}:bt(e),t.remote)}}var St=Ae([`refresh_status`,`run_change_request`,`pull`,`switch_ref`,`create_ref`,`create_worktree`,`init`,`publish_repository`,`prepare_pull_request_thread`]),Ct=class extends D()(`VcsActionUnavailableError`,{operation:St,environmentId:k(I),cwd:k(F)}){get message(){return`Source control operation '${this.operation.replaceAll(`_`,` `)}' is unavailable.`}},wt=class extends D()(`VcsActionRemoteFailureError`,{actionId:F,transportActionId:F,action:ue,environmentId:I,cwd:F,phase:k(le),remoteMessageLength:Ne}){get message(){let e=this.phase===null?`execution`:this.phase;return`Source control action '${this.action}' failed during ${e}.`}},Tt=class extends D()(`VcsActionMissingTerminalEventError`,{actionId:F,transportActionId:F,action:ue,environmentId:I,cwd:F}){get message(){return`Source control action '${this.action}' ended without a terminal result.`}},Et=class extends D()(`VcsActionTargetKeyParseError`,{keyLength:Ne,cause:g()}){get message(){return`Invalid source control action target key (${this.keyLength} characters).`}};pe([wt,Tt]);var Y=Object.freeze({isRunning:!1,operation:null,actionId:null,action:null,currentLabel:null,currentPhaseLabel:null,hookName:null,lastOutputLine:null,phaseStartedAtMs:null,hookStartedAtMs:null,error:null}),Dt=()=>be(ve()),Ot=0,kt=ie(ze([I,F])),X=o(e=>l(Y).pipe(r,f(`vcs-action:${e}`))),At=l(Y).pipe(r,f(`vcs-action:null`));function Z(e){return e.environmentId===null||e.cwd===null?null:JSON.stringify([e.environmentId,e.cwd])}function jt(e){try{let[t,n]=kt(JSON.parse(e));return{environmentId:t,cwd:n}}catch(t){throw new Et({keyLength:e.length,cause:t})}}function Mt(e){let t=Z(e);return t===null?At:X(t)}function Nt(){return Ot+=1,`local-vcs-action:${Ot}`}function Pt(e){let t=e.actionId??Nt(),n=Dt();return{...Y,isRunning:!0,operation:e.operation,actionId:t,currentLabel:e.label,currentPhaseLabel:e.label,phaseStartedAtMs:n}}function Ft(e,t,n){return{...Y,operation:e,actionId:t,error:n instanceof Error?n.message:`Source control action failed.`}}function It(e,t){let n=JSON.stringify([e.environmentId,e.cwd]);return`${n.length}:${n}${t}`}function Lt(e,t,n,r){return r.actionId!==t||r.cwd!==e.cwd?null:{...r,actionId:n}}function Rt(e,t){return _e(()=>{let n=null;return e.pipe(Me(e=>{let r=Lt(t.target,t.transportActionId,t.actionId,e);return r===null?je:((r.kind===`action_finished`||r.kind===`action_failed`)&&(n=r),t.onProgress(r))}),b(()=>n?.kind===`action_finished`?C(n.result):n?.kind===`action_failed`?E(new wt({actionId:t.actionId,transportActionId:t.transportActionId,action:n.action,environmentId:t.target.environmentId,cwd:t.target.cwd,phase:n.phase,remoteMessageLength:n.message.length})):E(new Tt({actionId:t.actionId,transportActionId:t.transportActionId,action:t.action,environmentId:t.target.environmentId,cwd:t.target.cwd}))))})}function zt(e,t){if(e.actionId!==t.actionId)return e;let n=Dt();switch(t.kind){case`action_started`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,phaseStartedAtMs:n,hookStartedAtMs:null,hookName:null,lastOutputLine:null,error:null};case`phase_started`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,currentLabel:t.label,currentPhaseLabel:t.label,phaseStartedAtMs:n,hookStartedAtMs:null,hookName:null,lastOutputLine:null,error:null};case`hook_started`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,currentLabel:`Running ${t.hookName}...`,hookName:t.hookName,hookStartedAtMs:n,lastOutputLine:null,error:null};case`hook_output`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,lastOutputLine:t.text,error:null};case`hook_finished`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,currentLabel:e.currentPhaseLabel,hookName:null,hookStartedAtMs:null,lastOutputLine:null,error:null};case`action_finished`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,error:null};case`action_failed`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,error:t.message}}}function Bt(e){let t=new Map,n=n=>{let r=Z(n),i=r??JSON.stringify([`vcs-action-target:unavailable`,n.environmentId,n.cwd]),a=t.get(i);if(a!==void 0)return a;let o=r===null?null:jt(r),s=r===null?At:X(r),c=Je(e,{label:`vcs-action:run-stacked:${i}`,scheduler:H,concurrency:{mode:`serial`,key:()=>i},execute:(t,r)=>{if(o===null)return E(new Ct({operation:`run_change_request`,environmentId:n.environmentId,cwd:n.cwd}));let i=It(o,t.actionId);r.set(s,Pt({operation:`run_change_request`,label:`Running source control action`,actionId:t.actionId}));let a={actionId:i,cwd:o.cwd,action:t.action,...t.commitMessage?{commitMessage:t.commitMessage}:{},...t.featureBranch?{featureBranch:!0}:{},...t.filePaths?.length?{filePaths:[...t.filePaths]}:{},...t.threadId===void 0?{}:{threadId:t.threadId},...t.projectId===void 0?{}:{projectId:t.projectId}},c=S(()=>{r.get(s).actionId===t.actionId&&r.set(s,Y)});return Rt(Ze(o.environmentId,We(P.gitRunStackedAction,a)),{target:o,transportActionId:i,actionId:t.actionId,action:t.action,onProgress:e=>S(()=>{let n=r.get(s);if(n.actionId===t.actionId&&(r.set(s,zt(n,e)),t.onProgress!==void 0))try{t.onProgress(e)}catch{}})}).pipe(xe(Ye,{authorize:(t,n,i)=>Ue(e,n).authorize(r,t,i)}),ne(tt(r,o)),oe(()=>c),ae(e=>S(()=>{let n=r.get(s);n.actionId===t.actionId&&n.isRunning&&r.set(s,Ft(`run_change_request`,t.actionId,e))})),Re(()=>c))}});return t.set(i,c),c},r=(e,t,n)=>{let r=Z(t);if(r===null)return;let i=X(r);e.set(i,n(e.get(i)))};return{stateAtom:Mt,runStackedAction:e=>n(e),track:async(e,t,n,r)=>{let i=Z(t);if(i===null)return d(te(new Ct({operation:n.operation,environmentId:t.environmentId,cwd:t.cwd})));let a=X(i),o=Pt(n);e.set(a,o);let s=await r();return e.get(a).actionId===o.actionId&&(h(s)||y(s.cause)?e.set(a,Y):e.get(a).actionId===o.actionId&&e.set(a,Ft(n.operation,o.actionId,he(s.cause)))),s},resetError:(e,t,n)=>{r(e,t,e=>!e.isRunning&&e.operation===n?Y:e)}}}var Vt=o(e=>l(0).pipe(r)),Ht=100,Ut=3e4,Wt=1e4,Gt=Se(`1 second`).pipe(me(({duration:e})=>C(De(e,ke(30)))));function Kt(e){return e.query===void 0&&e.cursor===void 0&&e.includeMatchingRemoteRefs===void 0&&e.refKind===void 0&&e.limit===Ht}var qt=T(`CachedVcsRefsState.commitRefresh`)(function*(e,t,n){return yield*$e(n.environmentId,ge(function*(){let r=Qe({environmentId:n.environmentId}),i=e.get(r);if(i.revision!==n.expectedRevision)return!1;let a=i.persistedCacheReadable;return n.persist&&(a||=yield*t.clearVcsRefs(n.environmentId).pipe(O(!0),j(e=>_(`Could not recover invalidated cached Git refs.`).pipe(M({environmentId:n.environmentId,cwd:n.cwd,...L(e)}),O(!1)))),yield*t.saveVcsRefs(n.environmentId,n.cwd,n.refs).pipe(j(e=>_(`Could not persist cached Git refs.`).pipe(M({environmentId:n.environmentId,cwd:n.cwd,...L(e)})))),a!==i.persistedCacheReadable&&e.update(r,e=>e.revision===n.expectedRevision?{...e,persistedCacheReadable:a}:e)),!0}))}),Jt=T(`CachedVcsRefsState.makeChanges`)(function*(e,t,n,r=!0){let i=yield*He,a=yield*qe,o=i.target.environmentId,s=Kt(e),l=s&&r?yield*a.loadVcsRefs(o,e.cwd).pipe(j(t=>_(`Could not load cached Git refs.`).pipe(M({environmentId:o,cwd:e.cwd,...L(t)}),O(A())))):A(),u=T(`CachedVcsRefsState.refresh`)(function*(){let r=Vt(`${o.length}:${o}${e.cwd}`),c=t!==void 0&&n!==void 0&&t>n.get(r),l=yield*Ve(P.vcsListRefs,c?{...e,refresh:!0}:e).pipe(xe(He,i)),u=a.saveVcsRefs(o,e.cwd,l).pipe(j(t=>_(`Could not persist cached Git refs.`).pipe(M({environmentId:o,cwd:e.cwd,...L(t)}))));if(t===void 0||n===void 0)return s&&(yield*u),Oe(l);let d=yield*qt(n,a,{environmentId:o,cwd:e.cwd,refs:l,expectedRevision:t,persist:s});return d&&c&&n.set(r,t),d?Oe(l):A()}),d=N(C(l)).pipe(Ie(e=>Pe(e,{onNone:()=>se,onSome:de}))),f=Fe(N(c(i.state)),p(i.state)).pipe(Ce(e=>e.phase===`connected`?e.generation:null),Ee,fe(t=>t===null?we:N(u().pipe(ae(t=>_(`Could not refresh Git refs.`).pipe(M({environmentId:o,cwd:e.cwd,...L(t)}))))).pipe(v(Gt),Ie(e=>Pe(e,{onNone:()=>se,onSome:de})))));return Fe(d,f)});function Yt(e,t,n,r){return Ke(e,ce(ge(function*(){return yield*Jt(t,n,yield*u,r)})))}function Xt(e){let t=o(t=>{let[n,r]=JSON.parse(t);return e.atom(e=>{let t=e(Qe({environmentId:n}));return Yt(n,r,t.revision,t.persistedCacheReadable)}).pipe(s(Ut),f(`environment-data:vcs:list-refs:${t}`))}),n=e=>t(JSON.stringify([e.environmentId,e.input])),r=(e,t)=>tt(t,{environmentId:e.environmentId,cwd:e.input.cwd});return{listRefs:n,readRefs:z(e,{label:`environment-data:vcs:read-refs`,tag:P.vcsListRefs}),status:Xe(e,{label:`environment-data:vcs:status`,idleTtlMs:Wt,subscribe:e=>Ge(P.subscribeVcsStatus,e).pipe(Be(()=>null,(e,t)=>{let n=xt(e,t);return[n,[n]]}))}),pull:z(e,{label:`environment-data:vcs:pull`,tag:P.vcsPull,scheduler:H,concurrency:U,onSettled:r}),refreshStatus:z(e,{label:`environment-data:vcs:refresh-status`,tag:P.vcsRefreshStatus,scheduler:H,concurrency:U,onSettled:r}),createWorktree:z(e,{label:`environment-data:vcs:create-worktree`,tag:P.vcsCreateWorktree,scheduler:H,concurrency:U,onSettled:r}),worktreeSetup:V(e,{label:`environment-data:vcs:worktree-setup`,tag:P.subscribeWorktreeSetup,idleTtlMs:Wt}),cancelWorktreeSetup:z(e,{label:`environment-data:vcs:cancel-worktree-setup`,tag:P.worktreeSetupCancel}),removeWorktree:z(e,{label:`environment-data:vcs:remove-worktree`,tag:P.vcsRemoveWorktree,scheduler:H,concurrency:U,onSettled:r}),createRef:z(e,{label:`environment-data:vcs:create-ref`,tag:P.vcsCreateRef,scheduler:H,concurrency:U,onSettled:r}),switchRef:z(e,{label:`environment-data:vcs:switch-ref`,tag:P.vcsSwitchRef,scheduler:H,concurrency:U,onSettled:r}),init:z(e,{label:`environment-data:vcs:init`,tag:P.vcsInit,scheduler:H,concurrency:U,onSettled:r})}}var Zt=Xt(B),Qt=Bt(B),$t=120,en=80,tn=120,nn=500,rn=200,an=100,on=[],sn=[],cn=[],Q=[void 0],ln=Object.freeze([]),un=l({matches:ln,isLoading:!1}).pipe(f(`web:thread-search:empty`)),dn=lt({getSearchAtom:(e,t)=>q.threadSearch({environmentId:e,input:{query:t}}),labelPrefix:`web:thread-search`});function $(e,t){let n=(0,G.c)(4),[r,i]=(0,K.useState)(e),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=window.setTimeout(()=>{i(e)},t);return()=>{window.clearTimeout(n)}},o=[t,e],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,K.useEffect)(a,o),r}function fn(e,t){let n=(0,G.c)(11),r;n[0]===t?r=n[1]:(r=t.trim(),n[0]=t,n[1]=r);let a=r,o=$(a,rn),s=e.length>0&&a.length>=2,c=s&&a===o?o:null,l;n[2]!==e||n[3]!==c?(l=c===null?null:ot(e,c),n[2]=e,n[3]=c,n[4]=l):l=n[4];let u=l,d;n[5]===u?d=n[6]:(d=u===null?un:dn(u),n[5]=u,n[6]=d);let f=i(d),p=s&&a!==o,m=p?ln:f.matches,h=c??``,g=s&&(p||f.isLoading),_;return n[7]!==m||n[8]!==h||n[9]!==g?(_={matches:m,query:h,isPending:g},n[7]=m,n[8]=h,n[9]=g,n[10]=_):_=n[10],_}function pn(e){let t=e.query?.trim()??``,n=e.environmentId!==null&&e.cwd!==null?JSON.stringify([e.environmentId,e.cwd,t]):null,[r,o]=(0,K.useState)({targetKey:n,cursors:Q}),s=r.targetKey===n?r.cursors:Q,c=(0,K.useMemo)(()=>e.environmentId!==null&&e.cwd!==null?s.map(n=>Zt.listRefs({environmentId:e.environmentId,input:{cwd:e.cwd,...t.length>0?{query:t}:{},...n===void 0?{}:{cursor:n},limit:an}})):[],[s,t,e.cwd,e.environmentId]),u=(0,K.useMemo)(()=>l(e=>c.map(t=>e(t))).pipe(f(`web:vcs-ref-pages:${n??`empty`}`)),[c,n]),d=i(u),p=d.flatMap(e=>{let t=Le(m(e));return t===null?[]:[t]}),h=new Map;for(let e of p)for(let t of e.refs)h.set(t.name,t);let g=p[0]??null,_=p.at(-1)??null,v=g===null||_===null?null:{refs:[...h.values()],isRepo:g.isRepo,hasPrimaryRemote:g.hasPrimaryRemote,nextCursor:_.nextCursor,totalCount:Math.max(...p.map(e=>e.totalCount))},y=d.find(e=>e._tag===`Failure`),b=ft(d),x=y?._tag===`Failure`?(()=>{let e=he(y.cause);return e instanceof Error&&e.message.trim().length>0?e.message:`Failed to load refs.`})():null,ee=(0,K.useCallback)(()=>{let e=c[0];o({targetKey:n,cursors:Q}),e!==void 0&&a.refresh(e)},[c,n]),te=(0,K.useCallback)(()=>{n!==null&&v?.nextCursor!==null&&v?.nextCursor!==void 0&&o(e=>{let t=e.targetKey===n?e.cursors:Q;return t.includes(v.nextCursor)?{targetKey:n,cursors:t}:{targetKey:n,cursors:[...t,v.nextCursor]}})},[v?.nextCursor,n]);return{data:v,refs:v?.refs??on,error:x,isPending:d.some(e=>e.waiting),isFetchingNextPage:b,refresh:ee,loadNext:te}}function mn(e,t){return e.environmentId===t.environmentId&&e.cwd===t.cwd&&e.query===t.query&&e.kind===t.kind&&e.imageOnly===t.imageOnly}function hn(e,t,n){let r=(0,G.c)(32),i=n?.allowEmptyQuery===!0,a;r[0]===e.query?a=r[1]:(a=e.query==null?null:e.query.trim(),r[0]=e.query,r[1]=a);let o;r[2]!==a||r[3]!==e.cwd||r[4]!==e.environmentId||r[5]!==e.imageOnly||r[6]!==e.kind?(o={environmentId:e.environmentId,cwd:e.cwd,query:a,kind:e.kind,imageOnly:e.imageOnly},r[2]=a,r[3]=e.cwd,r[4]=e.environmentId,r[5]=e.imageOnly,r[6]=e.kind,r[7]=o):o=r[7];let s=o,c=$(s,$t),l=et(c.environmentId),{canReadFiles:u}=l,d,f,p;r[8]!==i||r[9]!==u||r[10]!==c.cwd||r[11]!==c.environmentId||r[12]!==c.imageOnly||r[13]!==c.kind||r[14]!==c.query||r[15]!==t?(d=c.environmentId!==null&&c.cwd!==null&&c.query!==null&&(i||c.query.length>0)?{environmentId:c.environmentId,input:{cwd:c.cwd,query:c.query,limit:t,...c.kind?{kind:c.kind}:{},...c.imageOnly?{imageOnly:!0}:{}}}:null,f=W,p=u&&d!==null?nt.searchEntries(d):null,r[8]=i,r[9]=u,r[10]=c.cwd,r[11]=c.environmentId,r[12]=c.imageOnly,r[13]=c.kind,r[14]=c.query,r[15]=t,r[16]=d,r[17]=f,r[18]=p):(d=r[16],f=r[17],p=r[18]);let m=f(p),h=d!==null,g=m.data?.entries??sn,_=!h||l.isPending?null:u?m.error:l.error??`This connection cannot search host files.`,v;r[19]!==c||r[20]!==l.isPending||r[21]!==h||r[22]!==s||r[23]!==m.isPending?(v=!mn(s,c)||h&&(l.isPending||m.isPending),r[19]=c,r[20]=l.isPending,r[21]=h,r[22]=s,r[23]=m.isPending,r[24]=v):v=r[24];let y=c.query??``,b=m.data?.truncated??!1,x;return r[25]!==m.refresh||r[26]!==g||r[27]!==_||r[28]!==v||r[29]!==y||r[30]!==b?(x={entries:g,error:_,isPending:v,searchedQuery:y,truncated:b,refresh:m.refresh},r[25]=m.refresh,r[26]=g,r[27]=_,r[28]=v,r[29]=y,r[30]=b,r[31]=x):x=r[31],x}function gn(e){return hn(e,en)}function _n(e){let t=(0,G.c)(20),n=e.environmentId!==null&&e.cwd!==null,r=et(e.environmentId),i=n&&r.canReadFiles,a=n&&r.isPending,o=e.query,s;t[0]===o?s=t[1]:(s=o.trim(),t[0]=o,t[1]=s);let c=s.length>0,l=$(o,tn),u;t[2]!==i||t[3]!==l||t[4]!==c||t[5]!==e.caseSensitive||t[6]!==e.cwd||t[7]!==e.environmentId||t[8]!==e.useRegex||t[9]!==e.wholeWord?(u=i&&e.environmentId!==null&&e.cwd!==null&&c&&l.trim().length>0?rt({environmentId:e.environmentId,input:{cwd:e.cwd,query:l,limit:nn,caseSensitive:e.caseSensitive,wholeWord:e.wholeWord,useRegex:e.useRegex}}):null,t[2]=i,t[3]=l,t[4]=c,t[5]=e.caseSensitive,t[6]=e.cwd,t[7]=e.environmentId,t[8]=e.useRegex,t[9]=e.wholeWord,t[10]=u):u=t[10];let d=W(u),f=d.data?.matches??cn,p=!n||a?null:i?d.error:r.error??`This connection cannot search host files.`,m=a||i&&c&&(o!==l||d.isPending),h=d.data?.truncated??!1,g=e.useRegex&&d.data?.regexFallbackError!==void 0,_;return t[11]!==i||t[12]!==c||t[13]!==a||t[14]!==f||t[15]!==p||t[16]!==m||t[17]!==h||t[18]!==g?(_={canReadFiles:i,isCheckingAccess:a,matches:f,error:p,isPending:m,hasQuery:c,truncated:h,invalidRegex:g},t[11]=i,t[12]=c,t[13]=a,t[14]=f,t[15]=p,t[16]=m,t[17]=h,t[18]=g,t[19]=_):_=t[19],_}function vn(e,t){let n=t?.enabled!==!1&&e.environmentId!==null&&e.threadId!==null&&e.fromTurnCount!==null&&e.toTurnCount!==null,r=n&&e.fromTurnCount===0?{environmentId:e.environmentId,input:{threadId:e.threadId,toTurnCount:e.toTurnCount,ignoreWhitespace:e.ignoreWhitespace}}:null,i=n&&e.fromTurnCount!==0?{environmentId:e.environmentId,input:{threadId:e.threadId,fromTurnCount:e.fromTurnCount,toTurnCount:e.toTurnCount,ignoreWhitespace:e.ignoreWhitespace}}:null,a=W(r===null?null:q.fullThreadDiff(r)),o=W(i===null?null:q.turnDiff(i));return r===null?o:a}function yn(e){let t=(0,G.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?null:q.turnItem({environmentId:e.environmentId,input:{threadId:e.threadId,itemId:e.itemId,revision:e.revision}}),t[0]=e,t[1]=n),W(n)}export{ct as _,_n as a,yn as c,Ct as d,ht as f,q as g,pt as h,pn as i,Qt as l,_t as m,gn as n,hn as o,gt as p,$ as r,fn as s,vn as t,Zt as u};
2
- //# sourceMappingURL=queries-DDAXRF4r.js.map
@@ -1,2 +0,0 @@
1
- import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Jo as t,bs as n,es as r,ls as i,qo as a,ws as o}from"./utils-Cs97wR6T.js";import{Ep as s,Up as c,sh as l}from"./src-BZzGU-vc.js";var u=e(),d=r(n(!1)).pipe(i(`web-environment-query:empty`));function f(e){let t=c(e);return t instanceof Error&&t.message.trim().length>0?t.message:`The environment request failed.`}function p(e){let n=(0,u.c)(20),r=e??d,i=t(r),c=a(r),p;n[0]===i?p=n[1]:(p=l(o(i)),n[0]=i,n[1]=p);let m;n[2]!==i._tag||n[3]!==i.previousSuccess||n[4]!==i.timestamp?(m=i._tag===`Success`?i.timestamp:i._tag===`Failure`?l(i.previousSuccess)?.timestamp??0:0,n[2]=i._tag,n[3]=i.previousSuccess,n[4]=i.timestamp,n[5]=m):m=n[5];let h;n[6]!==i._tag||n[7]!==i.cause?(h=i._tag===`Failure`?f(i.cause):null,n[6]=i._tag,n[7]=i.cause,n[8]=h):h=n[8];let g;n[9]!==i._tag||n[10]!==i.cause?(g=i._tag===`Failure`?l(s(i.cause)):null,n[9]=i._tag,n[10]=i.cause,n[11]=g):g=n[11];let _=e!==null&&i.waiting,v=i._tag===`Success`,y;return n[12]!==c||n[13]!==p||n[14]!==m||n[15]!==h||n[16]!==g||n[17]!==_||n[18]!==v?(y={data:p,dataUpdatedAt:m,error:h,failure:g,isPending:_,isSuccess:v,refresh:c},n[12]=c,n[13]=p,n[14]=m,n[15]=h,n[16]=g,n[17]=_,n[18]=v,n[19]=y):y=n[19],y}export{p as n,f as t};
2
- //# sourceMappingURL=query-DpmTmXUV.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$r as i,Bn as a,Da as o,Gn as s,Ka as c,Na as l,Nn as u,Or as d,To as f,Ua as p,Un as m,Va as h,Wa as g,Ya as ee,ca as te,fo as _,ga as v,ja as ne,sa as re,t as y,wa as b,xr as x,zn as ie}from"./utils-Cs97wR6T.js";import{c as S,f as C,n as w,s as T,u as E}from"./useRender-BP5vR6yH.js";import{n as ae,t as D}from"./CompositeRoot-_C3uLH2F.js";import{t as oe}from"./useRegisterFieldControl-BMmbsxkx.js";import{t as se}from"./FormContext-CXpUoAJn.js";import{t as ce}from"./useAriaLabelledBy-E7KNTqMb.js";import{t as le}from"./FieldItemContext-sr3mCd2v.js";var O=e(r()),k=e(t()),A=k.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function ue(e=!1){let t=k.useContext(A);if(!t&&!e)throw Error(C(86));return t}var j=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),M={checked(e){return e?{[j.checked]:``}:{[j.unchecked]:``}},...f,...s},N=k.createContext(void 0);function P(){return k.useContext(N)}var F=k.createContext(void 0);function I(){let e=k.useContext(F);if(e===void 0)throw Error(C(52));return e}var L=k.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,readOnly:o=!1,required:s=!1,"aria-labelledby":d,value:f,inputRef:ee,nativeButton:v=!1,id:y,style:b,...C}=e,D=P(),{disabled:oe,readOnly:se,required:A,form:ue,checkedValue:j,touched:N=!1,validation:I,name:L}=D??{},R=D?.setCheckedValue??S,de=D?.setTouched??S,z=D?.registerControlRef??S,B=D?.registerInputRef??S,{setDirty:V,validityData:H,setTouched:U,setFilled:W,state:G,disabled:K}=m(),q=le(),{labelId:fe,getDescriptionProps:pe}=a(),J=K||q.disabled||oe||i,Y=se||o,X=A||s,me=ue,Z=D?j===f:f===``,Q=k.useRef(null),$=k.useRef(null),he=g(e=>{e&&z(e,J)}),ge=E(ee,$,B);p(()=>{$.current?.checked&&W(!0)},[W]),p(()=>{$.current&&(J&&Z?B(null):(Q.current&&z(Q.current,J),B($.current)))},[Z,J,z,B]);let _e=l(),ve=ie({id:y,implicit:!1,controlRef:Q}),ye=v?void 0:ve,be=ce(d,fe,$,!v,ye),xe={role:`radio`,"aria-checked":Z,"aria-required":X||void 0,"aria-readonly":Y||void 0,"aria-labelledby":be,[ae]:Z?``:void 0,id:v?ve:_e,onKeyDown(e){e.key===`Enter`&&e.preventDefault()},onClick(e){if(e.defaultPrevented||J||Y)return;e.preventDefault();let t=$.current;t&&t.dispatchEvent(new(c(t)).PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))},onFocus(e){e.defaultPrevented||J||Y||!N||($.current?.click(),de(!1))}},{getButtonProps:Se,buttonRef:Ce}=h({disabled:J,native:v}),we={type:`radio`,ref:ge,form:me,id:ye,name:L,tabIndex:-1,style:L?te:re,"aria-hidden":!0,...f===void 0?T:{value:u(f)},disabled:J,checked:Z,required:X,readOnly:Y,onChange(e){if(e.nativeEvent.defaultPrevented||J||Y||f===void 0)return;let t=ne(_,e.nativeEvent);t.isCanceled||(U(!0),V(f!==H.initialValue),W(!0),R(f,t))},onFocus(){Q.current?.focus()}},Te=k.useMemo(()=>({...G,required:X,disabled:J,readOnly:Y,checked:Z}),[G,J,Y,Z,X]),Ee=Te,De=D!==void 0,Oe=[t,Q,Ce,he],ke=[xe,pe,I?.getValidationProps??T,C,Se],Ae=w(`span`,e,{enabled:!De,state:Te,ref:Oe,props:ke,stateAttributesMapping:M});return(0,O.jsxs)(F.Provider,{value:Ee,children:[De?(0,O.jsx)(x,{tag:`span`,render:n,className:r,style:b,state:Te,refs:Oe,props:ke,stateAttributesMapping:M}):Ae,(0,O.jsx)(`input`,{...we,suppressHydrationWarning:!0})]})}),R=k.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...s}=e,c=I(),l=c.checked,{mounted:u,transitionStatus:d,setMounted:f}=o(l),p={...c,transitionStatus:d},m=k.useRef(null),h=a||u,g=w(`span`,e,{ref:[t,m],state:p,props:s,stateAttributesMapping:M});return b({open:l,ref:m,onComplete(){l||f(!1)}}),h?g:null}),de=[i],z=k.forwardRef(function(e,t){let{render:n,className:r,disabled:i,readOnly:o,required:c,onValueChange:u,value:f,defaultValue:p,form:h,name:te,inputRef:_,id:ne,style:re,...y}=e,{setTouched:b,setFocused:x,shouldValidateOnChange:ie,validationMode:S,name:C,disabled:w,state:T,validation:E,setDirty:ae,setFilled:ce,validityData:le}=m(),{labelId:A}=a(),{clearErrors:j}=se(),M=ue(!0),P=w||i,F=C??te,I=l(ne),[L,R]=ee({controlled:f,default:p,name:`RadioGroup`,state:`value`}),[z,B]=k.useState(!1),V=g((e,t)=>{u?.(e,t),!t.isCanceled&&R(e)}),H=k.useRef(null),U=k.useRef(null),W=k.useRef(null);function G(e){let t;return _&&(typeof _==`function`?t=_(e):_.current=e),U.current=e,E.inputRef.current=e,t}let K=g((e,t=!1)=>{e&&(t?H.current===e&&(H.current=null):H.current??=e)}),q=g(e=>{if(!e||e.disabled)return;W.current||=e;let t=U.current;if(e.checked||t==null||t.disabled)return G(e)});oe(H,I,L??null),d(L,()=>{j(F),ae(L!==le.initialValue),ce(L!=null),ie()?E.commit(L):E.commit(L,!0);let e=W.current;L==null&&e&&!e.disabled&&G(e)});let fe=y[`aria-labelledby`]??A??M?.legendId,pe={...T,disabled:P??!1,required:c??!1,readOnly:o??!1},J=k.useMemo(()=>({...T,checkedValue:L,disabled:P,form:h,validation:E,name:F,readOnly:o,registerControlRef:K,registerInputRef:q,required:c,setCheckedValue:V,setTouched:B,touched:z}),[L,P,h,E,T,F,o,K,q,c,V,B,z]),Y={role:`radiogroup`,"aria-required":c||void 0,"aria-disabled":P||void 0,"aria-readonly":o||void 0,"aria-labelledby":fe,onFocus(){x(!0)},onBlur(e){v(e.currentTarget,e.relatedTarget)||(b(!0),x(!1),S===`onBlur`&&E.commit(L))},onKeyDownCapture(e){e.key.startsWith(`Arrow`)&&(b(!0),B(!0),x(!0))}};return(0,O.jsx)(N.Provider,{value:J,children:(0,O.jsx)(D,{render:n,className:r,style:re,state:pe,props:[Y,E.getValidationProps,y],refs:[t],stateAttributesMapping:s,enableHomeAndEndKeys:!1,modifierKeys:de})})}),B=n();function V(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=y(`flex flex-col gap-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,O.jsx)(z,{className:i,"data-slot":`radio-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function H(e){let t=(0,B.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=y(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-full border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-full not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:outline-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:focus-visible:aria-invalid:outline-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,O.jsx)(R,{className:`-inset-px absolute flex size-4.5 items-center justify-center rounded-full before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:hidden data-checked:bg-primary sm:size-4 sm:before:size-1.5 in-[[data-slot=radio]:focus-visible]:inset-shadow-[0_0_0_3px_var(--background)] in-[[data-slot=radio]:focus-visible]:outline-2 in-[[data-slot=radio]:focus-visible]:outline-solid in-[[data-slot=radio]:focus-visible]:-outline-offset-2 in-[[data-slot=radio]:focus-visible]:outline-inherit`,"data-slot":`radio-indicator`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,O.jsx)(L,{className:i,"data-slot":`radio`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}export{L as i,V as n,R as r,H as t};
2
- //# sourceMappingURL=radio-group-DSfZzUu8.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,r as t,t as n}from"./react-BUfh6y28.js";import{n as r,t as i}from"./jsx-runtime-DJeoFXNw.js";import{Aa as a,Bf as o,D as s,Ea as c,Ei as l,Fl as u,Gd as d,Gl as f,Ir as p,Ji as m,Js as h,Ka as g,Ku as _,Lf as v,Ll as y,Ni as b,Nr as x,Pa as S,Sa as ee,To as C,Ua as w,Va as te,Wa as ne,Wi as T,_a as E,da as re,es as D,fa as O,ga as k,gr as ie,ha as ae,la as A,ls as j,ma as M,mr as N,nl as P,oa as F,pi as I,qa as L,qi as oe,rp as se,sa as ce,t as R,up as le,wa as ue,ws as de,xa as fe,xt as pe,zr as me}from"./utils-Cs97wR6T.js";import{$s as he,Au as z,Hc as B,Ko as ge,Pt as V,_c as H,en as _e,k as ve,oh as ye,pc as U,td as be}from"./src-BZzGU-vc.js";import{br as W,en as xe,pi as Se,t as Ce,tn as we}from"./runtime-DUPVFypn.js";import{c as Te,d as Ee,f as De,n as G,s as Oe}from"./useRender-BP5vR6yH.js";import{C as ke,d as Ae,f as je,h as Me,p as Ne,u as Pe}from"./TooltipProvider-BzOo4iyi.js";import{t as Fe}from"./spinner-DmRIQvmI.js";import{t as Ie}from"./useParams-C5b2x5BH.js";import{n as Le,r as Re,t as ze}from"./CollapsiblePanel-BlUD5mJC.js";var Be=B(ve),Ve=B(V);function He(e){return Ve(e)&&(e.reason===`thread_not_empty`||e.reason===`thread_not_side_chat`)}function Ue(e){return Be(e)&&e.bootstrapThreadDisposition===`deleted`}function We(e){return Be(e)&&e.bootstrapThreadDisposition===`not-created`}var Ge=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the P4 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(Se)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function Ke(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Ge.some(e=>e.test(t))}function qe(e){return Ke(e)?null:e??null}var K=e(n()),Je=K.createContext(void 0);function Ye(){let e=K.useContext(Je);if(!e)throw Error(De(73));return e}var Xe=0;function Ze(e){return Xe+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Xe}`}function Qe(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function $e(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var et=e=>e.toastMetadata,q={toasts:b(e=>e.toasts),isEmpty:b(e=>e.toasts.length===0),toast:b(et,(e,t)=>e.get(t)?.value),toastIndex:b(et,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:b(et,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:b(et,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:b(e=>e.hovering),focused:b(e=>e.focused),expanded:b(e=>e.hovering||e.focused),expandedOrOutOfFocus:b(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:b(e=>e.prevFocusElement)},tt=class extends l{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:$e(e.toasts)},{},q)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=q.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Ze(`toast`);if(e.id){let t=q.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),q.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=q.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d)this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);else if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),q.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=q.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:$e(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Qe(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Qe(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Qe(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=fe.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=E(e);k(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!q.expandedOrOutOfFocus(this.state),a=i?fe.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:$e(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=ae(A(this.state.viewport));if(!this.state.viewport||!k(this.state.viewport,t)||!M(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=q.toasts(this.state),r=q.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},J=e(i()),nt=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=Ee(()=>new tt({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return a(o.disposeEffect),K.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?o.promiseToast(t.promise,t):e===`update`&&n?o.updateToast(n,t):e===`close`?o.closeToast(n):o.addToast(t)})},[o,i]),o.useSyncedValues({timeout:n,limit:r}),(0,J.jsx)(Je.Provider,{value:o,children:t})},rt=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),it=K.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Ye(),c=ee(),l=K.useRef(!1),u=K.useRef(!1),d=K.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),_=s.useState(`prevFocusElement`),v=p[0]?.height??0,y=K.useMemo(()=>p.some(e=>e.transitionStatus===`ending`),[p]),b=K.useMemo(()=>p.filter(e=>e.priority===`high`),[p]);K.useEffect(()=>{let e=s.state.viewport;if(!e)return;function t(t){f||t.key===`F6`&&E(t)!==e&&(t.preventDefault(),s.setPrevFocusElement(ae(A(e))),e?.focus({preventScroll:!0}),s.pauseTimers(),s.setFocused(!0))}let n=g(e);return O(n,`keydown`,t)},[s,f]),K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=g(e);function n(e){E(e)===t&&(s.setIsWindowFocused(!1),s.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=E(n),i=ae(A(e));r!==t&&k(e,r)&&M(i)||s.resumeTimers(),c.start(0,()=>s.setIsWindowFocused(!0))}return re(O(t,`blur`,n,!0),O(t,`focus`,r,!0))},[s,c,f]),K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=A(e);return O(t,`pointerdown`,s.handleDocumentPointerDown,!0)},[f,s]);function x(e){let t=s.state.viewport;t&&(l.current=!0,e.relatedTarget===t?p[0]?.ref?.current?.focus():s.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&E(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement(),s.resumeTimers())}function C(){let e=s.state.toasts.some(e=>e.transitionStatus===`ending`);s.state.isWindowFocused&&!e&&!d.current&&u.current&&(s.resumeTimers(),s.setHovering(!1),u.current=!1)}K.useEffect(C,[y,s]);function w(){s.pauseTimers(),s.setHovering(!0),u.current=!1}function te(){y||d.current?u.current=!0:(s.resumeTimers(),s.setHovering(!1))}function ne(e){e.pointerType===`touch`&&(d.current=!0)}function T(e){e.pointerType===`touch`&&(d.current=!1,C())}function D(){l.current?l.current=!1:m||M(ae(A(s.state.viewport)))&&(s.setFocused(!0),s.pauseTimers())}function ie(e){m&&!k(s.state.viewport,e.relatedTarget)&&(s.setFocused(!1),s.resumeTimers())}let j={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:te,onFocus:D,onBlur:ie,onKeyDown:S,onClick:D,onPointerDown:ne,onPointerUp:T,onPointerCancel:T},N={expanded:h},P=G(`div`,e,{ref:[t,s.setViewport],state:N,props:[j,{style:{[rt.frontmostHeight]:v?`${v}px`:void 0}},o,{children:(0,J.jsxs)(K.Fragment,{children:[!f&&_&&(0,J.jsx)(F,{onFocus:x}),a,!f&&_&&(0,J.jsx)(F,{onFocus:x})]})}]});return(0,J.jsxs)(K.Fragment,{children:[!f&&_&&(0,J.jsx)(F,{onFocus:x}),P,!m&&b.length>0&&(0,J.jsx)(`div`,{style:ce,children:b.map(e=>(0,J.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,J.jsx)(`div`,{children:e.title}),(0,J.jsx)(`div`,{children:e.description})]},e.id))})]})}),at=e(c()),ot=K.createContext(void 0);function st(){let e=K.useContext(ot);if(!e)throw Error(De(66));return e}var Y=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function ct(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function lt(e){let t=g(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var ut={...C,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},dt=40,ft=10,X=.5,pt=1,mt=`${T},${oe}`,ht=K.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=Ye(),[f,p]=K.useState(void 0),[m,h]=K.useState(!1),[g,_]=K.useState(!1),[v,y]=K.useState(!1),[b,x]=K.useState({x:0,y:0}),[S,ee]=K.useState({x:0,y:0,scale:1}),[C,te]=K.useState(),[T,re]=K.useState(),[D,ie]=K.useState(null),j=K.useRef(null),M=K.useRef({x:0,y:0}),N=K.useRef({x:0,y:0,scale:1}),P=K.useRef(void 0),F=K.useRef(0),I=K.useRef(!1),L=K.useRef({x:0,y:0}),oe=K.useRef(!1),se=K.useRef({x:0,y:0}),ce=K.useRef(null),R=K.useRef(null),le=d.useState(`toastIndex`,n.id),de=d.useState(`toastVisibleIndex`,n.id),fe=d.useState(`toastOffsetY`,n.id),pe=d.useState(`focused`),he=d.useState(`expanded`);ue({open:n.transitionStatus!==`ending`,ref:j,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let z=ne((e=!1)=>{let t=j.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:j,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?at.flushSync(a):a()});w(z,[z]);function B(e){se.current=e,x(e)}w(()=>()=>{R.current?.abort()},[]);function ge(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let V=ne(e=>{if(e.pointerId!==ce.current)return;ce.current=null,R.current?.abort(),R.current=null,h(!1),_(!1),ie(null);let t=N.current;if(e.type===`pointercancel`||I.current){B({x:t.x,y:t.y}),p(void 0);return}let r=!1,i=se.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>dt&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>dt&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(p(s),y(!0),d.closeToast(n.id)):(B({x:t.x,y:t.y}),p(void 0))});function H(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=E(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${mt}`))return;if(I.current=!1,P.current=void 0,F.current=0,ce.current=e.pointerId,M.current={x:e.clientX,y:e.clientY},L.current=M.current,j.current){let e=lt(j.current);N.current=e,ee(e),B({x:e.x,y:e.y})}d.setHovering(!0),h(!0),_(!1),ie(null),oe.current=!0;let n=j.current;if(n){R.current?.abort();let t=new AbortController;R.current=t;let r=A(n);r.addEventListener(`pointerup`,V,{signal:t.signal}),r.addEventListener(`pointercancel`,V,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function _e(e){if(e.pointerId!==ce.current)return;e.preventDefault(),oe.current&&=(M.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>L.current.y||i>0&&t<L.current.y)&&(L.current={x:L.current.x,y:t}),(r<0&&n>L.current.x||r>0&&n<L.current.x)&&(L.current={x:n,y:L.current.y});let a=n-M.current.x,o=t-M.current.y,s=t-L.current.y,c=n-L.current.x;if(!g&&Math.sqrt(a*a+o*o)>=pt&&(_(!0),D===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&ie(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!P.current)D===`vertical`?o>0?u=`down`:o<0&&(u=`up`):D===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&l.includes(u)&&(P.current=u,F.current=ct(u,a,o),p(u));else{let e=P.current,t=ct(e,c,s);t>dt?(I.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&F.current-t>=ft&&(I.current=!0)}let d=ge(a,o),f=N.current.x,m=N.current.y;D===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(D===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(m+=d.y)),B({x:f,y:m})}function ve(e){if(e.key===`Escape`){if(!j.current||!k(j.current,ae(A(j.current))))return;d.closeToast(n.id)}}K.useEffect(()=>{if(!u)return;let e=j.current;if(!e)return;function t(t){k(e,E(t))&&t.preventDefault()}return O(e,`touchmove`,t,{passive:!1})},[u]);function ye(){if(!m&&b.x===S.x&&b.y===S.y&&!v)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=b.x-S.x,t=b.y-S.y;return{transition:m?`none`:void 0,transform:m?`translateX(${b.x}px) translateY(${b.y}px) scale(${S.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let U=n.priority===`high`,be={role:U?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":C,"aria-describedby":T,"aria-hidden":U&&!pe?!0:void 0,onPointerDown:u?H:void 0,onPointerMove:u?_e:void 0,onPointerUp:u?V:void 0,onPointerCancel:u?V:void 0,onKeyDown:ve,inert:me(n.limited),style:{...ye(),[Y.index]:n.transitionStatus===`ending`?le:de,[Y.offsetY]:`${fe}px`,[Y.height]:n.height?`${n.height}px`:void 0}},W=K.useMemo(()=>({rootRef:j,toast:n,titleId:C,setTitleId:te,descriptionId:T,setDescriptionId:re,swiping:m,swipeDirection:f,recalculateHeight:z,index:le,visibleIndex:de,expanded:he}),[n,C,T,m,f,z,le,de,he]),xe={transitionStatus:n.transitionStatus,expanded:he,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Se=G(`div`,e,{ref:[t,W.rootRef],state:xe,stateAttributesMapping:ut,props:[be,s]});return(0,J.jsx)(ot.Provider,{value:W,children:Se})}),gt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=st(),l=K.useRef(null);return w(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),G(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),_t=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=st(),u=o??c.description,d=!!u,f=S(a);w(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=G(`p`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),vt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=st(),u=o??c.title,d=!!u,f=S(a);w(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=G(`h2`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),yt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Ye(),{toast:l}=st(),u=c.useState(`expanded`),[d,f]=K.useState(!1),{getButtonProps:p,buttonRef:m}=te({disabled:a,native:o}),h={type:l.type};return G(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),bt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=st(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=te({disabled:a,native:o}),p={type:c.type},m=G(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),xt=Ae,St=K.createContext(void 0);function Ct(){let e=K.useContext(St);if(e===void 0)throw Error(De(84));return e}var wt=K.forwardRef(function(e,t){let{toast:n,...r}=e,i=Ye(),a=n.positionerProps??Oe,{render:o,className:s,anchor:c=a.anchor,positionMethod:l=a.positionMethod??`absolute`,side:u=a.side??`top`,align:d=a.align??`center`,sideOffset:f=a.sideOffset??0,alignOffset:h=a.alignOffset??0,collisionBoundary:g=a.collisionBoundary??`clipping-ancestors`,collisionPadding:_=a.collisionPadding??5,arrowPadding:v=a.arrowPadding??5,sticky:y=a.sticky??!1,disableAnchorTracking:b=a.disableAnchorTracking??!1,collisionAvoidance:S=a.collisionAvoidance??m,style:ee,...C}=r,[w,te]=K.useState(null),ne=i.useState(`toastIndex`,n.id),T=i.useState(`toastVisibleIndex`,n.id),E=L(c)?c:null,re=I({open:!0,onOpenChange:Te,elements:{floating:w,reference:E}}),D=p({anchor:E,positionMethod:l,floatingRootContext:re,mounted:!0,side:u,sideOffset:f,align:d,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:S}),O=K.useMemo(()=>({side:D.side,align:D.align,anchorHidden:D.anchorHidden}),[D.side,D.align,D.anchorHidden]),k=x(e,O,{styles:{...D.positionerStyles,[Y.index]:n.transitionStatus===`ending`?ne:T},transitionStatus:n.transitionStatus,props:C,refs:[t,te]});return(0,J.jsx)(St.Provider,{value:D,children:k})}),Tt=K.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=Ct();return G(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function Et(){let e=K.useContext(Je);if(!e)throw Error(De(73));let t=e.useState(`toasts`);return K.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function Dt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Ze(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var Ot=t({Action:()=>bt,Arrow:()=>Tt,Close:()=>yt,Content:()=>gt,Description:()=>_t,Portal:()=>xt,Positioner:()=>wt,Provider:()=>nt,Root:()=>ht,Title:()=>vt,Viewport:()=>it,createToastManager:()=>Dt,useToastManager:()=>Et});function kt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var Z=kt(),Q=r(),At={archive:P,clock:f,pin:d,trash:v};function jt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(Mt,t),null}function Mt(){let e=!0,t=new Set,n=()=>{let n=Z.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?At[r.icon]:null,i=r.actions??[],a=i.find(Pt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{Z.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&Z.getSnapshot().includes(r)&&Z.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,J.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=Z.subscribe(n),i=Nt;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),Z.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function Nt(){return Z.setPaused(`web-hidden`,document.hidden)}function Pt(e){return e.primary}var Ft=class extends H()(`ClipboardApiUnavailableError`,{target:U}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},It=class extends H()(`ClipboardWriteError`,{target:U,cause:he()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},Lt=class extends H()(`ClipboardReadUnavailableError`,{target:U}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},Rt=class extends H()(`ClipboardReadError`,{target:U,cause:he()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function zt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function Bt(e,t=`text`,n){if(typeof window>`u`)throw new Ft({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[_e];if(r&&(n={...n,"text/html":pe(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(zt(e,n))return!0;throw new Ft({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new It({target:t,cause:e})}}async function Vt(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new Lt({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new Rt({target:e,cause:t})}}function Ht({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=K.useState(!1),s=K.useRef(null),c=K.useRef(n),l=K.useRef(r),u=K.useRef(t),d=K.useRef(e);c.current=n,l.current=r;let f=K.useRef(i);u.current=t,d.current=e,f.current=i;let p=K.useCallback((e,t)=>{Bt(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return K.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Ut(e){return e===`live`}function Wt(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Gt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Kt(e){return{draftId:e}}function qt(e){return!e.environmentId||!e.threadId?null:h(e.environmentId,e.threadId)}function Jt(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:h(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function Yt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Xt(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Zt(e,t){return t<=1?!1:e>0}function Qt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=$t(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:$t(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function $t(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function en(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var $=Dt(),tn=Dt(),nn=new Map,rn={error:u,info:_,loading:Fe,success:y,warning:o},an=180;function on(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<an))return`line-clamp-4`}function sn(e,t,n){n?.(),e.close(t)}function cn(e){let t=(0,Q.c)(3),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(se,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,J.jsx)(N,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,"data-slot":`toast-close`,className:`-my-1 self-start sm:-my-0.5`,onClick:n,children:r}),t[1]=n,t[2]=i),i}function ln(e){let t=(0,Q.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=Ht(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=R(`size-3`,c),t[4]=c,t[5]=l);let u=a?je:ke,d;t[6]!==l||t[7]!==u?(d=(0,J.jsx)(Pe,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,J.jsx)(N,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var un=`max-h-40 min-h-0 overflow-y-auto overscroll-contain pt-2 pr-0.5 select-text`;function dn(e){let t=(0,Q.c)(11),{children:n,labels:r}=e,[i,a]=(0,K.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c=i?Me:Ne,l;t[0]===c?l=t[1]:(l=(0,J.jsx)(Pe,{className:`size-3.5 shrink-0 opacity-80`,icon:c,strokeWidth:2.25}),t[0]=c,t[1]=l);let u=i?s:o,d;t[2]!==l||t[3]!==u?(d=(0,J.jsxs)(Le,{className:`-ml-0.5 inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 pr-1 pl-0.5 text-left text-xs font-medium text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[l,u]}),t[2]=l,t[3]=u,t[4]=d):d=t[4];let f;t[5]===n?f=t[6]:(f=(0,J.jsx)(ze,{className:`h-(--collapsible-panel-height) overflow-hidden transition-[height,opacity] duration-200 ease-out data-ending-style:h-0 data-ending-style:opacity-0 data-starting-style:h-0 data-starting-style:opacity-0 motion-reduce:transition-opacity motion-reduce:data-ending-style:h-(--collapsible-panel-height)`,children:(0,J.jsx)(`div`,{className:un,children:n})}),t[5]=n,t[6]=f);let p;return t[7]!==i||t[8]!==d||t[9]!==f?(p=(0,J.jsxs)(Re,{className:`min-w-0`,onOpenChange:a,open:i,children:[d,f]}),t[7]=i,t[8]=d,t[9]=f,t[10]=p):p=t[10],p}function fn(e){let t=(0,Q.c)(11),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]!==r||t[1]!==i?(o=R(`min-w-0 select-text wrap-break-word text-muted-foreground`,on(i,r)),t[0]=r,t[1]=i,t[2]=o):o=t[2];let s=o,c;t[3]===s?c=t[4]:(c=(0,J.jsx)(_t,{className:s,"data-slot":`toast-description`}),t[3]=s,t[4]=c);let l;t[5]!==a||t[6]!==n?.expandableLabels?(l=a?(0,J.jsx)(dn,{labels:n?.expandableLabels??{},children:a}):null,t[5]=a,t[6]=n?.expandableLabels,t[7]=l):l=t[7];let u;return t[8]!==c||t[9]!==l?(u=(0,J.jsxs)(J.Fragment,{children:[c,l]}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}function pn(e){let t=e.type?rn[e.type]:null,n=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,r=(e.data?.additionalActions?.length??0)>0,i=e.data?.secondaryActionProps!==void 0;return{Icon:t,copyErrorText:n,hasTrailingControls:n!==null||Xt(e.actionProps)||r||i}}function mn(e){let t=(0,Q.c)(32),{Icon:n,copyErrorText:r,actionProps:i,hasTrailingControls:a,toastData:o,toastDescription:s,toastType:c}=e,l;t[0]===o?.additionalActions?l=t[1]:(l=o?.additionalActions??[],t[0]=o?.additionalActions,t[1]=l);let u=l,d=o?.secondaryActionProps,f=o?.leadingIcon,p;t[2]===d?p=t[3]:(p=d??{},t[2]=d,t[3]=p);let m,h;t[4]===p?(m=t[5],h=t[6]):({className:m,...h}=p,t[4]=p,t[5]=m,t[6]=h);let g;t[7]!==n||t[8]!==f?(g=f?(0,J.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:f}):n?(0,J.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,J.jsx)(n,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[7]=n,t[8]=f,t[9]=g):g=t[9];let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(vt,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=(0,J.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[g,_]}),t[11]=g,t[12]=v);let y;t[13]!==o||t[14]!==s||t[15]!==c?(y=(0,J.jsx)(fn,{toastData:o,toastDescription:s,toastType:c}),t[13]=o,t[14]=s,t[15]=c,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-0.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]!==i||t[21]!==u||t[22]!==r||t[23]!==a||t[24]!==m||t[25]!==d||t[26]!==h||t[27]!==o?.sharedToastId?(x=a?(0,J.jsxs)(`div`,{className:`flex h-5 shrink-0 items-center gap-1.5 self-start`,children:[r===null?null:(0,J.jsx)(ln,{text:r}),u.map(hn),d?(0,J.jsx)(N,{...h,className:m,size:`xs`,type:`button`,variant:o?.sharedToastId?`solid-neutral`:`soft`}):null,Xt(i)?(0,J.jsx)(bt,{className:R(ie({size:`xs`,variant:`solid-neutral`}),`shrink-0`),"data-slot":`toast-action`,children:i?.children}):null]}):null,t[20]=i,t[21]=u,t[22]=r,t[23]=a,t[24]=m,t[25]=d,t[26]=h,t[27]=o?.sharedToastId,t[28]=x):x=t[28];let S;return t[29]!==b||t[30]!==x?(S=(0,J.jsxs)(J.Fragment,{children:[b,x]}),t[29]=b,t[30]=x,t[31]=S):S=t[31],S}function hn(e){let{id:t,props:n}=e,{className:r,...i}=n;return(0,K.createElement)(N,{...i,className:r,key:t,size:`xs`,type:`button`,variant:`soft`})}function gn(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:_n},e[0]=t):t=e[0];let n=Ie(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=s(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function _n(e){return Jt(e)}function vn(e){let t=(0,Q.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=nn.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,nn.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),nn.set(n,e))},l=()=>{a||t!==null||(e<=0?s():(t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)))},u=()=>{document.visibilityState===`visible`&&document.hasFocus()?l():c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,K.useEffect)(i,a),null}function yn(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(jt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,J.jsx)(bn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,J.jsxs)(nt,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function bn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=Et(),i=gn(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>en(e.data,i),t[2]=i,t[3]=s);let c=Qt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(xn));for(let t of nn.keys())e.has(t)||nn.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,K.useEffect)(l,u);let d=Ot,f=Ot,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=R(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Zt(r,c.items.length),s=pn(t);return(0,J.jsxs)(ht,{className:R(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&Z.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&Z.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,J.jsx)(vn,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),(0,J.jsxs)(gt,{className:R(`pointer-events-auto flex min-h-0 items-center justify-between gap-2 overflow-y-visible py-3 pr-2 pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,J.jsx)(mn,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),(0,J.jsx)(cn,{onClick:()=>{let e=t.data?.sharedToastId;e?Z.dismiss(e):sn($,t.id,t.data?.onClose)}})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,J.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,J.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function xn(e){return e.id}function Sn(e){let t=(0,Q.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(Cn,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,J.jsxs)(nt,{toastManager:tn,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function Cn(){let e=(0,Q.c)(7),{toasts:t}=Et(),n=gn(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>en(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(wn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,J.jsx)(xt,{"data-slot":`toast-portal-anchored`,children:(0,J.jsx)(it,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function wn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=pn(e);return n?.anchor?(0,J.jsx)(wt,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,J.jsx)(ht,{className:R(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,J.jsx)(gt,{className:`pointer-events-auto px-2 py-1`,children:(0,J.jsx)(vt,{"data-slot":`toast-title`})}):(0,J.jsxs)(gt,{className:`pointer-events-auto flex min-h-0 items-center justify-between gap-1.5 overflow-y-visible py-3 pr-2 pl-3.5 text-sm [overflow-x:clip]`,children:[(0,J.jsx)(mn,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type}),(0,J.jsx)(cn,{onClick:()=>sn(tn,e.id,e.data?.onClose)})]})})},e.id):null}function Tn(e){let t=e.atom(ge(we.pipe(be(e=>le(e.state)))),{initialValue:xe});return{stateAtom:t,stateValueAtom:D(e=>ye(de(e(t)),()=>xe)).pipe(j(`relay-environment-discovery-value`)),refresh:W(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>we.pipe(z(e=>e.refresh))}),refreshAfterMutation:W(e,{label:`relay-environment-discovery:refresh-after-mutation`,concurrency:{mode:`serial`,key:()=>`refresh-after-mutation`},execute:e=>we.pipe(z(e=>e.refresh))})}}var En=Tn(Ce);export{qe as _,$ as a,He as b,Ut as c,Wt as d,Jt as f,Z as g,Bt as h,tn as i,Yt as l,Ht as m,Sn as n,Kt as o,Vt as p,yn as r,Gt as s,En as t,qt as u,Ue as v,We as y};
2
- //# sourceMappingURL=relay-CnLeC-mg.js.map