@p4code/cli 0.8.13 → 0.8.14

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 (214) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-B9aQxlIK.mjs → binCli-BvhJ8Jqb.mjs} +253 -102
  3. package/dist/client/.vite/manifest.json +1283 -1283
  4. package/dist/client/assets/{AuthSurfaceShell-CJdXkxyH.js → AuthSurfaceShell-Dfm2iXjM.js} +2 -2
  5. package/dist/client/assets/{ChatGptUsageButton-7u9uPgbK.js → ChatGptUsageButton-BE2a_fvh.js} +2 -2
  6. package/dist/client/assets/{ChatMarkdown-C22JFyYa.js → ChatMarkdown-2qihmx2E.js} +4 -4
  7. package/dist/client/assets/{CodexSetupSection.logic-CEAT7YdZ.js → CodexSetupSection.logic-CZIedhFM.js} +2 -2
  8. package/dist/client/assets/{CommandBlock-CWt29kmi.js → CommandBlock-cV3B4sIS.js} +2 -2
  9. package/dist/client/assets/{ComposerPromptEditor-Bt_L4smq.js → ComposerPromptEditor-l0YJjut-.js} +4 -4
  10. package/dist/client/assets/{DevicePanel-CZm-f5TC.js → DevicePanel-CyqJ_QAv.js} +2 -2
  11. package/dist/client/assets/{DeviceSetup-BdrkGme6.js → DeviceSetup-B9gRys_T.js} +2 -2
  12. package/dist/client/assets/{DiffCommentAnnotation-B-XoYYxb.js → DiffCommentAnnotation-DqJdp0B7.js} +2 -2
  13. package/dist/client/assets/{DiffFileTree-CwTkSU3R.js → DiffFileTree-C0BZv_u5.js} +2 -2
  14. package/dist/client/assets/{DiffPanel-BCI9XXpF.js → DiffPanel-DvpW3Wct.js} +2 -2
  15. package/dist/client/assets/{DiffWorkerPoolProvider-OPZsOibX.js → DiffWorkerPoolProvider-C0s_fra9.js} +2 -2
  16. package/dist/client/assets/{EmbeddedDesign-DwRAPHYl.js → EmbeddedDesign-DGCXXVf5.js} +2 -2
  17. package/dist/client/assets/{FileDiff-BkJG5QAe.js → FileDiff-BtKZeeO5.js} +2 -2
  18. package/dist/client/assets/{FilePreviewPanel-CURtQAD1.js → FilePreviewPanel-DzVGuSCc.js} +2 -2
  19. package/dist/client/assets/{FoldedSettingsSection-B9B8i8Gg.js → FoldedSettingsSection-VCEXXLW3.js} +2 -2
  20. package/dist/client/assets/{NoProjectsHero-CkhVaJk9.js → NoProjectsHero-BQBJO2CN.js} +2 -2
  21. package/dist/client/assets/{PanelLayoutControls-CxuV0JO3.js → PanelLayoutControls-DnSdAhOm.js} +4 -4
  22. package/dist/client/assets/{PierreEntryIcon-CPG-jnaN.js → PierreEntryIcon-B1r7qMgq.js} +2 -2
  23. package/dist/client/assets/{PreviewPanel-Doh1peEu.js → PreviewPanel-CtXaNx5N.js} +2 -2
  24. package/dist/client/assets/{ProjectDefaultsSettings-DfhAk0_Y.js → ProjectDefaultsSettings-BYtlqxeq.js} +2 -2
  25. package/dist/client/assets/{ProjectFavicon-DUW6Bo66.js → ProjectFavicon-B5bWp7V6.js} +3 -3
  26. package/dist/client/assets/{ProjectIconPickerDialog-C613hnVY.js → ProjectIconPickerDialog-BWSyrwJD.js} +2 -2
  27. package/dist/client/assets/{ProviderAuthTerminal-eq346NX_.js → ProviderAuthTerminal-B2L5_uXE.js} +2 -2
  28. package/dist/client/assets/{ProviderModelPicker-DPb-88ui.js → ProviderModelPicker-B8ibbi9S.js} +2 -2
  29. package/dist/client/assets/{ProviderSettingsForm-DTYqzs8W.js → ProviderSettingsForm-DYn7It9I.js} +2 -2
  30. package/dist/client/assets/{PullRequestCodeTab-BBz0FfLD.js → PullRequestCodeTab-BfSQc1r1.js} +2 -2
  31. package/dist/client/assets/{ReadOnlySourcePreview-CkeeLVAm.js → ReadOnlySourcePreview-8MghAaC9.js} +2 -2
  32. package/dist/client/assets/{RenderErrorBoundary-mfAvIiFU.js → RenderErrorBoundary-Dm9BLD1I.js} +2 -2
  33. package/dist/client/assets/{ScheduledTasksSettings-BMUE9M9Z.js → ScheduledTasksSettings-ClZG_1G7.js} +2 -2
  34. package/dist/client/assets/{ScopedSwitch-BKOdsllO.js → ScopedSwitch-C7nxtEAT.js} +2 -2
  35. package/dist/client/assets/{SettingsPanels-BHhMJaVc.js → SettingsPanels-kXpGLc3M.js} +2 -2
  36. package/dist/client/assets/{SettingsPanels.logic-BwmY39Sq.js → SettingsPanels.logic-CcNyZsm-.js} +2 -2
  37. package/dist/client/assets/{SettingsScopeNotice-DAPsshab.js → SettingsScopeNotice-CM4ubyNs.js} +2 -2
  38. package/dist/client/assets/{T3ConnectAccountPages-CDuVbE2z.js → T3ConnectAccountPages-Cm4JG3hx.js} +2 -2
  39. package/dist/client/assets/{T3ConnectSidebarSignIn-BSQHp-Xq.js → T3ConnectSidebarSignIn-CmvCTtlG.js} +2 -2
  40. package/dist/client/assets/{ThemeEditorPanel-BiuI7Uiy.js → ThemeEditorPanel-kOwPAMtd.js} +2 -2
  41. package/dist/client/assets/{ThreadTerminalDrawer-B8n6TAqv.js → ThreadTerminalDrawer-CK0khkH6.js} +2 -2
  42. package/dist/client/assets/{Virtualizer-CTnacEby.js → Virtualizer-B895TWmX.js} +2 -2
  43. package/dist/client/assets/{_chat-z348gvgF.js → _chat-akhFQFVf.js} +5 -5
  44. package/dist/client/assets/{_chat.index-CBbUzaK7.js → _chat.index-P-ZRID1j.js} +2 -2
  45. package/dist/client/assets/{_chat.new-7TTfcDf1.js → _chat.new-DXkFcRYp.js} +2 -2
  46. package/dist/client/assets/{_chat.pull-requests-BE7Q2lUu.js → _chat.pull-requests-BYR5YTIM.js} +2 -2
  47. package/dist/client/assets/{abnfDiagram-VCTEODGH-HaXM7twL.js → abnfDiagram-VCTEODGH-CcoyEMJc.js} +2 -2
  48. package/dist/client/assets/architecture-7GRP2DOG-BCI44Tco.js +1 -0
  49. package/dist/client/assets/{architectureDiagram-5GKGNRK7-BhWXFsXS.js → architectureDiagram-5GKGNRK7-CXxubV6d.js} +2 -2
  50. package/dist/client/assets/{assets-DXnV2oRj.js → assets-C7tdule6.js} +2 -2
  51. package/dist/client/assets/{blockDiagram-I7D4REHJ-D213N9iF.js → blockDiagram-I7D4REHJ-DWnNJQVf.js} +2 -2
  52. package/dist/client/assets/{browserHistoryStore-DURO3U2L.js → browserHistoryStore-PqPCT4tW.js} +2 -2
  53. package/dist/client/assets/{browserLinkTarget-DcGx3A8F.js → browserLinkTarget-CWURM-O2.js} +2 -2
  54. package/dist/client/assets/{c4Diagram-7LVT6UL2-58POuQV-.js → c4Diagram-7LVT6UL2-DKlxhhfG.js} +2 -2
  55. package/dist/client/assets/channel-FPHxEbB1.js +2 -0
  56. package/dist/client/assets/{chunk-4HAMMTFA-Bcwcw8Wz.js → chunk-4HAMMTFA-BXCbWh-l.js} +2 -2
  57. package/dist/client/assets/{chunk-75Z2AOVW-BaYdZ0Fq.js → chunk-75Z2AOVW-ByRA_PDR.js} +2 -2
  58. package/dist/client/assets/{chunk-DU6HZSFF-B6TRgw4-.js → chunk-DU6HZSFF-CxOE2RJx.js} +2 -2
  59. package/dist/client/assets/{chunk-F27PBJKO-B5arSwg6.js → chunk-F27PBJKO-DXbxgIcF.js} +2 -2
  60. package/dist/client/assets/{chunk-GMAD6QVW-XeNCd3gb.js → chunk-GMAD6QVW-C-CPxvzK.js} +2 -2
  61. package/dist/client/assets/{chunk-GVQU2GXP-CWVbbWh7.js → chunk-GVQU2GXP-N8FA1SLM.js} +2 -2
  62. package/dist/client/assets/{chunk-IMKFNOWR-Cb-yxIAE.js → chunk-IMKFNOWR-DTBCxfEA.js} +2 -2
  63. package/dist/client/assets/{chunk-L3NEJ4N5-Di7nZhzu.js → chunk-L3NEJ4N5-DpY0Sgfm.js} +2 -2
  64. package/dist/client/assets/{chunk-OSK3NFVY-DcqBXKUK.js → chunk-OSK3NFVY-BZXi7c79.js} +2 -2
  65. package/dist/client/assets/{chunk-P2QGCYS3-DJ1kMiTY.js → chunk-P2QGCYS3-CEZ0Wrp3.js} +2 -2
  66. package/dist/client/assets/{chunk-POPQ4Y6H-Ba9RYr-b.js → chunk-POPQ4Y6H-ChY6VtHX.js} +2 -2
  67. package/dist/client/assets/{chunk-PWAF6VOD-D4Ch07S8.js → chunk-PWAF6VOD-ynZZsG4M.js} +2 -2
  68. package/dist/client/assets/{chunk-SHT3W25Y-BafMUZgc.js → chunk-SHT3W25Y-B2nWifo1.js} +2 -2
  69. package/dist/client/assets/{chunk-SVP7TREG-CsEVe0s3.js → chunk-SVP7TREG-B8mLhKtO.js} +2 -2
  70. package/dist/client/assets/{chunk-TICWLB2K-D3tgdZlp.js → chunk-TICWLB2K-DRpXMD23.js} +2 -2
  71. package/dist/client/assets/classDiagram-ZZMXUADV-BmhihMCg.js +2 -0
  72. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BmhihMCg.js +2 -0
  73. package/dist/client/assets/{connect-Vt7wlrih.js → connect-C2Pvay2K.js} +2 -2
  74. package/dist/client/assets/{connect-agent-CX70rAkF.js → connect-agent-F9m6jdrN.js} +2 -2
  75. package/dist/client/assets/{cynefin-OW5HDTMX-CU8HnD4F.js → cynefin-OW5HDTMX-Bdj9a2Tr.js} +1 -1
  76. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Cvc6_oYZ.js → cynefinDiagram-5FMLGOSQ-CI4Z0tY2.js} +2 -2
  77. package/dist/client/assets/{dagre-GXQ25YYZ-Bx5buWLS.js → dagre-GXQ25YYZ-BiXNu3UE.js} +2 -2
  78. package/dist/client/assets/{device-BgvBRE7C.js → device-dy573Bzs.js} +2 -2
  79. package/dist/client/assets/{diagram-S7CK7UJ4-CPZrAy0P.js → diagram-S7CK7UJ4-BoHm89r6.js} +2 -2
  80. package/dist/client/assets/{diagram-UQ7AKVKN-kBtSnHpL.js → diagram-UQ7AKVKN-C-2Ubrz8.js} +2 -2
  81. package/dist/client/assets/{diagram-VSXAHHWV-DQP2q1tS.js → diagram-VSXAHHWV-5CTD9pHp.js} +2 -2
  82. package/dist/client/assets/{diagram-VX7I27RA-DRUN0yEk.js → diagram-VX7I27RA-BJfYpp_F.js} +2 -2
  83. package/dist/client/assets/{diagram-Z3DM3KII-D4WMsQZZ.js → diagram-Z3DM3KII-z35dx_kK.js} +2 -2
  84. package/dist/client/assets/{diffRendering-iR2meoVj.js → diffRendering-BiYYLTwl.js} +2 -2
  85. package/dist/client/assets/{dist-vr51zfzA.js → dist-Bl7QV0pY.js} +2 -2
  86. package/dist/client/assets/{duoViewer-DTVry3xd.js → duoViewer-CPD9Wvk1.js} +2 -2
  87. package/dist/client/assets/{dynamic-CuoX2JEO.js → dynamic-DcfMLaU_.js} +2 -2
  88. package/dist/client/assets/{ebnfDiagram-PWID7BFC-BNUtunQw.js → ebnfDiagram-PWID7BFC-C2Fa8ORo.js} +2 -2
  89. package/dist/client/assets/{embeddedScripts-BMvBWRz_.js → embeddedScripts-DFdnbLSr.js} +2 -2
  90. package/dist/client/assets/{entities-7B8nzlQw.js → entities-B2DNkHHQ.js} +2 -2
  91. package/dist/client/assets/{environments-DYIXXf7q.js → environments-Bqz0Jaj_.js} +2 -2
  92. package/dist/client/assets/{erDiagram-RLTQ6QDP-DHjjowZq.js → erDiagram-RLTQ6QDP-WIlBdlNc.js} +2 -2
  93. package/dist/client/assets/eventmodeling-NTZA5JFV-Q6rJ-HVs.js +1 -0
  94. package/dist/client/assets/{fileLinks-BYi-XNUG.js → fileLinks-Y7rrQ-ob.js} +2 -2
  95. package/dist/client/assets/{fileTreeExpansion-DIOxQqDo.js → fileTreeExpansion-CktIYdPM.js} +2 -2
  96. package/dist/client/assets/flowDiagram-HODETNUW-Dyon23dU.js +1 -0
  97. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DEPOqoj0.js → ganttDiagram-EL5Y4UJY-CzIDxrzr.js} +2 -2
  98. package/dist/client/assets/{getDiffFileInput-DMj15wpy.js → getDiffFileInput-DaXZ00WD.js} +2 -2
  99. package/dist/client/assets/{gitGraph-4MIJSDKK-BGKW_zhb.js → gitGraph-4MIJSDKK-VJZ5WW8j.js} +1 -1
  100. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-7UhsI5zi.js → gitGraphDiagram-WWUBYQGX--N7ACKgH.js} +2 -2
  101. package/dist/client/assets/{guideRunStore-BEkwZ9H7.js → guideRunStore-C8Xso-YV.js} +2 -2
  102. package/dist/client/assets/{index-C_MVyH59.js → index-9_IX9wXh.js} +3 -3
  103. package/dist/client/assets/{info-A6RAGUB7-jvyzx_4e.js → info-A6RAGUB7-BsLL2HTs.js} +1 -1
  104. package/dist/client/assets/{infoDiagram-27XIBGKW-lTTpu3as.js → infoDiagram-27XIBGKW-H0RWUQa6.js} +2 -2
  105. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DlrQNGG9.js → ishikawaDiagram-5VMMS53U-BoBtpQFP.js} +2 -2
  106. package/dist/client/assets/{journeyDiagram-3NMN7TZE-Buy9e-fU.js → journeyDiagram-3NMN7TZE-rcwS0plS.js} +2 -2
  107. package/dist/client/assets/{kanban-definition-UXKFOSKX-1KgAXH0g.js → kanban-definition-UXKFOSKX-CMC0FYSq.js} +2 -2
  108. package/dist/client/assets/{line-DUV1hs6X.js → line-CbOfbAku.js} +2 -2
  109. package/dist/client/assets/{linkedPrompt-Da8rJho3.js → linkedPrompt-Bw0INRKj.js} +2 -2
  110. package/dist/client/assets/{main-Bh6Hj0_-.js → main-C6Kmott7.js} +7 -7
  111. package/dist/client/assets/{mediaReference-CLlAiRVc.js → mediaReference-CRKV_ScS.js} +2 -2
  112. package/dist/client/assets/{mediaSource-BTCWn94E.js → mediaSource-Hn2lPB2b.js} +2 -2
  113. package/dist/client/assets/{mermaid-parser.core-CsBuWV4-.js → mermaid-parser.core-BGJPFG4o.js} +4 -4
  114. package/dist/client/assets/{mermaid.core-BcICv5EB.js → mermaid.core-Bt6Qv84k.js} +5 -5
  115. package/dist/client/assets/{mindmap-definition-YA3MSWOX-BqCqe4io.js → mindmap-definition-YA3MSWOX-4Y8RevXP.js} +2 -2
  116. package/dist/client/assets/{onboarding-COQ6KgRG.js → onboarding-BnJjKcjq.js} +2 -2
  117. package/dist/client/assets/{openFileInPreview-BhRAqg63.js → openFileInPreview-BupyBOTN.js} +2 -2
  118. package/dist/client/assets/{p4ProjectFile-z5Hlq99W.js → p4ProjectFile-CUk0B5Zd.js} +2 -2
  119. package/dist/client/assets/{packet-AYTQ26CC-BYCaPqFA.js → packet-AYTQ26CC-CRQRHja4.js} +1 -1
  120. package/dist/client/assets/{pair-BDKjGij-.js → pair-ohR-X0pV.js} +2 -2
  121. package/dist/client/assets/{pegDiagram-XKGWAZYB-CqCw5Z-L.js → pegDiagram-XKGWAZYB-Dk0K8AzU.js} +2 -2
  122. package/dist/client/assets/{phoneViewer-DLSM0QXE.js → phoneViewer-DD_58CZV.js} +2 -2
  123. package/dist/client/assets/{pie-WAS4IAKB-BfOlqQx1.js → pie-WAS4IAKB-CWKurrWM.js} +1 -1
  124. package/dist/client/assets/{pieDiagram-E7YTZNPT-DZpCrUQF.js → pieDiagram-E7YTZNPT-DlRA_ADi.js} +2 -2
  125. package/dist/client/assets/{pierre-icons-BG7vd34x.js → pierre-icons-Bj2UJzq7.js} +2 -2
  126. package/dist/client/assets/{preview-bd-MGMMz.js → preview-Czvs-xjq.js} +2 -2
  127. package/dist/client/assets/{primary-BwHoAoya.js → primary-C0h34HcZ.js} +2 -2
  128. package/dist/client/assets/{primaryCloudLinkState-DtOYGRkF.js → primaryCloudLinkState-EkUmcneJ.js} +2 -2
  129. package/dist/client/assets/{projectFilesQueryState-BP_JvI7-.js → projectFilesQueryState-DDX2gPG6.js} +2 -2
  130. package/dist/client/assets/{projectScriptEditor-BGLshibY.js → projectScriptEditor-B-W-Sbdv.js} +2 -2
  131. package/dist/client/assets/{providerSkills-DxYtwoxJ.js → providerSkills-OoPsDyac.js} +2 -2
  132. package/dist/client/assets/{pullRequestDetail.logic-C_aVDAY_.js → pullRequestDetail.logic-BZIPv0wR.js} +2 -2
  133. package/dist/client/assets/{pullRequests-D0no1PZS.js → pullRequests-BuF4aTBF.js} +2 -2
  134. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-BTtuOXlL.js → quadrantDiagram-AXDQQJYC-Cgrn1gJf.js} +2 -2
  135. package/dist/client/assets/{queries-DkmaXOL-.js → queries-B5qQohie.js} +2 -2
  136. package/dist/client/assets/{radar-RG4KPBEZ-BiJgnIUY.js → radar-RG4KPBEZ-BNds8J7E.js} +1 -1
  137. package/dist/client/assets/{railroad-74A4TZTK-C0CA0mcr.js → railroad-74A4TZTK-c-ku32yb.js} +1 -1
  138. package/dist/client/assets/railroad-abnf-HS5TGJTU-DdK1L4Kf.js +1 -0
  139. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DAIwdsWb.js +1 -0
  140. package/dist/client/assets/railroad-peg-WCYAUIDC-B6SwzZWt.js +1 -0
  141. package/dist/client/assets/{railroadDiagram-O6MQD6OU-WczOSoF4.js → railroadDiagram-O6MQD6OU-CQ0Qmd0t.js} +2 -2
  142. package/dist/client/assets/{renderScheduler-BLjFSKnt.js → renderScheduler-CFozWmL-.js} +2 -2
  143. package/dist/client/assets/{requirementDiagram-BXWQKSXE-B3qCIQP5.js → requirementDiagram-BXWQKSXE-ssGfFSCi.js} +2 -2
  144. package/dist/client/assets/{runtime-Bni_zt6P.js → runtime-C2Cbg6bw.js} +2 -2
  145. package/dist/client/assets/{runtime-D8mKjOP-.js → runtime-C9FXEGBC.js} +3 -3
  146. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-e2-j7ERe.js → sankeyDiagram-P5KCCOFB-CTZUXdFj.js} +2 -2
  147. package/dist/client/assets/{scheduledTasksSettings.logic-BNC897-_.js → scheduledTasksSettings.logic-Cucrqmxt.js} +2 -2
  148. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-DG7-8UJk.js → sequenceDiagram-WJ2MYXX4-B8uW-gHN.js} +2 -2
  149. package/dist/client/assets/{server-CaLEm3Wt.js → server-B3nCKBrK.js} +2 -2
  150. package/dist/client/assets/{session-2CRBJwS7.js → session-DtKtS09P.js} +2 -2
  151. package/dist/client/assets/{session-logic-BLOBsHEA.js → session-logic-P3KsudEl.js} +2 -2
  152. package/dist/client/assets/{settings-BIwaDm1N.js → settings-BNJbLRpG.js} +2 -2
  153. package/dist/client/assets/{settings.appearance-ToUM8fHh.js → settings.appearance-DKLKCSXj.js} +2 -2
  154. package/dist/client/assets/settings.archived-BeEB6d0D.js +2 -0
  155. package/dist/client/assets/{settings.computer-use-BEghs16L.js → settings.computer-use-BcdKzzUy.js} +2 -2
  156. package/dist/client/assets/{settings.connections-C_LVk0gJ.js → settings.connections-Cjmfz_7g.js} +2 -2
  157. package/dist/client/assets/{settings.data-controls-BaTil8NB.js → settings.data-controls-CZHmsfBq.js} +2 -2
  158. package/dist/client/assets/{settings.decisions-JTbMt08J.js → settings.decisions-C3WA_g2Z.js} +2 -2
  159. package/dist/client/assets/{settings.diagnostics-ByG62ZGs.js → settings.diagnostics-Bfh6T3JX.js} +2 -2
  160. package/dist/client/assets/{settings.general-BT78z_Cn.js → settings.general-HB-_Jy6d.js} +2 -2
  161. package/dist/client/assets/{settings.integrations-C3jj2T1d.js → settings.integrations-C-uLxrlE.js} +2 -2
  162. package/dist/client/assets/{settings.keybindings-CeqZWQEi.js → settings.keybindings-BGq7j4EC.js} +2 -2
  163. package/dist/client/assets/{settings.open-source-licenses-BAFwkfI8.js → settings.open-source-licenses-VexlqZXJ.js} +2 -2
  164. package/dist/client/assets/settings.plugins-P_jMyYCz.js +5 -0
  165. package/dist/client/assets/{settings.projects-Cqx1zAvs.js → settings.projects-Bl6-Pt9m.js} +3 -3
  166. package/dist/client/assets/{settings.providers-CS55UrI1.js → settings.providers-Dk00EIn3.js} +3 -3
  167. package/dist/client/assets/{settings.scheduled-tasks-CFJTEOb1.js → settings.scheduled-tasks-IH5fvnPs.js} +2 -2
  168. package/dist/client/assets/{settings.snap-shot-E3AITJyC.js → settings.snap-shot-CaOvSkk3.js} +2 -2
  169. package/dist/client/assets/{settings.source-control-CWWy9E3b.js → settings.source-control-hwzkeaj5.js} +2 -2
  170. package/dist/client/assets/{settings.storage-BnUI1rFT.js → settings.storage-YtslAsAl.js} +2 -2
  171. package/dist/client/assets/{settingsLayout-DHc6oKfL.js → settingsLayout-Oe2gP0HD.js} +2 -2
  172. package/dist/client/assets/{sidebarProjectGrouping-DD4nu9RX.js → sidebarProjectGrouping-zfg6kMP5.js} +2 -2
  173. package/dist/client/assets/{sortable.esm-BAEGChD3.js → sortable.esm-CFdu6ubt.js} +2 -2
  174. package/dist/client/assets/{sourceControl-BAghu6LN.js → sourceControl-CNpb3juM.js} +2 -2
  175. package/dist/client/assets/{stateDiagram-D77RDMKH-CpZF58eW.js → stateDiagram-D77RDMKH-BXjvJECk.js} +2 -2
  176. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DoChugDq.js +2 -0
  177. package/dist/client/assets/{swimlanes-42K2YHIH-D1b49puG.js → swimlanes-42K2YHIH-BuQKiVFK.js} +2 -2
  178. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-Bwk0C9Yw.js +9 -0
  179. package/dist/client/assets/{terminalSessions-Q2t1JYPS.js → terminalSessions-C0i8FMIw.js} +2 -2
  180. package/dist/client/assets/{threadSort-C5oCCRfj.js → threadSort-urWEkJav.js} +2 -2
  181. package/dist/client/assets/{timeline-definition-24CTP7MA-89AJY6KO.js → timeline-definition-24CTP7MA-gsy_kdrp.js} +2 -2
  182. package/dist/client/assets/{toast-DhMYg_gN.js → toast-D1xgN6T2.js} +2 -2
  183. package/dist/client/assets/{treeView-Q6P3EWNA-CqNF2YcW.js → treeView-Q6P3EWNA-BHvMPOqK.js} +1 -1
  184. package/dist/client/assets/{treemap-WGGIJYW6-LJa3ZEYA.js → treemap-WGGIJYW6-D8SWHA1Z.js} +1 -1
  185. package/dist/client/assets/{usage-CJVyABbK.js → usage-BsNTrKRO.js} +2 -2
  186. package/dist/client/assets/{use-atom-command-x4GQBtio.js → use-atom-command-DFVJioxM.js} +2 -2
  187. package/dist/client/assets/{useHandleNewThread-CReGBX6y.js → useHandleNewThread-D3kzOunA.js} +2 -2
  188. package/dist/client/assets/{usePullRequestActions-BL4mjngC.js → usePullRequestActions-eR9_K37m.js} +2 -2
  189. package/dist/client/assets/{useScopedModelAvailability-CBOIiaXC.js → useScopedModelAvailability-DloNarQ1.js} +2 -2
  190. package/dist/client/assets/{useSettings-Dx076NWT.js → useSettings-BVUg52H2.js} +2 -2
  191. package/dist/client/assets/{useT3ConnectAuthPrompt-1zTdZLsH.js → useT3ConnectAuthPrompt-iHfw63uu.js} +2 -2
  192. package/dist/client/assets/{vcsRefInvalidation-46AnO9mr.js → vcsRefInvalidation-DZeFb_fD.js} +2 -2
  193. package/dist/client/assets/{vennDiagram-4TSXK5OY-CvvE7gMp.js → vennDiagram-4TSXK5OY-DWeHYWRx.js} +2 -2
  194. package/dist/client/assets/{wardley-WFR3VGLG-Ca8Qzkpo.js → wardley-WFR3VGLG-CfPV8k7N.js} +1 -1
  195. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-BBSNgSMI.js → wardleyDiagram-VM6X3IG4-D0SH6I3q.js} +2 -2
  196. package/dist/client/assets/{welcome-B3wsq5wK.js → welcome-BWkyKuVQ.js} +2 -2
  197. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-D8OhWe48.js → xychartDiagram-S5SC5T6Z-CHYweeaE.js} +2 -2
  198. package/dist/client/index.html +1 -1
  199. package/dist/{renderer-C4CdFj__.mjs → renderer-BFtino0A.mjs} +2 -2
  200. package/dist/{runtime-CCVFqL3Y.mjs → runtime-ERvpj9Mz.mjs} +3 -3
  201. package/package.json +1 -1
  202. package/dist/client/assets/architecture-7GRP2DOG-CiMEl2LX.js +0 -1
  203. package/dist/client/assets/channel-CDbYAV2D.js +0 -2
  204. package/dist/client/assets/classDiagram-ZZMXUADV-Cdtwlmxc.js +0 -2
  205. package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cdtwlmxc.js +0 -2
  206. package/dist/client/assets/eventmodeling-NTZA5JFV-DNKqiuCf.js +0 -1
  207. package/dist/client/assets/flowDiagram-HODETNUW-CbOoDtR7.js +0 -1
  208. package/dist/client/assets/railroad-abnf-HS5TGJTU-BtC_0p6z.js +0 -1
  209. package/dist/client/assets/railroad-ebnf-LZEXJU2U-IeTBC6cs.js +0 -1
  210. package/dist/client/assets/railroad-peg-WCYAUIDC-DLoLKYq3.js +0 -1
  211. package/dist/client/assets/settings.archived-Cq_qclay.js +0 -2
  212. package/dist/client/assets/settings.plugins-D5l1ZPSB.js +0 -5
  213. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DewOo-MV.js +0 -2
  214. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-d9EGwk-5.js +0 -9
