@p4code/cli 0.9.18 → 0.9.20
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.
- package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
- package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
- package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
- package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
- package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
- package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BYrlvKdA.mjs} +278 -50
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DzRO6f_z.mjs → binCli-DReuiGmk.mjs} +297 -125
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
- package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2139 -2127
- package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-DjM2qwkD.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BJdq41GZ.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-D21CBy6j.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-DOIdqlC8.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-Bckll9rH.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-skJPz5iO.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-CRwXaSb1.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-sJYhkmUL.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-DY2aNKk1.js} +2 -2
- package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-DpZyVE6P.js} +2 -2
- package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-8DIThGtQ.js} +2 -2
- package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-BE-MTjvu.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DB_eiHX6.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-COfNlajP.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-BoS1RBdk.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-BM3c1qJe.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-BhRNS6b8.js} +2 -2
- package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-RvYWUXux.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-byct14yE.js} +2 -2
- package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-YcQsQFwj.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-BQOZ260S.js +2 -0
- package/dist/client/assets/ChatMarkdown-BdoTEVpd.js +49 -0
- package/dist/client/assets/{CheckboxIndicator-CLFg8-A1.js → CheckboxIndicator-Dj91Im5z.js} +2 -2
- package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-CmBRrYNb.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-CseyxFgK.js +2 -0
- package/dist/client/assets/{CollapsiblePanel-BlUD5mJC.js → CollapsiblePanel-BwDr-EKA.js} +2 -2
- package/dist/client/assets/{ComboboxClear-DKHwuDAL.js → ComboboxClear-DeqR6c-6.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-Dk-MF4sD.js} +2 -2
- package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-Cg8P2GXg.js} +2 -2
- package/dist/client/assets/{CompositeRoot-_C3uLH2F.js → CompositeRoot-Cx12XSsh.js} +2 -2
- package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9MYjA6g.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-BnhNFCMA.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-BZ7eTlHc.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-DIWnFjlV.js} +2 -2
- package/dist/client/assets/{DevicePanel-Dvozgov3.js → DevicePanel-CpWnw2HZ.js} +2 -2
- package/dist/client/assets/DeviceSetup-C02U1yvN.js +2 -0
- package/dist/client/assets/{DialogTitle-C9j5Tmuy.js → DialogTitle-5cBExuFs.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-CHYeyesq.js} +3 -3
- package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-zq0G5Jq3.js} +2 -2
- package/dist/client/assets/DiffPanel-ghqOrQdi.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-QbRiMHeR.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-ExUecHKZ.js} +6 -6
- package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-Lz2YGk0G.js} +2 -2
- package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-B034p2kF.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-Cch7VyQQ.js} +2 -2
- package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-H6iQvC-Q.js} +2 -2
- package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-C1_8HZ7T.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-DERxofVe.js} +6 -6
- package/dist/client/assets/FoldedSettingsSection-okCu3zVD.js +2 -0
- package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-CJ_9BjZ0.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-BvfNYUiJ.js} +2 -2
- package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-DmQwwfAN.js} +2 -2
- package/dist/client/assets/Input-DWc7cRWt.js +2 -0
- package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-S7jLIub2.js} +2 -2
- package/dist/client/assets/JZOYTAAL-RUIcMwMn.js +1 -0
- package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-C513S1_s.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-zhgZmSWl.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-C6XG7NtX.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BmjYN5gQ.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-B0Kwi43W.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-GyKAeGYQ.js} +2 -2
- package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-DfU_zRMI.js} +2 -2
- package/dist/client/assets/ModelLiveLayer-DjtYQpVe.js +3 -0
- package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-BXB2c-Us.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-BkehuL9A.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-C-VNr8Ui.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-CPn-XJue.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-DAQPVVnq.js} +2 -2
- package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-BKoNBxEK.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-C_7SfUQ2.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-B6e-wkqI.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-Byb4NdRa.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-BpjspxNc.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-h4qT502J.js} +2 -2
- package/dist/client/assets/{PopoverHandle-BwqnKm9Y.js → PopoverHandle-DEcvmS0k.js} +2 -2
- package/dist/client/assets/PreviewPanel-lT6UT8SC.js +2 -0
- package/dist/client/assets/{ProjectDefaultsSettings-rvN_67Gu.js → ProjectDefaultsSettings-nqWOPUBM.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-wwkvNTYJ.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-CAEx0HQF.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-C8btbogu.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-Seln-0IQ.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-p5oWTfTD.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-DP5cO9tc.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-BhWK4Zqq.js +6 -0
- package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-ZKmIoa8f.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-C8hhN481.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-BMXImj30.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-CYWiIuBa.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-Cog3JVw0.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-BW_1--rc.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-CvbQDrJp.js → ScheduledTasksSettings-D6cHBUhW.js} +6 -6
- package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-BzU8Hn6s.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-DFCZuJ0r.js} +2 -2
- package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-CRgvNUgU.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-Dj2om6Qx.js → SelectScrollUpArrow-C-MWJdyw.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection--Dcxxm73.js} +2 -2
- package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-C79826rW.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DPfiTtgf.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-C9OAfACb.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-syJ1VaYP.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-Bc51hYDo.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-mV-gJkJw.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-Bs_azRDw.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-DvlDdC-r.js} +3 -3
- package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-DFAwPwtf.js} +44 -44
- package/dist/client/assets/ThreadTerminalDrawer-CBRpijGu.js +5 -0
- package/dist/client/assets/TooltipProvider-DiV5KdTq.js +2 -0
- package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-DL8IPyLr.js} +2 -2
- package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CxX5m2eb.js} +2 -2
- package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-hL0IrPqB.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-CCg7BLOe.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-Cok6l_SJ.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-_--jFIZ8.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-CJB6rvZc.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-CoEhAoaG.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-v3am3MF5.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-CNH8QiJb.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-BAtBSLld.js} +2 -2
- package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-B0qIfRPW.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-7yKJRNqu.js} +2 -2
- package/dist/client/assets/_chat-CPyEKO_k.js +47 -0
- package/dist/client/assets/_chat.design-BkPz6B_R.js +2 -0
- package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-DGRldHwy.js} +2 -2
- package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-Be-FWv3w.js} +2 -2
- package/dist/client/assets/_chat.pull-requests-Csb_f8e_.js +2 -0
- package/dist/client/assets/{alert-BdISKl4u.js → alert-D6WJ0q4-.js} +2 -2
- package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-DsMTn0ZK.js} +2 -2
- package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-CsEDCYyh.js} +2 -2
- package/dist/client/assets/assets-CA-ZYmQr.js +2 -0
- package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-BVGoot2u.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-zjhG9Lyg.js} +2 -2
- package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-Cw33xyU7.js} +2 -2
- package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-Bmtarpj9.js} +2 -2
- package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-D6RfzdE7.js} +2 -2
- package/dist/client/assets/{command-CeMH9lgx.js → command-1dJ-vX2N.js} +2 -2
- package/dist/client/assets/{connect-CQUjsv6p.js → connect-BdyG6QZP.js} +2 -2
- package/dist/client/assets/connect-agent-BZgF1WVU.js +2 -0
- package/dist/client/assets/{design-BL2REeQ-.js → design-9PZeJvkV.js} +2 -2
- package/dist/client/assets/{device-DUMKyegd.js → device-B_zaE4OU.js} +2 -2
- package/dist/client/assets/{dialog-BzESHWgr.js → dialog-5OaxRXCC.js} +2 -2
- package/dist/client/assets/{diffPanelStore-B-hQEy6C.js → diffPanelStore-D3ARjaef.js} +2 -2
- package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-aGA2PUMV.js} +2 -2
- package/dist/client/assets/{dist--Lo1A95S.js → dist-DQanjDEK.js} +3 -3
- package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-DM7mC5ty.js} +2 -2
- package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-WUHHsw83.js} +2 -2
- package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic-BrZIqKQ1.js} +3 -3
- package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-Bjon5VEq.js} +2 -2
- package/dist/client/assets/{empty-CeYEMFdG.js → empty-VkAC9qIO.js} +2 -2
- package/dist/client/assets/entities-iVR9hStG.js +2 -0
- package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-ZsyrXe-F.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-CZA6X0sP.js} +2 -2
- package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
- package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-C973oCCO.js} +2 -2
- package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DYI6n9Xo.js} +2 -2
- package/dist/client/assets/index-ColdECgE.js +3 -0
- package/dist/client/assets/{input-K95B1E2P.js → input-CiPGmOLv.js} +2 -2
- package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-DOUsG7P-.js} +2 -2
- package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-C8opCm5n.js} +2 -2
- package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-CbaDrm2P.js} +2 -2
- package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-BWBxhQ9c.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-BZe6tHvz.js} +2 -2
- package/dist/client/assets/{link-B57I0_wC.js → link-BHR6GsRr.js} +2 -2
- package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN5vzMKu.js} +2 -2
- package/dist/client/assets/main-i3nSjwXu.css +2 -0
- package/dist/client/assets/main-xeaL6Ue7.js +38 -0
- package/dist/client/assets/mediaReference-D4xASAKr.js +2 -0
- package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-DJf0a3Hm.js} +2 -2
- package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-Dg2T9WKU.js} +2 -2
- package/dist/client/assets/{number-field-D6t0GpAB.js → number-field-BkDsfSCt.js} +2 -2
- package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-BESwMMOy.js} +2 -2
- package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-7dyWHc7v.js} +2 -2
- package/dist/client/assets/{openFileInPreview-DFpXOfx7.js → openFileInPreview-l71la8rp.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-CC8L8IBq.js} +2 -2
- package/dist/client/assets/{pair-Bc34xPWk.js → pair-CjGF7d0N.js} +2 -2
- package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-CX8QB7C5.js} +2 -2
- package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-CpRP0Ylg.js} +2 -2
- package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-CX8MNnZC.js} +2 -2
- package/dist/client/assets/{popover-CtPuvMeZ.js → popover-hyDlWUPU.js} +2 -2
- package/dist/client/assets/{preview-CS0uw3GP.js → preview-DX0t2QY_.js} +2 -2
- package/dist/client/assets/{preview-DIIM6Lws.js → preview-DnCP9Q0k.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-oJw0qrRM.js → previewMiniPlayerStore-DByen2Nk.js} +2 -2
- package/dist/client/assets/{primary-B0bbGdiR.js → primary-BvBZk3BL.js} +2 -2
- package/dist/client/assets/primaryCloudLinkState-CHXPTqr2.js +2 -0
- package/dist/client/assets/{projectFilesQueryState-DpLF9eJd.js → projectFilesQueryState-D1KYNZXm.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-Dy8U6TBl.js} +2 -2
- package/dist/client/assets/providerSkills-CpjiWlTj.js +2 -0
- package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-CHJRE71s.js} +3 -3
- package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-1lUVOGQJ.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CUZ0N4F2.js} +2 -2
- package/dist/client/assets/pullRequests-DjzqqdNY.js +2 -0
- package/dist/client/assets/queries-D2fZuj-t.js +2 -0
- package/dist/client/assets/{query-DpmTmXUV.js → query-CeIgbVxh.js} +2 -2
- package/dist/client/assets/{radio-group-DSfZzUu8.js → radio-group-C14CASyG.js} +2 -2
- package/dist/client/assets/relay-aZlRxOWS.js +2 -0
- package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-BLaTctiX.js} +2 -2
- package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-Bt0unAo8.js} +2 -2
- package/dist/client/assets/runtime-D5AfNyNA.js +7 -0
- package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DymGoV55.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-BjvsiCPJ.js} +3 -3
- package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-D2D-AlvC.js} +2 -2
- package/dist/client/assets/{select-BtqP8nTL.js → select-CE2f-g-3.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-Bhi6QF1b.js} +2 -2
- package/dist/client/assets/{server-BYnv0CK4.js → server-B2y_yoz_.js} +2 -2
- package/dist/client/assets/{session-BryEqNW-.js → session-Dt_Dt-Og.js} +2 -2
- package/dist/client/assets/session-logic-CPQJM-gL.js +27 -0
- package/dist/client/assets/{settings-A-pqSt1Y.js → settings-BIR_Igib.js} +2 -2
- package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-D0uNLG6m.js} +2 -2
- package/dist/client/assets/settings.archived-DHE_0aGh.js +2 -0
- package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-CNVg4Kl5.js} +2 -2
- package/dist/client/assets/settings.connections-Bt5upKXR.js +2 -0
- package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-Bu-fCPHf.js} +2 -2
- package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-B9lckxtw.js} +2 -2
- package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-CLLnQttY.js} +2 -2
- package/dist/client/assets/settings.diagnostics-Bl2X85nQ.js +2 -0
- package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CJSdSR2k.js} +2 -2
- package/dist/client/assets/settings.integrations-DRpNV9D5.js +2 -0
- package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-BPtpYe84.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DYpshDh1.js} +2 -2
- package/dist/client/assets/{settings.plugins-B6My9wD7.js → settings.plugins-C9ZOoiar.js} +4 -4
- package/dist/client/assets/settings.projects-CMHQJUvG.js +4 -0
- package/dist/client/assets/settings.providers-Bfr9fIiF.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-BEYOe2xs.js} +2 -2
- package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-DIyDPOQx.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-DmjWtA3x.js} +2 -2
- package/dist/client/assets/settings.source-control-DvaOZ7kM.js +2 -0
- package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-B4XbjYVO.js} +2 -2
- package/dist/client/assets/settingsLayout-Ds1fJJk7.js +3 -0
- package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-4oe_dr6q.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-RQlsFe56.js} +2 -2
- package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-D6RVfMa8.js} +2 -2
- package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-BhvxhaEx.js} +2 -2
- package/dist/client/assets/sourceControlClients-Bs5R87fg.js +2 -0
- package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-C-qDE4WQ.js} +2 -2
- package/dist/client/assets/src-R7EkrVcv.js +15 -0
- package/dist/client/assets/terminal-links-BohHFDfc.js +2 -0
- package/dist/client/assets/terminalSessions-Cnj30QDx.js +2 -0
- package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CWbMGhL9.js} +2 -2
- package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-B_fGWNEh.js} +3 -3
- package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-B88N2CXf.js} +2 -2
- package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-CKr6iZUR.js} +2 -2
- package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-B1WN0Pgy.js} +2 -2
- package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-CCYU8XGM.js} +2 -2
- package/dist/client/assets/uiStateStore-BZ4RuLIL.js +2 -0
- package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
- package/dist/client/assets/{usage-BJA7zQoS.js → usage-GID8Ml88.js} +2 -2
- package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-B0nqd8U-.js} +2 -2
- package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-CUSzTPTq.js} +2 -2
- package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-jGu1QJHr.js} +2 -2
- package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-QDd_NqJQ.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-CJvtvui4.js} +2 -2
- package/dist/client/assets/useHandleNewThread-ClgC6Lcw.js +2 -0
- package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-KvBZAN7v.js} +2 -2
- package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-DXSBYc-k.js} +2 -2
- package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-DzR35iiJ.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-DMl-0U53.js} +2 -2
- package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-D9reDvT8.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-C5YvHVz-.js} +2 -2
- package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-D7yp2NvZ.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-CJvtylIq.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-D-hYtXkm.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-DGPFTMHL.js} +2 -2
- package/dist/client/assets/useSettings-BJR7Rf97.js +3 -0
- package/dist/client/assets/utils-DkKLB01I.js +24 -0
- package/dist/client/assets/vcsRefInvalidation-Bnup-5J0.js +2 -0
- package/dist/client/assets/welcome-CMuTnFAm.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
- package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-DcFC_OYY.mjs} +902 -438
- package/dist/{renderer-iWfzRWCX.mjs → renderer-CswgrCon.mjs} +2 -2
- package/dist/{runtime-CllDK9QU.mjs → runtime-Bec3_bh8.mjs} +3 -3
- package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-B6H9jZgZ.mjs} +1 -1
- package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-D4LpzNmS.mjs} +3263 -2983
- package/dist/{server-vm1eH-y1.mjs → server-4nWc1d6L.mjs} +385 -229
- package/dist/{sha2-9FUhed4s.mjs → sha2-BfCJmkJJ.mjs} +47 -8
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
- package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
- package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
- package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
- package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
- package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
- package/dist/client/assets/Input-BWhtnCC0.js +0 -2
- package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
- package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
- package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
- package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
- package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
- package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
- package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
- package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
- package/dist/client/assets/_chat.design-C593M39o.js +0 -2
- package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
- package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
- package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
- package/dist/client/assets/entities-CpJdh0W5.js +0 -2
- package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
- package/dist/client/assets/index-BWKkBtFt.js +0 -3
- package/dist/client/assets/main-C8b9a0ht.js +0 -37
- package/dist/client/assets/main-CCH0X0zL.css +0 -2
- package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
- package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
- package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
- package/dist/client/assets/queries-DDAXRF4r.js +0 -2
- package/dist/client/assets/relay-CnLeC-mg.js +0 -2
- package/dist/client/assets/runtime-DUPVFypn.js +0 -7
- package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
- package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
- package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
- package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
- package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
- package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
- package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
- package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
- package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
- package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
- package/dist/client/assets/src-BZzGU-vc.js +0 -15
- package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
- package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
- package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
- package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
- package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
- package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
- package/dist/client/assets/utils-Cs97wR6T.js +0 -24
- package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
- package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{dr as e,rr as t,tr as n,ur as r}from"./runtime-DUPVFypn.js";import{a as i,i as a,o,r as s}from"./fileLinks-LQyYck3z.js";var c=/^(~\/|\.{1,2}\/)/,l=/^(?:[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*\/)+(?:[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*(?::\d+){0,2})?$/u,u=/^[\p{L}\p{M}\p{N}._-]+(?: +[\p{L}\p{M}\p{N}._-]+)*\.[\p{L}\p{M}\p{N}_-]+(?::\d+){0,2}$/u,d=/^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/,f=/:\d+(?::\d+)?$/,p=/^\d+(?::\d+)?$/,m=/[\s`]/,h=/[\\/]/,g=/\.[A-Za-z0-9_-]+$/,_=/\d\.\d[^.]*$/,v=/^\d+(?:\.\d+)+$/,y=[`/Users/`,`/home/`,`/tmp/`,`/var/`,`/etc/`,`/opt/`,`/mnt/`,`/Volumes/`,`/private/`,`/root/`,`/usr/`,`/bin/`,`/sbin/`,`/lib/`,`/lib64/`,`/srv/`,`/dev/`,`/proc/`,`/sys/`,`/run/`,`/boot/`,`/media/`,`/workspace/`,`/workspaces/`],b=new Set(`Makefile.makefile.GNUmakefile.Dockerfile.Containerfile.Justfile.justfile.Rakefile.Gemfile.Procfile.Brewfile.Caddyfile.Vagrantfile.Jenkinsfile.Podfile.Fastfile.BUILD.WORKSPACE.LICENSE.LICENCE.COPYING.NOTICE.AUTHORS.CONTRIBUTORS.CHANGELOG.README.CODEOWNERS`.split(`.`)),x=new Set([`localhost`]),S=new Set([`com`,`net`,`org`,`io`,`dev`,`app`,`ai`,`co`,`edu`,`gov`,`mil`,`info`,`biz`,`xyz`,`me`,`tv`,`cc`,`gg`,`chat`,`cloud`,`site`,`online`,`tech`,`store`,`link`]),C=new Set(`uk.de.fr.nl.se.no.fi.dk.pl.ch.at.be.es.it.pt.eu.us.ca.au.nz.jp.kr.cn.br.ru.mx.ie.cz.tr.sg.hk`.split(`.`));function w(e,t){if(e.startsWith(`.`))return!1;let n=e.toLowerCase();if(x.has(n)||v.test(e))return!0;let r=n.split(`.`),i=r.at(-1);return r.length<2||i===void 0?!1:S.has(i)?!0:!t&&C.has(i)}function T(e){let n=e.trim();if(n.length===0||m.test(n))return null;let r=t(n)?n:n.replaceAll(`\\`,`/`),i=f.test(r);if(!i&&!h.test(r))return null;if(!(c.test(r)||r.startsWith(`/`)||t(r))){let e=r.replace(f,``);if(e.endsWith(`/`)||w(e.split(`/`)[0]??e,i))return null;let t=e.replace(/[/\\]+$/,``).split(/[\\/]/).at(-1)??``;if(_.test(t)||!i&&!g.test(t))return null}return r}function E(e){try{return decodeURIComponent(e)}catch{return e}}function D(e){let t=e.trim();return t.startsWith(`<`)&&t.endsWith(`>`)?t.slice(1,-1):t}function O(e){let t=e.indexOf(`#`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t):``,i=n.indexOf(`?`);return{path:i>=0?n.slice(0,i):n,hash:r}}function k(e,n){let r=P(n);if(!r)return!1;let i=e=>e.replaceAll(`\\`,`/`).replace(/^\.\//,``).replace(/\/+$/,``),a=o(e.trim());if(a.line!==void 0&&a.line!==r.line||a.column!==void 0&&a.column!==r.column)return!1;let s=i(a.path),c=i(r.path);return s.length===0||(t(r.path)&&(s=s.toLowerCase(),c=c.toLowerCase()),c===s||c.endsWith(`/${s}`))}function A(e){return c.test(e)||!e.startsWith(`/`)&&!t(e)}function j(e){if(!e.startsWith(`/`))return!1;if(y.some(t=>e.startsWith(t))||f.test(e))return!0;let t=e.slice(e.lastIndexOf(`/`)+1);return b.has(t)||g.test(t)}function M(e,n){return t(e)||c.test(e)?!0:e.startsWith(`/`)?j(n):b.has(e)?!0:l.test(n)||u.test(e)}function N(e){if(t(e))return!1;let n=e.match(d);if(!n)return!1;let r=n[2]??``;return r.startsWith(`//`)?!0:!p.test(r)}function P(e){let t=D(e);if(t.length===0||t.startsWith(`#`)||t.startsWith(`//`))return null;let n=(t.toLowerCase().startsWith(`file:`)?a(t):null)??O(t),i=r(E(n.path.trim())),s=E(n.hash.trim());if(i.length===0||N(i))return null;let c=o(i,s);return M(c.path,i)?c:null}var F=/(```[\s\S]*?(?:```|$))/,I=/`([^`\n]+)`/g;function L(e){let t=[],n=e.split(F);for(let e=0;e<n.length;e+=2)for(let r of(n[e]??``).matchAll(I)){let e=r[1]?.trim();e&&t.push(e)}return t}function R(e,t){let n=-1,r=-1;return i=>(i>=n&&i<=r||(t.lastIndex=i,n=i,r=t.exec(e)?.index??e.length),r)}function z(e){let t=R(e,/\S/g),n=R(e,/["']/g),r=R(e,/\S/g);return i=>{let a=t(i);if(e[a]===`)`)return a+1;if(a===i||e[a]!==`"`&&e[a]!==`'`)return null;let o=n(a+1);if(o===e.length)return null;let s=r(o+1);return e[s]===`)`?s+1:null}}function B(e){let t=R(e,/\S/g),n=R(e,/[>\n]/g),r=R(e,/[\s)]/g),i=z(e),a=z(e);return o=>{if(e[o]!==`(`)return null;let s=t(o+1);if(e[s]===`<`){let t=n(s+1);if(t>s+1&&e[t]===`>`){let e=i(t+1);if(e!==null)return{hrefStart:s+1,hrefEnd:t,end:e}}}let c=r(s);if(c===s)return null;let l=a(c);return l===null?null:{hrefStart:s,hrefEnd:c,end:l}}}function V(e){let t=[],n=B(e),r=0;for(;r<e.length;){let i=e.indexOf(`[`,r);if(i===-1)break;let a=e.indexOf(`]`,i+1);if(a===-1)break;r=a+1;let o=n(r);if(!o)continue;r=o.end;let s=e.slice(o.hrefStart,o.hrefEnd).trim();s&&t.push(s)}return t}function H(t,r,a=r){if(!t)return null;let o=P(t);if(!o)return null;let c=s(o);return A(c)?a?i(c,a):null:n(o.path)&&e(o.path,r)===null?null:c}function U(e){return/^[A-Za-z]:[\\/]/.test(E(e))}function W(e){let n=t(e)||e.startsWith(`//`),r=n?e.replaceAll(`\\`,`/`):e,i=n?/^(?:[a-z]:\/|\/\/[^/]+\/[^/]+(?:\/|$))/i.exec(r)?.[0]:r.startsWith(`/`)?`/`:void 0;if(!i)return;let a=[];for(let e of r.slice(i.length).split(`/`))e&&e!==`.`&&(e===`..`?a.pop():a.push(e));let o=i.replace(/\/$/,``);return{root:n?o.toLowerCase():o,segments:a,windows:n}}function G(e,t){let n=W(e),r=t?W(t):void 0;return!n||!r||n.windows!==r.windows||n.root!==r.root||n.segments.length<=r.segments.length||!r.segments.every((e,t)=>r.windows?e.toLowerCase()===n.segments[t]?.toLowerCase():e===n.segments[t])?{kind:`file`,path:e}:{kind:`file`,path:e,relativePath:n.segments.slice(r.segments.length).join(`/`)}}function K(e){if(/^(?:https?:\/\/|\/\/)/i.test(e))try{let t=new URL(e.startsWith(`//`)?`https:${e}`:e);return t.protocol===`http:`||t.protocol===`https:`?{kind:`url`,url:e}:void 0}catch{return}}function q(e){if(e.kind===`file`){let n=t(e.path)||e.path.startsWith(`//`);return e.path.split(n?/[\\/]/:`/`).at(-1)||void 0}let n;try{let t=e.url;n=new URL(t.startsWith(`//`)?`https:${t}`:t).pathname.split(`/`).at(-1)}catch{return}return n?E(n):void 0}export{V as a,A as c,H as d,E as f,L as i,U as l,q as n,T as o,O as p,K as r,k as s,G as t,D as u};
|
|
2
|
-
//# sourceMappingURL=mediaReference-BIsAfUoY.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$o as t,Cs as n,Hc as r,Jo as i,Wo as a,Zo as o,as as s,es as c,is as l,ls as u,os as d,rc as f,ws as p}from"./utils-Cs97wR6T.js";import{$u as ee,Bo as te,Cu as m,Gd as h,Hc as g,Pf as _,Po as v,Q as ne,Qd as re,Sc as ie,Tm as ae,Up as oe,Uu as y,Xc as se,_c as ce,at as le,dh as ue,et as de,hd as b,hu as fe,ic as pe,if as me,it as he,ka as ge,n as x,nm as S,nt as C,ot as w,pc as T,rd as E,sh as D,st as O,td as k,zs as A}from"./src-BZzGU-vc.js";import{Ar as j,G as M,Mr as N,V as P,Vr as F,W as I,ci as L,hi as _e,tt as R}from"./runtime-DUPVFypn.js";import{O as ve}from"./useSettings-C6RmJr-q.js";import{i as ye,n as z}from"./session-BryEqNW-.js";var be=e(),xe=class extends ce()(`RelayClientInstallConfirmationConflictError`,{requestedVersion:T,activeVersion:T,activeDialogStatus:pe([`confirming`,`installing`,`closing`]),activeInstallStage:se(ne)}){get message(){return`Cannot confirm relay client installation ${this.requestedVersion}; installation ${this.activeVersion} has dialog status ${this.activeDialogStatus}.`}},B={status:`idle`},V=B,H=null,U=new Set;function W(e){V=e;for(let e of U)e()}function Se(){return V}function Ce(e){return U.add(e),()=>{U.delete(e)}}function we(e){if(V.status!==`idle`){let t=V.status===`closing`?V.view:V;return Promise.reject(new xe({requestedVersion:e,activeVersion:t.version,activeDialogStatus:V.status,...t.status===`installing`?{activeInstallStage:t.stage}:{}}))}return W({status:`confirming`,version:e}),new Promise(e=>{H=e})}function Te(e){if(V.status!==`confirming`||!H)return;let t=H;H=null,W(e?{status:`installing`,version:V.version,stage:`checking`}:{status:`closing`,view:V}),t(e)}function Ee(e){V.status===`installing`&&e.type===`progress`&&W({...V,stage:e.stage})}function De(){H?.(!1),H=null,(V.status===`confirming`||V.status===`installing`)&&W({status:`closing`,view:V})}function Oe(){V.status===`closing`&&W(B)}function G(){return M().relayUrl}var K=class extends S(`CloudEnvironmentLinkError`){},q=e=>t=>new K({message:e,cause:t});function ke(e){return y(function*(){let t=yield*F,n=yield*t.run(e,j(x.cloudGetRelayClientStatus,{})).pipe(E(q(`Could not check relay client availability.`)));if(n.status===`available`)return;if(n.status===`unsupported`)return yield*new K({message:`P4 Code cannot install the relay client automatically on ${n.platform}-${n.arch}.`});if(!(yield*re({try:()=>we(n.version),catch:q(`Could not confirm relay client installation.`)})))return yield*new K({message:`Relay client installation was cancelled.`});let r=yield*t.runStream(e,N(x.cloudInstallRelayClient,{}).pipe(te(e=>h(()=>Ee(e))))).pipe(v,E(q(`Could not install the relay client.`)),m(h(De)));if(ue(r)||r.value.type!==`complete`)return yield*new K({message:`The relay client install completed without a final status.`});let i=r.value.status;if(i.status!==`available`)return yield*new K({message:i.status===`unsupported`?`P4 Code cannot install the relay client automatically on ${i.platform}-${i.arch}.`:`The relay client is still unavailable after installation.`})})}var Ae=g(ie([C,O,le,he,w,de]));function J(e){return t=>{let n=t._tag===`ManagedRelayRequestFailedError`?t:void 0,r=n?.traceId,i=n?_e(n):null;return new K({message:i?`${e}: ${i}`:e,cause:t,...r?{traceId:r}:{}})}}function Y(e){return Ae(e)?e:typeof e!=`object`||!e?null:`cause`in e?Y(e.cause):null}var X=e=>t=>{let n=Y(t);return new K({message:n?`${e.replace(/[.:]$/,``)}: ${n.message}`:e,cause:t})};function je(e){let t=new URL(e);return{localHttpHost:`127.0.0.1`,localHttpPort:Number(t.port||(t.protocol===`https:`?443:80))}}var Me=`cloudflare_tunnel`;function Ne(e){return e.link.environmentId===e.expectedEnvironmentId?e.link.endpoint.providerKind===e.expectedProviderKind?me:new K({message:`Relay returned credentials for a different endpoint provider.`}):new K({message:`Relay returned credentials for a different environment.`})}function Pe(e){return y(function*(){return yield*(yield*f(e.target.httpBaseUrl)).connect.linkState({headers:{}}).pipe(E(X(`Could not read environment cloud link state.`)))}).pipe(b(R))}function Fe(e){return y(function*(){let t=yield*f(e.target.httpBaseUrl),{target:n,...r}=e;return yield*t.connect.preferences({headers:{},payload:r}).pipe(E(X(`Could not update environment cloud preferences.`)))}).pipe(b(R))}function Ie(e){return y(function*(){yield*(yield*f(e.target.httpBaseUrl)).connect.unlink({headers:{}}).pipe(E(X(`Could not unlink the environment from cloud.`))),G()&&e.clerkToken&&(yield*(yield*L).unlinkEnvironment({clerkToken:e.clerkToken,environmentId:A.make(e.target.environmentId)}).pipe(fe(e=>ee(`Could not revoke cloud environment link after local unlink.`,{cause:e}))))}).pipe(b(R))}var Z=`manual`;function Le(e){return y(function*(){let t=G();if(!t)return yield*new K({message:`P4CODE_RELAY_URL is not configured.`});let n=(e.mode??`managed`)===`managed`,r=n?Me:Z,i=yield*L,a=yield*f(e.target.httpBaseUrl);n&&(yield*ke(A.make(e.target.environmentId)));let o=yield*i.createEnvironmentLinkChallenge({clerkToken:e.clerkToken,payload:{notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:n}}).pipe(E(J(`${t}/v1/client/environment-link-challenges failed`))),s=yield*a.connect.linkProof({headers:{},payload:{challenge:o.challenge,relayIssuer:t,endpoint:{httpBaseUrl:e.target.httpBaseUrl,wsBaseUrl:e.target.wsBaseUrl,providerKind:r},origin:je(e.target.httpBaseUrl)}}).pipe(E(X(`Could not obtain environment link proof.`))),c=yield*i.linkEnvironment({clerkToken:e.clerkToken,payload:{proof:s,notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:n}}).pipe(E(J(`${t}/v1/client/environment-links failed`)));yield*Ne({expectedEnvironmentId:e.target.environmentId,expectedProviderKind:r,link:c}),yield*a.connect.relayConfig({headers:{},payload:{relayUrl:t,relayIssuer:c.relayIssuer,cloudUserId:c.cloudUserId,environmentCredential:c.environmentCredential,cloudMintPublicKey:c.cloudMintPublicKey,endpointRuntime:c.endpointRuntime}}).pipe(E(X(`Could not configure environment relay access.`)))}).pipe(b(R))}var Re=l(_(r,P.contextEffect.pipe(k(e=>ae(e,r))))),Q=o(e=>{let t=JSON.parse(e);return Re.atom(Pe({target:t})).pipe(d({staleTime:5e3,revalidateOnMount:!0}),s(3e5),u(`primary-cloud-link:${t.environmentId}`))}),ze=c(n(null)).pipe(t,u(`primary-cloud-link:null`));function $(e){return JSON.stringify(e)}function Be(e){e&&z(A.make(e.environmentId),`relay:read`)&&a.refresh(Q($(e)))}function Ve(e){if(!z(A.make(e.environmentId),`relay:read`))return null;let t=a.get(Q($(e)));return t._tag===`Success`?t.value:null}function He(){let e=(0,be.c)(17),t=ve(),n=ye(t?.environmentId??null,ge),r;e[0]===t?r=e[1]:(r=t?.entry.target._tag===`PrimaryConnectionTarget`?{environmentId:t.environmentId,label:t.label,httpBaseUrl:t.entry.target.httpBaseUrl,wsBaseUrl:t.entry.target.wsBaseUrl}:null,e[0]=t,e[1]=r);let a=r,o;e[2]!==n||e[3]!==a?(o=a&&I()&&n?Q($(a)):ze,e[2]=n,e[3]=a,e[4]=o):o=e[4];let s=i(o),c;e[5]===a?c=e[6]:(c=()=>{Be(a)},e[5]=a,e[6]=c);let l=c,u=null;if(s._tag===`Failure`){let t;e[7]===s.cause?t=e[8]:(t=oe(s.cause),e[7]=s.cause,e[8]=t);let n=t;u=n instanceof Error?n.message:`Could not read P4 Connect link state.`}let d;e[9]===s?d=e[10]:(d=s._tag===`Failure`?null:D(p(s)),e[9]=s,e[10]=d);let f;return e[11]!==u||e[12]!==l||e[13]!==s.waiting||e[14]!==d||e[15]!==a?(f={data:d,error:u,isPending:s.waiting,refresh:l,target:a},e[11]=u,e[12]=l,e[13]=s.waiting,e[14]=d,e[15]=a,e[16]=f):f=e[16],f}export{Fe as a,Te as c,Ie as i,Ce as l,He as n,Oe as o,Le as r,Se as s,Ve as t};
|
|
2
|
-
//# sourceMappingURL=primaryCloudLinkState-B6CxZwAR.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Jo as t}from"./utils-Cs97wR6T.js";import{B as n,H as r,la as i}from"./src-BZzGU-vc.js";import{or as a,rr as o}from"./runtime-DUPVFypn.js";import{Y as s}from"./entities-CpJdh0W5.js";import{at as c,ot as l}from"./ChatMarkdown-LYkpVHJO.js";import{a as u}from"./relay-CnLeC-mg.js";import{J as d}from"./useSettings-C6RmJr-q.js";import{f}from"./server-BYnv0CK4.js";import{t as p}from"./use-atom-command-DMW6SFOx.js";import{u as m}from"./rightPanelStore-D-meSGn7.js";import{a as h}from"./fileLinks-LQyYck3z.js";var g=e();function _(e){if(e.startsWith(`/`)||o(e)||/^[a-zA-Z]:/.test(e))return null;let t=e.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0&&e!==`.`);return t.length===0||t.includes(`..`)?null:t}function v(e,t){if(!e||!t)return null;let n=a(e),r=a(t);if(n===r)return[];let i=r.includes(`\\`)?`\\`:`/`,o=r.endsWith(i)?r:`${r}${i}`;return n.startsWith(o)?n.slice(o.length).split(/[\\/]+/).filter(Boolean):null}function y(e){let t=_(e.filePath);if(!t)return null;let n=v(e.workspaceRoot,e.repositoryRoot);if(!n||n.length===0)return t.join(`/`);let r=e.repositoryRoot?o(e.repositoryRoot):!1;if(!n.every((e,n)=>{let i=t[n];return i===void 0?!1:r?i.toLowerCase()===e:i===e}))return null;let i=t.slice(n.length);return i.length>0?i.join(`/`):null}function b({threadRef:e,filePath:t,activeCwd:n,repositoryRoot:r,openInEditor:i}){let a=y({filePath:t,workspaceRoot:n,repositoryRoot:r});a&&(e?m.getState().openFile(e,a):i(n?h(a,n):a))}function x(e){let t=y({filePath:e.filePath,workspaceRoot:e.workspaceRoot,repositoryRoot:e.repositoryRoot});return t===null?null:e.workspaceRoot===void 0?t.startsWith(`/`)||/^[a-zA-Z]:/.test(t)?t:null:h(t,e.workspaceRoot)}var S=new Map(r.map(e=>[e.id,e.label]));function C(e){if(!e.hasAbsolutePath)return[];let t=[];e.capabilities.canOpenDefault&&t.push({id:`open`,label:`Open`,icon:`pencil`}),e.capabilities.revealLabel!==void 0&&t.push({id:`reveal-in-folder`,label:e.capabilities.revealLabel,icon:`folder-tree`});let n=e.capabilities.editorIds.filter(e=>e!==`file-manager`);return n.length>0&&t.push({id:`open-with`,label:`Open with`,children:n.map(e=>({id:`editor:${e}`,label:S.get(e)??e}))}),t}function w(e){let n=(0,g.c)(28),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},n[0]=r):r=n[0];let i=p(s.openInEditor,r),a;n[1]===e?a=n[2]:(a=f.configValueAtom(e),n[1]=e,n[2]=a);let o=t(a),m;n[3]===o?.availableEditors?m=n[4]:(m=o?.availableEditors??[],n[3]=o?.availableEditors,n[4]=m);let h=m,_;n[5]!==e||n[6]!==o?(_=e!==null&&o?.shellRevealInFileManager===!0&&o.availableEditors.includes(`file-manager`)?o.shellRevealInFileManagerKind===void 0?l(o.environment.platform.os):c(o.shellRevealInFileManagerKind):void 0,n[5]=e,n[6]=o,n[7]=_):_=n[7];let v;n[8]===h?v=n[9]:(v=h.includes(`file-manager`),n[8]=h,n[9]=v);let y;n[10]!==h||n[11]!==_||n[12]!==v?(y={revealLabel:_,canOpenDefault:v,editorIds:h},n[10]=h,n[11]=_,n[12]=v,n[13]=y):y=n[13];let b=y,w;n[14]!==b||n[15]!==e||n[16]!==i?(w=async(t,n)=>{let r=x(n);if(r===null||e===null)return;let a=t===`reveal-in-folder`,o=t===`open`||a?`file-manager`:t.slice(7);(t===`open`||a||b.editorIds.includes(o))&&(await i({environmentId:e,input:{cwd:r,editor:o,...a?{reveal:!0}:{}}}))._tag===`Failure`&&u.add({type:`error`,title:t===`open`?`Could not open file`:a?`Unable to reveal file`:`Could not open in ${S.get(o)??o}`,description:r})},n[14]=b,n[15]=e,n[16]=i,n[17]=w):w=n[17];let T=w,E;n[18]!==T||n[19]!==b?(E=async(e,t)=>{let n=d(),r=C({hasAbsolutePath:x(e)!==null,capabilities:b});if(r.length===0||n===void 0)return;let i=await n.contextMenu.show(r,t);i!==null&&await T(i,e)},n[18]=T,n[19]=b,n[20]=E):E=n[20];let D=E,O;n[21]===b?O=n[22]:(O=e=>C({hasAbsolutePath:x(e)!==null,capabilities:b}),n[21]=b,n[22]=O);let k;return n[23]!==T||n[24]!==b||n[25]!==D||n[26]!==O?(k={buildItems:O,capabilities:b,activate:T,show:D},n[23]=T,n[24]=b,n[25]=D,n[26]=O,n[27]=k):k=n[27],k}function T(e){let t=(0,g.c)(2),n=w(e),r;return t[0]===n?r=t[1]:(r=(e,t)=>{n.show(e,t?{x:t.clientX,y:t.clientY}:void 0)},t[0]=n,t[1]=r),r}function E(e){return e.replaceAll(`\\`,`/`)}function D(e){let t=new Set;return e.filter(e=>{let n=e.name.trim().toLowerCase();return!t.has(n)&&(t.add(n),!0)})}function O(e){return e.enabled&&e.userInvocable!==!1}function k(e,t){return t?D(e.filter(O)):[]}function A(e,t){let n=new Set(t.map(e=>e.name.trim().toLowerCase()));return e.filter(e=>!n.has(e.name.trim().toLowerCase()))}function j(e){let t=E(e.path);if(t.includes(`/.codex/plugins/`)||t.includes(`/.agents/plugins/`))return`app`;switch(e.scope?.trim().toLowerCase()){case`repo`:case`repository`:return`repo`;case`project`:case`workspace`:case`local`:return`project`;case`user`:case`personal`:return`personal`;case`system`:return`system`;case void 0:case``:return`other`;default:return`other`}}function M(e,t){if(t)return e.workspaceSnapshots?.find(e=>e.cwd===t)}function N(e,t){let n=e&&M(e,t);return!(!n||n.slashCommandsPending)}function P(e,t,n,r){if(!N(t,n))return!1;if(F(t,n,r))return!0;let i=e?M(e,n):void 0;return(t?M(t,n):void 0)?.checkedAt!==i?.checkedAt}function F(e,t,r){let i=e&&M(e,t);return!!(i&&!i.slashCommandsPending&&n(i,r))}function I(e,t,n,r){let a=M(e,t)?.skills??e.skills;if(!n||!i(e.driver))return a;let o=r?n.projectSettingsOverrides[r]?.skillOverrides:void 0;return a.map(e=>({...e,enabled:o?.[e.name]??n.skillOverrides[e.name]??e.enabled}))}function L(e,t,n,r){let a=M(e,t)?.slashCommands??e.slashCommands;if(!n||!i(e.driver))return a;let o=new Set(I(e,t,n,r).filter(e=>!e.enabled).map(e=>e.name));return a.filter(e=>!o.has(e.name))}export{F as a,j as c,w as d,T as f,N as i,I as l,k as n,O as o,b as p,A as r,P as s,D as t,L as u};
|
|
2
|
-
//# sourceMappingURL=providerSkills-yqPKKW6i.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Jo as r,Wo as i,Zo as a,as as o,cs as s,es as c,ls as l,ws as u}from"./utils-Cs97wR6T.js";import{Fc as d,Xc as f,Ys as p,br as m,hc as h,kr as ee,pc as g,sh as _,uc as te,vr as ne,xr as v,zs as y}from"./src-BZzGU-vc.js";import{Un as re,ct as ie,ot as ae,st as oe,t as b,zn as se}from"./runtime-DUPVFypn.js";import{z as ce}from"./entities-CpJdh0W5.js";import{t as le}from"./query-DpmTmXUV.js";import{n as x}from"./sourceControlClients-CG8qRQgm.js";import{o as S}from"./threadSort-Bd2rijEy.js";var C=e(t(),1),w=n(),ue=e=>`${e.environmentId??``} ${e.host}`,T={reviewRequested:`Review requested`,authored:`Authored`,others:`Others`};function E(e){let t=e?.trim().toLowerCase()??``;return t.length>0?t:null}function de(e){let t=e?.trim().replace(/^#/,``)??``;return/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:null}function fe(e,t){let n=new Map,r=new Map,i=new Map(e.map(e=>[P(e),e]));for(let e of i.values()){let i=t===`all`||e.state===t;if(e.author!==null){let t=E(e.author.login);if(t!==null){let r=n.get(t);n.set(t,{actor:r?.actor??e.author,count:(r?.count??0)+Number(i),mergedCount:(r?.mergedCount??0)+Number(e.state===`merged`)})}}if(i)for(let t of e.labels){let e=E(t.name);if(e===null)continue;let n=r.get(e);r.set(e,{...t,name:n?.name??t.name,color:n?.color??t.color,count:(n?.count??0)+1})}}return{authors:[...n.values()].filter(e=>e.count>0).toSorted((e,t)=>t.mergedCount-e.mergedCount||t.count-e.count||e.actor.login.localeCompare(t.actor.login)),labels:[...r.values()].toSorted((e,t)=>t.count-e.count||e.name.localeCompare(t.name))}}function D(e,t){return E(t[ue(e)]??t[e.host])}function O(e,t){let n=D(e,t);return n!==null&&E(e.author?.login)===n}var pe={approved:`approved`,changes_requested:`changes-requested`,"changes-requested":`changes-requested`,required:`review-required`,"review-required":`review-required`,none:`none`},me={success:`passing`,passing:`passing`,failure:`failing`,failing:`failing`},he=/(?:[^\s"]|"[^"]*")+/g,k=10,A=200;function j(e){return e.replaceAll(`"`,``).trim()}function M(e){if(/^\s*"[^"]*"\s*$/.test(e)){let t=j(e);return t.length===0?[]:[t]}return e.split(`,`).map(e=>j(e)).filter(e=>e.length>0)}function N(e){return e.slice(0,k).map(e=>e.slice(0,A).trim()).filter(e=>e.length>0)}function ge(e){let t=[],n=[],r=[],i,a,o,s;for(let[c]of e.matchAll(he)){let e=/^(-?)([A-Za-z][A-Za-z0-9_-]*):(.*)$/.exec(c),l=e===null?``:j(e[3]??``),u=e?.[1]===`-`;switch(l.length===0?``:e?.[2]?.toLowerCase()??``){case`label`:{let t=N(M(e?.[3]??``));if(t.length===0)break;u?r.push(...t):n.push(t);continue}case`author`:if(u)break;i=l.slice(0,A).trim();continue;case`draft`:if(u||l.toLowerCase()!==`true`&&l.toLowerCase()!==`false`)break;a=l.toLowerCase()===`true`?`only`:`hide`;continue;case`review`:{let e=u?void 0:pe[l.toLowerCase()];if(e===void 0)break;o=e;continue}case`status`:case`checks`:{let e=u?void 0:me[l.toLowerCase()];if(e===void 0)break;s=e;continue}case``:break;default:if(!l.startsWith(`/`)){let t=N(M(e?.[3]??``).map(t=>t.includes(`:`)?t:`${e?.[2]??``}:${t}`));if(t.length===0)break;u?r.push(...t):n.push(t);continue}}t.push(c)}return{text:t.join(` `),filters:{...n.length===0?{}:{labels:n.slice(0,k)},...r.length===0?{}:{excludedLabels:r.slice(0,k)},...i===void 0?{}:{author:i},...a===void 0?{}:{draft:a},...o===void 0?{}:{review:o},...s===void 0?{}:{checks:s}}}}function _e(e,t){let n=t.trim().toLowerCase();return n.length===0||`#${e.number} ${e.title} ${e.repository} ${e.headBranch} ${e.author?.login??``}`.toLowerCase().includes(n)}function ve(e,t,n){return n===`reviewing`?e.filter(e=>e.viewerReviewRequested):n===`authored`?e.filter(e=>O(e,t)):e}function ye(e,t){return e.filter(e=>(t.state===`all`||e.state===t.state)&&(t.projectId===void 0||e.projectId===t.projectId)&&(t.host===void 0||e.host===t.host))}function be(e,t,n){let r=e.labels.map(e=>e.name.trim().toLowerCase()),i=e=>r.includes(e.trim().toLowerCase());return(t.draft===void 0||e.isDraft===(t.draft===`only`))&&(t.review===void 0||(t.review===`none`?e.reviewDecision===void 0:e.reviewDecision===t.review))&&(t.labels===void 0||t.labels.every(e=>e.some(i)))&&(t.excludedLabels===void 0||!t.excludedLabels.some(i))&&(t.author===void 0||e.author?.login.toLowerCase()===ee(t.author,n).toLowerCase())}function xe(e,t){let n={reviewRequested:[],authored:[],others:[]};for(let r of e)O(r,t)?n.authored.push(r):r.viewerReviewRequested?n.reviewRequested.push(r):n.others.push(r);return[`authored`,`reviewRequested`,`others`].filter(e=>n[e].length>0).map(e=>({key:e,label:T[e],entries:n[e]}))}function P(e){return`${e.environmentId===void 0?``:`${e.environmentId}:`}${e.host}:${e.repository}#${e.number}`}var F=500;function Se(e,t,n,r){let i=new Set(n.flatMap(e=>[...e.keys]));return new Set([...t].filter(t=>{let n=e.get(t);return n!==void 0&&n.additions===0&&n.deletions===0&&!i.has(t)&&!r.has(L(n))}))}function Ce(e,t){let n=new Map;for(let r of t){let t=e.get(r);if(t===void 0)continue;let i=n.get(t.environmentId)??[];i.push({key:r,ref:{projectId:t.projectId,repository:t.repository,number:t.number}}),n.set(t.environmentId,i)}return[...n].flatMap(([e,t])=>{let n=[];for(let r=0;r<t.length;r+=F){let i=t.slice(r,r+F);n.push({environmentId:e,input:{refs:i.map(e=>e.ref)},keys:new Set(i.map(e=>e.key))})}return n})}function I({entriesByKey:e,candidateKeys:t,policy:n,activeBatches:r,statsByRow:i,refresh:a=!1}){let o=n===`eager`?new Set(e.keys()):t;return Ce(e,a?o:Se(e,o,r,i))}function we({requestedScope:e,currentScope:t,entriesByKey:n,candidateKeys:r,statsByRow:i}){return e.key!==t.key||e.policy!==t.policy?null:I({entriesByKey:n,candidateKeys:r,policy:e.policy,activeBatches:[],statsByRow:i,refresh:!0})}function Te(e,t){return e.filter(e=>{for(let n of e.keys)if(t.has(n))return!0;return!1})}function Ee(e,t,n){let r=new Map(t.map(e=>[P(e),e])),i=new Map(n.flatMap(e=>{let t=P(e);return r.has(t)?[]:[[t,e]]})),a=[];for(let t of e){let e=P(t);r.has(e)?r.set(e,t):i.has(e)?i.set(e,t):a.push(t)}return[{key:`authored`,entries:[...r.values()].toSorted(H)},{key:`reviewRequested`,entries:[...i.values()].toSorted(H)},{key:`others`,entries:a}].filter(e=>e.entries.length>0).map(e=>({...e,label:T[e.key]}))}function De(e,t){if(t.length===0)return e;let n=new Map(e);for(let e of t)n.set(L(e),{additions:e.additions,deletions:e.deletions});return n}var L=e=>`${e.environmentId} ${e.projectId} ${e.number}`;function Oe(e){if(e.length===0)return null;let t={},n=[],r=new Map,i=[],a=[],o={},s=!1;for(let[c,l]of e){for(let[e,n]of Object.entries(l.viewers))t[`${c} ${e}`]=n;for(let e of l.providers){let t=r.get(e.host);r.set(e.host,t===void 0?e:{...t.configured?t:e,projectCount:t.projectCount+e.projectCount,searchesOnHost:t.searchesOnHost&&e.searchesOnHost,configured:t.configured||e.configured})}i.push(...l.entries.map(e=>({...e,environmentId:c}))),a.push(...l.errors.map(e=>({...e,environmentId:c}))),s||=l.truncated,l.truncated&&n.push(c),Object.keys(l.nextCursors).length>0&&(o[c]=l.nextCursors)}return{viewers:t,providers:[...r.values()],entries:i.toSorted(H),errors:a,truncated:s,nextCursors:o,truncatedEnvironments:n}}var R=99,ke=e=>[...e].sort((e,t)=>e.localeCompare(t)).join(`,`),z=e=>`p4.pullRequests.list:${e}`,B=h({...ne.fields,environmentId:y}),Ae=h({...m.fields,environmentId:y}),je=d(h({scope:g,data:h({...v.fields,entries:p(B),errors:p(Ae),nextCursors:te(g,v.fields.nextCursors),truncatedEnvironments:p(g)}),partitions:f(h({authored:p(B),reviewing:p(B)}))}));function Me(e,t){try{let n=e?.getItem(z(t));if(!n)return null;let r=je(JSON.parse(n));return r._tag===`Some`?r.value:null}catch{return null}}function Ne(e,t,n){try{e?.setItem(z(t),JSON.stringify({scope:n.scope,data:{...n.data,entries:n.data.entries.slice(0,R),errors:[],nextCursors:{},truncatedEnvironments:[]},...n.partitions===void 0?{}:{partitions:{authored:n.partitions.authored.slice(0,R),reviewing:n.partitions.reviewing.slice(0,R)}}}))}catch{}}function Pe(e,t,n){return e===void 0||!n||t.some(t=>t.id===e)?e:void 0}function Fe(e,t,n){if(n===void 0)return;let r=e.filter(e=>e.id===n);return t==null?r.length===1?r[0]:void 0:r.find(e=>e.environmentId===t)}function Ie(e,t,n,r,i){if(n!==void 0)return e.filter(e=>e===n.environmentId);if(r===void 0||!i)return e;let a=new Set(t.filter(e=>e.id===r).map(e=>e.environmentId));return e.filter(e=>a.has(e))}function Le(e,t,n){return e===void 0?n:t.has(e)?e:n}function V(e,t){let n=t.trim().toLowerCase();if(n.length===0)return 0;let r=n.replace(/^#/u,``);if(/^\d+$/u.test(r))return String(e.number)===r?100:0;let i=e.title.toLowerCase(),a=n.split(/\s+/u).filter(e=>e.length>0);return i===n?90:i.includes(n)?80:a.length>1&&a.every(e=>i.includes(e))?70:e.headBranch.toLowerCase().includes(n)?60:(e.author?.login??``).toLowerCase().includes(n)?50:e.repository.toLowerCase().includes(n)?40:a.some(e=>i.includes(e))?30:10}function Re(e,t){return t.trim().length===0?e:e.toSorted((e,n)=>{let r=V(n,t)-V(e,t);return r===0?H(e,n):r})}function ze(e,t=e=>e.additions+e.deletions>0){let n=e=>e.mergeability===`conflicting`?4:e.state===`open`?e.isDraft?2:e.checksState===`passing`&&e.reviewDecision===`approved`?0:e.checksState===`passing`?1:2:3;return e.toSorted((e,r)=>{let i=n(e)-n(r);if(i!==0)return i;let a=Number(t(r))-Number(t(e)),o=e.additions+e.deletions-(r.additions+r.deletions);return a||o||H(e,r)})}function H(e,t){let n=S(e.updatedAt),r=S(t.updatedAt),i=Number(n===null)-Number(r===null);return i===0?n===null||r===null?0:r-n:i}function U(e,t){return e.toSorted((e,n)=>{let r=t(e)-t(n);return r===0?H(e,n):r})}function Be(e){return U(e,e=>e.state===`open`?e.mergeability===`conflicting`?0:e.reviewDecision===`changes-requested`?1:e.checksState===`failing`?2:e.isDraft?3:e.checksState===`passing`&&e.reviewDecision===`approved`?5:4:6)}function Ve(e){return U(e,e=>e.state===`open`?0:1)}function He(e,t,n,r=e=>e.additions+e.deletions>0,i=`all`){let a=t=>e.map(e=>({...e,entries:t(e.entries)}));if(t===`ready`)return n.trim().length===0?a(e=>ze(e,r)):e;if(t===`blocked`){if(n.trim().length>0)return e;let t=e=>e===`others`?i:e===`authored`?`authored`:`reviewing`;return e.map(e=>{let n=t(e.key);if(n===`all`)return e;let r=n===`authored`?Be:Ve;return{...e,entries:r(e.entries)}})}if(t===`updated`)return e;let o=e=>S(e.updatedAt)??S(e.createdAt)??0;return a(e=>e.toSorted((e,n)=>{if(t===`newest`||t===`oldest`){let r=S(e.createdAt),i=S(n.createdAt),a=Number(i!==null)-Number(r!==null),s=(r??0)-(i??0);return a||(t===`newest`?-s:s)||o(n)-o(e)}let i=Number(r(n))-Number(r(e)),a=e.additions+e.deletions-(n.additions+n.deletions);return i||(t===`largest`?-a:a)||o(n)-o(e)}))}function Ue(e,t){if(e.additions!==0||e.deletions!==0)return e;let n=t.get(L(e));return n===void 0?e:{...e,...n}}function We(e,t,n,r){let i={updatedAt:n.toISOString(),token:r,at:n.getTime()};switch(t){case`close`:return{state:`closed`,...i};case`reopen`:return{state:`open`,...i};case`merge`:return{state:`merged`,...i};case`draft`:return{state:e.state,isDraft:!0,...i};case`ready`:return{state:e.state,isDraft:!1,...i};default:return null}}function Ge(e,t,n,r){if(t.size===0&&r===`all`)return e;let i=[];for(let a of e){let e=t.get(n(a));(r===`all`||(e?.state??a.state)===r)&&i.push(e===void 0?a:{...a,...e})}return t.size===0&&i.length===e.length?e:i}function Ke(e,t,n){if(e.length===0)return t;let r=new Map(e.map(e=>[n(e),e])),i=0,a=t.map(e=>{let t=r.get(n(e));return t!==void 0&&JSON.stringify(t)===JSON.stringify(e)?(i+=1,t):e});return i===t.length&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))?e:a}var qe=6e4;function Je(e,t,n,r){if(e.size===0)return e;let i=new Map(t.map(e=>[n(e),e])),a=new Map;for(let[t,n]of e){let e=i.get(t);if(e===void 0){a.set(t,n);continue}let o=e.state===n.state&&(n.isDraft===void 0||e.isDraft===n.isDraft),s=r-n.at>qe;!o&&!s&&a.set(t,n)}return a.size===e.size?e:a}function Ye(e){let t=new Map(e.flatMap(e=>e.actions===void 0?[]:[[e.host.toLowerCase(),new Set(e.actions)]])),n=new Set([`close`,`merge`,`ready`,`reopen`]),r=new Set;return e=>t.get(e.host.toLowerCase())??(e.provider===`github`?n:r)}function Xe(e,t){return(e.state===`merged`?[]:e.state===`closed`?[`reopen`]:e.isDraft?[`close`,`ready`]:[`close`,`merge`]).filter(e=>t.has(e))}var W=oe(b),Ze=ae(b,W.refreshes),G=a(e=>c(null).pipe(o(3e5),l(`web-pull-requests:observed-summary:${e}`)));function K(e,t){let n=Number(t.state===`merged`)-Number(e.state===`merged`);if(n!==0)return n;let r=Date.parse(t.updatedAt)-Date.parse(e.updatedAt);return r===0?e.observedAt===void 0&&t.observedAt===void 0?0:(t.observedAt??-1/0)-(e.observedAt??-1/0):r}function q(e,t){return e===null?t:t===null?e:K(e,t)>=0?t:e}function J(e){return{provider:e.provider,projectId:e.projectId,repository:e.repository,number:e.number,title:e.title,url:e.url,state:e.state,isDraft:e.isDraft,headBranch:e.headBranch,baseBranch:e.baseBranch,updatedAt:e.updatedAt,...e.observedAt===void 0?{}:{observedAt:e.observedAt},author:e.author,...e.reviewDecision===void 0?{}:{reviewDecision:e.reviewDecision},...e.checksState===void 0?{}:{checksState:e.checksState},mergeability:e.mergeability}}function Y(e,t){return JSON.stringify([e,t.projectId,t.repository.toLowerCase(),t.number])}function X(e,t){if(e===null)return t;if(t===null)return e;let n=K(e.summary,t.summary);return n===0&&e.summary.observedAt===void 0&&t.summary.observedAt===void 0&&(n=t.observedAt-e.observedAt),n>0?{...t,summary:{...t.summary,isDraft:t.summary.isDraft??e.summary.isDraft,mergeability:t.summary.mergeability??e.summary.mergeability,reviewDecision:t.summary.reviewDecision===void 0?e.summary.reviewDecision:t.summary.reviewDecision,checksState:t.summary.checksState===void 0?e.summary.checksState:t.summary.checksState}}:e}function Z(e,t,n,r){let a=G(Y(e,t));i.modify(a,e=>{let t=X(e,{summary:n,observedAt:r});return t===e?[!1,e]:[!0,t]})}function Qe(e,t){let n=e.snapshot?.updatedAt;return e.snapshot===null||n==null?null:{...e.snapshot,provider:(x.findByChangeRequestUrl(e.url)??x.get(void 0)).kind,projectId:t,repository:e.repository,number:e.number,url:e.url,updatedAt:n}}function Q(e,t){return t.host===void 0?``:`${e}:${se({...t,host:t.host})}`}var $e=c(e=>{let t=new Map;for(let n of e(ce.threadShellsAtom))for(let e of re(n.pullRequests)){let r=Qe(e,n.projectId);if(r===null)continue;let i=Q(n.environmentId,e);t.set(i,q(t.get(i)??null,r)??r)}return t}),et=a(e=>c(t=>t($e).get(e)??null).pipe(s((e,t)=>JSON.stringify(e)===JSON.stringify(t)),o(3e5)));function tt(e,t,n,i){let a=(0,w.c)(19),o=i===void 0?null:i,s;a[0]!==e||a[1]!==t?(s=G(e===null||t===null?`none`:Y(e,t)),a[0]=e,a[1]=t,a[2]=s):s=a[2];let c=r(s),l;a[3]!==e||a[4]!==t?(l=et(e===null||t===null?``:Q(e,t)),a[3]=e,a[4]=t,a[5]=l):l=a[5];let u=r(l),d,f;a[6]!==n||a[7]!==e||a[8]!==o||a[9]!==t?(d=()=>{e!==null&&t!==null&&n!==null&&o!==null&&Z(e,t,n,o)},f=[n,e,t,o],a[6]=n,a[7]=e,a[8]=o,a[9]=t,a[10]=d,a[11]=f):(d=a[10],f=a[11]),(0,C.useLayoutEffect)(d,f);let p;a[12]!==n||a[13]!==c||a[14]!==o?(p=X(c,n===null||o===null?null:{summary:n,observedAt:o})?.summary??n,a[12]=n,a[13]=c,a[14]=o,a[15]=p):p=a[15];let m=p,h;return a[16]!==u||a[17]!==m?(h=q(m,u),a[16]=u,a[17]=m,a[18]=h):h=a[18],h}var nt=ie(b,W.refreshes);function $(e,t){let n=a(n=>c(e=>{let r=JSON.parse(n),i=[],a=[],o=null,s=!1;for(let n of r){let r=e(t(n));s||=r.waiting,r._tag===`Failure`&&o===null&&(o=le(r.cause));let c=_(u(r));c!==null&&i.push([n.environmentId,c]),r._tag===`Success`&&a.push([n.environmentId,r.value,r.timestamp])}return{values:i,error:o,isPending:s,observations:a}}).pipe(l(`${e}:${n}`))),o=c({values:[],observations:[],error:null,isPending:!1}).pipe(l(`${e}:empty`));return function(e){let a=JSON.stringify(e),s=r(e.length===0?o:n(a)),c=(0,C.useCallback)(e=>{let n=e??JSON.parse(a);for(let e of new Set(n.map(t)))i.refresh(e)},[a]);return{...s,refresh:c}}}var rt=$(`web-pull-requests:list`,W.list),it=$(`web-pull-requests:list-stats`,W.listStats),at=$(`web-pull-requests:turn-refreshes`,({environmentId:e})=>W.refreshes({environmentId:e,input:{}}));function ot(e){let t=(0,w.c)(2),n;return t[0]===e?n=t[1]:(n=e.map(st),t[0]=e,t[1]=n),at(n).values}function st(e){return{environmentId:e,input:{}}}function ct(e){let t=(0,w.c)(4),n;t[0]===e?n=t[1]:(n=W.refreshes({environmentId:e,input:{}}),t[0]=e,t[1]=n);let i=r(n),a;return t[2]===i?a=t[3]:(a=_(u(i)),t[2]=i,t[3]=a),a}function lt(e){let t=(0,w.c)(10),n=rt(e),r,i;t[0]===n.observations?(r=t[1],i=t[2]):(r=()=>{for(let[e,t,r]of n.observations)for(let n of t.entries)Z(e,{projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},J(n),r)},i=[n.observations],t[0]=n.observations,t[1]=r,t[2]=i),(0,C.useLayoutEffect)(r,i);let a;t[3]===n.values?a=t[4]:(a=Oe(n.values),t[3]=n.values,t[4]=a);let o=a,s;return t[5]!==o||t[6]!==n.error||t[7]!==n.isPending||t[8]!==n.refresh?(s={data:o,error:n.error,isPending:n.isPending,refresh:n.refresh},t[5]=o,t[6]=n.error,t[7]=n.isPending,t[8]=n.refresh,t[9]=s):s=t[9],s}function ut(e){let t=(0,w.c)(6),n=it(e),r;t[0]===n.values?r=t[1]:(r=n.values.length===0?null:n.values.flatMap(dt),t[0]=n.values,t[1]=r);let i=r,a;return t[2]!==n.isPending||t[3]!==n.refresh||t[4]!==i?(a={stats:i,isPending:n.isPending,refresh:n.refresh},t[2]=n.isPending,t[3]=n.refresh,t[4]=i,t[5]=a):a=t[5],a}function dt(e){let[t,n]=e;return n.stats.map(e=>({...e,environmentId:t}))}export{Xe as A,V as B,L as C,Ye as D,ke as E,Pe as F,He as H,Ie as I,Le as L,I as M,Re as N,de as O,Me as P,Te as R,Ee as S,D as T,Ue as U,Je as V,Ne as W,be as _,nt as a,ye as b,ct as c,Ge as d,fe as f,xe as g,Fe as h,J as i,we as j,We as k,ot as l,ve as m,q as n,lt as o,H as p,W as r,ut as s,Ze as t,tt as u,_e as v,P as w,ge as x,De as y,Ke as z};
|
|
2
|
-
//# sourceMappingURL=pullRequests-u-PJpGXV.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{$o as r,Jo as i,Wo as a,Zo as o,as as s,dp as c,es as l,fs as u,gs as d,ls as f,up as p,ws as m,xs as h}from"./utils-Cs97wR6T.js";import{$s as g,$u as _,Ao as v,Ap as y,Au as b,Bc as x,C as ee,Cp as te,Cu as ne,Fc as re,Gd as S,Hd as C,Ic as ie,Jd as ae,Kd as oe,Km as se,Ko as ce,Mt as w,N as le,Nu as T,P as ue,Qm as de,Ro as fe,Sc as pe,Sf as me,Tu as E,Up as he,Uu as ge,Wd as _e,Yl as ve,Ys as ye,Zl as be,_c as D,_d as xe,_f as Se,au as O,bo as Ce,cc as k,co as we,dh as Te,eo as Ee,fm as De,gh as Oe,hh as A,hm as ke,hu as j,ic as Ae,if as je,iu as M,jo as Me,lc as Ne,mh as Pe,mo as N,n as P,no as Fe,pc as F,po as Ie,sh as Le,ud as Re,vc as ze,xo as Be,zs as I}from"./src-BZzGU-vc.js";import{Ar as Ve,Hr as He,Ir as Ue,Nr as We,Pr as Ge,Rr as Ke,Ur as L,_r as R,ai as qe,br as Je,gr as z,kr as Ye,t as B,vr as V,yr as Xe,zr as Ze}from"./runtime-DUPVFypn.js";import{a as H,i as U,n as Qe,r as $e,s as et,t as tt}from"./vcsRefInvalidation-CAa5en8i.js";import{G as nt,W as rt}from"./entities-CpJdh0W5.js";import{n as W}from"./query-DpmTmXUV.js";var G=n(),it=x(ze([ye(I),ee.fields.query])),at=re(it);function ot(e,t){return JSON.stringify([[...e].sort((e,t)=>e.localeCompare(t)),t])}function st(e){return at(e)}function ct(e){return JSON.stringify([e.environmentId,e.threadId])}function lt(e){return o(t=>l(n=>{let r=st(t);if(Te(r))return{matches:[],isLoading:!1};let[i,a]=r.value,o=[],s=!1;for(let t of i){let r=n(e.getSearchAtom(t,a));s||=r.waiting;let i=Le(m(r));i!==null&&o.push(...i.matches.map(e=>({...e,environmentId:t})))}return{matches:o,isLoading:s}}).pipe(f(`${e.labelPrefix}:${t}`)))}var K=e(t(),1);function ut(e){return{v2:{dispatchCommand:z(e,{label:`environment-data:orchestration-v2:dispatch-command`,tag:w.dispatchCommand}),threadProjection:R(e,{label:`environment-data:orchestration-v2:thread-projection`,tag:w.getThreadProjection,staleTimeMs:0,idleTtlMs:0}),shell:V(e,{label:`environment-data:orchestration-v2:shell`,tag:w.subscribeShell}),thread:V(e,{label:`environment-data:orchestration-v2:thread`,tag:w.subscribeThread,idleTtlMs:0})},turnDiff:R(e,{label:`environment-data:orchestration:turn-diff`,tag:w.getTurnDiff}),workflowScript:R(e,{label:`environment-data:orchestration:workflow-script`,tag:w.getWorkflowScript,staleTimeMs:3e5,idleTtlMs:3e5}),stopWorkflow:z(e,{label:`environment-data:orchestration:stop-workflow`,tag:w.stopWorkflow}),rankUserInput:z(e,{label:`environment-data:orchestration:rank-user-input`,tag:P.userInputRank,concurrency:{mode:`singleFlight`,key:({environmentId:e,input:t})=>JSON.stringify([e,t])}}),turnItem:R(e,{label:`environment-data:orchestration:turn-item`,tag:w.getTurnItem,staleTimeMs:6e4,idleTtlMs:6e4}),fullThreadDiff:R(e,{label:`environment-data:orchestration:full-thread-diff`,tag:w.getFullThreadDiff}),threadFind:R(e,{label:`environment-data:orchestration:thread-find`,tag:w.searchThread,staleTimeMs:0,idleTtlMs:0}),threadFindProgressive:V(e,{label:`environment-data:orchestration:thread-find-progressive`,tag:w.searchThreadStream,completeWhen:e=>e.complete!==!1,idleTtlMs:0}),threadSearch:R(e,{label:`environment-data:orchestration:thread-search`,tag:w.searchThreads,staleTimeMs:3e4,idleTtlMs:6e4}),archivedShellSnapshot:R(e,{label:`environment-data:orchestration:archived-shell-snapshot`,tag:w.getArchivedShellSnapshot})}}var q=ut(B),dt=96;function ft(e){let t=e.at(-1);return e.length>1&&t?.waiting===!0&&Te(m(t))}function pt({previousScrollTop:e,scrollTop:t,scrollHeight:n,clientHeight:r,distanceThreshold:i=dt}){return e===null||t<=e?!1:n-t-r<=i}var mt=RegExp(`^p4c[-/][0-9a-f]{8}$`);function ht(e){let t=e.indexOf(`/`);return t<=0||t===e.length-1?e:e.slice(t+1)}function gt(e){return mt.test(e.trim().toLowerCase())}function _t(e){return e.trim().replace(/[ \t\n\r\f\v]+/g,`-`)}var vt={hasUpstream:!1,aheadCount:0,behindCount:0,aheadOfDefaultCount:0,pr:null};function J(e,t){return{...e,...t??vt}}function yt(e){return{hasUpstream:e.hasUpstream,aheadCount:e.aheadCount,behindCount:e.behindCount,...e.aheadOfDefaultCount===void 0?{}:{aheadOfDefaultCount:e.aheadOfDefaultCount},pr:e.pr}}function bt(e){return{isRepo:e.isRepo,...e.sourceControlProvider?{sourceControlProvider:e.sourceControlProvider}:{},hasPrimaryRemote:e.hasPrimaryRemote,isDefaultRef:e.isDefaultRef,refName:e.refName,hasWorkingTreeChanges:e.hasWorkingTreeChanges,workingTree:e.workingTree,...e.branchChanges?{branchChanges:e.branchChanges}:{}}}function xt(e,t){switch(t._tag){case`snapshot`:return J(t.local,t.remote);case`localUpdated`:return J(t.local,e?yt(e):null);case`remoteUpdated`:return J(e===null?{isRepo:!0,hasPrimaryRemote:!1,isDefaultRef:!1,refName:null,hasWorkingTreeChanges:!1,workingTree:{files:[],insertions:0,deletions:0}}:bt(e),t.remote)}}var St=Ae([`refresh_status`,`run_change_request`,`pull`,`switch_ref`,`create_ref`,`create_worktree`,`init`,`publish_repository`,`prepare_pull_request_thread`]),Ct=class extends D()(`VcsActionUnavailableError`,{operation:St,environmentId:k(I),cwd:k(F)}){get message(){return`Source control operation '${this.operation.replaceAll(`_`,` `)}' is unavailable.`}},wt=class extends D()(`VcsActionRemoteFailureError`,{actionId:F,transportActionId:F,action:ue,environmentId:I,cwd:F,phase:k(le),remoteMessageLength:Ne}){get message(){let e=this.phase===null?`execution`:this.phase;return`Source control action '${this.action}' failed during ${e}.`}},Tt=class extends D()(`VcsActionMissingTerminalEventError`,{actionId:F,transportActionId:F,action:ue,environmentId:I,cwd:F}){get message(){return`Source control action '${this.action}' ended without a terminal result.`}},Et=class extends D()(`VcsActionTargetKeyParseError`,{keyLength:Ne,cause:g()}){get message(){return`Invalid source control action target key (${this.keyLength} characters).`}};pe([wt,Tt]);var Y=Object.freeze({isRunning:!1,operation:null,actionId:null,action:null,currentLabel:null,currentPhaseLabel:null,hookName:null,lastOutputLine:null,phaseStartedAtMs:null,hookStartedAtMs:null,error:null}),Dt=()=>be(ve()),Ot=0,kt=ie(ze([I,F])),X=o(e=>l(Y).pipe(r,f(`vcs-action:${e}`))),At=l(Y).pipe(r,f(`vcs-action:null`));function Z(e){return e.environmentId===null||e.cwd===null?null:JSON.stringify([e.environmentId,e.cwd])}function jt(e){try{let[t,n]=kt(JSON.parse(e));return{environmentId:t,cwd:n}}catch(t){throw new Et({keyLength:e.length,cause:t})}}function Mt(e){let t=Z(e);return t===null?At:X(t)}function Nt(){return Ot+=1,`local-vcs-action:${Ot}`}function Pt(e){let t=e.actionId??Nt(),n=Dt();return{...Y,isRunning:!0,operation:e.operation,actionId:t,currentLabel:e.label,currentPhaseLabel:e.label,phaseStartedAtMs:n}}function Ft(e,t,n){return{...Y,operation:e,actionId:t,error:n instanceof Error?n.message:`Source control action failed.`}}function It(e,t){let n=JSON.stringify([e.environmentId,e.cwd]);return`${n.length}:${n}${t}`}function Lt(e,t,n,r){return r.actionId!==t||r.cwd!==e.cwd?null:{...r,actionId:n}}function Rt(e,t){return _e(()=>{let n=null;return e.pipe(Me(e=>{let r=Lt(t.target,t.transportActionId,t.actionId,e);return r===null?je:((r.kind===`action_finished`||r.kind===`action_failed`)&&(n=r),t.onProgress(r))}),b(()=>n?.kind===`action_finished`?C(n.result):n?.kind===`action_failed`?E(new wt({actionId:t.actionId,transportActionId:t.transportActionId,action:n.action,environmentId:t.target.environmentId,cwd:t.target.cwd,phase:n.phase,remoteMessageLength:n.message.length})):E(new Tt({actionId:t.actionId,transportActionId:t.transportActionId,action:t.action,environmentId:t.target.environmentId,cwd:t.target.cwd}))))})}function zt(e,t){if(e.actionId!==t.actionId)return e;let n=Dt();switch(t.kind){case`action_started`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,phaseStartedAtMs:n,hookStartedAtMs:null,hookName:null,lastOutputLine:null,error:null};case`phase_started`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,currentLabel:t.label,currentPhaseLabel:t.label,phaseStartedAtMs:n,hookStartedAtMs:null,hookName:null,lastOutputLine:null,error:null};case`hook_started`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,currentLabel:`Running ${t.hookName}...`,hookName:t.hookName,hookStartedAtMs:n,lastOutputLine:null,error:null};case`hook_output`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,lastOutputLine:t.text,error:null};case`hook_finished`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,currentLabel:e.currentPhaseLabel,hookName:null,hookStartedAtMs:null,lastOutputLine:null,error:null};case`action_finished`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,error:null};case`action_failed`:return{...e,isRunning:!0,actionId:t.actionId,action:t.action,operation:`run_change_request`,error:t.message}}}function Bt(e){let t=new Map,n=n=>{let r=Z(n),i=r??JSON.stringify([`vcs-action-target:unavailable`,n.environmentId,n.cwd]),a=t.get(i);if(a!==void 0)return a;let o=r===null?null:jt(r),s=r===null?At:X(r),c=Je(e,{label:`vcs-action:run-stacked:${i}`,scheduler:H,concurrency:{mode:`serial`,key:()=>i},execute:(t,r)=>{if(o===null)return E(new Ct({operation:`run_change_request`,environmentId:n.environmentId,cwd:n.cwd}));let i=It(o,t.actionId);r.set(s,Pt({operation:`run_change_request`,label:`Running source control action`,actionId:t.actionId}));let a={actionId:i,cwd:o.cwd,action:t.action,...t.commitMessage?{commitMessage:t.commitMessage}:{},...t.featureBranch?{featureBranch:!0}:{},...t.filePaths?.length?{filePaths:[...t.filePaths]}:{},...t.threadId===void 0?{}:{threadId:t.threadId},...t.projectId===void 0?{}:{projectId:t.projectId}},c=S(()=>{r.get(s).actionId===t.actionId&&r.set(s,Y)});return Rt(Ze(o.environmentId,We(P.gitRunStackedAction,a)),{target:o,transportActionId:i,actionId:t.actionId,action:t.action,onProgress:e=>S(()=>{let n=r.get(s);if(n.actionId===t.actionId&&(r.set(s,zt(n,e)),t.onProgress!==void 0))try{t.onProgress(e)}catch{}})}).pipe(xe(Ye,{authorize:(t,n,i)=>Ue(e,n).authorize(r,t,i)}),ne(tt(r,o)),oe(()=>c),ae(e=>S(()=>{let n=r.get(s);n.actionId===t.actionId&&n.isRunning&&r.set(s,Ft(`run_change_request`,t.actionId,e))})),Re(()=>c))}});return t.set(i,c),c},r=(e,t,n)=>{let r=Z(t);if(r===null)return;let i=X(r);e.set(i,n(e.get(i)))};return{stateAtom:Mt,runStackedAction:e=>n(e),track:async(e,t,n,r)=>{let i=Z(t);if(i===null)return d(te(new Ct({operation:n.operation,environmentId:t.environmentId,cwd:t.cwd})));let a=X(i),o=Pt(n);e.set(a,o);let s=await r();return e.get(a).actionId===o.actionId&&(h(s)||y(s.cause)?e.set(a,Y):e.get(a).actionId===o.actionId&&e.set(a,Ft(n.operation,o.actionId,he(s.cause)))),s},resetError:(e,t,n)=>{r(e,t,e=>!e.isRunning&&e.operation===n?Y:e)}}}var Vt=o(e=>l(0).pipe(r)),Ht=100,Ut=3e4,Wt=1e4,Gt=Se(`1 second`).pipe(me(({duration:e})=>C(De(e,ke(30)))));function Kt(e){return e.query===void 0&&e.cursor===void 0&&e.includeMatchingRemoteRefs===void 0&&e.refKind===void 0&&e.limit===Ht}var qt=T(`CachedVcsRefsState.commitRefresh`)(function*(e,t,n){return yield*$e(n.environmentId,ge(function*(){let r=Qe({environmentId:n.environmentId}),i=e.get(r);if(i.revision!==n.expectedRevision)return!1;let a=i.persistedCacheReadable;return n.persist&&(a||=yield*t.clearVcsRefs(n.environmentId).pipe(O(!0),j(e=>_(`Could not recover invalidated cached Git refs.`).pipe(M({environmentId:n.environmentId,cwd:n.cwd,...L(e)}),O(!1)))),yield*t.saveVcsRefs(n.environmentId,n.cwd,n.refs).pipe(j(e=>_(`Could not persist cached Git refs.`).pipe(M({environmentId:n.environmentId,cwd:n.cwd,...L(e)})))),a!==i.persistedCacheReadable&&e.update(r,e=>e.revision===n.expectedRevision?{...e,persistedCacheReadable:a}:e)),!0}))}),Jt=T(`CachedVcsRefsState.makeChanges`)(function*(e,t,n,r=!0){let i=yield*He,a=yield*qe,o=i.target.environmentId,s=Kt(e),l=s&&r?yield*a.loadVcsRefs(o,e.cwd).pipe(j(t=>_(`Could not load cached Git refs.`).pipe(M({environmentId:o,cwd:e.cwd,...L(t)}),O(A())))):A(),u=T(`CachedVcsRefsState.refresh`)(function*(){let r=Vt(`${o.length}:${o}${e.cwd}`),c=t!==void 0&&n!==void 0&&t>n.get(r),l=yield*Ve(P.vcsListRefs,c?{...e,refresh:!0}:e).pipe(xe(He,i)),u=a.saveVcsRefs(o,e.cwd,l).pipe(j(t=>_(`Could not persist cached Git refs.`).pipe(M({environmentId:o,cwd:e.cwd,...L(t)}))));if(t===void 0||n===void 0)return s&&(yield*u),Oe(l);let d=yield*qt(n,a,{environmentId:o,cwd:e.cwd,refs:l,expectedRevision:t,persist:s});return d&&c&&n.set(r,t),d?Oe(l):A()}),d=N(C(l)).pipe(Ie(e=>Pe(e,{onNone:()=>se,onSome:de}))),f=Fe(N(c(i.state)),p(i.state)).pipe(Ce(e=>e.phase===`connected`?e.generation:null),Ee,fe(t=>t===null?we:N(u().pipe(ae(t=>_(`Could not refresh Git refs.`).pipe(M({environmentId:o,cwd:e.cwd,...L(t)}))))).pipe(v(Gt),Ie(e=>Pe(e,{onNone:()=>se,onSome:de})))));return Fe(d,f)});function Yt(e,t,n,r){return Ke(e,ce(ge(function*(){return yield*Jt(t,n,yield*u,r)})))}function Xt(e){let t=o(t=>{let[n,r]=JSON.parse(t);return e.atom(e=>{let t=e(Qe({environmentId:n}));return Yt(n,r,t.revision,t.persistedCacheReadable)}).pipe(s(Ut),f(`environment-data:vcs:list-refs:${t}`))}),n=e=>t(JSON.stringify([e.environmentId,e.input])),r=(e,t)=>tt(t,{environmentId:e.environmentId,cwd:e.input.cwd});return{listRefs:n,readRefs:z(e,{label:`environment-data:vcs:read-refs`,tag:P.vcsListRefs}),status:Xe(e,{label:`environment-data:vcs:status`,idleTtlMs:Wt,subscribe:e=>Ge(P.subscribeVcsStatus,e).pipe(Be(()=>null,(e,t)=>{let n=xt(e,t);return[n,[n]]}))}),pull:z(e,{label:`environment-data:vcs:pull`,tag:P.vcsPull,scheduler:H,concurrency:U,onSettled:r}),refreshStatus:z(e,{label:`environment-data:vcs:refresh-status`,tag:P.vcsRefreshStatus,scheduler:H,concurrency:U,onSettled:r}),createWorktree:z(e,{label:`environment-data:vcs:create-worktree`,tag:P.vcsCreateWorktree,scheduler:H,concurrency:U,onSettled:r}),worktreeSetup:V(e,{label:`environment-data:vcs:worktree-setup`,tag:P.subscribeWorktreeSetup,idleTtlMs:Wt}),cancelWorktreeSetup:z(e,{label:`environment-data:vcs:cancel-worktree-setup`,tag:P.worktreeSetupCancel}),removeWorktree:z(e,{label:`environment-data:vcs:remove-worktree`,tag:P.vcsRemoveWorktree,scheduler:H,concurrency:U,onSettled:r}),createRef:z(e,{label:`environment-data:vcs:create-ref`,tag:P.vcsCreateRef,scheduler:H,concurrency:U,onSettled:r}),switchRef:z(e,{label:`environment-data:vcs:switch-ref`,tag:P.vcsSwitchRef,scheduler:H,concurrency:U,onSettled:r}),init:z(e,{label:`environment-data:vcs:init`,tag:P.vcsInit,scheduler:H,concurrency:U,onSettled:r})}}var Zt=Xt(B),Qt=Bt(B),$t=120,en=80,tn=120,nn=500,rn=200,an=100,on=[],sn=[],cn=[],Q=[void 0],ln=Object.freeze([]),un=l({matches:ln,isLoading:!1}).pipe(f(`web:thread-search:empty`)),dn=lt({getSearchAtom:(e,t)=>q.threadSearch({environmentId:e,input:{query:t}}),labelPrefix:`web:thread-search`});function $(e,t){let n=(0,G.c)(4),[r,i]=(0,K.useState)(e),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=window.setTimeout(()=>{i(e)},t);return()=>{window.clearTimeout(n)}},o=[t,e],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,K.useEffect)(a,o),r}function fn(e,t){let n=(0,G.c)(11),r;n[0]===t?r=n[1]:(r=t.trim(),n[0]=t,n[1]=r);let a=r,o=$(a,rn),s=e.length>0&&a.length>=2,c=s&&a===o?o:null,l;n[2]!==e||n[3]!==c?(l=c===null?null:ot(e,c),n[2]=e,n[3]=c,n[4]=l):l=n[4];let u=l,d;n[5]===u?d=n[6]:(d=u===null?un:dn(u),n[5]=u,n[6]=d);let f=i(d),p=s&&a!==o,m=p?ln:f.matches,h=c??``,g=s&&(p||f.isLoading),_;return n[7]!==m||n[8]!==h||n[9]!==g?(_={matches:m,query:h,isPending:g},n[7]=m,n[8]=h,n[9]=g,n[10]=_):_=n[10],_}function pn(e){let t=e.query?.trim()??``,n=e.environmentId!==null&&e.cwd!==null?JSON.stringify([e.environmentId,e.cwd,t]):null,[r,o]=(0,K.useState)({targetKey:n,cursors:Q}),s=r.targetKey===n?r.cursors:Q,c=(0,K.useMemo)(()=>e.environmentId!==null&&e.cwd!==null?s.map(n=>Zt.listRefs({environmentId:e.environmentId,input:{cwd:e.cwd,...t.length>0?{query:t}:{},...n===void 0?{}:{cursor:n},limit:an}})):[],[s,t,e.cwd,e.environmentId]),u=(0,K.useMemo)(()=>l(e=>c.map(t=>e(t))).pipe(f(`web:vcs-ref-pages:${n??`empty`}`)),[c,n]),d=i(u),p=d.flatMap(e=>{let t=Le(m(e));return t===null?[]:[t]}),h=new Map;for(let e of p)for(let t of e.refs)h.set(t.name,t);let g=p[0]??null,_=p.at(-1)??null,v=g===null||_===null?null:{refs:[...h.values()],isRepo:g.isRepo,hasPrimaryRemote:g.hasPrimaryRemote,nextCursor:_.nextCursor,totalCount:Math.max(...p.map(e=>e.totalCount))},y=d.find(e=>e._tag===`Failure`),b=ft(d),x=y?._tag===`Failure`?(()=>{let e=he(y.cause);return e instanceof Error&&e.message.trim().length>0?e.message:`Failed to load refs.`})():null,ee=(0,K.useCallback)(()=>{let e=c[0];o({targetKey:n,cursors:Q}),e!==void 0&&a.refresh(e)},[c,n]),te=(0,K.useCallback)(()=>{n!==null&&v?.nextCursor!==null&&v?.nextCursor!==void 0&&o(e=>{let t=e.targetKey===n?e.cursors:Q;return t.includes(v.nextCursor)?{targetKey:n,cursors:t}:{targetKey:n,cursors:[...t,v.nextCursor]}})},[v?.nextCursor,n]);return{data:v,refs:v?.refs??on,error:x,isPending:d.some(e=>e.waiting),isFetchingNextPage:b,refresh:ee,loadNext:te}}function mn(e,t){return e.environmentId===t.environmentId&&e.cwd===t.cwd&&e.query===t.query&&e.kind===t.kind&&e.imageOnly===t.imageOnly}function hn(e,t,n){let r=(0,G.c)(32),i=n?.allowEmptyQuery===!0,a;r[0]===e.query?a=r[1]:(a=e.query==null?null:e.query.trim(),r[0]=e.query,r[1]=a);let o;r[2]!==a||r[3]!==e.cwd||r[4]!==e.environmentId||r[5]!==e.imageOnly||r[6]!==e.kind?(o={environmentId:e.environmentId,cwd:e.cwd,query:a,kind:e.kind,imageOnly:e.imageOnly},r[2]=a,r[3]=e.cwd,r[4]=e.environmentId,r[5]=e.imageOnly,r[6]=e.kind,r[7]=o):o=r[7];let s=o,c=$(s,$t),l=et(c.environmentId),{canReadFiles:u}=l,d,f,p;r[8]!==i||r[9]!==u||r[10]!==c.cwd||r[11]!==c.environmentId||r[12]!==c.imageOnly||r[13]!==c.kind||r[14]!==c.query||r[15]!==t?(d=c.environmentId!==null&&c.cwd!==null&&c.query!==null&&(i||c.query.length>0)?{environmentId:c.environmentId,input:{cwd:c.cwd,query:c.query,limit:t,...c.kind?{kind:c.kind}:{},...c.imageOnly?{imageOnly:!0}:{}}}:null,f=W,p=u&&d!==null?nt.searchEntries(d):null,r[8]=i,r[9]=u,r[10]=c.cwd,r[11]=c.environmentId,r[12]=c.imageOnly,r[13]=c.kind,r[14]=c.query,r[15]=t,r[16]=d,r[17]=f,r[18]=p):(d=r[16],f=r[17],p=r[18]);let m=f(p),h=d!==null,g=m.data?.entries??sn,_=!h||l.isPending?null:u?m.error:l.error??`This connection cannot search host files.`,v;r[19]!==c||r[20]!==l.isPending||r[21]!==h||r[22]!==s||r[23]!==m.isPending?(v=!mn(s,c)||h&&(l.isPending||m.isPending),r[19]=c,r[20]=l.isPending,r[21]=h,r[22]=s,r[23]=m.isPending,r[24]=v):v=r[24];let y=c.query??``,b=m.data?.truncated??!1,x;return r[25]!==m.refresh||r[26]!==g||r[27]!==_||r[28]!==v||r[29]!==y||r[30]!==b?(x={entries:g,error:_,isPending:v,searchedQuery:y,truncated:b,refresh:m.refresh},r[25]=m.refresh,r[26]=g,r[27]=_,r[28]=v,r[29]=y,r[30]=b,r[31]=x):x=r[31],x}function gn(e){return hn(e,en)}function _n(e){let t=(0,G.c)(20),n=e.environmentId!==null&&e.cwd!==null,r=et(e.environmentId),i=n&&r.canReadFiles,a=n&&r.isPending,o=e.query,s;t[0]===o?s=t[1]:(s=o.trim(),t[0]=o,t[1]=s);let c=s.length>0,l=$(o,tn),u;t[2]!==i||t[3]!==l||t[4]!==c||t[5]!==e.caseSensitive||t[6]!==e.cwd||t[7]!==e.environmentId||t[8]!==e.useRegex||t[9]!==e.wholeWord?(u=i&&e.environmentId!==null&&e.cwd!==null&&c&&l.trim().length>0?rt({environmentId:e.environmentId,input:{cwd:e.cwd,query:l,limit:nn,caseSensitive:e.caseSensitive,wholeWord:e.wholeWord,useRegex:e.useRegex}}):null,t[2]=i,t[3]=l,t[4]=c,t[5]=e.caseSensitive,t[6]=e.cwd,t[7]=e.environmentId,t[8]=e.useRegex,t[9]=e.wholeWord,t[10]=u):u=t[10];let d=W(u),f=d.data?.matches??cn,p=!n||a?null:i?d.error:r.error??`This connection cannot search host files.`,m=a||i&&c&&(o!==l||d.isPending),h=d.data?.truncated??!1,g=e.useRegex&&d.data?.regexFallbackError!==void 0,_;return t[11]!==i||t[12]!==c||t[13]!==a||t[14]!==f||t[15]!==p||t[16]!==m||t[17]!==h||t[18]!==g?(_={canReadFiles:i,isCheckingAccess:a,matches:f,error:p,isPending:m,hasQuery:c,truncated:h,invalidRegex:g},t[11]=i,t[12]=c,t[13]=a,t[14]=f,t[15]=p,t[16]=m,t[17]=h,t[18]=g,t[19]=_):_=t[19],_}function vn(e,t){let n=t?.enabled!==!1&&e.environmentId!==null&&e.threadId!==null&&e.fromTurnCount!==null&&e.toTurnCount!==null,r=n&&e.fromTurnCount===0?{environmentId:e.environmentId,input:{threadId:e.threadId,toTurnCount:e.toTurnCount,ignoreWhitespace:e.ignoreWhitespace}}:null,i=n&&e.fromTurnCount!==0?{environmentId:e.environmentId,input:{threadId:e.threadId,fromTurnCount:e.fromTurnCount,toTurnCount:e.toTurnCount,ignoreWhitespace:e.ignoreWhitespace}}:null,a=W(r===null?null:q.fullThreadDiff(r)),o=W(i===null?null:q.turnDiff(i));return r===null?o:a}function yn(e){let t=(0,G.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?null:q.turnItem({environmentId:e.environmentId,input:{threadId:e.threadId,itemId:e.itemId,revision:e.revision}}),t[0]=e,t[1]=n),W(n)}export{ct as _,_n as a,yn as c,Ct as d,ht as f,q as g,pt as h,pn as i,Qt as l,_t as m,gn as n,hn as o,gt as p,$ as r,fn as s,vn as t,Zt as u};
|
|
2
|
-
//# sourceMappingURL=queries-DDAXRF4r.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,r as t,t as n}from"./react-BUfh6y28.js";import{n as r,t as i}from"./jsx-runtime-DJeoFXNw.js";import{Aa as a,Bf as o,D as s,Ea as c,Ei as l,Fl as u,Gd as d,Gl as f,Ir as p,Ji as m,Js as h,Ka as g,Ku as _,Lf as v,Ll as y,Ni as b,Nr as x,Pa as S,Sa as ee,To as C,Ua as w,Va as te,Wa as ne,Wi as T,_a as E,da as re,es as D,fa as O,ga as k,gr as ie,ha as ae,la as A,ls as j,ma as M,mr as N,nl as P,oa as F,pi as I,qa as L,qi as oe,rp as se,sa as ce,t as R,up as le,wa as ue,ws as de,xa as fe,xt as pe,zr as me}from"./utils-Cs97wR6T.js";import{$s as he,Au as z,Hc as B,Ko as ge,Pt as V,_c as H,en as _e,k as ve,oh as ye,pc as U,td as be}from"./src-BZzGU-vc.js";import{br as W,en as xe,pi as Se,t as Ce,tn as we}from"./runtime-DUPVFypn.js";import{c as Te,d as Ee,f as De,n as G,s as Oe}from"./useRender-BP5vR6yH.js";import{C as ke,d as Ae,f as je,h as Me,p as Ne,u as Pe}from"./TooltipProvider-BzOo4iyi.js";import{t as Fe}from"./spinner-DmRIQvmI.js";import{t as Ie}from"./useParams-C5b2x5BH.js";import{n as Le,r as Re,t as ze}from"./CollapsiblePanel-BlUD5mJC.js";var Be=B(ve),Ve=B(V);function He(e){return Ve(e)&&(e.reason===`thread_not_empty`||e.reason===`thread_not_side_chat`)}function Ue(e){return Be(e)&&e.bootstrapThreadDisposition===`deleted`}function We(e){return Be(e)&&e.bootstrapThreadDisposition===`not-created`}var Ge=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the P4 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(Se)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function Ke(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Ge.some(e=>e.test(t))}function qe(e){return Ke(e)?null:e??null}var K=e(n()),Je=K.createContext(void 0);function Ye(){let e=K.useContext(Je);if(!e)throw Error(De(73));return e}var Xe=0;function Ze(e){return Xe+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Xe}`}function Qe(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function $e(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var et=e=>e.toastMetadata,q={toasts:b(e=>e.toasts),isEmpty:b(e=>e.toasts.length===0),toast:b(et,(e,t)=>e.get(t)?.value),toastIndex:b(et,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:b(et,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:b(et,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:b(e=>e.hovering),focused:b(e=>e.focused),expanded:b(e=>e.hovering||e.focused),expandedOrOutOfFocus:b(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:b(e=>e.prevFocusElement)},tt=class extends l{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:$e(e.toasts)},{},q)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=q.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Ze(`toast`);if(e.id){let t=q.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),q.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=q.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d)this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);else if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),q.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=q.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:$e(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Qe(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Qe(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Qe(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=fe.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=E(e);k(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!q.expandedOrOutOfFocus(this.state),a=i?fe.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:$e(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=ae(A(this.state.viewport));if(!this.state.viewport||!k(this.state.viewport,t)||!M(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=q.toasts(this.state),r=q.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},J=e(i()),nt=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=Ee(()=>new tt({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return a(o.disposeEffect),K.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?o.promiseToast(t.promise,t):e===`update`&&n?o.updateToast(n,t):e===`close`?o.closeToast(n):o.addToast(t)})},[o,i]),o.useSyncedValues({timeout:n,limit:r}),(0,J.jsx)(Je.Provider,{value:o,children:t})},rt=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),it=K.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Ye(),c=ee(),l=K.useRef(!1),u=K.useRef(!1),d=K.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),_=s.useState(`prevFocusElement`),v=p[0]?.height??0,y=K.useMemo(()=>p.some(e=>e.transitionStatus===`ending`),[p]),b=K.useMemo(()=>p.filter(e=>e.priority===`high`),[p]);K.useEffect(()=>{let e=s.state.viewport;if(!e)return;function t(t){f||t.key===`F6`&&E(t)!==e&&(t.preventDefault(),s.setPrevFocusElement(ae(A(e))),e?.focus({preventScroll:!0}),s.pauseTimers(),s.setFocused(!0))}let n=g(e);return O(n,`keydown`,t)},[s,f]),K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=g(e);function n(e){E(e)===t&&(s.setIsWindowFocused(!1),s.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=E(n),i=ae(A(e));r!==t&&k(e,r)&&M(i)||s.resumeTimers(),c.start(0,()=>s.setIsWindowFocused(!0))}return re(O(t,`blur`,n,!0),O(t,`focus`,r,!0))},[s,c,f]),K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=A(e);return O(t,`pointerdown`,s.handleDocumentPointerDown,!0)},[f,s]);function x(e){let t=s.state.viewport;t&&(l.current=!0,e.relatedTarget===t?p[0]?.ref?.current?.focus():s.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&E(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement(),s.resumeTimers())}function C(){let e=s.state.toasts.some(e=>e.transitionStatus===`ending`);s.state.isWindowFocused&&!e&&!d.current&&u.current&&(s.resumeTimers(),s.setHovering(!1),u.current=!1)}K.useEffect(C,[y,s]);function w(){s.pauseTimers(),s.setHovering(!0),u.current=!1}function te(){y||d.current?u.current=!0:(s.resumeTimers(),s.setHovering(!1))}function ne(e){e.pointerType===`touch`&&(d.current=!0)}function T(e){e.pointerType===`touch`&&(d.current=!1,C())}function D(){l.current?l.current=!1:m||M(ae(A(s.state.viewport)))&&(s.setFocused(!0),s.pauseTimers())}function ie(e){m&&!k(s.state.viewport,e.relatedTarget)&&(s.setFocused(!1),s.resumeTimers())}let j={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:te,onFocus:D,onBlur:ie,onKeyDown:S,onClick:D,onPointerDown:ne,onPointerUp:T,onPointerCancel:T},N={expanded:h},P=G(`div`,e,{ref:[t,s.setViewport],state:N,props:[j,{style:{[rt.frontmostHeight]:v?`${v}px`:void 0}},o,{children:(0,J.jsxs)(K.Fragment,{children:[!f&&_&&(0,J.jsx)(F,{onFocus:x}),a,!f&&_&&(0,J.jsx)(F,{onFocus:x})]})}]});return(0,J.jsxs)(K.Fragment,{children:[!f&&_&&(0,J.jsx)(F,{onFocus:x}),P,!m&&b.length>0&&(0,J.jsx)(`div`,{style:ce,children:b.map(e=>(0,J.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,J.jsx)(`div`,{children:e.title}),(0,J.jsx)(`div`,{children:e.description})]},e.id))})]})}),at=e(c()),ot=K.createContext(void 0);function st(){let e=K.useContext(ot);if(!e)throw Error(De(66));return e}var Y=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function ct(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function lt(e){let t=g(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var ut={...C,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},dt=40,ft=10,X=.5,pt=1,mt=`${T},${oe}`,ht=K.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=Ye(),[f,p]=K.useState(void 0),[m,h]=K.useState(!1),[g,_]=K.useState(!1),[v,y]=K.useState(!1),[b,x]=K.useState({x:0,y:0}),[S,ee]=K.useState({x:0,y:0,scale:1}),[C,te]=K.useState(),[T,re]=K.useState(),[D,ie]=K.useState(null),j=K.useRef(null),M=K.useRef({x:0,y:0}),N=K.useRef({x:0,y:0,scale:1}),P=K.useRef(void 0),F=K.useRef(0),I=K.useRef(!1),L=K.useRef({x:0,y:0}),oe=K.useRef(!1),se=K.useRef({x:0,y:0}),ce=K.useRef(null),R=K.useRef(null),le=d.useState(`toastIndex`,n.id),de=d.useState(`toastVisibleIndex`,n.id),fe=d.useState(`toastOffsetY`,n.id),pe=d.useState(`focused`),he=d.useState(`expanded`);ue({open:n.transitionStatus!==`ending`,ref:j,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let z=ne((e=!1)=>{let t=j.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:j,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?at.flushSync(a):a()});w(z,[z]);function B(e){se.current=e,x(e)}w(()=>()=>{R.current?.abort()},[]);function ge(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let V=ne(e=>{if(e.pointerId!==ce.current)return;ce.current=null,R.current?.abort(),R.current=null,h(!1),_(!1),ie(null);let t=N.current;if(e.type===`pointercancel`||I.current){B({x:t.x,y:t.y}),p(void 0);return}let r=!1,i=se.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>dt&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>dt&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(p(s),y(!0),d.closeToast(n.id)):(B({x:t.x,y:t.y}),p(void 0))});function H(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=E(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${mt}`))return;if(I.current=!1,P.current=void 0,F.current=0,ce.current=e.pointerId,M.current={x:e.clientX,y:e.clientY},L.current=M.current,j.current){let e=lt(j.current);N.current=e,ee(e),B({x:e.x,y:e.y})}d.setHovering(!0),h(!0),_(!1),ie(null),oe.current=!0;let n=j.current;if(n){R.current?.abort();let t=new AbortController;R.current=t;let r=A(n);r.addEventListener(`pointerup`,V,{signal:t.signal}),r.addEventListener(`pointercancel`,V,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function _e(e){if(e.pointerId!==ce.current)return;e.preventDefault(),oe.current&&=(M.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>L.current.y||i>0&&t<L.current.y)&&(L.current={x:L.current.x,y:t}),(r<0&&n>L.current.x||r>0&&n<L.current.x)&&(L.current={x:n,y:L.current.y});let a=n-M.current.x,o=t-M.current.y,s=t-L.current.y,c=n-L.current.x;if(!g&&Math.sqrt(a*a+o*o)>=pt&&(_(!0),D===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&ie(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!P.current)D===`vertical`?o>0?u=`down`:o<0&&(u=`up`):D===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&l.includes(u)&&(P.current=u,F.current=ct(u,a,o),p(u));else{let e=P.current,t=ct(e,c,s);t>dt?(I.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&F.current-t>=ft&&(I.current=!0)}let d=ge(a,o),f=N.current.x,m=N.current.y;D===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(D===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(m+=d.y)),B({x:f,y:m})}function ve(e){if(e.key===`Escape`){if(!j.current||!k(j.current,ae(A(j.current))))return;d.closeToast(n.id)}}K.useEffect(()=>{if(!u)return;let e=j.current;if(!e)return;function t(t){k(e,E(t))&&t.preventDefault()}return O(e,`touchmove`,t,{passive:!1})},[u]);function ye(){if(!m&&b.x===S.x&&b.y===S.y&&!v)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=b.x-S.x,t=b.y-S.y;return{transition:m?`none`:void 0,transform:m?`translateX(${b.x}px) translateY(${b.y}px) scale(${S.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let U=n.priority===`high`,be={role:U?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":C,"aria-describedby":T,"aria-hidden":U&&!pe?!0:void 0,onPointerDown:u?H:void 0,onPointerMove:u?_e:void 0,onPointerUp:u?V:void 0,onPointerCancel:u?V:void 0,onKeyDown:ve,inert:me(n.limited),style:{...ye(),[Y.index]:n.transitionStatus===`ending`?le:de,[Y.offsetY]:`${fe}px`,[Y.height]:n.height?`${n.height}px`:void 0}},W=K.useMemo(()=>({rootRef:j,toast:n,titleId:C,setTitleId:te,descriptionId:T,setDescriptionId:re,swiping:m,swipeDirection:f,recalculateHeight:z,index:le,visibleIndex:de,expanded:he}),[n,C,T,m,f,z,le,de,he]),xe={transitionStatus:n.transitionStatus,expanded:he,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Se=G(`div`,e,{ref:[t,W.rootRef],state:xe,stateAttributesMapping:ut,props:[be,s]});return(0,J.jsx)(ot.Provider,{value:W,children:Se})}),gt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=st(),l=K.useRef(null);return w(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),G(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),_t=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=st(),u=o??c.description,d=!!u,f=S(a);w(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=G(`p`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),vt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=st(),u=o??c.title,d=!!u,f=S(a);w(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=G(`h2`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),yt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Ye(),{toast:l}=st(),u=c.useState(`expanded`),[d,f]=K.useState(!1),{getButtonProps:p,buttonRef:m}=te({disabled:a,native:o}),h={type:l.type};return G(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),bt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=st(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=te({disabled:a,native:o}),p={type:c.type},m=G(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),xt=Ae,St=K.createContext(void 0);function Ct(){let e=K.useContext(St);if(e===void 0)throw Error(De(84));return e}var wt=K.forwardRef(function(e,t){let{toast:n,...r}=e,i=Ye(),a=n.positionerProps??Oe,{render:o,className:s,anchor:c=a.anchor,positionMethod:l=a.positionMethod??`absolute`,side:u=a.side??`top`,align:d=a.align??`center`,sideOffset:f=a.sideOffset??0,alignOffset:h=a.alignOffset??0,collisionBoundary:g=a.collisionBoundary??`clipping-ancestors`,collisionPadding:_=a.collisionPadding??5,arrowPadding:v=a.arrowPadding??5,sticky:y=a.sticky??!1,disableAnchorTracking:b=a.disableAnchorTracking??!1,collisionAvoidance:S=a.collisionAvoidance??m,style:ee,...C}=r,[w,te]=K.useState(null),ne=i.useState(`toastIndex`,n.id),T=i.useState(`toastVisibleIndex`,n.id),E=L(c)?c:null,re=I({open:!0,onOpenChange:Te,elements:{floating:w,reference:E}}),D=p({anchor:E,positionMethod:l,floatingRootContext:re,mounted:!0,side:u,sideOffset:f,align:d,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:S}),O=K.useMemo(()=>({side:D.side,align:D.align,anchorHidden:D.anchorHidden}),[D.side,D.align,D.anchorHidden]),k=x(e,O,{styles:{...D.positionerStyles,[Y.index]:n.transitionStatus===`ending`?ne:T},transitionStatus:n.transitionStatus,props:C,refs:[t,te]});return(0,J.jsx)(St.Provider,{value:D,children:k})}),Tt=K.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=Ct();return G(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function Et(){let e=K.useContext(Je);if(!e)throw Error(De(73));let t=e.useState(`toasts`);return K.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function Dt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Ze(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var Ot=t({Action:()=>bt,Arrow:()=>Tt,Close:()=>yt,Content:()=>gt,Description:()=>_t,Portal:()=>xt,Positioner:()=>wt,Provider:()=>nt,Root:()=>ht,Title:()=>vt,Viewport:()=>it,createToastManager:()=>Dt,useToastManager:()=>Et});function kt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var Z=kt(),Q=r(),At={archive:P,clock:f,pin:d,trash:v};function jt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(Mt,t),null}function Mt(){let e=!0,t=new Set,n=()=>{let n=Z.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?At[r.icon]:null,i=r.actions??[],a=i.find(Pt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{Z.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&Z.getSnapshot().includes(r)&&Z.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,J.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=Z.subscribe(n),i=Nt;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),Z.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function Nt(){return Z.setPaused(`web-hidden`,document.hidden)}function Pt(e){return e.primary}var Ft=class extends H()(`ClipboardApiUnavailableError`,{target:U}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},It=class extends H()(`ClipboardWriteError`,{target:U,cause:he()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},Lt=class extends H()(`ClipboardReadUnavailableError`,{target:U}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},Rt=class extends H()(`ClipboardReadError`,{target:U,cause:he()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function zt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function Bt(e,t=`text`,n){if(typeof window>`u`)throw new Ft({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[_e];if(r&&(n={...n,"text/html":pe(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(zt(e,n))return!0;throw new Ft({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new It({target:t,cause:e})}}async function Vt(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new Lt({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new Rt({target:e,cause:t})}}function Ht({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=K.useState(!1),s=K.useRef(null),c=K.useRef(n),l=K.useRef(r),u=K.useRef(t),d=K.useRef(e);c.current=n,l.current=r;let f=K.useRef(i);u.current=t,d.current=e,f.current=i;let p=K.useCallback((e,t)=>{Bt(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return K.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Ut(e){return e===`live`}function Wt(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Gt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Kt(e){return{draftId:e}}function qt(e){return!e.environmentId||!e.threadId?null:h(e.environmentId,e.threadId)}function Jt(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:h(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function Yt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Xt(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Zt(e,t){return t<=1?!1:e>0}function Qt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=$t(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:$t(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function $t(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function en(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var $=Dt(),tn=Dt(),nn=new Map,rn={error:u,info:_,loading:Fe,success:y,warning:o},an=180;function on(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<an))return`line-clamp-4`}function sn(e,t,n){n?.(),e.close(t)}function cn(e){let t=(0,Q.c)(3),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(se,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,J.jsx)(N,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,"data-slot":`toast-close`,className:`-my-1 self-start sm:-my-0.5`,onClick:n,children:r}),t[1]=n,t[2]=i),i}function ln(e){let t=(0,Q.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=Ht(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=R(`size-3`,c),t[4]=c,t[5]=l);let u=a?je:ke,d;t[6]!==l||t[7]!==u?(d=(0,J.jsx)(Pe,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,J.jsx)(N,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var un=`max-h-40 min-h-0 overflow-y-auto overscroll-contain pt-2 pr-0.5 select-text`;function dn(e){let t=(0,Q.c)(11),{children:n,labels:r}=e,[i,a]=(0,K.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c=i?Me:Ne,l;t[0]===c?l=t[1]:(l=(0,J.jsx)(Pe,{className:`size-3.5 shrink-0 opacity-80`,icon:c,strokeWidth:2.25}),t[0]=c,t[1]=l);let u=i?s:o,d;t[2]!==l||t[3]!==u?(d=(0,J.jsxs)(Le,{className:`-ml-0.5 inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 pr-1 pl-0.5 text-left text-xs font-medium text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[l,u]}),t[2]=l,t[3]=u,t[4]=d):d=t[4];let f;t[5]===n?f=t[6]:(f=(0,J.jsx)(ze,{className:`h-(--collapsible-panel-height) overflow-hidden transition-[height,opacity] duration-200 ease-out data-ending-style:h-0 data-ending-style:opacity-0 data-starting-style:h-0 data-starting-style:opacity-0 motion-reduce:transition-opacity motion-reduce:data-ending-style:h-(--collapsible-panel-height)`,children:(0,J.jsx)(`div`,{className:un,children:n})}),t[5]=n,t[6]=f);let p;return t[7]!==i||t[8]!==d||t[9]!==f?(p=(0,J.jsxs)(Re,{className:`min-w-0`,onOpenChange:a,open:i,children:[d,f]}),t[7]=i,t[8]=d,t[9]=f,t[10]=p):p=t[10],p}function fn(e){let t=(0,Q.c)(11),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]!==r||t[1]!==i?(o=R(`min-w-0 select-text wrap-break-word text-muted-foreground`,on(i,r)),t[0]=r,t[1]=i,t[2]=o):o=t[2];let s=o,c;t[3]===s?c=t[4]:(c=(0,J.jsx)(_t,{className:s,"data-slot":`toast-description`}),t[3]=s,t[4]=c);let l;t[5]!==a||t[6]!==n?.expandableLabels?(l=a?(0,J.jsx)(dn,{labels:n?.expandableLabels??{},children:a}):null,t[5]=a,t[6]=n?.expandableLabels,t[7]=l):l=t[7];let u;return t[8]!==c||t[9]!==l?(u=(0,J.jsxs)(J.Fragment,{children:[c,l]}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}function pn(e){let t=e.type?rn[e.type]:null,n=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,r=(e.data?.additionalActions?.length??0)>0,i=e.data?.secondaryActionProps!==void 0;return{Icon:t,copyErrorText:n,hasTrailingControls:n!==null||Xt(e.actionProps)||r||i}}function mn(e){let t=(0,Q.c)(32),{Icon:n,copyErrorText:r,actionProps:i,hasTrailingControls:a,toastData:o,toastDescription:s,toastType:c}=e,l;t[0]===o?.additionalActions?l=t[1]:(l=o?.additionalActions??[],t[0]=o?.additionalActions,t[1]=l);let u=l,d=o?.secondaryActionProps,f=o?.leadingIcon,p;t[2]===d?p=t[3]:(p=d??{},t[2]=d,t[3]=p);let m,h;t[4]===p?(m=t[5],h=t[6]):({className:m,...h}=p,t[4]=p,t[5]=m,t[6]=h);let g;t[7]!==n||t[8]!==f?(g=f?(0,J.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:f}):n?(0,J.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,J.jsx)(n,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[7]=n,t[8]=f,t[9]=g):g=t[9];let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(vt,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=(0,J.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[g,_]}),t[11]=g,t[12]=v);let y;t[13]!==o||t[14]!==s||t[15]!==c?(y=(0,J.jsx)(fn,{toastData:o,toastDescription:s,toastType:c}),t[13]=o,t[14]=s,t[15]=c,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-0.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]!==i||t[21]!==u||t[22]!==r||t[23]!==a||t[24]!==m||t[25]!==d||t[26]!==h||t[27]!==o?.sharedToastId?(x=a?(0,J.jsxs)(`div`,{className:`flex h-5 shrink-0 items-center gap-1.5 self-start`,children:[r===null?null:(0,J.jsx)(ln,{text:r}),u.map(hn),d?(0,J.jsx)(N,{...h,className:m,size:`xs`,type:`button`,variant:o?.sharedToastId?`solid-neutral`:`soft`}):null,Xt(i)?(0,J.jsx)(bt,{className:R(ie({size:`xs`,variant:`solid-neutral`}),`shrink-0`),"data-slot":`toast-action`,children:i?.children}):null]}):null,t[20]=i,t[21]=u,t[22]=r,t[23]=a,t[24]=m,t[25]=d,t[26]=h,t[27]=o?.sharedToastId,t[28]=x):x=t[28];let S;return t[29]!==b||t[30]!==x?(S=(0,J.jsxs)(J.Fragment,{children:[b,x]}),t[29]=b,t[30]=x,t[31]=S):S=t[31],S}function hn(e){let{id:t,props:n}=e,{className:r,...i}=n;return(0,K.createElement)(N,{...i,className:r,key:t,size:`xs`,type:`button`,variant:`soft`})}function gn(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:_n},e[0]=t):t=e[0];let n=Ie(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=s(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function _n(e){return Jt(e)}function vn(e){let t=(0,Q.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=nn.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,nn.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),nn.set(n,e))},l=()=>{a||t!==null||(e<=0?s():(t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)))},u=()=>{document.visibilityState===`visible`&&document.hasFocus()?l():c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,K.useEffect)(i,a),null}function yn(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(jt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,J.jsx)(bn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,J.jsxs)(nt,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function bn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=Et(),i=gn(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>en(e.data,i),t[2]=i,t[3]=s);let c=Qt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(xn));for(let t of nn.keys())e.has(t)||nn.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,K.useEffect)(l,u);let d=Ot,f=Ot,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=R(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Zt(r,c.items.length),s=pn(t);return(0,J.jsxs)(ht,{className:R(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&Z.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&Z.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,J.jsx)(vn,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),(0,J.jsxs)(gt,{className:R(`pointer-events-auto flex min-h-0 items-center justify-between gap-2 overflow-y-visible py-3 pr-2 pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,J.jsx)(mn,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),(0,J.jsx)(cn,{onClick:()=>{let e=t.data?.sharedToastId;e?Z.dismiss(e):sn($,t.id,t.data?.onClose)}})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,J.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,J.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function xn(e){return e.id}function Sn(e){let t=(0,Q.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(Cn,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,J.jsxs)(nt,{toastManager:tn,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function Cn(){let e=(0,Q.c)(7),{toasts:t}=Et(),n=gn(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>en(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(wn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,J.jsx)(xt,{"data-slot":`toast-portal-anchored`,children:(0,J.jsx)(it,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function wn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=pn(e);return n?.anchor?(0,J.jsx)(wt,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,J.jsx)(ht,{className:R(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,J.jsx)(gt,{className:`pointer-events-auto px-2 py-1`,children:(0,J.jsx)(vt,{"data-slot":`toast-title`})}):(0,J.jsxs)(gt,{className:`pointer-events-auto flex min-h-0 items-center justify-between gap-1.5 overflow-y-visible py-3 pr-2 pl-3.5 text-sm [overflow-x:clip]`,children:[(0,J.jsx)(mn,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type}),(0,J.jsx)(cn,{onClick:()=>sn(tn,e.id,e.data?.onClose)})]})})},e.id):null}function Tn(e){let t=e.atom(ge(we.pipe(be(e=>le(e.state)))),{initialValue:xe});return{stateAtom:t,stateValueAtom:D(e=>ye(de(e(t)),()=>xe)).pipe(j(`relay-environment-discovery-value`)),refresh:W(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>we.pipe(z(e=>e.refresh))}),refreshAfterMutation:W(e,{label:`relay-environment-discovery:refresh-after-mutation`,concurrency:{mode:`serial`,key:()=>`refresh-after-mutation`},execute:e=>we.pipe(z(e=>e.refresh))})}}var En=Tn(Ce);export{qe as _,$ as a,He as b,Ut as c,Wt as d,Jt as f,Z as g,Bt as h,tn as i,Yt as l,Ht as m,Sn as n,Kt as o,Vt as p,yn as r,Gt as s,En as t,qt as u,Ue as v,We as y};
|
|
2
|
-
//# sourceMappingURL=relay-CnLeC-mg.js.map
|