@p4code/cli 0.8.4 → 0.8.5

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 (403) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-Bgjc_5FL.mjs → binCli-D9Qk_k5i.mjs} +88 -47
  3. package/dist/client/.vite/manifest.json +2103 -2103
  4. package/dist/client/assets/{AnimatedHeight-DYUgtGfz.js → AnimatedHeight-DKdClmyw.js} +2 -2
  5. package/dist/client/assets/{AuthSurfaceShell-CfLnzrCc.js → AuthSurfaceShell-UJgufrYU.js} +2 -2
  6. package/dist/client/assets/{CSPContext-i9QaQnwk.js → CSPContext-CTpTfAqS.js} +2 -2
  7. package/dist/client/assets/ChatGptUsageButton-9B_WUPVm.js +2 -0
  8. package/dist/client/assets/ChatMarkdown-B9_nJM54.js +65 -0
  9. package/dist/client/assets/{CodexSetupSection.logic-VTayPks4.js → CodexSetupSection.logic-YSEDjbLd.js} +2 -2
  10. package/dist/client/assets/{ComboboxClear-B-iYnTX_.js → ComboboxClear-TEL6MsPn.js} +2 -2
  11. package/dist/client/assets/{CommandBlock-dh2vBT70.js → CommandBlock-C6bCrWJ5.js} +2 -2
  12. package/dist/client/assets/{ComposerPromptEditor-fIqs_--j.js → ComposerPromptEditor-BpT2majW.js} +10 -10
  13. package/dist/client/assets/{CompositeRoot-JeAqW-33.js → CompositeRoot-CZuZX6hs.js} +2 -2
  14. package/dist/client/assets/{ConnectionStatusDot-BCSqqCpf.js → ConnectionStatusDot-BX6msmak.js} +2 -2
  15. package/dist/client/assets/{DevicePanel-BckpiUTa.js → DevicePanel-DavxmX2w.js} +2 -2
  16. package/dist/client/assets/{DeviceSetup-L8Q-0h1V.js → DeviceSetup-CZX8TKF_.js} +2 -2
  17. package/dist/client/assets/{DialogTitle-BRYusK7T.js → DialogTitle-CLcXbJRs.js} +2 -2
  18. package/dist/client/assets/{DiffCommentAnnotation-DxxGd0sM.js → DiffCommentAnnotation-B21n3tGU.js} +3 -3
  19. package/dist/client/assets/{DiffFileTree-C2N3dwbB.js → DiffFileTree--L--vp02.js} +2 -2
  20. package/dist/client/assets/DiffPanel-T4lIPUlN.js +2 -0
  21. package/dist/client/assets/{DiffWorkerPoolProvider-Dd8cIhyy.js → DiffWorkerPoolProvider-Cxzr_uYq.js} +3 -3
  22. package/dist/client/assets/{EnvironmentMachineIcon-giyHKjbh.js → EnvironmentMachineIcon-CGINHXnT.js} +2 -2
  23. package/dist/client/assets/{ExpandableText-dJhpznMp.js → ExpandableText-D1ewr-yU.js} +3 -3
  24. package/dist/client/assets/{FieldControl-CxuWXcJE.js → FieldControl-BVq7aDv3.js} +2 -2
  25. package/dist/client/assets/{FileDiff-EWd5oWlS.js → FileDiff-C0ZCBwBc.js} +2 -2
  26. package/dist/client/assets/{FilePreviewPanel-D3kud1xs.js → FilePreviewPanel-CxOIUI0_.js} +4 -4
  27. package/dist/client/assets/{FoldedSettingsSection-CsN_jb3V.js → FoldedSettingsSection-DmcJrCZO.js} +2 -2
  28. package/dist/client/assets/{FormContext-Vk5aZcR6.js → FormContext-CObkgUvS.js} +2 -2
  29. package/dist/client/assets/{Icons-DM1SzuL7.js → Icons-CSHLGz_M.js} +2 -2
  30. package/dist/client/assets/{KeybindingsSettings.logic-BcJGxVhV.js → KeybindingsSettings.logic-D9eYCeK5.js} +2 -2
  31. package/dist/client/assets/{NoProjectsHero-DrkWMiG4.js → NoProjectsHero-C0RwYoYq.js} +2 -2
  32. package/dist/client/assets/{PanelLayoutControls-DjmAXscr.js → PanelLayoutControls-CcE6oZUh.js} +8 -8
  33. package/dist/client/assets/{PierreEntryIcon-BJ8xtDqQ.js → PierreEntryIcon-D0PlfaRc.js} +2 -2
  34. package/dist/client/assets/{PreviewPanel-D_JLD7YP.js → PreviewPanel-DgRCZ-80.js} +2 -2
  35. package/dist/client/assets/ProjectDefaultsSettings-DOXJKuJ7.js +2 -0
  36. package/dist/client/assets/{ProjectFavicon-By6-kpgk.js → ProjectFavicon-CFPeQQsG.js} +3 -3
  37. package/dist/client/assets/ProjectIconPickerDialog-B5iXalFo.js +2 -0
  38. package/dist/client/assets/{ProjectMonogram-BJVBhwjz.js → ProjectMonogram-HCgoNxPJ.js} +2 -2
  39. package/dist/client/assets/{ProviderAuthTerminal-DBiUwanv.js → ProviderAuthTerminal-rBb4SeQd.js} +2 -2
  40. package/dist/client/assets/{ProviderModelPicker-DV64N-fE.js → ProviderModelPicker-CHfA6QfR.js} +2 -2
  41. package/dist/client/assets/{ProviderSettingsForm-Tkr5xKCJ.js → ProviderSettingsForm-cr5QEWx_.js} +2 -2
  42. package/dist/client/assets/{PullRequestCodeTab-DijqMjN0.js → PullRequestCodeTab-CyJ0_1HE.js} +3 -3
  43. package/dist/client/assets/{ReadOnlySourcePreview-CydDaO9-.js → ReadOnlySourcePreview-BvUk75g2.js} +2 -2
  44. package/dist/client/assets/{RenderErrorBoundary-D4M2khxk.js → RenderErrorBoundary-h3g72sj0.js} +2 -2
  45. package/dist/client/assets/ScheduledTasksSettings-CpUearCU.js +4 -0
  46. package/dist/client/assets/ScopedSwitch-D1QVfZHR.js +2 -0
  47. package/dist/client/assets/{SecretInput-CNWNAhNe.js → SecretInput-SiHUbFCV.js} +2 -2
  48. package/dist/client/assets/{SettingsPanels-DAv_V_mk.js → SettingsPanels-B9t76y-c.js} +5 -5
  49. package/dist/client/assets/{SettingsPanels.logic-BYa5iHwl.js → SettingsPanels.logic-B3IqBMv7.js} +2 -2
  50. package/dist/client/assets/{SettingsScopeNotice-CcLrVZWz.js → SettingsScopeNotice-B_awMQPw.js} +2 -2
  51. package/dist/client/assets/{T3ConnectAccountPages-DjITJ87o.js → T3ConnectAccountPages-DOpj673A.js} +2 -2
  52. package/dist/client/assets/{T3ConnectSidebarSignIn-B-rQNmqG.js → T3ConnectSidebarSignIn-zrB8y6DQ.js} +2 -2
  53. package/dist/client/assets/{ThemeEditorPanel-CJGqmeTA.js → ThemeEditorPanel-Cx7KulxB.js} +2 -2
  54. package/dist/client/assets/{ThreadTerminalDrawer-Cdl3DAIx.js → ThreadTerminalDrawer-ChcqArNC.js} +4 -4
  55. package/dist/client/assets/{Virtualizer-Bk-YJlPj.js → Virtualizer-DWmIp9HB.js} +2 -2
  56. package/dist/client/assets/{WorkspaceBreadcrumb-DSFWvH19.js → WorkspaceBreadcrumb-Dx7xMwQd.js} +2 -2
  57. package/dist/client/assets/{WorkspacePageContainer-BXUbfbEU.js → WorkspacePageContainer-sM_H3DH4.js} +2 -2
  58. package/dist/client/assets/{WorkspacePageHeader-LbIzJCDs.js → WorkspacePageHeader-C_J7FxVt.js} +2 -2
  59. package/dist/client/assets/_chat-Du_FC4wO.js +45 -0
  60. package/dist/client/assets/{_chat.index-CTew1WmI.js → _chat.index-DUyKTtkh.js} +2 -2
  61. package/dist/client/assets/_chat.new-CMoB99iV.js +4 -0
  62. package/dist/client/assets/{_chat.pull-requests-BlXnsqov.js → _chat.pull-requests-BuTKumeN.js} +2 -2
  63. package/dist/client/assets/{abnfDiagram-VCTEODGH-brKh7bzh.js → abnfDiagram-VCTEODGH-D2OflHz4.js} +2 -2
  64. package/dist/client/assets/{alert-quTC4YbH.js → alert-8IFNkYPw.js} +2 -2
  65. package/dist/client/assets/architecture-7GRP2DOG-BMsijJGx.js +1 -0
  66. package/dist/client/assets/{architectureDiagram-5GKGNRK7-BVDiXgfK.js → architectureDiagram-5GKGNRK7-Cz7fFw7N.js} +2 -2
  67. package/dist/client/assets/arrow-left-DjrJekQJ.js +1 -0
  68. package/dist/client/assets/arrow-right-DNQ3322O.js +1 -0
  69. package/dist/client/assets/arrow-up-down-DpVszLOH.js +1 -0
  70. package/dist/client/assets/assets-DJce0KBy.js +2 -0
  71. package/dist/client/assets/bell-ehBYv81q.js +1 -0
  72. package/dist/client/assets/{blockDiagram-I7D4REHJ-CzoRCJDe.js → blockDiagram-I7D4REHJ-BcqcXQ0x.js} +2 -2
  73. package/dist/client/assets/blocks-CF1Wdm4Y.js +1 -0
  74. package/dist/client/assets/bot-Dj9hYg2w.js +1 -0
  75. package/dist/client/assets/{browserHistoryStore-Cw3ffhOV.js → browserHistoryStore-CuO1erOb.js} +2 -2
  76. package/dist/client/assets/{browserLinkTarget-KTI1tSl7.js → browserLinkTarget-B5-9Pt65.js} +2 -2
  77. package/dist/client/assets/{c4Diagram-7LVT6UL2-CfyobiDu.js → c4Diagram-7LVT6UL2-DDiDhcli.js} +2 -2
  78. package/dist/client/assets/calendar-clock-BaXgPf_7.js +1 -0
  79. package/dist/client/assets/channel-pJ5lNF0h.js +2 -0
  80. package/dist/client/assets/chart-no-axes-column-BzuvLLND.js +1 -0
  81. package/dist/client/assets/checkbox-BUOikrm3.js +2 -0
  82. package/dist/client/assets/{chunk-4HAMMTFA-CPnMRFld.js → chunk-4HAMMTFA-_7K6yngz.js} +2 -2
  83. package/dist/client/assets/{chunk-75Z2AOVW-C85FbOND.js → chunk-75Z2AOVW-CUqo_4ua.js} +2 -2
  84. package/dist/client/assets/{chunk-DU6HZSFF-s_qrqgaz.js → chunk-DU6HZSFF-C3RStRBi.js} +2 -2
  85. package/dist/client/assets/{chunk-F27PBJKO-90tTgV9x.js → chunk-F27PBJKO-BOr5cbtz.js} +2 -2
  86. package/dist/client/assets/{chunk-GMAD6QVW-CYRPr7hZ.js → chunk-GMAD6QVW-qBcSdTWV.js} +2 -2
  87. package/dist/client/assets/{chunk-GVQU2GXP-CxAvUb1-.js → chunk-GVQU2GXP-D8rhGQK_.js} +2 -2
  88. package/dist/client/assets/{chunk-IMKFNOWR-794woOlB.js → chunk-IMKFNOWR-BjTZFMrm.js} +2 -2
  89. package/dist/client/assets/{chunk-L3NEJ4N5-JXcRdiIo.js → chunk-L3NEJ4N5-DnCelWBi.js} +2 -2
  90. package/dist/client/assets/{chunk-OSK3NFVY-ToxVvjW1.js → chunk-OSK3NFVY-BEgD3sGZ.js} +2 -2
  91. package/dist/client/assets/{chunk-P2QGCYS3-JB1PmfIc.js → chunk-P2QGCYS3-DDmmXS6G.js} +2 -2
  92. package/dist/client/assets/{chunk-POPQ4Y6H-RMxlqjhd.js → chunk-POPQ4Y6H-CefHvRtI.js} +2 -2
  93. package/dist/client/assets/{chunk-PWAF6VOD-AB579n2y.js → chunk-PWAF6VOD-BPIKFLCK.js} +2 -2
  94. package/dist/client/assets/{chunk-SHT3W25Y-CV2hE9-g.js → chunk-SHT3W25Y-B_pDi6kv.js} +2 -2
  95. package/dist/client/assets/{chunk-SVP7TREG-b2Gs4u5W.js → chunk-SVP7TREG-BD15vJFs.js} +2 -2
  96. package/dist/client/assets/{chunk-TICWLB2K-CtkYqLLJ.js → chunk-TICWLB2K-B2yA6VhZ.js} +2 -2
  97. package/dist/client/assets/classDiagram-ZZMXUADV-D4Ed7oKu.js +2 -0
  98. package/dist/client/assets/classDiagram-v2-VYDZK3BY-D4Ed7oKu.js +2 -0
  99. package/dist/client/assets/{color-picker-CFc6YapE.js → color-picker-Dqvd0njw.js} +2 -2
  100. package/dist/client/assets/{combobox-WVgW_agq.js → combobox-BPRK10Il.js} +2 -2
  101. package/dist/client/assets/{command-w6WcFbeZ.js → command-B-SWHWbd.js} +2 -2
  102. package/dist/client/assets/{connect-D_ncSJiK.js → connect-D8LGiBSX.js} +2 -2
  103. package/dist/client/assets/{connect-agent-8mHL_bau.js → connect-agent-B3TvHBIV.js} +2 -2
  104. package/dist/client/assets/corner-left-up-8yNxlIpO.js +1 -0
  105. package/dist/client/assets/{cynefin-OW5HDTMX-BDIjrXPB.js → cynefin-OW5HDTMX-D-j3kzkd.js} +1 -1
  106. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-h9tw36zs.js → cynefinDiagram-5FMLGOSQ-CVEhj0G_.js} +2 -2
  107. package/dist/client/assets/{dagre-GXQ25YYZ-D3s1T81F.js → dagre-GXQ25YYZ-opF-kR2J.js} +2 -2
  108. package/dist/client/assets/device-DARKbqyG.js +2 -0
  109. package/dist/client/assets/{diagram-S7CK7UJ4-DTawhR4X.js → diagram-S7CK7UJ4-Y1OUf_Uf.js} +2 -2
  110. package/dist/client/assets/{diagram-UQ7AKVKN-CTUDQHKY.js → diagram-UQ7AKVKN-BMAkQiYU.js} +2 -2
  111. package/dist/client/assets/{diagram-VSXAHHWV-DsbNNWnj.js → diagram-VSXAHHWV-YWI6689v.js} +2 -2
  112. package/dist/client/assets/{diagram-VX7I27RA-BBy99N9O.js → diagram-VX7I27RA-DVxQ1Tyn.js} +2 -2
  113. package/dist/client/assets/{diagram-Z3DM3KII-CEy69xv1.js → diagram-Z3DM3KII-DzaunCE7.js} +2 -2
  114. package/dist/client/assets/{dialog-CPLO59bH.js → dialog-ChNU2rSW.js} +2 -2
  115. package/dist/client/assets/{diffRendering-BlmxsRF9.js → diffRendering-TJ6NEHef.js} +2 -2
  116. package/dist/client/assets/{discovery-list-D0LBmkzJ.js → discovery-list-2jVj88oX.js} +2 -2
  117. package/dist/client/assets/{dist-DZWol-cd.js → dist-Dc07DWZJ.js} +3 -3
  118. package/dist/client/assets/download-KOf4APex.js +1 -0
  119. package/dist/client/assets/{draft-input-CmvO5rl_.js → draft-input-CAOyi5vd.js} +2 -2
  120. package/dist/client/assets/{duoViewer-B0QD-fyi.js → duoViewer-CkI16mDl.js} +2 -2
  121. package/dist/client/assets/dynamic-B6ssT_6R.js +3 -0
  122. package/dist/client/assets/earth-Gh21ySR9.js +1 -0
  123. package/dist/client/assets/{ebnfDiagram-PWID7BFC-B9LWNbny.js → ebnfDiagram-PWID7BFC-CLu3StxL.js} +2 -2
  124. package/dist/client/assets/ellipsis-Dd1lpp1y.js +1 -0
  125. package/dist/client/assets/{embeddedScripts-B1MGNr-e.js → embeddedScripts-C0cHj-rX.js} +2 -2
  126. package/dist/client/assets/{empty-tr-EsB66.js → empty-DJMr9MZU.js} +2 -2
  127. package/dist/client/assets/entities-HApogVCu.js +2 -0
  128. package/dist/client/assets/{erDiagram-RLTQ6QDP-Nu9IMF5-.js → erDiagram-RLTQ6QDP-CMztaIAH.js} +2 -2
  129. package/dist/client/assets/eventmodeling-NTZA5JFV-D1FYr7Uj.js +1 -0
  130. package/dist/client/assets/eye-CQCt8uGE.js +1 -0
  131. package/dist/client/assets/file-search-BXNWZ1nV.js +1 -0
  132. package/dist/client/assets/{fileLinks-BHAkEh9k.js → fileLinks-3CrgspkN.js} +2 -2
  133. package/dist/client/assets/{fileTreeExpansion-BierCVUV.js → fileTreeExpansion-CYkjiRdT.js} +2 -2
  134. package/dist/client/assets/flowDiagram-HODETNUW-leGOLc6K.js +1 -0
  135. package/dist/client/assets/folder-git-2-BIZ4K8z0.js +1 -0
  136. package/dist/client/assets/folder-open-BI7lMTSr.js +1 -0
  137. package/dist/client/assets/folder-plus-B91hg6qR.js +1 -0
  138. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-D_s5F9rI.js → ganttDiagram-EL5Y4UJY-G_L0ijf2.js} +2 -2
  139. package/dist/client/assets/{getDiffFileInput-B5j6sQbM.js → getDiffFileInput-Kc1w64Y-.js} +2 -2
  140. package/dist/client/assets/git-branch-Yqn0BBlE.js +1 -0
  141. package/dist/client/assets/{gitGraph-4MIJSDKK-BASxGOL3.js → gitGraph-4MIJSDKK-BmuEuxsx.js} +1 -1
  142. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BtA4z_1S.js → gitGraphDiagram-WWUBYQGX-C6A4msS5.js} +2 -2
  143. package/dist/client/assets/grip-vertical-DbE6Bv-r.js +1 -0
  144. package/dist/client/assets/{guideRunStore-C95PbUuP.js → guideRunStore-sdfoC8zb.js} +2 -2
  145. package/dist/client/assets/hard-drive--FvDwcA1.js +1 -0
  146. package/dist/client/assets/history-D-6p2svD.js +1 -0
  147. package/dist/client/assets/house-6Nj_TaKT.js +1 -0
  148. package/dist/client/assets/{htmlRender-DgdJ8GkZ.js → htmlRender-BPiW3VQi.js} +2 -2
  149. package/dist/client/assets/index-EKWtrZNr.js +3 -0
  150. package/dist/client/assets/{info-A6RAGUB7-Q4Qe5TI_.js → info-A6RAGUB7-CwFLPSUe.js} +1 -1
  151. package/dist/client/assets/{infoDiagram-27XIBGKW-CNnDxcfZ.js → infoDiagram-27XIBGKW-bjIIr1Q4.js} +2 -2
  152. package/dist/client/assets/{input-group-DJwXFHGO.js → input-group-DM7QvN7X.js} +2 -2
  153. package/dist/client/assets/{input-DaCwubQj.js → input-w_nbMVAd.js} +2 -2
  154. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-Drb03OY6.js → ishikawaDiagram-5VMMS53U-ymImqXAG.js} +2 -2
  155. package/dist/client/assets/{journeyDiagram-3NMN7TZE-CynC6Up1.js → journeyDiagram-3NMN7TZE-TJpDU0em.js} +2 -2
  156. package/dist/client/assets/{kanban-definition-UXKFOSKX-DfyC_hIe.js → kanban-definition-UXKFOSKX-Bhm6s1x1.js} +2 -2
  157. package/dist/client/assets/{kbd-R3wkAau0.js → kbd-CTZhqOH9.js} +2 -2
  158. package/dist/client/assets/{keybindings-QrjnJ5jB.js → keybindings-CJFu-Dyg.js} +2 -2
  159. package/dist/client/assets/keyboard-Bf3n2zS8.js +1 -0
  160. package/dist/client/assets/{lazyRouteComponent-cLZROdN-.js → lazyRouteComponent-WxKijHdU.js} +2 -2
  161. package/dist/client/assets/{line-C3gvAOpf.js → line-C24Qe7Rj.js} +2 -2
  162. package/dist/client/assets/link-BVjRZ3mh.js +1 -0
  163. package/dist/client/assets/{link-Bl21VXlj.js → link-DnBUR2mx.js} +2 -2
  164. package/dist/client/assets/{linkedPrompt-DAcv0O_f.js → linkedPrompt-CNv-bVSs.js} +2 -2
  165. package/dist/client/assets/list-DrTK4zhP.js +1 -0
  166. package/dist/client/assets/loader-Bc9xbkPa.js +2 -0
  167. package/dist/client/assets/main-D1oD2GPo.js +30 -0
  168. package/dist/client/assets/main-hjb9WdQ8.css +2 -0
  169. package/dist/client/assets/{mediaReference-DN8lzwOF.js → mediaReference-vtwfoFLK.js} +2 -2
  170. package/dist/client/assets/{mediaSource-0nIWHHoL.js → mediaSource-BDkqXaxs.js} +2 -2
  171. package/dist/client/assets/{mermaid-parser.core-B3cYmj0d.js → mermaid-parser.core-D2hAGRv3.js} +4 -4
  172. package/dist/client/assets/{mermaid.core-9ekBSYCO.js → mermaid.core-DWtHy2iz.js} +5 -5
  173. package/dist/client/assets/message-circle-question-mark-D2JAzS9x.js +1 -0
  174. package/dist/client/assets/message-square-DNTOkKRN.js +1 -0
  175. package/dist/client/assets/message-square-dashed-NGYZLQqB.js +1 -0
  176. package/dist/client/assets/{mindmap-definition-YA3MSWOX-K4rtZu2z.js → mindmap-definition-YA3MSWOX-DCzTD1Gd.js} +2 -2
  177. package/dist/client/assets/mouse-pointer-2-CgUWLVBh.js +1 -0
  178. package/dist/client/assets/number-field-yRjM_PYx.js +2 -0
  179. package/dist/client/assets/{observeResize-BEjNJ-rK.js → observeResize-wFdsooQ8.js} +2 -2
  180. package/dist/client/assets/{onboarding--LqcHqO0.js → onboarding-Buk_SNIp.js} +2 -2
  181. package/dist/client/assets/{openFileInPreview-NwK1GJFN.js → openFileInPreview-CxrjOX7D.js} +2 -2
  182. package/dist/client/assets/{p4ProjectFile-CVEoe1SJ.js → p4ProjectFile-DNlgD3LH.js} +2 -2
  183. package/dist/client/assets/{packet-AYTQ26CC-kDkfULQq.js → packet-AYTQ26CC-CSklBRjj.js} +1 -1
  184. package/dist/client/assets/{pair-Bxo10T5t.js → pair-DYnW2Jz0.js} +2 -2
  185. package/dist/client/assets/palette-DCF6iKZY.js +1 -0
  186. package/dist/client/assets/panel-left-BObCZ482.js +1 -0
  187. package/dist/client/assets/panels-top-left-4ditdjHS.js +1 -0
  188. package/dist/client/assets/{pegDiagram-XKGWAZYB-6b8AqBYd.js → pegDiagram-XKGWAZYB-Cgo_C_YQ.js} +2 -2
  189. package/dist/client/assets/{phoneViewer-Vql_2ZzY.js → phoneViewer-CVOLU68D.js} +2 -2
  190. package/dist/client/assets/{pie-WAS4IAKB-CfoqFIwI.js → pie-WAS4IAKB-y0cNnmhp.js} +1 -1
  191. package/dist/client/assets/{pieDiagram-E7YTZNPT-i8FgTMai.js → pieDiagram-E7YTZNPT-CR9uQOKX.js} +2 -2
  192. package/dist/client/assets/{pierre-icons-CBmlpFgP.js → pierre-icons-YFKnGmUq.js} +2 -2
  193. package/dist/client/assets/{popover-BXin7C0B.js → popover-D-VzRDzk.js} +2 -2
  194. package/dist/client/assets/{preview-6t42evKb.js → preview-C7hqmFHN.js} +2 -2
  195. package/dist/client/assets/{preview-C9iPHfb1.js → preview-DT6Qi-Q0.js} +2 -2
  196. package/dist/client/assets/{previewMiniPlayerStore-BDRPsVx0.js → previewMiniPlayerStore-Dmvk7kfx.js} +2 -2
  197. package/dist/client/assets/primary-bBvWt8wp.js +2 -0
  198. package/dist/client/assets/primaryCloudLinkState-DDmxU43H.js +2 -0
  199. package/dist/client/assets/projectFilesQueryState-C9bparJ7.js +2 -0
  200. package/dist/client/assets/projectScriptEditor-2klDgdXc.js +2 -0
  201. package/dist/client/assets/{providerSkills-D0IxW0_5.js → providerSkills-Bd9FOodA.js} +2 -2
  202. package/dist/client/assets/{pullRequestDetail.logic-BiwUoz1M.js → pullRequestDetail.logic-BHCv2eTg.js} +4 -4
  203. package/dist/client/assets/{pullRequestReviewStore-J7YIGsZ9.js → pullRequestReviewStore-DNDBmRdQ.js} +2 -2
  204. package/dist/client/assets/pullRequests-NQiU1cvE.js +2 -0
  205. package/dist/client/assets/puzzle-DC6izfkI.js +1 -0
  206. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-DzvIAxCm.js → quadrantDiagram-AXDQQJYC-B2RnhUBb.js} +2 -2
  207. package/dist/client/assets/queries-DrIiv9gC.js +2 -0
  208. package/dist/client/assets/query-B_BcLKlb.js +2 -0
  209. package/dist/client/assets/{radar-RG4KPBEZ-BnTV8utT.js → radar-RG4KPBEZ-Dygcuho2.js} +1 -1
  210. package/dist/client/assets/{radio-group-DhpPG5HP.js → radio-group-ESEwcJva.js} +2 -2
  211. package/dist/client/assets/{railroad-74A4TZTK-nxEBKbUo.js → railroad-74A4TZTK-CK7b6dqk.js} +1 -1
  212. package/dist/client/assets/railroad-abnf-HS5TGJTU-Bn3ASlRb.js +1 -0
  213. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DpIqYG5o.js +1 -0
  214. package/dist/client/assets/railroad-peg-WCYAUIDC-9vGlAMJk.js +1 -0
  215. package/dist/client/assets/{railroadDiagram-O6MQD6OU-DFdlMVKn.js → railroadDiagram-O6MQD6OU-DsiQNHoT.js} +2 -2
  216. package/dist/client/assets/{renderScheduler-DWKKtxcJ.js → renderScheduler-DwOi4uKZ.js} +2 -2
  217. package/dist/client/assets/{requirementDiagram-BXWQKSXE-BW8o0F_p.js → requirementDiagram-BXWQKSXE-DUEtMGYN.js} +2 -2
  218. package/dist/client/assets/{rightPanelStore-CQ94819A.js → rightPanelStore-BWYBRVeP.js} +2 -2
  219. package/dist/client/assets/rotate-ccw-BSwk8mHM.js +1 -0
  220. package/dist/client/assets/rotate-cw-BsgLwrfv.js +1 -0
  221. package/dist/client/assets/runtime-CBB2It1x.js +6 -0
  222. package/dist/client/assets/runtime-Dydpcwo9.js +2 -0
  223. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-JA6FB6i0.js → sankeyDiagram-P5KCCOFB-Bnb7-uIo.js} +2 -2
  224. package/dist/client/assets/{scheduledTasksSettings.logic-C_AdQNVz.js → scheduledTasksSettings.logic-CFyLLJ0-.js} +3 -3
  225. package/dist/client/assets/{scroll-area-BYyfw-9F.js → scroll-area-iMm_YXqJ.js} +2 -2
  226. package/dist/client/assets/{select-CjGEfXy_.js → select-cvR_zMkG.js} +2 -2
  227. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-DgBrrcVR.js → sequenceDiagram-WJ2MYXX4-BKHWFnq6.js} +2 -2
  228. package/dist/client/assets/server-FMafPUns.js +2 -0
  229. package/dist/client/assets/session-BI6WO3-p.js +2 -0
  230. package/dist/client/assets/{session-logic-l1juLk9v.js → session-logic-DVvClfzW.js} +5 -5
  231. package/dist/client/assets/settings-2-BbyXH0uI.js +1 -0
  232. package/dist/client/assets/settings-DRKdVCbB.js +1 -0
  233. package/dist/client/assets/{settings-xKzLy5aw.js → settings-Dzr6EHna.js} +2 -2
  234. package/dist/client/assets/settings.appearance-Dcbf4cgV.js +2 -0
  235. package/dist/client/assets/settings.archived-BI9u9Y07.js +2 -0
  236. package/dist/client/assets/{settings.computer-use-DZu90DiM.js → settings.computer-use-CE8rpPYM.js} +2 -2
  237. package/dist/client/assets/settings.connections-BWLCI5Zi.js +2 -0
  238. package/dist/client/assets/{settings.data-controls-CBrcsSvm.js → settings.data-controls-CmJZj_HT.js} +2 -2
  239. package/dist/client/assets/{settings.decisions-CGz9znLs.js → settings.decisions-Bm-M9k3t.js} +2 -2
  240. package/dist/client/assets/{settings.diagnostics-DKkOOzoq.js → settings.diagnostics-ao6ZzXXw.js} +2 -2
  241. package/dist/client/assets/settings.general-BoU897Dm.js +2 -0
  242. package/dist/client/assets/{settings.integrations-K3Jwfkyd.js → settings.integrations-ChLDKsIY.js} +2 -2
  243. package/dist/client/assets/{settings.keybindings-BbR3qnVs.js → settings.keybindings-BSg3FHQZ.js} +2 -2
  244. package/dist/client/assets/{settings.open-source-licenses-Mh-zg97k.js → settings.open-source-licenses-B4sC68Ud.js} +2 -2
  245. package/dist/client/assets/settings.plugins-CGUFRhFY.js +5 -0
  246. package/dist/client/assets/{settings.projects-BahZsoyx.js → settings.projects-V3nNBIzc.js} +4 -4
  247. package/dist/client/assets/settings.providers-D1BgocCC.js +3 -0
  248. package/dist/client/assets/settings.scheduled-tasks-C-I22teI.js +2 -0
  249. package/dist/client/assets/{settings.snap-shot-Bs_DZS7D.js → settings.snap-shot-aum1tmsR.js} +2 -2
  250. package/dist/client/assets/{settings.source-control-Akrp_mGm.js → settings.source-control-8YMYuva4.js} +2 -2
  251. package/dist/client/assets/{settings.storage-fl2BN0Cu.js → settings.storage-e3yKBYeM.js} +2 -2
  252. package/dist/client/assets/settingsLayout-BUbXPq57.js +3 -0
  253. package/dist/client/assets/shield-check-CG2tOYd1.js +1 -0
  254. package/dist/client/assets/shield-question-mark-Mk3rAYhm.js +1 -0
  255. package/dist/client/assets/{sidebar-MBwCdIpv.js → sidebar-CjtIIYSY.js} +2 -2
  256. package/dist/client/assets/{sidebarProjectGrouping-Sm7y9bd1.js → sidebarProjectGrouping-BmTLes3y.js} +2 -2
  257. package/dist/client/assets/{skeleton-CS8ffFVv.js → skeleton-DzaiJbx8.js} +2 -2
  258. package/dist/client/assets/{sortable.esm-CwrTFe-B.js → sortable.esm-Df_JB8i3.js} +2 -2
  259. package/dist/client/assets/{sourceControl-DyHbbOxl.js → sourceControl-BfGzu06x.js} +2 -2
  260. package/dist/client/assets/{spinner-B7a-VUeR.js → spinner-RAU9Cg6j.js} +2 -2
  261. package/dist/client/assets/square-pen-BuwM-DT0.js +1 -0
  262. package/dist/client/assets/{standalone-page-DTvNMgJy.js → standalone-page-Bsaqnigq.js} +2 -2
  263. package/dist/client/assets/{stateDiagram-D77RDMKH-gHEAo7xC.js → stateDiagram-D77RDMKH-BhdX_IDZ.js} +2 -2
  264. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Ba0Qofsh.js +2 -0
  265. package/dist/client/assets/{swimlanes-42K2YHIH-_qZ90QGb.js → swimlanes-42K2YHIH-T7QLMavY.js} +2 -2
  266. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-C9WqWw-N.js +9 -0
  267. package/dist/client/assets/{terminal-links-Dc2HX7Ov.js → terminal-links-B9s8s-tz.js} +2 -2
  268. package/dist/client/assets/{terminalSessions-DK9WKgga.js → terminalSessions-BmqpP0Ss.js} +2 -2
  269. package/dist/client/assets/text-search-DyMq-QgY.js +1 -0
  270. package/dist/client/assets/{textarea-CYXHTTG6.js → textarea-C9YeXMVc.js} +2 -2
  271. package/dist/client/assets/{themePalette-zVYGoviO.js → themePalette-C1oD3Oeg.js} +3 -3
  272. package/dist/client/assets/threadSort-C4CtIL5v.js +2 -0
  273. package/dist/client/assets/{timeline-definition-24CTP7MA-BxWmcZQs.js → timeline-definition-24CTP7MA-Dnja29q2.js} +2 -2
  274. package/dist/client/assets/toast-DEgXlTR7.js +2 -0
  275. package/dist/client/assets/{toggle-fk33ppsB.js → toggle-CNbzG8Ec.js} +2 -2
  276. package/dist/client/assets/{toggle-group-W0bDGcPB.js → toggle-group-DIqmqqKQ.js} +2 -2
  277. package/dist/client/assets/tooltip-DyiHlEs0.js +2 -0
  278. package/dist/client/assets/{treeView-Q6P3EWNA-BsPhq-Fl.js → treeView-Q6P3EWNA-KHtw7wMC.js} +1 -1
  279. package/dist/client/assets/{treemap-WGGIJYW6-DZ3fnU-o.js → treemap-WGGIJYW6-BZN3U17E.js} +1 -1
  280. package/dist/client/assets/{usage-DlNazxzV.js → usage--nsoWaqi.js} +2 -2
  281. package/dist/client/assets/{usageAccess-Mp1Nbm2r.js → usageAccess-Dwz13Eun.js} +2 -2
  282. package/dist/client/assets/{usageFormat-ZiOrCBxk.js → usageFormat-Z0lz-RCF.js} +2 -2
  283. package/dist/client/assets/{usageShortcuts-Be5hddhr.js → usageShortcuts-cwv5i-oF.js} +2 -2
  284. package/dist/client/assets/use-atom-command-BVrZ0hTO.js +2 -0
  285. package/dist/client/assets/{useAriaLabelledBy-D-n0SDV6.js → useAriaLabelledBy-z3tVAFR_.js} +2 -2
  286. package/dist/client/assets/{useHandleNewThread-BQ5wqZab.js → useHandleNewThread-lAV5NpwQ.js} +2 -2
  287. package/dist/client/assets/{useLocation-BN5q7LjL.js → useLocation-CxFbcar1.js} +2 -2
  288. package/dist/client/assets/useNavigate-CLQYZa7I.js +2 -0
  289. package/dist/client/assets/{useNavigateBack-BWhsiBJ5.js → useNavigateBack-91jfuRCn.js} +2 -2
  290. package/dist/client/assets/{useParams-DQgx0pmy.js → useParams-nxAoxVO6.js} +2 -2
  291. package/dist/client/assets/{usePermissionStatus-FtemMvNg.js → usePermissionStatus-CVCguZPP.js} +2 -2
  292. package/dist/client/assets/{usePullRequestActions-D97OVSkM.js → usePullRequestActions-Cp-f2-rS.js} +3 -3
  293. package/dist/client/assets/{useRegisterFieldControl-KOnbOVnX.js → useRegisterFieldControl-hMeYQdpT.js} +2 -2
  294. package/dist/client/assets/useScopedModelAvailability-1rkaoEPh.js +2 -0
  295. package/dist/client/assets/useSettings-BCUX_14n.js +3 -0
  296. package/dist/client/assets/{useT3ConnectAuthPrompt-CPGDAWRk.js → useT3ConnectAuthPrompt-B1AHMyDF.js} +2 -2
  297. package/dist/client/assets/{utils-BxISc9RR.js → utils-Cbsb1ks0.js} +5 -5
  298. package/dist/client/assets/vcsRefInvalidation-DMlloB2h.js +2 -0
  299. package/dist/client/assets/{vennDiagram-4TSXK5OY-BnH-hzBf.js → vennDiagram-4TSXK5OY-B4KHYxz_.js} +2 -2
  300. package/dist/client/assets/{wardley-WFR3VGLG-BbiFWq4f.js → wardley-WFR3VGLG-EUhzOM0w.js} +1 -1
  301. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DPf4ISf5.js → wardleyDiagram-VM6X3IG4-25okiPRC.js} +2 -2
  302. package/dist/client/assets/{welcome-DjYohRu3.js → welcome-pBX3QtZq.js} +2 -2
  303. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-oaZh5sFY.js → xychartDiagram-S5SC5T6Z-Dyo2i7yf.js} +2 -2
  304. package/dist/client/index.html +1 -1
  305. package/package.json +1 -1
  306. package/dist/client/assets/ChatGptUsageButton-BWTEbaUC.js +0 -2
  307. package/dist/client/assets/ChatMarkdown-C6UsXjP9.js +0 -65
  308. package/dist/client/assets/DiffPanel-0HWHkPjD.js +0 -2
  309. package/dist/client/assets/ProjectDefaultsSettings-Bqo3T1SR.js +0 -2
  310. package/dist/client/assets/ProjectIconPickerDialog-Cx-QcJLy.js +0 -2
  311. package/dist/client/assets/ScheduledTasksSettings-D_Z_3GVl.js +0 -4
  312. package/dist/client/assets/ScopedSwitch-B8wdvttG.js +0 -2
  313. package/dist/client/assets/_chat-oHhtDqeh.js +0 -45
  314. package/dist/client/assets/_chat.new-COSURrfS.js +0 -4
  315. package/dist/client/assets/architecture-7GRP2DOG-BMFS-mJW.js +0 -1
  316. package/dist/client/assets/arrow-left-BFquhiaO.js +0 -1
  317. package/dist/client/assets/arrow-right-DiV8cYUQ.js +0 -1
  318. package/dist/client/assets/arrow-up-down-BDQTjPr1.js +0 -1
  319. package/dist/client/assets/assets-CRmNKuHc.js +0 -2
  320. package/dist/client/assets/bell-BvJp3v99.js +0 -1
  321. package/dist/client/assets/blocks-NuR9qdGl.js +0 -1
  322. package/dist/client/assets/bot-mvw1ddnU.js +0 -1
  323. package/dist/client/assets/calendar-clock-CuvWKWXS.js +0 -1
  324. package/dist/client/assets/channel-Cf2J77rP.js +0 -2
  325. package/dist/client/assets/chart-no-axes-column-Hfs9TSWj.js +0 -1
  326. package/dist/client/assets/checkbox-BHsP70Vt.js +0 -2
  327. package/dist/client/assets/classDiagram-ZZMXUADV-D9m4giYc.js +0 -2
  328. package/dist/client/assets/classDiagram-v2-VYDZK3BY-D9m4giYc.js +0 -2
  329. package/dist/client/assets/corner-left-up-DedXC9IG.js +0 -1
  330. package/dist/client/assets/device-DhvzgETq.js +0 -2
  331. package/dist/client/assets/download-CUcdw53T.js +0 -1
  332. package/dist/client/assets/dynamic-tF-2a8Zt.js +0 -3
  333. package/dist/client/assets/earth-BqADiov-.js +0 -1
  334. package/dist/client/assets/ellipsis-BUF_4-Z7.js +0 -1
  335. package/dist/client/assets/entities-DqhRur25.js +0 -2
  336. package/dist/client/assets/eventmodeling-NTZA5JFV-CHuv5_8f.js +0 -1
  337. package/dist/client/assets/eye-C8OhITrC.js +0 -1
  338. package/dist/client/assets/file-search-ComEiFQ8.js +0 -1
  339. package/dist/client/assets/flowDiagram-HODETNUW-wmC7eeQc.js +0 -1
  340. package/dist/client/assets/folder-git-2-COyuVTXA.js +0 -1
  341. package/dist/client/assets/folder-open-DZzz50kK.js +0 -1
  342. package/dist/client/assets/folder-plus-BzJT8jXs.js +0 -1
  343. package/dist/client/assets/git-branch-CCzcdr93.js +0 -1
  344. package/dist/client/assets/grip-vertical-COceJQZo.js +0 -1
  345. package/dist/client/assets/hard-drive-BKLzbeTS.js +0 -1
  346. package/dist/client/assets/history-CAAEfWkp.js +0 -1
  347. package/dist/client/assets/house-U4txgvXa.js +0 -1
  348. package/dist/client/assets/index-D_uSeco8.js +0 -3
  349. package/dist/client/assets/keyboard-kgy5M4lo.js +0 -1
  350. package/dist/client/assets/link-C1k5F8-V.js +0 -1
  351. package/dist/client/assets/list-CU7BIfIS.js +0 -1
  352. package/dist/client/assets/loader-CRsWQXUs.js +0 -2
  353. package/dist/client/assets/main-BsiZpg85.css +0 -2
  354. package/dist/client/assets/main-uLg3xUJM.js +0 -30
  355. package/dist/client/assets/message-circle-question-mark-wTwD9xwk.js +0 -1
  356. package/dist/client/assets/message-square-dashed-Hcy2Q2EP.js +0 -1
  357. package/dist/client/assets/message-square-lCzwndCW.js +0 -1
  358. package/dist/client/assets/mouse-pointer-2-BFFAEWXU.js +0 -1
  359. package/dist/client/assets/number-field-pAaF-e0N.js +0 -2
  360. package/dist/client/assets/palette-BkpHEJXn.js +0 -1
  361. package/dist/client/assets/panel-left-DNz3ps89.js +0 -1
  362. package/dist/client/assets/panels-top-left-bKuZF4FX.js +0 -1
  363. package/dist/client/assets/primary-DOpcfgLH.js +0 -2
  364. package/dist/client/assets/primaryCloudLinkState-Dulej3bP.js +0 -2
  365. package/dist/client/assets/projectFilesQueryState-C1crs3C8.js +0 -2
  366. package/dist/client/assets/projectScriptEditor-ku2tGeKq.js +0 -2
  367. package/dist/client/assets/pullRequests-BQ9KruZm.js +0 -2
  368. package/dist/client/assets/puzzle-wfhgUaHl.js +0 -1
  369. package/dist/client/assets/queries-CEjFwxVW.js +0 -2
  370. package/dist/client/assets/query-D5pQUQvZ.js +0 -2
  371. package/dist/client/assets/railroad-abnf-HS5TGJTU-bDIjPMME.js +0 -1
  372. package/dist/client/assets/railroad-ebnf-LZEXJU2U-BREFlihg.js +0 -1
  373. package/dist/client/assets/railroad-peg-WCYAUIDC-B0hEZefb.js +0 -1
  374. package/dist/client/assets/rotate-ccw-CkpQmcC5.js +0 -1
  375. package/dist/client/assets/rotate-cw-BAiACGtX.js +0 -1
  376. package/dist/client/assets/runtime-Bsb2I_n2.js +0 -2
  377. package/dist/client/assets/runtime-DkYxB4ri.js +0 -6
  378. package/dist/client/assets/server-BYntb2dN.js +0 -2
  379. package/dist/client/assets/session-eLrubJEW.js +0 -2
  380. package/dist/client/assets/settings-2-CDBTJPBs.js +0 -1
  381. package/dist/client/assets/settings-DDvSs7LG.js +0 -1
  382. package/dist/client/assets/settings.appearance-CEA3GKAa.js +0 -2
  383. package/dist/client/assets/settings.archived-DPWjmD2l.js +0 -2
  384. package/dist/client/assets/settings.connections-BKWbsMUk.js +0 -2
  385. package/dist/client/assets/settings.general-CoPWyKC4.js +0 -2
  386. package/dist/client/assets/settings.plugins-BI68kAsM.js +0 -5
  387. package/dist/client/assets/settings.providers-Dsnq0-AL.js +0 -3
  388. package/dist/client/assets/settings.scheduled-tasks-BOpVl_XK.js +0 -2
  389. package/dist/client/assets/settingsLayout-DV36_Jgq.js +0 -3
  390. package/dist/client/assets/shield-check-yRjvgn4y.js +0 -1
  391. package/dist/client/assets/shield-question-mark-DyVUewRO.js +0 -1
  392. package/dist/client/assets/square-pen-BrE59gWn.js +0 -1
  393. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CGT21P8W.js +0 -2
  394. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-D9Ttx7dQ.js +0 -9
  395. package/dist/client/assets/text-search-CFbEY3qo.js +0 -1
  396. package/dist/client/assets/threadSort-Byzu7B1A.js +0 -2
  397. package/dist/client/assets/toast-BX9uiMAh.js +0 -2
  398. package/dist/client/assets/tooltip-B0rhqi5b.js +0 -2
  399. package/dist/client/assets/use-atom-command-RgcuqzP9.js +0 -2
  400. package/dist/client/assets/useNavigate-CDvr3Yvg.js +0 -2
  401. package/dist/client/assets/useScopedModelAvailability-BTR7tHpB.js +0 -2
  402. package/dist/client/assets/useSettings-BIggY3j1.js +0 -3
  403. package/dist/client/assets/vcsRefInvalidation-h_E9Figo.js +0 -2