@@ -1,2 +1,2 @@
1
- import{Cv as e,D_ as t,E_ as n,Lc as r,NE as i,_y as a,xv as o}from"./utils-BEVyjoxo.js";import{F as s,M as c,P as l,k as u,tt as d}from"./runtime-D8mKjOP-.js";import{t as f}from"./runtime-Bni_zt6P.js";import{i as p}from"./session-2CRBJwS7.js";import{n as m}from"./query-Bd5_Y_Vy.js";var h=i(),g=Object.freeze({generation:-1,resetVersion:-1,offset:0}),_=524288,v=16384,y=1024,b=new TextEncoder,x=new TextDecoder(`utf-8`,{ignoreBOM:!0}),S=Object.freeze({generation:0,chunks:Object.freeze([]),retainedBytes:0,resetVersion:0,nextOffset:0});function C(e,t){if(e.length===0)return[];let n=b.encode(e);if(n.byteLength<=t)return[{data:e,byteLength:n.byteLength}];let r=[],i=0;for(;i<n.byteLength;){let e=Math.min(i+t,n.byteLength);for(;e<n.byteLength&&((n[e]??0)&192)==128;)--e;if(e===i)for(e=Math.min(i+t,n.byteLength);e<n.byteLength&&((n[e]??0)&192)==128;)e+=1;let a=n.subarray(i,e);r.push({data:x.decode(a),byteLength:a.byteLength}),i=e}return r}function w(e,t){if(t<=0)return``;let n=b.encode(e);if(n.byteLength<=t)return e;let r=n.byteLength-t;for(;r<n.length;){let e=n[r];if(e===void 0||(e&192)!=128)break;r+=1}return x.decode(n.subarray(r))}function T(e,t,n=v){let r=C(e,n),i=0,a=t;return{chunks:r.map(e=>{i+=e.byteLength;let t=a;return a+=e.data.length,{startOffset:t,data:e.data,byteLength:e.byteLength}}),nextOffset:a,byteLength:i}}function E(e){let t=[];for(let n of e){let e=t.at(-1);e!==void 0&&e.startOffset+e.data.length===n.startOffset&&e.byteLength+n.byteLength<=v?t[t.length-1]={startOffset:e.startOffset,data:`${e.data}${n.data}`,byteLength:e.byteLength+n.byteLength}:t.push(n)}return t}function D(e,t){let n=0,r=0;for(;r<t&&n<e.data.length;){let t=e.data.codePointAt(n);r+=t<=127?1:t<=2047?2:t<=65535?3:4,n+=t<=65535?1:2}return{...e,startOffset:e.startOffset+n,data:e.data.slice(n),byteLength:e.byteLength-r}}function O(e,t,n){if(t.length===0)return e;if(n<=0)return{generation:e.generation,chunks:[],retainedBytes:0,resetVersion:e.resetVersion+1,nextOffset:e.nextOffset+t.length};let r=T(t,e.nextOffset,Math.min(v,Math.max(1,n))),i=[...e.chunks,...r.chunks],a=e.retainedBytes+r.byteLength,o=0;for(;a>n&&o<i.length;){let e=i[o],t=a-n;if(t<e.byteLength){let n=D(e,t);a-=e.byteLength-n.byteLength,n.byteLength>0?i[o]=n:o+=1;break}a-=e.byteLength,o+=1}let s=o===0?i:i.slice(o);if(s.length>y){s=E(s);let e=s.length-y;if(e>0){for(let t of s.slice(0,e))a-=t.byteLength;s=s.slice(e)}}return{generation:e.generation,chunks:s,retainedBytes:a,resetVersion:e.resetVersion,nextOffset:r.nextOffset}}function k(e,t,n){let r=T(w(t,n),0,Math.min(v,Math.max(1,n)));return{generation:e.generation,chunks:r.chunks,retainedBytes:r.byteLength,resetVersion:e.resetVersion+1,nextOffset:r.nextOffset}}function A(e){return e.chunks.map(e=>e.data).join(``)}function j(e,t){let n={generation:e.generation,resetVersion:e.resetVersion,offset:e.nextOffset},r=e.chunks[0];if(t.generation!==e.generation||t.resetVersion!==e.resetVersion||t.offset<(r?.startOffset??e.nextOffset))return{type:`reset`,data:A(e),cursor:n};let i=e.chunks.filter(e=>e.startOffset+e.data.length>t.offset);return i.length===0?{type:`none`,cursor:n}:{type:`append`,data:i.map(e=>e.data.slice(Math.max(0,t.offset-e.startOffset))).join(``),cursor:n}}function M(e){return e.filter(e=>e.state.hasRunningSubprocess).map(e=>e.target.terminalId)}var N=Object.freeze({output:S,status:`closed`,error:null,updatedAt:null,version:0,lifecycleVersion:0}),P=Object.freeze({summary:null,output:S,status:`closed`,error:null,hasRunningSubprocess:!1,updatedAt:null,version:0,lifecycleVersion:0}),F=0;function I(){return{...N,output:{...S,generation:++F}}}function L(e,t,n=N){return{output:k(n.output,e.history,t),status:e.status,error:null,updatedAt:e.updatedAt,version:n.version+1,lifecycleVersion:n.lifecycleVersion}}function R(e,t){return e===null?t:t===null||Date.parse(e)>=Date.parse(t)?e:t}function z(e,t){return{summary:e,output:t.output,status:t.version>0?t.status:e?.status??t.status,error:t.error,hasRunningSubprocess:e?.hasRunningSubprocess??!1,updatedAt:R(e?.updatedAt??null,t.updatedAt),version:t.version,lifecycleVersion:t.lifecycleVersion}}function B(e,t,n=_){switch(t.type){case`snapshot`:return{...L(t.snapshot,n,e),lifecycleVersion:e.version===0?e.lifecycleVersion:e.lifecycleVersion+1};case`restarted`:return{...L(t.snapshot,n,e),lifecycleVersion:e.lifecycleVersion+1};case`output`:return{...e,output:O(e.output,t.data,n),status:e.status===`closed`?`running`:e.status,error:null,version:e.version+1};case`cleared`:return{...e,output:k(e.output,``,n),error:null,version:e.version+1};case`exited`:return{...e,status:`exited`,error:null,version:e.version+1};case`closed`:return{...e,status:`closed`,error:null,version:e.version+1};case`error`:return{...e,status:`error`,error:t.message,version:e.version+1};case`activity`:return e}}function V(e,t){return t.type===`snapshot`?t.terminals:t.type===`remove`?e.filter(e=>e.threadId!==t.threadId||e.terminalId!==t.terminalId):[...e.filter(e=>e.threadId!==t.terminal.threadId||e.terminalId!==t.terminal.terminalId),t.terminal]}function H(t){let n=u(),i=u(),a=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId]),f=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId,t.terminalId??null]),p={mode:`serial`,key:a};return{observe:s(t,{label:`environment-data:terminal:observe`,subscribe:t=>e(()=>d(r.terminalObserve,t).pipe(o(I,B)))}),attach:s(t,{label:`environment-data:terminal:attach`,subscribe:t=>e(()=>d(r.terminalAttach,t).pipe(o(I,B)))}),events:l(t,{label:`environment-data:terminal:events`,tag:r.subscribeTerminalEvents}),metadata:s(t,{label:`environment-data:terminal:metadata`,subscribe:e=>d(r.subscribeTerminalMetadata,{}).pipe(o(()=>[],V))}),open:c(t,{label:`environment-data:terminal:open`,tag:r.terminalOpen,scheduler:n,concurrency:p}),write:c(t,{label:`environment-data:terminal:write`,tag:r.terminalWrite}),resize:c(t,{label:`environment-data:terminal:resize`,tag:r.terminalResize,scheduler:i,concurrency:{mode:`latest`,key:f}}),clear:c(t,{label:`environment-data:terminal:clear`,tag:r.terminalClear,scheduler:n,concurrency:p}),restart:c(t,{label:`environment-data:terminal:restart`,tag:r.terminalRestart,scheduler:n,concurrency:p}),close:c(t,{label:`environment-data:terminal:close`,tag:r.terminalClose,scheduler:n,concurrency:p})}}var U=H(f),W=Object.freeze([]),G=new WeakMap,K=new WeakMap,q=new WeakMap;function J(e,t){let n=K.get(e),r=n?.get(t);if(r)return r;let i={target:{environmentId:t,threadId:a.make(e.threadId),terminalId:e.terminalId},state:z(e,N)};return n||(n=new Map,K.set(e,n)),n.set(t,i),i}function Y(e){let t=G.get(e);if(!t){let n=new Intl.Collator(void 0,{numeric:!0}).compare,r=e.toSorted((e,t)=>n(e.terminalId,t.terminalId)),i=new Map;for(let e of r){let t=i.get(e.threadId);t?t.push(e):i.set(e.threadId,[e])}t={all:r,byThreadId:i,views:new Map},G.set(e,t)}return t}function X(e,t,n){if(t===null||e===null||e.length===0)return W;let r=Y(e),i=r.views.get(t),a=i?.get(n);if(a)return a;let o=n===null?r.all:r.byThreadId.get(n);if(!o||o.length===0)return W;let s=o[0],c=n===null?`all`:`thread`,l=q.get(s),u=l?.get(t),d=u?.[c]?.deref(),f=d?.length===o.length&&d.every((e,t)=>e.state.summary===o[t])?d:o.map(e=>J(e,t));return l||(l=new Map,q.set(s,l)),f!==d&&l.set(t,{...u,[c]:new WeakRef(f)}),i||(i=new Map,r.views.set(t,i)),i.set(n,f),f}function Z(e){let r=(0,h.c)(15),i=p(e.environmentId,t),a=p(e.environmentId,n),o;r[0]!==a||r[1]!==i||r[2]!==e.environmentId||r[3]!==e.terminal?(o=e.environmentId!==null&&e.terminal!==null?a?U.attach({environmentId:e.environmentId,input:e.terminal}):i?U.observe({environmentId:e.environmentId,input:{threadId:e.terminal.threadId,terminalId:e.terminal.terminalId}}):null:null,r[0]=a,r[1]=i,r[2]=e.environmentId,r[3]=e.terminal,r[4]=o):o=r[4];let s=m(o),c;r[5]!==i||r[6]!==e.environmentId?(c=e.environmentId===null||!i?null:U.metadata({environmentId:e.environmentId,input:null}),r[5]=i,r[6]=e.environmentId,r[7]=c):c=r[7];let l=m(c),u;bb0:{if(e.environmentId===null||e.terminal===null){u=P;break bb0}let t;r[8]!==s.data||r[9]!==e.terminal||r[10]!==l.data?(t=z((l.data===null?null:Y(l.data).byThreadId.get(e.terminal.threadId)?.find(t=>t.terminalId===e.terminal?.terminalId))??null,s.data??N),r[8]=s.data,r[9]=e.terminal,r[10]=l.data,r[11]=t):t=r[11];let n=t,i;r[12]!==s.error||r[13]!==n?(i=s.error===null?n:{...n,error:s.error,status:`error`},r[12]=s.error,r[13]=n,r[14]=i):i=r[14],u=i}return u}function Q(e){let n=(0,h.c)(8),r=p(e.environmentId,t),i;n[0]!==r||n[1]!==e.environmentId?(i=e.environmentId===null||!r?null:U.metadata({environmentId:e.environmentId,input:null}),n[0]=r,n[1]=e.environmentId,n[2]=i):i=n[2];let a=m(i),o;return n[3]!==e.environmentId||n[4]!==e.threadId||n[5]!==a.data||n[6]!==a.error?(o=a.data===null||a.error!==null?null:X(a.data,e.environmentId,e.threadId),n[3]=e.environmentId,n[4]=e.threadId,n[5]=a.data,n[6]=a.error,n[7]=o):o=n[7],o}function $(e){let t=(0,h.c)(4),n=Q(e),r;t[0]===n?r=t[1]:(r=n??[],t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=M(r),t[2]=r,t[3]=i),i}export{g as a,U as i,Q as n,j as o,$ as r,Z as t};
2
- //# sourceMappingURL=terminalSessions-Q2t1JYPS.js.map
1
+ import{Cv as e,D_ as t,E_ as n,Lc as r,NE as i,_y as a,xv as o}from"./utils-BEVyjoxo.js";import{F as s,M as c,P as l,k as u,tt as d}from"./runtime-C9FXEGBC.js";import{t as f}from"./runtime-C2Cbg6bw.js";import{i as p}from"./session-DtKtS09P.js";import{n as m}from"./query-Bd5_Y_Vy.js";var h=i(),g=Object.freeze({generation:-1,resetVersion:-1,offset:0}),_=524288,v=16384,y=1024,b=new TextEncoder,x=new TextDecoder(`utf-8`,{ignoreBOM:!0}),S=Object.freeze({generation:0,chunks:Object.freeze([]),retainedBytes:0,resetVersion:0,nextOffset:0});function C(e,t){if(e.length===0)return[];let n=b.encode(e);if(n.byteLength<=t)return[{data:e,byteLength:n.byteLength}];let r=[],i=0;for(;i<n.byteLength;){let e=Math.min(i+t,n.byteLength);for(;e<n.byteLength&&((n[e]??0)&192)==128;)--e;if(e===i)for(e=Math.min(i+t,n.byteLength);e<n.byteLength&&((n[e]??0)&192)==128;)e+=1;let a=n.subarray(i,e);r.push({data:x.decode(a),byteLength:a.byteLength}),i=e}return r}function w(e,t){if(t<=0)return``;let n=b.encode(e);if(n.byteLength<=t)return e;let r=n.byteLength-t;for(;r<n.length;){let e=n[r];if(e===void 0||(e&192)!=128)break;r+=1}return x.decode(n.subarray(r))}function T(e,t,n=v){let r=C(e,n),i=0,a=t;return{chunks:r.map(e=>{i+=e.byteLength;let t=a;return a+=e.data.length,{startOffset:t,data:e.data,byteLength:e.byteLength}}),nextOffset:a,byteLength:i}}function E(e){let t=[];for(let n of e){let e=t.at(-1);e!==void 0&&e.startOffset+e.data.length===n.startOffset&&e.byteLength+n.byteLength<=v?t[t.length-1]={startOffset:e.startOffset,data:`${e.data}${n.data}`,byteLength:e.byteLength+n.byteLength}:t.push(n)}return t}function D(e,t){let n=0,r=0;for(;r<t&&n<e.data.length;){let t=e.data.codePointAt(n);r+=t<=127?1:t<=2047?2:t<=65535?3:4,n+=t<=65535?1:2}return{...e,startOffset:e.startOffset+n,data:e.data.slice(n),byteLength:e.byteLength-r}}function O(e,t,n){if(t.length===0)return e;if(n<=0)return{generation:e.generation,chunks:[],retainedBytes:0,resetVersion:e.resetVersion+1,nextOffset:e.nextOffset+t.length};let r=T(t,e.nextOffset,Math.min(v,Math.max(1,n))),i=[...e.chunks,...r.chunks],a=e.retainedBytes+r.byteLength,o=0;for(;a>n&&o<i.length;){let e=i[o],t=a-n;if(t<e.byteLength){let n=D(e,t);a-=e.byteLength-n.byteLength,n.byteLength>0?i[o]=n:o+=1;break}a-=e.byteLength,o+=1}let s=o===0?i:i.slice(o);if(s.length>y){s=E(s);let e=s.length-y;if(e>0){for(let t of s.slice(0,e))a-=t.byteLength;s=s.slice(e)}}return{generation:e.generation,chunks:s,retainedBytes:a,resetVersion:e.resetVersion,nextOffset:r.nextOffset}}function k(e,t,n){let r=T(w(t,n),0,Math.min(v,Math.max(1,n)));return{generation:e.generation,chunks:r.chunks,retainedBytes:r.byteLength,resetVersion:e.resetVersion+1,nextOffset:r.nextOffset}}function A(e){return e.chunks.map(e=>e.data).join(``)}function j(e,t){let n={generation:e.generation,resetVersion:e.resetVersion,offset:e.nextOffset},r=e.chunks[0];if(t.generation!==e.generation||t.resetVersion!==e.resetVersion||t.offset<(r?.startOffset??e.nextOffset))return{type:`reset`,data:A(e),cursor:n};let i=e.chunks.filter(e=>e.startOffset+e.data.length>t.offset);return i.length===0?{type:`none`,cursor:n}:{type:`append`,data:i.map(e=>e.data.slice(Math.max(0,t.offset-e.startOffset))).join(``),cursor:n}}function M(e){return e.filter(e=>e.state.hasRunningSubprocess).map(e=>e.target.terminalId)}var N=Object.freeze({output:S,status:`closed`,error:null,updatedAt:null,version:0,lifecycleVersion:0}),P=Object.freeze({summary:null,output:S,status:`closed`,error:null,hasRunningSubprocess:!1,updatedAt:null,version:0,lifecycleVersion:0}),F=0;function I(){return{...N,output:{...S,generation:++F}}}function L(e,t,n=N){return{output:k(n.output,e.history,t),status:e.status,error:null,updatedAt:e.updatedAt,version:n.version+1,lifecycleVersion:n.lifecycleVersion}}function R(e,t){return e===null?t:t===null||Date.parse(e)>=Date.parse(t)?e:t}function z(e,t){return{summary:e,output:t.output,status:t.version>0?t.status:e?.status??t.status,error:t.error,hasRunningSubprocess:e?.hasRunningSubprocess??!1,updatedAt:R(e?.updatedAt??null,t.updatedAt),version:t.version,lifecycleVersion:t.lifecycleVersion}}function B(e,t,n=_){switch(t.type){case`snapshot`:return{...L(t.snapshot,n,e),lifecycleVersion:e.version===0?e.lifecycleVersion:e.lifecycleVersion+1};case`restarted`:return{...L(t.snapshot,n,e),lifecycleVersion:e.lifecycleVersion+1};case`output`:return{...e,output:O(e.output,t.data,n),status:e.status===`closed`?`running`:e.status,error:null,version:e.version+1};case`cleared`:return{...e,output:k(e.output,``,n),error:null,version:e.version+1};case`exited`:return{...e,status:`exited`,error:null,version:e.version+1};case`closed`:return{...e,status:`closed`,error:null,version:e.version+1};case`error`:return{...e,status:`error`,error:t.message,version:e.version+1};case`activity`:return e}}function V(e,t){return t.type===`snapshot`?t.terminals:t.type===`remove`?e.filter(e=>e.threadId!==t.threadId||e.terminalId!==t.terminalId):[...e.filter(e=>e.threadId!==t.terminal.threadId||e.terminalId!==t.terminal.terminalId),t.terminal]}function H(t){let n=u(),i=u(),a=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId]),f=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId,t.terminalId??null]),p={mode:`serial`,key:a};return{observe:s(t,{label:`environment-data:terminal:observe`,subscribe:t=>e(()=>d(r.terminalObserve,t).pipe(o(I,B)))}),attach:s(t,{label:`environment-data:terminal:attach`,subscribe:t=>e(()=>d(r.terminalAttach,t).pipe(o(I,B)))}),events:l(t,{label:`environment-data:terminal:events`,tag:r.subscribeTerminalEvents}),metadata:s(t,{label:`environment-data:terminal:metadata`,subscribe:e=>d(r.subscribeTerminalMetadata,{}).pipe(o(()=>[],V))}),open:c(t,{label:`environment-data:terminal:open`,tag:r.terminalOpen,scheduler:n,concurrency:p}),write:c(t,{label:`environment-data:terminal:write`,tag:r.terminalWrite}),resize:c(t,{label:`environment-data:terminal:resize`,tag:r.terminalResize,scheduler:i,concurrency:{mode:`latest`,key:f}}),clear:c(t,{label:`environment-data:terminal:clear`,tag:r.terminalClear,scheduler:n,concurrency:p}),restart:c(t,{label:`environment-data:terminal:restart`,tag:r.terminalRestart,scheduler:n,concurrency:p}),close:c(t,{label:`environment-data:terminal:close`,tag:r.terminalClose,scheduler:n,concurrency:p})}}var U=H(f),W=Object.freeze([]),G=new WeakMap,K=new WeakMap,q=new WeakMap;function J(e,t){let n=K.get(e),r=n?.get(t);if(r)return r;let i={target:{environmentId:t,threadId:a.make(e.threadId),terminalId:e.terminalId},state:z(e,N)};return n||(n=new Map,K.set(e,n)),n.set(t,i),i}function Y(e){let t=G.get(e);if(!t){let n=new Intl.Collator(void 0,{numeric:!0}).compare,r=e.toSorted((e,t)=>n(e.terminalId,t.terminalId)),i=new Map;for(let e of r){let t=i.get(e.threadId);t?t.push(e):i.set(e.threadId,[e])}t={all:r,byThreadId:i,views:new Map},G.set(e,t)}return t}function X(e,t,n){if(t===null||e===null||e.length===0)return W;let r=Y(e),i=r.views.get(t),a=i?.get(n);if(a)return a;let o=n===null?r.all:r.byThreadId.get(n);if(!o||o.length===0)return W;let s=o[0],c=n===null?`all`:`thread`,l=q.get(s),u=l?.get(t),d=u?.[c]?.deref(),f=d?.length===o.length&&d.every((e,t)=>e.state.summary===o[t])?d:o.map(e=>J(e,t));return l||(l=new Map,q.set(s,l)),f!==d&&l.set(t,{...u,[c]:new WeakRef(f)}),i||(i=new Map,r.views.set(t,i)),i.set(n,f),f}function Z(e){let r=(0,h.c)(15),i=p(e.environmentId,t),a=p(e.environmentId,n),o;r[0]!==a||r[1]!==i||r[2]!==e.environmentId||r[3]!==e.terminal?(o=e.environmentId!==null&&e.terminal!==null?a?U.attach({environmentId:e.environmentId,input:e.terminal}):i?U.observe({environmentId:e.environmentId,input:{threadId:e.terminal.threadId,terminalId:e.terminal.terminalId}}):null:null,r[0]=a,r[1]=i,r[2]=e.environmentId,r[3]=e.terminal,r[4]=o):o=r[4];let s=m(o),c;r[5]!==i||r[6]!==e.environmentId?(c=e.environmentId===null||!i?null:U.metadata({environmentId:e.environmentId,input:null}),r[5]=i,r[6]=e.environmentId,r[7]=c):c=r[7];let l=m(c),u;bb0:{if(e.environmentId===null||e.terminal===null){u=P;break bb0}let t;r[8]!==s.data||r[9]!==e.terminal||r[10]!==l.data?(t=z((l.data===null?null:Y(l.data).byThreadId.get(e.terminal.threadId)?.find(t=>t.terminalId===e.terminal?.terminalId))??null,s.data??N),r[8]=s.data,r[9]=e.terminal,r[10]=l.data,r[11]=t):t=r[11];let n=t,i;r[12]!==s.error||r[13]!==n?(i=s.error===null?n:{...n,error:s.error,status:`error`},r[12]=s.error,r[13]=n,r[14]=i):i=r[14],u=i}return u}function Q(e){let n=(0,h.c)(8),r=p(e.environmentId,t),i;n[0]!==r||n[1]!==e.environmentId?(i=e.environmentId===null||!r?null:U.metadata({environmentId:e.environmentId,input:null}),n[0]=r,n[1]=e.environmentId,n[2]=i):i=n[2];let a=m(i),o;return n[3]!==e.environmentId||n[4]!==e.threadId||n[5]!==a.data||n[6]!==a.error?(o=a.data===null||a.error!==null?null:X(a.data,e.environmentId,e.threadId),n[3]=e.environmentId,n[4]=e.threadId,n[5]=a.data,n[6]=a.error,n[7]=o):o=n[7],o}function $(e){let t=(0,h.c)(4),n=Q(e),r;t[0]===n?r=t[1]:(r=n??[],t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=M(r),t[2]=r,t[3]=i),i}export{g as a,U as i,Q as n,j as o,$ as r,Z as t};
2
+ //# sourceMappingURL=terminalSessions-C0i8FMIw.js.map
@@ -1,2 +1,2 @@
1
- import{$y as e,Eh as t,Jh as n,Ky as r,Py as i,Ry as a,Sh as o,Xh as s,fb as c,ph as l,vy as u,xy as d,yb as f,yy as p,zS as m}from"./utils-BEVyjoxo.js";import{pn as h}from"./runtime-Bni_zt6P.js";function g(e,t){try{let n=new URL(e).pathname,r=n.indexOf(t);return r>0&&/^\d+(?:\/|$)/u.test(n.slice(r+t.length))}catch{return!1}}function _(e){return e}function v(e,t){if(t.authority===void 0)return!0;try{let n=new URL(e.locator.remoteUrl);if(n.protocol===`http:`||n.protocol===`https:`)return n.host.toLowerCase()===t.authority}catch{}return!0}function y(e,t,r){if(!v(t,r))return!1;let i=n(t,e);return i===r.host.toLowerCase()||i===r.authority}function b(e){return e.displayName??(e.owner&&e.name?`${e.owner}/${e.name}`:null)}function x(e,t,n){let r=b(t);return r!==null&&r.toLowerCase()===n.repository.toLowerCase()&&y(e,t,n)}var S={kind:s.make(`unknown`),label:`source control`,pickerLabel:`source control`,icon:`change-request`,changeRequest:{shortLabel:`change request`,singular:`change request`},repositoryPathHint:`URL`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:()=>null,changeRequestActions:new Set,checkoutCommand:()=>null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(s.make(`unknown`),e,t),canReadChangeRequestOnHost:(e,t)=>y(s.make(`unknown`),e,t),isChangeRequestUrl:()=>!1};function ee(e){let t=new Map;for(let n of e){if(t.has(n.kind))throw Error(`Source control host '${n.kind}' is defined more than once.`);t.set(n.kind,n)}return{definitions:e,get:n=>(n==null?e[0]:t.get(n))??S,find:e=>t.get(e),findByPublicHost:t=>{let n=t.toLowerCase();return e.find(e=>e.publicHost===n)},findByChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t)),hostLabelForChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t))?.label??`the host`}}function te(t,n){let r=e(t),i=r(n??{});if(i._tag===`Some`)return i.value;let a=r({});if(a._tag===`Some`)return a.value;throw Error(`A source control host settings schema must decode an empty object.`)}var ne=/^az\s+repos\s+pr\s+checkout\s+(.+)$/i,re=/^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;function ie(e){let t=e.trim().split(/\s+/).filter(Boolean);for(let[e,n]of t.entries()){if(n===`--id`||n===`-i`)return t[e+1]??null;if(n.startsWith(`--id=`))return n.slice(5)||null}return t.find(e=>!e.startsWith(`-`))??null}var C=_({kind:s.make(`azure-devops`),label:`Azure DevOps`,pickerLabel:`Azure DevOps`,icon:`azure-devops`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`project/repository`,publicHost:null,publishDescription:`dev.azure.com`,publishHost:()=>`dev.azure.com`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${h(`${e}/${t}`.toLowerCase())}/pullrequest/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`az repos pr checkout --id ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>{let t=ne.exec(e)?.[1];return t?ie(t):null},isChangeRequestReference:e=>re.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>v(e,t)&&h(e.canonicalKey.toLowerCase())===h(`${t.host}/${t.repository}`.toLowerCase()),canReadChangeRequestOnHost:()=>!1,isChangeRequestUrl:e=>g(e,`/pullrequest/`)}),w=/^[A-Za-z0-9._/@+=,-]+$/,T=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/,E=s.make(`bitbucket`),D=e=>p.pipe(f(m(``)),r(e)),O=o({accessToken:D({title:`Access token`,description:`Scoped to one repository, project, or workspace. Create it in that item's Bitbucket settings.`,settingsSecret:!0,providerSettingsForm:{control:`password`}}),email:D({title:`Atlassian account email`,description:`With an API token instead of an access token.`,providerSettingsForm:{placeholder:`you@example.com`}}),apiToken:D({title:`API token`,description:`Reaches every repository your Atlassian account can. Give it read and write access to repositories and pull requests, and read:user:bitbucket.`,settingsSecret:!0,providerSettingsForm:{control:`password`}})},{order:[`accessToken`,`email`,`apiToken`]}),ae=_({kind:E,label:`Bitbucket`,pickerLabel:`Bitbucket`,icon:`bitbucket`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`workspace/repository`,publicHost:`bitbucket.org`,publishDescription:`bitbucket.org`,publishHost:()=>`bitbucket.org`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull-requests/${n}`,changeRequestActions:new Set([`merge`,`close`]),checkoutCommand:({number:e,headBranch:t,headRepositoryNameWithOwner:n})=>n&&T.test(n)&&w.test(t)?`git clone --single-branch --branch ${t} https://bitbucket.org/${n}.git t3code-pr-${e}`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(E,e,t),canReadChangeRequestOnHost:(e,t)=>y(E,e,t),isChangeRequestUrl:e=>g(e,`/pull-requests/`),settings:O}),k=/^tea\s+(?:pr|pulls)\s+checkout\s+(.+)$/i,A=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+[^/\s]+\/pulls\/(\d+)(?:[/?#].*)?$/i,j=s.make(`forgejo`);function M(e){if(!e.webUrl)return null;try{let t=new URL(e.webUrl);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}var N=_({kind:j,label:`Forgejo`,pickerLabel:`Forgejo / Gitea`,icon:`forgejo`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n,remoteUrl:r,webUrl:i})=>{if(i)return`${i.replace(/\/+$/,``)}/pulls/${n}`;try{let i=new URL(r??``);if((i.protocol===`http:`||i.protocol===`https:`)&&(i.hostname.toLowerCase()===e.toLowerCase()||i.host.toLowerCase()===e.toLowerCase()))return`${i.origin}/${t}/pulls/${n}`}catch{}return`https://${e}/${t}/pulls/${n}`},changeRequestActions:new Set([`merge`,`close`,`reopen`,`update-branch`]),checkoutCommand:({number:e,repositoryUrl:t})=>t?`git fetch '${t.replaceAll(`'`,`'\\''`)}' refs/pull/${e}/head && git checkout -B pulls/${e} FETCH_HEAD`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:e=>e===`request-changes`,checkoutCommandArgument:e=>k.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>A.test(e),changeRequestUrlHost:e=>e.host,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>{if(!v(e,t))return!1;let n=M(e);return n?n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&n.pathname.replace(/^\/+|\/+$/g,``).toLowerCase()===t.repository.toLowerCase():x(j,e,t)},canReadChangeRequestOnHost:(e,t)=>{let n=M(e);if(!n)return y(j,e,t);let r=n.pathname.replace(/^\/+|\/+$/g,``).split(`/`).slice(0,-2).join(`/`);return n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&(!r||t.repository.toLowerCase().startsWith(`${r.toLowerCase()}/`))},isChangeRequestUrl:e=>g(e,`/pulls/`)}),P=new Set([`git.cafe`,`staging.git.cafe`]),F=s.make(`gitcafe`),I=o({token:p.pipe(t,f(m(``)),r({title:`Token`,description:`A git.cafe token, used before CAFE_TOKEN and the cafe login, so GitCafe works without the CLI signed in.`,providerSettingsForm:{control:`password`}}))}),L=_({kind:F,label:`GitCafe`,pickerLabel:`GitCafe`,icon:`gitcafe`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`git.cafe`,publishHost:()=>`git.cafe`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pulls/${n}`,changeRequestActions:new Set([`ready`,`draft`,`close`,`reopen`,`merge`,`update-branch`]),checkoutCommand:({number:e})=>`cafe pr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(F,e,t),canReadChangeRequestOnHost:(e,t)=>y(F,e,t),isChangeRequestUrl:e=>{try{return P.has(new URL(e).hostname.toLowerCase())&&g(e,`/pulls/`)}catch{return!1}},settings:I}),R=/^gh\s+pr\s+checkout\s+(.+)$/i,z=/^https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i,B=s.make(`github`),V=a({account:c(u),enabled:d.pipe(f(m(!0)))}),H=o({hosts:i(l,V).pipe(f(m({})),r({providerSettingsForm:{hidden:!0}})),tokens:i(l,p).pipe(f(m({})),t,r({providerSettingsForm:{hidden:!0}}))}),U=_({kind:B,label:`GitHub`,pickerLabel:`GitHub`,icon:`github`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:`github.com`,publishDescription:`github.com`,publishHost:()=>`github.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`delete-branch`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`,`revert`,`approve-workflows`]),checkoutCommand:({number:e})=>`gh pr checkout ${e}`,authorProfileUrl:(e,t)=>e.endsWith(`[bot]`)?null:new URL(`/${encodeURIComponent(e)}`,t).toString(),referenceAutolinkRepositoryUrl:e=>e,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>R.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>z.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:e=>n(e,B),isChangeRequestInRepository:(e,t)=>x(B,e,t),canReadChangeRequestOnHost:(e,t)=>y(B,e,t),isChangeRequestUrl:e=>g(e,`/pull/`),settings:H}),W=/^glab\s+mr\s+checkout\s+(.+)$/i,G=/^https:\/\/[^/\s]*gitlab[^/\s]*\/.+\/-\/merge_requests\/(\d+)(?:[/?#].*)?$/i,K=s.make(`gitlab`),q=ee([U,_({kind:K,label:`GitLab`,pickerLabel:`GitLab`,icon:`gitlab`,changeRequest:{shortLabel:`MR`,singular:`merge request`},repositoryPathHint:`group/project`,publicHost:`gitlab.com`,publishDescription:`gitlab.com`,publishHost:()=>`gitlab.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/-/merge_requests/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`glab mr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>W.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>G.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(K,e,t),canReadChangeRequestOnHost:(e,t)=>y(K,e,t),isChangeRequestUrl:e=>g(e,`/-/merge_requests/`)}),L,N,ae,C]);function oe(e){return te(H,e.sourceControlHosts.github)}function J(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function Y(...e){for(let t of e){let e=J(t??void 0);if(e!==null)return e}return null}function se(e){if(e.latestUserMessageAt){let t=J(e.latestUserMessageAt);if(t!==null)return t}let t=null;for(let n of e.messages??[]){if(n.role!==`user`)continue;let e=J(n.createdAt);e!==null&&(t=t===null?e:Math.max(t,e))}return t===null?Y(e.updatedAt,e.createdAt)??-1/0:t}function X(e,t){return t===`created_at`?Y(e.createdAt,e.updatedAt)??-1/0:se(e)}function ce(e,t){return e.length<2?[...e]:e.map(e=>({thread:e,timestamp:X(e,t)})).sort((e,t)=>t.timestamp-e.timestamp||(e.thread.id<t.thread.id?1:e.thread.id>t.thread.id?-1:0)).map(({thread:e})=>e)}function le(e,t,n){let r=null,i=-1/0;for(let a of e){if(a.projectId!==t||a.archivedAt!==null)continue;let e=X(a,n);(r===null||e>i||e===i&&a.id>r.id)&&(r=a,i=e)}return r}var Z=`abcdefghijklmnopqrstuvwxyz`;function Q(e){if(e.length===0)return!1;for(let t of e)if(!Z.includes(t))return!1;return e.at(-1)!==Z[0]}function $(e,t){if(t!==``&&e>=t)throw Error(`pinOrderMidpoint: bounds out of order`);if(t!==``){let n=0;for(;(e.charAt(n)||Z[0])===t.charAt(n);)n+=1;if(n>0)return t.slice(0,n)+$(e.slice(n),t.slice(n))}let n=e===``?0:Z.indexOf(e.charAt(0)),r=t===``?26:Z.indexOf(t.charAt(0));return r-n>1?Z.charAt(Math.round((n+r)/2)):t.length>1?t.charAt(0):Z.charAt(n)+$(e.slice(1),``)}function ue(e,t){let n=e??``,r=t??``;return n!==``&&!Q(n)||r!==``&&!Q(r)||r!==``&&n>=r?null:$(n,r)}function de(e){if(e.length<2)return[...e];let t=[],n=[];for(let r of e)(r.pinOrderKey==null?n:t).push(r);let r=(e,t)=>e.id.localeCompare(t.id)||(e.environmentId??``).localeCompare(t.environmentId??``);t.sort((e,t)=>{let n=e.pinOrderKey,i=t.pinOrderKey;return n<i?-1:n>i?1:r(e,t)});let i=new Map(n.map(e=>[e,J(e.createdAt)??0]));return n.sort((e,t)=>i.get(t)-i.get(e)||r(e,t)),[...t,...n]}export{ce as a,q as c,de as i,S as l,X as n,J as o,ue as r,oe as s,le as t};
2
- //# sourceMappingURL=threadSort-C5oCCRfj.js.map
1
+ import{$y as e,Eh as t,Jh as n,Ky as r,Py as i,Ry as a,Sh as o,Xh as s,fb as c,ph as l,vy as u,xy as d,yb as f,yy as p,zS as m}from"./utils-BEVyjoxo.js";import{pn as h}from"./runtime-C2Cbg6bw.js";function g(e,t){try{let n=new URL(e).pathname,r=n.indexOf(t);return r>0&&/^\d+(?:\/|$)/u.test(n.slice(r+t.length))}catch{return!1}}function _(e){return e}function v(e,t){if(t.authority===void 0)return!0;try{let n=new URL(e.locator.remoteUrl);if(n.protocol===`http:`||n.protocol===`https:`)return n.host.toLowerCase()===t.authority}catch{}return!0}function y(e,t,r){if(!v(t,r))return!1;let i=n(t,e);return i===r.host.toLowerCase()||i===r.authority}function b(e){return e.displayName??(e.owner&&e.name?`${e.owner}/${e.name}`:null)}function x(e,t,n){let r=b(t);return r!==null&&r.toLowerCase()===n.repository.toLowerCase()&&y(e,t,n)}var S={kind:s.make(`unknown`),label:`source control`,pickerLabel:`source control`,icon:`change-request`,changeRequest:{shortLabel:`change request`,singular:`change request`},repositoryPathHint:`URL`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:()=>null,changeRequestActions:new Set,checkoutCommand:()=>null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(s.make(`unknown`),e,t),canReadChangeRequestOnHost:(e,t)=>y(s.make(`unknown`),e,t),isChangeRequestUrl:()=>!1};function ee(e){let t=new Map;for(let n of e){if(t.has(n.kind))throw Error(`Source control host '${n.kind}' is defined more than once.`);t.set(n.kind,n)}return{definitions:e,get:n=>(n==null?e[0]:t.get(n))??S,find:e=>t.get(e),findByPublicHost:t=>{let n=t.toLowerCase();return e.find(e=>e.publicHost===n)},findByChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t)),hostLabelForChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t))?.label??`the host`}}function te(t,n){let r=e(t),i=r(n??{});if(i._tag===`Some`)return i.value;let a=r({});if(a._tag===`Some`)return a.value;throw Error(`A source control host settings schema must decode an empty object.`)}var ne=/^az\s+repos\s+pr\s+checkout\s+(.+)$/i,re=/^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;function ie(e){let t=e.trim().split(/\s+/).filter(Boolean);for(let[e,n]of t.entries()){if(n===`--id`||n===`-i`)return t[e+1]??null;if(n.startsWith(`--id=`))return n.slice(5)||null}return t.find(e=>!e.startsWith(`-`))??null}var C=_({kind:s.make(`azure-devops`),label:`Azure DevOps`,pickerLabel:`Azure DevOps`,icon:`azure-devops`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`project/repository`,publicHost:null,publishDescription:`dev.azure.com`,publishHost:()=>`dev.azure.com`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${h(`${e}/${t}`.toLowerCase())}/pullrequest/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`az repos pr checkout --id ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>{let t=ne.exec(e)?.[1];return t?ie(t):null},isChangeRequestReference:e=>re.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>v(e,t)&&h(e.canonicalKey.toLowerCase())===h(`${t.host}/${t.repository}`.toLowerCase()),canReadChangeRequestOnHost:()=>!1,isChangeRequestUrl:e=>g(e,`/pullrequest/`)}),w=/^[A-Za-z0-9._/@+=,-]+$/,T=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/,E=s.make(`bitbucket`),D=e=>p.pipe(f(m(``)),r(e)),O=o({accessToken:D({title:`Access token`,description:`Scoped to one repository, project, or workspace. Create it in that item's Bitbucket settings.`,settingsSecret:!0,providerSettingsForm:{control:`password`}}),email:D({title:`Atlassian account email`,description:`With an API token instead of an access token.`,providerSettingsForm:{placeholder:`you@example.com`}}),apiToken:D({title:`API token`,description:`Reaches every repository your Atlassian account can. Give it read and write access to repositories and pull requests, and read:user:bitbucket.`,settingsSecret:!0,providerSettingsForm:{control:`password`}})},{order:[`accessToken`,`email`,`apiToken`]}),ae=_({kind:E,label:`Bitbucket`,pickerLabel:`Bitbucket`,icon:`bitbucket`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`workspace/repository`,publicHost:`bitbucket.org`,publishDescription:`bitbucket.org`,publishHost:()=>`bitbucket.org`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull-requests/${n}`,changeRequestActions:new Set([`merge`,`close`]),checkoutCommand:({number:e,headBranch:t,headRepositoryNameWithOwner:n})=>n&&T.test(n)&&w.test(t)?`git clone --single-branch --branch ${t} https://bitbucket.org/${n}.git t3code-pr-${e}`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(E,e,t),canReadChangeRequestOnHost:(e,t)=>y(E,e,t),isChangeRequestUrl:e=>g(e,`/pull-requests/`),settings:O}),k=/^tea\s+(?:pr|pulls)\s+checkout\s+(.+)$/i,A=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+[^/\s]+\/pulls\/(\d+)(?:[/?#].*)?$/i,j=s.make(`forgejo`);function M(e){if(!e.webUrl)return null;try{let t=new URL(e.webUrl);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}var N=_({kind:j,label:`Forgejo`,pickerLabel:`Forgejo / Gitea`,icon:`forgejo`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n,remoteUrl:r,webUrl:i})=>{if(i)return`${i.replace(/\/+$/,``)}/pulls/${n}`;try{let i=new URL(r??``);if((i.protocol===`http:`||i.protocol===`https:`)&&(i.hostname.toLowerCase()===e.toLowerCase()||i.host.toLowerCase()===e.toLowerCase()))return`${i.origin}/${t}/pulls/${n}`}catch{}return`https://${e}/${t}/pulls/${n}`},changeRequestActions:new Set([`merge`,`close`,`reopen`,`update-branch`]),checkoutCommand:({number:e,repositoryUrl:t})=>t?`git fetch '${t.replaceAll(`'`,`'\\''`)}' refs/pull/${e}/head && git checkout -B pulls/${e} FETCH_HEAD`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:e=>e===`request-changes`,checkoutCommandArgument:e=>k.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>A.test(e),changeRequestUrlHost:e=>e.host,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>{if(!v(e,t))return!1;let n=M(e);return n?n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&n.pathname.replace(/^\/+|\/+$/g,``).toLowerCase()===t.repository.toLowerCase():x(j,e,t)},canReadChangeRequestOnHost:(e,t)=>{let n=M(e);if(!n)return y(j,e,t);let r=n.pathname.replace(/^\/+|\/+$/g,``).split(`/`).slice(0,-2).join(`/`);return n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&(!r||t.repository.toLowerCase().startsWith(`${r.toLowerCase()}/`))},isChangeRequestUrl:e=>g(e,`/pulls/`)}),P=new Set([`git.cafe`,`staging.git.cafe`]),F=s.make(`gitcafe`),I=o({token:p.pipe(t,f(m(``)),r({title:`Token`,description:`A git.cafe token, used before CAFE_TOKEN and the cafe login, so GitCafe works without the CLI signed in.`,providerSettingsForm:{control:`password`}}))}),L=_({kind:F,label:`GitCafe`,pickerLabel:`GitCafe`,icon:`gitcafe`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`git.cafe`,publishHost:()=>`git.cafe`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pulls/${n}`,changeRequestActions:new Set([`ready`,`draft`,`close`,`reopen`,`merge`,`update-branch`]),checkoutCommand:({number:e})=>`cafe pr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(F,e,t),canReadChangeRequestOnHost:(e,t)=>y(F,e,t),isChangeRequestUrl:e=>{try{return P.has(new URL(e).hostname.toLowerCase())&&g(e,`/pulls/`)}catch{return!1}},settings:I}),R=/^gh\s+pr\s+checkout\s+(.+)$/i,z=/^https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i,B=s.make(`github`),V=a({account:c(u),enabled:d.pipe(f(m(!0)))}),H=o({hosts:i(l,V).pipe(f(m({})),r({providerSettingsForm:{hidden:!0}})),tokens:i(l,p).pipe(f(m({})),t,r({providerSettingsForm:{hidden:!0}}))}),U=_({kind:B,label:`GitHub`,pickerLabel:`GitHub`,icon:`github`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:`github.com`,publishDescription:`github.com`,publishHost:()=>`github.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`delete-branch`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`,`revert`,`approve-workflows`]),checkoutCommand:({number:e})=>`gh pr checkout ${e}`,authorProfileUrl:(e,t)=>e.endsWith(`[bot]`)?null:new URL(`/${encodeURIComponent(e)}`,t).toString(),referenceAutolinkRepositoryUrl:e=>e,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>R.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>z.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:e=>n(e,B),isChangeRequestInRepository:(e,t)=>x(B,e,t),canReadChangeRequestOnHost:(e,t)=>y(B,e,t),isChangeRequestUrl:e=>g(e,`/pull/`),settings:H}),W=/^glab\s+mr\s+checkout\s+(.+)$/i,G=/^https:\/\/[^/\s]*gitlab[^/\s]*\/.+\/-\/merge_requests\/(\d+)(?:[/?#].*)?$/i,K=s.make(`gitlab`),q=ee([U,_({kind:K,label:`GitLab`,pickerLabel:`GitLab`,icon:`gitlab`,changeRequest:{shortLabel:`MR`,singular:`merge request`},repositoryPathHint:`group/project`,publicHost:`gitlab.com`,publishDescription:`gitlab.com`,publishHost:()=>`gitlab.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/-/merge_requests/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`glab mr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>W.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>G.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(K,e,t),canReadChangeRequestOnHost:(e,t)=>y(K,e,t),isChangeRequestUrl:e=>g(e,`/-/merge_requests/`)}),L,N,ae,C]);function oe(e){return te(H,e.sourceControlHosts.github)}function J(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function Y(...e){for(let t of e){let e=J(t??void 0);if(e!==null)return e}return null}function se(e){if(e.latestUserMessageAt){let t=J(e.latestUserMessageAt);if(t!==null)return t}let t=null;for(let n of e.messages??[]){if(n.role!==`user`)continue;let e=J(n.createdAt);e!==null&&(t=t===null?e:Math.max(t,e))}return t===null?Y(e.updatedAt,e.createdAt)??-1/0:t}function X(e,t){return t===`created_at`?Y(e.createdAt,e.updatedAt)??-1/0:se(e)}function ce(e,t){return e.length<2?[...e]:e.map(e=>({thread:e,timestamp:X(e,t)})).sort((e,t)=>t.timestamp-e.timestamp||(e.thread.id<t.thread.id?1:e.thread.id>t.thread.id?-1:0)).map(({thread:e})=>e)}function le(e,t,n){let r=null,i=-1/0;for(let a of e){if(a.projectId!==t||a.archivedAt!==null)continue;let e=X(a,n);(r===null||e>i||e===i&&a.id>r.id)&&(r=a,i=e)}return r}var Z=`abcdefghijklmnopqrstuvwxyz`;function Q(e){if(e.length===0)return!1;for(let t of e)if(!Z.includes(t))return!1;return e.at(-1)!==Z[0]}function $(e,t){if(t!==``&&e>=t)throw Error(`pinOrderMidpoint: bounds out of order`);if(t!==``){let n=0;for(;(e.charAt(n)||Z[0])===t.charAt(n);)n+=1;if(n>0)return t.slice(0,n)+$(e.slice(n),t.slice(n))}let n=e===``?0:Z.indexOf(e.charAt(0)),r=t===``?26:Z.indexOf(t.charAt(0));return r-n>1?Z.charAt(Math.round((n+r)/2)):t.length>1?t.charAt(0):Z.charAt(n)+$(e.slice(1),``)}function ue(e,t){let n=e??``,r=t??``;return n!==``&&!Q(n)||r!==``&&!Q(r)||r!==``&&n>=r?null:$(n,r)}function de(e){if(e.length<2)return[...e];let t=[],n=[];for(let r of e)(r.pinOrderKey==null?n:t).push(r);let r=(e,t)=>e.id.localeCompare(t.id)||(e.environmentId??``).localeCompare(t.environmentId??``);t.sort((e,t)=>{let n=e.pinOrderKey,i=t.pinOrderKey;return n<i?-1:n>i?1:r(e,t)});let i=new Map(n.map(e=>[e,J(e.createdAt)??0]));return n.sort((e,t)=>i.get(t)-i.get(e)||r(e,t)),[...t,...n]}export{ce as a,q as c,de as i,S as l,X as n,J as o,ue as r,oe as s,le as t};
2
+ //# sourceMappingURL=threadSort-urWEkJav.js.map
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-oBChb5qS.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-B6TRgw4-.js";import{t as f}from"./arc-DgcGdgmL.js";import{p}from"./chunk-75Z2AOVW-BaYdZ0Fq.js";import{f as m}from"./mermaid.core-BcICv5EB.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-oBChb5qS.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-CxOE2RJx.js";import{t as f}from"./arc-DgcGdgmL.js";import{p}from"./chunk-75Z2AOVW-ByRA_PDR.js";import{f as m}from"./mermaid.core-Bt6Qv84k.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -118,4 +118,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
118
118
  filter: brightness(120%);
119
119
  }
120
120
  `},`getStyles`)};export{Se as diagram};
121
- //# sourceMappingURL=timeline-definition-24CTP7MA-89AJY6KO.js.map
121
+ //# sourceMappingURL=timeline-definition-24CTP7MA-gsy_kdrp.js.map
@@ -1,2 +1,2 @@
1
- import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{$i as r,Ap as i,Bi as a,By as o,Cd as s,Cm as c,Co as l,Cy as u,D as d,Ea as f,Em as p,Eo as m,Fa as h,Ia as g,Ii as _,Iy as v,Ks as y,Md as b,Mf as x,NE as S,Na as C,Or as w,Qi as T,Ra as E,Sa as D,So as ee,Td as te,Ti as O,To as k,Tr as A,Um as j,Uu as M,_o as N,ai as ne,bt as re,ca as P,ga as ie,ia as F,ib as I,jr as ae,ku as oe,lE as se,la as L,lr as ce,ma as R,oa as z,pa as le,ra as ue,sa as de,sl as fe,sr as B,t as V,ta as H,va as pe,vi as me,vo as U,za as he,zi as ge}from"./utils-BEVyjoxo.js";import{jn as _e}from"./runtime-D8mKjOP-.js";import{l as ve}from"./TooltipViewport-BKD6QABG.js";import{t as ye}from"./spinner-CpLstN6u.js";import{t as be}from"./useParams-Cil-ZIwd.js";import{c as xe,f as W,l as Se,u as Ce,y as we}from"./tooltip-Cq9yz15d.js";var Te=I(fe);function Ee(e){return Te(e)&&e.bootstrapThreadDisposition===`deleted`}function De(e){return Te(e)&&e.bootstrapThreadDisposition===`not-created`}var Oe=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the T3 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(_e)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function ke(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Oe.some(e=>e.test(t))}function Ae(e){return ke(e)?null:e??null}var G=e(n()),je=G.createContext(void 0);function Me(){let e=G.useContext(je);if(!e)throw Error(m(73));return e}var Ne=0;function Pe(e){return Ne+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ne}`}function Fe(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function Ie(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Le=e=>e.toastMetadata,K={toasts:O(e=>e.toasts),isEmpty:O(e=>e.toasts.length===0),toast:O(Le,(e,t)=>e.get(t)?.value),toastIndex:O(Le,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:O(Le,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:O(Le,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:O(e=>e.hovering),focused:O(e=>e.focused),expanded:O(e=>e.hovering||e.focused),expandedOrOutOfFocus:O(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:O(e=>e.prevFocusElement)},Re=class extends me{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ie(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Pe(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:Ie(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Fe(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Fe(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Fe(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=le.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=L(e);P(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?le.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:Ie(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=de(H(this.state.viewport));if(!this.state.viewport||!P(this.state.viewport,t)||!z(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),r=K.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(se()),ze=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=k(()=>new Re({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return D(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(je.Provider,{value:a,children:t})},Be=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),Ve=G.forwardRef(function(e,t){let{render:n,className:i,style:a,children:o,...s}=e,c=Me(),l=R(),u=G.useRef(!1),d=G.useRef(!1),f=G.useRef(!1),p=c.useState(`isEmpty`),m=c.useState(`toasts`),h=c.useState(`focused`),g=c.useState(`expanded`),_=c.useState(`prevFocusElement`),v=m[0]?.height??0,y=G.useMemo(()=>m.some(e=>e.transitionStatus===`ending`),[m]),b=G.useMemo(()=>m.filter(e=>e.priority===`high`),[m]);G.useEffect(()=>{let e=c.state.viewport;if(!e)return;function t(t){p||t.key===`F6`&&L(t)!==e&&(t.preventDefault(),c.setPrevFocusElement(de(H(e))),e?.focus({preventScroll:!0}),c.pauseTimers(),c.setFocused(!0))}let n=E(e);return F(n,`keydown`,t)},[c,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=E(e);function n(e){L(e)===t&&(c.setIsWindowFocused(!1),c.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=L(n),i=de(H(e));(r===t||!P(e,r)||!z(i))&&c.resumeTimers(),l.start(0,()=>c.setIsWindowFocused(!0))}return ue(F(t,`blur`,n,!0),F(t,`focus`,r,!0))},[c,l,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=H(e);return F(t,`pointerdown`,c.handleDocumentPointerDown,!0)},[p,c]);function x(e){let t=c.state.viewport;t&&(u.current=!0,e.relatedTarget===t?m[0]?.ref?.current?.focus():c.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&L(e.nativeEvent)===c.state.viewport&&(e.preventDefault(),c.restoreFocusToPrevElement(),c.resumeTimers())}function C(){let e=c.state.toasts.some(e=>e.transitionStatus===`ending`);c.state.isWindowFocused&&!e&&!f.current&&d.current&&(c.resumeTimers(),c.setHovering(!1),d.current=!1)}G.useEffect(C,[y,c]);function w(){c.pauseTimers(),c.setHovering(!0),d.current=!1}function D(){y||f.current?d.current=!0:(c.resumeTimers(),c.setHovering(!1))}function ee(e){e.pointerType===`touch`&&(f.current=!0)}function te(e){e.pointerType===`touch`&&(f.current=!1,C())}function O(){if(u.current){u.current=!1;return}h||z(de(H(c.state.viewport)))&&(c.setFocused(!0),c.pauseTimers())}function k(e){h&&!P(c.state.viewport,e.relatedTarget)&&(c.setFocused(!1),c.resumeTimers())}let A={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:D,onFocus:O,onBlur:k,onKeyDown:S,onClick:O,onPointerDown:ee,onPointerUp:te,onPointerCancel:te},j={expanded:g},M=U(`div`,e,{ref:[t,c.setViewport],state:j,props:[A,{style:{[Be.frontmostHeight]:v?`${v}px`:void 0}},s,{children:(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(T,{onFocus:x}),o,!p&&_&&(0,q.jsx)(T,{onFocus:x})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(T,{onFocus:x}),M,!h&&b.length>0&&(0,q.jsx)(`div`,{style:r,children:b.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),He=e(pe()),Ue=G.createContext(void 0);function J(){let e=G.useContext(Ue);if(!e)throw Error(m(66));return e}var Y=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function We(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ge(e){let t=E(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var Ke={...N,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qe=40,Je=10,X=.5,Ye=1,Xe=`${_},${ge}`,Ze=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=Me(),[f,p]=G.useState(void 0),[m,_]=G.useState(!1),[v,y]=G.useState(!1),[b,x]=G.useState(!1),[S,C]=G.useState({x:0,y:0}),[w,T]=G.useState({x:0,y:0,scale:1}),[E,D]=G.useState(),[ee,te]=G.useState(),[O,k]=G.useState(null),A=G.useRef(null),j=G.useRef({x:0,y:0}),M=G.useRef({x:0,y:0,scale:1}),N=G.useRef(void 0),ne=G.useRef(0),re=G.useRef(!1),I=G.useRef({x:0,y:0}),oe=G.useRef(!1),se=G.useRef({x:0,y:0}),ce=G.useRef(null),R=G.useRef(null),z=d.useState(`toastIndex`,n.id),le=d.useState(`toastVisibleIndex`,n.id),ue=d.useState(`toastOffsetY`,n.id),fe=d.useState(`focused`),B=d.useState(`expanded`);ie({open:n.transitionStatus!==`ending`,ref:A,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let V=g((e=!1)=>{let t=A.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:A,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?He.flushSync(a):a()});h(V,[V]);function pe(e){se.current=e,C(e)}h(()=>()=>{R.current?.abort()},[]);function me(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let he=g(e=>{if(e.pointerId!==ce.current)return;ce.current=null,R.current?.abort(),R.current=null,_(!1),y(!1),k(null);let t=M.current;if(e.type===`pointercancel`||re.current){pe({x:t.x,y:t.y}),p(void 0);return}let r=!1,i=se.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>qe&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>qe&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(p(s),x(!0),d.closeToast(n.id)):(pe({x:t.x,y:t.y}),p(void 0))});function ge(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=L(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${Xe}`))return;if(re.current=!1,N.current=void 0,ne.current=0,ce.current=e.pointerId,j.current={x:e.clientX,y:e.clientY},I.current=j.current,A.current){let e=Ge(A.current);M.current=e,T(e),pe({x:e.x,y:e.y})}d.setHovering(!0),_(!0),y(!1),k(null),oe.current=!0;let n=A.current;if(n){R.current?.abort();let t=new AbortController;R.current=t;let r=H(n);r.addEventListener(`pointerup`,he,{signal:t.signal}),r.addEventListener(`pointercancel`,he,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function _e(e){if(e.pointerId!==ce.current)return;e.preventDefault(),oe.current&&=(j.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>I.current.y||i>0&&t<I.current.y)&&(I.current={x:I.current.x,y:t}),(r<0&&n>I.current.x||r>0&&n<I.current.x)&&(I.current={x:n,y:I.current.y});let a=n-j.current.x,o=t-j.current.y,s=t-I.current.y,c=n-I.current.x;if(!v&&Math.sqrt(a*a+o*o)>=Ye&&(y(!0),O===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&k(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!N.current)O===`vertical`?o>0?u=`down`:o<0&&(u=`up`):O===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&l.includes(u)&&(N.current=u,ne.current=We(u,a,o),p(u));else{let e=N.current,t=We(e,c,s);t>qe?(re.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&ne.current-t>=Je&&(re.current=!0)}let d=me(a,o),f=M.current.x,m=M.current.y;O===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(O===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(m+=d.y)),pe({x:f,y:m})}function ve(e){if(e.key===`Escape`){if(!A.current||!P(A.current,de(H(A.current))))return;d.closeToast(n.id)}}G.useEffect(()=>{if(!u)return;let e=A.current;if(!e)return;function t(t){P(e,L(t))&&t.preventDefault()}return F(e,`touchmove`,t,{passive:!1})},[u]);function ye(){if(!m&&S.x===w.x&&S.y===w.y&&!b)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:m?`none`:void 0,transform:m?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let be=n.priority===`high`,xe={role:be?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":ee,"aria-hidden":be&&!fe?!0:void 0,onPointerDown:u?ge:void 0,onPointerMove:u?_e:void 0,onPointerUp:u?he:void 0,onPointerCancel:u?he:void 0,onKeyDown:ve,inert:ae(n.limited),style:{...ye(),[Y.index]:n.transitionStatus===`ending`?z:le,[Y.offsetY]:`${ue}px`,[Y.height]:n.height?`${n.height}px`:void 0}},W=G.useMemo(()=>({rootRef:A,toast:n,titleId:E,setTitleId:D,descriptionId:ee,setDescriptionId:te,swiping:m,swipeDirection:f,recalculateHeight:V,index:z,visibleIndex:le,expanded:B}),[n,E,ee,m,f,V,z,le,B]),Se={transitionStatus:n.transitionStatus,expanded:B,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Ce=U(`div`,e,{ref:[t,W.rootRef],state:Se,stateAttributesMapping:Ke,props:[xe,s]});return(0,q.jsx)(Ue.Provider,{value:W,children:Ce})}),Qe=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=J(),l=G.useRef(null);return h(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),U(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),$e=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=J(),u=o??c.description,d=!!u,p=f(a);h(()=>{if(d)return l(p),()=>{l(void 0)}},[d,p,l]);let m={type:c.type},g=U(`p`,e,{ref:t,state:m,props:{...s,id:p,children:u}});return d?g:null}),et=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=J(),u=o??c.title,d=!!u,p=f(a);h(()=>{if(d)return l(p),()=>{l(void 0)}},[d,p,l]);let m={type:c.type},g=U(`h2`,e,{ref:t,state:m,props:{...s,id:p,children:u}});return d?g:null}),tt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Me(),{toast:l}=J(),u=c.useState(`expanded`),[d,f]=G.useState(!1),{getButtonProps:p,buttonRef:m}=C({disabled:a,native:o}),h={type:l.type};return U(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),nt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=J(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=C({disabled:a,native:o}),p={type:c.type},m=U(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),rt=ve,it=G.createContext(void 0);function at(){let e=G.useContext(it);if(e===void 0)throw Error(m(84));return e}var ot=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=Me(),o=n.positionerProps??ee,{render:s,className:c,anchor:u=o.anchor,positionMethod:d=o.positionMethod??`absolute`,side:f=o.side??`top`,align:p=o.align??`center`,sideOffset:m=o.sideOffset??0,alignOffset:h=o.alignOffset??0,collisionBoundary:g=o.collisionBoundary??`clipping-ancestors`,collisionPadding:_=o.collisionPadding??5,arrowPadding:v=o.arrowPadding??5,sticky:y=o.sticky??!1,disableAnchorTracking:b=o.disableAnchorTracking??!1,collisionAvoidance:x=o.collisionAvoidance??a,style:S,...C}=r,[T,E]=G.useState(null),D=i.useState(`toastIndex`,n.id),te=i.useState(`toastVisibleIndex`,n.id),O=he(u)?u:null,k=ne({open:!0,onOpenChange:l,elements:{floating:T,reference:O}}),j=w({anchor:O,positionMethod:d,floatingRootContext:k,mounted:!0,side:f,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),M=G.useMemo(()=>({side:j.side,align:j.align,anchorHidden:j.anchorHidden}),[j.side,j.align,j.anchorHidden]),N=A(e,M,{styles:{...j.positionerStyles,[Y.index]:n.transitionStatus===`ending`?D:te},transitionStatus:n.transitionStatus,props:C,refs:[t,E]});return(0,q.jsx)(it.Provider,{value:j,children:N})}),st=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=at();return U(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ct(){let e=G.useContext(je);if(!e)throw Error(m(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function lt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Pe(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var ut=t({Action:()=>nt,Arrow:()=>st,Close:()=>tt,Content:()=>Qe,Description:()=>$e,Portal:()=>rt,Positioner:()=>ot,Provider:()=>ze,Root:()=>Ze,Title:()=>et,Viewport:()=>Ve,createToastManager:()=>lt,useToastManager:()=>ct});function dt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var Z=dt(),Q=S(),ft={archive:M,clock:b,pin:i,trash:c};function pt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(mt,t),null}function mt(){let e=!0,t=new Set,n=()=>{let n=Z.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?ft[r.icon]:null,i=r.actions??[],a=i.find(gt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{Z.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&Z.getSnapshot().includes(r)&&Z.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},secondaryActionVariant:`soft`,hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=Z.subscribe(n),i=ht;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),Z.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function ht(){return Z.setPaused(`web-hidden`,document.hidden)}function gt(e){return e.primary}var _t=class extends o()(`ClipboardApiUnavailableError`,{target:v}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},vt=class extends o()(`ClipboardWriteError`,{target:v,cause:u()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},yt=class extends o()(`ClipboardReadUnavailableError`,{target:v}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},bt=class extends o()(`ClipboardReadError`,{target:v,cause:u()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function xt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function St(e,t=`text`,n){if(typeof window>`u`)throw new _t({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[oe];if(r&&(n={...n,"text/html":re(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(xt(e,n))return!0;throw new _t({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new vt({target:t,cause:e})}}async function Ct(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new yt({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new bt({target:e,cause:t})}}function wt({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{St(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Tt(e){return e===`live`}function Et(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Dt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Ot(e){return{draftId:e}}function kt(e){return!e.environmentId||!e.threadId?null:y(e.environmentId,e.threadId)}function At(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:y(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function jt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Mt(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Nt(e,t){return t<=1?!1:e>0}function Pt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=Ft(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:Ft(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function Ft(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function It(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var $=lt(),Lt=lt(),Rt=new Map,zt={error:s,info:x,loading:ye,success:te,warning:p},Bt=180;function Vt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Bt))return`line-clamp-4`}var Ht=`absolute z-20 -top-1.5 -right-1.5`,Ut=V(`inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-popover/92 text-muted-foreground shadow-sm outline-none backdrop-blur-sm`,`transition-[color,background-color,box-shadow] hover:bg-popover hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`);function Wt(e,t,n){n?.(),e.close(t)}function Gt(e){let t=(0,Q.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=wt(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=V(`size-3`,c),t[4]=c,t[5]=l);let u=a?Se:we,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(xe,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(B,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Kt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function qt(e){let t=(0,Q.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Jt),t[0]=c):c=t[0];let l=i?W:Ce,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(xe,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Kt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Jt(e){return!e}function Yt(e){let t=(0,Q.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=V(`min-w-0 select-text wrap-break-word text-muted-foreground`,Vt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(qt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Xt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=V(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=V(`min-w-0 select-none wrap-break-word text-muted-foreground`,Vt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)($e,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?W:Ce,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(xe,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Kt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Xt(e){return!e}function Zt(e){let t=e.type?zt[e.type]:null,n=Mt(e.actionProps)&&e.data?.actionLayout===`stacked-end`,r=e.data?.actionVariant??`default`,i=e.data?.secondaryActionVariant??`outline`,a=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,o=(e.data?.additionalActions?.length??0)>0,s=e.data?.secondaryActionProps!==void 0,c=a!==null||Mt(e.actionProps)||o||s;return{Icon:t,stackedActionLayout:n,actionVariant:r,secondaryActionVariant:i,copyErrorText:a,hasTrailingControls:c,inlineContentEndPad:c?`pr-6`:`pr-10`}}function Qt(e){let t=(0,Q.c)(38),{stackedActionLayout:n,Icon:r,copyErrorText:i,actionProps:a,actionVariant:o,secondaryActionVariant:s,hasTrailingControls:c,toastData:l,toastDescription:u,toastType:d}=e,f;t[0]===l?.additionalActions?f=t[1]:(f=l?.additionalActions??[],t[0]=l?.additionalActions,t[1]=f);let p=f,m=l?.secondaryActionProps,h=l?.leadingIcon,g;t[2]===m?g=t[3]:(g=m??{},t[2]=m,t[3]=g);let _,v;t[4]===g?(_=t[5],v=t[6]):({className:_,...v}=g,t[4]=g,t[5]=_,t[6]=v);let y=n?`pr-5`:`flex-1`,b;t[7]===y?b=t[8]:(b=V(`flex min-h-0 min-w-0 flex-col gap-0.5`,y),t[7]=y,t[8]=b);let x;t[9]!==r||t[10]!==h?(x=h?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:h}):r?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(r,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[9]=r,t[10]=h,t[11]=x):x=t[11];let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsx)(et,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[12]=S):S=t[12];let C;t[13]===x?C=t[14]:(C=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[x,S]}),t[13]=x,t[14]=C);let w;t[15]!==l||t[16]!==u||t[17]!==d?(w=(0,q.jsx)(Yt,{toastData:l,toastDescription:u,toastType:d}),t[15]=l,t[16]=u,t[17]=d,t[18]=w):w=t[18];let T;t[19]!==b||t[20]!==C||t[21]!==w?(T=(0,q.jsxs)(`div`,{className:b,children:[C,w]}),t[19]=b,t[20]=C,t[21]=w,t[22]=T):T=t[22];let E;t[23]!==a||t[24]!==o||t[25]!==p||t[26]!==i||t[27]!==c||t[28]!==_||t[29]!==m||t[30]!==v||t[31]!==s||t[32]!==n||t[33]!==l?.sharedToastId?(E=c?(0,q.jsxs)(`div`,{className:V(`flex items-center gap-1.5`,n?`w-full justify-end`:`shrink-0`),children:[i===null?null:(0,q.jsx)(Gt,{text:i}),p.map(e=>{let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(B,{...i,className:r,key:t,size:`xs`,type:`button`,variant:s})}),m?(0,q.jsx)(B,{...v,className:_,size:`xs`,type:`button`,variant:l?.sharedToastId?`solid-neutral`:s}):null,Mt(a)?(0,q.jsx)(nt,{className:V(ce({size:`xs`,variant:o}),`shrink-0`),"data-slot":`toast-action`,children:a?.children}):null]}):null,t[23]=a,t[24]=o,t[25]=p,t[26]=i,t[27]=c,t[28]=_,t[29]=m,t[30]=v,t[31]=s,t[32]=n,t[33]=l?.sharedToastId,t[34]=E):E=t[34];let D;return t[35]!==E||t[36]!==T?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[35]=E,t[36]=T,t[37]=D):D=t[37],D}function $t(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:en},e[0]=t):t=e[0];let n=be(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=d(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function en(e){return At(e)}function tn(e){let t=(0,Q.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=Rt.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,Rt.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),Rt.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function nn(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(pt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(rn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(ze,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function rn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=ct(),i=$t(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>It(e.data,i),t[2]=i,t[3]=s);let c=Pt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(an));for(let t of Rt.keys())e.has(t)||Rt.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=ut,f=ut,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=V(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Nt(r,c.items.length),s=Zt(t),{stackedActionLayout:l,inlineContentEndPad:u}=s;return(0,q.jsxs)(Ze,{className:V(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&Z.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&Z.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)(tn,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),!t.data?.sharedToastId&&(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt($,t.id,t.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsxs)(Qe,{className:V(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,l?`flex flex-col gap-2 py-2.5 pr-3.5`:V(`py-3`,`flex items-center justify-between gap-2`,t.data?.sharedToastId?`pr-2`:u),a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(Qt,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),t.data?.sharedToastId&&(0,q.jsx)(B,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,onClick:()=>Z.dismiss(t.data.sharedToastId),children:(0,q.jsx)(j,{})})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function an(e){return e.id}function on(e){let t=(0,Q.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(sn,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(ze,{toastManager:Lt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function sn(){let e=(0,Q.c)(7),{toasts:t}=ct(),n=$t(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>It(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(cn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(rt,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(Ve,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function cn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=Zt(e),{stackedActionLayout:i,inlineContentEndPad:a}=r;return n?.anchor?(0,q.jsx)(ot,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(Ze,{className:V(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(Qe,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(et,{"data-slot":`toast-title`})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt(Lt,e.id,e.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsx)(Qe,{className:V(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm [overflow-x:clip]`,i?`flex flex-col gap-2 py-2.5 pr-3.5`:V(`py-3`,`flex items-center justify-between gap-1.5`,a)),children:(0,q.jsx)(Qt,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type})})]})})},e.id):null}export{Ee as _,Ot as a,jt as c,At as d,Ct as f,Ae as g,Z as h,$ as i,kt as l,St as m,nn as n,Dt as o,wt as p,Lt as r,Tt as s,on as t,Et as u,De as v};
2
- //# sourceMappingURL=toast-DhMYg_gN.js.map
1
+ import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{$i as r,Ap as i,Bi as a,By as o,Cd as s,Cm as c,Co as l,Cy as u,D as d,Ea as f,Em as p,Eo as m,Fa as h,Ia as g,Ii as _,Iy as v,Ks as y,Md as b,Mf as x,NE as S,Na as C,Or as w,Qi as T,Ra as E,Sa as D,So as ee,Td as te,Ti as O,To as k,Tr as A,Um as j,Uu as M,_o as N,ai as ne,bt as re,ca as P,ga as ie,ia as F,ib as I,jr as ae,ku as oe,lE as se,la as L,lr as ce,ma as R,oa as z,pa as le,ra as ue,sa as de,sl as fe,sr as B,t as V,ta as H,va as pe,vi as me,vo as U,za as he,zi as ge}from"./utils-BEVyjoxo.js";import{jn as _e}from"./runtime-C9FXEGBC.js";import{l as ve}from"./TooltipViewport-BKD6QABG.js";import{t as ye}from"./spinner-CpLstN6u.js";import{t as be}from"./useParams-Cil-ZIwd.js";import{c as xe,f as W,l as Se,u as Ce,y as we}from"./tooltip-Cq9yz15d.js";var Te=I(fe);function Ee(e){return Te(e)&&e.bootstrapThreadDisposition===`deleted`}function De(e){return Te(e)&&e.bootstrapThreadDisposition===`not-created`}var Oe=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the T3 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(_e)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function ke(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Oe.some(e=>e.test(t))}function Ae(e){return ke(e)?null:e??null}var G=e(n()),je=G.createContext(void 0);function Me(){let e=G.useContext(je);if(!e)throw Error(m(73));return e}var Ne=0;function Pe(e){return Ne+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ne}`}function Fe(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function Ie(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Le=e=>e.toastMetadata,K={toasts:O(e=>e.toasts),isEmpty:O(e=>e.toasts.length===0),toast:O(Le,(e,t)=>e.get(t)?.value),toastIndex:O(Le,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:O(Le,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:O(Le,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:O(e=>e.hovering),focused:O(e=>e.focused),expanded:O(e=>e.hovering||e.focused),expandedOrOutOfFocus:O(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:O(e=>e.prevFocusElement)},Re=class extends me{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ie(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Pe(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:Ie(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Fe(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Fe(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Fe(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=le.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=L(e);P(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?le.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:Ie(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=de(H(this.state.viewport));if(!this.state.viewport||!P(this.state.viewport,t)||!z(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),r=K.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(se()),ze=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=k(()=>new Re({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return D(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(je.Provider,{value:a,children:t})},Be=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),Ve=G.forwardRef(function(e,t){let{render:n,className:i,style:a,children:o,...s}=e,c=Me(),l=R(),u=G.useRef(!1),d=G.useRef(!1),f=G.useRef(!1),p=c.useState(`isEmpty`),m=c.useState(`toasts`),h=c.useState(`focused`),g=c.useState(`expanded`),_=c.useState(`prevFocusElement`),v=m[0]?.height??0,y=G.useMemo(()=>m.some(e=>e.transitionStatus===`ending`),[m]),b=G.useMemo(()=>m.filter(e=>e.priority===`high`),[m]);G.useEffect(()=>{let e=c.state.viewport;if(!e)return;function t(t){p||t.key===`F6`&&L(t)!==e&&(t.preventDefault(),c.setPrevFocusElement(de(H(e))),e?.focus({preventScroll:!0}),c.pauseTimers(),c.setFocused(!0))}let n=E(e);return F(n,`keydown`,t)},[c,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=E(e);function n(e){L(e)===t&&(c.setIsWindowFocused(!1),c.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=L(n),i=de(H(e));(r===t||!P(e,r)||!z(i))&&c.resumeTimers(),l.start(0,()=>c.setIsWindowFocused(!0))}return ue(F(t,`blur`,n,!0),F(t,`focus`,r,!0))},[c,l,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=H(e);return F(t,`pointerdown`,c.handleDocumentPointerDown,!0)},[p,c]);function x(e){let t=c.state.viewport;t&&(u.current=!0,e.relatedTarget===t?m[0]?.ref?.current?.focus():c.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&L(e.nativeEvent)===c.state.viewport&&(e.preventDefault(),c.restoreFocusToPrevElement(),c.resumeTimers())}function C(){let e=c.state.toasts.some(e=>e.transitionStatus===`ending`);c.state.isWindowFocused&&!e&&!f.current&&d.current&&(c.resumeTimers(),c.setHovering(!1),d.current=!1)}G.useEffect(C,[y,c]);function w(){c.pauseTimers(),c.setHovering(!0),d.current=!1}function D(){y||f.current?d.current=!0:(c.resumeTimers(),c.setHovering(!1))}function ee(e){e.pointerType===`touch`&&(f.current=!0)}function te(e){e.pointerType===`touch`&&(f.current=!1,C())}function O(){if(u.current){u.current=!1;return}h||z(de(H(c.state.viewport)))&&(c.setFocused(!0),c.pauseTimers())}function k(e){h&&!P(c.state.viewport,e.relatedTarget)&&(c.setFocused(!1),c.resumeTimers())}let A={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:D,onFocus:O,onBlur:k,onKeyDown:S,onClick:O,onPointerDown:ee,onPointerUp:te,onPointerCancel:te},j={expanded:g},M=U(`div`,e,{ref:[t,c.setViewport],state:j,props:[A,{style:{[Be.frontmostHeight]:v?`${v}px`:void 0}},s,{children:(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(T,{onFocus:x}),o,!p&&_&&(0,q.jsx)(T,{onFocus:x})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(T,{onFocus:x}),M,!h&&b.length>0&&(0,q.jsx)(`div`,{style:r,children:b.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),He=e(pe()),Ue=G.createContext(void 0);function J(){let e=G.useContext(Ue);if(!e)throw Error(m(66));return e}var Y=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function We(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ge(e){let t=E(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var Ke={...N,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qe=40,Je=10,X=.5,Ye=1,Xe=`${_},${ge}`,Ze=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=Me(),[f,p]=G.useState(void 0),[m,_]=G.useState(!1),[v,y]=G.useState(!1),[b,x]=G.useState(!1),[S,C]=G.useState({x:0,y:0}),[w,T]=G.useState({x:0,y:0,scale:1}),[E,D]=G.useState(),[ee,te]=G.useState(),[O,k]=G.useState(null),A=G.useRef(null),j=G.useRef({x:0,y:0}),M=G.useRef({x:0,y:0,scale:1}),N=G.useRef(void 0),ne=G.useRef(0),re=G.useRef(!1),I=G.useRef({x:0,y:0}),oe=G.useRef(!1),se=G.useRef({x:0,y:0}),ce=G.useRef(null),R=G.useRef(null),z=d.useState(`toastIndex`,n.id),le=d.useState(`toastVisibleIndex`,n.id),ue=d.useState(`toastOffsetY`,n.id),fe=d.useState(`focused`),B=d.useState(`expanded`);ie({open:n.transitionStatus!==`ending`,ref:A,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let V=g((e=!1)=>{let t=A.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:A,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?He.flushSync(a):a()});h(V,[V]);function pe(e){se.current=e,C(e)}h(()=>()=>{R.current?.abort()},[]);function me(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let he=g(e=>{if(e.pointerId!==ce.current)return;ce.current=null,R.current?.abort(),R.current=null,_(!1),y(!1),k(null);let t=M.current;if(e.type===`pointercancel`||re.current){pe({x:t.x,y:t.y}),p(void 0);return}let r=!1,i=se.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>qe&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>qe&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(p(s),x(!0),d.closeToast(n.id)):(pe({x:t.x,y:t.y}),p(void 0))});function ge(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=L(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${Xe}`))return;if(re.current=!1,N.current=void 0,ne.current=0,ce.current=e.pointerId,j.current={x:e.clientX,y:e.clientY},I.current=j.current,A.current){let e=Ge(A.current);M.current=e,T(e),pe({x:e.x,y:e.y})}d.setHovering(!0),_(!0),y(!1),k(null),oe.current=!0;let n=A.current;if(n){R.current?.abort();let t=new AbortController;R.current=t;let r=H(n);r.addEventListener(`pointerup`,he,{signal:t.signal}),r.addEventListener(`pointercancel`,he,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function _e(e){if(e.pointerId!==ce.current)return;e.preventDefault(),oe.current&&=(j.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>I.current.y||i>0&&t<I.current.y)&&(I.current={x:I.current.x,y:t}),(r<0&&n>I.current.x||r>0&&n<I.current.x)&&(I.current={x:n,y:I.current.y});let a=n-j.current.x,o=t-j.current.y,s=t-I.current.y,c=n-I.current.x;if(!v&&Math.sqrt(a*a+o*o)>=Ye&&(y(!0),O===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&k(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!N.current)O===`vertical`?o>0?u=`down`:o<0&&(u=`up`):O===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&l.includes(u)&&(N.current=u,ne.current=We(u,a,o),p(u));else{let e=N.current,t=We(e,c,s);t>qe?(re.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&ne.current-t>=Je&&(re.current=!0)}let d=me(a,o),f=M.current.x,m=M.current.y;O===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(O===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(m+=d.y)),pe({x:f,y:m})}function ve(e){if(e.key===`Escape`){if(!A.current||!P(A.current,de(H(A.current))))return;d.closeToast(n.id)}}G.useEffect(()=>{if(!u)return;let e=A.current;if(!e)return;function t(t){P(e,L(t))&&t.preventDefault()}return F(e,`touchmove`,t,{passive:!1})},[u]);function ye(){if(!m&&S.x===w.x&&S.y===w.y&&!b)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:m?`none`:void 0,transform:m?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let be=n.priority===`high`,xe={role:be?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":ee,"aria-hidden":be&&!fe?!0:void 0,onPointerDown:u?ge:void 0,onPointerMove:u?_e:void 0,onPointerUp:u?he:void 0,onPointerCancel:u?he:void 0,onKeyDown:ve,inert:ae(n.limited),style:{...ye(),[Y.index]:n.transitionStatus===`ending`?z:le,[Y.offsetY]:`${ue}px`,[Y.height]:n.height?`${n.height}px`:void 0}},W=G.useMemo(()=>({rootRef:A,toast:n,titleId:E,setTitleId:D,descriptionId:ee,setDescriptionId:te,swiping:m,swipeDirection:f,recalculateHeight:V,index:z,visibleIndex:le,expanded:B}),[n,E,ee,m,f,V,z,le,B]),Se={transitionStatus:n.transitionStatus,expanded:B,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Ce=U(`div`,e,{ref:[t,W.rootRef],state:Se,stateAttributesMapping:Ke,props:[xe,s]});return(0,q.jsx)(Ue.Provider,{value:W,children:Ce})}),Qe=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=J(),l=G.useRef(null);return h(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),U(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),$e=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=J(),u=o??c.description,d=!!u,p=f(a);h(()=>{if(d)return l(p),()=>{l(void 0)}},[d,p,l]);let m={type:c.type},g=U(`p`,e,{ref:t,state:m,props:{...s,id:p,children:u}});return d?g:null}),et=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=J(),u=o??c.title,d=!!u,p=f(a);h(()=>{if(d)return l(p),()=>{l(void 0)}},[d,p,l]);let m={type:c.type},g=U(`h2`,e,{ref:t,state:m,props:{...s,id:p,children:u}});return d?g:null}),tt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Me(),{toast:l}=J(),u=c.useState(`expanded`),[d,f]=G.useState(!1),{getButtonProps:p,buttonRef:m}=C({disabled:a,native:o}),h={type:l.type};return U(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),nt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=J(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=C({disabled:a,native:o}),p={type:c.type},m=U(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),rt=ve,it=G.createContext(void 0);function at(){let e=G.useContext(it);if(e===void 0)throw Error(m(84));return e}var ot=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=Me(),o=n.positionerProps??ee,{render:s,className:c,anchor:u=o.anchor,positionMethod:d=o.positionMethod??`absolute`,side:f=o.side??`top`,align:p=o.align??`center`,sideOffset:m=o.sideOffset??0,alignOffset:h=o.alignOffset??0,collisionBoundary:g=o.collisionBoundary??`clipping-ancestors`,collisionPadding:_=o.collisionPadding??5,arrowPadding:v=o.arrowPadding??5,sticky:y=o.sticky??!1,disableAnchorTracking:b=o.disableAnchorTracking??!1,collisionAvoidance:x=o.collisionAvoidance??a,style:S,...C}=r,[T,E]=G.useState(null),D=i.useState(`toastIndex`,n.id),te=i.useState(`toastVisibleIndex`,n.id),O=he(u)?u:null,k=ne({open:!0,onOpenChange:l,elements:{floating:T,reference:O}}),j=w({anchor:O,positionMethod:d,floatingRootContext:k,mounted:!0,side:f,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),M=G.useMemo(()=>({side:j.side,align:j.align,anchorHidden:j.anchorHidden}),[j.side,j.align,j.anchorHidden]),N=A(e,M,{styles:{...j.positionerStyles,[Y.index]:n.transitionStatus===`ending`?D:te},transitionStatus:n.transitionStatus,props:C,refs:[t,E]});return(0,q.jsx)(it.Provider,{value:j,children:N})}),st=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=at();return U(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ct(){let e=G.useContext(je);if(!e)throw Error(m(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function lt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Pe(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var ut=t({Action:()=>nt,Arrow:()=>st,Close:()=>tt,Content:()=>Qe,Description:()=>$e,Portal:()=>rt,Positioner:()=>ot,Provider:()=>ze,Root:()=>Ze,Title:()=>et,Viewport:()=>Ve,createToastManager:()=>lt,useToastManager:()=>ct});function dt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var Z=dt(),Q=S(),ft={archive:M,clock:b,pin:i,trash:c};function pt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(mt,t),null}function mt(){let e=!0,t=new Set,n=()=>{let n=Z.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?ft[r.icon]:null,i=r.actions??[],a=i.find(gt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{Z.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&Z.getSnapshot().includes(r)&&Z.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},secondaryActionVariant:`soft`,hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=Z.subscribe(n),i=ht;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),Z.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function ht(){return Z.setPaused(`web-hidden`,document.hidden)}function gt(e){return e.primary}var _t=class extends o()(`ClipboardApiUnavailableError`,{target:v}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},vt=class extends o()(`ClipboardWriteError`,{target:v,cause:u()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},yt=class extends o()(`ClipboardReadUnavailableError`,{target:v}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},bt=class extends o()(`ClipboardReadError`,{target:v,cause:u()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function xt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function St(e,t=`text`,n){if(typeof window>`u`)throw new _t({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[oe];if(r&&(n={...n,"text/html":re(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(xt(e,n))return!0;throw new _t({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new vt({target:t,cause:e})}}async function Ct(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new yt({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new bt({target:e,cause:t})}}function wt({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{St(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Tt(e){return e===`live`}function Et(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Dt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Ot(e){return{draftId:e}}function kt(e){return!e.environmentId||!e.threadId?null:y(e.environmentId,e.threadId)}function At(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:y(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function jt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Mt(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Nt(e,t){return t<=1?!1:e>0}function Pt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=Ft(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:Ft(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function Ft(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function It(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var $=lt(),Lt=lt(),Rt=new Map,zt={error:s,info:x,loading:ye,success:te,warning:p},Bt=180;function Vt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Bt))return`line-clamp-4`}var Ht=`absolute z-20 -top-1.5 -right-1.5`,Ut=V(`inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-popover/92 text-muted-foreground shadow-sm outline-none backdrop-blur-sm`,`transition-[color,background-color,box-shadow] hover:bg-popover hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`);function Wt(e,t,n){n?.(),e.close(t)}function Gt(e){let t=(0,Q.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=wt(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=V(`size-3`,c),t[4]=c,t[5]=l);let u=a?Se:we,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(xe,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(B,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Kt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function qt(e){let t=(0,Q.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Jt),t[0]=c):c=t[0];let l=i?W:Ce,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(xe,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Kt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Jt(e){return!e}function Yt(e){let t=(0,Q.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=V(`min-w-0 select-text wrap-break-word text-muted-foreground`,Vt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(qt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Xt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=V(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=V(`min-w-0 select-none wrap-break-word text-muted-foreground`,Vt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)($e,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?W:Ce,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(xe,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Kt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Xt(e){return!e}function Zt(e){let t=e.type?zt[e.type]:null,n=Mt(e.actionProps)&&e.data?.actionLayout===`stacked-end`,r=e.data?.actionVariant??`default`,i=e.data?.secondaryActionVariant??`outline`,a=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,o=(e.data?.additionalActions?.length??0)>0,s=e.data?.secondaryActionProps!==void 0,c=a!==null||Mt(e.actionProps)||o||s;return{Icon:t,stackedActionLayout:n,actionVariant:r,secondaryActionVariant:i,copyErrorText:a,hasTrailingControls:c,inlineContentEndPad:c?`pr-6`:`pr-10`}}function Qt(e){let t=(0,Q.c)(38),{stackedActionLayout:n,Icon:r,copyErrorText:i,actionProps:a,actionVariant:o,secondaryActionVariant:s,hasTrailingControls:c,toastData:l,toastDescription:u,toastType:d}=e,f;t[0]===l?.additionalActions?f=t[1]:(f=l?.additionalActions??[],t[0]=l?.additionalActions,t[1]=f);let p=f,m=l?.secondaryActionProps,h=l?.leadingIcon,g;t[2]===m?g=t[3]:(g=m??{},t[2]=m,t[3]=g);let _,v;t[4]===g?(_=t[5],v=t[6]):({className:_,...v}=g,t[4]=g,t[5]=_,t[6]=v);let y=n?`pr-5`:`flex-1`,b;t[7]===y?b=t[8]:(b=V(`flex min-h-0 min-w-0 flex-col gap-0.5`,y),t[7]=y,t[8]=b);let x;t[9]!==r||t[10]!==h?(x=h?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:h}):r?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(r,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[9]=r,t[10]=h,t[11]=x):x=t[11];let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsx)(et,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[12]=S):S=t[12];let C;t[13]===x?C=t[14]:(C=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[x,S]}),t[13]=x,t[14]=C);let w;t[15]!==l||t[16]!==u||t[17]!==d?(w=(0,q.jsx)(Yt,{toastData:l,toastDescription:u,toastType:d}),t[15]=l,t[16]=u,t[17]=d,t[18]=w):w=t[18];let T;t[19]!==b||t[20]!==C||t[21]!==w?(T=(0,q.jsxs)(`div`,{className:b,children:[C,w]}),t[19]=b,t[20]=C,t[21]=w,t[22]=T):T=t[22];let E;t[23]!==a||t[24]!==o||t[25]!==p||t[26]!==i||t[27]!==c||t[28]!==_||t[29]!==m||t[30]!==v||t[31]!==s||t[32]!==n||t[33]!==l?.sharedToastId?(E=c?(0,q.jsxs)(`div`,{className:V(`flex items-center gap-1.5`,n?`w-full justify-end`:`shrink-0`),children:[i===null?null:(0,q.jsx)(Gt,{text:i}),p.map(e=>{let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(B,{...i,className:r,key:t,size:`xs`,type:`button`,variant:s})}),m?(0,q.jsx)(B,{...v,className:_,size:`xs`,type:`button`,variant:l?.sharedToastId?`solid-neutral`:s}):null,Mt(a)?(0,q.jsx)(nt,{className:V(ce({size:`xs`,variant:o}),`shrink-0`),"data-slot":`toast-action`,children:a?.children}):null]}):null,t[23]=a,t[24]=o,t[25]=p,t[26]=i,t[27]=c,t[28]=_,t[29]=m,t[30]=v,t[31]=s,t[32]=n,t[33]=l?.sharedToastId,t[34]=E):E=t[34];let D;return t[35]!==E||t[36]!==T?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[35]=E,t[36]=T,t[37]=D):D=t[37],D}function $t(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:en},e[0]=t):t=e[0];let n=be(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=d(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function en(e){return At(e)}function tn(e){let t=(0,Q.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=Rt.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,Rt.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),Rt.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function nn(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(pt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(rn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(ze,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function rn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=ct(),i=$t(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>It(e.data,i),t[2]=i,t[3]=s);let c=Pt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(an));for(let t of Rt.keys())e.has(t)||Rt.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=ut,f=ut,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=V(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Nt(r,c.items.length),s=Zt(t),{stackedActionLayout:l,inlineContentEndPad:u}=s;return(0,q.jsxs)(Ze,{className:V(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&Z.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&Z.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)(tn,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),!t.data?.sharedToastId&&(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt($,t.id,t.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsxs)(Qe,{className:V(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,l?`flex flex-col gap-2 py-2.5 pr-3.5`:V(`py-3`,`flex items-center justify-between gap-2`,t.data?.sharedToastId?`pr-2`:u),a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(Qt,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),t.data?.sharedToastId&&(0,q.jsx)(B,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,onClick:()=>Z.dismiss(t.data.sharedToastId),children:(0,q.jsx)(j,{})})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function an(e){return e.id}function on(e){let t=(0,Q.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(sn,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(ze,{toastManager:Lt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function sn(){let e=(0,Q.c)(7),{toasts:t}=ct(),n=$t(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>It(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(cn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(rt,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(Ve,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function cn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=Zt(e),{stackedActionLayout:i,inlineContentEndPad:a}=r;return n?.anchor?(0,q.jsx)(ot,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(Ze,{className:V(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(Qe,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(et,{"data-slot":`toast-title`})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt(Lt,e.id,e.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsx)(Qe,{className:V(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm [overflow-x:clip]`,i?`flex flex-col gap-2 py-2.5 pr-3.5`:V(`py-3`,`flex items-center justify-between gap-1.5`,a)),children:(0,q.jsx)(Qt,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type})})]})})},e.id):null}export{Ee as _,Ot as a,jt as c,At as d,Ct as f,Ae as g,Z as h,$ as i,kt as l,St as m,nn as n,Dt as o,wt as p,Lt as r,Tt as s,on as t,Et as u,De as v};
2
+ //# sourceMappingURL=toast-D1xgN6T2.js.map
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-DzxwRta7.js";import{c as e}from"./mermaid-parser.core-CsBuWV4-.js";export{e as createTreeViewServices};
1
+ import"./chunk-FOHPRMQF-DzxwRta7.js";import{c as e}from"./mermaid-parser.core-BGJPFG4o.js";export{e as createTreeViewServices};
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-DzxwRta7.js";import{o as e}from"./mermaid-parser.core-CsBuWV4-.js";export{e as createTreemapServices};
1
+ import"./chunk-FOHPRMQF-DzxwRta7.js";import{o as e}from"./mermaid-parser.core-BGJPFG4o.js";export{e as createTreemapServices};