@p4code/cli 0.8.33 → 0.8.35
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/bin.mjs +1 -1
- package/dist/{binCli-CReSoYE2.mjs → binCli-26z5sNBT.mjs} +2313 -1491
- package/dist/client/.vite/manifest.json +2037 -2022
- package/dist/client/assets/{2NI2N5EU-Cq8AdBdr.js → 2NI2N5EU-BLnY4aCF.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BtyHa2r8.js → 4UO7MD6I-BApNVkfU.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-DJhrK_P7.js → 5B3SVYGG-Y7V7NdZO.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-Di3oWVTL.js → 5GK6JWQ2-BSIhKcw-.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-IYvb4i83.js → 5N7A7DKN-CNUCnWLs.js} +2 -2
- package/dist/client/assets/{5OC2THR4-C4L8eWnK.js → 5OC2THR4-Bne-pf_A.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-CRP52QAR.js → 5S6HY5KT-7d4UMONz.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-CNHI0F6y.js → 6IMQ5BUJ-BWW19n-D.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-B4vHLWw5.js → 6OLKWJ4F-CxTUuvA6.js} +2 -2
- package/dist/client/assets/{74OO7NKP-Cy2GHTnO.js → 74OO7NKP-DByVTRKE.js} +2 -2
- package/dist/client/assets/{75O6YZUN-DQlP5MhD.js → 75O6YZUN-CZanyedf.js} +2 -2
- package/dist/client/assets/{77XECAW3-DSSYRZCk.js → 77XECAW3-TL2w7pHK.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-BKqULKA5.js → ABYRPUBD-CJboH7Uz.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-9jRALQXL.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CFR4EWDw.js → AnimatedHeight-OxEbW01v.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-X2oPejN8.js → AuthSurfaceShell-KQXgPV4i.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-C2iBTfII.js → BB2UYUI2-BxW-R2h1.js} +2 -2
- package/dist/client/assets/{BUM34MOA-D8LFlnDQ.js → BUM34MOA-ngG-irUy.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-D15ZAT0K.js → CEQABKGZ-C-u-W0bS.js} +2 -2
- package/dist/client/assets/{CXAC5362-CicOZ45Z.js → CXAC5362-DfFRkI7L.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-C3KgGt4z.js +2 -0
- package/dist/client/assets/{ChatMarkdown-DfVVLQX2.js → ChatMarkdown-9gWM0ED9.js} +9 -9
- package/dist/client/assets/{CheckboxIndicator-IpoyLEZ-.js → CheckboxIndicator-DbU3csPQ.js} +2 -2
- package/dist/client/assets/{ClippedText-DTOlMbAH.js → ClippedText-CS_BYNco.js} +2 -2
- package/dist/client/assets/{CodexSetupSection.logic-B5cbwzh2.js → CodexSetupSection.logic-CNbTXxKb.js} +2 -2
- package/dist/client/assets/{ComboboxClear-DsPTusk5.js → ComboboxClear-Bn_kslrf.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-DqaoaBhS.js → ComboboxGroupLabel-fL8lMA25.js} +2 -2
- package/dist/client/assets/{CommandBlock-Da9iVEid.js → CommandBlock-DcQXu_lq.js} +2 -2
- package/dist/client/assets/ComposerPromptEditor-DQ9wFfKn.js +204 -0
- package/dist/client/assets/{CompositeRoot-Dfl7FdSL.js → CompositeRoot-BuwzXGHT.js} +2 -2
- package/dist/client/assets/{ConnectionDiagnosisDetails-DCPX1JuG.js → ConnectionDiagnosisDetails-DGbJY7Hw.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-DVkDejK1.js → ConnectionStatusDot-CixsTBXI.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-BEVEy9Nb.js → DRLTVNUE-Cbb71R0Y.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DtPiS3Ow.js → DYY6UVD2-BZn5fuF5.js} +2 -2
- package/dist/client/assets/{DevicePanel-B8KdDbzD.js → DevicePanel-JP__PY1s.js} +2 -2
- package/dist/client/assets/{DeviceSetup-5wa1rPPZ.js → DeviceSetup-D8qb_qBj.js} +2 -2
- package/dist/client/assets/{DialogTitle-JDa7kdjH.js → DialogTitle-B_9LEmy3.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-Bp1MeIVC.js → DiffCommentAnnotation-WMKzOwCh.js} +2 -2
- package/dist/client/assets/{DiffFileTree-b24emCci.js → DiffFileTree-BSbsOOmA.js} +2 -2
- package/dist/client/assets/DiffPanel-BWFuiHvv.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-BoEAlLkf.js → DiffWorkerPoolProvider-BBk0lIX3.js} +2 -2
- package/dist/client/assets/EmbeddedDesign-B4RMmwTG.css +1 -0
- package/dist/client/assets/EmbeddedDesign-D5YUndkh.js +21 -0
- package/dist/client/assets/{EnvironmentMachineIcon-Emg7F_9r.js → EnvironmentMachineIcon-Dpgx67FY.js} +2 -2
- package/dist/client/assets/{ExpandableText-CK6tzx1k.js → ExpandableText-Cpm1gOKG.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-C31Sm0mF.js → FNOVOB4O-BkEIrB0k.js} +2 -2
- package/dist/client/assets/{FieldControl-7KI8YfqD.js → FieldControl-BHe6unoZ.js} +2 -2
- package/dist/client/assets/{FileDiff-CXJUPm2t.js → FileDiff-C1vAOUga.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-BMID-IVR.js → FilePreviewPanel-CbpNevZP.js} +4 -4
- package/dist/client/assets/{FoldedSettingsSection-Dzi9RecU.js → FoldedSettingsSection-DySTg20x.js} +2 -2
- package/dist/client/assets/{FormContext-DAP0MupI.js → FormContext-CmvUzTS-.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-DZ2nNieb.js → HDGCDEEZ-CN-ckGDk.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-DlFBBKjs.js → HSJLKHB7-B0BvmnZE.js} +2 -2
- package/dist/client/assets/{Icons-aTRNsMJy.js → Icons-B4l3TqYa.js} +2 -2
- package/dist/client/assets/Input-Cv-TKh6s.js +2 -0
- package/dist/client/assets/JZOYTAAL-CB_B_Rei.js +1 -0
- package/dist/client/assets/{K3MD6TGW-Drb40Qks.js → K3MD6TGW-IS0rWO1U.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C0M5Zt3R.js → K7RP3OMA-DcqjCOJO.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-mOtug0lc.js → KeybindingsSettings.logic-mF9mJWrc.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-CdTAxECn.js → LHDIQX7Q-CLMgIt4Y.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-DtIPjv1z.js → LUXOKEGN-B1dkmN_M.js} +2 -2
- package/dist/client/assets/{MathTypeset-DTaIJ55e.js → MathTypeset-qeRVy_bc.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-C8Pvhbkj.js → N3JZAHOW-C6sq5aqx.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DY7_VZ5G.js → NUIALGQ3-BG7xJ_qe.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-CDfuCTEv.js → NoProjectsHero-B0KzU91d.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-BH6EzDhm.js → O65XPQGZ-BEfVfDlS.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-BSPRvWV7.js → O7XIQ6OM-BUiRjV87.js} +2 -2
- package/dist/client/assets/{OFQON5FD-VO8HiyY7.js → OFQON5FD-DTgVPbd-.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-Cbg00I7Q.js → P4ConnectAccountPages-C4KYM5XU.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-C9gBlkFF.js → P4ConnectSidebarSignIn-DNPUNJl_.js} +2 -2
- package/dist/client/assets/{PJQHF43J-yTbK55y3.js → PJQHF43J-QRnhQpHu.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-4VFKEoHg.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-HuUxlwtG.js → PierreEntryIcon-DeI-j_7w.js} +2 -2
- package/dist/client/assets/{PopoverHandle-CG975ng4.js → PopoverHandle-DMB4QSp6.js} +2 -2
- package/dist/client/assets/PreviewPanel-CO66mekh.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-BF-iyQ8T.js +2 -0
- package/dist/client/assets/{ProjectFavicon-UXGwc_-W.js → ProjectFavicon-_6hkSNzm.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-BAM7e1e5.js → ProjectIconPickerDialog-DeL1rZxy.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-f16fmYcx.js → ProjectMonogram-Cn4l-YGU.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-e0ZkNHAb.js → ProviderAuthTerminal-qGeMxZDy.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-DJQYH_Pp.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-CXMFT8YA.js → ProviderSettingsForm-BSVuPnR0.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-0OaJE6XS.js +6 -0
- package/dist/client/assets/{RHNBAITX-TQrYdbHC.js → RHNBAITX-ChqB7inB.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-xMB_y284.js → ReadOnlySourcePreview-B08Wms4m.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-C2ZkZ4DB.js → RenderErrorBoundary-BsOuLEci.js} +3 -3
- package/dist/client/assets/{SLD4V6NK-Bz1tyL2C.js → SLD4V6NK-IkYRGtTH.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-1UDkELZo.js +4 -0
- package/dist/client/assets/{ScopedSwitch-DBUAjY1n.js → ScopedSwitch-Bhp6-hCj.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-U1Zhpkdl.js → ScrollAreaCorner-BPMuWLbs.js} +2 -2
- package/dist/client/assets/{SecretInput-BxYmGvR5.js → SecretInput-RlOzrLKL.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-CJ4E0xi4.js → SelectScrollUpArrow-6kh66YCd.js} +2 -2
- package/dist/client/assets/{SettingsPanels-DRK5QQ04.js → SettingsPanels-BfBUSBAG.js} +6 -6
- package/dist/client/assets/{SettingsPanels.logic-Bdp6GzIj.js → SettingsPanels.logic-BsFZYDgm.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-DYiUHoov.js → SettingsScopeNotice-H7UzC9bb.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-DJwqsK9f.js → T3PCR2KE-BxaunvVy.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-CRU32th0.js → TKWO2OVW-DFURsfqA.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-dMhDuHVe.js → TSHNXIZL-CIukdyLy.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-BIQc-w2Q.js → ThemeEditorPanel-otrA-nTg.js} +3 -3
- package/dist/client/assets/{ThreadTerminalDrawer-BqO5rPzw.js → ThreadTerminalDrawer-BQKZCFAC.js} +4 -4
- package/dist/client/assets/TooltipViewport-ZmVCer7P.js +2 -0
- package/dist/client/assets/{UQJE5E4I-DH2S3Hdw.js → UQJE5E4I-CfqCotH2.js} +2 -2
- package/dist/client/assets/{USNYFO5S-Cfz4g-2W.js → USNYFO5S-CctAAheU.js} +2 -2
- package/dist/client/assets/{Virtualizer-ChRGRE40.js → Virtualizer-CImHNxBq.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-C55QWN7O.js → WEVWDWVA-DS9YO9IT.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-8nBISaRF.js → WorkspaceBreadcrumb-BW_omYU1.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-BGE_kHaP.js → WorkspacePageContainer-BS8FWt_4.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-D704geLh.js → WorkspacePageHeader-CE_94tTR.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-hmS6q1sh.js → X5RFHQXM-B0KbwoE1.js} +2 -2
- package/dist/client/assets/{X62E3GBT-BhTtqjj4.js → X62E3GBT-wpz8X9Yh.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-1paZyqxX.js → XBNEOJTC-DFRK5c6Y.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-DbfthGUh.js → YHV2MVVZ-1NnqTTZ2.js} +2 -2
- package/dist/client/assets/{YURCZMG2-D8tAzwGP.js → YURCZMG2-rnzWY5ij.js} +2 -2
- package/dist/client/assets/{YVG2LODB-DMSQWWQ_.js → YVG2LODB-Dxuuk2M-.js} +2 -2
- package/dist/client/assets/_chat-1QGQLbCc.js +45 -0
- package/dist/client/assets/{_chat.design-CdPf_wsA.js → _chat.design-z2pu_9A5.js} +2 -2
- package/dist/client/assets/{_chat.index-BkTRJLOf.js → _chat.index-D8X9o5jY.js} +2 -2
- package/dist/client/assets/{_chat.new-CEmRJFEH.js → _chat.new-CGJw8cpo.js} +3 -3
- package/dist/client/assets/_chat.pull-requests-BfW9qMU1.js +2 -0
- package/dist/client/assets/{alert-DiE1d01s.js → alert-DO06etEs.js} +2 -2
- package/dist/client/assets/{assetUrls-BeScRf6b.js → assetUrls-CmOUMX2M.js} +2 -2
- package/dist/client/assets/assets-aBpLf8r4.js +2 -0
- package/dist/client/assets/{browserHistoryStore-hrG24FfH.js → browserHistoryStore-tYgeZygn.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-D8HEmVsi.js → browserLinkTarget-CQFfJKWJ.js} +2 -2
- package/dist/client/assets/{checkbox-CwFE3KXZ.js → checkbox-BEQFb7GO.js} +2 -2
- package/dist/client/assets/{color-picker-BKtR2mwD.js → color-picker-CXfnfmuH.js} +2 -2
- package/dist/client/assets/{combobox-DBUxcuwi.js → combobox--XoXA5uu.js} +2 -2
- package/dist/client/assets/{command-NV0JEoGo.js → command-E2aLhsct.js} +2 -2
- package/dist/client/assets/composer-logic-BPTz1APL.js +6 -0
- package/dist/client/assets/{composerDraftUploads-BmpBCVnP.js → composerDraftUploads-b_0oxKs9.js} +2 -2
- package/dist/client/assets/{connect-Bzgsrfe8.js → connect-CU9dNvTt.js} +2 -2
- package/dist/client/assets/{connect-agent-BCguLPkZ.js → connect-agent-Byc9PCdW.js} +2 -2
- package/dist/client/assets/{design-BGLTZdWG.js → design-CoGbXd61.js} +2 -2
- package/dist/client/assets/{device-D0-STSSP.js → device-DmH6IHQ4.js} +2 -2
- package/dist/client/assets/{dialog-pqqgtsKn.js → dialog-CBBxT1gk.js} +2 -2
- package/dist/client/assets/{diffRendering-eAJMSnXr.js → diffRendering-BOVFJuWd.js} +2 -2
- package/dist/client/assets/{dist-KeWCSS5h.js → dist-B2P3f-0Q.js} +3 -3
- package/dist/client/assets/{draft-input-DrGl-qts.js → draft-input-CSOOVntS.js} +2 -2
- package/dist/client/assets/{duoViewer-DKygyhUj.js → duoViewer-BhHYrurM.js} +2 -2
- package/dist/client/assets/{dynamic-DKhgWyT6.js → dynamic-BhzrutAo.js} +2 -2
- package/dist/client/assets/{embeddedScripts-WSYzbtcW.js → embeddedScripts-43_R83vp.js} +2 -2
- package/dist/client/assets/{empty-Du5F51Da.js → empty-FOL5U4KY.js} +2 -2
- package/dist/client/assets/entities-Bqo0n1Pb.js +2 -0
- package/dist/client/assets/{fileLinks-BEJjCE8r.js → fileLinks-D4GSqJYj.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CCF3XVRn.js → fileTreeExpansion-BBT5F8P1.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-Dkc1Whpr.js → getDiffFileInput-CGw09SPI.js} +2 -2
- package/dist/client/assets/{guideRunStore-CVyie1IJ.js → guideRunStore-DvIkVECt.js} +2 -2
- package/dist/client/assets/{htmlRender-fSOuRG49.js → htmlRender-CmEeFzCo.js} +2 -2
- package/dist/client/assets/{index-RvCv9K-x.js → index-B1djVqM4.js} +3 -3
- package/dist/client/assets/{input-GkmNnHh7.js → input-ekYqAkUx.js} +2 -2
- package/dist/client/assets/{input-group-Cql1yQRL.js → input-group-C3pxk97H.js} +2 -2
- package/dist/client/assets/{kbd-D2OGhJqG.js → kbd-3FPzNikV.js} +2 -2
- package/dist/client/assets/{keybindings-1XWkWeQB.js → keybindings-B3oDRRkK.js} +2 -2
- package/dist/client/assets/{lazy-BUyZ03gL.js → lazy-DyNR0b0B.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-BXmOK9bz.js → lazyRouteComponent-BPxq_G_s.js} +2 -2
- package/dist/client/assets/{link-BGMNeg05.js → link-B3B5a5Ju.js} +2 -2
- package/dist/client/assets/{linkedPrompt-B3l4m_6D.js → linkedPrompt-BsCPMHxQ.js} +2 -2
- package/dist/client/assets/main-BWh6jqG2.js +29 -0
- package/dist/client/assets/main-DdVSHl80.css +2 -0
- package/dist/client/assets/{mediaReference-CsA5Lv5E.js → mediaReference-Bb8H-qbI.js} +2 -2
- package/dist/client/assets/{mediaSource-BbYoxHZJ.js → mediaSource-C2MsZgy8.js} +2 -2
- package/dist/client/assets/number-field-SoHEiP55.js +2 -0
- package/dist/client/assets/{observeResize-CNtO3VS7.js → observeResize-3Vj9DYOV.js} +2 -2
- package/dist/client/assets/{onboarding-KXMrOHsw.js → onboarding-CPgiVEVK.js} +2 -2
- package/dist/client/assets/{openFileInPreview-BKTnNQFl.js → openFileInPreview-BBWCOLh_.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-sAVjpCzn.js → p4ProjectFile-qmvlbzKv.js} +2 -2
- package/dist/client/assets/{pair-BIaVaT-B.js → pair-CZnRGdd8.js} +2 -2
- package/dist/client/assets/{pendingSendStore-CPz2p40W.js → pendingSendStore-L5KquCDf.js} +2 -2
- package/dist/client/assets/{phoneViewer-DGKQHyy3.js → phoneViewer-D-8v-sMf.js} +2 -2
- package/dist/client/assets/{pierre-icons-6ByaxkH5.js → pierre-icons-jwqMPUxD.js} +2 -2
- package/dist/client/assets/{popover-BIXQitBy.js → popover-OfG3wVsl.js} +2 -2
- package/dist/client/assets/{preview-BcEybEc8.js → preview-BYnEURcB.js} +2 -2
- package/dist/client/assets/{preview-C3ymkoAM.js → preview-DGdQ5Ycc.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-DWw2A_gt.js → previewMiniPlayerStore-Dlbj5KrZ.js} +2 -2
- package/dist/client/assets/primary-B47ivN3o.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-CreqR0gU.js +2 -0
- package/dist/client/assets/projectFilesQueryState-CanWrACx.js +2 -0
- package/dist/client/assets/{projectScriptEditor-CNXQwWP8.js → projectScriptEditor-gWuw6vwd.js} +2 -2
- package/dist/client/assets/{providerSkills-CNeLyiqf.js → providerSkills-C_Rxqah9.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-BNpxef-3.js → pullRequestDetail.logic-RASi2EgP.js} +4 -4
- package/dist/client/assets/{pullRequestIcons-CSs54zQk.js → pullRequestIcons-ucGaXXG7.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-BawbGhnx.js → pullRequestReviewStore-CEr41DEl.js} +2 -2
- package/dist/client/assets/pullRequests-Bw3Ui6hK.js +2 -0
- package/dist/client/assets/queries-EslKFJTV.js +2 -0
- package/dist/client/assets/query-d1pQlqP0.js +2 -0
- package/dist/client/assets/{radio-group-yq5YEgUO.js → radio-group-Ciy_K5uE.js} +2 -2
- package/dist/client/assets/{renderScheduler--3RDWz9Z.js → renderScheduler-CP-JkmKx.js} +2 -2
- package/dist/client/assets/rightPanelStore-D3KOmuPa.js +2 -0
- package/dist/client/assets/runtime-DR7JxgbQ.js +6 -0
- package/dist/client/assets/runtime-d6B1vJeH.js +3 -0
- package/dist/client/assets/runtimeModeConfig-Rxeb1uGg.js +2 -0
- package/dist/client/assets/{scheduledTasksSettings.logic-DefawCwN.js → scheduledTasksSettings.logic-CVIC4Kpr.js} +3 -3
- package/dist/client/assets/{scroll-area-CfW8fzQ8.js → scroll-area-yyfi3ycu.js} +2 -2
- package/dist/client/assets/{select-C10oXKGz.js → select-DaYjjw1q.js} +2 -2
- package/dist/client/assets/selfImproveFindings-1XIHD-7i.js +2 -0
- package/dist/client/assets/server-sXApTCjZ.js +2 -0
- package/dist/client/assets/{session-yxXjF8AQ.js → session-C949OsEI.js} +2 -2
- package/dist/client/assets/session-logic-DkSfwnHl.js +26 -0
- package/dist/client/assets/{settings-CgshkEb_.js → settings-B0O54Q3P.js} +2 -2
- package/dist/client/assets/{settings.appearance-yicuncxz.js → settings.appearance-BesXhA1a.js} +2 -2
- package/dist/client/assets/settings.archived-FtcZf_Ug.js +2 -0
- package/dist/client/assets/settings.computer-use-BeKmLbNe.js +2 -0
- package/dist/client/assets/settings.connections-D1UxckE0.js +2 -0
- package/dist/client/assets/{settings.data-controls-CZ5aXdyA.js → settings.data-controls-lPiIwMgc.js} +2 -2
- package/dist/client/assets/settings.decisions-D97jIUyr.js +2 -0
- package/dist/client/assets/{settings.designs-j9E6N2pN.js → settings.designs-B473PRvt.js} +2 -2
- package/dist/client/assets/settings.diagnostics-DDOaOIDg.js +2 -0
- package/dist/client/assets/{settings.general-BCrYSHkU.js → settings.general-qzEOE2zF.js} +2 -2
- package/dist/client/assets/settings.integrations-D6ctQ9WI.js +2 -0
- package/dist/client/assets/{settings.keybindings-BQ-LrcTn.js → settings.keybindings-BL57H4sD.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-BHiHgzgF.js → settings.open-source-licenses-DaS82UhN.js} +2 -2
- package/dist/client/assets/{settings.plugins-DavhWo4Q.js → settings.plugins-DnS3RrT2.js} +4 -4
- package/dist/client/assets/{settings.projects-uuJOwkSl.js → settings.projects-D-ZICXey.js} +4 -4
- package/dist/client/assets/settings.providers-CFpCmv0o.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-DoWHIDOp.js → settings.scheduled-tasks-IEAC3STn.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-ClKlVUUJ.js → settings.snap-shot-BaOFk9WR.js} +2 -2
- package/dist/client/assets/{settings.source-control-o8jFa_Cr.js → settings.source-control-BW16AA5z.js} +2 -2
- package/dist/client/assets/{settings.storage-Bb-cW0xG.js → settings.storage-D4vBYBRP.js} +2 -2
- package/dist/client/assets/settingsLayout-CFQx1XDM.js +3 -0
- package/dist/client/assets/{sidebar-Bd6PzVyD.js → sidebar-C1E4GqL6.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-C13IyN_p.js → sidebarProjectGrouping-9cUrCOXH.js} +2 -2
- package/dist/client/assets/{skeleton-pd7m2J5F.js → skeleton-BCpBrYxh.js} +2 -2
- package/dist/client/assets/{sourceControl-Y9v_vyKt.js → sourceControl-DwJWPP0h.js} +2 -2
- package/dist/client/assets/{sourceControlClients-KQ5315mN.js → sourceControlClients-BBJW7ra4.js} +2 -2
- package/dist/client/assets/{spinner-CW23--q5.js → spinner-CSTrcxhP.js} +2 -2
- package/dist/client/assets/{terminal-links-Bd9AoAyA.js → terminal-links-D18LpQ1T.js} +2 -2
- package/dist/client/assets/{terminalSessions-CF7f4A-6.js → terminalSessions-C2NUFncF.js} +2 -2
- package/dist/client/assets/{textarea-DSS-lavF.js → textarea-R4UQ47Ns.js} +2 -2
- package/dist/client/assets/{themePalette-C_1pk_Mi.js → themePalette-neUNWCzK.js} +3 -3
- package/dist/client/assets/toast-B84QdqqM.js +2 -0
- package/dist/client/assets/{toggle-Cpfo0sMT.js → toggle-BH5BGBcD.js} +2 -2
- package/dist/client/assets/{toggle-group-FrArhs7R.js → toggle-group-Di3SFV73.js} +2 -2
- package/dist/client/assets/{tooltip-CSzrAm8M.js → tooltip-D-GRl-oZ.js} +2 -2
- package/dist/client/assets/{uiStateStore-VHQ8vDs5.js → uiStateStore-xSkh4_PU.js} +2 -2
- package/dist/client/assets/{usage-uwswTMhu.js → usage-DUdXloVo.js} +2 -2
- package/dist/client/assets/{usageAccess-BDwH_c8I.js → usageAccess-DSLF-sRE.js} +2 -2
- package/dist/client/assets/{usageFormat-CKgwjLMR.js → usageFormat-Bzyvr9m4.js} +2 -2
- package/dist/client/assets/{usageShortcuts-lXBRgPmi.js → usageShortcuts-D6nQeRtx.js} +2 -2
- package/dist/client/assets/{use-atom-command-CSWaAmR7.js → use-atom-command-DA6OG-Qk.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-vgEmgPPR.js → useAriaLabelledBy-PLuOxvFb.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-BVFM3SUe.js → useHandleNewThread-Dm0SCq59.js} +2 -2
- package/dist/client/assets/{useLocation-FEfJrgGU.js → useLocation-Bqc94klS.js} +2 -2
- package/dist/client/assets/{useNavigate-Lp_S-tAl.js → useNavigate-DdjG4MB_.js} +2 -2
- package/dist/client/assets/{useNavigateBack-BTJoRrRy.js → useNavigateBack-sP0LsL3p.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-7Z8osIH2.js → useP4ConnectAuthPrompt-C9d7n33S.js} +2 -2
- package/dist/client/assets/{useParams-8KxPyQmv.js → useParams-DZQvRQLJ.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-CyvlYHNs.js → usePermissionStatus-BzfAUU9X.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-DfyxdDPg.js → usePullRequestActions-DIjGLg1E.js} +3 -3
- package/dist/client/assets/{useRegisterFieldControl-Dj6RbECy.js → useRegisterFieldControl-CyBVe0G0.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BfFbT2DU.js → useScopedModelAvailability-D4n22Nmm.js} +2 -2
- package/dist/client/assets/useSettings-CaJMqrvF.js +3 -0
- package/dist/client/assets/utils-BoMYW9A3.js +37 -0
- package/dist/client/assets/vcsRefInvalidation-w_CQ3i43.js +2 -0
- package/dist/client/assets/{welcome-CIETplg9.js → welcome-BIKH3rbU.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{renderer-D8FhaVWU.mjs → renderer-CveKT929.mjs} +26 -3
- package/dist/{runtime-a3PrAU7n.mjs → runtime-DGGSjC6Q.mjs} +149 -5
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-B--i3imS.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-LQ3LzsF3.js +0 -2
- package/dist/client/assets/ComposerPromptEditor-Bz4_w6ez.js +0 -204
- package/dist/client/assets/DiffPanel-bEjr64Vx.js +0 -2
- package/dist/client/assets/EmbeddedDesign-Cud7UEy4.css +0 -1
- package/dist/client/assets/EmbeddedDesign-DmRjhA9k.js +0 -21
- package/dist/client/assets/Input-rVh9fuLP.js +0 -2
- package/dist/client/assets/JZOYTAAL-DXVzZiqj.js +0 -1
- package/dist/client/assets/PanelLayoutControls-40ju6vkz.js +0 -216
- package/dist/client/assets/PreviewPanel-Ljaq9IHA.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-DhwkzlK6.js +0 -2
- package/dist/client/assets/ProviderModelPicker-BviWI2wX.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-Bm67cV34.js +0 -6
- package/dist/client/assets/ScheduledTasksSettings-D-GMMbJH.js +0 -4
- package/dist/client/assets/TooltipViewport-Bz56sWCM.js +0 -2
- package/dist/client/assets/_chat-CXVo1NVJ.js +0 -46
- package/dist/client/assets/_chat.pull-requests-4M0tUrJ6.js +0 -2
- package/dist/client/assets/assets-RdKoqY9e.js +0 -2
- package/dist/client/assets/composer-logic-BQdFVlkE.js +0 -6
- package/dist/client/assets/entities-n6SMnPE8.js +0 -2
- package/dist/client/assets/main-BP1f3auf.css +0 -2
- package/dist/client/assets/main-Dcfxjdkd.js +0 -29
- package/dist/client/assets/number-field-jauVDwvy.js +0 -2
- package/dist/client/assets/primary-DD11poOa.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-CD2_f6q-.js +0 -2
- package/dist/client/assets/projectFilesQueryState-C8dGr8oR.js +0 -2
- package/dist/client/assets/pullRequests-jsc4Hq78.js +0 -2
- package/dist/client/assets/queries-DZV2RDc9.js +0 -2
- package/dist/client/assets/query-BV3IuYff.js +0 -2
- package/dist/client/assets/rightPanelStore-CeZBJCMI.js +0 -2
- package/dist/client/assets/runtime-DSZ2mWrf.js +0 -6
- package/dist/client/assets/runtime-DTUiqO10.js +0 -3
- package/dist/client/assets/runtimeModeConfig-BwioIXVs.js +0 -2
- package/dist/client/assets/server-ztj8tD38.js +0 -2
- package/dist/client/assets/session-logic-w7gGMFHb.js +0 -26
- package/dist/client/assets/settings.archived-ZXG8lJ_T.js +0 -2
- package/dist/client/assets/settings.computer-use-lOJg1Jos.js +0 -2
- package/dist/client/assets/settings.connections-DSPQOd-W.js +0 -2
- package/dist/client/assets/settings.decisions-C8qxQCjl.js +0 -2
- package/dist/client/assets/settings.diagnostics-yio3SGbE.js +0 -2
- package/dist/client/assets/settings.integrations-Dl-vtiOS.js +0 -2
- package/dist/client/assets/settings.providers-rZQTQdtf.js +0 -3
- package/dist/client/assets/settingsLayout-DzBeWTUO.js +0 -3
- package/dist/client/assets/toast-BFuAqla3.js +0 -2
- package/dist/client/assets/useSettings-CPPvBMmM.js +0 -3
- package/dist/client/assets/utils-BE5iQuUP.js +0 -37
- package/dist/client/assets/vcsRefInvalidation-DCdd2BDA.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,r as t,t as n}from"./react-DH3P2YXY.js";import{n as r,t as i}from"./jsx-runtime-BnjsACtP.js";import{Co as a,D as o,Ga as s,Gd as c,Gi as l,Ha as u,Hi as d,Hu as f,Id as p,Im as m,Kf as h,Ki as g,Lr as _,Ma as v,Mo as y,Oa as b,Oo as x,Pr as S,Qs as C,Rd as w,Sa as T,Tb as E,Va as D,Wa as O,Wp as ee,Wy as k,_u as te,aa as A,ba as ne,bt as j,di as M,dr as N,fa as P,ha as F,ia as I,ji as L,jo as R,jr as re,ko as ie,la as ae,ma as z,ml as oe,nd as se,nh as ce,pa as le,pr as ue,rb as de,sa as B,sb as V,t as H,ua as fe,wa as pe,wi as me,wo as U,ya as W,za as he,zm as ge}from"./utils-BE5iQuUP.js";import{jn as _e}from"./runtime-DSZ2mWrf.js";import{S as ve,d as ye,f as be,l as G,m as xe,u as Se}from"./TooltipViewport-Bz56sWCM.js";import{t as Ce}from"./spinner-CW23--q5.js";import{t as we}from"./useParams-8KxPyQmv.js";var Te=E(oe),Ee=E(te);function De(e){return Ee(e)&&(e.reason===`thread_not_empty`||e.reason===`thread_not_side_chat`)}function Oe(e){return Te(e)&&e.bootstrapThreadDisposition===`deleted`}function ke(e){return Te(e)&&e.bootstrapThreadDisposition===`not-created`}var Ae=[/\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,`\\$&`))(_e)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function je(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Ae.some(e=>e.test(t))}function Me(e){return je(e)?null:e??null}var K=e(n()),Ne=K.createContext(void 0);function Pe(){let e=K.useContext(Ne);if(!e)throw Error(y(73));return e}var Fe=0;function Ie(e){return Fe+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Fe}`}function Le(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 Re(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 ze=e=>e.toastMetadata,q={toasts:L(e=>e.toasts),isEmpty:L(e=>e.toasts.length===0),toast:L(ze,(e,t)=>e.get(t)?.value),toastIndex:L(ze,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:L(ze,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:L(ze,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:L(e=>e.hovering),focused:L(e=>e.focused),expanded:L(e=>e.hovering||e.focused),expandedOrOutOfFocus:L(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:L(e=>e.prevFocusElement)},Be=class extends me{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Re(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||Ie(`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);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),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:Re(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=Le(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Le(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Le(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??=W.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=F(e);z(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?W.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:Re(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=le(B(this.state.viewport));if(!this.state.viewport||!z(this.state.viewport,t)||!P(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()),Ve=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=R(()=>new Be({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return b(a.disposeEffect),K.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,J.jsx)(Ne.Provider,{value:a,children:t})},He=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),Ue=K.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Pe(),c=ne(),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`),g=s.useState(`prevFocusElement`),_=p[0]?.height??0,v=K.useMemo(()=>p.some(e=>e.transitionStatus===`ending`),[p]),y=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`&&F(t)!==e&&(t.preventDefault(),s.setPrevFocusElement(le(B(e))),e?.focus({preventScroll:!0}),s.pauseTimers(),s.setFocused(!0))}let n=O(e);return fe(n,`keydown`,t)},[s,f]),K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=O(e);function n(e){F(e)===t&&(s.setIsWindowFocused(!1),s.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=F(n),i=le(B(e));(r===t||!z(e,r)||!P(i))&&s.resumeTimers(),c.start(0,()=>s.setIsWindowFocused(!0))}return ae(fe(t,`blur`,n,!0),fe(t,`focus`,r,!0))},[s,c,f]),K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=B(e);return fe(t,`pointerdown`,s.handleDocumentPointerDown,!0)},[f,s]);function b(e){let t=s.state.viewport;t&&(l.current=!0,e.relatedTarget===t?p[0]?.ref?.current?.focus():s.restoreFocusToPrevElement())}function x(e){e.key===`Tab`&&e.shiftKey&&F(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement(),s.resumeTimers())}function S(){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(S,[v,s]);function C(){s.pauseTimers(),s.setHovering(!0),u.current=!1}function w(){v||d.current?u.current=!0:(s.resumeTimers(),s.setHovering(!1))}function T(e){e.pointerType===`touch`&&(d.current=!0)}function E(e){e.pointerType===`touch`&&(d.current=!1,S())}function D(){if(l.current){l.current=!1;return}m||P(le(B(s.state.viewport)))&&(s.setFocused(!0),s.pauseTimers())}function ee(e){m&&!z(s.state.viewport,e.relatedTarget)&&(s.setFocused(!1),s.resumeTimers())}let k={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:C,onMouseMove:C,onMouseLeave:w,onFocus:D,onBlur:ee,onKeyDown:x,onClick:D,onPointerDown:T,onPointerUp:E,onPointerCancel:E},te={expanded:h},j=U(`div`,e,{ref:[t,s.setViewport],state:te,props:[k,{style:{[He.frontmostHeight]:_?`${_}px`:void 0}},o,{children:(0,J.jsxs)(K.Fragment,{children:[!f&&g&&(0,J.jsx)(I,{onFocus:b}),a,!f&&g&&(0,J.jsx)(I,{onFocus:b})]})}]});return(0,J.jsxs)(K.Fragment,{children:[!f&&g&&(0,J.jsx)(I,{onFocus:b}),j,!m&&y.length>0&&(0,J.jsx)(`div`,{style:A,children:y.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))})]})}),We=e(pe()),Ge=K.createContext(void 0);function Ke(){let e=K.useContext(Ge);if(!e)throw Error(y(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 qe(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 Je(e){let t=O(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 Ye={...a,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Xe=40,Ze=10,X=.5,Qe=1,$e=`${d},${l}`,et=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 d=l.length>0,f=Pe(),[p,m]=K.useState(void 0),[h,g]=K.useState(!1),[v,y]=K.useState(!1),[b,x]=K.useState(!1),[S,C]=K.useState({x:0,y:0}),[w,E]=K.useState({x:0,y:0,scale:1}),[O,ee]=K.useState(),[k,te]=K.useState(),[A,ne]=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),I=K.useRef(0),L=K.useRef(!1),R=K.useRef({x:0,y:0}),re=K.useRef(!1),ie=K.useRef({x:0,y:0}),ae=K.useRef(null),oe=K.useRef(null),se=f.useState(`toastIndex`,n.id),ce=f.useState(`toastVisibleIndex`,n.id),ue=f.useState(`toastOffsetY`,n.id),de=f.useState(`focused`),V=f.useState(`expanded`);T({open:n.transitionStatus!==`ending`,ref:j,onComplete(){n.transitionStatus===`ending`&&f.removeToast(n.id)}});let H=u((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(){f.updateToastInternal(n.id,{ref:j,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?We.flushSync(a):a()});D(H,[H]);function pe(e){ie.current=e,C(e)}D(()=>()=>{oe.current?.abort()},[]);function me(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let W=u(e=>{if(e.pointerId!==ae.current)return;ae.current=null,oe.current?.abort(),oe.current=null,g(!1),y(!1),ne(null);let t=N.current;if(e.type===`pointercancel`||L.current){pe({x:t.x,y:t.y}),m(void 0);return}let r=!1,i=ie.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>Xe&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>Xe&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(m(s),x(!0),f.closeToast(n.id)):(pe({x:t.x,y:t.y}),m(void 0))});function he(e){if(e.button!==0)return;e.pointerType===`touch`&&f.pauseTimers();let t=F(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${$e}`))return;if(L.current=!1,P.current=void 0,I.current=0,ae.current=e.pointerId,M.current={x:e.clientX,y:e.clientY},R.current=M.current,j.current){let e=Je(j.current);N.current=e,E(e),pe({x:e.x,y:e.y})}f.setHovering(!0),g(!0),y(!1),ne(null),re.current=!0;let n=j.current;if(n){oe.current?.abort();let t=new AbortController;oe.current=t;let r=B(n);r.addEventListener(`pointerup`,W,{signal:t.signal}),r.addEventListener(`pointercancel`,W,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function ge(e){if(e.pointerId!==ae.current)return;e.preventDefault(),re.current&&=(M.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>R.current.y||i>0&&t<R.current.y)&&(R.current={x:R.current.x,y:t}),(r<0&&n>R.current.x||r>0&&n<R.current.x)&&(R.current={x:n,y:R.current.y});let a=n-M.current.x,o=t-M.current.y,s=t-R.current.y,c=n-R.current.x;if(!v&&Math.sqrt(a*a+o*o)>=Qe&&(y(!0),A===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&ne(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!P.current)A===`vertical`?o>0?u=`down`:o<0&&(u=`up`):A===`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,I.current=qe(u,a,o),m(u));else{let e=P.current,t=qe(e,c,s);t>Xe?(L.current=!1,m(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&I.current-t>=Ze&&(L.current=!0)}let d=me(a,o),f=N.current.x,p=N.current.y;A===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(A===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(p+=d.y)),pe({x:f,y:p})}function _e(e){if(e.key===`Escape`){if(!j.current||!z(j.current,le(B(j.current))))return;f.closeToast(n.id)}}K.useEffect(()=>{if(!d)return;let e=j.current;if(!e)return;function t(t){z(e,F(t))&&t.preventDefault()}return fe(e,`touchmove`,t,{passive:!1})},[d]);function ve(){if(!h&&S.x===w.x&&S.y===w.y&&!b)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:h?`none`:void 0,transform:h?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let ye=n.priority===`high`,be={role:ye?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":O,"aria-describedby":k,"aria-hidden":ye&&!de?!0:void 0,onPointerDown:d?he:void 0,onPointerMove:d?ge:void 0,onPointerUp:d?W:void 0,onPointerCancel:d?W:void 0,onKeyDown:_e,inert:_(n.limited),style:{...ve(),[Y.index]:n.transitionStatus===`ending`?se:ce,[Y.offsetY]:`${ue}px`,[Y.height]:n.height?`${n.height}px`:void 0}},G=K.useMemo(()=>({rootRef:j,toast:n,titleId:O,setTitleId:ee,descriptionId:k,setDescriptionId:te,swiping:h,swipeDirection:p,recalculateHeight:H,index:se,visibleIndex:ce,expanded:V}),[n,O,k,h,p,H,se,ce,V]),xe={transitionStatus:n.transitionStatus,expanded:V,limited:n.limited||!1,type:n.type,swiping:G.swiping,swipeDirection:G.swipeDirection},Se=U(`div`,e,{ref:[t,G.rootRef],state:xe,stateAttributesMapping:Ye,props:[be,s]});return(0,J.jsx)(Ge.Provider,{value:G,children:Se})}),tt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=Ke(),l=K.useRef(null);return D(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),U(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),nt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=Ke(),u=o??c.description,d=!!u,f=v(a);D(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=U(`p`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),rt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=Ke(),u=o??c.title,d=!!u,f=v(a);D(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=U(`h2`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),it=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Pe(),{toast:l}=Ke(),u=c.useState(`expanded`),[d,f]=K.useState(!1),{getButtonProps:p,buttonRef:m}=he({disabled:a,native:o}),h={type:l.type};return U(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),at=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=Ke(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=he({disabled:a,native:o}),p={type:c.type},m=U(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),ot=Se,st=K.createContext(void 0);function ct(){let e=K.useContext(st);if(e===void 0)throw Error(y(84));return e}var lt=K.forwardRef(function(e,t){let{toast:n,...r}=e,i=Pe(),a=n.positionerProps??x,{render:o,className:c,anchor:l=a.anchor,positionMethod:u=a.positionMethod??`absolute`,side:d=a.side??`top`,align:f=a.align??`center`,sideOffset:p=a.sideOffset??0,alignOffset:m=a.alignOffset??0,collisionBoundary:h=a.collisionBoundary??`clipping-ancestors`,collisionPadding:_=a.collisionPadding??5,arrowPadding:v=a.arrowPadding??5,sticky:y=a.sticky??!1,disableAnchorTracking:b=a.disableAnchorTracking??!1,collisionAvoidance:C=a.collisionAvoidance??g,style:w,...T}=r,[E,D]=K.useState(null),O=i.useState(`toastIndex`,n.id),ee=i.useState(`toastVisibleIndex`,n.id),k=s(l)?l:null,te=M({open:!0,onOpenChange:ie,elements:{floating:E,reference:k}}),A=S({anchor:k,positionMethod:u,floatingRootContext:te,mounted:!0,side:d,sideOffset:p,align:f,alignOffset:m,collisionBoundary:h,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:C}),ne=K.useMemo(()=>({side:A.side,align:A.align,anchorHidden:A.anchorHidden}),[A.side,A.align,A.anchorHidden]),j=re(e,ne,{styles:{...A.positionerStyles,[Y.index]:n.transitionStatus===`ending`?O:ee},transitionStatus:n.transitionStatus,props:T,refs:[t,D]});return(0,J.jsx)(st.Provider,{value:A,children:j})}),ut=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 U(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function dt(){let e=K.useContext(Ne);if(!e)throw Error(y(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 ft(){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||Ie(`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 pt=t({Action:()=>at,Arrow:()=>ut,Close:()=>it,Content:()=>tt,Description:()=>nt,Portal:()=>ot,Positioner:()=>lt,Provider:()=>Ve,Root:()=>et,Title:()=>rt,Viewport:()=>Ue,createToastManager:()=>ft,useToastManager:()=>dt});function mt(){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=mt(),Q=r(),ht={archive:se,clock:c,pin:ee,trash:m};function gt(){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)(_t,t),null}function _t(){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`?ht[r.icon]:null,i=r.actions??[],a=i.find(yt),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=vt;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 vt(){return Z.setPaused(`web-hidden`,document.hidden)}function yt(e){return e.primary}var bt=class extends V()(`ClipboardApiUnavailableError`,{target:de}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},xt=class extends V()(`ClipboardWriteError`,{target:de,cause:k()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},St=class extends V()(`ClipboardReadUnavailableError`,{target:de}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},Ct=class extends V()(`ClipboardReadError`,{target:de,cause:k()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function wt(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 Tt(e,t=`text`,n){if(typeof window>`u`)throw new bt({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[f];if(r&&(n={...n,"text/html":j(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(wt(e,n))return!0;throw new bt({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 xt({target:t,cause:e})}}async function Et(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new St({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new Ct({target:e,cause:t})}}function Dt({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)=>{Tt(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 Ot(e){return e===`live`}function kt(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function At(e){return{environmentId:e.environmentId,threadId:e.threadId}}function jt(e){return{draftId:e}}function Mt(e){return!e.environmentId||!e.threadId?null:C(e.environmentId,e.threadId)}function Nt(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:C(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function Pt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Ft(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function It(e,t){return t<=1?!1:e>0}function Lt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=Rt(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:Rt(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function Rt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function zt(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 $=ft(),Bt=ft(),Vt=new Map,Ht={error:p,info:h,loading:Ce,success:w,warning:ge},Ut=180;function Wt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Ut))return`line-clamp-4`}function Gt(e,t,n){n?.(),e.close(t)}function Kt(e){let t=(0,Q.c)(3),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(ce,{}),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`,onClick:n,children:r}),t[1]=n,t[2]=i),i}function qt(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}=Dt(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=H(`size-3`,c),t[4]=c,t[5]=l);let u=a?ye:ve,d;t[6]!==l||t[7]!==u?(d=(0,J.jsx)(G,{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 Jt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function Yt(e){let t=(0,Q.c)(13),{children:n,labels:r}=e,[i,a]=(0,K.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Xt),t[0]=c):c=t[0];let l=i?xe:be,u;t[1]===l?u=t[2]:(u=(0,J.jsx)(G,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,J.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,J.jsx)(`div`,{className:Jt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Xt(e){return!e}function Zt(e){let t=(0,Q.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=H(`min-w-0 select-text wrap-break-word text-muted-foreground`,Wt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,K.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,J.jsx)(nt,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,J.jsx)(nt,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,J.jsx)(Yt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,J.jsxs)(J.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Qt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=H(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=H(`min-w-0 select-none wrap-break-word text-muted-foreground`,Wt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,J.jsx)(nt,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?xe:be,w;t[23]===C?w=t[24]:(w=(0,J.jsx)(G,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,J.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,J.jsx)(`div`,{className:Jt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,J.jsxs)(J.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Qt(e){return!e}function $t(e){let t=e.type?Ht[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||Ft(e.actionProps)||r||i}}function en(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)(rt,{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)(Zt,{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 shrink-0 items-center gap-1.5`,children:[r===null?null:(0,J.jsx)(qt,{text:r}),u.map(tn),d?(0,J.jsx)(N,{...h,className:m,size:`xs`,type:`button`,variant:o?.sharedToastId?`solid-neutral`:`soft`}):null,Ft(i)?(0,J.jsx)(at,{className:H(ue({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 tn(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 nn(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:rn},e[0]=t):t=e[0];let n=we(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=o(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 rn(e){return Nt(e)}function an(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=Vt.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,Vt.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),Vt.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,K.useEffect)(i,a),null}function on(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)(gt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,J.jsx)(sn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,J.jsxs)(Ve,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function sn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=dt(),i=nn(),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=>zt(e.data,i),t[2]=i,t[3]=s);let c=Lt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(cn));for(let t of Vt.keys())e.has(t)||Vt.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,K.useEffect)(l,u);let d=pt,f=pt,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=H(`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=It(r,c.items.length),s=$t(t);return(0,J.jsxs)(et,{className:H(`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)(an,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),(0,J.jsxs)(tt,{className:H(`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)(en,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),(0,J.jsx)(Kt,{onClick:()=>{let e=t.data?.sharedToastId;e?Z.dismiss(e):Gt($,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 cn(e){return e.id}function ln(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)(un,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,J.jsxs)(Ve,{toastManager:Bt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function un(){let e=(0,Q.c)(7),{toasts:t}=dt(),n=nn(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>zt(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(dn),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)(ot,{"data-slot":`toast-portal-anchored`,children:(0,J.jsx)(Ue,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function dn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=$t(e);return n?.anchor?(0,J.jsx)(lt,{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)(et,{className:H(`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)(tt,{className:`pointer-events-auto px-2 py-1`,children:(0,J.jsx)(rt,{"data-slot":`toast-title`})}):(0,J.jsxs)(tt,{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)(en,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type}),(0,J.jsx)(Kt,{onClick:()=>Gt(Bt,e.id,e.data?.onClose)})]})})},e.id):null}export{Oe as _,jt as a,Pt as c,Nt as d,Et as f,Me as g,Z as h,$ as i,Mt as l,Tt as m,on as n,At as o,Dt as p,Bt as r,Ot as s,ln as t,kt as u,ke as v,De as y};
|
|
2
|
-
//# sourceMappingURL=toast-BFuAqla3.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-DH3P2YXY.js";import{n}from"./jsx-runtime-BnjsACtP.js";import{$T as r,$b as i,Bh as a,Cl as o,Dh as s,Eh as c,El as l,Hb as u,Hh as d,Ig as f,Jv as ee,Lh as te,M_ as ne,Mb as re,Mh as ie,N_ as ae,Nc as oe,Os as se,Q_ as ce,Qb as le,SS as ue,Tb as de,Ts as fe,Ub as pe,Uh as me,Ws as he,Wy as ge,Xb as _e,Yx as ve,Yy as ye,Zo as be,as as p,bS as xe,bT as m,bb as Se,bh as Ce,c_ as we,eE as h,fb as Te,gT as g,gh as Ee,iE as De,j_ as Oe,js as ke,ks as Ae,mb as je,ns as Me,nx as Ne,ov as Pe,ps as _,rb as Fe,rs as Ie,sb as Le,ts as v,tx as Re,u_ as ze,vT as y,vb as Be,wb as Ve,wh as He,wl as Ue,yh as We}from"./utils-BE5iQuUP.js";import{At as Ge,E as Ke,I as qe,R as Je,Sn as Ye,T as Xe,W as Ze,_t as b}from"./runtime-DSZ2mWrf.js";import{T as Qe,Tt as $e,kt as et,t as tt}from"./runtime-DTUiqO10.js";import{i as x}from"./toast-BFuAqla3.js";import{f as S,h as C,m as nt,u as rt}from"./server-ztj8tD38.js";import{i as it,n as at,s as ot,t as st}from"./session-yxXjF8AQ.js";import{t as ct}from"./use-atom-command-CSWaAmR7.js";import{B as lt,C as ut,F as dt,N as ft,O as pt,P as mt,S as ht,V as gt,_ as _t,b as vt,c as yt,i as w,n as bt,o as xt,r as St,y as Ct}from"./themePalette-C_1pk_Mi.js";var T=e(t(),1),E=n();function wt(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function Tt(e){let t=Ie(t=>p(n=>{let i=n(e.catalogValueAtom).entries.get(t);if(i===void 0)return null;let a=r(se(n(e.stateAtom(t))),()=>Ye);return{entry:i,connection:i.unsupportedReason===void 0?et(a):{phase:`unsupported`,error:i.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(_(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:p(r=>{let i=new Map;for(let n of r(e.catalogValueAtom).entries.keys()){let e=r(t(n));e!==null&&i.set(n,e)}return wt(n,i)||(n=i),n}).pipe(_(`environment-presentations`))}}function Et(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:$e(t.entry)??``,isRelayManaged:Ge(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function Dt(e){let t=p(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=h(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=p(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=h(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e.environmentId===r[t]?.environmentId&&e.label===r[t]?.label)?r:n}),r=Ie(t=>p(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=Et(t,r),a=h(n.self());return a!==null&&a.environmentId===i.environmentId&&a.environmentLabel===i.environmentLabel&&a.displayUrl===i.displayUrl&&a.isRelayManaged===i.isRelayManaged&&a.isEnabled===i.isEnabled&&a.connectionState===i.connectionState&&a.connectionError===i.connectionError&&a.connectionErrorTraceId===i.connectionErrorTraceId?a:i})),i=p(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=h(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(_(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:p(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=h(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:p(n=>{let r=new Map(n(t).map(t=>[t,l(n(e.presentationAtom(t))?.serverConfig??null)])),i=h(n.self());return i!==null&&wt(i,r)?i:r}),pullRequestsSupportedAtom:p(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var Ot=Tt({catalogValueAtom:C.catalogValueAtom,stateAtom:C.stateAtom,serverConfigValueAtom:S.configValueAtom}),kt=Dt({catalogValueAtom:C.catalogValueAtom,presentationAtom:Ot.presentationAtom}),At=p(null).pipe(_(`web-environment-presentation:empty`));function jt(e){let t=(0,E.c)(5),n=v(C.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?At:Ot.presentationAtom(e),t[0]=e,t[1]=r);let i=v(r),a;return t[2]!==n.isReady||t[3]!==i?(a={isReady:n.isReady,presentation:i},t[2]=n.isReady,t[3]=i,t[4]=a):a=t[4],a}var Mt={status:`idle`},D=Mt,O=null,k=[],A=0,Nt=new Set;function j(e){D=e;for(let e of Nt)e()}function Pt(e){O?.resolve(e);for(let t of k)t.resolve(e);O=null,k=[]}function Ft(){return D}function It(e){return Nt.add(e),()=>{Nt.delete(e)}}function Lt(){A+=1;let e=!0;return()=>{e&&(e=!1,A=Math.max(0,A-1),A===0&&(Pt(!1),j(Mt)))}}function Rt(e,t){if(A!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};if(O||D.status===`closing`){k.push(r);return}O=r,j({status:`confirming`,message:e,variant:r.variant})})}function zt(){return D.status!==`idle`||O!==null||k.length>0}function Bt(e){if(D.status!==`confirming`||!O)return;let t=O;O=null,t.resolve(e),j({status:`closing`,message:D.message,variant:D.variant})}function Vt(){if(D.status!==`closing`)return;let e=k.shift();if(!e){j(Mt);return}O=e,j({status:`confirming`,message:e.message,variant:e.variant})}var Ht={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Ut(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return oe(t)?`${n.map(e=>Ht[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Wt=`http://www.w3.org/2000/svg`,Gt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"eye-off":[{tag:`path`,attrs:{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}},{tag:`path`,attrs:{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}},{tag:`path`,attrs:{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}},{tag:`path`,attrs:{d:`m2 2 20 20`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function Kt(e,t){let n=Gt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Wt,`svg`);r.setAttribute(`xmlns`,Wt),r.setAttribute(`viewBox`,`0 0 24 24`),r.setAttribute(`fill`,`none`),r.setAttribute(`stroke`,`currentColor`),r.setAttribute(`stroke-width`,`2`),r.setAttribute(`stroke-linecap`,`round`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`class`,t===`destructive`?`size-4.5 shrink-0 sm:size-4`:`size-4.5 shrink-0 text-muted-foreground sm:size-4`);for(let e of n){let t=document.createElementNS(Wt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function qt(e,t,n){let r=e.getBoundingClientRect(),i=Math.min(Math.max(4,t),Math.max(4,window.innerWidth-r.width-4)),a=Math.min(Math.max(4,n),Math.max(4,window.innerHeight-r.height-4));e.style.left=`${i}px`,e.style.top=`${a}px`}function Jt(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var M=null;function Yt(){return M!==null}function Xt(){M?.(),M=null}function Zt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],o=!1,s=!1,c=()=>l(null),l=e=>{if(o)return;o=!0,M===c&&(M=null),document.removeEventListener(`keydown`,u),document.removeEventListener(`pointerdown`,d,!0),document.removeEventListener(`contextmenu`,f,!0);let t=Jt(document.activeElement,i);for(let e of i)e.remove();t&&r?.isConnected&&r.focus({preventScroll:!0}),n(e)},u=e=>{e.key===`Escape`&&(e.preventDefault(),l(null))},d=e=>{s&&!Jt(e.target,i)&&l(null)},f=e=>{s&&!Jt(e.target,i)&&(e.preventDefault(),l(null))},ee=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},te=(e,t,n,r,o)=>{ee(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let u=document.createElement(`div`);u.className=`max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1`,u.style.cssText=`max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;`;for(let t of e){if(t.separatorBefore===!0&&u.children.length>0){let e=document.createElement(`div`);e.className=`mx-2 my-1 h-px bg-border`,e.style.cssText=`height:1px;margin:0.25rem 0.5rem;background:var(--contrast-border);`,e.dataset.contextMenuSeparator=`true`,e.setAttribute(`role`,`separator`),u.appendChild(e)}if(t.header===!0){let e=document.createElement(`div`);e.className=`px-2 py-1.5 font-medium text-muted-foreground text-xs`,e.textContent=t.label,u.appendChild(e);continue}let e=Array.isArray(t.children)&&t.children.length>0,n=!e&&(t.destructive===!0||t.id===`delete`),a=document.createElement(`button`);a.type=`button`;let o=t.disabled===!0;a.disabled=o;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(a.className=o?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,a.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(a.style.color=`var(--destructive-foreground)`),o&&(a.style.color=`var(--contrast-muted-foreground)`,a.style.opacity=`0.64`,a.style.pointerEvents=`none`),typeof t.checked==`boolean`){a.setAttribute(`role`,`menuitemradio`),a.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?Kt(`check`,`neutral`):null;if(e)a.appendChild(e);else{let e=document.createElement(`span`);e.className=`size-4.5 shrink-0 sm:size-4`,e.style.cssText=`display:inline-block;width:1rem;height:1rem;flex-shrink:0;`,e.setAttribute(`aria-hidden`,`true`),a.appendChild(e)}}else if(typeof t.icon==`string`){let e=Kt(t.icon,n?`destructive`:`neutral`);e&&a.appendChild(e)}let d=document.createElement(`span`);if(d.className=`min-w-0 flex-1 truncate`,d.textContent=t.label,a.appendChild(d),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=Ut(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,oe(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=Kt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,a.appendChild(e))}if(!o){let o=!1,c=!1,u=()=>{let e=o||c;a.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,a.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(a.addEventListener(`mouseenter`,()=>{a.focus({preventScroll:!0}),o=!0,u()}),a.addEventListener(`mouseleave`,()=>{o=!1,u()}),a.addEventListener(`focus`,()=>{c=!0,u()}),a.addEventListener(`blur`,()=>{c=!1,u()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;te(t.children,o,s,r+1,a),a.setAttribute(`aria-expanded`,`true`);let c=i[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&qt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};a.addEventListener(`mouseenter`,()=>{e()}),a.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else a.addEventListener(`mouseenter`,()=>{ee(r+1)}),a.addEventListener(`click`,()=>{s&&l(t.id)})}u.appendChild(a)}c.appendChild(u),c.addEventListener(`mouseenter`,()=>{ee(r+1)}),document.body.appendChild(c),i[r]=c,a[r]=o,requestAnimationFrame(()=>{qt(c,t,n)})};document.addEventListener(`keydown`,u),document.addEventListener(`pointerdown`,d,!0),document.addEventListener(`contextmenu`,f,!0),te(e,t?.x??0,t?.y??0,0),M&&M(),M=c,requestAnimationFrame(()=>{s=!0})})}var Qt=`p4code:client-settings:v1`;function $t(){return typeof window<`u`}function en(){return $t()?Ae(Qt,Ee):null}function tn(e){$t()&&ke(Qt,e,Ee)}var nn;function rn(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Rt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`);return}window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):Zt(e,t),close:async()=>{window.desktopBridge||Xt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():en(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);tn(e)}}}}function an(){return rn()}function on(){if(typeof window<`u`)return nn||(nn=an(),nn)}function sn(){let e=on();if(!e)throw Error(`Local API not found`);return e}var N=`p4code:theme`,cn=`(prefers-color-scheme: dark)`,P={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function ln(){return F()}function un(){return typeof window>`u`?{}:dn()}function F(){if(typeof window>`u`)return null;try{return pt(window.localStorage.getItem(w))}catch{return null}}function dn(){try{let e=JSON.parse(window.localStorage.getItem(`p4code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function I(e){return`${e?.light??``}|${e?.dark??``}`}var fn=`theme-color`,pn=`meta[name="${fn}"][data-dynamic-theme-color="true"]`,L=class extends Le()(`ThemeStorageError`,{operation:ye([`read`,`write`]),storageKey:Fe,theme:re(xt),cause:ge()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},mn=de(L),hn=class extends Le()(`DesktopThemeSyncError`,{theme:xt,cause:ge()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},gn=de(hn),R=[],z=null,_n=!0,vn=null,B=null,V=null;function H(){_n=!0;for(let e of R)e()}function yn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(cn).matches}function bn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(St);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function xn(e){return e===`light`||e===`dark`||e===`system`}function U(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(bt);if(xn(e))return e}catch{}return bn(e)?`system`:Ct(e)??`light`}function Sn(e){if(typeof window<`u`)try{window.localStorage.setItem(bt,e)}catch(e){throw new L({operation:`write`,storageKey:bt,cause:e})}}function Cn(){if(typeof window>`u`)return P.theme;let e;try{e=window.localStorage.getItem(N)}catch(e){throw new L({operation:`read`,storageKey:N,cause:e})}return e!==null&&ut(e)?e:P.theme}function wn(e){if(typeof window<`u`)try{window.localStorage.setItem(N,e),V=null}catch(t){throw new L({operation:`write`,storageKey:N,theme:e,cause:t})}}function W(){if(V!==null)return P.theme;try{return Cn()}catch(e){let t=mn(e)?e:new L({operation:`read`,storageKey:N,cause:e});return V=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),P.theme}}function Tn(){let e=document.querySelector(pn);return e||(e=document.createElement(`meta`),e.name=fn,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function En(e){let t=e?.trim().toLowerCase();return!t||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0 0 0 / 0)`?null:e?.trim()??null}function Dn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function On(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?En(e.getPropertyValue(`--app-chrome-background`)):null,n=En(getComputedStyle(Dn()).backgroundColor),r=En(getComputedStyle(document.body).backgroundColor),i=t??n??r;if(!i)return;document.documentElement.style.backgroundColor=i,document.body.style.backgroundColor=i;let a=document.querySelectorAll(`meta[name="${fn}"]`);if(a.length===0){Tn().setAttribute(`content`,i);return}for(let e of a)e.setAttribute(`content`,i)}function G(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=U(e),i=r===`system`,a=i?yn():!1,o=F();if(B?.theme===e&&B.systemDark===a&&B.followSystem===i&&B.appearanceMode===r&&I(B.themeHalves)===I(o)){An(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=mt(e,a,i,r,o);yt(dt(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),B={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},On(),An(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function kn(e,t,n,r,i=F()){try{await e.setTheme(ft(t,n,r,i))}catch(e){throw new hn({theme:t,cause:e})}}function An(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=F(),a=ft(e,t,n,i);r&&typeof r.setTheme==`function`&&vn!==a&&(vn=a,kn(r,e,t,n,i).catch(t=>{let n=gn(t)?t:new hn({theme:e,cause:t});console.error(n.message,{theme:n.theme,...b(n)}),vn===a&&(vn=null)}))}typeof document<`u`&&typeof window<`u`&&G(W());function jn(){if(typeof window>`u`)return P;if(!_n&&z)return z;_n=!1;let e=W(),t=U(e),n=t===`system`,r=n?yn():!1,i=F(),a=mt(e,r,n,t,i);return z&&z.theme===e&&z.resolvedTheme===a&&z.systemDark===r&&z.followSystem===n&&z.appearanceMode===t&&I(z.themeHalves)===I(i)||(z={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),z}function Mn(){return P}function Nn(){let e=W();U(e)===`system`&&G(e,{suppressTransitions:!0}),H()}function Pn(e){e.key===N?(V=null,G(W(),{suppressTransitions:!0}),H()):e.key===`p4code:theme-follow-system`||e.key===`p4code:theme-appearance-mode`||e.key===`p4code:theme-halves:v1`?(G(W(),{suppressTransitions:!0}),H()):(e.key===`p4code:themes:v1`||e.key===null)&&(e.key===null&&(V=null),ht(),B=null,G(W(),{suppressTransitions:!0}),H())}var Fn=null;function In(e){if(typeof window>`u`)return()=>{};if(R.push(e),!Fn){let e=typeof window.matchMedia==`function`?window.matchMedia(cn):null;e?.addEventListener(`change`,Nn),window.addEventListener(`storage`,Pn),Fn=()=>{e?.removeEventListener(`change`,Nn),window.removeEventListener(`storage`,Pn)}}return()=>{R=R.filter(t=>t!==e),R.length===0&&(Fn?.(),Fn=null)}}function Ln(){let e=(0,T.useSyncExternalStore)(In,jn,Mn),{theme:t,resolvedTheme:n}=e,r=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{Sn(U(W()));let t=window.localStorage.getItem(w);window.localStorage.removeItem(w);try{wn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(w,t)}catch{}throw e}}catch(t){let n=mn(t)?t:new L({operation:`write`,storageKey:N,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...b(n)}),!1}return G(e,{suppressTransitions:!0}),H(),!0},[]),i=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{Sn(e)}catch(e){let t=mn(e)?e:new L({operation:`write`,storageKey:bt,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return V=null,G(W(),{suppressTransitions:!0}),H(),!0},[]),a=(0,T.useCallback)(e=>{let n=U(t),r=e?`system`:n===`system`?Ct(t)??`light`:n;return i(r)},[i,t]),o=(0,T.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...dn()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(w):window.localStorage.setItem(w,JSON.stringify(n))}catch(e){let t=new L({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return G(W(),{suppressTransitions:!0}),H(),!0},[]),s=(0,T.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(w)}catch(e){let t=new L({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return G(W(),{suppressTransitions:!0}),H(),!0},[]),c=(0,T.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(B=null,G(W(),{suppressTransitions:!0,preservePreview:e}),H())},[]);return(0,T.useEffect)(()=>{G(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var Rn=je(Ve(Te)),zn=Ne(e=>{let t=e.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\n]*/g,(e,t)=>t?e:``);return t=t.replace(/("(?:[^"\\]|\\.)*")|\/\*[\s\S]*?\*\//g,(e,t)=>t?e:``),t=t.replace(/("(?:[^"\\]|\\.)*")|,(\s*[}\]])/g,(e,t,n)=>t?e:n??``),Rn(t).pipe(ue(e=>e.issue))}),Bn=new _e(zn,Re());i().pipe(le(Re({space:2})));var Vn=e=>Fe.pipe(Be(e,Bn)),Hn={performance:{profile:`performance`,automaticGitFetchInterval:y(15),providerHealthRefreshInterval:g(1),hostPowerMonitorActiveInterval:y(30),hostPowerMonitorIdleInterval:g(2),idleClientTtl:y(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:We,providerHealthRefreshInterval:c,hostPowerMonitorActiveInterval:y(30),hostPowerMonitorIdleInterval:g(5),idleClientTtl:y(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:y(0),providerHealthRefreshInterval:g(15),hostPowerMonitorActiveInterval:g(1),hostPowerMonitorIdleInterval:g(10),idleClientTtl:y(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function K(e){return Hn[e]}function Un(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function Wn(e){let t=Un(e),n=Hn[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function q(e,t){return m(e)===m(t)}function Gn(e,t){return q(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&q(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&q(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&q(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&q(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function Kn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=Wn(e),n=[Un(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(Gn(t,Hn[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=Un(e),i=Hn[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...q(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...q(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...q(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...q(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...q(t.idleClientTtl,i.idleClientTtl)?{}:{idleClientTtl:t.idleClientTtl},...t.pauseWhenHostLocked===i.pauseWhenHostLocked?{}:{pauseWhenHostLocked:t.pauseWhenHostLocked},...t.pauseWhenHostLowPower===i.pauseWhenHostLowPower?{}:{pauseWhenHostLowPower:t.pauseWhenHostLowPower},...t.pauseWhenClientLowPower===i.pauseWhenClientLowPower?{}:{pauseWhenClientLowPower:t.pauseWhenClientLowPower},...t.pauseWhenOnBattery===i.pauseWhenOnBattery?{}:{pauseWhenOnBattery:t.pauseWhenOnBattery}}}}function qn(e){let t={schemaVersion:1,profile:Ce,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,r=e.backgroundActivityProfile,i=r!==`balanced`||m(e.automaticGitFetchInterval)!==m(We)||m(e.providerHealthRefreshInterval)!==m(c);return Wn(n&&i?{schemaVersion:1,profile:m(e.automaticGitFetchInterval)===m(K(r).automaticGitFetchInterval)&&m(e.providerHealthRefreshInterval)===m(K(r).providerHealthRefreshInterval)?r:`custom`,baseProfile:r,overrides:{...m(e.automaticGitFetchInterval)===m(K(r).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...m(e.providerHealthRefreshInterval)===m(K(r).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Jn(e){let t=qn(e);return Kn({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}})}var Yn=Vn(ie);Se(Yn);function Xn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?te(t.instanceId):me(n)}var Zn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>Oe.make(e));function Qn(e,t,n){let r=[...Zn.map(e=>[ae(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Zn.includes(t.driver)?[[ne.make(e),t.driver]]:[]):[]].find(([e,n])=>t(e,n));if(r===void 0)return null;let[i,a]=r,o=n?.defaultModelSelection,s=e[i]?.config;return o?.instanceId===i&&he(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:ze[a]??we[a]??`gpt-6-luna`}}function $n(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!d(e,n,r.instanceId))return e.textGenerationModelSelection;if(t===void 0)return r;let i=t.find(e=>e.instanceId===r.instanceId);return i?.enabled===!0&&o(i)&&Ue(i)?r:e.textGenerationModelSelection}function er(e,t,n){let r=e.reviewGuideModelSelection;if(r&&d(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&o(e)&&Ue(e))return r}return $n(e,t,n)}function tr(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function nr(e,t){let n=e.favorites===null&&(t.favorites?.length??0)>0?t.favorites:void 0,r=e.providerModelPreferences===null&&Object.keys(t.providerModelPreferences??{}).length>0?t.providerModelPreferences:void 0;return n===void 0&&r===void 0?null:{migrateModelPreferences:{...n===void 0?{}:{favorites:n},...r===void 0?{}:{providerModelPreferences:r}}}}var rr=new Set([`continueThreadsAfterServerUpdate`,`sidebarAutoSettleAfterDays`,`sidebarAutoSettleOnMerge`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function ir(e){let t={},n={};for(let[r,i]of Object.entries(e))rr.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function ar(e,t,n,r=n,i=!1){let a=e.textGenerationModelSelection?.instanceId??r?.textGenerationModelSelection.instanceId;return!i&&e.textGenerationModelSelection&&(!n||a!==void 0&&(r?.providerInstances[a]?.driver??a)!==(n.providerInstances[a]?.driver??a)||!Xn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=pe(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:pe(e,[`continueThreadsAfterServerUpdate`])}function or(e){return e.connection.phase===`connected`&&e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}function sr(e){let t=e.atom(ee(Ke.pipe(xe(e=>f(e.state)))),{initialValue:Xe});return{stateAtom:t,stateValueAtom:p(e=>r(se(e(t)),()=>Xe)).pipe(_(`relay-environment-discovery-value`)),refresh:qe(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>Ke.pipe(ve(e=>e.refresh))})}}var cr=sr(tt);function lr(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:$e(t.entry),relayManaged:Ge(t.entry)}}function ur(){let e=(0,E.c)(7),t=v(C.catalogValueAtom),n=v(C.networkStatusValueAtom),r=v(Ot.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(dr),e[0]=r,e[1]=i);let a=i,o;return e[2]!==t.isReady||e[3]!==a||e[4]!==n||e[5]!==r?(o={isReady:t.isReady,networkStatus:n,environments:a,presentationById:r},e[2]=t.isReady,e[3]=a,e[4]=n,e[5]=r,e[6]=o):o=e[6],o}function dr(e){let[t,n]=e;return lr(t,n)}function fr(){return v(nt)}function pr(e){let t=(0,E.c)(3),{presentation:n}=jt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:lr(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function mr(){return pr(fr())}function hr(e){let t=(0,E.c)(2),n=ot(e),r;return t[0]===n?r=t[1]:(r=De(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function gr(){return v(cr.stateValueAtom)}function _r(){return v(kt.environmentIdsAtom)}function vr(){return v(kt.identitiesAtom)}function yr(){return v(kt.pullRequestsSupportedAtom)}var br=`[CLIENT_SETTINGS]`,xr=new Set,Sr=new Set,Cr=He,J=`pending`,Y=null,wr=0,Tr=Promise.resolve(),Er=0;function Dr(){for(let e of xr)e()}function Or(){for(let e of Sr)e()}function X(){return Cr}function kr(e){Cr=e,Dr()}function Ar(e){J!==e&&(J=e,Or())}function jr(e){return xr.add(e),Z().catch(()=>void 0),()=>{xr.delete(e)}}function Mr(){return J===`ready`}function Nr(){return J}function Pr(e){return Sr.add(e),Z().catch(()=>void 0),()=>{Sr.delete(e)}}async function Z(){if(J===`ready`)return;if(Y)return Y;let e=wr;Ar(J===`failed`||J===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await sn().persistence.getClientSettings();if(e!==wr)return;t&&kr({...He,...t}),Ar(`ready`)}catch(t){throw e===wr&&Ar(`failed`),console.error(`${br} hydrate failed`,{operation:`hydrate`,...b(t)}),t}})().finally(()=>{Y===t&&(Y=null)});return Y=t,Y}var Fr=e=>sn().persistence.setClientSettings(e);function Ir(e){let t=Tr.then(e);return Tr=t.then(()=>void 0,()=>void 0),t}function Lr(e,t=Fr){let n=J!==`ready`||Er>0;return n?Er+=1:kr({...X(),...e}),Ir(async()=>{if(n)try{J!==`ready`&&await Z(),kr({...X(),...e})}finally{--Er}await t(X())}).catch(e=>{console.error(`${br} persist failed`,{operation:`persist`,...b(e)})})}async function Rr(e,t=Fr){return Ir(async()=>{for(J!==`ready`&&await Z();;){let n=X(),r=e(n);if(await t(r),X()===n)return kr(r),r}})}var zr=new Set(u(ie.fields));function Br(e){let t={},n={};for(let[r,i]of Object.entries(e))zr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Vr(){return X()}function Hr(){return Z()}function Ur(){return(0,T.useSyncExternalStore)(Pr,Mr,Wr)}function Wr(){return!1}function Gr(){return(0,T.useSyncExternalStore)(Pr,Nr,Kr)}function Kr(){return`pending`}function Q(){return(0,T.useSyncExternalStore)(jr,X,qr)}function qr(){return He}function Jr(e,t){return{...t,...e,...tr(e,t)}}var Yr=new Set;function $(e,t){let n=(0,E.c)(8),r=Q(),i=Ur(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=ct(S.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Yr.has(e))return;let n=nr(t,r);n&&(Yr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Yr.delete(e)))},c=[r,e,i,o,t],n[1]=r,n[2]=e,n[3]=i,n[4]=o,n[5]=t,n[6]=s,n[7]=c):(s=n[6],c=n[7]),(0,T.useEffect)(s,c)}function Xr(e,t){let n=(0,E.c)(6),r=Q(),i;n[0]!==r||n[1]!==e?(i=Jr(e,r),n[0]=r,n[1]=e,n[2]=i):i=n[2];let a=i,o;return n[3]!==a||n[4]!==t?(o=t?t(a):a,n[3]=a,n[4]=t,n[5]=o):o=n[5],o}function Zr(e){let t=(0,E.c)(3),n=Q(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function Qr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function $r(){let e=(0,E.c)(7),t=Ur(),n=Q().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=Ln(),o=(0,T.useSyncExternalStore)(lt,vt,ei),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=dt(i,a,r),l=_t(c);s=Qr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??gt(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function ei(){return null}async function ti(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Hr(),{...nr(e,Vr()),...t}}function ni(e){let t=(0,E.c)(6),n;t[0]===e?n=t[1]:(n=e?S.settingsValueAtom(e):ii,t[0]=e,t[1]=n);let r=v(n),i=ct(S.updateSettings,`model preferences update`),a;return t[2]!==e||t[3]!==i||t[4]!==r?(a=async t=>{if(!e||!r)return;let n;try{n=await ti(r,t)}catch{x.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=a):a=t[5],a}function ri(e){let t=(0,T.use)(Me),n=(0,T.useRef)(new Map),r=ni(e);return(0,T.useCallback)(async(i,a)=>{if(!e)return;let o=S.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Hr()}catch{x.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=tr(c,Vr()).favorites,u=JSON.stringify([e,i,a]),d=n.current.get(u),f={favorite:!(d&&(d.pending||d.settings.favorites===c.favorites)?d.favorite:l.some(e=>e.provider===i&&e.model===a)),settings:c,pending:!0};n.current.set(u,f);try{let e=await r({setModelFavorites:[{provider:i,model:a,favorite:f.favorite}]});e&&fe(e)&&t.get(o)?.favorites===c.favorites&&(f.pending=!1)}finally{f.pending&&n.current.get(u)===f&&(d&&!d.pending&&t.get(o)?.favorites===d.settings.favorites?n.current.set(u,d):n.current.delete(u))}},[e,t,r])}var ii=p(null);function ai(e){let t=(0,E.c)(5),n;t[0]===e?n=t[1]:(n=e?S.settingsValueAtom(e):ii,t[0]=e,t[1]=n);let r=v(n),i=Q();$(e,r);let a=r??s,o;return t[2]!==i||t[3]!==a?(o=tr(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function oi(e,t){let n=(0,E.c)(2),r;n[0]===e?r=n[1]:(r=S.settingsValueAtom(e),n[0]=e,n[1]=r);let i=v(r);return $(e,i),Xr(i??s,t)}function si(e){let t=(0,E.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=ct(S.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function ci(e){let t=mr(),n=v(rt);return $(t?.environmentId??null,t?.serverConfig?.settings??null),Xr(n,e)}var li=`This setting is saved on a server, and the hosted app is not anchored to one. Change it from the desktop app or from the server's own address.`;function ui(){let e=(0,E.c)(2),t=mr(),n;return e[0]===t?n=e[1]:(n=t!==null||!Qe(),e[0]=t,e[1]=n),n}function di(e){let t=(0,E.c)(3),n=e!==void 0&&e,{environments:r}=ur(),i;return t[0]!==r||t[1]!==n?(i=p(e=>r.filter(or).flatMap(t=>{let r=e(st.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:h(se(r));return i!==null&&Pe(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],v(i)}function fi(e){let t=(0,E.c)(10);it(e,ce);let n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={label:`server settings update`,reportFailure:!1},t[0]=n):n=t[0];let r=ct(S.updateSettings,n),{environments:i}=ur(),o;t[1]!==i||t[2]!==r?(o=async e=>{let t=await r(e);if(t._tag===`Failure`&&!Je(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Ze(t);x.add({type:`error`,title:`Setting not saved`,description:`Could not save on ${n}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`})}return t},t[1]=i,t[2]=r,t[3]=o):o=t[3];let s=o,c=di(!0),l;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==s||t[8]!==c?(l=t=>{let{serverPatch:n,clientPatch:o}=Br(t),l=e===null||a(n).every(t=>at(e,t));if(Object.keys(n).length>0&&!l&&x.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${i.find(t=>t.environmentId===e)?.label??`the selected environment`}.`}),Object.keys(n).length>0&&l){let{sharedPatch:t,localPatch:o}=ir(n),l=_i;if(Object.keys(o).length>0&&(e?s({environmentId:e,input:{patch:o}}):l()),Object.keys(t).length>0){let n=i.find(t=>t.environmentId===e)?.serverConfig?.settings,o=new Set(c);e&&o.add(e);let s=[],u=[];for(let r of o){let o=i.find(e=>e.environmentId===r),c=ar(t,o?.serverConfig?.environment.capabilities,o?.serverConfig?.settings,n,r===e);if(Object.keys(c).length!==0){if(be.get(st.sessionStateAtom(r))._tag!==`Initial`&&!a(t).every(e=>at(r,e))){u.push(o?.label??r);continue}s.push({environmentId:r,input:{patch:c}})}}s.length===0?l(u.length>0?`This connection lacks permission to change settings on ${u.join(`, `)}.`:o.size>0?`Update older servers to save this setting.`:void 0):Promise.all(s.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(pi)}}Object.keys(o).length>0&&Lr(o)},t[4]=e,t[5]=i,t[6]=r,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function pi(e){let t=e.flatMap(gi);if(t.length===0)return;let n=e.filter(hi).map(mi);x.add({type:`error`,title:n.length>0?`Setting saved on some environments`:`Setting not saved`,description:[...t,...n.length>0?[`Saved on ${n.join(`, `)}.`]:[]].join(`
|
|
2
|
-
`)})}function mi(e){let{label:t}=e;return t}function hi(e){let{result:t}=e;return t._tag===`Success`}function gi(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Je(n))return[];let r=Ze(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function _i(e){let t=e===void 0?li:e;return x.add({type:`warning`,title:`Setting not saved`,description:t})}function vi(e){return fi(e)}function yi(){return fi(mr()?.environmentId??null)}function bi(){return xi}function xi(e){return Lr(e)}export{Lt as $,gr as A,Vn as B,hr as C,mr as D,ur as E,Un as F,On as G,ln as H,K as I,on as J,Ln as K,Kn as L,Qn as M,er as N,fr as O,$n as P,Ft as Q,Jn as R,pr as S,_r as T,un as U,U as V,Cn as W,Vt as X,Yt as Y,zt as Z,ri as _,Lr as a,jt as at,vi as b,Ur as c,ai as d,Rt as et,oi as f,ui as g,ci as h,Jr as i,kt as it,cr as j,yr as k,Gr as l,si as m,Hr as n,It as nt,Rr as o,$ as p,sn as q,Vr as r,Ot as rt,Zr as s,li as t,Bt as tt,$r as u,bi as v,vr as w,yi as x,ni as y,qn as z};
|
|
3
|
-
//# sourceMappingURL=useSettings-CPPvBMmM.js.map
|