@@ -1 +0,0 @@
1
- import{To as e,wo as t}from"./main-uLg3xUJM.js";export{e as __iconNode,t as default};
@@ -1 +0,0 @@
1
- import{Co as e,So as t}from"./main-uLg3xUJM.js";export{e as __iconNode,t as default};
@@ -1 +0,0 @@
1
- import{bo as e,xo as t}from"./main-uLg3xUJM.js";export{t as __iconNode,e as default};
@@ -1 +0,0 @@
1
- import{vo as e,yo as t}from"./main-uLg3xUJM.js";export{t as __iconNode,e as default};
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ea as n,Ga as r,Ha as i,Ji as a,Ka as o,Ki as s,La as c,Ln as l,Nn as u,Oa as d,Pa as f,Pn as p,Ua as m,Wa as h,Ya as g,Yi as _,Za as v,Zi as y,_a as b,_o as x,aa as S,do as C,ea as w,ga as T,gr as ee,ha as E,ja as D,jx as O,ka as k,ma as A,oa as j,qi as te,sa as M,t as N,vo as P,wa as F,yo as I,zn as ne}from"./utils-BxISc9RR.js";import{t as re}from"./minus-C7W28oE7.js";import{t as ie}from"./plus-Cr075-cy.js";import{t as ae}from"./useRegisterFieldControl-KOnbOVnX.js";import{t as oe}from"./FormContext-Vk5aZcR6.js";import{a as se}from"./CSPContext-i9QaQnwk.js";var L=e(t());function ce(){let[,e]=L.useState({});return L.useCallback(()=>{e({})},[])}var le=L.createContext(void 0);function ue(){let e=L.useContext(le);if(e===void 0)throw Error(I(43));return e}var R={inputValue:()=>null,value:()=>null,...ne},de=new Map;function z(e,t){let n=JSON.stringify({locale:e,options:t}),r=de.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return de.set(n,i),i}function fe(e,t,n){return e==null?``:z(t,n).format(e)}function pe(e,t,n){return fe(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=z(e,t).formatToParts(11111.1),r={};return n.forEach(e=>{r[e.type]=e.value}),z(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=z(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=z(`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?se(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(E()),Ve=L.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:o=.1,step:c=1,largeStep:p=10,required:m=!1,disabled:h=!1,readOnly:g=!1,form:b,name:S,defaultValue:ee,value:E,onValueChange:D,onValueCommitted:O,allowWheelScrub:A=!1,snapOnStep:j=!1,allowOutOfRange:M=!1,format:N,locale:P,render:I,className:ne,inputRef:re,style:ie,...ae}=e,{setDirty:oe,validityData:se,disabled:ue,setFilled:de,invalid:z,name:pe,state:B,validation:me,shouldValidateOnChange:he}=l(),V=ue||h,H=pe??S,ve=c===`any`?1:c,[U,ye]=L.useState(!1),W=r??-(2**53-1),be=i??2**53-1,xe=r??0,G=N?.style,K=L.useRef(null),Se=x(re,me.inputRef),Ce=u({id:n}),[we,Te]=f({controlled:E,default:ee,name:`NumberField`,state:`value`}),q=we??null,Ae=_(q);d(()=>{de(q!==null)},[de,q]);let je=ce(),Me=_(N),Ne=L.useRef(!1),Pe=k((e,t)=>{Ne.current=!1,O?.(e,t)}),J=L.useRef(!0),Y=L.useRef(null),[X,Z]=L.useState(()=>E===void 0?fe(q,P,N):He(q,P,N)),[Ie,Le]=L.useState(`numeric`),Re=k(()=>{let{decimal:e,group:t,currency:n,literal:r}=Fe(P,N),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`&&N?.unit===`percent`,o=G===`percent`||G===`unit`&&N?.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=k(e=>e?.altKey?o:e?.shiftKey?p:ve),ze=k((e,t)=>{let n=t.event,r=t.direction,i=t.reason,a=!M||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:j,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,D?.(o,t),t.isCanceled)return c;Te(o),oe(o!==se.initialValue),Ne.current=!0}return J.current&&Z(fe(o,P,N)),je(),c}),Ve=k((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,T(a,i,void 0,{direction:t}))});d(function(){if(!J.current)return;let e=E===void 0?fe(q,P,N):He(q,P,N);e!==X&&Z(e)}),d(function(){if(!F)return;let e=`text`;W>=0&&(e=`decimal`),Le(e)},[W,G]),L.useEffect(function(){let e=K.current;if(V||g||!A||!e)return;function t(e){if(e.ctrlKey||w(a(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 y(e,`wheel`,t)},[A,Ve,V,g,Q]);let Ue=L.useMemo(()=>({...B,disabled:V,readOnly:g,required:m,value:q,inputValue:X,scrubbing:U}),[B,V,g,m,q,X,U]),We=L.useMemo(()=>({inputRef:K,inputValue:X,value:q,minWithDefault:W,maxWithDefault:be,disabled:V,readOnly:g,id:Ce,setValue:ze,incrementValue:Ve,getStepAmount:Q,allowInputSyncRef:J,formatOptionsRef:Me,valueRef:Ae,lastChangedValueRef:Y,hasPendingCommitRef:Ne,name:H,required:m,invalid:z,inputMode:Ie,getAllowedNonNumericKeys:Re,min:r,max:i,setInputValue:Z,locale:P,isScrubbing:U,setIsScrubbing:ye,state:Ue,onValueCommitted:Pe}),[K,X,q,W,be,V,g,Ce,ze,Ve,Q,Me,Ae,H,m,z,Ie,Re,r,i,Z,P,U,Ue,Pe]),Ge=C(`div`,e,{ref:t,state:Ue,props:ae,stateAttributesMapping:R});return(0,$.jsxs)(le.Provider,{value:We,children:[Ge,(0,$.jsx)(`input`,{...me.getInputValidationProps({onFocus(){K.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||V||g){e.preventBaseUIHandler?.();return}let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=T(v,e.nativeEvent);oe(n!==se.initialValue),ze(n,r),he()&&me.commit(n)}}),ref:Se,type:`number`,form:b,name:H,value:q??``,min:r,max:i,step:c,disabled:V,required:m,"aria-hidden":!0,tabIndex:-1,style:H?te:s,suppressHydrationWarning:!0})]})});function He(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?fe(e,t,n):pe(e,t,n)}var Ue=L.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=ue();return C(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:R})}),We=0,Ge=class e extends j{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=P(Ge.create).current;return A(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:s=Ye,elementRef:c}=e,l=M(),u=Ke(),d=M(),f=L.useRef(!1),p=L.useRef(0),m=L.useRef({x:0,y:0}),h=L.useRef(!1),g=L.useRef(!1),_=L.useRef(``),v=L.useRef(()=>{}),b=k(()=>{d.clear(),l.clear(),u.clear(),v.current(),p.current=0});function x(e){b();let t=c.current;if(!t)return;let n=D(t);function s(e){e.preventDefault()}if(v.current=y(n,`contextmenu`,s),y(n,`pointerup`,e=>{f.current=!1,b(),i?.(e)},{once:!0}),!r(e)){b();return}l.start(o,()=>{u.start(a,()=>{r(e)||b()})})}return L.useEffect(()=>()=>b(),[b]),{pointerHandlers:{onTouchStart(){h.current=!0},onTouchEnd(){h.current=!1},onPointerDown(e){let r=!e.button||e.button===0;e.defaultPrevented||!r||t||n||(_.current=e.pointerType,g.current=!1,f.current=!0,m.current={x:e.clientX,y:e.clientY},Qe(e.pointerType)?d.start(Xe,()=>{let t=p.current;p.current=0,f.current&&t<Ze?(x(e.nativeEvent),g.current=!0):(g.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){Qe(e.pointerType)&&(f.current=!1)},onPointerMove(e){if(t||n||!Qe(e.pointerType)||!f.current)return;p.current!=null&&(p.current+=1);let{x:r,y:i}=m.current,a=r-e.clientX,o=i-e.clientY;a**2+o**2>s**2&&b()},onMouseEnter(e){e.defaultPrevented||t||n||!f.current||h.current||Qe(_.current)||x(e.nativeEvent)},onMouseLeave(){h.current||b()},onMouseUp(){h.current||b()}},shouldSkipClick:k(e=>e.defaultPrevented?!0:Qe(_.current)?g.current:e.detail!==0)}}function et(e){return e===`touch`||e===`pen`}function tt(e){let{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:a,id:o,incrementValue:s,inputRef:l,inputValue:u,isIncrement:d,locale:f,readOnly:p,setValue:m,valueRef:h,lastChangedValueRef:g,onValueCommitted:_}=e,v=d?i:c;function y(e){t.current=!0;let n=Z(u,f,r.current);n!==null&&(h.current=n,m(n,T(v,e,void 0,{direction:d?1:-1})))}let{pointerHandlers:x,shouldSkipClick:S}=$e({disabled:n||p,elementRef:l,tickDelay:60,startDelay:400,scrollDistance:8,tick(e){let t=a(e)??1;return s(t,{direction:d?1:-1,event:e,reason:v})},onStop(e){let t=g.current??h.current;_(t,b(v,e))}});return{disabled:n,"aria-readonly":p||void 0,"aria-label":d?`Increase`:`Decrease`,"aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:`none`,userSelect:`none`},...x,onClick(e){let t=n||p;if(e.defaultPrevented||t||S(e))return;y(e.nativeEvent);let r=a(e)??1,i=h.current;s(r,{direction:d?1:-1,event:e.nativeEvent,reason:v});let o=g.current??h.current;o!==i&&_(o,b(v,e.nativeEvent))},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||p||!t||n||(y(e.nativeEvent),et(e.pointerType)||l.current?.focus(),x.onPointerDown(e))}}}var nt=L.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,locale:_,maxWithDefault:v,readOnly:y,setValue:b,state:x,value:S,valueRef:w,lastChangedValueRef:T,onValueCommitted:ee}=ue(),E=a||u||S!=null&&S>=v,D=tt({isIncrement:!0,inputRef:h,inputValue:g,disabled:E,readOnly:y,id:p,setValue:b,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:w,locale:_,lastChangedValueRef:T,onValueCommitted:ee}),{getButtonProps:O,buttonRef:k}=n({disabled:E,native:o,focusableWhenDisabled:!0}),A=L.useMemo(()=>({...x,disabled:E}),[x,E]);return C(`button`,e,{ref:[t,k],state:A,props:[D,c,O],stateAttributesMapping:R})}),rt=L.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,minWithDefault:_,readOnly:v,setValue:y,state:b,value:x,valueRef:S,locale:w,lastChangedValueRef:T,onValueCommitted:ee}=ue(),E=a||u||x!=null&&x<=_,D=tt({isIncrement:!1,inputRef:h,inputValue:g,disabled:E,readOnly:v,id:p,setValue:y,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:S,locale:w,lastChangedValueRef:T,onValueCommitted:ee}),{getButtonProps:O,buttonRef:k}=n({disabled:E,native:o,focusableWhenDisabled:!0}),A=L.useMemo(()=>({...b,disabled:E}),[b,E]);return C(`button`,e,{ref:[t,k],state:A,props:[D,c,O],stateAttributesMapping:R})}),it={...ne,...R},at=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),ot=L.forwardRef(function(e,t){let{render:n,className:i,style:a,...s}=e,{allowInputSyncRef:c,disabled:u,formatOptionsRef:d,getAllowedNonNumericKeys:f,getStepAmount:_,id:v,incrementValue:y,inputMode:x,inputValue:w,max:E,min:D,name:O,readOnly:k,required:A,setValue:j,state:te,setInputValue:M,locale:N,inputRef:P,value:F,onValueCommitted:I,lastChangedValueRef:ne,hasPendingCommitRef:re,valueRef:ie}=ue(),{clearErrors:se}=oe(),{validationMode:ce,setTouched:le,setFocused:R,invalid:de,shouldValidateOnChange:z,validation:B}=l(),{labelId:me}=p(),he=L.useRef(!1),V=L.useRef(!1);return ae(P,v,F),ee(F,e=>{let t=z();if(se(O),t&&B.commit(F),!(e===F||t)){if(V.current){V.current=!1;return}B.commit(F,!0)}}),C(`input`,e,{ref:[t,P],state:te,props:[{id:v,required:A,disabled:u,readOnly:k,inputMode:x,value:w,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":de||void 0,"aria-labelledby":me,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||k||u||(R(!0),he.current))return;he.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||k||u)return;le(!0),R(!1);let t=!c.current,n=re.current;if(c.current=!0,w.trim()===``){j(null,T(r,e.nativeEvent)),ce===`onBlur`&&B.commit(null),I(null,b(r,e.nativeEvent));return}let i=d.current,a=Z(w,N,i);if(a===null)return;let o=i?.maximumFractionDigits!=null||i?.minimumFractionDigits!=null,s=i?.maximumFractionDigits,l=o&&typeof s==`number`?Number(a.toFixed(s)):a,f=b(m,e.nativeEvent),p=F!==l,h=t||p||n;ce===`onBlur`&&B.commit(l),p&&(V.current=!0,j(l,T(m,e.nativeEvent))),h&&I(l,f);let g=fe(l,N,i);(o||a!==F||w!==pe(a,N,i))&&w!==g&&M(g)},onChange(e){if(e.nativeEvent.defaultPrevented)return;c.current=!1;let t=e.currentTarget.value;if(t.trim()===``){M(t),j(null,T(r,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 i=Z(t,N,d.current);M(t),i!==null&&j(i,T(h,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||k||u)return;let t=e.nativeEvent;c.current=!0;let n=f(),r=n.has(e.key),{decimal:i,currency:a,percentSign:o}=Fe(N,d.current),s=e.currentTarget.selectionStart,l=e.currentTarget.selectionEnd,p=s===0&&l===w.length,m=e=>s!=null&&l!=null&&e>=s&&e<l;if(Y.test(e.key)&&Array.from(n).some(e=>Y.test(e||``))){let e=w.search(Pe),t=e!=null&&e!==-1&&m(e);r=!(Y.test(w)||X.test(w))||p||t}if(X.test(e.key)&&Array.from(n).some(e=>X.test(e||``))){let e=w.search(J),t=e!=null&&e!==-1&&m(e);r=!(Y.test(w)||X.test(w))||p||t}[i,a,o].forEach(t=>{if(e.key===t){let e=w.indexOf(t),n=m(e);r=!w.includes(t)||p||n}});let h=e.key>=`0`&&e.key<=`9`,v=Se.test(e.key),x=we.test(e.key),C=Ce.test(e.key),ee=Te.test(e.key),O=at.has(e.key);if(e.which===229||e.altKey||e.ctrlKey||e.metaKey||r||h||v||ee||x||C||O)return;let A=Z(w,N,d.current),te=_(e)??1;S(e);let M=b(g,t);e.key===`ArrowUp`?(y(te,{direction:1,currentValue:A,event:t,reason:g}),I(ne.current??ie.current,M)):e.key===`ArrowDown`?(y(te,{direction:-1,currentValue:A,event:t,reason:g}),I(ne.current??ie.current,M)):e.key===`Home`&&D!=null?(j(D,T(g,t)),I(ne.current??ie.current,M)):e.key===`End`&&E!=null&&(j(E,T(g,t)),I(ne.current??ie.current,M))},onPaste(e){if(e.defaultPrevented||k||u)return;e.preventDefault();let t=(e.clipboardData||window.Clipboard).getData(`text/plain`),n=Z(t,N,d.current);n!==null&&(c.current=!1,j(n,T(o,e.nativeEvent)),M(t))}},B.getValidationProps(),s],stateAttributesMapping:it})}),st=O();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=L.useId(),c=r??s,l;t[5]===n?l=t[6]:(l=N(`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=N(`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=N(`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)(re,{}),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=N(`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)(ie,{}),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=N(`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-pAaF-e0N.js.map
@@ -1 +0,0 @@
1
- import{_o as e,go as t}from"./main-uLg3xUJM.js";export{e as __iconNode,t as default};
@@ -1 +0,0 @@
1
- import{ho as e,mo as t}from"./main-uLg3xUJM.js";export{e as __iconNode,t as default};
@@ -1 +0,0 @@
1
- import{fo as e,po as t}from"./main-uLg3xUJM.js";export{t as __iconNode,e as default};
@@ -1,2 +0,0 @@
1
- import{$b as e,Eh as t,Fu as n,Gm as r,Ho as i,Ko as a,Nh as o,P_ as s,Ro as c,Xg as l,Xm as u,Xo as d,Zo as ee,ch as f,es as p,ff as m,fy as h,gl as g,hs as _,ih as v,jx as y,lv as b,sv as x,th as S}from"./utils-BxISc9RR.js";import{C,n as w,y as T}from"./runtime-DkYxB4ri.js";import{Dt as E,Tt as D}from"./runtime-Bsb2I_n2.js";var te=u([`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 f()(`PrimaryEnvironmentRequestError`,{operation:te,status:S,pairingLinkId:o(v),sessionId:o(v),cause:r()}){static fromCause(t){let n=ne(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}).`}},k=t(O),A=class extends f()(`PrimaryEnvironmentPairingCredentialRejectedError`,{providedLength:S,cause:r()}){get message(){return`Invalid pairing token. Check the token and try again.`}};t(A);var j=class extends f()(`PrimaryEnvironmentAuthSessionTimeoutError`,{timeoutMs:S,elapsedMs:S}){get message(){return`Timed out waiting for authenticated session after bootstrap.`}},M=class extends f()(`PrimaryEnvironmentPairingCredentialRequiredError`,{providedLength:S}){get message(){return`Enter a pairing token to continue.`}},N=t(n),P=null,F=null,I=!1,L=2e3,R=100;function z(){return D(new URL(window.location.href))}function B(){let e=new URL(window.location.href),t=E(e);t.toString()!==e.toString()&&window.history.replaceState({},document.title,t.toString())}function V(){let e=z();return e?(B(),e):null}function H(){let e=(window.desktopBridge?.getLocalEnvironmentBootstraps()??[]).find(e=>e.id===g);return typeof e?.bootstrapToken==`string`&&e.bootstrapToken.length>0?e.bootstrapToken:null}async function U(){return X(async()=>{try{return await w(T.pipe(l(e=>e.auth.session({headers:{}}))))}catch(e){throw O.fromCause({operation:`fetch-session-state`,cause:e})}})}function ne(e){return N(e)?W(e):m(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 w(T.pipe(l(t=>t.auth.browserSession({payload:{credential:e}}))))}catch(t){throw N(t)&&t._tag===`EnvironmentAuthInvalidError`&&t.reason===`invalid_credential`?new A({providedLength:e.length,cause:t}):O.fromCause({operation:`exchange-bootstrap-credential`,cause:t})}})}async function K(){let e=Date.now();for(;;){let t=await U();if(t.authenticated)return t;let n=Date.now()-e;if(n>=L)throw new j({timeoutMs:L,elapsedMs:n});await Z(R)}}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 k(e)?q.has(e.status):e instanceof TypeError||e instanceof DOMException&&e.name===`AbortError`}async function Q(e){let t=await U();if(t.authenticated&&!e)return{status:`authenticated`};let n=e??H();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 M({providedLength:e.length});F=null,await G(t),await K(),F={status:`authenticated`},P=null,I=!1,B()}async function ae(e){let t=e?.label?.trim();try{return await w(T.pipe(l(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 w(T.pipe(l(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 w(T.pipe(l(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 w(T.pipe(l(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`?z()&&(I=!0):I=!1,I)return{status:`requires-auth`,auth:(await U()).auth};let e=V(),t=P;if(e)F=null;else{if(t)return t;if(F?.status===`authenticated`)return F}let n=t?t.catch(()=>void 0).then(()=>(F=null,Q(e))):Q(e);return P=n,n.then(e=>(P===n&&e.status===`authenticated`&&(F=e),e)).finally(()=>{P===n&&(P=null)})}var ue=y(),$=a(b(()=>C()?x(null):s(U))).pipe(ee({staleTime:5e3,revalidateOnMount:!0}),d(3e5),p(`primary-environment:session`));function de(){c.refresh($)}function fe(){let t=(0,ue.c)(8),n=i($),r=pe,a=null;if(n._tag===`Failure`){let e;t[0]===n.cause?e=t[1]:(e=h(n.cause),t[0]=n.cause,t[1]=e);let r=e;a=r instanceof Error?r.message:`Could not read environment session.`}let o;t[2]===n?o=t[3]:(o=e(_(n)),t[2]=n,t[3]=o);let s;return t[4]!==a||t[5]!==n.waiting||t[6]!==o?(s={data:o,error:a,isPending:n.waiting,refresh:r},t[4]=a,t[5]=n.waiting,t[6]=o,t[7]=s):s=t[7],s}function pe(){de()}export{ce as a,B as c,le as i,ie as l,ae as n,se as o,z as r,oe as s,fe as t};
2
- //# sourceMappingURL=primary-DOpcfgLH.js.map
@@ -1,2 +0,0 @@
1
- import{$b as e,Ap as t,C_ as n,Cv as r,Eh as i,F_ as a,Ff as o,Fg as s,Go as c,Ho as l,Iu as u,Ko as d,Lu as f,Mm as p,Nh as m,Nu as ee,Pu as h,Ro as g,Ru as te,Ug as ne,Vb as re,Wo as _,Xm as v,Xo as y,Yd as b,Yo as ie,Zo as ae,_v as oe,cb as se,ch as ce,es as x,fh as le,fy as ue,hs as de,hy as fe,ih as S,ju as pe,jx as me,kc as C,l_ as w,ms as he,nx as T,qs as E,uv as D,wp as O,x_ as k,y_ as A,zu as j}from"./utils-BxISc9RR.js";import{Mn as M,Q as N,X as P,_ as F,o as I,pn as L,r as R,s as ge,ut as _e}from"./runtime-DkYxB4ri.js";import"./runtime-Bsb2I_n2.js";import{D as ve}from"./useSettings-BIggY3j1.js";import{i as ye,n as z}from"./session-eLrubJEW.js";var be=me(),xe=class extends ce()(`RelayClientInstallConfirmationConflictError`,{requestedVersion:S,activeVersion:S,activeDialogStatus:v([`confirming`,`installing`,`closing`]),activeInstallStage:m(pe)}){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 ge().relayUrl}var K=class extends se(`CloudEnvironmentLinkError`){},q=e=>t=>new K({message:e,cause:t});function ke(e){return w(function*(){let r=yield*_e,i=yield*r.run(e,P(C.cloudGetRelayClientStatus,{})).pipe(n(q(`Could not check relay client availability.`)));if(i.status===`available`)return;if(i.status===`unsupported`)return yield*new K({message:`P4 Code cannot install the relay client automatically on ${i.platform}-${i.arch}.`});if(!(yield*oe({try:()=>we(i.version),catch:q(`Could not confirm relay client installation.`)})))return yield*new K({message:`Relay client installation was cancelled.`});let a=yield*r.runStream(e,N(C.cloudInstallRelayClient,{}).pipe(t(e=>D(()=>Ee(e))))).pipe(O,n(q(`Could not install the relay client.`)),ne(D(De)));if(T(a)||a.value.type!==`complete`)return yield*new K({message:`The relay client install completed without a final status.`});let o=a.value.status;if(o.status!==`available`)return yield*new K({message:o.status===`unsupported`?`P4 Code cannot install the relay client automatically on ${o.platform}-${o.arch}.`:`The relay client is still unavailable after installation.`})})}var Ae=i(le([h,j,f,u,te,ee]));function J(e){return t=>{let n=t._tag===`ManagedRelayRequestFailedError`?t:void 0,r=n?.traceId,i=n?M(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?r: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 w(function*(){return yield*(yield*E(e.target.httpBaseUrl)).connect.linkState({headers:{}}).pipe(n(X(`Could not read environment cloud link state.`)))}).pipe(a(F))}function Fe(e){return w(function*(){let t=yield*E(e.target.httpBaseUrl),{target:r,...i}=e;return yield*t.connect.preferences({headers:{},payload:i}).pipe(n(X(`Could not update environment cloud preferences.`)))}).pipe(a(F))}function Ie(e){return w(function*(){yield*(yield*E(e.target.httpBaseUrl)).connect.unlink({headers:{}}).pipe(n(X(`Could not unlink the environment from cloud.`))),G()&&e.clerkToken&&(yield*(yield*L).unlinkEnvironment({clerkToken:e.clerkToken,environmentId:p.make(e.target.environmentId)}).pipe(s(e=>A(`Could not revoke cloud environment link after local unlink.`,{cause:e}))))}).pipe(a(F))}var Z=`manual`;function Le(e){return w(function*(){let t=G();if(!t)return yield*new K({message:`P4CODE_RELAY_URL is not configured.`});let r=(e.mode??`managed`)===`managed`,i=r?Me:Z,a=yield*L,o=yield*E(e.target.httpBaseUrl);r&&(yield*ke(p.make(e.target.environmentId)));let s=yield*a.createEnvironmentLinkChallenge({clerkToken:e.clerkToken,payload:{notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:r}}).pipe(n(J(`${t}/v1/client/environment-link-challenges failed`))),c=yield*o.connect.linkProof({headers:{},payload:{challenge:s.challenge,relayIssuer:t,endpoint:{httpBaseUrl:e.target.httpBaseUrl,wsBaseUrl:e.target.wsBaseUrl,providerKind:i},origin:je(e.target.httpBaseUrl)}}).pipe(n(X(`Could not obtain environment link proof.`))),l=yield*a.linkEnvironment({clerkToken:e.clerkToken,payload:{proof:c,notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:r}}).pipe(n(J(`${t}/v1/client/environment-links failed`)));yield*Ne({expectedEnvironmentId:e.target.environmentId,expectedProviderKind:i,link:l}),yield*o.connect.relayConfig({headers:{},payload:{relayUrl:t,relayIssuer:l.relayIssuer,cloudUserId:l.cloudUserId,environmentCredential:l.environmentCredential,cloudMintPublicKey:l.cloudMintPublicKey,endpointRuntime:l.endpointRuntime}}).pipe(n(X(`Could not configure environment relay access.`)))}).pipe(a(F))}var Re=ie(fe(b,R.contextEffect.pipe(k(e=>re(e,b))))),Q=_(e=>{let t=JSON.parse(e);return Re.atom(Pe({target:t})).pipe(ae({staleTime:5e3,revalidateOnMount:!0}),y(3e5),x(`primary-cloud-link:${t.environmentId}`))}),ze=d(he(null)).pipe(c,x(`primary-cloud-link:null`));function $(e){return JSON.stringify(e)}function Be(e){e&&z(p.make(e.environmentId),`relay:read`)&&g.refresh(Q($(e)))}function Ve(e){if(!z(p.make(e.environmentId),`relay:read`))return null;let t=g.get(Q($(e)));return t._tag===`Success`?t.value:null}function He(){let t=(0,be.c)(17),n=ve(),r=ye(n?.environmentId??null,o),i;t[0]===n?i=t[1]:(i=n?.entry.target._tag===`PrimaryConnectionTarget`?{environmentId:n.environmentId,label:n.label,httpBaseUrl:n.entry.target.httpBaseUrl,wsBaseUrl:n.entry.target.wsBaseUrl}:null,t[0]=n,t[1]=i);let a=i,s;t[2]!==r||t[3]!==a?(s=a&&I()&&r?Q($(a)):ze,t[2]=r,t[3]=a,t[4]=s):s=t[4];let c=l(s),u;t[5]===a?u=t[6]:(u=()=>{Be(a)},t[5]=a,t[6]=u);let d=u,f=null;if(c._tag===`Failure`){let e;t[7]===c.cause?e=t[8]:(e=ue(c.cause),t[7]=c.cause,t[8]=e);let n=e;f=n instanceof Error?n.message:`Could not read P4 Connect link state.`}let p;t[9]===c?p=t[10]:(p=c._tag===`Failure`?null:e(de(c)),t[9]=c,t[10]=p);let m;return t[11]!==f||t[12]!==d||t[13]!==c.waiting||t[14]!==p||t[15]!==a?(m={data:p,error:f,isPending:c.waiting,refresh:d,target:a},t[11]=f,t[12]=d,t[13]=c.waiting,t[14]=p,t[15]=a,t[16]=m):m=t[16],m}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-Dulej3bP.js.map
@@ -1,2 +0,0 @@
1
- import{$b as e,Eh as t,Ho as n,Ko as r,Ro as i,Vo as a,Wc as o,ds as s,es as c,fy as l,hs as u,jx as d,tx as f,vd as p}from"./utils-BxISc9RR.js";import{I as m}from"./runtime-DkYxB4ri.js";import{s as h}from"./vcsRefInvalidation-h_E9Figo.js";import{W as g}from"./entities-DqhRur25.js";import{o as _}from"./queries-CEjFwxVW.js";var v=d(),y=``,b=r(s(!1)),x=r(s(!1)).pipe(c(`project-file-query:empty`));function S(e,t,n){return g.optimisticFile({environmentId:e,cwd:t,relativePath:n})}var C=new Map;function w(e){let t=C.get(e);C.delete(e),t?.()}function T(e,t,n){return g.listEntries({environmentId:e,input:{cwd:t,...n===void 0?{}:{directoryPath:n}}})}function E(e,t,n){return g.readFile({environmentId:e,input:{cwd:t,relativePath:n??y}})}function D(e,t,n){return g.readConfiguration({environmentId:e,input:{cwd:t,relativePath:n}})}function O(e,t,n,r){let a=S(e,t,n);C.has(a)||C.set(a,i.mount(a)),i.set(a,{confirmedAgainst:void 0,data:{relativePath:n,contents:r,byteLength:new TextEncoder().encode(r).byteLength,truncated:!1}})}function k(e,t,n){return i.get(S(e,t,n))?.data??null}function A(e,t,n){let r=k(e,t,n);if(r)return r.contents;let a=i.get(E(e,t,n));return f(u(a))?.contents}function j(e,t,n){let r=i.get(S(e,t,n));return r?.confirmedAgainst===void 0?r?.data??null:null}function M(e,t,n,r){let a=S(e,t,n),s=i.get(a);if(s?.data.contents!==r)return!1;let c=E(e,t,n),l={...s,confirmedAgainst:i.get(c)};return i.set(a,l),w(a),i.refresh(c),m(i,c,{reportDefect:!1,reportFailure:!1}).then(async r=>{if(n===`p4.json`||n===`t3.json`){let n=D(e,t,o);i.refresh(n),await m(i,n,{reportDefect:!1,reportFailure:!1})}r._tag===`Success`&&i.get(a)===l&&i.set(a,null)}),!0}function N(e,t,n,r){return n===null?r:i.get(S(e,t,n))?.data??r}function P(e){return e._tag===`Failure`?l(e.cause):null}function F(e){return e===null?null:e instanceof Error?e.message:`Workspace query failed.`}var I=t(p);function L(t,r,i){let o=(0,v.c)(19),s=h(t),{canReadFiles:c}=s,l;o[0]!==c||o[1]!==r||o[2]!==i||o[3]!==t?(l=c?T(t,r,i):b,o[0]=c,o[1]=r,o[2]=i,o[3]=t,o[4]=l):l=o[4];let d=l,f=n(d),p=a(d),m;o[5]===p?m=o[6]:(m=()=>p(),o[5]=p,o[6]=m);let g=m,_;o[7]===f?_=o[8]:(_=e(u(f)),o[7]=f,o[8]=_);let y;o[9]!==c||o[10]!==s.error||o[11]!==s.isPending||o[12]!==f?(y=s.isPending?null:c?F(P(f)):s.error??`This connection cannot read host files.`,o[9]=c,o[10]=s.error,o[11]=s.isPending,o[12]=f,o[13]=y):y=o[13];let x=s.isPending||f.waiting,S;return o[14]!==g||o[15]!==_||o[16]!==y||o[17]!==x?(S={data:_,error:y,isPending:x,refresh:g},o[14]=g,o[15]=_,o[16]=y,o[17]=x,o[18]=S):S=o[18],S}function R(e,t,n,r,i){let a=(0,v.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,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 z(t,r,i,s,c){let l=(0,v.c)(36),d=s===void 0||s,f=c!==void 0&&c,p=h(t),{canReadFiles:m}=p,g=d,_;l[0]!==m||l[1]!==f||l[2]!==r||l[3]!==d||l[4]!==t||l[5]!==i?(_=d&&m?f&&i!==null?D(t,r,i):E(t,r,i):x,l[0]=m,l[1]=f,l[2]=r,l[3]=d,l[4]=t,l[5]=i,l[6]=_):_=l[6];let b=_,C=n(b),w=a(b),T;l[7]===w?T=l[8]:(T=()=>w(),l[7]=w,l[8]=T);let O=T,k;l[9]===C?k=l[10]:(k=e(u(C)),l[9]=C,l[10]=k);let A=k,j=A?.relativePath??i??y,M;l[11]!==r||l[12]!==t||l[13]!==j?(M=S(t,r,j),l[11]=r,l[12]=t,l[13]=j,l[14]=M):M=l[14];let N=n(M),L=f?o:y,R;l[15]!==r||l[16]!==t||l[17]!==L?(R=S(t,r,L),l[15]=r,l[16]=t,l[17]=L,l[18]=R):R=l[18];let z=n(R),B=i===null?null:f?z??N:N,V,H,U;if(l[19]!==m||l[20]!==A||l[21]!==p.error||l[22]!==p.isPending||l[23]!==g||l[24]!==B?.data||l[25]!==C){let e=P(C);V=I(e)?e:null,U=m?B?.data??A:null,H=!g||p.isPending?null:m?F(e):p.error??`This connection cannot read host files.`,l[19]=m,l[20]=A,l[21]=p.error,l[22]=p.isPending,l[23]=g,l[24]=B?.data,l[25]=C,l[26]=V,l[27]=H,l[28]=U}else V=l[26],H=l[27],U=l[28];let W=g&&(p.isPending||C.waiting),G=V?.failure===`path_not_file`,K;return l[29]!==V||l[30]!==O||l[31]!==H||l[32]!==W||l[33]!==G||l[34]!==U?(K={data:U,error:H,isPending:W,readError:V,isNotFile:G,refresh:O},l[29]=V,l[30]=O,l[31]=H,l[32]=W,l[33]=G,l[34]=U,l[35]=K):K=l[35],K}export{E as a,N as c,R as d,z as f,A as i,O as l,k as n,j as o,D as r,S as s,M as t,L as u};
2
- //# sourceMappingURL=projectFilesQueryState-C1crs3C8.js.map
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Lf as n,Wc as r,ha as i,in as a,iu as o,jf as s,jx as c,sr as l,xh as u}from"./utils-BxISc9RR.js";import{t as d}from"./bug-Dtc5BRVF.js";import{t as f}from"./flask-conical-WkWFg73e.js";import{t as p}from"./hammer-BRTj-Vot.js";import{t as m}from"./list-checks-CQu2FTgJ.js";import{t as h}from"./play-Bvcnzkvl.js";import{t as g}from"./wrench-CSZxFJCP.js";import{L as ee,U as te}from"./runtime-DkYxB4ri.js";import{i as _,n as v}from"./session-eLrubJEW.js";import{t as ne}from"./textarea-CYXHTTG6.js";import{t as y}from"./input-DaCwubQj.js";import{a as re,c as ie,i as ae,o as oe,r as se,s as ce,t as b}from"./dialog-CPLO59bH.js";import{D as x,O as le}from"./keybindings-QrjnJ5jB.js";import{i as ue,o as de,t as S}from"./popover-BXin7C0B.js";import{f as C}from"./projectFilesQueryState-C1crs3C8.js";import{t as w}from"./p4ProjectFile-CVEoe1SJ.js";import{l as fe}from"./KeybindingsSettings.logic-BcJGxVhV.js";import{Ar as pe,Fr as me,Ir as he,La as T,Mr as ge,Ni as E,Nr as _e,Pr as ve,jr as ye}from"./main-uLg3xUJM.js";function D(e,t){let n=e.projectSettingsOverrides[t.id]?.defaultProjectScripts;if(n!==void 0)return n;if(e.projectSettingsFolded)return e.defaultProjectScripts;let r=e.projectScriptOverrides[t.id];return r===null?e.defaultProjectScripts:r??(t.scripts.length>0?t.scripts:e.defaultProjectScripts)}function O(e){return e.worktreePath??e.project.cwd}function k(e){let t={P4CODE_PROJECT_ROOT:e.project.cwd};return e.worktreePath&&(t.P4CODE_WORKTREE_PATH=e.worktreePath),e.extraEnv?{...t,...e.extraEnv}:t}function A(e){let t=[...e.runOnWorktreeCreate?[`setup`]:[],...e.runOnSettle?[`on settle`]:[]];return t.length===0?e.name:`${e.name} (${t.join(`, `)})`}var j=e(t(),1),M=c(),N=`Invalid keybinding.`,P=u(o);function F(e){let t=e?.trim()??``;return t.length>0?t:null}function I(e){let t=F(e.keybinding);if(!t)return null;if(e.command===null)throw Error(N);let n=P({key:t,command:e.command});if(n._tag===`None`)throw Error(N);return n.value}function L(e,t){if(t===null)return null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r||r.command!==t)continue;let i=[];r.shortcut.modKey&&i.push(`mod`),r.shortcut.ctrlKey&&i.push(`ctrl`),r.shortcut.metaKey&&i.push(`meta`),r.shortcut.altKey&&i.push(`alt`),r.shortcut.shiftKey&&i.push(`shift`);let a=r.shortcut.key===` `?`space`:r.shortcut.key===`escape`?`esc`:r.shortcut.key;return i.push(a),i.join(`+`)}return null}var R=[];function z(e,t){let n=(0,M.c)(8),i=C(e,t??``,r,t!==null,!0),a=i.data&&!i.data.truncated?i.data.contents:null,o=i.isPending,s;bb0:{if(a===null){let e=o?`loading`:`missing`,t;n[0]===e?t=n[1]:(t={status:e,file:null,scripts:R},n[0]=e,n[1]=t),s=t;break bb0}let e;n[2]===a?e=n[3]:(e=w(a),n[2]=a,n[3]=e);let t=e;if(t===null){let e;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(e={status:`invalid`,file:null,scripts:R},n[4]=e):e=n[4],s=e;break bb0}let r=t.scripts??R,i;n[5]!==t||n[6]!==r?(i={status:`valid`,file:t,scripts:r},n[5]=t,n[6]=r,n[7]=i):i=n[7],s=i}return s}function B(e,t){return z(e,t).scripts}var V=e(i(),1),be=[{id:`play`,label:`Play`},{id:`test`,label:`Test`},{id:`lint`,label:`Lint`},{id:`configure`,label:`Configure`},{id:`build`,label:`Build`},{id:`debug`,label:`Debug`}];function H(e){let t=(0,M.c)(12),{icon:n,className:r}=e,i=r===void 0?`size-3.5`:r;if(n===`test`){let e;return t[0]===i?e=t[1]:(e=(0,V.jsx)(f,{className:i}),t[0]=i,t[1]=e),e}if(n===`lint`){let e;return t[2]===i?e=t[3]:(e=(0,V.jsx)(m,{className:i}),t[2]=i,t[3]=e),e}if(n===`configure`){let e;return t[4]===i?e=t[5]:(e=(0,V.jsx)(g,{className:i}),t[4]=i,t[5]=e),e}if(n===`build`){let e;return t[6]===i?e=t[7]:(e=(0,V.jsx)(p,{className:i}),t[6]=i,t[7]=e),e}if(n===`debug`){let e;return t[8]===i?e=t[9]:(e=(0,V.jsx)(d,{className:i}),t[8]=i,t[9]=e),e}let a;return t[10]===i?a=t[11]:(a=(0,V.jsx)(h,{className:i}),t[10]=i,t[11]=a),a}var U={name:``,command:``,icon:`play`,runOnWorktreeCreate:!1,waitForSetup:!1,runOnSettle:!1,keybinding:null,previewUrl:null,autoOpenPreview:!1};function W(e,t){return{scriptId:e.id,initial:{name:e.name,command:e.command,icon:e.icon,runOnWorktreeCreate:e.runOnWorktreeCreate,waitForSetup:e.runOnWorktreeCreate&&e.async===!1,runOnSettle:e.runOnSettle??!1,keybinding:L(t,x(e.id)),previewUrl:e.previewUrl??null,autoOpenPreview:e.autoOpenPreview??!1}}}function G({environmentId:e,editScope:t=s,request:r,scripts:i,onSubmit:o,onDelete:c,onClose:u}){let d=_(e,t),f=_(e,n),p=j.useId(),[m,h]=(0,j.useState)(``),[g,C]=(0,j.useState)(``),[w,D]=(0,j.useState)(`play`),[O,k]=a(!d),[A,M]=(0,j.useState)(!1),[N,P]=(0,j.useState)(!1),[F,L]=(0,j.useState)(!1),[R,z]=(0,j.useState)(``),[B,U]=(0,j.useState)(``),[W,G]=(0,j.useState)(!1),[K,q]=(0,j.useState)(null),[xe,J]=a(!d),[Se,Y]=(0,j.useState)(null),X=(0,j.useRef)(null),Ce=r!==null,Z=r?.scriptId!=null,Q=r!==null&&Se===r;(0,j.useLayoutEffect)(()=>()=>{X.current?.request===r&&(X.current=null)},[r]),(0,j.useEffect)(()=>{r&&(h(r.initial.name),C(r.initial.command),D(r.initial.icon),k(!1),M(r.initial.runOnWorktreeCreate),P(r.initial.waitForSetup),L(r.initial.runOnSettle),z(r.initial.keybinding??``),U(r.initial.previewUrl??``),G(r.initial.autoOpenPreview),q(r.error??null),Y(null))},[r,k]);let $=()=>{X.current=null,Y(null),k(!1),u()};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(b,{open:Ce,onOpenChange:e=>{e||$()},children:(0,V.jsxs)(ce,{children:[(0,V.jsxs)(re,{children:[(0,V.jsx)(ie,{children:Z?`Edit Action`:`Add Action`}),(0,V.jsx)(se,{children:`Actions are project-scoped commands you can run from the top bar or keybindings.`})]}),(0,V.jsx)(oe,{children:(0,V.jsx)(`form`,{id:p,onSubmit:async a=>{if(a.preventDefault(),!r||X.current!==null)return;if(!v(e,t)){q(`This connection cannot change project actions.`);return}let s=(R.trim()||null)!==(r.initial.keybinding?.trim()||null),c=v(e,n);if(s&&!c){q(`This connection cannot change keyboard shortcuts.`);return}let l=m.trim(),u=g.trim();if(l.length===0){q(`Name is required.`);return}if(u.length===0){q(`Command is required.`);return}q(null);let d;try{let e=r.scriptId??le(l,i.map(e=>e.id)),t=I({keybinding:R,command:x(e)}),n=B.trim();d={name:l,command:u,icon:w,runOnWorktreeCreate:A,waitForSetup:A&&N,runOnSettle:F,...r.scriptId===null&&c||s?{keybinding:t?.key??null}:{},previewUrl:n.length>0?n:null,autoOpenPreview:n.length>0&&W}}catch(e){q(e instanceof Error?e.message:`Failed to save action.`);return}let f={request:r};X.current=f,Y(r),k(!1);try{let e=await o(r.scriptId,d);if(X.current===f){if(e._tag===`Failure`){if(!ee(e)){let t=te(e);q(t instanceof Error?t.message:`Failed to save action.`)}}else $()}}catch(e){X.current===f&&q(e instanceof Error?e.message:`Failed to save action.`)}X.current===f&&(X.current=null,Y(null))},children:(0,V.jsxs)(`fieldset`,{className:`space-y-4`,disabled:Q||!d,children:[(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(E,{htmlFor:`script-name`,children:`Name`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(S,{onOpenChange:k,open:O,children:[(0,V.jsx)(de,{render:(0,V.jsx)(l,{type:`button`,variant:`outline`,className:`size-9 shrink-0`,"aria-label":`Choose icon`}),children:(0,V.jsx)(H,{icon:w,className:`size-4.5`})}),(0,V.jsx)(ue,{align:`start`,children:(0,V.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:be.map(e=>{let t=e.id===w;return(0,V.jsxs)(`button`,{type:`button`,className:`relative flex flex-col items-center gap-2 rounded-md border px-2 py-2 text-xs dark:border-transparent ${t?`border-primary/70 bg-primary/10 ring-inset dark:ring-1 dark:ring-primary/30`:`border-border/70 hover:bg-accent/60 dark:bg-white/[0.035]`}`,onClick:()=>{D(e.id),k(!1)},children:[(0,V.jsx)(H,{icon:e.id,className:`size-4`}),(0,V.jsx)(`span`,{children:e.label})]},e.id)})})})]}),(0,V.jsx)(y,{id:`script-name`,autoFocus:!0,placeholder:`Test`,value:m,onChange:e=>h(e.target.value)})]})]}),(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(E,{htmlFor:`script-keybinding`,children:`Keybinding`}),(0,V.jsx)(y,{disabled:!f,id:`script-keybinding`,placeholder:`Press shortcut`,value:R,readOnly:!0,onKeyDown:n=>{if(!v(e,t)||!v(e,`settings:write`)||n.key===`Tab`)return;if(n.preventDefault(),n.key===`Backspace`||n.key===`Delete`){z(``);return}let r=fe(n,navigator.platform);r&&z(r)}}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Press a shortcut. Use `,(0,V.jsx)(`code`,{children:`Backspace`}),` to clear. Shortcuts are environment-wide. Projects using the same action share its shortcut.`]})]}),(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(E,{htmlFor:`script-command`,children:`Command`}),(0,V.jsx)(ne,{id:`script-command`,placeholder:`bun test`,value:g,onChange:e=>C(e.target.value)})]}),(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(E,{htmlFor:`script-preview-url`,children:`Preview URL (optional)`}),(0,V.jsx)(y,{id:`script-preview-url`,placeholder:`http://localhost:5173`,value:B,onChange:e=>U(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Open this URL in the in-app preview when this action runs.`})]}),(0,V.jsxs)(`label`,{className:`flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm dark:border-transparent dark:bg-white/[0.035]`,children:[(0,V.jsx)(`span`,{children:`Run automatically on worktree creation`}),(0,V.jsx)(T,{checked:A,onCheckedChange:e=>M(!!e)})]}),(0,V.jsxs)(`label`,{className:`flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm dark:border-transparent dark:bg-white/[0.035] ${A?``:`opacity-60`}`,children:[(0,V.jsx)(`span`,{children:`Wait for it to finish before the agent starts`}),(0,V.jsx)(T,{checked:N,disabled:!A,onCheckedChange:e=>P(!!e)})]}),(0,V.jsxs)(`label`,{className:`flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm dark:border-transparent dark:bg-white/[0.035]`,children:[(0,V.jsx)(`span`,{children:`Run in the thread's worktree when the thread settles`}),(0,V.jsx)(T,{checked:F,onCheckedChange:e=>L(!!e)})]}),(0,V.jsxs)(`label`,{className:`flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm dark:border-transparent dark:bg-white/[0.035] ${B.trim().length===0?`opacity-60`:``}`,children:[(0,V.jsx)(`span`,{children:`Open preview automatically when this action runs`}),(0,V.jsx)(T,{checked:W,disabled:B.trim().length===0,onCheckedChange:e=>G(!!e)})]}),K&&(0,V.jsx)(`p`,{className:`text-sm text-destructive`,children:K})]})})}),(0,V.jsxs)(ae,{variant:`bare`,children:[Z&&(0,V.jsx)(l,{type:`button`,variant:`destructive-outline`,className:`mr-auto`,disabled:Q||!d,onClick:()=>J(!0),children:`Delete`}),(0,V.jsx)(l,{type:`button`,variant:`outline`,onClick:$,children:`Cancel`}),(0,V.jsx)(l,{form:p,type:`submit`,disabled:Q||!d,children:Q?`Saving…`:Z?`Save changes`:`Save action`})]})]})}),(0,V.jsx)(pe,{open:xe&&d,onOpenChange:J,children:(0,V.jsxs)(me,{children:[(0,V.jsxs)(ve,{children:[(0,V.jsxs)(he,{children:[`Delete action "`,m,`"?`]}),(0,V.jsx)(ge,{children:`This action cannot be undone.`})]}),(0,V.jsxs)(_e,{children:[(0,V.jsx)(ye,{render:(0,V.jsx)(l,{variant:`outline`}),children:`Cancel`}),(0,V.jsx)(l,{variant:`destructive`,disabled:Q||!d,onClick:()=>{if(r?.scriptId){if(!v(e,t)){q(`This connection cannot change project actions.`);return}J(!1),$(),c(r.scriptId)}},children:`Delete action`})]})]})})]})}export{B as a,L as c,k as d,D as f,W as i,O as l,G as n,z as o,H as r,I as s,U as t,A as u};
2
- //# sourceMappingURL=projectScriptEditor-ku2tGeKq.js.map
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$b as n,$o as r,Bd as i,Hm as a,Ho as o,Ko as s,Md as c,Mm as l,Nh as u,Ro as d,Wo as f,Xo as p,es as m,hs as h,ih as g,jd as ee,jx as te,kd as ne,nh as re,oh as _,xh as ie}from"./utils-BxISc9RR.js";import{R as ae}from"./entities-DqhRur25.js";import{B as oe,H as se,V as ce,rn as le,sn as ue,t as v}from"./runtime-Bsb2I_n2.js";import{t as de}from"./query-D5pQUQvZ.js";import{a as y,s as b}from"./threadSort-Byzu7B1A.js";var x=e(t(),1),S=te(),fe=e=>`${e.environmentId??``} ${e.host}`,C={reviewRequested:`Review requested`,authored:`Authored`,others:`Others`};function w(e){let t=e?.trim().toLowerCase()??``;return t.length>0?t:null}function pe(e){let t=e?.trim().replace(/^#/,``)??``;return/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:null}function me(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=w(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=w(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 T(e,t){return w(t[fe(e)]??t[e.host])}function E(e,t){let n=T(e,t);return n!==null&&w(e.author?.login)===n}var he={approved:`approved`,changes_requested:`changes-requested`,"changes-requested":`changes-requested`,required:`review-required`,"review-required":`review-required`,none:`none`},ge={success:`passing`,passing:`passing`,failure:`failing`,failing:`failing`},_e=/(?:[^\s"]|"[^"]*")+/g,D=10,O=200;function k(e){return e.replaceAll(`"`,``).trim()}function A(e){if(/^\s*"[^"]*"\s*$/.test(e)){let t=k(e);return t.length===0?[]:[t]}return e.split(`,`).map(e=>k(e)).filter(e=>e.length>0)}function j(e){return e.slice(0,D).map(e=>e.slice(0,O).trim()).filter(e=>e.length>0)}function ve(e){let t=[],n=[],r=[],i,a,o,s;for(let[c]of e.matchAll(_e)){let e=/^(-?)([A-Za-z][A-Za-z0-9_-]*):(.*)$/.exec(c),l=e===null?``:k(e[3]??``),u=e?.[1]===`-`;switch(l.length===0?``:e?.[2]?.toLowerCase()??``){case`label`:{let t=j(A(e?.[3]??``));if(t.length===0)break;u?r.push(...t):n.push(t);continue}case`author`:if(u)break;i=l.slice(0,O).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:he[l.toLowerCase()];if(e===void 0)break;o=e;continue}case`status`:case`checks`:{let e=u?void 0:ge[l.toLowerCase()];if(e===void 0)break;s=e;continue}case``:break;default:if(!l.startsWith(`/`)){let t=j(A(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,D)},...r.length===0?{}:{excludedLabels:r.slice(0,D)},...i===void 0?{}:{author:i},...a===void 0?{}:{draft:a},...o===void 0?{}:{review:o},...s===void 0?{}:{checks:s}}}}function ye(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 be(e,t,n){return n===`reviewing`?e.filter(e=>e.viewerReviewRequested):n===`authored`?e.filter(e=>E(e,t)):e}function M(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 N(e,t,n){let r=e.labels.map(e=>e.name.trim().toLowerCase()),a=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(a)))&&(t.excludedLabels===void 0||!t.excludedLabels.some(a))&&(t.author===void 0||e.author?.login.toLowerCase()===i(t.author,n).toLowerCase())}function xe(e,t){let n={reviewRequested:[],authored:[],others:[]};for(let r of e)E(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:C[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)}let o=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);return[{key:`authored`,entries:[...r.values()].toSorted(o)},{key:`reviewRequested`,entries:[...i.values()].toSorted(o)},{key:`others`,entries:a}].filter(e=>e.entries.length>0).map(e=>({...e,label:C[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((e,t)=>t.updatedAt.localeCompare(e.updatedAt)),errors:a,truncated:s,nextCursors:o,truncatedEnvironments:n}}var R=99,ke=e=>[...e].sort((e,t)=>e.localeCompare(t)).join(`,`),z=e=>`t3.pullRequests.list:${e}`,B=_({...ne.fields,environmentId:l}),Ae=_({...ee.fields,environmentId:l}),je=ie(_({scope:g,data:_({...c.fields,entries:a(B),errors:a(Ae),nextCursors:re(g,c.fields.nextCursors),truncatedEnvironments:a(g)}),partitions:u(_({authored:a(B),reviewing:a(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 V(e,t,n){return e===void 0?n:t.has(e)?e:n}function H(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 Le(e,t){return t.trim().length===0?e:e.toSorted((e,n)=>{let r=H(n,t)-H(e,t);return r===0?n.updatedAt.localeCompare(e.updatedAt):r})}function Re(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||r.updatedAt.localeCompare(e.updatedAt)})}function U(e,t){let n=e=>y(e.updatedAt);return e.toSorted((e,r)=>{let i=t(e)-t(r);if(i!==0)return i;let a=n(e),o=n(r),s=Number(a===null)-Number(o===null);return s===0?a===null||o===null?0:o-a:s})}function ze(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 Be(e){return U(e,e=>e.state===`open`?0:1)}function Ve(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=>Re(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`?ze:Be;return{...e,entries:r(e.entries)}})}if(t===`updated`)return e;let o=e=>y(e.updatedAt)??y(e.createdAt)??0;return a(e=>e.toSorted((e,n)=>{if(t===`newest`||t===`oldest`){let r=y(e.createdAt),i=y(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 He(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 Ue(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 We(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 Ge(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 Ke=6e4;function qe(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>Ke;!o&&!s&&a.set(t,n)}return a.size===e.size?e:a}function Je(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 Ye(e,t){return(e.state===`merged`?[]:e.state===`closed`?[`reopen`]:e.isDraft?[`close`,`ready`]:[`close`,`merge`]).filter(e=>t.has(e))}var W=ce(v),Xe=oe(v,W.refreshes),G=f(e=>s(null).pipe(p(3e5),m(`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 i=G(Y(e,t));d.modify(i,e=>{let t=X(e,{summary:n,observedAt:r});return t===e?[!1,e]:[!0,t]})}function Ze(e,t){let n=e.snapshot?.updatedAt;return e.snapshot===null||n==null?null:{...e.snapshot,provider:(b.findByChangeRequestUrl(e.url)??b.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}:${le({...t,host:t.host})}`}var Qe=s(e=>{let t=new Map;for(let n of e(ae.threadShellsAtom))for(let e of ue(n.pullRequests)){let r=Ze(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}),$e=f(e=>s(t=>t(Qe).get(e)??null).pipe(r((e,t)=>JSON.stringify(e)===JSON.stringify(t)),p(3e5)));function et(e,t,n,r){let i=(0,S.c)(19),a=r===void 0?null:r,s;i[0]!==e||i[1]!==t?(s=G(e===null||t===null?`none`:Y(e,t)),i[0]=e,i[1]=t,i[2]=s):s=i[2];let c=o(s),l;i[3]!==e||i[4]!==t?(l=$e(e===null||t===null?``:Q(e,t)),i[3]=e,i[4]=t,i[5]=l):l=i[5];let u=o(l),d,f;i[6]!==n||i[7]!==e||i[8]!==a||i[9]!==t?(d=()=>{e!==null&&t!==null&&n!==null&&a!==null&&Z(e,t,n,a)},f=[n,e,t,a],i[6]=n,i[7]=e,i[8]=a,i[9]=t,i[10]=d,i[11]=f):(d=i[10],f=i[11]),(0,x.useLayoutEffect)(d,f);let p;i[12]!==n||i[13]!==c||i[14]!==a?(p=X(c,n===null||a===null?null:{summary:n,observedAt:a})?.summary??n,i[12]=n,i[13]=c,i[14]=a,i[15]=p):p=i[15];let m=p,h;return i[16]!==u||i[17]!==m?(h=q(m,u),i[16]=u,i[17]=m,i[18]=h):h=i[18],h}var tt=se(v,W.refreshes);function $(e,t){let r=f(r=>s(e=>{let i=JSON.parse(r),a=[],o=[],s=null,c=!1;for(let r of i){let i=e(t(r));c||=i.waiting,i._tag===`Failure`&&s===null&&(s=de(i.cause));let l=n(h(i));l!==null&&a.push([r.environmentId,l]),i._tag===`Success`&&o.push([r.environmentId,i.value,i.timestamp])}return{values:a,error:s,isPending:c,observations:o}}).pipe(m(`${e}:${r}`))),i=s({values:[],observations:[],error:null,isPending:!1}).pipe(m(`${e}:empty`));return function(e){let n=JSON.stringify(e),a=o(e.length===0?i:r(n)),s=(0,x.useCallback)(e=>{let r=e??JSON.parse(n);for(let e of new Set(r.map(t)))d.refresh(e)},[n]);return{...a,refresh:s}}}var nt=$(`web-pull-requests:list`,W.list),rt=$(`web-pull-requests:list-stats`,W.listStats),it=$(`web-pull-requests:turn-refreshes`,({environmentId:e})=>W.refreshes({environmentId:e,input:{}}));function at(e){let t=(0,S.c)(2),n;return t[0]===e?n=t[1]:(n=e.map(ot),t[0]=e,t[1]=n),it(n).values}function ot(e){return{environmentId:e,input:{}}}function st(e){let t=(0,S.c)(4),r;t[0]===e?r=t[1]:(r=W.refreshes({environmentId:e,input:{}}),t[0]=e,t[1]=r);let i=o(r),a;return t[2]===i?a=t[3]:(a=n(h(i)),t[2]=i,t[3]=a),a}function ct(e){let t=(0,S.c)(10),n=nt(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,x.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 lt(e){let t=(0,S.c)(6),n=rt(e),r;t[0]===n.values?r=t[1]:(r=n.values.length===0?null:n.values.flatMap(ut),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 ut(e){let[t,n]=e;return n.stats.map(e=>({...e,environmentId:t}))}export{we as A,qe as B,P as C,pe as D,Je as E,Ie as F,He as H,V as I,Te as L,Le as M,Me as N,Ue as O,Pe as P,Ge as R,L as S,ke as T,Ne as U,Ve as V,ye as _,tt as a,ve as b,st as c,We as d,me as f,N as g,xe as h,J as i,I as j,Ye as k,at as l,Fe as m,q as n,ct as o,be as p,W as r,lt as s,Xe as t,et as u,De as v,T as w,Ee as x,M as y,H as z};
2
- //# sourceMappingURL=pullRequests-BQ9KruZm.js.map
@@ -1 +0,0 @@
1
- import{do as e,uo as t}from"./main-uLg3xUJM.js";export{e as __iconNode,t as default};
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$b as n,$c as r,$g as i,A_ as a,Cv as o,Fg as s,Gg as c,Gm as l,Go as u,Hm as d,Ho as f,Iv as p,Jv as m,Kc as h,Ko as g,L_ as _,Mb as v,Mm as y,Np as b,Op as x,Ro as ee,Sh as te,Tb as ne,Tg as S,Th as re,Ug as ie,Wo as C,Xg as ae,Xm as oe,Xo as se,Yf as ce,Zf as le,_g as ue,ad as w,ax as de,bb as fe,bp as pe,ch as T,cp as E,dv as me,eh as D,el as he,es as O,fh as ge,fp as _e,fs as ve,fy as ye,gu as be,hg as xe,hs as k,hu as Se,ih as A,jx as Ce,kb as we,kc as j,l_ as Te,lh as Ee,lv as De,np as Oe,nx as ke,ox as M,pp as Ae,pv as je,rs as Me,sp as Ne,ss as Pe,sv as N,sx as Fe,th as Ie,ty as Le,uv as P,wg as F,xh as Re,xp as ze,y_ as I,zv as Be}from"./utils-BxISc9RR.js";import{$ as Ve,F as He,Kt as Ue,M as L,N as R,P as We,X as Ge,at as Ke,et as qe,ft as Je,gt as z,j as B,ot as Ye,q as Xe,rt as Ze}from"./runtime-DkYxB4ri.js";import{a as V,i as H,n as Qe,r as $e,s as et,t as tt}from"./vcsRefInvalidation-h_E9Figo.js";import{U as nt,W as rt}from"./entities-DqhRur25.js";import{t as U}from"./runtime-Bsb2I_n2.js";import{n as W}from"./query-D5pQUQvZ.js";var G=Ce(),it=re(Ee([d(y),h.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 C(t=>g(r=>{let i=st(t);if(ke(i))return{matches:[],isLoading:!1};let[a,o]=i.value,s=[],c=!1;for(let t of a){let i=r(e.getSearchAtom(t,o));c||=i.waiting;let a=n(k(i));a!==null&&s.push(...a.matches.map(e=>({...e,environmentId:t})))}return{matches:s,isLoading:c}}).pipe(O(`${e.labelPrefix}:${t}`)))}var K=e(t(),1);function ut(e){return{v2:{dispatchCommand:B(e,{label:`environment-data:orchestration-v2:dispatch-command`,tag:w.dispatchCommand}),threadProjection:L(e,{label:`environment-data:orchestration-v2:thread-projection`,tag:w.getThreadProjection,staleTimeMs:0,idleTtlMs:0}),shell:R(e,{label:`environment-data:orchestration-v2:shell`,tag:w.subscribeShell}),thread:R(e,{label:`environment-data:orchestration-v2:thread`,tag:w.subscribeThread,idleTtlMs:0})},turnDiff:L(e,{label:`environment-data:orchestration:turn-diff`,tag:w.getTurnDiff}),workflowScript:L(e,{label:`environment-data:orchestration:workflow-script`,tag:w.getWorkflowScript,staleTimeMs:3e5,idleTtlMs:3e5}),stopWorkflow:B(e,{label:`environment-data:orchestration:stop-workflow`,tag:w.stopWorkflow}),rankUserInput:B(e,{label:`environment-data:orchestration:rank-user-input`,tag:j.userInputRank,concurrency:{mode:`singleFlight`,key:({environmentId:e,input:t})=>JSON.stringify([e,t])}}),turnItem:L(e,{label:`environment-data:orchestration:turn-item`,tag:w.getTurnItem,staleTimeMs:6e4,idleTtlMs:6e4}),fullThreadDiff:L(e,{label:`environment-data:orchestration:full-thread-diff`,tag:w.getFullThreadDiff}),threadFind:L(e,{label:`environment-data:orchestration:thread-find`,tag:w.searchThread,staleTimeMs:0,idleTtlMs:0}),threadFindProgressive:R(e,{label:`environment-data:orchestration:thread-find-progressive`,tag:w.searchThreadStream,completeWhen:e=>e.complete!==!1,idleTtlMs:0}),threadSearch:L(e,{label:`environment-data:orchestration:thread-search`,tag:w.searchThreads,staleTimeMs:3e4,idleTtlMs:6e4}),archivedShellSnapshot:L(e,{label:`environment-data:orchestration:archived-shell-snapshot`,tag:w.getArchivedShellSnapshot})}}var q=ut(U),dt=96;function ft(e){let t=e.at(-1);return e.length>1&&t?.waiting===!0&&ke(k(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=`[0-9a-f]{8}`,ht=RegExp(`^(?:p4c[-/]${mt}|t3code(?:[-/]${mt}|\\/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))$`);function gt(e){let t=e.indexOf(`/`);return t<=0||t===e.length-1?e:e.slice(t+1)}function _t(e){return ht.test(e.trim().toLowerCase())}function vt(e){return e.trim().replace(/[ \t\n\r\f\v]+/g,`-`)}var yt={hasUpstream:!1,aheadCount:0,behindCount:0,aheadOfDefaultCount:0,pr:null};function J(e,t){return{...e,...t??yt}}function bt(e){return{hasUpstream:e.hasUpstream,aheadCount:e.aheadCount,behindCount:e.behindCount,...e.aheadOfDefaultCount===void 0?{}:{aheadOfDefaultCount:e.aheadOfDefaultCount},pr:e.pr}}function xt(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 St(e,t){switch(t._tag){case`snapshot`:return J(t.local,t.remote);case`localUpdated`:return J(t.local,e?bt(e):null);case`remoteUpdated`:return J(e===null?{isRepo:!0,hasPrimaryRemote:!1,isDefaultRef:!1,refName:null,hasWorkingTreeChanges:!1,workingTree:{files:[],insertions:0,deletions:0}}:xt(e),t.remote)}}var Ct=oe([`refresh_status`,`run_change_request`,`pull`,`switch_ref`,`create_ref`,`create_worktree`,`init`,`publish_repository`,`prepare_pull_request_thread`]),wt=class extends T()(`VcsActionUnavailableError`,{operation:Ct,environmentId:D(y),cwd:D(A)}){get message(){return`Source control operation '${this.operation.replaceAll(`_`,` `)}' is unavailable.`}},Tt=class extends T()(`VcsActionRemoteFailureError`,{actionId:A,transportActionId:A,action:he,environmentId:y,cwd:A,phase:D(r),remoteMessageLength:Ie}){get message(){let e=this.phase===null?`execution`:this.phase;return`Source control action '${this.action}' failed during ${e}.`}},Et=class extends T()(`VcsActionMissingTerminalEventError`,{actionId:A,transportActionId:A,action:he,environmentId:y,cwd:A}){get message(){return`Source control action '${this.action}' ended without a terminal result.`}},Dt=class extends T()(`VcsActionTargetKeyParseError`,{keyLength:Ie,cause:l()}){get message(){return`Invalid source control action target key (${this.keyLength} characters).`}};ge([Tt,Et]);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}),Ot=()=>ue(xe()),kt=0,At=te(Ee([y,A])),X=C(e=>g(Y).pipe(u,O(`vcs-action:${e}`))),jt=g(Y).pipe(u,O(`vcs-action:null`));function Z(e){return e.environmentId===null||e.cwd===null?null:JSON.stringify([e.environmentId,e.cwd])}function Mt(e){try{let[t,n]=At(JSON.parse(e));return{environmentId:t,cwd:n}}catch(t){throw new Dt({keyLength:e.length,cause:t})}}function Nt(e){let t=Z(e);return t===null?jt:X(t)}function Pt(){return kt+=1,`local-vcs-action:${kt}`}function Ft(e){let t=e.actionId??Pt(),n=Ot();return{...Y,isRunning:!0,operation:e.operation,actionId:t,currentLabel:e.label,currentPhaseLabel:e.label,phaseStartedAtMs:n}}function It(e,t,n){return{...Y,operation:e,actionId:t,error:n instanceof Error?n.message:`Source control action failed.`}}function Lt(e,t){let n=JSON.stringify([e.environmentId,e.cwd]);return`${n.length}:${n}${t}`}function Rt(e,t,n,r){return r.actionId!==t||r.cwd!==e.cwd?null:{...r,actionId:n}}function zt(e,t){return De(()=>{let n=null;return e.pipe(ze(e=>{let r=Rt(t.target,t.transportActionId,t.actionId,e);return r===null?o:((r.kind===`action_finished`||r.kind===`action_failed`)&&(n=r),t.onProgress(r))}),ae(()=>n?.kind===`action_finished`?N(n.result):n?.kind===`action_failed`?c(new Tt({actionId:t.actionId,transportActionId:t.transportActionId,action:n.action,environmentId:t.target.environmentId,cwd:t.target.cwd,phase:n.phase,remoteMessageLength:n.message.length})):c(new Et({actionId:t.actionId,transportActionId:t.transportActionId,action:t.action,environmentId:t.target.environmentId,cwd:t.target.cwd}))))})}function Bt(e,t){if(e.actionId!==t.actionId)return e;let n=Ot();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 Vt(e){let t=new Map,n=n=>{let r=Z(n),i=r??JSON.stringify([`vcs-action-target:unavailable`,n.environmentId,n.cwd]),o=t.get(i);if(o!==void 0)return o;let s=r===null?null:Mt(r),l=r===null?jt:X(r),u=He(e,{label:`vcs-action:run-stacked:${i}`,scheduler:V,concurrency:{mode:`serial`,key:()=>i},execute:(t,r)=>{if(s===null)return c(new wt({operation:`run_change_request`,environmentId:n.environmentId,cwd:n.cwd}));let i=Lt(s,t.actionId);r.set(l,Ft({operation:`run_change_request`,label:`Running source control action`,actionId:t.actionId}));let o={actionId:i,cwd:s.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}},u=P(()=>{r.get(l).actionId===t.actionId&&r.set(l,Y)});return zt(Ye(s.environmentId,Ve(j.gitRunStackedAction,o)),{target:s,transportActionId:i,actionId:t.actionId,action:t.action,onProgress:e=>P(()=>{let n=r.get(l);if(n.actionId===t.actionId&&(r.set(l,Bt(n,e)),t.onProgress!==void 0))try{t.onProgress(e)}catch{}})}).pipe(_(Xe,{authorize:(t,n,i)=>Ze(e,n).authorize(r,t,i)}),ie(tt(r,s)),me(()=>u),je(e=>P(()=>{let n=r.get(l);n.actionId===t.actionId&&n.isRunning&&r.set(l,It(`run_change_request`,t.actionId,e))})),a(()=>u))}});return t.set(i,u),u},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:Nt,runStackedAction:e=>n(e),track:async(e,t,n,r)=>{let i=Z(t);if(i===null)return Pe(m(new wt({operation:n.operation,environmentId:t.environmentId,cwd:t.cwd})));let a=X(i),o=Ft(n);e.set(a,o);let s=await r();return e.get(a).actionId===o.actionId&&(ve(s)||Le(s.cause)?e.set(a,Y):e.get(a).actionId===o.actionId&&e.set(a,It(n.operation,o.actionId,ye(s.cause)))),s},resetError:(e,t,n)=>{r(e,t,e=>!e.isRunning&&e.operation===n?Y:e)}}}var Ht=100,Ut=3e4,Wt=1e4,Gt=p(`1 second`).pipe(Be(({duration:e})=>N(we(e,v(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=i(`CachedVcsRefsState.commitRefresh`)(function*(e,t,n){return yield*$e(n.environmentId,Te(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(S(!0),s(e=>I(`Could not recover invalidated cached Git refs.`).pipe(F({environmentId:n.environmentId,cwd:n.cwd,...z(e)}),S(!1)))),yield*t.saveVcsRefs(n.environmentId,n.cwd,n.refs).pipe(s(e=>I(`Could not persist cached Git refs.`).pipe(F({environmentId:n.environmentId,cwd:n.cwd,...z(e)})))),a!==i.persistedCacheReadable&&e.update(r,e=>e.revision===n.expectedRevision?{...e,persistedCacheReadable:a}:e)),!0}))}),Jt=i(`CachedVcsRefsState.makeChanges`)(function*(e,t,n,r=!0){let a=yield*Je,o=yield*Ue,c=a.target.environmentId,l=Kt(e),u=l&&r?yield*o.loadVcsRefs(c,e.cwd).pipe(s(t=>I(`Could not load cached Git refs.`).pipe(F({environmentId:c,cwd:e.cwd,...z(t)}),S(M())))):M(),d=i(`CachedVcsRefsState.refresh`)(function*(){let r=yield*Ge(j.vcsListRefs,e).pipe(_(Je,a)),i=o.saveVcsRefs(c,e.cwd,r).pipe(s(t=>I(`Could not persist cached Git refs.`).pipe(F({environmentId:c,cwd:e.cwd,...z(t)}))));return t===void 0||n===void 0?(l&&(yield*i),Fe(r)):(yield*qt(n,o,{environmentId:c,cwd:e.cwd,refs:r,expectedRevision:t,persist:l}))?Fe(r):M()}),f=E(N(u)).pipe(Ne(e=>de(e,{onNone:()=>fe,onSome:ne}))),p=le(E(be(a.state)),Se(a.state)).pipe(_e(e=>e.phase===`connected`?e.generation:null),ce,x(t=>t===null?Oe:E(d().pipe(je(t=>I(`Could not refresh Git refs.`).pipe(F({environmentId:c,cwd:e.cwd,...z(t)}))))).pipe(pe(Gt),Ne(e=>de(e,{onNone:()=>fe,onSome:ne})))));return le(f,p)});function Yt(e,t,n,r){return Ke(e,b(Te(function*(){return yield*Jt(t,n,yield*Me,r)})))}function Xt(e){let t=C(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(se(Ut),O(`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,status:We(e,{label:`environment-data:vcs:status`,idleTtlMs:Wt,subscribe:e=>qe(j.subscribeVcsStatus,e).pipe(Ae(()=>null,(e,t)=>{let n=St(e,t);return[n,[n]]}))}),pull:B(e,{label:`environment-data:vcs:pull`,tag:j.vcsPull,scheduler:V,concurrency:H,onSettled:r}),refreshStatus:B(e,{label:`environment-data:vcs:refresh-status`,tag:j.vcsRefreshStatus,scheduler:V,concurrency:H,onSettled:r}),createWorktree:B(e,{label:`environment-data:vcs:create-worktree`,tag:j.vcsCreateWorktree,scheduler:V,concurrency:H,onSettled:r}),worktreeSetup:R(e,{label:`environment-data:vcs:worktree-setup`,tag:j.subscribeWorktreeSetup,idleTtlMs:Wt}),cancelWorktreeSetup:B(e,{label:`environment-data:vcs:cancel-worktree-setup`,tag:j.worktreeSetupCancel}),removeWorktree:B(e,{label:`environment-data:vcs:remove-worktree`,tag:j.vcsRemoveWorktree,scheduler:V,concurrency:H,onSettled:r}),createRef:B(e,{label:`environment-data:vcs:create-ref`,tag:j.vcsCreateRef,scheduler:V,concurrency:H,onSettled:r}),switchRef:B(e,{label:`environment-data:vcs:switch-ref`,tag:j.vcsSwitchRef,scheduler:V,concurrency:H,onSettled:r}),init:B(e,{label:`environment-data:vcs:init`,tag:j.vcsInit,scheduler:V,concurrency:H,onSettled:r})}}var Zt=Xt(U),Qt=Vt(U),$t=120,en=80,tn=120,nn=500,rn=200,an=100,on=[],sn=[],cn=[],Q=[void 0],ln=Object.freeze([]),un=g({matches:ln,isLoading:!1}).pipe(O(`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 i=r,a=$(i,rn),o=e.length>0&&i.length>=2,s=o&&i===a?a:null,c;n[2]!==e||n[3]!==s?(c=s===null?null:ot(e,s),n[2]=e,n[3]=s,n[4]=c):c=n[4];let l=c,u;n[5]===l?u=n[6]:(u=l===null?un:dn(l),n[5]=l,n[6]=u);let d=f(u),p=o&&i!==a,m=p?ln:d.matches,h=s??``,g=o&&(p||d.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()??``,r=e.environmentId!==null&&e.cwd!==null?JSON.stringify([e.environmentId,e.cwd,t]):null,[i,a]=(0,K.useState)({targetKey:r,cursors:Q}),o=i.targetKey===r?i.cursors:Q,s=(0,K.useMemo)(()=>e.environmentId!==null&&e.cwd!==null?o.map(n=>Zt.listRefs({environmentId:e.environmentId,input:{cwd:e.cwd,...t.length>0?{query:t}:{},...n===void 0?{}:{cursor:n},limit:an}})):[],[o,t,e.cwd,e.environmentId]),c=(0,K.useMemo)(()=>g(e=>s.map(t=>e(t))).pipe(O(`web:vcs-ref-pages:${r??`empty`}`)),[s,r]),l=f(c),u=l.flatMap(e=>{let t=n(k(e));return t===null?[]:[t]}),d=new Map;for(let e of u)for(let t of e.refs)d.set(t.name,t);let p=u[0]??null,m=u.at(-1)??null,h=p===null||m===null?null:{refs:[...d.values()],isRepo:p.isRepo,hasPrimaryRemote:p.hasPrimaryRemote,nextCursor:m.nextCursor,totalCount:Math.max(...u.map(e=>e.totalCount))},_=l.find(e=>e._tag===`Failure`),v=ft(l),y=_?._tag===`Failure`?(()=>{let e=ye(_.cause);return e instanceof Error&&e.message.trim().length>0?e.message:`Failed to load refs.`})():null,b=(0,K.useCallback)(()=>{let e=s[0];a({targetKey:r,cursors:Q}),e!==void 0&&ee.refresh(e)},[s,r]),x=(0,K.useCallback)(()=>{r!==null&&h?.nextCursor!==null&&h?.nextCursor!==void 0&&a(e=>{let t=e.targetKey===r?e.cursors:Q;return t.includes(h.nextCursor)?{targetKey:r,cursors:t}:{targetKey:r,cursors:[...t,h.nextCursor]}})},[h?.nextCursor,r]);return{data:h,refs:h?.refs??on,error:y,isPending:l.some(e=>e.waiting),isFetchingNextPage:v,refresh:b,loadNext:x}}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?rt.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?nt({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,wt as d,gt as f,q as g,pt as h,pn as i,Qt as l,vt as m,gn as n,hn as o,_t as p,$ as r,fn as s,vn as t,Zt as u};
2
- //# sourceMappingURL=queries-CEjFwxVW.js.map
@@ -1,2 +0,0 @@
1
- import{$b as e,Ho as t,Ko as n,Vo as r,Zv as i,ds as a,es as o,fy as s,hs as c,jx as l}from"./utils-BxISc9RR.js";var u=l(),d=n(a(!1)).pipe(o(`web-environment-query:empty`));function f(e){let t=s(e);return t instanceof Error&&t.message.trim().length>0?t.message:`The environment request failed.`}function p(n){let a=(0,u.c)(20),o=n??d,s=t(o),l=r(o),p;a[0]===s?p=a[1]:(p=e(c(s)),a[0]=s,a[1]=p);let m;a[2]!==s._tag||a[3]!==s.previousSuccess||a[4]!==s.timestamp?(m=s._tag===`Success`?s.timestamp:s._tag===`Failure`?e(s.previousSuccess)?.timestamp??0:0,a[2]=s._tag,a[3]=s.previousSuccess,a[4]=s.timestamp,a[5]=m):m=a[5];let h;a[6]!==s._tag||a[7]!==s.cause?(h=s._tag===`Failure`?f(s.cause):null,a[6]=s._tag,a[7]=s.cause,a[8]=h):h=a[8];let g;a[9]!==s._tag||a[10]!==s.cause?(g=s._tag===`Failure`?e(i(s.cause)):null,a[9]=s._tag,a[10]=s.cause,a[11]=g):g=a[11];let _=n!==null&&s.waiting,v=s._tag===`Success`,y;return a[12]!==l||a[13]!==p||a[14]!==m||a[15]!==h||a[16]!==g||a[17]!==_||a[18]!==v?(y={data:p,dataUpdatedAt:m,error:h,failure:g,isPending:_,isSuccess:v,refresh:l},a[12]=l,a[13]=p,a[14]=m,a[15]=h,a[16]=g,a[17]=_,a[18]=v,a[19]=y):y=a[19],y}export{p as n,f as t};
2
- //# sourceMappingURL=query-D5pQUQvZ.js.map
@@ -1 +0,0 @@
1
- import"./chunk-FOHPRMQF-DzxwRta7.js";import{m as e}from"./mermaid-parser.core-B3cYmj0d.js";export{e as createRailroadAbnfServices};
@@ -1 +0,0 @@
1
- import"./chunk-FOHPRMQF-DzxwRta7.js";import{f as e}from"./mermaid-parser.core-B3cYmj0d.js";export{e as createRailroadEbnfServices};
@@ -1 +0,0 @@
1
- import"./chunk-FOHPRMQF-DzxwRta7.js";import{u as e}from"./mermaid-parser.core-B3cYmj0d.js";export{e as createRailroadPegServices};
@@ -1 +0,0 @@
1
- import{co as e,lo as t}from"./main-uLg3xUJM.js";export{t as __iconNode,e as default};
@@ -1 +0,0 @@
1
- import{oo as e,so as t}from"./main-uLg3xUJM.js";export{t as __iconNode,e as default};