@p4code/cli 0.9.5 → 0.9.7
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-CVJEJMnj.mjs → binCli-BDhIHi_h.mjs} +64792 -61582
- package/dist/client/.vite/manifest.json +1999 -1999
- package/dist/client/assets/{2NI2N5EU-B7VyxMN2.js → 2NI2N5EU-sFO2CLlt.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-_i-iLqe4.js → 4UO7MD6I-CcT8Zfhc.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-CARRzQXp.js → 5B3SVYGG-Bd_wcJLx.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-Bmp0940o.js → 5GK6JWQ2-Cp0eFbVE.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-Vb8SXW7T.js → 5N7A7DKN-Czpp-hnK.js} +2 -2
- package/dist/client/assets/{5OC2THR4-y3jeEKWa.js → 5OC2THR4-C6OEDFC6.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-Bfbcbcrn.js → 5S6HY5KT-DUo-T0Pv.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-DALpMJ8I.js → 6IMQ5BUJ-ZY7dYS3y.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-yeoADL6U.js → 6OLKWJ4F-KMXuFNsu.js} +2 -2
- package/dist/client/assets/{74OO7NKP-BSRT49ed.js → 74OO7NKP-aJ6kvSey.js} +2 -2
- package/dist/client/assets/{75O6YZUN-DMpxNGcI.js → 75O6YZUN-DIHv8J29.js} +2 -2
- package/dist/client/assets/{77XECAW3-Cn248Dt-.js → 77XECAW3-JuMUaReb.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-Cv-xq6SK.js → ABYRPUBD-2Yn9PEzm.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-CW_9Mq9o.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CqEEdPxS.js → AnimatedHeight-Cd_V66Dq.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-8r4Oh4o8.js → AuthSurfaceShell-z6JhHCp1.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-CI5XHuPZ.js → BB2UYUI2-D5xDmPxh.js} +2 -2
- package/dist/client/assets/{BUM34MOA-BfLbkDc3.js → BUM34MOA-B9FvXzqk.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-DpqVSfdQ.js → CEQABKGZ-Dx_FGvDv.js} +2 -2
- package/dist/client/assets/{CXAC5362-C31Wqp-g.js → CXAC5362-DGpvh6KQ.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-hgahwAd8.js +2 -0
- package/dist/client/assets/{ChatMarkdown-DWX9SN0I.js → ChatMarkdown-DzBQ6o2z.js} +7 -7
- package/dist/client/assets/{CheckboxIndicator-COjg4Es5.js → CheckboxIndicator-mFuXoA30.js} +2 -2
- package/dist/client/assets/{ClippedText-DpqkIszs.js → ClippedText-3QYVxO0t.js} +2 -2
- package/dist/client/assets/{CodexSetupSection.logic-C8_mcFTG.js → CodexSetupSection.logic-BBoRdk5p.js} +2 -2
- package/dist/client/assets/{ComboboxClear-xR2R2-pv.js → ComboboxClear-BNtFgSHF.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-H2tPGIr6.js → ComboboxGroupLabel-sq7Mhle4.js} +2 -2
- package/dist/client/assets/{CommandBlock-BU2CuIfo.js → CommandBlock-DHXlU5C7.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-T4veXUFB.js → ComposerPromptEditor-qOyyjScc.js} +4 -4
- package/dist/client/assets/{CompositeRoot-BIHvyYsZ.js → CompositeRoot-DY7iUA_s.js} +2 -2
- package/dist/client/assets/{ConnectionDiagnosisDetails-Blx3b1Io.js → ConnectionDiagnosisDetails-xhfXplsX.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-VMSwkMx4.js → ConnectionStatusDot-BBmbajLh.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-CgTmY7aZ.js → DRLTVNUE-v1NbOvdX.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-CHyCh3iy.js → DYY6UVD2-Dgv-rkDR.js} +2 -2
- package/dist/client/assets/{DevicePanel-Du9xpjah.js → DevicePanel-Cyg1Yk9F.js} +2 -2
- package/dist/client/assets/{DeviceSetup-3I8BZ0G5.js → DeviceSetup-C2Zve35j.js} +2 -2
- package/dist/client/assets/{DialogTitle-ueL4fmrv.js → DialogTitle-9BKGozK3.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-Cb3p3y9X.js → DiffCommentAnnotation-shKWlLXb.js} +2 -2
- package/dist/client/assets/{DiffFileTree-CDCTH6OS.js → DiffFileTree-Cw3IoBPF.js} +2 -2
- package/dist/client/assets/{DiffPanel-vcZG1S2-.js → DiffPanel-DhYILwt4.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-WP0Muna6.js → DiffWorkerPoolProvider-DwAxcJ_J.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-CpBO6uA7.js → EmbeddedDesign-BwBy_4w8.js} +2 -2
- package/dist/client/assets/{EnvironmentMachineIcon-CAhjzBdd.js → EnvironmentMachineIcon-KqncPHh8.js} +2 -2
- package/dist/client/assets/{ExpandableText-BOZbK7rv.js → ExpandableText-CEDcsLah.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-BOUHvPNW.js → FNOVOB4O-D_GK0hHx.js} +2 -2
- package/dist/client/assets/{FieldControl-CtZ34LP0.js → FieldControl-CVCCrg1T.js} +2 -2
- package/dist/client/assets/{FileDiff-DU2VaZza.js → FileDiff-CkTyrHs_.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-BT7yD1Je.js → FilePreviewPanel-pD3XdWFT.js} +6 -6
- package/dist/client/assets/{FoldedSettingsSection-DyeK8ENP.js → FoldedSettingsSection-VcaJg5wH.js} +2 -2
- package/dist/client/assets/{FormContext-0ymX4Zdq.js → FormContext-CbLQYizu.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-DhgkYpl1.js → HDGCDEEZ-B_87CdVQ.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-LRZ0mZom.js → HSJLKHB7-BWrZ2oua.js} +2 -2
- package/dist/client/assets/{Icons-DtaiKNi8.js → Icons-CQY6Z_tn.js} +2 -2
- package/dist/client/assets/Input-Bple6iXe.js +2 -0
- package/dist/client/assets/JZOYTAAL-BMx5dMBx.js +1 -0
- package/dist/client/assets/{K3MD6TGW-Bms96D04.js → K3MD6TGW-Dl_xvRh8.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C4yeqngm.js → K7RP3OMA-CMEWK15T.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-Z0gn-b9C.js → KeybindingsSettings.logic-6SIFjdPx.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-D-iPFOmd.js → LHDIQX7Q-BYodQH-L.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-CJld9Vod.js → LUXOKEGN-qRQxfpo6.js} +2 -2
- package/dist/client/assets/{MathTypeset-DVrs3WeR.js → MathTypeset-DEu7ewh2.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-DHlQszLH.js → N3JZAHOW-D39dZXbh.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-BZrVZkDz.js → NUIALGQ3-DesFcM7Z.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-DvT0SZTY.js → NoProjectsHero-DR2kWrZ4.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-1Tib5Wm-.js → O65XPQGZ-xGzNLFO_.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-B-jqX1ax.js → O7XIQ6OM-D_A5CSzR.js} +2 -2
- package/dist/client/assets/{OFQON5FD-Z7ov13yL.js → OFQON5FD-wUDkF0Vl.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-CLjGS23g.js → P4ConnectAccountPages-CCDq5J6P.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-Bqoai3_p.js → P4ConnectSidebarSignIn-CX9WTYV1.js} +2 -2
- package/dist/client/assets/{PJQHF43J-BxO9Ed7Y.js → PJQHF43J-CDUmALBZ.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-CikZjTVk.js → PanelLayoutControls-C34I_7ba.js} +6 -6
- package/dist/client/assets/{PierreEntryIcon-8lVXHvon.js → PierreEntryIcon-Cuq8Bvxz.js} +2 -2
- package/dist/client/assets/{PopoverHandle-CY48vabI.js → PopoverHandle-CaIeAISC.js} +2 -2
- package/dist/client/assets/{PreviewPanel-BsOxA7PG.js → PreviewPanel-CG-MeUjw.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-B6A-veuE.js → ProjectDefaultsSettings-Bxz5MdOY.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-CYE59XXq.js → ProjectFavicon-DCKipqYA.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-B29JEJpT.js → ProjectIconPickerDialog-DqEEBoMA.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-DglZOJVY.js → ProjectMonogram-CjI4Va2u.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-Du0soMRt.js → ProviderAuthTerminal-UctA57cb.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-DSQrIw5c.js → ProviderModelPicker-QRPUsruj.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-BDstI6TK.js → ProviderSettingsForm-BEq2pSXW.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-D5rLVyxt.js → PullRequestCodeTab-DQDQ2-AY.js} +2 -2
- package/dist/client/assets/{RHNBAITX-CFRd4LdH.js → RHNBAITX-C7xWa0v8.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DumpnOnX.js → ReadOnlySourcePreview-BzoQdNnt.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-BfOIzAFb.js → RenderErrorBoundary-BQJlFG3C.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-BzuDe7TY.js → SLD4V6NK-DmuNvRiU.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-BZDLn8vh.js → ScheduledTasksSettings-BslOTNM_.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-BDRueGC0.js → ScopedSwitch-B93s5VHZ.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-CiDeFRJG.js → ScrollAreaCorner-Dhc-TjWb.js} +2 -2
- package/dist/client/assets/{SecretInput-Bpz_flBS.js → SecretInput-B2ihrOsq.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-UhJfY29a.js → SelectScrollUpArrow-krk2Fk-_.js} +2 -2
- package/dist/client/assets/{SettingsPanels-D9i_jn8e.js → SettingsPanels-DxAtLrQJ.js} +4 -4
- package/dist/client/assets/{SettingsPanels.logic-BO_7fD50.js → SettingsPanels.logic-Bl4RFuAy.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-DYhbVTKo.js → SettingsScopeNotice-LfKqlEQx.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-CXA-VL7f.js → SidebarStageBackdrop-6e7hvpNA.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-Iz8AFoGq.js → T3PCR2KE-CiK8lMNJ.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-BiMX9mgc.js → TKWO2OVW-BdJsjYHm.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-T9Jpa5Rz.js → TSHNXIZL-CRJjDWez.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-DFn3Yrn1.js → ThemeEditorPanel-D8zwe2Nv.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-C1eykNJF.js → ThreadTerminalDrawer-Dscicgos.js} +2 -2
- package/dist/client/assets/{TooltipViewport-DOp3kVQY.js → TooltipViewport-MMBPNW3u.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-yF2s3czF.js → UQJE5E4I-V8ZBwQ4s.js} +2 -2
- package/dist/client/assets/{USNYFO5S-DyMrZB5n.js → USNYFO5S-B5nY9-j7.js} +2 -2
- package/dist/client/assets/{Virtualizer-VNN198aV.js → Virtualizer-CzVPu6W0.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-BbR-bYXa.js → WEVWDWVA-roZxnVYX.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-Bp8cxbFz.js → WorkspaceBreadcrumb-DHwNjJoP.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-CZSuBU6k.js → WorkspacePageContainer-BEL6F4GP.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-CTjYrqv6.js → WorkspacePageHeader-eTadd7tx.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CMXzdpa6.js → X5RFHQXM-3waZyk5u.js} +2 -2
- package/dist/client/assets/{X62E3GBT-C88V1WXc.js → X62E3GBT-B2f7sUz7.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-ZXo4ara-.js → XBNEOJTC-C4ImOubv.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-Ddw8TiKv.js → YHV2MVVZ-D1HZySVT.js} +2 -2
- package/dist/client/assets/{YURCZMG2-CRwbbhO8.js → YURCZMG2-B95ZHwnq.js} +2 -2
- package/dist/client/assets/{YVG2LODB-yVeDUCXO.js → YVG2LODB-Ba9ElJXR.js} +2 -2
- package/dist/client/assets/_chat-CAKiqq8Z.js +45 -0
- package/dist/client/assets/{_chat.design-T6D4XSc2.js → _chat.design-xDdLq2Pm.js} +2 -2
- package/dist/client/assets/{_chat.index-BrgyAe9a.js → _chat.index-DZFF0AGm.js} +2 -2
- package/dist/client/assets/{_chat.new-C7fjsbGq.js → _chat.new-UcQULkDl.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-CToI_h67.js → _chat.pull-requests-wqTxTIsj.js} +2 -2
- package/dist/client/assets/{alert-kMZL9jzU.js → alert-BeaSxmEt.js} +2 -2
- package/dist/client/assets/{assetUrls-CDYiJSSP.js → assetUrls-DSRw9lrZ.js} +2 -2
- package/dist/client/assets/{assets-DnrC_hwl.js → assets-DhuueFtK.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-CPBdgvvO.js → browserHistoryStore-Cb-pQxvb.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-oPTgFwDG.js → browserLinkTarget-DnEgq1JN.js} +2 -2
- package/dist/client/assets/{checkbox-CP-w8eOU.js → checkbox-BwnKO_BU.js} +2 -2
- package/dist/client/assets/{color-picker-CZcpcrrS.js → color-picker-D8AK_9SM.js} +2 -2
- package/dist/client/assets/{combobox-BHK8wQLo.js → combobox-CXEo8oot.js} +2 -2
- package/dist/client/assets/{command-Bps-UDxp.js → command-BAykm7lf.js} +2 -2
- package/dist/client/assets/{connect-CvkwK1ES.js → connect-DsnzdYd-.js} +2 -2
- package/dist/client/assets/{connect-agent-B9W36itu.js → connect-agent-BHUM9uJ5.js} +2 -2
- package/dist/client/assets/{design-BPvd5t1p.js → design-BugojS6P.js} +2 -2
- package/dist/client/assets/{device-D5HNJpEC.js → device-CH53vde0.js} +2 -2
- package/dist/client/assets/{dialog-BGBsXIS2.js → dialog-CsGXTrQp.js} +2 -2
- package/dist/client/assets/{diffRendering-UyG_CIdR.js → diffRendering-WBaaL1Hw.js} +2 -2
- package/dist/client/assets/{dist-BsVTiAl1.js → dist-CEhsFKQt.js} +3 -3
- package/dist/client/assets/{draft-input-DDmbM6Qp.js → draft-input-DSO1M98X.js} +2 -2
- package/dist/client/assets/{duoViewer-C6sIXAmx.js → duoViewer-DWTF6ZzH.js} +2 -2
- package/dist/client/assets/{dynamic-CeJgJNu6.js → dynamic-cm3g4l5C.js} +2 -2
- package/dist/client/assets/{embeddedScripts-CSKss0de.js → embeddedScripts-CCEJSzbY.js} +2 -2
- package/dist/client/assets/{empty-BchIQtwZ.js → empty-D39LEkAH.js} +2 -2
- package/dist/client/assets/{entities-Ba3s4XOS.js → entities-BjGK6yEY.js} +2 -2
- package/dist/client/assets/{fileLinks-wfxpV-Qo.js → fileLinks-BGiaZuCI.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-G-ylmE2I.js → fileTreeExpansion-B5-rhZPf.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-3SvhMdx2.js → getDiffFileInput-BVsGumGL.js} +2 -2
- package/dist/client/assets/{guideRunStore-DzJc7VAu.js → guideRunStore-CIC0I9tc.js} +2 -2
- package/dist/client/assets/{htmlRender-B2qNV9TA.js → htmlRender-CuZDEfr_.js} +2 -2
- package/dist/client/assets/{index-DYSmz54X.js → index-DFvDwgHR.js} +3 -3
- package/dist/client/assets/{input-gXGwC11t.js → input-DTnuNfU_.js} +2 -2
- package/dist/client/assets/{input-group-BqTFWskf.js → input-group-ZnG52HFh.js} +2 -2
- package/dist/client/assets/{kbd-C2W9UqaC.js → kbd-NONAAU_c.js} +2 -2
- package/dist/client/assets/{keybindings-D8lOCt7z.js → keybindings-CCgj9REF.js} +2 -2
- package/dist/client/assets/{lazy-3fGMvttY.js → lazy-BGLv0LoM.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-7R-i6XT2.js → lazyRouteComponent-D02c00C-.js} +2 -2
- package/dist/client/assets/{link-CrHFGDcA.js → link-oQzJ7nu3.js} +2 -2
- package/dist/client/assets/{linkedPrompt-VMNYJ9GO.js → linkedPrompt-C_XIR4Xr.js} +2 -2
- package/dist/client/assets/{main-BsbTTyDp.js → main-BqFaDMNs.js} +17 -17
- package/dist/client/assets/main-DsXJbQH-.css +2 -0
- package/dist/client/assets/{mediaReference-BDgCdUPv.js → mediaReference-DKoeCSSJ.js} +2 -2
- package/dist/client/assets/mediaSource-CENz-NYA.js +2 -0
- package/dist/client/assets/{number-field-Dhe9aDDa.js → number-field-D1mdZQVp.js} +2 -2
- package/dist/client/assets/{observeResize-D2-UGRv1.js → observeResize-BNf0FASw.js} +2 -2
- package/dist/client/assets/{onboarding-r9FLYQ-W.js → onboarding-B-b2hpCr.js} +2 -2
- package/dist/client/assets/{openFileInPreview-Bw1jIEqk.js → openFileInPreview-CLTNM-qs.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-BpTD1cMi.js → p4ProjectFile-BQUacEue.js} +2 -2
- package/dist/client/assets/{pair-ho4TSbex.js → pair-DTrJC971.js} +2 -2
- package/dist/client/assets/{pendingSendStore-CuJffLFW.js → pendingSendStore-BsAQrtOv.js} +2 -2
- package/dist/client/assets/{phoneViewer-D2TwG0d-.js → phoneViewer-D64KFma1.js} +2 -2
- package/dist/client/assets/{pierre-icons-DbovR9oY.js → pierre-icons-CtTUePAY.js} +2 -2
- package/dist/client/assets/{popover-C7uUfSpb.js → popover-Cr0R7gdF.js} +2 -2
- package/dist/client/assets/{preview-CQ-dmagT.js → preview-BuuE-gMP.js} +2 -2
- package/dist/client/assets/{preview-DjnkVD4h.js → preview-C1PD_g9k.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-B9M2YCIo.js → previewMiniPlayerStore-v5xBLM6_.js} +2 -2
- package/dist/client/assets/{primary-DpIL5Bs7.js → primary-BMTtrcja.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-BsLCUljE.js → primaryCloudLinkState-CJaRG6QK.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-Dk3vmsg5.js → projectFilesQueryState-CZkTtV37.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-0BJmIRyM.js → projectScriptEditor-BApTdMa4.js} +2 -2
- package/dist/client/assets/{providerSkills-DTnO9Kdf.js → providerSkills-CK0_chtE.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-DtuOiGEk.js → pullRequestDetail.logic-BmPSn0PA.js} +2 -2
- package/dist/client/assets/{pullRequestIcons-Dlewxywr.js → pullRequestIcons-CfKXhDuO.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-gMxEUIkY.js → pullRequestReviewStore-CrDUhUKX.js} +2 -2
- package/dist/client/assets/{pullRequests-B0XzWwD9.js → pullRequests-D-lKKR28.js} +2 -2
- package/dist/client/assets/{queries-OL_Htq8-.js → queries-CEdylITb.js} +2 -2
- package/dist/client/assets/{query-D2ZruPOT.js → query-DM1uxcKV.js} +2 -2
- package/dist/client/assets/{radio-group-B3QH_8sP.js → radio-group-CkR7fabD.js} +2 -2
- package/dist/client/assets/{renderScheduler-Dm1z2lUO.js → renderScheduler-BJowI8SS.js} +2 -2
- package/dist/client/assets/{rightPanelStore-8Ds3qezY.js → rightPanelStore-DUtuG_mq.js} +2 -2
- package/dist/client/assets/{runtime-CzKn37Ie.js → runtime-Du_4upLP.js} +3 -3
- package/dist/client/assets/{runtime-BdUzhUUM.js → runtime-mXszmljC.js} +3 -3
- package/dist/client/assets/{runtimeModeConfig-CkMiiAL3.js → runtimeModeConfig-CZ3ZrCmY.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DQ-I14gW.js → scheduledTasksSettings.logic-YVexB6ub.js} +2 -2
- package/dist/client/assets/{scroll-area-YeND7YEE.js → scroll-area-D1ITiKsD.js} +2 -2
- package/dist/client/assets/{select-Vs0PFHo8.js → select-CT4O76xq.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-Dr0Xv5Cv.js → selfImproveFindings-wLxnhAIe.js} +2 -2
- package/dist/client/assets/{server-BWUPVzyQ.js → server-BRIc5okw.js} +2 -2
- package/dist/client/assets/session-logic-BiU6P8DR.js +26 -0
- package/dist/client/assets/{session-DO9vnR62.js → session-wmJod3Hf.js} +2 -2
- package/dist/client/assets/{settings-C4A95qyS.js → settings-NLDl4Bmy.js} +2 -2
- package/dist/client/assets/{settings.appearance-BJlptNKw.js → settings.appearance-CJCZI-Xj.js} +2 -2
- package/dist/client/assets/settings.archived-CLWZylu3.js +2 -0
- package/dist/client/assets/{settings.computer-use-DgrTOJNC.js → settings.computer-use-CijjzsIQ.js} +2 -2
- package/dist/client/assets/settings.connections-Cf7-ZN_h.js +2 -0
- package/dist/client/assets/{settings.data-controls-BSwYGvBW.js → settings.data-controls-DkLkW74X.js} +2 -2
- package/dist/client/assets/{settings.decisions-DUMCyTuZ.js → settings.decisions-JeevVBZt.js} +2 -2
- package/dist/client/assets/{settings.designs-BBZMrfcr.js → settings.designs-DS1WBGjv.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-CIZDT4cV.js → settings.diagnostics-lQ8O62tl.js} +2 -2
- package/dist/client/assets/{settings.general-bSnpL1hJ.js → settings.general-BWHDfXfO.js} +2 -2
- package/dist/client/assets/{settings.integrations-X7_if4hO.js → settings.integrations-DEdu9gwQ.js} +2 -2
- package/dist/client/assets/{settings.keybindings-Zqqy5SpG.js → settings.keybindings-tc_MLaPn.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-B78rCdLj.js → settings.open-source-licenses-ucPvq0ML.js} +2 -2
- package/dist/client/assets/{settings.plugins-BBBQ-lLl.js → settings.plugins-M2Rc23zw.js} +2 -2
- package/dist/client/assets/{settings.projects-DB2aOKVF.js → settings.projects-tykSh6-D.js} +3 -3
- package/dist/client/assets/settings.providers--RJFEbkT.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-DWtqoBGX.js → settings.scheduled-tasks-BTioGx2i.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-5aoNTQNE.js → settings.snap-shot-BUehYnKo.js} +2 -2
- package/dist/client/assets/{settings.source-control-DrKsCyRy.js → settings.source-control-Dxm6Jir5.js} +2 -2
- package/dist/client/assets/{settings.storage-Bd2pVP1J.js → settings.storage-CrdP11yD.js} +2 -2
- package/dist/client/assets/{settingsLayout-B5eZBFxv.js → settingsLayout-7rl00kQL.js} +2 -2
- package/dist/client/assets/{sidebar-DXusvEJa.js → sidebar-DRWJdn3r.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-Bkwz22MS.js → sidebarProjectGrouping-BRZt_Xqk.js} +2 -2
- package/dist/client/assets/{skeleton-CQczLiXo.js → skeleton-DOfA4sjN.js} +2 -2
- package/dist/client/assets/{sourceControl-iC7SBPhY.js → sourceControl-CKZL-8Mu.js} +2 -2
- package/dist/client/assets/{sourceControlClients-8HF20R-d.js → sourceControlClients-D-frc1l_.js} +2 -2
- package/dist/client/assets/{spinner-CkQHTBh8.js → spinner-DMCmqCAh.js} +2 -2
- package/dist/client/assets/{terminal-links-BwPSFkUp.js → terminal-links-Cdw7HYhQ.js} +2 -2
- package/dist/client/assets/{terminalSessions-Vl5lzDOp.js → terminalSessions-DGp0Zt7-.js} +2 -2
- package/dist/client/assets/{textarea-C3yif1uk.js → textarea-B2ogIlGU.js} +2 -2
- package/dist/client/assets/{themePalette-kU5foqa6.js → themePalette-CiLEjm0l.js} +2 -2
- package/dist/client/assets/{toast-DJ2-4imd.js → toast-NSvYVPhH.js} +2 -2
- package/dist/client/assets/{toggle-BwVfYVI5.js → toggle-BrZqohX5.js} +2 -2
- package/dist/client/assets/{toggle-group-CUE2cE-r.js → toggle-group-DpO88ac2.js} +2 -2
- package/dist/client/assets/{tooltip-DctjVJ7F.js → tooltip-QdplMyeY.js} +2 -2
- package/dist/client/assets/{uiStateStore-D4coYv1J.js → uiStateStore-vt_JyvTj.js} +2 -2
- package/dist/client/assets/{usage-DnLLaKaF.js → usage-CHD3cyvN.js} +2 -2
- package/dist/client/assets/{usageAccess-BifB1Sam.js → usageAccess-DVnjHuB7.js} +2 -2
- package/dist/client/assets/{usageFormat-DgseLcCP.js → usageFormat-tjRl8Hbq.js} +2 -2
- package/dist/client/assets/{usageShortcuts-C0xlzVwU.js → usageShortcuts-DMKWst47.js} +2 -2
- package/dist/client/assets/{use-atom-command-D7oRayrc.js → use-atom-command-BfhNaUIU.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-ChgWEu_a.js → useAriaLabelledBy-BlIdXeWO.js} +2 -2
- package/dist/client/assets/useHandleNewThread-Bv9hl6Vv.js +2 -0
- package/dist/client/assets/{useLocation-DctIJsoW.js → useLocation-jsSq4KCV.js} +2 -2
- package/dist/client/assets/{useNavigate-C-nl3R9B.js → useNavigate-ut7tie8O.js} +2 -2
- package/dist/client/assets/{useNavigateBack-BVWPYJko.js → useNavigateBack-DQAO81KK.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-Ds5beo6Y.js → useP4ConnectAuthPrompt-IuajGXvV.js} +2 -2
- package/dist/client/assets/{useParams-BEj3muN1.js → useParams-2ErCyxxB.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-BpCHJG9L.js → usePermissionStatus-BlueIAuh.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BjCrAcbO.js → usePullRequestActions-VZpGy8dq.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-DxvlOVA9.js → useRegisterFieldControl-BTyFUE5E.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-CgXMs_Zc.js → useScopedModelAvailability-CH6hfrU_.js} +2 -2
- package/dist/client/assets/useSettings-FRbaNpbg.js +3 -0
- package/dist/client/assets/utils-CxCThU1r.js +37 -0
- package/dist/client/assets/{vcsRefInvalidation-D4Oei7uu.js → vcsRefInvalidation-CiJ0pwCz.js} +2 -2
- package/dist/client/assets/{welcome-Bmf6_fLo.js → welcome-CBJlRbzG.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{renderer-DXsHnrqP.mjs → renderer-DKZZL6cd.mjs} +2 -2
- package/dist/{runtime-Sw1S5Uy7.mjs → runtime-Bbjyj8bt.mjs} +135 -49
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-Cb4z5Mk4.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-Dkq13hxI.js +0 -2
- package/dist/client/assets/Input-YAwDiPhc.js +0 -2
- package/dist/client/assets/JZOYTAAL-DrWLTUgY.js +0 -1
- package/dist/client/assets/_chat-unmRpcW-.js +0 -45
- package/dist/client/assets/main-DAlZJX1g.css +0 -2
- package/dist/client/assets/mediaSource-Cjbr6BqZ.js +0 -2
- package/dist/client/assets/session-logic-DEPJvR2T.js +0 -26
- package/dist/client/assets/settings.archived-rIHiy1vU.js +0 -2
- package/dist/client/assets/settings.connections-CANgvtpc.js +0 -2
- package/dist/client/assets/settings.providers-CK3hv5-I.js +0 -3
- package/dist/client/assets/useHandleNewThread-BcOvatr7.js +0 -2
- package/dist/client/assets/useSettings-BzfsGrZk.js +0 -3
- package/dist/client/assets/utils-DBdIFVCj.js +0 -37
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t,n,t as r}from"./react-BUfh6y28.js";import{n as i,t as a}from"./jsx-runtime-DJeoFXNw.js";import{Ab as o,Ad as s,Ah as c,CT as l,Dh as u,Fh as d,Fp as f,Fs as p,Ft as m,Ht as h,I_ as g,Ih as _,It as v,Jt as y,Km as b,Mh as x,Ms as S,Nd as C,Np as w,Nt as T,Pc as E,Pp as D,Qs as O,Rm as k,SE as A,Tp as j,Vp as M,Vt as N,Xp as P,Z_ as F,af as I,bh as L,dr as R,ef as z,km as B,mm as V,qy as H,rn as U,sf as ee,t as W,um as te}from"./utils-
|
|
1
|
+
import{a as e,i as t,n,t as r}from"./react-BUfh6y28.js";import{n as i,t as a}from"./jsx-runtime-DJeoFXNw.js";import{Ab as o,Ad as s,Ah as c,CT as l,Dh as u,Fh as d,Fp as f,Fs as p,Ft as m,Ht as h,I_ as g,Ih as _,It as v,Jt as y,Km as b,Mh as x,Ms as S,Nd as C,Np as w,Nt as T,Pc as E,Pp as D,Qs as O,Rm as k,SE as A,Tp as j,Vp as M,Vt as N,Xp as P,Z_ as F,af as I,bh as L,dr as R,ef as z,km as B,mm as V,qy as H,rn as U,sf as ee,t as W,um as te}from"./utils-CxCThU1r.js";import{W as ne,g as re}from"./runtime-Du_4upLP.js";import{F as ie,I as ae,L as oe,Wt as se,x as ce}from"./runtime-mXszmljC.js";import{a as le,i as ue,n as de,r as fe,t as pe}from"./number-field-D1mdZQVp.js";import{a as G,c as me,n as he,o as ge,s as K,t as q}from"./select-CT4O76xq.js";import{t as _e}from"./spinner-DMCmqCAh.js";import{t as ve}from"./link-oQzJ7nu3.js";import{t as ye}from"./useNavigate-ut7tie8O.js";import{i as be}from"./toast-NSvYVPhH.js";import{B as xe,G as Se,H as Ce,K as we,R as Te,U as Ee,V as De,q as Oe}from"./useSettings-FRbaNpbg.js";import{t as ke}from"./server-BRIc5okw.js";import{o as Ae}from"./session-wmJod3Hf.js";import{t as je}from"./toastHelpers-DxXYm50b.js";import{r as Me}from"./queries-CEdylITb.js";import{A as Ne,B as Pe,C as Fe,E as Ie,F as Le,G as Re,J as ze,K as Be,L as Ve,O as He,V as Ue,W as We,_ as Ge,b as Ke,j as qe,k as Je,l as Ye,m as Xe,p as Ze,q as Qe,u as $e,v as et,z as tt}from"./themePalette-CiLEjm0l.js";import{$ as nt,D as rt,G as it,f as at,l as ot,vt as st,yt as ct}from"./diffRendering-WBaaL1Hw.js";import{A as lt,C as ut,D as dt,E as ft,T as pt,lt as mt,n as ht,st as gt,t as _t}from"./getDiffFileInput-BVsGumGL.js";import{t as vt}from"./env-wK1YYxA8.js";import{a as yt,n as bt,r as xt,t as St}from"./tooltip-QdplMyeY.js";import{a as Ct,l as wt,n as Tt,o as Et,r as Dt,s as Ot,t as kt}from"./combobox-CXEo8oot.js";import{t as At}from"./input-DTnuNfU_.js";import{a as jt,c as Mt,i as Nt,o as Pt,r as Ft,s as It,t as Lt}from"./dialog-CsGXTrQp.js";import{m as Rt,r as zt,t as Bt}from"./ComposerPromptEditor-qOyyjScc.js";import{h as Vt,p as Ht}from"./Icons-CQY6Z_tn.js";import{t as Ut}from"./ProjectFavicon-DCKipqYA.js";import{n as Wt,r as Gt,t as Kt}from"./input-group-ZnG52HFh.js";import{c as qt,r as Jt}from"./ThreadTerminalDrawer-Dscicgos.js";import{r as Yt,t as Xt}from"./alert-BeaSxmEt.js";import{F as Zt,G as Qt,I as $t,L as en,R as tn,U as nn,V as rn,a as J,d as an,f as on,i as sn,n as cn,r as Y,s as ln,t as un}from"./settingsLayout-7rl00kQL.js";import{$a as dn,Bn as fn,C as pn,Dn as mn,Gi as hn,Gn as gn,Gr as _n,Hn as vn,Jr as yn,Kr as bn,Qa as xn,S as Sn,Un as Cn,Vn as wn,Wn as Tn,Xr as En,Ya as Dn,Yr as On,Za as kn,Zr as An,aa as jn,b as Mn,co as Nn,di as Pn,do as Fn,eo as In,fi as Ln,fo as Rn,hn as zn,li as Bn,lo as Vn,mi as Hn,no as Un,pi as Wn,qr as Gn,to as Kn,ui as qn,uo as Jn,w as Yn,x as Xn,xo as Zn,y as Qn,yr as X,zn as $n}from"./main-BqFaDMNs.js";import{t as er}from"./ProviderModelPicker-QRPUsruj.js";import{i as tr,n as nr}from"./SidebarStageBackdrop-6e7hvpNA.js";import{t as rr}from"./legalLinks-C4VP5hPh.js";import{t as ir}from"./useScopedModelAvailability-CH6hfrU_.js";import{t as ar}from"./ProjectDefaultsSettings-Bxz5MdOY.js";import{t as or}from"./draft-input-DSO1M98X.js";import{t as sr}from"./ScopedSwitch-B93s5VHZ.js";import{a as cr,c as lr,d as ur,f as dr,i as fr,l as pr,n as mr,o as hr,p as gr,s as _r,t as vr,u as yr}from"./SettingsPanels.logic-Bl4RFuAy.js";function br(e,t=!1){return gt({tagName:`style`,children:[mt(t?pt(e):dt(e))],properties:{[nt]:t?``:void 0,[ct]:t?void 0:``}})}function xr(e){return gt({tagName:`style`,children:[mt(e)],properties:{[st]:``}})}var Z=i(),Q=e(r(),1),$=e(a(),1);function Sr(){let e=Zt(e=>e.notificationMode),t=tn(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1);return(0,$.jsx)(J,{...X(`thread-notifications`),description:n??`System alerts when a thread finishes, fails, or needs input or approval. Applies to this device while P4 Code is open.`,control:(0,$.jsxs)(q,{value:e,disabled:i,onValueChange:async e=>{if(e===`off`||e===`notifications`||e===`sound`||e===`notifications-and-sound`){if(r(null),Xn(e)&&Sn(),Mn(e)){if(typeof Notification>`u`||!window.isSecureContext){r(`Notifications need a supported browser over HTTPS, or the desktop app. Sound only is still available.`);return}a(!0);try{if(await Notification.requestPermission()!==`granted`){r(`Allow notifications in your browser or system settings, then choose this option again. Sound only is still available.`);return}}catch{r(`Notifications are unavailable in this browser. Sound only is still available.`);return}finally{a(!1)}}t({notificationMode:e})}},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Thread notifications`,children:(0,$.jsx)(me,{children:Qn[e]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(Qn).map(([e,t])=>(0,$.jsx)(G,{hideIndicator:!0,value:e,children:t},e))})]})})}function Cr(){let e=(0,Z.c)(15),t=typeof window>`u`?void 0:window.desktopBridge?.cliCommand,[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{if(!t)return;let e=!1;return t.getState().then(t=>{e||r(t)}).catch(wr),()=>{e=!0}},s=[t],e[0]=o,e[1]=s):(o=e[0],s=e[1]),(0,Q.useEffect)(o,s);let c;e[2]===i?c=e[3]:(c=e=>{t&&!i&&(a(!0),t[e]().then(r).catch(t=>{be.add(je({type:`error`,title:e===`install`?`Could not install p4c`:`Could not remove p4c`,description:t instanceof Error?t.message:`Something went wrong.`}))}).finally(()=>a(!1)))},e[2]=i,e[3]=c);let l=c;if(!t||!n?.supported)return null;let u=n.installedPath!==null,d=n.shadowedBy?`Another p4c at ${n.shadowedBy} runs first in a new terminal. Remove it to use P4 Code's.`:u?n.onPath?`Installed at ${n.installedPath}. Open a new terminal to use it.`:`Installed at ${n.installedPath}, which is not on your PATH yet. Add its folder to your PATH to run \`p4c\`.`:"Run P4 Code's CLI as `p4c` from any terminal.",f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=X(`cli-command`),e[4]=f):f=e[4];let p;e[5]!==l||e[6]!==u?(p=()=>l(u?`uninstall`:`install`),e[5]=l,e[6]=u,e[7]=p):p=e[7];let m=u?`Remove`:`Install`,h;e[8]!==i||e[9]!==p||e[10]!==m?(h=(0,$.jsx)(R,{size:`sm`,variant:`outline`,disabled:i,onClick:p,children:m}),e[8]=i,e[9]=p,e[10]=m,e[11]=h):h=e[11];let g;return e[12]!==d||e[13]!==h?(g=(0,$.jsx)(J,{...f,description:d,control:h}),e[12]=d,e[13]=h,e[14]=g):g=e[14],g}function wr(){}function Tr(e){return`${lt}${rt(e)}`}async function Er({fileDiff:e,oldFile:t,newFile:n,options:r,annotations:i}){let a=_t({oldFile:t,newFile:n},`preloadDiffHTML`);if(e==null&&a!=null&&(e=at(a.oldFile,a.newFile,r?.parseDiffOptions)),e==null)throw Error(`preloadFileDiff: You must pass at least a fileDiff, oldFile, or newFile prop`);let o=new ht(kr(r));return i!=null&&i.length>0&&o.setLineAnnotations(i),Tr(Or(await o.asyncRender(e),o,r?.unsafeCSS,r?.themeType??`system`))}async function Dr({fileDiff:e,options:t,annotations:n}){return{fileDiff:e,options:t,annotations:n,prerenderedHTML:await Er({fileDiff:e,options:t,annotations:n})}}function Or(e,t,n,r){let i=[br(e.css,!0)];i.push(xr(ft(e.themeStyles,e.baseThemeType??r))),n!=null&&i.push(br(n)),e.headerElement!=null&&i.push(e.headerElement);let a=t.renderFullAST(e);return a.properties[`data-dehydrated`]=``,i.push(a),i}function kr(e){return{...e,useTokenTransformer:ut(e),headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators}}async function Ar({patch:e,options:t}){let n=[],r=it(e);for(let e of r)for(let r of e.files)n.push(Dr({fileDiff:r,options:t}));return await Promise.all(n)}var jr=[],Mr=`Use $frontend-design to fix the flaky test in [surface.test.ts](apps/web/src/terminal/ghostty/surface.test.ts) and align the header with [SettingsPanels.tsx](apps/web/src/components/settings/SettingsPanels.tsx) before shipping.`;function Nr(){}function Pr(){let e=(0,Z.c)(4),t=(0,Q.useRef)(null),[n,r]=(0,Q.useState)(Mr),[i,a]=(0,Q.useState)(227),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(e,t)=>{r(e),a(t)},e[0]=o):o=e[0];let s=o,c;return e[1]!==i||e[2]!==n?(c=(0,$.jsx)(`div`,{className:`mt-1 mb-2 rounded-lg border border-border bg-background px-3 py-2`,children:(0,$.jsx)(Bt,{ariaLabel:`Prompt font preview`,editorRef:t,value:n,cursor:i,contextRecords:zt,skills:jr,disabled:!1,placeholder:Rt,className:`max-h-42 min-h-14`,onChange:s,onPaste:Nr})}),e[1]=i,e[2]=n,e[3]=c):c=e[3],c}var Fr=`diff --git a/src/formatUser.ts b/src/formatUser.ts
|
|
2
2
|
--- a/src/formatUser.ts
|
|
3
3
|
+++ b/src/formatUser.ts
|
|
4
4
|
@@ -1,3 +1,3 @@
|
|
@@ -41,6 +41,6 @@ import{a as e,i as t,n,t as r}from"./react-BUfh6y28.js";import{n as i,t as a}fro
|
|
|
41
41
|
"name": "Aurora",
|
|
42
42
|
"appearance": "light",
|
|
43
43
|
"colors": { ... }
|
|
44
|
-
}`,spellCheck:!1,value:r}),t[10]=n,t[11]=p,t[12]=m,t[13]=r,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==h?(g=(0,$.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-input bg-background shadow-xs/5 focus-within:border-ring focus-within:ring-3 focus-within:ring-inset focus-within:ring-ring/24`,children:[d,h]}),t[15]=d,t[16]=h,t[17]=g):g=t[17],g}function Ra({open:e,onOpenChange:t,onImported:n,onImportedMany:r}){let i=(0,Q.useRef)(null),[a,o]=(0,Q.useState)(``),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(null),_=(0,Q.useRef)(0);(0,Q.useEffect)(()=>{_.current+=1,m(!1),e&&(o(``),c(null),u(null),f(!1),g(null))},[e]);let v=(0,Q.useCallback)(async e=>{let t=Pa(e.size);if(t){u(t);return}let n=++_.current;f(!0);try{let t=await e.text();if(n!==_.current)return;o(t),c(e.name),u(null)}catch{if(n!==_.current)return;u(`Could not read that file. Paste the JSON below instead.`)}finally{n===_.current&&f(!1)}},[]),y=(0,Q.useCallback)(async e=>{let n=++_.current;f(!0);let i=[],a=[];try{for(let t of e)if(Pa(t.size))i.push(`${t.name}: too large`);else try{let e=JSON.parse(await t.text());a.push({sourceName:t.name,theme:_i(e)?xi(e):Ie(e)})}catch(e){i.push(`${t.name}: ${e instanceof Error?e.message:`not a theme file`}`)}if(n!==_.current)return;let o=[],s=[];for(let e of Si(Ci(a)))if($e().some(t=>t.id===e.id))s.push(e);else try{o.push(Ke(e))}catch(t){i.push(`${e.label}: ${t instanceof Error?t.message:`could not install`}`)}o.length>0&&r(o,{updated:!1}),i.length>0?u(i.join(` — `)):s.length>0?g(s):o.length>0&&t(!1)}finally{n===_.current&&f(!1)}},[r,t]),b=(0,Q.useCallback)(e=>{e.length!==0&&(e.length===1?v(e[0]):y(e))},[y,v]),x=(0,Q.useCallback)(()=>{let e=window.desktopBridge;e?.pickThemeFiles?e.pickThemeFiles().then(e=>{e&&e.length!==0&&b(e.map(e=>({name:e.name,size:e.size,text:()=>Promise.resolve(e.text)})))}):i.current?.click()},[b]),S=(0,Q.useCallback)(e=>{let t=[...e.currentTarget.files??[]];e.currentTarget.value=``,b(t)},[b]),C=(0,Q.useCallback)(e=>{e.preventDefault(),m(!1),b([...e.dataTransfer.files])},[b]),w=(e,t)=>{if(t&&t.toLowerCase()!==e.label.toLowerCase()){let n=Ie({version:1,name:t.slice(0,48),appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!$e().some(e=>e.id===n.id))return n}for(let t=1;t<100;t+=1){let n=Ie({version:1,name:`${e.label.slice(0,48-` (${t})`.length)} (${t})`,appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!$e().some(e=>e.id===n.id))return n}throw Error(`Too many copies of "${e.label}".`)},T=(0,Q.useCallback)(e=>{if(!h)return;let n=[],i=[],a=h.length===1&&s?yi(s.replace(/\.[^.]+$/,``)):null;for(let t of h)try{let r=e===`update`?$e().find(e=>e.id===t.id):void 0,i=r?.collection?{...t,collection:r.collection}:t;n.push(e===`update`?Ue(i):Ke(w(t,a)))}catch(e){i.push(`${t.label}: ${e instanceof Error?e.message:`failed`}`)}n.length>0&&r(n,{updated:e===`update`}),g(null),i.length>0?u(i.join(` — `)):t(!1)},[h,s,r,t]),E=(0,Q.useCallback)(()=>{let e=Pa(a.length);if(e)u(e);else try{let e=JSON.parse(a),r=_i(e)?xi(e):Ie(e);if($e().some(e=>e.id===r.id)){u(null),g([r]);return}let i=Ke(r);if(!n(i)){try{Je(i.id)}catch{}u(`Theme added, but it could not be selected. Try again.`);return}t(!1)}catch(e){u(e instanceof Error?e.message:`That theme file is invalid.`)}},[a,n,t]);return(0,$.jsx)(Lt,{open:e,onOpenChange:e=>{e||u(null),t(e)},children:(0,$.jsxs)(It,{className:`max-w-3xl overflow-hidden`,children:[(0,$.jsx)(jt,{children:(0,$.jsx)(Mt,{children:`Add a theme`})}),(0,$.jsxs)(Pt,{children:[(0,$.jsx)(ka,{onInstalled:(e,n)=>{r(e,n),t(!1)},open:e}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,"aria-hidden":!0,children:[(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,$.jsx)(`span`,{className:`text-muted-foreground text-2xs uppercase tracking-wider`,children:`or import a file`}),(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`})]}),(()=>{let e={onDragEnter:e=>{e.preventDefault(),m(!0)},onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||m(!1)},onDrop:C},n=(0,$.jsx)(`input`,{ref:i,accept:`.json,application/json`,className:`sr-only`,onChange:S,multiple:!0,type:`file`}),r=(e=`Choose files`)=>(0,$.jsxs)(R,{disabled:d,size:`sm`,variant:`outline`,onClick:x,children:[(0,$.jsx)(I,{}),d?`Reading…`:e]}),c=()=>(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`div`,{className:`flex items-baseline justify-between gap-3`,children:(0,$.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`theme-json-editor`,children:`Theme JSON`})}),(0,$.jsx)(La,{id:`theme-json-editor`,onChange:o,value:a})]});return h?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-muted/20 p-3`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Already installed`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:h.map(e=>e.label).join(`, `)})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(R,{size:`sm`,onClick:()=>T(`update`),children:`Update existing`}),(0,$.jsx)(R,{size:`sm`,variant:`outline`,onClick:()=>T(`copy`),children:`Keep both`}),(0,$.jsx)(R,{size:`sm`,variant:`ghost`,onClick:()=>g(null),children:`Back`}),(0,$.jsx)(R,{size:`sm`,variant:`ghost`,onClick:()=>t(!1),children:`Cancel`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:W(`flex flex-wrap items-center justify-between gap-3 rounded-xl border border-dashed px-3 py-3 transition-colors`,p?`border-ring bg-accent/20`:`border-border/80 bg-muted/20`),...e,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Theme file`}),(0,$.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s??`Drop P4 Code or VS Code .json files`})]}),r(),n]}),c(),(0,$.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[(0,$.jsx)(R,{variant:`ghost`,onClick:()=>t(!1),children:`Cancel`}),(0,$.jsxs)(R,{disabled:!a.trim()||d,onClick:E,children:[(0,$.jsx)(P,{}),`Add theme`]})]})]})})(),l?(0,$.jsx)(Xt,{"aria-live":`polite`,variant:`error`,children:l}):null]})]})})}function za(e){let t=(0,Z.c)(45),{colors:n,clip:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?void 0:{clipPath:r===`left`?`polygon(0 0, calc(50% - 1px) 0, calc(50% - 1px) 100%, 0 100%)`:`polygon(calc(50% + 1px) 0, 100% 0, 100% 100%, calc(50% + 1px) 100%)`},t[0]=r,t[1]=i);let a;t[2]===n.canvas?a=t[3]:(a=(0,$.jsx)(`span`,{className:`absolute inset-0`,style:{backgroundColor:n.canvas}}),t[2]=n.canvas,t[3]=a);let o;t[4]===n.sidebar?o=t[5]:(o=(0,$.jsx)(`span`,{className:`absolute inset-y-0 left-0 w-[22%]`,style:{backgroundColor:n.sidebar,boxShadow:`inset -1px 0 0 rgb(127 127 127 / 0.25)`}}),t[4]=n.sidebar,t[5]=o);let s;t[6]===n.surface?s=t[7]:(s=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[8%] h-[8%] w-[16%] rounded-md`,style:{backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`}}),t[6]=n.surface,t[7]=s);let c;t[8]===n.accentSurface?c=t[9]:(c=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[22%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.accentSurface}}),t[8]=n.accentSurface,t[9]=c);let l;t[10]===n.messageSurface?l=t[11]:(l=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[32%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.7}}),t[10]=n.messageSurface,t[11]=l);let u;t[12]===n.messageSurface?u=t[13]:(u=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[42%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.5}}),t[12]=n.messageSurface,t[13]=u);let d;t[14]===n.messageSurface?d=t[15]:(d=(0,$.jsx)(`span`,{className:`absolute right-[28%] top-[11%] h-[9%] w-[24%] rounded-lg`,style:{backgroundColor:n.messageSurface}}),t[14]=n.messageSurface,t[15]=d);let f;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[28%] h-[5%] w-[34%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[16]=f):f=t[16];let p;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[38%] h-[5%] w-[26%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[17]=p):p=t[17];let m;t[18]===n.surface?m=t[19]:(m={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`},t[18]=n.surface,t[19]=m);let h;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`block h-[26%] w-[34%] rounded-full`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`,opacity:.7}}),t[20]=h):h=t[20];let g;t[21]===n.messageAction?g=t[22]:(g=(0,$.jsx)(`span`,{className:`block aspect-square h-[58%] rounded-full`,style:{backgroundColor:n.messageAction}}),t[21]=n.messageAction,t[22]=g);let _;t[23]!==m||t[24]!==g?(_=(0,$.jsxs)(`span`,{className:`absolute bottom-[8%] left-[26%] right-[6%] flex h-[15%] items-center justify-between rounded-md px-1`,style:m,children:[h,g]}),t[23]=m,t[24]=g,t[25]=_):_=t[25];let v;t[26]===n.surface?v=t[27]:(v={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25), 0 2px 5px rgb(0 0 0 / 0.14)`},t[26]=n.surface,t[27]=v);let y;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(y=[0,1,2],t[28]=y):y=t[28];let b;t[29]===n.messageAction?b=t[30]:(b=y.map(e=>(0,$.jsxs)(`span`,{className:`absolute left-[11%] right-[11%] flex items-center gap-1`,style:{top:`${10+e*30}%`,height:`20%`},children:[(0,$.jsx)(`span`,{className:`block aspect-square h-[26%] rounded-full`,style:{backgroundColor:e===0?`#34d399`:e===1?n.messageAction:`#fbbf24`,opacity:.55}}),(0,$.jsx)(`span`,{className:`block h-[30%] w-[52%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}})]},e)),t[29]=n.messageAction,t[30]=b);let x;t[31]!==v||t[32]!==b?(x=(0,$.jsx)(`span`,{className:`absolute right-[5%] top-[8%] h-[46%] w-[20%] rounded-lg`,style:v,children:b}),t[31]=v,t[32]=b,t[33]=x):x=t[33];let S;return t[34]!==i||t[35]!==_||t[36]!==x||t[37]!==a||t[38]!==o||t[39]!==s||t[40]!==c||t[41]!==l||t[42]!==u||t[43]!==d?(S=(0,$.jsxs)(`span`,{className:`absolute inset-0`,style:i,children:[a,o,s,c,l,u,d,f,p,_,x]}),t[34]=i,t[35]=_,t[36]=x,t[37]=a,t[38]=o,t[39]=s,t[40]=c,t[41]=l,t[42]=u,t[43]=d,t[44]=S):S=t[44],S}function Ba(e){let t=(0,Z.c)(7),{className:n,panes:r}=e,i;t[0]===n?i=t[1]:(i=W(`relative block w-full overflow-hidden rounded-lg border border-border/60`,n),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r.map(Va),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsx)(`span`,{"aria-hidden":!0,className:i,children:a}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Va(e){return(0,$.jsx)(za,{clip:e.clip,colors:e.colors},e.clip??`pane`)}var Ha=[ze,Re,Qe,We,Be];function Ua(e){if(e.length===0)return[];let t=e.map(e=>e.label.trim().split(/\s+/)),n=t[0],r=n.findIndex((e,n)=>t.some(t=>t[n]?.toLocaleLowerCase()!==e.toLocaleLowerCase())),i=r===-1?n.length-1:r;return e.map((e,n)=>t[n]?.slice(Math.max(0,i)).join(` `).trim()||e.label)}function Wa(e,t){let n=URL.createObjectURL(new Blob([t],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(n),3e4)}function Ga(e){let t=(0,Z.c)(7),{label:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(yt,{render:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,$.jsx)(bt,{children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(St,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Ka(e){let t=(0,Z.c)(59),{theme:n,isActive:r,onUse:i,onUseMode:a,activeModes:o,onEdit:s,onDuplicate:c,onDownload:l,onRemove:u,variantNavigation:d}=e,f;t[0]===n.previews?f=t[1]:(f=n.previews.map(qa),t[0]=n.previews,t[1]=f);let p=f,[m,h]=(0,Q.useState)(null),g,_,v,y,x,S,C,w;if(t[2]!==o||t[3]!==r||t[4]!==i||t[5]!==a||t[6]!==m||t[7]!==n.id||t[8]!==n.label||t[9]!==n.previews||t[10]!==d){let e=[`light`,`dark`].map(e=>{let t=d?.options.flatMap(t=>{let n=t.preview;return n.mode===e?[{option:t,preview:n}]:[]})??[];return{mode:e,options:t,selected:t.find(t=>{let{option:n}=t;return n.activeModes.includes(e)})??t[0]}});_=St,g=yt;let s=r&&`bg-accent/30`;t[19]===s?x=t[20]:(x=W(`cursor-pointer overflow-hidden rounded-xl border border-border/70 bg-card/60 transition-colors hover:bg-accent/10`,s),t[19]=s,t[20]=x),S=n.id,C=i,t[21]===r?w=t[22]:(w=r?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,t[21]=r,t[22]=w),v=`relative`,y=d?(0,$.jsx)(`div`,{"aria-label":`Light and dark theme variants`,className:`relative h-20`,role:`group`,onBlurCapture:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||h(null)},onKeyDown:e=>{e.key===`Escape`&&h(null)},onMouseLeave:()=>h(null),children:e.map(e=>{let{mode:t,options:n,selected:r}=e;if(!r)return null;let i=t===`light`?-52:52,a=m===t,o=r.option.activeModes.includes(t);return(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(Ga,{label:`${t===`light`?`Light`:`Dark`}: ${r.option.label}`,children:(0,$.jsxs)(`button`,{"aria-label":n.length>1?`Choose ${t} variant, ${n.length} options, currently ${r.option.label}`:`Use ${t} variant, currently ${r.option.label}`,"aria-pressed":o,className:`absolute left-1/2 top-2 z-20 flex size-14 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,style:{transform:`translateX(calc(-50% + ${i}px))`},type:`button`,onClick:e=>{e.stopPropagation(),d.onSelectAndUse(r.option.themeIndex,t)},onFocus:()=>h(t),onMouseEnter:()=>h(t),children:[(0,$.jsx)(fn,{colors:r.preview.colors,mode:r.preview.mode}),o?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 rounded-full ring-2 ring-inset ring-ring`}):null,o?(0,$.jsx)(`span`,{className:`pointer-events-none absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full border border-border/70 bg-background text-foreground shadow-sm`,children:t===`light`?(0,$.jsx)(B,{className:`size-2.5`}):(0,$.jsx)(j,{className:`size-2.5`})}):null]})}),(0,$.jsxs)(`span`,{className:`pointer-events-none absolute bottom-0 left-1/2 inline-flex max-w-24 -translate-x-1/2 items-center gap-1 text-2xs font-medium text-foreground`,style:{marginLeft:i},children:[(0,$.jsx)(`span`,{className:`truncate`,children:r.option.label}),n.length>1?(0,$.jsxs)(`span`,{className:`shrink-0 rounded-full bg-muted px-1 text-3xs text-muted-foreground`,children:[`+`,n.length-1]}):null]}),n.length>1?n.map((e,r)=>{let{option:o,preview:s}=e,c=r/(n.length-1)-.5,l=i+c*68,u=Math.abs(c)*10,f=o.activeModes.includes(t);return(0,$.jsx)(Ga,{label:`Use ${o.label} for ${t} mode`,children:(0,$.jsx)(`button`,{"aria-label":`Use ${o.label} for ${t} mode${f?`, currently active`:``}`,"aria-pressed":f,className:W(`absolute left-1/2 top-1 z-30 flex size-7 items-center justify-center rounded-full bg-background shadow-sm outline-none transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,f?`ring-2 ring-inset ring-ring`:`ring-1 ring-border/70`),style:{opacity:+!!a,pointerEvents:a?`auto`:`none`,transform:`translate(calc(-50% + ${a?l:i}px), ${a?u:28}px) scale(${a?1:.55})`,transitionDelay:a?`${r*35}ms`:`0ms`},type:`button`,onClick:e=>{e.stopPropagation(),d.onSelectAndUse(o.themeIndex,t)},onFocus:()=>h(t),onMouseEnter:()=>h(t),children:(0,$.jsx)(`span`,{className:`pointer-events-none scale-[0.43]`,children:(0,$.jsx)(fn,{colors:s.colors,mode:s.mode})})})},o.label)}):null]},t)})}):(0,$.jsx)(wn,{label:n.label,activeModes:o,onSelectMode:a,previews:n.previews}),t[2]=o,t[3]=r,t[4]=i,t[5]=a,t[6]=m,t[7]=n.id,t[8]=n.label,t[9]=n.previews,t[10]=d,t[11]=g,t[12]=_,t[13]=v,t[14]=y,t[15]=x,t[16]=S,t[17]=C,t[18]=w}else g=t[11],_=t[12],v=t[13],y=t[14],x=t[15],S=t[16],C=t[17],w=t[18];let T;t[23]!==v||t[24]!==y?(T=(0,$.jsx)(`div`,{className:v,children:y}),t[23]=v,t[24]=y,t[25]=T):T=t[25];let E=`Use ${d?`${d.collectionLabel}, ${n.label} variant`:`${n.label} theme`}${r?`, currently active`:``}`,D;t[26]===i?D=t[27]:(D=e=>{e.stopPropagation(),i()},t[26]=i,t[27]=D);let O=d?.collectionLabel??n.label,A;t[28]!==r||t[29]!==D||t[30]!==O||t[31]!==E?(A=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,$.jsx)(`button`,{"aria-label":E,"aria-pressed":r,className:`min-w-0 cursor-pointer truncate rounded-sm text-left text-sm font-medium text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card`,type:`button`,onClick:D,children:O})})}),t[28]=r,t[29]=D,t[30]=O,t[31]=E,t[32]=A):A=t[32];let N;t[33]!==l||t[34]!==c||t[35]!==s||t[36]!==u||t[37]!==n.label||t[38]!==d?(N=s||c||l||u?(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[c?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":`Duplicate ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),c()},children:(0,$.jsx)(z,{})})}),(0,$.jsx)(bt,{children:`Duplicate theme`})]}):null,s?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":`Edit ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),s()},children:(0,$.jsx)(M,{})})}),(0,$.jsx)(bt,{children:`Edit theme`})]}):null,l?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":`Export ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),l()},children:(0,$.jsx)(b,{})})}),(0,$.jsx)(bt,{children:`Export theme file`})]}):null,u?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":d?`Remove themes from ${d.collectionLabel}`:`Remove ${n.label}`,size:`icon-xs`,variant:`ghost-destructive`,onClick:e=>{e.stopPropagation(),u()},children:(0,$.jsx)(k,{})})}),(0,$.jsx)(bt,{children:d?`Remove themes`:`Remove theme`})]}):null]}):null,t[33]=l,t[34]=c,t[35]=s,t[36]=u,t[37]=n.label,t[38]=d,t[39]=N):N=t[39];let P;t[40]!==A||t[41]!==N?(P=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-3 pt-2`,children:[A,N]}),t[40]=A,t[41]=N,t[42]=P):P=t[42];let F;t[43]!==P||t[44]!==x||t[45]!==S||t[46]!==C||t[47]!==w||t[48]!==T?(F=(0,$.jsxs)(`div`,{className:x,"data-theme-library-card":S,onClick:C,style:w,children:[T,P]}),t[43]=P,t[44]=x,t[45]=S,t[46]=C,t[47]=w,t[48]=T,t[49]=F):F=t[49];let I;t[50]!==g||t[51]!==F?(I=(0,$.jsx)(g,{render:F}),t[50]=g,t[51]=F,t[52]=I):I=t[52];let L=d?`Use the first variants for light and dark`:p.length>1?`Use for both light and dark`:`Use for ${p[0]} mode only`,V;t[53]===L?V=t[54]:(V=(0,$.jsx)(bt,{children:L}),t[53]=L,t[54]=V);let H;return t[55]!==_||t[56]!==I||t[57]!==V?(H=(0,$.jsxs)(_,{children:[I,V]}),t[55]=_,t[56]=I,t[57]=V,t[58]=H):H=t[58],H}function qa(e){return e.mode}function Ja(e){let t=(0,Z.c)(49),{themes:n,activeModesFor:r,onUse:i,onUseMode:a,onDuplicate:o,onEdit:s,onDownload:c,onRemove:l}=e,u;t[0]!==r||t[1]!==n?(u=()=>{let e=n.findIndex(e=>r(e.id).length>0);return e<0?0:e},t[0]=r,t[1]=n,t[2]=u):u=t[2];let[d,f]=(0,Q.useState)(u),p=Math.min(d,n.length-1),m=n[p],h,g;if(t[3]!==p||t[4]!==d?(h=()=>{d!==p&&f(p)},g=[p,d],t[3]=p,t[4]=d,t[5]=h,t[6]=g):(h=t[5],g=t[6]),(0,Q.useEffect)(h,g),!m)return null;let _=m.collection?.label??m.label,v;if(t[7]!==r||t[8]!==_||t[9]!==c||t[10]!==o||t[11]!==s||t[12]!==l||t[13]!==i||t[14]!==a||t[15]!==m||t[16]!==n){let e=Ua(n),u;t[18]===n?u=t[19]:(u=n.find(Xa),t[18]=n,t[19]=u);let d=u,p;t[20]===n?p=t[21]:(p=n.find(Ya),t[20]=n,t[21]=p);let h=p,g;t[22]!==h||t[23]!==d||t[24]!==i||t[25]!==a||t[26]!==m||t[27]!==n.length?(g=()=>{n.length===1?i(m):(d&&a(d,`light`),h&&a(h,`dark`),f(0))},t[22]=h,t[23]=d,t[24]=i,t[25]=a,t[26]=m,t[27]=n.length,t[28]=g):g=t[28];let y=g,b;t[29]!==r||t[30]!==m.id?(b=r(m.id),t[29]=r,t[30]=m.id,t[31]=b):b=t[31];let x;t[32]!==c||t[33]!==m?(x=()=>c(m),t[32]=c,t[33]=m,t[34]=x):x=t[34];let S;t[35]!==o||t[36]!==m?(S=()=>o(m),t[35]=o,t[36]=m,t[37]=S):S=t[37];let C;t[38]!==s||t[39]!==m?(C=()=>s(m),t[38]=s,t[39]=m,t[40]=C):C=t[40];let w;t[41]!==l||t[42]!==m?(w=()=>l(m),t[41]=l,t[42]=m,t[43]=w):w=t[43];let T;t[44]!==a||t[45]!==m?(T=e=>a(m,e),t[44]=a,t[45]=m,t[46]=T):T=t[46];let E;t[47]===m?E=t[48]:(E=vn(m),t[47]=m,t[48]=E),v=(0,$.jsx)(Ka,{activeModes:b,isActive:!1,onDownload:x,onDuplicate:S,onEdit:C,onRemove:w,onUse:y,onUseMode:T,theme:E,...n.length>1?{variantNavigation:{collectionLabel:_,options:n.flatMap((t,n)=>vn(t).previews.map(i=>({themeIndex:n,label:e[n]??t.label,activeModes:r(t.id),preview:i}))),onSelectAndUse:(e,t)=>{let r=n[e];r&&(f(e),a(r,t))}}}:{}}),t[7]=r,t[8]=_,t[9]=c,t[10]=o,t[11]=s,t[12]=l,t[13]=i,t[14]=a,t[15]=m,t[16]=n,t[17]=v}else v=t[17];return v}function Ya(e){return et(e).includes(`dark`)}function Xa(e){return et(e).includes(`light`)}function Za(e){let t=(0,Z.c)(118),{theme:n,setTheme:r,appearanceMode:i,setAppearanceMode:a,customThemes:o,initialAppearance:c,refreshTheme:l,isImportOpen:u,onImportOpenChange:d,themeHalves:f,setThemeHalf:p}=e,m=zn(ao),h=Tn(),[g,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(!1),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[0]=b):b=t[0];let[x,S]=(0,Q.useState)(b),C;t[1]===x?C=t[2]:(C=new Set(x),t[1]=x,t[2]=C);let w=C,T=g?.theme,E;t[3]===g?.collectionThemes?E=t[4]:(E=g?.collectionThemes??[],t[3]=g?.collectionThemes,t[4]=E);let O=E,k=O.length>1,A=T?.collection?.label??T?.label,j=io,M=ro,N;t[5]===r?N=t[6]:(N=e=>{let t=r(e);return t||j(),t},t[5]=r,t[6]=N);let F=N,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(e,t)=>{_({theme:e,collectionThemes:t}),S(t.length>1?[]:[e.id]),y(!0)},t[7]=I):I=t[7];let L=I,z;t[8]!==i||t[9]!==F||t[10]!==p||t[11]!==n||t[12]!==x||t[13]!==g?(z=()=>{if(!g)return;let e=new Set(x);if(e.size===0)return;let t=e.has(Ge(n)?.id??``),r=Ce();if(!t||F(i===`system`?`system`:i)){for(let n of[`light`,`dark`]){let i=r[n];if(i===void 0)continue;let a=i&&e.has(i)?null:t?i:void 0;if(a!==void 0&&!p(n,a)){M();return}}try{Ne([...e])}catch{M();return}y(!1)}},t[8]=i,t[9]=F,t[10]=p,t[11]=n,t[12]=x,t[13]=g,t[14]=z):z=t[14];let B=z,V=Ge(n)?.id??null,H=f?.light??V,U=f?.dark??V,ee;t[15]!==i||t[16]!==V||t[17]!==F||t[18]!==r||t[19]!==p||t[20]!==n?(ee=(e,t)=>{let a=e===`light`?`dark`:`light`;if(t===null&&V!==null){let e=Ce()[a]??V;if(!F(i===`system`?`system`:i))return;p(a,e)||(r(n),j())}else p(e,t)||j()},t[15]=i,t[16]=V,t[17]=F,t[18]=r,t[19]=p,t[20]=n,t[21]=ee):ee=t[21];let te=ee,ne;t[22]!==U||t[23]!==c||t[24]!==H?(ne=Ge((c===`light`?H:U)??``)??null,t[22]=U,t[23]=c,t[24]=H,t[25]=ne):ne=t[25];let re=ne,ie=no,ae;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(e,t)=>{let n=ie(e);return Cn(n,t)??n.previews[0].colors},t[26]=ae):ae=t[26];let oe=ae,se;t[27]===a?se=t[28]:(se=e=>{a(e)||j()},t[27]=a,t[28]=se);let ce=se,le;t[29]===te?le=t[30]:(le=e=>t=>{t!==`system`&&te(t,e)},t[29]=te,t[30]=le);let ue=le,de;t[31]!==U||t[32]!==H?(de=e=>{let t=[];return H===e&&t.push(`light`),U===e&&t.push(`dark`),t},t[31]=U,t[32]=H,t[33]=de):de=t[33];let fe=de,pe;if(t[34]!==U||t[35]!==H){let e=e=>oe(e===`light`?H:U,e);pe=t=>(0,$.jsx)(Ba,{className:`h-[8.75rem]`,panes:t===`system`?[{clip:`left`,colors:e(`light`)},{clip:`right`,colors:e(`dark`)}]:[{colors:e(t===`dark`?`dark`:`light`)}]}),t[34]=U,t[35]=H,t[36]=pe}else pe=t[36];let G=pe,me;t[37]!==i||t[38]!==G||t[39]!==ce?(me=()=>(0,$.jsx)(`div`,{"aria-label":`Appearance mode`,className:`grid w-full grid-cols-3 gap-3`,role:`group`,children:[`system`,`light`,`dark`].map(e=>{let t=i===e;return(0,$.jsxs)(`button`,{"aria-label":e===`system`?`Follow the system appearance`:`Use ${e} mode`,"aria-pressed":t,className:W(`flex cursor-pointer flex-col items-stretch gap-1.5 rounded-xl border p-2 outline-none transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,t?`border-transparent bg-accent/30`:`border-border/70 bg-card/60 hover:bg-accent/10`),style:t?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,onClick:()=>ce(e),type:`button`,children:[G(e),(0,$.jsx)(`span`,{className:W(`flex items-center justify-center text-xs font-medium`,t?`text-foreground`:`text-muted-foreground`),children:e===`system`?`System`:e===`light`?`Light`:`Dark`})]},e)})}),t[37]=i,t[38]=G,t[39]=ce,t[40]=me):me=t[40];let he=me,ge,K,q,_e,ve;if(t[41]!==re?.id||t[42]!==i||t[43]!==te||t[44]!==o||t[45]!==h||t[46]!==ue||t[47]!==c||t[48]!==d||t[49]!==m||t[50]!==F||t[51]!==fe||t[52]!==he){let e=[...o.reduce(to,new Map).entries()],n=()=>(0,$.jsx)(xt,{children:(0,$.jsxs)(`div`,{className:`grid w-full gap-2`,style:{gridTemplateColumns:`repeat(auto-fit, minmax(min(100%, 16rem), 1fr))`},children:[$n.map(e=>(0,$.jsx)(Ka,{activeModes:fe(null),isActive:!1,onDuplicate:()=>m({editingThemeId:null,seedThemeId:null,seedName:`${e.label} copy`,initialAppearance:c}),onUse:()=>F(i===`system`?`system`:i),onUseMode:ue(null),theme:e},e.id)),Ha.map(e=>{let t=vn(e);return(0,$.jsx)(Ka,{activeModes:fe(e.id),isActive:!1,onDuplicate:()=>m({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:c}),onUse:()=>F(e.id),onUseMode:ue(e.id),theme:t},e.id)}),h.filter(e=>!o.some(t=>t.id===e.id)).map(e=>(0,$.jsx)(Ka,{activeModes:fe(e.id),isActive:!1,onDuplicate:()=>m({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:c}),onUse:()=>{let t=Ve(e);t===null?F(e.id):te(t,e.id)},onUseMode:ue(e.id),theme:vn(e)},e.id)),e.map(e=>{let[t,n]=e;return(0,$.jsx)(Ja,{activeModesFor:fe,onDownload:eo,onDuplicate:e=>m({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:c}),onEdit:e=>m({editingThemeId:e.id,seedThemeId:null,seedName:null,initialAppearance:c}),onRemove:e=>L(e,n),onUse:e=>{let t=et(e);t.length===1?te(t[0],e.id):F(e.id)},onUseMode:(e,t)=>ue(e.id)(t),themes:n},t)})]})});ge=`space-y-3`,t[58]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsx)(`h3`,{className:`px-3 text-sm font-normal text-foreground/70 sm:px-4`,children:X(`color-scheme`).title}),t[58]=K):K=t[58],t[59]===he?q=t[60]:(q=he(),t[59]=he,t[60]=q);let r;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`h3`,{className:`text-sm font-normal text-foreground/70`,children:X(`theme`).title}),t[61]=r):r=t[61];let a;t[62]!==re?.id||t[63]!==c||t[64]!==m?(a=()=>m({editingThemeId:null,seedThemeId:re?.id??null,seedName:null,initialAppearance:c}),t[62]=re?.id,t[63]=c,t[64]=m,t[65]=a):a=t[65];let s;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(D,{}),t[66]=s):s=t[66];let l;t[67]===a?l=t[68]:(l=(0,$.jsxs)(R,{size:`xs`,variant:`outline`,onClick:a,children:[s,`Create theme`]}),t[67]=a,t[68]=l);let u;t[69]===d?u=t[70]:(u=()=>d(!0),t[69]=d,t[70]=u);let f;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(P,{}),t[71]=f):f=t[71];let p;t[72]===u?p=t[73]:(p=(0,$.jsxs)(R,{size:`xs`,variant:`outline`,onClick:u,children:[f,`Add theme`]}),t[72]=u,t[73]=p),t[74]!==l||t[75]!==p?(_e=(0,$.jsxs)(`div`,{className:`flex min-h-8 flex-wrap items-center justify-between gap-3 px-3 pt-2 sm:px-4`,children:[r,(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[l,p]})]}),t[74]=l,t[75]=p,t[76]=_e):_e=t[76],ve=n(),t[41]=re?.id,t[42]=i,t[43]=te,t[44]=o,t[45]=h,t[46]=ue,t[47]=c,t[48]=d,t[49]=m,t[50]=F,t[51]=fe,t[52]=he,t[53]=ge,t[54]=K,t[55]=q,t[56]=_e,t[57]=ve}else ge=t[53],K=t[54],q=t[55],_e=t[56],ve=t[57];let ye;t[77]===l?ye=t[78]:(ye=(e,t)=>{let{updated:n}=t;n&&l();let r=n?`updated`:`added`;be.add(je({type:`success`,title:e.length===1?`${e[0].label} ${r}`:`${e.length} themes ${r}`,description:e.map($a).join(`, `)}))},t[77]=l,t[78]=ye);let xe;t[79]!==te||t[80]!==F?(xe=e=>{let t=et(e);return t.length===1?(te(t[0],e.id),be.add(je({type:`success`,title:`${e.label} added`,description:`It’s now your ${t[0]} theme.`})),!0):F(e.id)?(be.add(je({type:`success`,title:`${e.label} added`,description:`It’s now active.`})),!0):!1},t[79]=te,t[80]=F,t[81]=xe):xe=t[81];let Se;t[82]!==u||t[83]!==d||t[84]!==ye||t[85]!==xe?(Se=(0,$.jsx)(Ra,{onImportedMany:ye,onImported:xe,onOpenChange:d,open:u}),t[82]=u,t[83]=d,t[84]=ye,t[85]=xe,t[86]=Se):Se=t[86];let we=k?`Remove themes from “${A}”?`:`Remove “${T?.label}”?`,Te;t[87]===we?Te=t[88]:(Te=(0,$.jsx)(An,{children:we}),t[87]=we,t[88]=Te);let Ee=k?`Select the variants you want to remove. You can restore them by importing the extension again.`:`You can bring it back anytime by importing its JSON file.`,De;t[89]===Ee?De=t[90]:(De=(0,$.jsx)(Gn,{children:Ee}),t[89]=Ee,t[90]=De);let Oe;t[91]!==Te||t[92]!==De?(Oe=(0,$.jsxs)(On,{children:[Te,De]}),t[91]=Te,t[92]=De,t[93]=Oe):Oe=t[93];let ke;t[94]!==k||t[95]!==O||t[96]!==w?(ke=k?(0,$.jsx)(`div`,{className:`grid max-h-72 grid-cols-1 gap-2 overflow-y-auto px-6 pb-6 sm:grid-cols-2`,children:O.map(e=>{let t=w.has(e.id),n=vn(e),r=`remove-theme-${e.id}`;return(0,$.jsxs)(`label`,{className:`group relative flex min-h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-border/70 bg-muted/25 p-3 has-checked:border-ring has-checked:bg-accent/20 hover:bg-muted/40`,htmlFor:r,children:[(0,$.jsxs)(`span`,{className:`absolute right-2 top-2 inline-grid size-5 grid-cols-1 sm:size-4`,children:[(0,$.jsx)(`input`,{checked:t,className:`col-start-1 row-start-1 size-full appearance-none rounded-sm border border-input bg-background outline-none checked:border-primary checked:bg-primary focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring checked:focus-visible:inset-ring-3 checked:focus-visible:inset-ring-background dark:not-checked:bg-input/32 forced-colors:appearance-auto`,id:r,name:`themes-to-remove`,type:`checkbox`,onChange:t=>{let n=t.currentTarget.checked;S(t=>n?[...t,e.id]:t.filter(t=>t!==e.id))}}),(0,$.jsx)(s,{className:`pointer-events-none col-start-1 row-start-1 size-3.5 shrink-0 self-center justify-self-center stroke-primary-foreground opacity-0 group-has-checked:opacity-100 sm:size-3`})]}),(0,$.jsx)(`span`,{className:`flex min-h-12 items-center justify-center gap-1`,children:n.previews.map(Qa)}),(0,$.jsx)(`p`,{className:`max-w-full truncate text-center text-base font-medium text-foreground sm:text-sm`,children:e.label})]},e.id)})}):null,t[94]=k,t[95]=O,t[96]=w,t[97]=ke):ke=t[97];let Ae;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,$.jsx)(bn,{render:(0,$.jsx)(R,{variant:`outline`}),children:`Cancel`}),t[98]=Ae):Ae=t[98];let Me=x.length===0,Pe=k?`Remove selected${x.length>0?` (${x.length})`:``}`:`Remove theme`,Fe;t[99]!==B||t[100]!==Me||t[101]!==Pe?(Fe=(0,$.jsxs)(yn,{children:[Ae,(0,$.jsx)(R,{disabled:Me,variant:`destructive`,onClick:B,children:Pe})]}),t[99]=B,t[100]=Me,t[101]=Pe,t[102]=Fe):Fe=t[102];let Ie;t[103]!==Oe||t[104]!==ke||t[105]!==Fe?(Ie=(0,$.jsxs)(En,{children:[Oe,ke,Fe]}),t[103]=Oe,t[104]=ke,t[105]=Fe,t[106]=Ie):Ie=t[106];let Le;t[107]!==v||t[108]!==Ie?(Le=(0,$.jsx)(_n,{open:v,onOpenChange:y,children:Ie}),t[107]=v,t[108]=Ie,t[109]=Le):Le=t[109];let Re;return t[110]!==ge||t[111]!==K||t[112]!==q||t[113]!==_e||t[114]!==ve||t[115]!==Se||t[116]!==Le?(Re=(0,$.jsxs)(`div`,{className:ge,children:[K,q,_e,ve,Se,Le]}),t[110]=ge,t[111]=K,t[112]=q,t[113]=_e,t[114]=ve,t[115]=Se,t[116]=Le,t[117]=Re):Re=t[117],Re}function Qa(e){return(0,$.jsx)(`span`,{className:`flex size-11 shrink-0 items-center justify-center`,children:(0,$.jsx)(`span`,{className:`flex scale-75`,children:(0,$.jsx)(fn,{colors:e.colors,mode:e.mode})})},e.mode)}function $a(e){return e.label}function eo(e){return Wa(`${e.id}.json`,Le(e))}function to(e,t){let n=t.collection?`collection:${t.collection.id}`:`theme:${t.id}`,r=e.get(n);return r?r.push(t):e.set(n,[t]),e}function no(e){if(e===null)return $n[0];let t=Ge(e);return t?vn(t):$n[0]}function ro(){be.add(je({type:`error`,title:`Couldn’t remove theme`,description:`Try again.`}))}function io(){be.add(je({type:`error`,title:`Couldn’t save theme selection`,description:`Try again.`}))}function ao(e){return e.openThemeEditor}function oo(e){let t=(0,Z.c)(22),{durationMs:n}=e,[r,i]=(0,Q.useState)(!0),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>i(so),t[0]=a):a=t[0];let o=`${n}ms`,s;t[1]===o?s=t[2]:(s={"--preview-duration":o},t[1]=o,t[2]=s);let c=s,l=r?`w-4`:`w-0`,u;t[3]===l?u=t[4]:(u=W(`h-full shrink-0 overflow-hidden rounded-md bg-sidebar`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,l),t[3]=l,t[4]=u);let d;t[5]===u?d=t[6]:(d=(0,$.jsx)(`span`,{"aria-hidden":!0,className:u}),t[5]=u,t[6]=d);let f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`span`,{className:`flex min-h-0 flex-1 flex-col gap-1 pt-1`,children:[(0,$.jsx)(`span`,{className:`h-0.5 w-full rounded-full bg-muted-foreground/25`}),(0,$.jsx)(`span`,{className:`h-0.5 w-4/5 rounded-full bg-muted-foreground/20`}),(0,$.jsx)(`span`,{className:`h-0.5 w-3/5 rounded-full bg-muted-foreground/15`})]}),t[7]=f):f=t[7];let p=r?`h-2 border-t border-border/70`:`h-0 border-t-0`,m;t[8]===p?m=t[9]:(m=W(`flex shrink-0 items-center overflow-hidden bg-foreground/5 px-2`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,p),t[8]=p,t[9]=m);let h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`h-px w-2/3 rounded-full bg-muted-foreground/25`}),t[10]=h):h=t[10];let g;t[11]===m?g=t[12]:(g=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`flex min-w-0 flex-1 flex-col px-1`,children:[f,(0,$.jsx)(`span`,{className:m,children:h})]}),t[11]=m,t[12]=g);let _=r?`w-5`:`w-0`,v;t[13]===_?v=t[14]:(v=W(`h-full shrink-0 overflow-hidden rounded-md bg-muted`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,_),t[13]=_,t[14]=v);let y;t[15]===v?y=t[16]:(y=(0,$.jsx)(`span`,{"aria-hidden":!0,className:v}),t[15]=v,t[16]=y);let b;return t[17]!==g||t[18]!==y||t[19]!==c||t[20]!==d?(b=(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Replay panel animation preview`,className:`flex h-10 w-full cursor-pointer overflow-hidden rounded-lg border border-border bg-background p-1 shadow-xs/5 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,onClick:a,style:c,children:[d,g,y]}),t[17]=g,t[18]=y,t[19]=c,t[20]=d,t[21]=b):b=t[21],b}function so(e){return!e}function co(){let{scope:e,connectedEnvironments:t}=rn(),n=hn(),{snapshots:r,error:i,isLoading:a,refresh:o}=jn(e.environmentIds),s=Ae(t,F),[c,l]=(0,Q.useState)(``),[u,d]=(0,Q.useState)(`all`),[f,p]=(0,Q.useState)(`newest`),[m,h]=(0,Q.useState)(!1),g=(0,Q.useRef)(!1),[_,v]=(0,Q.useState)(null),y=(0,Q.useMemo)(()=>{let t=e.kind===`project`||e.kind===`checkout`?new Set(e.members.map(e=>`${e.environmentId}:${e.id}`)):null;return r.flatMap(({environmentId:e,snapshot:n})=>n.projects.flatMap(r=>{let i=`${e}:${r.id}`;if(t!==null&&!t.has(i))return[];let a=n.threads.filter(e=>e.projectId===r.id).map(t=>ae(e,t));return a.length?[{key:i,project:{...r,environmentId:e},threads:a}]:[]}))},[r,e]),b=y.flatMap(e=>e.threads),x=y.some(e=>e.key===u)?u:`all`,S=y.flatMap(e=>{if(x!==`all`&&e.key!==x)return[];let t=e.threads.filter(e=>e.title.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())).toSorted((e,t)=>{if(f===`title`)return e.title.localeCompare(t.title);let n=(t.archivedAt??t.createdAt).localeCompare(e.archivedAt??e.createdAt);return f===`oldest`?-n:n});return t.length?[{...e,threads:t}]:[]}),C=!a&&!i&&e.environmentIds.every(e=>t.some(t=>t.environmentId===e)&&r.some(t=>t.environmentId===e)),w=async(t,r,i=!1)=>{if(!g.current){g.current=!0,h(!0),v(null);try{if(i&&!await we().dialogs.confirm(`Permanently delete all ${t.length} archived chats in ${e.label}? Search and project filters do not limit this action. This cannot be undone.`,{variant:`destructive`}))return;for(let e of t){let t=r===`unarchive`?await n.unarchiveThread(e):i?await n.deleteThread(e):await n.confirmAndDeleteThread(e);if(t._tag===`Failure`)throw ne(t)}}catch(e){v(e instanceof Error?e.message:`The action could not be completed. Try again.`)}finally{o(),g.current=!1,h(!1)}}};return(0,$.jsxs)(sn,{width:`wide`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Archived chats`}),(0,$.jsxs)(R,{variant:`destructive-outline`,size:`sm`,disabled:m||!C||!b.length||b.some(e=>!s.has(e.environmentId)),onClick:()=>void w(b.map(e=>O(e.environmentId,e.id)),`delete`,!0),children:[(0,$.jsx)(k,{"aria-hidden":!0}),` Delete all`]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-[minmax(0,1fr)_9rem_10rem]`,children:[(0,$.jsx)(`div`,{className:`col-span-2 min-w-0 sm:col-span-1`,children:(0,$.jsxs)(Kt,{children:[(0,$.jsx)(Wt,{children:(0,$.jsx)(te,{"aria-hidden":!0})}),(0,$.jsx)(Gt,{type:`search`,"aria-label":`Search archived chats`,placeholder:`Search archived chats`,value:c,onChange:e=>l(e.currentTarget.value)})]})}),(0,$.jsxs)(q,{value:f,onValueChange:e=>e&&p(e),children:[(0,$.jsx)(K,{"aria-label":`Sort archived chats`,children:(0,$.jsx)(me,{children:f===`newest`?`Newest first`:f===`oldest`?`Oldest first`:`By title`})}),(0,$.jsxs)(ge,{children:[(0,$.jsx)(G,{value:`newest`,children:`Newest first`}),(0,$.jsx)(G,{value:`oldest`,children:`Oldest first`}),(0,$.jsx)(G,{value:`title`,children:`By title`})]})]}),(0,$.jsxs)(q,{value:x,onValueChange:e=>e&&d(e),children:[(0,$.jsx)(K,{"aria-label":`Filter by project`,children:(0,$.jsx)(me,{children:x===`all`?`All projects`:y.find(e=>e.key===u)?.project.title??`All projects`})}),(0,$.jsxs)(ge,{children:[(0,$.jsx)(G,{value:`all`,children:`All projects`}),y.map(e=>(0,$.jsx)(G,{value:e.key,children:e.project.title},e.key))]})]})]}),_||i?(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-destructive-foreground`,children:[(0,$.jsx)(`p`,{children:_??i}),(0,$.jsx)(R,{variant:`outline`,size:`sm`,onClick:o,children:`Retry`})]}):null,S.map(({key:e,project:t,threads:n},r)=>(0,$.jsx)(ln,{id:r===0?`archive`:void 0,title:t.title,icon:(0,$.jsx)(Ut,{project:t}),headerAction:(0,$.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[n.length,` `,n.length===1?`chat`:`chats`]}),children:n.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-4`,onContextMenu:t=>{t.preventDefault(),!m&&s.has(e.environmentId)&&we().contextMenu.show([{id:`unarchive`,label:`Unarchive`},{id:`delete`,label:`Delete`,destructive:!0}],{x:t.clientX,y:t.clientY}).then(t=>{if(t===`delete`||t===`unarchive`)return w([O(e.environmentId,e.id)],t)}).catch(e=>v(e instanceof Error?e.message:`Could not open chat actions.`))},children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`break-words text-sm font-medium`,children:e.title||`Untitled chat`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:new Date(e.archivedAt??e.createdAt).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})})]}),(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{variant:`ghost-destructive`,size:`icon-sm`,"aria-label":`Delete ${e.title}`,disabled:m||!s.has(e.environmentId),onClick:()=>void w([O(e.environmentId,e.id)],`delete`),children:(0,$.jsx)(k,{"aria-hidden":!0})})}),(0,$.jsx)(bt,{children:`Delete chat`})]}),(0,$.jsx)(R,{variant:`soft`,size:`sm`,disabled:m||!s.has(e.environmentId),onClick:()=>void w([O(e.environmentId,e.id)],`unarchive`),children:`Unarchive`})]},e.id))},e)),S.length?null:(0,$.jsx)(`p`,{id:`archive`,role:`status`,className:`py-8 text-center text-sm text-muted-foreground`,children:a?`Loading archived chats…`:i?`Archived chats could not be loaded.`:b.length?`No chats match your filters.`:`No archived chats.`})]})}var lo={artwork:`Artwork`,pill:`Version pill`,none:`None`},uo={turn:`Wait for the full response`,paragraph:`Show finished paragraphs`},fo={turn:`Text appears once the agent finishes its turn.`,paragraph:`Each paragraph or code block appears as soon as it is complete.`},po={updated_at:`Last user message`,created_at:`Created at`,manual:`Manual`},mo=o(d),ho={locale:`System default`,"12-hour":`12-hour`,"24-hour":`24-hour`},go={comfortable:`Comfortable`,wide:`Wide`,full:`Full`},_o={p4:`P4`,lucide:`Lucide`},vo={stacked:`Stacked`,split:`Split`},yo={direct:`Direct`,hold:`Hold`,"double-click":`Double press`},bo={balanced:`Balanced`,performance:`Performance`,"battery-saver":`Battery saver`},xo={...bo,advanced:`Advanced`},So={balanced:`Pauses probes for idle clients, locked hosts, or low power mode.`,performance:`Allows scoped background probes while any subscribed client remains connected.`,"battery-saver":`Also pauses background probes when the host or client is on battery.`},Co=`Uses custom intervals.`,wo=g.make(`codex`),To=[{key:`pauseWhenHostLocked`,label:`Pause when host is locked`},{key:`pauseWhenHostLowPower`,label:`Pause on host low power`},{key:`pauseWhenClientLowPower`,label:`Pause on client low power`},{key:`pauseWhenOnBattery`,label:`Pause on battery`}];function Eo(){return{backgroundActivity:c.backgroundActivity}}function Do(e){return{backgroundActivity:{schemaVersion:1,profile:e,overrides:{}}}}function Oo(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`span`,{className:`inline-flex items-baseline gap-2`,children:[(0,$.jsx)(`span`,{children:`Version`}),(0,$.jsx)(`code`,{className:`text-2xs font-medium text-muted-foreground`,children:ie})]}),e[0]=t):t=e[0],t}function ko(){let e=Hn(),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(!1),a=typeof window<`u`&&!!window.desktopBridge,o=e?.channel??`latest`,s=a?null:oe,c=pn||a&&o===`nightly`,l=(0,Q.useCallback)(e=>{let t=window.desktopBridge;t&&typeof t.setUpdateChannel==`function`&&e!==o&&(n(!0),t.setUpdateChannel(e).catch(e=>{be.add(je({type:`error`,title:`Could not change update track`,description:e instanceof Error?e.message:`Update track change failed.`}))}).finally(()=>{n(!1)}))},[o]),u=(0,Q.useCallback)(async()=>{let t=window.desktopBridge;if(!t)return;let n=e?Wn(e):`none`;if(n===`download`)t.downloadUpdate().catch(e=>{be.add(je({type:`error`,title:`Could not download update`,description:e instanceof Error?e.message:`Download failed.`}))});else if(n===`install`){if(r)return;i(!0);let n=!1;try{n=await we().dialogs.confirm(Pn(e??{availableVersion:null,downloadedVersion:null}))}catch(e){i(!1),be.add(je({type:`error`,title:`Could not confirm update`,description:e instanceof Error?e.message:`Update confirmation failed.`}));return}if(!n){i(!1);return}t.installUpdate().catch(e=>{be.add(je({type:`error`,title:`Could not install update`,description:e instanceof Error?e.message:`Install failed.`}))}).finally(()=>i(!1))}else typeof t.checkForUpdate==`function`&&t.checkForUpdate().then(e=>{e.checked||be.add(je({type:`error`,title:`Could not check for updates`,description:e.state.message??`Automatic updates are not available in this build.`}))}).catch(e=>{be.add(je({type:`error`,title:`Could not check for updates`,description:e instanceof Error?e.message:`Update check failed.`}))})},[r,e]),d=e?Wn(e):`none`,f=e?qn(e):null,p=d===`none`?!Bn(e):Ln(e),m={download:`Download`,install:`Install`}[d]??{checking:`Checking…`,downloading:`Downloading…`,"up-to-date":`Up to Date`}[e?.status??``]??`Check for Updates`,h=d===`download`||d===`install`?`Update available.`:`Current version of the application.`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(Oo,{}),description:h,control:(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{size:`sm`,variant:`outline`,disabled:p||r,onClick:u,children:m})}),f?(0,$.jsx)(bt,{children:f}):null]})}),a?(0,$.jsx)(J,{...X(`update-track`),description:`Use stable releases or nightly builds. Switch back anytime.`,control:(0,$.jsxs)(q,{value:o,onValueChange:e=>{l(e)},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,disabled:t,children:(0,$.jsx)(me,{children:o===`nightly`?`Nightly`:`Stable`})}),(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`latest`,children:`Stable`}),(0,$.jsx)(G,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):s?(0,$.jsx)(J,{...X(`update-track`),description:`Switches the hosted app release channel.`,control:(0,$.jsxs)(q,{value:s,onValueChange:e=>{e!==s&&window.location.assign(ce({channel:e}))},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,children:(0,$.jsx)(me,{children:se})}),(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`latest`,children:`Latest`}),(0,$.jsx)(G,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):null,c?(0,$.jsx)(Yn,{}):null,a?(0,$.jsx)(Cr,{}):null]})}function Ao(e){let{theme:t,setTheme:n,followSystem:r,setFollowSystem:i,setThemeHalf:a,clearThemeHalves:o,themeHalves:s}=Se(),l=Zt(),u=tn(),d=!A(l.textGenerationModelSelection??null,c.textGenerationModelSelection??null),f=_r(l),p=(0,Q.useMemo)(()=>[...t===`system`?[]:[`Theme`],...r?[]:[`Follow system`],...s===null?[]:[`Theme mix`],...l.appearanceContrast===c.appearanceContrast?[]:[`Contrast`],...l.glassOpacity===c.glassOpacity?[]:[`Glass opacity`],...l.diffColorScheme===c.diffColorScheme?[]:[`Diff colors`],...l.chatWidth===c.chatWidth?[]:[`Chat width`],...l.iconSet===c.iconSet?[]:[`Icon set`],...l.mathRenderingEnabled===c.mathRenderingEnabled?[]:[`Render math`],...l.panelAnimationDurationMs===c.panelAnimationDurationMs?[]:[`Panel animations`],...l.environmentIdentificationMode===c.environmentIdentificationMode?[]:[`Environment identification`],...l.timestampFormat===c.timestampFormat?[]:[`Time format`],...l.notificationMode===c.notificationMode?[]:[`Thread notifications`],...l.inAppNotificationsEnabled===c.inAppNotificationsEnabled?[]:[`In-app notifications`],...l.wakeScreenOnThreadEvents===c.wakeScreenOnThreadEvents?[]:[`Auto awake`],...l.sidebarThreadPreviewCount===c.sidebarThreadPreviewCount?[]:[`Visible threads`],...l.sidebarProjectGroupingMode===c.sidebarProjectGroupingMode?[]:[`Project Grouping`],...l.sidebarProjectSortOrder===c.sidebarProjectSortOrder?[]:[`Project order`],...l.sidebarWorkingShelfEnabled===c.sidebarWorkingShelfEnabled?[]:[`Working section`],...l.sidebarAutoSettleAfterDays===c.sidebarAutoSettleAfterDays?[]:[`Auto-settle inactive threads`],...l.sidebarAutoSettleKeepPullRequests===c.sidebarAutoSettleKeepPullRequests?[]:[`Keep threads with a PR`],...l.sidebarAutoSettleOnMerge===c.sidebarAutoSettleOnMerge?[]:[`Auto-settle merged threads`],...l.autoResumeLimitedThreads===c.autoResumeLimitedThreads?[]:[`Auto-resume limited threads`],...l.snoozeLimitedThreads===c.snoozeLimitedThreads?[]:[`Snooze limited threads`],...l.wordWrap===c.wordWrap?[]:[`Word wrap`],...l.persistComposerContextStrip===c.persistComposerContextStrip?[]:[`Composer context`],...hr(l),...l.diffFilesCollapsed===c.diffFilesCollapsed?[]:[`Default diff file state`],...l.diffIgnoreWhitespace===c.diffIgnoreWhitespace?[]:[`Diff whitespace changes`],...l.diffLayout===c.diffLayout?[]:[`Diff layout`],...l.proactivePanelsEnabled===c.proactivePanelsEnabled?[]:[`Proactive panels`],...l.showSkillsInSlashMenu===c.showSkillsInSlashMenu?[]:[`Show skills in slash menu`],...l.composerCollapseOnScroll===c.composerCollapseOnScroll?[]:[`Collapse composer on scroll`],...l.composerRichTextEnabled===c.composerRichTextEnabled?[]:[`Rich text composer`],...l.sendShortcut===c.sendShortcut?[]:[`Send shortcut`],...l.followUpBehavior===c.followUpBehavior?[]:[`Follow-up behavior`],...l.contextWindowMeterEnabled===c.contextWindowMeterEnabled?[]:[`Context window indicator`],...l.responseStreamingMode===c.responseStreamingMode?[]:[`Response streaming`],...l.enableProviderUpdateChecks===c.enableProviderUpdateChecks?[]:[`Provider update checks`],...l.continueThreadsAfterServerUpdate===c.continueThreadsAfterServerUpdate?[]:[`Continue threads after restarts`],...f?[`Background activity`]:[],...l.defaultThreadEnvMode===c.defaultThreadEnvMode?[]:[`New thread mode`],...l.newWorktreesStartFromOrigin===c.newWorktreesStartFromOrigin?[]:[`New worktrees start from origin`],...l.addProjectBaseDirectory===c.addProjectBaseDirectory?[]:[`Add project base directory`],...l.confirmThreadUnpin===c.confirmThreadUnpin?[]:[`Unpin confirmation`],...l.confirmThreadArchive===c.confirmThreadArchive?[]:[`Archive confirmation`],...l.confirmThreadDelete===c.confirmThreadDelete?[]:[`Delete confirmation`],...l.confirmQuit===c.confirmQuit?[]:[`Quit shortcut`],...d?[`Text generation model`]:[],...cr(l),...l.enableAgentBrowserAccess===c.enableAgentBrowserAccess?[]:[`Agent browser access`]],[d,f,l.browserDefaultViewport,l.browserDefaultZoomFactor,l.browserDefaultAppearance,l.browserRecordingFrameRate,l.browserRecordingShowKeyPresses,l.browserRecordingShowMousePresses,l.browserLinkTarget,l.browserAutoShowFloatingPreview,l.pullRequestLinksOpenInApp,l.appearanceContrast,l.diffColorScheme,l.chatWidth,l.iconSet,l.mathRenderingEnabled,l.enableAgentBrowserAccess,l.confirmQuit,l.confirmThreadArchive,l.confirmThreadDelete,l.confirmThreadUnpin,l.composerCollapseOnScroll,l.composerRichTextEnabled,l.sendShortcut,l.followUpBehavior,l.addProjectBaseDirectory,l.defaultThreadEnvMode,l.newWorktreesStartFromOrigin,l.diffFilesCollapsed,l.diffIgnoreWhitespace,l.diffLayout,l.proactivePanelsEnabled,l.environmentIdentificationMode,l.contextWindowMeterEnabled,l.fontFamilyCode,l.fontFamilyComposer,l.fontFamilySans,l.fontFamilyTerminal,l.fontSizeCode,l.fontSizeInterface,l.fontSizePrompt,l.fontSizeTerminal,l.glassOpacity,l.panelAnimationDurationMs,l.responseStreamingMode,l.persistComposerContextStrip,l.enableProviderUpdateChecks,l.continueThreadsAfterServerUpdate,l.sidebarAutoSettleAfterDays,l.sidebarAutoSettleKeepPullRequests,l.sidebarAutoSettleOnMerge,l.autoResumeLimitedThreads,l.snoozeLimitedThreads,l.sidebarProjectGroupingMode,l.sidebarProjectSortOrder,l.sidebarWorkingShelfEnabled,l.sidebarThreadPreviewCount,l.showSkillsInSlashMenu,l.timestampFormat,l.notificationMode,l.inAppNotificationsEnabled,l.wakeScreenOnThreadEvents,l.wordWrap,r,t,s]);return{changedSettingLabels:p,restoreDefaults:(0,Q.useCallback)(async()=>{if(p.length===0||!await(Oe()??we()).dialogs.confirm([`Restore default settings?`,`This will reset: ${p.join(`, `)}.`].join(`
|
|
45
|
-
`),{variant:`destructive`}))return;let r=t;try{r=Ee()}catch{}let s=De(),l=r!==`system`,d=s!==null,f=xe(r)!==`system`,m=()=>{be.add(je({type:`error`,title:`Couldn’t restore theme settings`,description:`Try again.`}))},h=s;l&&!n(`system`)?m():d&&!o()||f&&!i(!0)?(l&&n(r),h?.light&&a(`light`,h.light),h?.dark&&a(`dark`,h.dark),m()):(u({appearanceContrast:c.appearanceContrast,diffColorScheme:c.diffColorScheme,chatWidth:c.chatWidth,iconSet:c.iconSet,mathRenderingEnabled:c.mathRenderingEnabled,timestampFormat:c.timestampFormat,notificationMode:c.notificationMode,inAppNotificationsEnabled:c.inAppNotificationsEnabled,wakeScreenOnThreadEvents:c.wakeScreenOnThreadEvents,wordWrap:c.wordWrap,persistComposerContextStrip:c.persistComposerContextStrip,diffFilesCollapsed:c.diffFilesCollapsed,diffIgnoreWhitespace:c.diffIgnoreWhitespace,diffLayout:c.diffLayout,proactivePanelsEnabled:c.proactivePanelsEnabled,showSkillsInSlashMenu:c.showSkillsInSlashMenu,composerCollapseOnScroll:c.composerCollapseOnScroll,composerRichTextEnabled:c.composerRichTextEnabled,sendShortcut:c.sendShortcut,followUpBehavior:c.followUpBehavior,contextWindowMeterEnabled:c.contextWindowMeterEnabled,environmentIdentificationMode:c.environmentIdentificationMode,glassOpacity:c.glassOpacity,panelAnimationDurationMs:c.panelAnimationDurationMs,sidebarThreadPreviewCount:c.sidebarThreadPreviewCount,sidebarProjectGroupingMode:c.sidebarProjectGroupingMode,sidebarProjectSortOrder:c.sidebarProjectSortOrder,sidebarWorkingShelfEnabled:c.sidebarWorkingShelfEnabled,sidebarAutoSettleAfterDays:c.sidebarAutoSettleAfterDays,sidebarAutoSettleKeepPullRequests:c.sidebarAutoSettleKeepPullRequests,sidebarAutoSettleOnMerge:c.sidebarAutoSettleOnMerge,autoResumeLimitedThreads:c.autoResumeLimitedThreads,snoozeLimitedThreads:c.snoozeLimitedThreads,responseStreamingMode:c.responseStreamingMode,enableProviderUpdateChecks:c.enableProviderUpdateChecks,continueThreadsAfterServerUpdate:c.continueThreadsAfterServerUpdate,backgroundActivity:c.backgroundActivity,backgroundActivityProfile:c.backgroundActivityProfile,automaticGitFetchInterval:c.automaticGitFetchInterval,providerHealthRefreshInterval:c.providerHealthRefreshInterval,defaultThreadEnvMode:c.defaultThreadEnvMode,newWorktreesStartFromOrigin:c.newWorktreesStartFromOrigin,addProjectBaseDirectory:c.addProjectBaseDirectory,confirmThreadArchive:c.confirmThreadArchive,confirmThreadDelete:c.confirmThreadDelete,confirmThreadUnpin:c.confirmThreadUnpin,confirmQuit:c.confirmQuit,textGenerationModelSelection:c.textGenerationModelSelection,fontFamilySans:c.fontFamilySans,fontFamilyComposer:c.fontFamilyComposer,fontFamilyCode:c.fontFamilyCode,fontFamilyTerminal:c.fontFamilyTerminal,fontSizeInterface:c.fontSizeInterface,fontSizePrompt:c.fontSizePrompt,fontSizeCode:c.fontSizeCode,fontSizeTerminal:c.fontSizeTerminal,browserDefaultViewport:c.browserDefaultViewport,browserDefaultZoomFactor:c.browserDefaultZoomFactor,browserDefaultAppearance:c.browserDefaultAppearance,browserRecordingFrameRate:c.browserRecordingFrameRate,browserRecordingShowKeyPresses:c.browserRecordingShowKeyPresses,browserRecordingShowMousePresses:c.browserRecordingShowMousePresses,browserLinkTarget:c.browserLinkTarget,browserSearchEngine:c.browserSearchEngine,browserCustomSearchUrl:c.browserCustomSearchUrl,browserAutoShowFloatingPreview:c.browserAutoShowFloatingPreview,pullRequestLinksOpenInApp:c.pullRequestLinksOpenInApp,enableAgentBrowserAccess:c.enableAgentBrowserAccess}),e?.())},[p,o,e,i,n,a,t,s,u])}}function jo(e){let t=(0,Z.c)(98),{open:n,onOpenChange:r}=e,i=en(),a=Zt(),o=tn(),s,c,u,d,f,p;t[0]===a?(s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],p=t[6]):(f=Te(a),s=f.profile,c=fr(f.automaticGitFetchInterval),d=fr(f.providerHealthRefreshInterval),u=fr(f.hostPowerMonitorActiveInterval),p=fr(f.hostPowerMonitorIdleInterval),t[0]=a,t[1]=s,t[2]=c,t[3]=u,t[4]=d,t[5]=f,t[6]=p);let m=p,h=n&&i,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(jt,{children:[(0,$.jsx)(Mt,{children:`Background Activity`}),(0,$.jsx)(Ft,{children:`Tune the shared power policy and the background intervals that feed it.`})]}),t[7]=g):g=t[7];let _=!i,v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Shared policy`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Controls whether background work may run after a subscribed interval fires.`})]}),t[8]=v):v=t[8];let y;t[9]!==a||t[10]!==o?(y=e=>{(e===`balanced`||e===`performance`||e===`battery-saver`)&&o({backgroundActivity:mr(a,e)})},t[9]=a,t[10]=o,t[11]=y):y=t[11];let b=bo[s],x;t[12]===b?x=t[13]:(x=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Shared background policy`,children:(0,$.jsx)(me,{children:b})}),t[12]=b,t[13]=x);let S;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`balanced`,children:bo.balanced}),(0,$.jsx)(G,{hideIndicator:!0,value:`performance`,children:bo.performance}),(0,$.jsx)(G,{hideIndicator:!0,value:`battery-saver`,children:bo[`battery-saver`]})]}),t[14]=S):S=t[14];let C;t[15]!==s||t[16]!==y||t[17]!==x?(C=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[v,(0,$.jsxs)(q,{value:s,onValueChange:y,children:[x,S]})]}),t[15]=s,t[16]=y,t[17]=x,t[18]=C):C=t[18];let w;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:X(`git-fetch-interval`).title}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh remote branch status in the background.`})]}),t[19]=w):w=t[19];let T;t[20]!==f||t[21]!==a.backgroundActivity||t[22]!==o?(T=e=>o(vr(a.backgroundActivity,f,{automaticGitFetchInterval:l(pr(e))})),t[20]=f,t[21]=a.backgroundActivity,t[22]=o,t[23]=T):T=t[23];let E;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease Git fetch interval`}),(0,$.jsx)(le,{"aria-label":`Git fetch interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase Git fetch interval`})]}),t[24]=E):E=t[24];let D;t[25]!==c||t[26]!==T?(D=(0,$.jsx)(pe,{value:c,min:0,step:5,size:`sm`,className:`w-32`,onValueChange:T,children:E}),t[25]=c,t[26]=T,t[27]=D):D=t[27];let O;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[28]=O):O=t[28];let k;t[29]===D?k=t[30]:(k=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[w,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[D,O]})]}),t[29]=D,t[30]=k);let A;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Provider health interval`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh provider availability, versions, and auth state. Model catalog updates follow Provider update checks.`})]}),t[31]=A):A=t[31];let j;t[32]!==f||t[33]!==a.backgroundActivity||t[34]!==o?(j=e=>o(vr(a.backgroundActivity,f,{providerHealthRefreshInterval:l(pr(e))})),t[32]=f,t[33]=a.backgroundActivity,t[34]=o,t[35]=j):j=t[35];let M;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease provider health interval`}),(0,$.jsx)(le,{"aria-label":`Provider health interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase provider health interval`})]}),t[36]=M):M=t[36];let N;t[37]!==d||t[38]!==j?(N=(0,$.jsx)(pe,{value:d,min:0,step:30,size:`sm`,className:`w-32`,onValueChange:j,children:M}),t[37]=d,t[38]=j,t[39]=N):N=t[39];let P;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[40]=P):P=t[40];let F;t[41]===N?F=t[42]:(F=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[A,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,P]})]}),t[41]=N,t[42]=F);let I;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Host power monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state while clients are active.`})]}),t[43]=I):I=t[43];let L;t[44]!==f||t[45]!==a.backgroundActivity||t[46]!==o?(L=e=>o(vr(a.backgroundActivity,f,{hostPowerMonitorActiveInterval:l(pr(e,5))})),t[44]=f,t[45]=a.backgroundActivity,t[46]=o,t[47]=L):L=t[47];let z;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease active host power interval`}),(0,$.jsx)(le,{"aria-label":`Active host power interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase active host power interval`})]}),t[48]=z):z=t[48];let B;t[49]!==u||t[50]!==L?(B=(0,$.jsx)(pe,{value:u,min:5,step:5,size:`sm`,className:`w-32`,onValueChange:L,children:z}),t[49]=u,t[50]=L,t[51]=B):B=t[51];let V;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[52]=V):V=t[52];let H;t[53]===B?H=t[54]:(H=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[I,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[B,V]})]}),t[53]=B,t[54]=H);let U;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Idle host monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state when no foreground client is active.`})]}),t[55]=U):U=t[55];let ee;t[56]!==f||t[57]!==a.backgroundActivity||t[58]!==o?(ee=e=>o(vr(a.backgroundActivity,f,{hostPowerMonitorIdleInterval:l(pr(e,5))})),t[56]=f,t[57]=a.backgroundActivity,t[58]=o,t[59]=ee):ee=t[59];let W;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease idle host power interval`}),(0,$.jsx)(le,{"aria-label":`Idle host power interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase idle host power interval`})]}),t[60]=W):W=t[60];let te;t[61]!==m||t[62]!==ee?(te=(0,$.jsx)(pe,{value:m,min:5,step:30,size:`sm`,className:`w-32`,onValueChange:ee,children:W}),t[61]=m,t[62]=ee,t[63]=te):te=t[63];let ne;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[64]=ne):ne=t[64];let re;t[65]===te?re=t[66]:(re=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[U,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[te,ne]})]}),t[65]=te,t[66]=re);let ie;t[67]!==f||t[68]!==a.backgroundActivity||t[69]!==o?(ie=To.map(e=>{let{key:t,label:n}=e;return(0,$.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border-b px-4 py-3 last:border-b-0 sm:border-r sm:even:border-r-0`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium`,children:n}),(0,$.jsx)(Fn,{checked:f[t],onCheckedChange:e=>o(vr(a.backgroundActivity,f,{[t]:!!e})),"aria-label":n})]},t)}),t[67]=f,t[68]=a.backgroundActivity,t[69]=o,t[70]=ie):ie=t[70];let ae;t[71]===ie?ae=t[72]:(ae=(0,$.jsx)(`div`,{className:`grid gap-0 border-t sm:grid-cols-2`,children:ie}),t[71]=ie,t[72]=ae);let oe;t[73]!==C||t[74]!==k||t[75]!==F||t[76]!==H||t[77]!==re||t[78]!==ae||t[79]!==_?(oe=(0,$.jsx)(Pt,{children:(0,$.jsxs)(`fieldset`,{disabled:_,className:`min-w-0 overflow-hidden rounded-xl border bg-card text-card-foreground`,children:[C,k,F,H,re,ae]})}),t[73]=C,t[74]=k,t[75]=F,t[76]=H,t[77]=re,t[78]=ae,t[79]=_,t[80]=oe):oe=t[80];let se=!i,ce;t[81]===o?ce=t[82]:(ce=()=>o(Eo()),t[81]=o,t[82]=ce);let he;t[83]!==se||t[84]!==ce?(he=(0,$.jsx)(R,{variant:`outline`,disabled:se,onClick:ce,children:`Reset all`}),t[83]=se,t[84]=ce,t[85]=he):he=t[85];let _e;t[86]===r?_e=t[87]:(_e=(0,$.jsx)(R,{onClick:()=>r(!1),children:`Done`}),t[86]=r,t[87]=_e);let ve;t[88]!==he||t[89]!==_e?(ve=(0,$.jsxs)(Nt,{children:[he,_e]}),t[88]=he,t[89]=_e,t[90]=ve):ve=t[90];let ye;t[91]!==oe||t[92]!==ve?(ye=(0,$.jsxs)(It,{className:`max-w-xl`,children:[g,oe,ve]}),t[91]=oe,t[92]=ve,t[93]=ye):ye=t[93];let be;return t[94]!==r||t[95]!==h||t[96]!==ye?(be=(0,$.jsx)(Lt,{open:h,onOpenChange:r,children:ye}),t[94]=r,t[95]=h,t[96]=ye,t[97]=be):be=t[97],be}function Mo(){let e=(0,Z.c)(179),{appearanceMode:t,refreshTheme:n,resolvedTheme:r,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:l}=Se(),d=gn(),[f,p]=(0,Q.useState)(!1),m=Zt(),h=tn(),g=tr(),_;e[0]===g?_=e[1]:(_=nr(g),e[0]=g,e[1]=_);let v=_!==null,y=(m.glassOpacity-40)/60,b=`${y*100}%`,x=`${.5-y}rem`,S;e[2]!==b||e[3]!==x?(S={"--settings-slider-progress":b,"--settings-slider-fill-offset":x},e[2]=b,e[3]=x,e[4]=S):S=e[4];let C=S,w=(m.appearanceContrast-50)/150,T=`${w*100}%`,E=`${.5-w}rem`,D;e[5]!==T||e[6]!==E?(D={"--settings-slider-progress":T,"--settings-slider-fill-offset":E},e[5]=T,e[6]=E,e[7]=D):D=e[7];let O=D,k=(m.panelAnimationDurationMs-0)/400,A=`${k*100}%`,j=`${.5-k}rem`,M;e[8]!==A||e[9]!==j?(M={"--settings-slider-progress":A,"--settings-slider-fill-offset":j},e[8]=A,e[9]=j,e[10]=M):M=e[10];let N=M,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=X(`theme`),e[11]=P):P=e[11];let F;e[12]!==t||e[13]!==d||e[14]!==f||e[15]!==n||e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==o||e[20]!==s||e[21]!==l?(F=(0,$.jsx)(ln,{id:`appearance`,title:`Colors & themes`,variant:`plain`,hideTitle:!0,children:(0,$.jsx)(`div`,{id:P.id,children:(0,$.jsx)(Za,{appearanceMode:t,customThemes:d,initialAppearance:r,refreshTheme:n,isImportOpen:f,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:l,onImportOpenChange:p})})}),e[12]=t,e[13]=d,e[14]=f,e[15]=n,e[16]=r,e[17]=i,e[18]=a,e[19]=o,e[20]=s,e[21]=l,e[22]=F):F=e[22];let I;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=X(`setting-appearance-contrast`),e[23]=I):I=e[23];let L;e[24]!==m.appearanceContrast||e[25]!==h?(L=m.appearanceContrast===c.appearanceContrast?null:(0,$.jsx)(Y,{label:`contrast`,onClick:()=>h({appearanceContrast:c.appearanceContrast})}),e[24]=m.appearanceContrast,e[25]=h,e[26]=L):L=e[26];let R;e[27]===m.appearanceContrast?R=e[28]:(R=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`appearance-contrast`,children:[m.appearanceContrast,`%`]}),e[27]=m.appearanceContrast,e[28]=R);let z;e[29]===h?z=e[30]:(z=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=50&&t<=200&&h({appearanceContrast:t})},e[29]=h,e[30]=z);let B;e[31]!==O||e[32]!==m.appearanceContrast||e[33]!==z?(B=(0,$.jsx)(`input`,{"aria-label":`Contrast`,className:`settings-slider min-w-0 flex-1`,id:`appearance-contrast`,max:200,min:50,onChange:z,step:5,style:O,type:`range`,value:m.appearanceContrast}),e[31]=O,e[32]=m.appearanceContrast,e[33]=z,e[34]=B):B=e[34];let V;e[35]!==R||e[36]!==B?(V=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[R,B]}),e[35]=R,e[36]=B,e[37]=V):V=e[37];let H;e[38]!==L||e[39]!==V?(H=(0,$.jsx)(J,{...I,description:`Adjust the contrast of colors and borders across the interface.`,resetAction:L,control:V}),e[38]=L,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=X(`setting-glass-opacity`),e[41]=U):U=e[41];let ee;e[42]!==m.glassOpacity||e[43]!==h?(ee=m.glassOpacity===c.glassOpacity?null:(0,$.jsx)(Y,{label:`glass opacity`,onClick:()=>h({glassOpacity:c.glassOpacity})}),e[42]=m.glassOpacity,e[43]=h,e[44]=ee):ee=e[44];let W;e[45]===m.glassOpacity?W=e[46]:(W=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`glass-opacity`,children:[m.glassOpacity,`%`]}),e[45]=m.glassOpacity,e[46]=W);let te;e[47]===h?te=e[48]:(te=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=40&&t<=100&&h({glassOpacity:t})},e[47]=h,e[48]=te);let ne;e[49]!==C||e[50]!==m.glassOpacity||e[51]!==te?(ne=(0,$.jsx)(`input`,{"aria-label":`Glass opacity`,className:`settings-slider min-w-0 flex-1`,id:`glass-opacity`,max:100,min:40,onChange:te,step:5,style:C,type:`range`,value:m.glassOpacity}),e[49]=C,e[50]=m.glassOpacity,e[51]=te,e[52]=ne):ne=e[52];let re;e[53]!==W||e[54]!==ne?(re=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[W,ne]}),e[53]=W,e[54]=ne,e[55]=re):re=e[55];let ie;e[56]!==ee||e[57]!==re?(ie=(0,$.jsx)(J,{...U,description:`Higher values make menus, dialogs, and the composer more solid.`,resetAction:ee,control:re}),e[56]=ee,e[57]=re,e[58]=ie):ie=e[58];let ae;e[59]!==m.environmentIdentificationMode||e[60]!==v||e[61]!==h?(ae=v?(0,$.jsx)(J,{...X(`environment-identification`),description:`Choose how Dev and Nightly environments are identified.`,resetAction:m.environmentIdentificationMode===`artwork`?null:(0,$.jsx)(Y,{label:`environment identification`,onClick:()=>h({environmentIdentificationMode:u})}),control:(0,$.jsxs)(q,{value:m.environmentIdentificationMode,onValueChange:e=>{(e===`artwork`||e===`pill`||e===`none`)&&h({environmentIdentificationMode:e})},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Environment identification`,children:(0,$.jsx)(me,{children:lo[m.environmentIdentificationMode]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(lo).map(No)})]})}):null,e[59]=m.environmentIdentificationMode,e[60]=v,e[61]=h,e[62]=ae):ae=e[62];let oe;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(oe=X(`diff-color-scheme`),e[63]=oe):oe=e[63];let se;e[64]!==m.diffColorScheme||e[65]!==h?(se=m.diffColorScheme===c.diffColorScheme?null:(0,$.jsx)(Y,{label:`diff colors`,onClick:()=>h({diffColorScheme:c.diffColorScheme})}),e[64]=m.diffColorScheme,e[65]=h,e[66]=se):se=e[66];let ce;e[67]===h?ce=e[68]:(ce=e=>{(e===`red-green`||e===`blue-orange`)&&h({diffColorScheme:e})},e[67]=h,e[68]=ce);let le=m.diffColorScheme===`blue-orange`?`flex shrink-0 flex-row-reverse gap-1`:`flex shrink-0 gap-1`,ue,de;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-deletion`}),de=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-addition`}),e[69]=ue,e[70]=de):(ue=e[69],de=e[70]);let fe;e[71]===le?fe=e[72]:(fe=(0,$.jsxs)(`span`,{"aria-hidden":`true`,className:le,children:[ue,de]}),e[71]=le,e[72]=fe);let pe=m.diffColorScheme===`blue-orange`?`Blue & orange`:`Red & green`,he;e[73]===pe?he=e[74]:(he=(0,$.jsx)(me,{children:pe}),e[73]=pe,e[74]=he);let _e;e[75]!==fe||e[76]!==he?(_e=(0,$.jsxs)(K,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Diff colors`,children:[fe,he]}),e[75]=fe,e[76]=he,e[77]=_e):_e=e[77];let ve;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`red-green`,children:`Red & green (default)`}),(0,$.jsx)(G,{value:`blue-orange`,children:`Blue & orange`})]}),e[78]=ve):ve=e[78];let ye;e[79]!==m.diffColorScheme||e[80]!==ce||e[81]!==_e?(ye=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(q,{value:m.diffColorScheme,onValueChange:ce,children:[_e,ve]})}),e[79]=m.diffColorScheme,e[80]=ce,e[81]=_e,e[82]=ye):ye=e[82];let be;e[83]!==se||e[84]!==ye?(be=(0,$.jsx)(J,{...oe,description:`Choose colors for additions and deletions, including change counts.`,resetAction:se,control:ye}),e[83]=se,e[84]=ye,e[85]=be):be=e[85];let xe;e[86]===Symbol.for(`react.memo_cache_sentinel`)?(xe=X(`composer-context`),e[86]=xe):xe=e[86];let Ce;e[87]!==m.persistComposerContextStrip||e[88]!==h?(Ce=m.persistComposerContextStrip===c.persistComposerContextStrip?null:(0,$.jsx)(Y,{label:`composer context`,onClick:()=>h({persistComposerContextStrip:c.persistComposerContextStrip})}),e[87]=m.persistComposerContextStrip,e[88]=h,e[89]=Ce):Ce=e[89];let we;e[90]===h?we=e[91]:(we=e=>h({persistComposerContextStrip:!!e}),e[90]=h,e[91]=we);let Te;e[92]!==m.persistComposerContextStrip||e[93]!==we?(Te=(0,$.jsx)(Fn,{checked:m.persistComposerContextStrip,onCheckedChange:we,"aria-label":`Keep composer context visible in active threads`}),e[92]=m.persistComposerContextStrip,e[93]=we,e[94]=Te):Te=e[94];let Ee;e[95]!==Ce||e[96]!==Te?(Ee=(0,$.jsx)(J,{...xe,description:`Keep branch and worktree controls below the composer after a thread starts.`,resetAction:Ce,control:Te}),e[95]=Ce,e[96]=Te,e[97]=Ee):Ee=e[97];let De;e[98]===Symbol.for(`react.memo_cache_sentinel`)?(De=X(`chat-width`),e[98]=De):De=e[98];let Oe;e[99]!==m.chatWidth||e[100]!==h?(Oe=m.chatWidth===c.chatWidth?null:(0,$.jsx)(Y,{label:`chat width`,onClick:()=>h({chatWidth:c.chatWidth})}),e[99]=m.chatWidth,e[100]=h,e[101]=Oe):Oe=e[101];let ke;e[102]===h?ke=e[103]:(ke=e=>{(e===`comfortable`||e===`wide`||e===`full`)&&h({chatWidth:e})},e[102]=h,e[103]=ke);let Ae=go[m.chatWidth],je;e[104]===Ae?je=e[105]:(je=(0,$.jsx)(K,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Chat width`,children:(0,$.jsx)(me,{children:Ae})}),e[104]=Ae,e[105]=je);let Me;e[106]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`comfortable`,children:`Comfortable (default)`}),(0,$.jsx)(G,{value:`wide`,children:`Wide`}),(0,$.jsx)(G,{value:`full`,children:`Full`})]}),e[106]=Me):Me=e[106];let Ne;e[107]!==m.chatWidth||e[108]!==ke||e[109]!==je?(Ne=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(q,{value:m.chatWidth,onValueChange:ke,children:[je,Me]})}),e[107]=m.chatWidth,e[108]=ke,e[109]=je,e[110]=Ne):Ne=e[110];let Pe;e[111]!==Oe||e[112]!==Ne?(Pe=(0,$.jsx)(J,{...De,description:`Set how wide messages and the composer can grow on large screens.`,resetAction:Oe,control:Ne}),e[111]=Oe,e[112]=Ne,e[113]=Pe):Pe=e[113];let Fe;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=X(`icon-set`),e[114]=Fe):Fe=e[114];let Ie;e[115]!==m.iconSet||e[116]!==h?(Ie=m.iconSet===c.iconSet?null:(0,$.jsx)(Y,{label:`icon set`,onClick:()=>h({iconSet:c.iconSet})}),e[115]=m.iconSet,e[116]=h,e[117]=Ie):Ie=e[117];let Le;e[118]===h?Le=e[119]:(Le=e=>{(e===`p4`||e===`lucide`)&&h({iconSet:e})},e[118]=h,e[119]=Le);let Re=_o[m.iconSet],ze;e[120]===Re?ze=e[121]:(ze=(0,$.jsx)(K,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Icon set`,children:(0,$.jsx)(me,{children:Re})}),e[120]=Re,e[121]=ze);let Be;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`p4`,children:`P4 (default)`}),(0,$.jsx)(G,{value:`lucide`,children:`Lucide`})]}),e[122]=Be):Be=e[122];let Ve;e[123]!==m.iconSet||e[124]!==Le||e[125]!==ze?(Ve=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(q,{value:m.iconSet,onValueChange:Le,children:[ze,Be]})}),e[123]=m.iconSet,e[124]=Le,e[125]=ze,e[126]=Ve):Ve=e[126];let He;e[127]!==Ie||e[128]!==Ve?(He=(0,$.jsx)(J,{...Fe,description:`Choose which icon drawings the app uses. An icon missing from one set shows the other set's drawing.`,resetAction:Ie,control:Ve}),e[127]=Ie,e[128]=Ve,e[129]=He):He=e[129];let Ue;e[130]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=X(`math-rendering`),e[130]=Ue):Ue=e[130];let We;e[131]!==m.mathRenderingEnabled||e[132]!==h?(We=m.mathRenderingEnabled===c.mathRenderingEnabled?null:(0,$.jsx)(Y,{label:`math rendering`,onClick:()=>h({mathRenderingEnabled:c.mathRenderingEnabled})}),e[131]=m.mathRenderingEnabled,e[132]=h,e[133]=We):We=e[133];let Ge;e[134]===h?Ge=e[135]:(Ge=e=>h({mathRenderingEnabled:!!e}),e[134]=h,e[135]=Ge);let Ke;e[136]!==m.mathRenderingEnabled||e[137]!==Ge?(Ke=(0,$.jsx)(Fn,{checked:m.mathRenderingEnabled,onCheckedChange:Ge,"aria-label":`Render math`}),e[136]=m.mathRenderingEnabled,e[137]=Ge,e[138]=Ke):Ke=e[138];let qe;e[139]!==We||e[140]!==Ke?(qe=(0,$.jsx)(J,{...Ue,description:`Typeset LaTeX math, such as $x^2$ or \\[x^2\\], in messages and Markdown previews. The composer keeps TeX source editable.`,resetAction:We,control:Ke}),e[139]=We,e[140]=Ke,e[141]=qe):qe=e[141];let Je;e[142]!==H||e[143]!==ie||e[144]!==ae||e[145]!==be||e[146]!==Ee||e[147]!==Pe||e[148]!==He||e[149]!==qe?(Je=(0,$.jsxs)(ln,{id:`appearance-interface`,title:`Interface`,children:[H,ie,ae,be,Ee,Pe,He,qe]}),e[142]=H,e[143]=ie,e[144]=ae,e[145]=be,e[146]=Ee,e[147]=Pe,e[148]=He,e[149]=qe,e[150]=Je):Je=e[150];let Ye;e[151]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=X(`panel-animations`),e[151]=Ye):Ye=e[151];let Xe;e[152]===m.panelAnimationDurationMs?Xe=e[153]:(Xe=(0,$.jsx)(oo,{durationMs:m.panelAnimationDurationMs}),e[152]=m.panelAnimationDurationMs,e[153]=Xe);let Ze;e[154]===m.panelAnimationDurationMs?Ze=e[155]:(Ze=(0,$.jsxs)(`output`,{className:`min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`panel-animation-duration`,children:[m.panelAnimationDurationMs,` ms`]}),e[154]=m.panelAnimationDurationMs,e[155]=Ze);let Qe;e[156]===h?Qe=e[157]:(Qe=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=0&&t<=400&&h({panelAnimationDurationMs:t})},e[156]=h,e[157]=Qe);let $e;e[158]!==N||e[159]!==m.panelAnimationDurationMs||e[160]!==Qe?($e=(0,$.jsx)(`input`,{"aria-label":`Panel animation duration`,className:`settings-slider min-w-0 flex-1`,id:`panel-animation-duration`,max:400,min:0,onChange:Qe,step:25,style:N,type:`range`,value:m.panelAnimationDurationMs}),e[158]=N,e[159]=m.panelAnimationDurationMs,e[160]=Qe,e[161]=$e):$e=e[161];let et;e[162]!==Ze||e[163]!==$e?(et=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3`,children:[Ze,$e]}),e[162]=Ze,e[163]=$e,e[164]=et):et=e[164];let tt;e[165]!==Xe||e[166]!==et?(tt=(0,$.jsxs)(`div`,{className:`grid w-full grid-cols-[5rem_minmax(0,1fr)] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_13rem] sm:gap-4`,children:[Xe,et]}),e[165]=Xe,e[166]=et,e[167]=tt):tt=e[167];let nt;e[168]!==m.panelAnimationDurationMs||e[169]!==h?(nt=m.panelAnimationDurationMs===c.panelAnimationDurationMs?null:(0,$.jsx)(Y,{label:`panel animations`,onClick:()=>h({panelAnimationDurationMs:c.panelAnimationDurationMs})}),e[168]=m.panelAnimationDurationMs,e[169]=h,e[170]=nt):nt=e[170];let rt;e[171]!==tt||e[172]!==nt?(rt=(0,$.jsx)(ln,{id:`motion`,title:`Motion`,children:(0,$.jsx)(J,{...Ye,description:`Set how fast panels open and close.`,control:tt,resetAction:nt})}),e[171]=tt,e[172]=nt,e[173]=rt):rt=e[173];let it;e[174]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,$.jsx)(Wo,{}),e[174]=it):it=e[174];let at;return e[175]!==F||e[176]!==Je||e[177]!==rt?(at=(0,$.jsxs)(sn,{children:[F,Je,rt,it]}),e[175]=F,e[176]=Je,e[177]=rt,e[178]=at):at=e[178],at}function No(e){let[t,n]=e;return(0,$.jsx)(G,{hideIndicator:!0,value:t,children:n},t)}function Po(){let e=(0,Z.c)(5),t=Zt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={sans:In(`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`)??`System default`,code:In(`"SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace`)??`System monospace`},e[0]=n):n=e[0];let r=n,i;e[1]===t.fontFamilySans?i=e[2]:(i=t.fontFamilySans.trim()||r.sans,e[1]=t.fontFamilySans,e[2]=i);let a;return e[3]===i?a=e[4]:(a={sans:r.sans,code:r.code,interfaceFamily:i},e[3]=i,e[4]=a),a}function Fo(e){let t=(0,Z.c)(18),{preview:n}=e,r=Zt(),i=tn(),a=Po(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=X(`interface-font`),t[0]=o):o=t[0];let s,l;t[1]===i?(s=t[2],l=t[3]):(s=e=>i({fontFamilySans:e}),l=()=>i({fontFamilySans:c.fontFamilySans,fontSizeInterface:c.fontSizeInterface}),t[1]=i,t[2]=s,t[3]=l);let u;t[4]===i?u=t[5]:(u=e=>i({fontSizeInterface:e}),t[4]=i,t[5]=u);let d;t[6]!==r.fontSizeInterface||t[7]!==u?(d={label:`Interface font size`,min:12,max:20,value:r.fontSizeInterface,defaultValue:c.fontSizeInterface,onChange:u},t[6]=r.fontSizeInterface,t[7]=u,t[8]=d):d=t[8];let f;t[9]===n?f=t[10]:(f=n===void 0?{}:{preview:n},t[9]=n,t[10]=f);let p;return t[11]!==a.sans||t[12]!==r.fontFamilySans||t[13]!==s||t[14]!==l||t[15]!==d||t[16]!==f?(p=(0,$.jsx)(Go,{...o,description:`Everything outside code blocks and the terminal.`,defaultFamily:a.sans,defaultValue:c.fontFamilySans,value:r.fontFamilySans,onValueChange:s,onReset:l,size:d,...f}),t[11]=a.sans,t[12]=r.fontFamilySans,t[13]=s,t[14]=l,t[15]=d,t[16]=f,t[17]=p):p=t[17],p}function Io(){let e=(0,Z.c)(16),t=Zt(),n=tn(),r=Po(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`prompt-font`),e[0]=i):i=e[0];let a,o;e[1]===n?(a=e[2],o=e[3]):(a=e=>n({fontFamilyComposer:e}),o=()=>n({fontFamilyComposer:c.fontFamilyComposer,fontSizePrompt:c.fontSizePrompt}),e[1]=n,e[2]=a,e[3]=o);let s;e[4]===n?s=e[5]:(s=e=>n({fontSizePrompt:e}),e[4]=n,e[5]=s);let l;e[6]!==t.fontSizePrompt||e[7]!==s?(l={label:`Prompt font size`,min:12,max:20,value:t.fontSizePrompt,defaultValue:c.fontSizePrompt,onChange:s},e[6]=t.fontSizePrompt,e[7]=s,e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Pr,{}),e[9]=u):u=e[9];let d;return e[10]!==r.interfaceFamily||e[11]!==t.fontFamilyComposer||e[12]!==a||e[13]!==o||e[14]!==l?(d=(0,$.jsx)(Go,{...i,description:`Only the box you write prompts in. Mono works well here.`,defaultFamily:r.interfaceFamily,defaultValue:c.fontFamilyComposer,value:t.fontFamilyComposer,onValueChange:a,onReset:o,size:l,preview:u}),e[10]=r.interfaceFamily,e[11]=t.fontFamilyComposer,e[12]=a,e[13]=o,e[14]=l,e[15]=d):d=e[15],d}function Lo(e){let t=(0,Z.c)(22),{title:n,description:r,preview:i}=e,a=r===void 0?`Code blocks, diffs, and file previews.`:r,o=Zt(),s=tn(),l=Po(),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=X(`code-font`),t[0]=u):u=t[0];let d;t[1]===n?d=t[2]:(d=n===void 0?{}:{title:n},t[1]=n,t[2]=d);let f,p;t[3]===s?(f=t[4],p=t[5]):(f=e=>s({fontFamilyCode:e}),p=()=>s({fontFamilyCode:c.fontFamilyCode,fontSizeCode:c.fontSizeCode}),t[3]=s,t[4]=f,t[5]=p);let m;t[6]===s?m=t[7]:(m=e=>s({fontSizeCode:e}),t[6]=s,t[7]=m);let h;t[8]!==o.fontSizeCode||t[9]!==m?(h={label:`Code font size`,min:10,max:18,value:o.fontSizeCode,defaultValue:c.fontSizeCode,onChange:m},t[8]=o.fontSizeCode,t[9]=m,t[10]=h):h=t[10];let g;t[11]===i?g=t[12]:(g=i??(0,$.jsx)(Br,{}),t[11]=i,t[12]=g);let _;return t[13]!==l.code||t[14]!==a||t[15]!==o.fontFamilyCode||t[16]!==d||t[17]!==f||t[18]!==p||t[19]!==h||t[20]!==g?(_=(0,$.jsx)(Go,{...u,...d,description:a,defaultFamily:l.code,defaultValue:c.fontFamilyCode,value:o.fontFamilyCode,onValueChange:f,onReset:p,requireMonospace:!0,size:h,preview:g}),t[13]=l.code,t[14]=a,t[15]=o.fontFamilyCode,t[16]=d,t[17]=f,t[18]=p,t[19]=h,t[20]=g,t[21]=_):_=t[21],_}function Ro(){let e=(0,Z.c)(22),t=Zt(),n=tn(),r=Po(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`terminal-font`),e[0]=i):i=e[0];let a=r.code,o=t.fontFamilyTerminal,s,l;e[1]===n?(s=e[2],l=e[3]):(s=e=>n({fontFamilyTerminal:e}),l=()=>n({fontFamilyTerminal:c.fontFamilyTerminal,fontSizeTerminal:c.fontSizeTerminal}),e[1]=n,e[2]=s,e[3]=l);let u;e[4]===n?u=e[5]:(u=e=>n({fontSizeTerminal:e}),e[4]=n,e[5]=u);let d;e[6]!==t.fontSizeTerminal||e[7]!==u?(d={label:`Terminal font size`,min:8,max:20,value:t.fontSizeTerminal,defaultValue:c.fontSizeTerminal,onChange:u},e[6]=t.fontSizeTerminal,e[7]=u,e[8]=d):d=e[8];let f;e[9]!==t.fontFamilyCode||e[10]!==t.fontFamilyTerminal?(f=Kn({advanced:!0,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[9]=t.fontFamilyCode,e[10]=t.fontFamilyTerminal,e[11]=f):f=e[11];let p;e[12]!==t.fontSizeTerminal||e[13]!==f?(p=(0,$.jsx)(Gr,{family:f,size:t.fontSizeTerminal}),e[12]=t.fontSizeTerminal,e[13]=f,e[14]=p):p=e[14];let m;return e[15]!==r.code||e[16]!==t.fontFamilyTerminal||e[17]!==s||e[18]!==l||e[19]!==d||e[20]!==p?(m=(0,$.jsx)(Go,{...i,description:`Terminal output, independent from code blocks and diffs.`,defaultFamily:a,defaultValue:c.fontFamilyTerminal,value:o,onValueChange:s,onReset:l,requireMonospace:!0,size:d,preview:p}),e[15]=r.code,e[16]=t.fontFamilyTerminal,e[17]=s,e[18]=l,e[19]=d,e[20]=p,e[21]=m):m=e[21],m}function zo(){let e=(0,Z.c)(12),t=Zt(),n=tn();if(!E(navigator.platform))return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`font-smoothing`),e[0]=r):r=e[0];let i;e[1]!==t.fontSmoothing||e[2]!==n?(i=t.fontSmoothing===c.fontSmoothing?null:(0,$.jsx)(Y,{label:`font smoothing`,onClick:()=>n({fontSmoothing:c.fontSmoothing})}),e[1]=t.fontSmoothing,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({fontSmoothing:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.fontSmoothing||e[7]!==a?(o=(0,$.jsx)(Fn,{checked:t.fontSmoothing,onCheckedChange:a,"aria-label":`Font smoothing`}),e[6]=t.fontSmoothing,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Use thinner grayscale text smoothing instead of the macOS default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Bo(){let e=(0,Z.c)(12),t=Zt(),n=tn(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`word-wrap`),e[0]=r):r=e[0];let i;e[1]!==t.wordWrap||e[2]!==n?(i=t.wordWrap===c.wordWrap?null:(0,$.jsx)(Y,{label:`word wrapping`,onClick:()=>n({wordWrap:c.wordWrap})}),e[1]=t.wordWrap,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({wordWrap:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.wordWrap||e[7]!==a?(o=(0,$.jsx)(Fn,{checked:t.wordWrap,onCheckedChange:a,"aria-label":`Wrap code, tables, diffs, and file previews by default`}),e[6]=t.wordWrap,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Wrap long lines in code blocks, tables, diffs, and file previews by default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Vo(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Fo,{}),(0,$.jsx)(Io,{}),(0,$.jsx)(Lo,{}),(0,$.jsx)(Ro,{}),(0,$.jsx)(zo,{})]}),e[0]=t):t=e[0],t}function Ho(){let e=(0,Z.c)(11),t=Zt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Fo,{preview:(0,$.jsx)(Pr,{})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(Br,{}),e[1]=r):r=e[1];let i;e[2]!==t.fontFamilyCode||e[3]!==t.fontFamilyTerminal?(i=Kn({advanced:!1,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[2]=t.fontFamilyCode,e[3]=t.fontFamilyTerminal,e[4]=i):i=e[4];let a;e[5]!==t.fontSizeCode||e[6]!==t.fontSizeTerminal?(a=Un({advanced:!1,code:t.fontSizeCode,terminal:t.fontSizeTerminal}),e[5]=t.fontSizeCode,e[6]=t.fontSizeTerminal,e[7]=a):a=e[7];let o;return e[8]!==i||e[9]!==a?(o=(0,$.jsxs)($.Fragment,{children:[n,(0,$.jsx)(Lo,{title:`Monospace font`,description:`Code blocks, diffs, file previews, and the terminal.`,preview:(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(Gr,{family:i,size:a})]})})]}),e[8]=i,e[9]=a,e[10]=o):o=e[10],o}var Uo=new Set([`prompt-font`,`terminal-font`,...typeof navigator<`u`&&E(navigator.platform)?[`font-smoothing`]:[]]);function Wo(){let e=(0,Z.c)(15),[t,n]=S(Dn,!1,H),r=on(),i=(0,Q.useRef)(null),a,o;e[0]!==r||e[1]!==n?(a=()=>{r!==null&&Uo.has(r)&&i.current!==r&&(i.current=r,n(!0))},o=[r,n],e[0]=r,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o);let s;e[4]===n?s=e[5]:(s=e=>n(!!e),e[4]=n,e[5]=s);let c;e[6]!==t||e[7]!==s?(c=(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-xs font-medium text-muted-foreground`,children:[`Advanced`,(0,$.jsx)(Fn,{checked:t,onCheckedChange:s,"aria-label":`Show advanced typography settings`})]}),e[6]=t,e[7]=s,e[8]=c):c=e[8];let l;e[9]===t?l=e[10]:(l=t?(0,$.jsx)(Vo,{}):(0,$.jsx)(Ho,{}),e[9]=t,e[10]=l);let u;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Bo,{}),e[11]=u):u=e[11];let d;return e[12]!==c||e[13]!==l?(d=(0,$.jsxs)(ln,{id:`typography`,title:`Typography`,headerAction:c,children:[l,u]}),e[12]=c,e[13]=l,e[14]=d):d=e[14],d}function Go({id:e,title:t,description:n,defaultFamily:r,defaultValue:i,preview:a,value:o,onValueChange:s,onReset:c,requireMonospace:l=!1,size:u}){let d=o.trim(),[f,p]=(0,Q.useState)(o),[m,h]=(0,Q.useState)(!0),g=(0,Q.useRef)(null),_=(0,Q.useRef)(o);_.current!==o&&(_.current=o,g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0)),(0,Q.useEffect)(()=>()=>{g.current!==null&&window.clearTimeout(g.current)},[]);let v=e=>kn(e)&&(!l||xn(e)),y=e=>{h(!0),(e.trim().length===0||v(e))&&s(e)},b=()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null,y(f))},x=f.trim(),S=m&&x.length>0&&x!==d,C=o!==i||u.value!==u.defaultValue?(0,$.jsx)(Y,{label:t.toLowerCase(),onClick:()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(i),h(!0),c()}}):null,w=ii(),T=(0,Q.useRef)(!1),E=w.status===`granted`?(0,$.jsx)(ai,{ariaLabel:`${t} family`,defaultFamily:r,selectedFamily:d,requireMonospace:l,initialOpen:T.current,onSelect:s}):(0,$.jsx)(At,{size:`sm`,"aria-label":`${t} family`,"aria-invalid":S||void 0,autoCapitalize:`off`,autoComplete:`off`,className:`min-w-0 flex-1`,maxLength:200,onFocus:()=>{T.current=!0,ti()},onBlur:()=>{T.current=!1,b()},onChange:e=>{let t=e.currentTarget.value;p(t),h(!1),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,y(t)},400)},onKeyDown:e=>{e.key===`Enter`&&b(),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0))},placeholder:r,spellCheck:!1,value:f}),D=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2 sm:w-auto`,children:[(0,$.jsx)(`div`,{className:`min-w-0 flex-1 sm:w-44 sm:flex-none`,children:E}),(0,$.jsxs)(q,{value:String(u.value),onValueChange:e=>{if(typeof e!=`string`)return;let t=Number(e);Number.isInteger(t)&&t>=u.min&&t<=u.max&&u.onChange(t)},children:[(0,$.jsx)(K,{size:`sm`,className:`w-22 shrink-0`,"aria-label":u.label,children:(0,$.jsxs)(me,{children:[u.value,` px`]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Array.from({length:u.max-u.min+1},(e,t)=>u.min+t).map(e=>(0,$.jsxs)(G,{hideIndicator:!0,value:String(e),children:[e,` px`]},e))})]})]});return(0,$.jsx)(J,{...e===void 0?{}:{id:e},title:t,description:n,resetAction:C,control:D,children:a})}var Ko=c.sidebarAutoSettleAfterDays??3;function qo(e){let t=(0,Z.c)(11),{value:n,onCommit:r}=e,[i,a]=(0,Q.useState)(String(n)),o,s;t[0]===n?(o=t[1],s=t[2]):(o=()=>{a(String(n))},s=[n],t[0]=n,t[1]=o,t[2]=s),(0,Q.useEffect)(o,s);let c;t[3]===r?c=t[4]:(c=e=>{a(e.target.value);let t=Number(e.target.value);Number.isInteger(t)&&t>=1&&t<=90&&r(t)},t[3]=r,t[4]=c);let l;t[5]===n?l=t[6]:(l=()=>a(String(n)),t[5]=n,t[6]=l);let u;return t[7]!==i||t[8]!==c||t[9]!==l?(u=(0,$.jsx)(At,{size:`sm`,type:`number`,min:1,max:90,className:`w-full sm:w-24`,value:i,onChange:c,onBlur:l,"aria-label":`Days of inactivity before auto-settle`}),t[7]=i,t[8]=c,t[9]=l,t[10]=u):u=t[10],u}var Jo=new Set([`legacy-plan-mode`,`legacy-context-window-indicator`]);function Yo(){let e=(0,Z.c)(25),t=Zt(),n=tn(),[r,i]=(0,Q.useState)(!1),a=on(),o=an(`legacy-features`),s=(0,Q.useRef)(null),c,l;e[0]===a?(c=e[1],l=e[2]):(c=()=>{a===null?s.current=null:Jo.has(a)&&s.current!==a&&(s.current=a,i(!0))},l=[a],e[0]=a,e[1]=c,e[2]=l),(0,Q.useEffect)(c,l);let u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(Jn,{className:`group flex min-h-8 w-full items-center gap-2 px-3 sm:px-4`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-normal text-foreground/70 transition-colors group-hover:text-foreground`,children:`Legacy features`}),(0,$.jsx)(C,{className:`size-4 text-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90`})]}),e[3]=u):u=e[3];let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=X(`legacy-plan-mode`),e[4]=d):d=e[4];let f;e[5]===n?f=e[6]:(f=e=>{n({planModeEnabled:!!e})},e[5]=n,e[6]=f);let p;e[7]!==t.planModeEnabled||e[8]!==f?(p=(0,$.jsx)(J,{...d,description:`Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode.`,control:(0,$.jsx)(Fn,{checked:t.planModeEnabled,onCheckedChange:f,"aria-label":`Plan mode (legacy)`})}),e[7]=t.planModeEnabled,e[8]=f,e[9]=p):p=e[9];let m;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=X(`legacy-context-window-indicator`),e[10]=m):m=e[10];let h;e[11]===n?h=e[12]:(h=e=>n({contextWindowMeterEnabled:!!e}),e[11]=n,e[12]=h);let g;e[13]!==t.contextWindowMeterEnabled||e[14]!==h?(g=(0,$.jsx)(J,{...m,description:`Shows context window usage as a circular indicator in the composer.`,control:(0,$.jsx)(Fn,{checked:t.contextWindowMeterEnabled,onCheckedChange:h,"aria-label":`Context window indicator (legacy)`})}),e[13]=t.contextWindowMeterEnabled,e[14]=h,e[15]=g):g=e[15];let _;e[16]!==p||e[17]!==g?(_=(0,$.jsx)(Vn,{children:(0,$.jsxs)(Qt,{children:[p,g]})}),e[16]=p,e[17]=g,e[18]=_):_=e[18];let v;e[19]!==r||e[20]!==_?(v=(0,$.jsxs)(Nn,{open:r,onOpenChange:i,children:[u,_]}),e[19]=r,e[20]=_,e[21]=v):v=e[21];let y;return e[22]!==v||e[23]!==o?(y=(0,$.jsx)(`section`,{id:`legacy-features`,ref:o,tabIndex:-1,className:`space-y-2.5`,children:v}),e[22]=v,e[23]=o,e[24]=y):y=e[24],y}function Xo(){let e=(0,Z.c)(496),t=E(navigator.platform)?`⌘`:`Ctrl`,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[{value:`enter`,label:`Enter`},{value:`mod-enter-multiline`,label:`${t} + Enter for multiline prompts`},{value:`mod-enter`,label:`${t} + Enter always`}],e[0]=n):n=e[0];let r=n,i=Zt(),a=tn(),o=ye(),{scope:l,environment:u,connectedEnvironments:f,target:g,targets:b}=rn(),S;e[1]!==i||e[2]!==b?(S=b.length>0?b:[{settings:i}],e[1]=i,e[2]=b,e[3]=S):S=e[3];let C;e[4]===S?C=e[5]:(C=nn(S),e[4]=S,e[5]=C);let w=C,D=u?.environmentId??null,O=l.environmentIds.length===1&&D!==null,k=f.length>0,[j,M]=(0,Q.useState)(!1),P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=[`compressMode`],e[6]=P):P=e[6];let F=$t(P),I;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=[`responseStreamingMode`],e[7]=I):I=e[7];let z=$t(I),B;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(B=ur(),e[8]=B):B=e[8];let H=(0,Q.useRef)(B),ee=u?.serverConfig?.providers??ke,W;e[9]===f?W=e[10]:(W=f.length>0&&f.every(cs),e[9]=f,e[10]=W);let te=W,ne;e[11]===f?ne=e[12]:(ne=f.every(ss),e[11]=f,e[12]=ne);let re=ne,ie;e[13]===f?ie=e[14]:(ie=f.length>0&&f.every(os),e[13]=f,e[14]=ie);let ae=ie,se=ee.filter(as),ce=m(i,se),le=ce.instanceId,ue=ce.model,de=ce.options,fe=y(N(h(se),i,g?.projectId??null)),pe=fe.some(is),he=fe.find(e=>e.instanceId===le),_e=he?.driverKind??wo,xe=T(i,se,le,ue),Se;e[15]===i.textGenerationModelSelection?Se=e[16]:(Se=A(i.textGenerationModelSelection??null,c.textGenerationModelSelection??null),e[15]=i.textGenerationModelSelection,e[16]=Se);let Ce=!Se,we=ir(i,fe),Ee=Te(i),De=Ee.profile,Oe;e[17]===i?Oe=e[18]:(Oe=gr(i),e[17]=i,e[18]=Oe);let Ae=Oe,je;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(je=[`backgroundActivity`],e[19]=je):je=e[19];let Me=$t(je),Ne;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=[`addProjectBaseDirectory`],e[20]=Ne):Ne=e[20];let Pe=$t(Ne),Fe;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=[`textGenerationModelSelection`],e[21]=Fe):Fe=e[21];let Ie=$t(Fe),Le=Ae===`advanced`?`${Co} Shared policy: ${bo[De]}.`:So[Ee.profile],Re;e[22]===i.backgroundActivity?Re=e[23]:(Re=A(i.backgroundActivity,c.backgroundActivity),e[22]=i.backgroundActivity,e[23]=Re);let ze=!Re,Be=sn,Ve;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,$.jsx)(ar,{category:`general`}),e[24]=Ve):Ve=e[24];let He;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(He=X(`project-grouping`),e[25]=He):He=e[25];let Ue;e[26]!==i.sidebarProjectGroupingMode||e[27]!==a?(Ue=i.sidebarProjectGroupingMode===c.sidebarProjectGroupingMode?null:(0,$.jsx)(Y,{label:`project grouping`,onClick:()=>a({sidebarProjectGroupingMode:c.sidebarProjectGroupingMode})}),e[26]=i.sidebarProjectGroupingMode,e[27]=a,e[28]=Ue):Ue=e[28];let We;e[29]===i.sidebarProjectGroupingMode?We=e[30]:(We=lr(i.sidebarProjectGroupingMode),e[29]=i.sidebarProjectGroupingMode,e[30]=We);let Ge;e[31]!==i.sidebarProjectGroupingMode||e[32]!==a?(Ge=e=>{!e&&i.sidebarProjectGroupingMode!==`separate`&&(H.current=i.sidebarProjectGroupingMode,dr(i.sidebarProjectGroupingMode)),a({sidebarProjectGroupingMode:yr(e,H.current)})},e[31]=i.sidebarProjectGroupingMode,e[32]=a,e[33]=Ge):Ge=e[33];let Ke;e[34]!==We||e[35]!==Ge?(Ke=(0,$.jsx)(Fn,{checked:We,onCheckedChange:Ge,"aria-label":`Project grouping`}),e[34]=We,e[35]=Ge,e[36]=Ke):Ke=e[36];let qe;e[37]!==Ue||e[38]!==Ke?(qe=(0,$.jsx)(J,{...He,description:`Combine matching repositories across environments.`,resetAction:Ue,control:Ke}),e[37]=Ue,e[38]=Ke,e[39]=qe):qe=e[39];let Je;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(Je=X(`project-order`),e[40]=Je):Je=e[40];let Ye;e[41]!==i.sidebarProjectSortOrder||e[42]!==a?(Ye=i.sidebarProjectSortOrder===c.sidebarProjectSortOrder?null:(0,$.jsx)(Y,{label:`project order`,onClick:()=>a({sidebarProjectSortOrder:c.sidebarProjectSortOrder})}),e[41]=i.sidebarProjectSortOrder,e[42]=a,e[43]=Ye):Ye=e[43];let Xe;e[44]===a?Xe=e[45]:(Xe=e=>{mo(e)&&a({sidebarProjectSortOrder:e})},e[44]=a,e[45]=Xe);let Ze=po[i.sidebarProjectSortOrder],Qe;e[46]===Ze?Qe=e[47]:(Qe=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-44`,"aria-label":`Project order`,children:(0,$.jsx)(me,{children:Ze})}),e[46]=Ze,e[47]=Qe);let $e;e[48]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:d.literals.map(rs)}),e[48]=$e):$e=e[48];let et;e[49]!==i.sidebarProjectSortOrder||e[50]!==Xe||e[51]!==Qe?(et=(0,$.jsxs)(q,{value:i.sidebarProjectSortOrder,onValueChange:Xe,children:[Qe,$e]}),e[49]=i.sidebarProjectSortOrder,e[50]=Xe,e[51]=Qe,e[52]=et):et=e[52];let tt;e[53]!==Ye||e[54]!==et?(tt=(0,$.jsx)(J,{...Je,description:`Order of projects in the sidebar project picker and command palette.`,resetAction:Ye,control:et}),e[53]=Ye,e[54]=et,e[55]=tt):tt=e[55];let nt;e[56]===Symbol.for(`react.memo_cache_sentinel`)?(nt=X(`auto-resume-limited-threads`),e[56]=nt):nt=e[56];let rt;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(rt=[`autoResumeLimitedThreads`],e[57]=rt):rt=e[57];let it;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(it=[`autoResumeLimitedThreads`],e[58]=it):it=e[58];let at;e[59]===a?at=e[60]:(at=e=>a({autoResumeLimitedThreads:!!e}),e[59]=a,e[60]=at);let ot;e[61]!==i.autoResumeLimitedThreads||e[62]!==at?(ot=(0,$.jsx)(J,{serverScoped:!0,...nt,description:`Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation.`,settingKeys:rt,control:(0,$.jsx)(sr,{settingKeys:it,checked:i.autoResumeLimitedThreads,onCheckedChange:at,"aria-label":`Auto-resume limited threads`})}),e[61]=i.autoResumeLimitedThreads,e[62]=at,e[63]=ot):ot=e[63];let st;e[64]===Symbol.for(`react.memo_cache_sentinel`)?(st=X(`snooze-limited-threads`),e[64]=st):st=e[64];let ct;e[65]===Symbol.for(`react.memo_cache_sentinel`)?(ct=[`snoozeLimitedThreads`],e[65]=ct):ct=e[65];let lt;e[66]===Symbol.for(`react.memo_cache_sentinel`)?(lt=[`snoozeLimitedThreads`],e[66]=lt):lt=e[66];let ut;e[67]===a?ut=e[68]:(ut=e=>a({snoozeLimitedThreads:!!e}),e[67]=a,e[68]=ut);let dt;e[69]!==i.snoozeLimitedThreads||e[70]!==ut?(dt=(0,$.jsx)(J,{serverScoped:!0,...st,description:`Snooze usage-limit stops until the reported reset time. Combine with auto-resume to continue when they wake.`,settingKeys:ct,control:(0,$.jsx)(sr,{settingKeys:lt,checked:i.snoozeLimitedThreads,onCheckedChange:ut,"aria-label":`Snooze limited threads`})}),e[69]=i.snoozeLimitedThreads,e[70]=ut,e[71]=dt):dt=e[71];let ft;e[72]===Symbol.for(`react.memo_cache_sentinel`)?(ft=X(`working-shelf`),e[72]=ft):ft=e[72];let pt;e[73]!==i.sidebarWorkingShelfEnabled||e[74]!==a?(pt=i.sidebarWorkingShelfEnabled===c.sidebarWorkingShelfEnabled?null:(0,$.jsx)(Y,{label:`working section`,onClick:()=>a({sidebarWorkingShelfEnabled:c.sidebarWorkingShelfEnabled})}),e[73]=i.sidebarWorkingShelfEnabled,e[74]=a,e[75]=pt):pt=e[75];let mt;e[76]===a?mt=e[77]:(mt=e=>a({sidebarWorkingShelfEnabled:!!e}),e[76]=a,e[77]=mt);let ht;e[78]!==i.sidebarWorkingShelfEnabled||e[79]!==mt?(ht=(0,$.jsx)(Fn,{checked:i.sidebarWorkingShelfEnabled,onCheckedChange:mt,"aria-label":`Working section (beta)`}),e[78]=i.sidebarWorkingShelfEnabled,e[79]=mt,e[80]=ht):ht=e[80];let gt;e[81]!==pt||e[82]!==ht?(gt=(0,$.jsx)(J,{...ft,description:`Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you.`,resetAction:pt,control:ht}),e[81]=pt,e[82]=ht,e[83]=gt):gt=e[83];let _t;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(_t=[`idleCompaction`,`compactIdleThreads`],e[84]=_t):_t=e[84];let xt=w.mixed,Ct;e[85]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=X(`compact-idle-threads`),e[85]=Ct):Ct=e[85];let wt;e[86]!==i||e[87]!==a?(wt=_(i)===_(c)?null:(0,$.jsx)(Y,{label:`compact idle threads`,onClick:()=>a({idleCompaction:_(c)})}),e[86]=i,e[87]=a,e[88]=wt):wt=e[88];let Tt;e[89]!==w.mixed||e[90]!==i?(Tt=w.mixed?null:_(i),e[89]=w.mixed,e[90]=i,e[91]=Tt):Tt=e[91];let Et;e[92]===a?Et=e[93]:(Et=e=>{let t=x.find(t=>t.value===e);t&&a({idleCompaction:t.value})},e[92]=a,e[93]=Et);let Dt;e[94]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Compact idle threads`,children:(0,$.jsx)(me,{children:ns})}),e[94]=Dt):Dt=e[94];let Ot;e[95]===w.neverAvailable?Ot=e[96]:(Ot=x.map(e=>(0,$.jsx)(G,{hideIndicator:!0,value:e.value,disabled:e.value===`off`&&!w.neverAvailable,children:e.label},e.value)),e[95]=w.neverAvailable,e[96]=Ot);let kt;e[97]===Ot?kt=e[98]:(kt=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Ot}),e[97]=Ot,e[98]=kt);let At;e[99]!==Tt||e[100]!==Et||e[101]!==kt?(At=(0,$.jsxs)(q,{value:Tt,onValueChange:Et,children:[Dt,kt]}),e[99]=Tt,e[100]=Et,e[101]=kt,e[102]=At):At=e[102];let jt;e[103]!==w.mixed||e[104]!==wt||e[105]!==At?(jt=(0,$.jsx)(J,{serverScoped:!0,settingKeys:_t,mixed:xt,...Ct,description:`When to compact an idle Claude thread over 200,000 tokens: after you return, just before its prompt cache expires, or never. Each Claude provider can override this.`,resetAction:wt,control:At}),e[103]=w.mixed,e[104]=wt,e[105]=At,e[106]=jt):jt=e[106];let Mt;e[107]!==i.sidebarAutoSettleAfterDays||e[108]!==i.sidebarAutoSettleKeepPullRequests||e[109]!==i.sidebarAutoSettleOnMerge||e[110]!==te||e[111]!==re||e[112]!==a?(Mt=te?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleOnMerge`],...X(`auto-settle-merged-threads`),description:`Settle a thread when its pull request merges. Closed pull requests still settle automatically.`,resetAction:i.sidebarAutoSettleOnMerge===c.sidebarAutoSettleOnMerge?null:(0,$.jsx)(Y,{label:`auto-settle on merge`,onClick:()=>a({sidebarAutoSettleOnMerge:c.sidebarAutoSettleOnMerge})}),control:(0,$.jsx)(sr,{settingKeys:[`sidebarAutoSettleOnMerge`],checked:i.sidebarAutoSettleOnMerge,onCheckedChange:e=>a({sidebarAutoSettleOnMerge:!!e}),"aria-label":`Auto-settle merged threads`})}),(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],...X(`auto-settle-inactive-threads`),description:`Sidebar threads with no activity for this long settle automatically.`,resetAction:i.sidebarAutoSettleAfterDays===c.sidebarAutoSettleAfterDays?null:(0,$.jsx)(Y,{label:`auto-settle`,onClick:()=>a({sidebarAutoSettleAfterDays:c.sidebarAutoSettleAfterDays})}),control:(0,$.jsx)(sr,{settingKeys:[`sidebarAutoSettleAfterDays`],checked:i.sidebarAutoSettleAfterDays!==null,onCheckedChange:e=>a({sidebarAutoSettleAfterDays:e?Ko:null}),"aria-label":`Auto-settle inactive threads`})}),i.sidebarAutoSettleAfterDays===null?null:(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],title:X(`days-before-auto-settle`).title,description:`Any new activity un-settles a thread automatically.`,control:(0,$.jsx)(qo,{value:i.sidebarAutoSettleAfterDays,onCommit:e=>a({sidebarAutoSettleAfterDays:e})})}),i.sidebarAutoSettleAfterDays!==null&&re?(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleKeepPullRequests`],title:`Keep threads with a PR`,description:`Inactivity does not settle threads with a pull request. Merge and close still do.`,control:(0,$.jsx)(sr,{settingKeys:[`sidebarAutoSettleKeepPullRequests`],checked:i.sidebarAutoSettleKeepPullRequests,onCheckedChange:e=>a({sidebarAutoSettleKeepPullRequests:e}),"aria-label":`Keep threads with a PR`})}):null]}):null,e[107]=i.sidebarAutoSettleAfterDays,e[108]=i.sidebarAutoSettleKeepPullRequests,e[109]=i.sidebarAutoSettleOnMerge,e[110]=te,e[111]=re,e[112]=a,e[113]=Mt):Mt=e[113];let Nt;e[114]!==qe||e[115]!==tt||e[116]!==ot||e[117]!==dt||e[118]!==gt||e[119]!==jt||e[120]!==Mt?(Nt=(0,$.jsxs)(ln,{id:`organization`,title:`Organization`,children:[qe,tt,ot,dt,gt,jt,Mt]}),e[114]=qe,e[115]=tt,e[116]=ot,e[117]=dt,e[118]=gt,e[119]=jt,e[120]=Mt,e[121]=Nt):Nt=e[121];let Pt;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,$.jsx)(Sr,{}),e[122]=Pt):Pt=e[122];let Ft;e[123]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=X(`in-app-notifications`),e[123]=Ft):Ft=e[123];let It;e[124]===a?It=e[125]:(It=e=>a({inAppNotificationsEnabled:e}),e[124]=a,e[125]=It);let Lt;e[126]!==i.inAppNotificationsEnabled||e[127]!==It?(Lt=(0,$.jsx)(J,{...Ft,description:`Show a toast when another thread finishes, fails, or needs input or approval while this app has focus.`,control:(0,$.jsx)(Fn,{checked:i.inAppNotificationsEnabled,onCheckedChange:It,"aria-label":`In-app notifications`})}),e[126]=i.inAppNotificationsEnabled,e[127]=It,e[128]=Lt):Lt=e[128];let Rt;e[129]!==i.wakeScreenOnThreadEvents||e[130]!==a?(Rt=window.desktopBridge?.wakeDisplay?(0,$.jsx)(J,{...X(`wake-screen`),description:`Keep the Mac awake while threads run, and wake it when one finishes or needs you.`,control:(0,$.jsx)(Fn,{checked:i.wakeScreenOnThreadEvents,onCheckedChange:e=>a({wakeScreenOnThreadEvents:e}),"aria-label":`Auto awake`})}):null,e[129]=i.wakeScreenOnThreadEvents,e[130]=a,e[131]=Rt):Rt=e[131];let zt;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(zt=X(`time-format`),e[132]=zt):zt=e[132];let Bt;e[133]!==i.timestampFormat||e[134]!==a?(Bt=i.timestampFormat===c.timestampFormat?null:(0,$.jsx)(Y,{label:`time format`,onClick:()=>a({timestampFormat:c.timestampFormat})}),e[133]=i.timestampFormat,e[134]=a,e[135]=Bt):Bt=e[135];let Vt;e[136]===a?Vt=e[137]:(Vt=e=>{(e===`locale`||e===`12-hour`||e===`24-hour`)&&a({timestampFormat:e})},e[136]=a,e[137]=Vt);let Ht=ho[i.timestampFormat],Ut;e[138]===Ht?Ut=e[139]:(Ut=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Timestamp format`,children:(0,$.jsx)(me,{children:Ht})}),e[138]=Ht,e[139]=Ut);let Wt;e[140]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`locale`,children:ho.locale}),(0,$.jsx)(G,{hideIndicator:!0,value:`12-hour`,children:ho[`12-hour`]}),(0,$.jsx)(G,{hideIndicator:!0,value:`24-hour`,children:ho[`24-hour`]})]}),e[140]=Wt):Wt=e[140];let Gt;e[141]!==i.timestampFormat||e[142]!==Vt||e[143]!==Ut?(Gt=(0,$.jsxs)(q,{value:i.timestampFormat,onValueChange:Vt,children:[Ut,Wt]}),e[141]=i.timestampFormat,e[142]=Vt,e[143]=Ut,e[144]=Gt):Gt=e[144];let Kt;e[145]!==Bt||e[146]!==Gt?(Kt=(0,$.jsx)(J,{...zt,description:`System default follows your browser or OS clock preference.`,resetAction:Bt,control:Gt}),e[145]=Bt,e[146]=Gt,e[147]=Kt):Kt=e[147];let qt,Jt;e[148]===Symbol.for(`react.memo_cache_sentinel`)?(qt=[`compressMode`],Jt=X(`response-compression`),e[148]=qt,e[149]=Jt):(qt=e[148],Jt=e[149]);let Yt=F?null:i.compressMode,Xt;e[150]===a?Xt=e[151]:(Xt=e=>{L.literals.some(t=>t===e)&&a({compressMode:e})},e[150]=a,e[151]=Xt);let Qt;e[152]===Symbol.for(`react.memo_cache_sentinel`)?(Qt=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response compression`,children:(0,$.jsx)(me,{children:ts})}),e[152]=Qt):Qt=e[152];let en;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(en=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:L.literals.map(es)}),e[153]=en):en=e[153];let an;e[154]!==Yt||e[155]!==Xt?(an=(0,$.jsx)(J,{serverScoped:!0,settingKeys:qt,...Jt,description:`Response style for all threads on this server, starting next turn. Code and saved documents retain normal prose.`,control:(0,$.jsxs)(q,{value:Yt,onValueChange:Xt,children:[Qt,en]})}),e[154]=Yt,e[155]=Xt,e[156]=an):an=e[156];let on,dn;e[157]===Symbol.for(`react.memo_cache_sentinel`)?(on=[`responseStreamingMode`],dn=X(`response-streaming`),e[157]=on,e[158]=dn):(on=e[157],dn=e[158]);let fn=z?`The selected targets use different streaming modes.`:fo[i.responseStreamingMode],mn;e[159]!==i.responseStreamingMode||e[160]!==a?(mn=i.responseStreamingMode===c.responseStreamingMode?null:(0,$.jsx)(Y,{label:`response streaming`,onClick:()=>a({responseStreamingMode:c.responseStreamingMode})}),e[159]=i.responseStreamingMode,e[160]=a,e[161]=mn):mn=e[161];let hn=z?null:i.responseStreamingMode,gn;e[162]===a?gn=e[163]:(gn=e=>{(e===`turn`||e===`paragraph`)&&a({responseStreamingMode:e})},e[162]=a,e[163]=gn);let _n;e[164]===Symbol.for(`react.memo_cache_sentinel`)?(_n=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response streaming`,children:(0,$.jsx)(me,{children:$o})}),e[164]=_n):_n=e[164];let vn;e[165]===Symbol.for(`react.memo_cache_sentinel`)?(vn=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`turn`,children:uo.turn}),(0,$.jsx)(G,{hideIndicator:!0,value:`paragraph`,children:uo.paragraph})]}),e[165]=vn):vn=e[165];let yn;e[166]!==hn||e[167]!==gn?(yn=(0,$.jsxs)(q,{value:hn,onValueChange:gn,children:[_n,vn]}),e[166]=hn,e[167]=gn,e[168]=yn):yn=e[168];let bn;e[169]!==fn||e[170]!==mn||e[171]!==yn?(bn=(0,$.jsx)(J,{serverScoped:!0,settingKeys:on,...dn,description:fn,resetAction:mn,control:yn}),e[169]=fn,e[170]=mn,e[171]=yn,e[172]=bn):bn=e[172];let xn;e[173]===Symbol.for(`react.memo_cache_sentinel`)?(xn=X(`hide-whitespace-changes`),e[173]=xn):xn=e[173];let Sn;e[174]!==i.diffIgnoreWhitespace||e[175]!==a?(Sn=i.diffIgnoreWhitespace===c.diffIgnoreWhitespace?null:(0,$.jsx)(Y,{label:`diff whitespace changes`,onClick:()=>a({diffIgnoreWhitespace:c.diffIgnoreWhitespace})}),e[174]=i.diffIgnoreWhitespace,e[175]=a,e[176]=Sn):Sn=e[176];let Cn;e[177]===a?Cn=e[178]:(Cn=e=>a({diffIgnoreWhitespace:!!e}),e[177]=a,e[178]=Cn);let wn;e[179]!==i.diffIgnoreWhitespace||e[180]!==Cn?(wn=(0,$.jsx)(Fn,{checked:i.diffIgnoreWhitespace,onCheckedChange:Cn,"aria-label":`Hide whitespace changes by default`}),e[179]=i.diffIgnoreWhitespace,e[180]=Cn,e[181]=wn):wn=e[181];let Tn;e[182]!==Sn||e[183]!==wn?(Tn=(0,$.jsx)(J,{...xn,description:`Set whether the diff panel ignores whitespace-only edits by default.`,resetAction:Sn,control:wn}),e[182]=Sn,e[183]=wn,e[184]=Tn):Tn=e[184];let En;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(En=X(`default-diff-file-state`),e[185]=En):En=e[185];let Dn;e[186]!==i.diffFilesCollapsed||e[187]!==a?(Dn=i.diffFilesCollapsed===c.diffFilesCollapsed?null:(0,$.jsx)(Y,{label:`default diff file state`,onClick:()=>a({diffFilesCollapsed:c.diffFilesCollapsed})}),e[186]=i.diffFilesCollapsed,e[187]=a,e[188]=Dn):Dn=e[188];let On=i.diffFilesCollapsed?`collapsed`:`expanded`,kn;e[189]===a?kn=e[190]:(kn=e=>{(e===`expanded`||e===`collapsed`)&&a({diffFilesCollapsed:e===`collapsed`})},e[189]=a,e[190]=kn);let An=i.diffFilesCollapsed?`Collapsed`:`Expanded`,jn;e[191]===An?jn=e[192]:(jn=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Default diff file state`,children:(0,$.jsx)(me,{children:An})}),e[191]=An,e[192]=jn);let Mn;e[193]===Symbol.for(`react.memo_cache_sentinel`)?(Mn=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`expanded`,children:`Expanded`}),(0,$.jsx)(G,{hideIndicator:!0,value:`collapsed`,children:`Collapsed`})]}),e[193]=Mn):Mn=e[193];let Nn;e[194]!==On||e[195]!==kn||e[196]!==jn?(Nn=(0,$.jsxs)(q,{value:On,onValueChange:kn,children:[jn,Mn]}),e[194]=On,e[195]=kn,e[196]=jn,e[197]=Nn):Nn=e[197];let Pn;e[198]!==Nn||e[199]!==Dn?(Pn=(0,$.jsx)(J,{...En,description:`Start with files expanded or collapsed when opening diffs or a pull request's Code tab.`,resetAction:Dn,control:Nn}),e[198]=Nn,e[199]=Dn,e[200]=Pn):Pn=e[200];let In;e[201]===Symbol.for(`react.memo_cache_sentinel`)?(In=X(`diff-layout`),e[201]=In):In=e[201];let Ln;e[202]!==i.diffLayout||e[203]!==a?(Ln=i.diffLayout===c.diffLayout?null:(0,$.jsx)(Y,{label:`diff layout`,onClick:()=>a({diffLayout:c.diffLayout})}),e[202]=i.diffLayout,e[203]=a,e[204]=Ln):Ln=e[204];let Rn;e[205]===a?Rn=e[206]:(Rn=e=>{(e===`stacked`||e===`split`)&&a({diffLayout:e})},e[205]=a,e[206]=Rn);let zn=vo[i.diffLayout],Bn;e[207]===zn?Bn=e[208]:(Bn=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Diff layout`,children:(0,$.jsx)(me,{children:zn})}),e[207]=zn,e[208]=Bn);let Vn;e[209]===Symbol.for(`react.memo_cache_sentinel`)?(Vn=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`stacked`,children:vo.stacked}),(0,$.jsx)(G,{hideIndicator:!0,value:`split`,children:vo.split})]}),e[209]=Vn):Vn=e[209];let Hn;e[210]!==i.diffLayout||e[211]!==Rn||e[212]!==Bn?(Hn=(0,$.jsxs)(q,{value:i.diffLayout,onValueChange:Rn,children:[Bn,Vn]}),e[210]=i.diffLayout,e[211]=Rn,e[212]=Bn,e[213]=Hn):Hn=e[213];let Un;e[214]!==Ln||e[215]!==Hn?(Un=(0,$.jsx)(J,{...In,description:`Show diffs stacked or side by side. The toggle in the diff toolbar changes this too.`,resetAction:Ln,control:Hn}),e[214]=Ln,e[215]=Hn,e[216]=Un):Un=e[216];let Wn;e[217]===Symbol.for(`react.memo_cache_sentinel`)?(Wn=X(`proactive-panels`),e[217]=Wn):Wn=e[217];let Gn;e[218]!==i.proactivePanelsEnabled||e[219]!==a?(Gn=i.proactivePanelsEnabled===c.proactivePanelsEnabled?null:(0,$.jsx)(Y,{label:`proactive panels`,onClick:()=>a({proactivePanelsEnabled:c.proactivePanelsEnabled})}),e[218]=i.proactivePanelsEnabled,e[219]=a,e[220]=Gn):Gn=e[220];let Kn;e[221]===a?Kn=e[222]:(Kn=e=>a({proactivePanelsEnabled:!!e}),e[221]=a,e[222]=Kn);let qn;e[223]!==i.proactivePanelsEnabled||e[224]!==Kn?(qn=(0,$.jsx)(Fn,{checked:i.proactivePanelsEnabled,onCheckedChange:Kn,"aria-label":`Proactive panels`}),e[223]=i.proactivePanelsEnabled,e[224]=Kn,e[225]=qn):qn=e[225];let Jn;e[226]!==Gn||e[227]!==qn?(Jn=(0,$.jsx)(J,{...Wn,description:`Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines.`,resetAction:Gn,control:qn}),e[226]=Gn,e[227]=qn,e[228]=Jn):Jn=e[228];let Xn;e[229]===Symbol.for(`react.memo_cache_sentinel`)?(Xn=X(`skills-in-slash-menu`),e[229]=Xn):Xn=e[229];let Zn;e[230]!==i.showSkillsInSlashMenu||e[231]!==a?(Zn=i.showSkillsInSlashMenu===c.showSkillsInSlashMenu?null:(0,$.jsx)(Y,{label:`skills in slash menu`,onClick:()=>a({showSkillsInSlashMenu:c.showSkillsInSlashMenu})}),e[230]=i.showSkillsInSlashMenu,e[231]=a,e[232]=Zn):Zn=e[232];let Qn;e[233]===a?Qn=e[234]:(Qn=e=>a({showSkillsInSlashMenu:!!e}),e[233]=a,e[234]=Qn);let $n;e[235]!==i.showSkillsInSlashMenu||e[236]!==Qn?($n=(0,$.jsx)(Fn,{checked:i.showSkillsInSlashMenu,onCheckedChange:Qn,"aria-label":`Show skills in slash menu`}),e[235]=i.showSkillsInSlashMenu,e[236]=Qn,e[237]=$n):$n=e[237];let tr;e[238]!==Zn||e[239]!==$n?(tr=(0,$.jsx)(J,{...Xn,description:`Also include skills in the / command menu. Skills always appear when you type $.`,resetAction:Zn,control:$n}),e[238]=Zn,e[239]=$n,e[240]=tr):tr=e[240];let nr;e[241]===Symbol.for(`react.memo_cache_sentinel`)?(nr=X(`composer-rich-text`),e[241]=nr):nr=e[241];let cr;e[242]!==i.composerRichTextEnabled||e[243]!==a?(cr=i.composerRichTextEnabled===c.composerRichTextEnabled?null:(0,$.jsx)(Y,{label:`rich text composer`,onClick:()=>a({composerRichTextEnabled:c.composerRichTextEnabled})}),e[242]=i.composerRichTextEnabled,e[243]=a,e[244]=cr):cr=e[244];let fr;e[245]===a?fr=e[246]:(fr=e=>a({composerRichTextEnabled:!!e}),e[245]=a,e[246]=fr);let pr;e[247]!==i.composerRichTextEnabled||e[248]!==fr?(pr=(0,$.jsx)(Fn,{checked:i.composerRichTextEnabled,onCheckedChange:fr,"aria-label":`Rich text composer`}),e[247]=i.composerRichTextEnabled,e[248]=fr,e[249]=pr):pr=e[249];let mr;e[250]!==cr||e[251]!==pr?(mr=(0,$.jsx)(J,{...nr,description:`Show formatted Markdown as you type.`,resetAction:cr,control:pr}),e[250]=cr,e[251]=pr,e[252]=mr):mr=e[252];let hr;e[253]===Symbol.for(`react.memo_cache_sentinel`)?(hr=X(`composer-collapse`),e[253]=hr):hr=e[253];let _r;e[254]!==i.composerCollapseOnScroll||e[255]!==a?(_r=i.composerCollapseOnScroll===c.composerCollapseOnScroll?null:(0,$.jsx)(Y,{label:`collapse composer on scroll`,onClick:()=>a({composerCollapseOnScroll:c.composerCollapseOnScroll})}),e[254]=i.composerCollapseOnScroll,e[255]=a,e[256]=_r):_r=e[256];let vr;e[257]===a?vr=e[258]:(vr=e=>a({composerCollapseOnScroll:!!e}),e[257]=a,e[258]=vr);let br;e[259]!==i.composerCollapseOnScroll||e[260]!==vr?(br=(0,$.jsx)(Fn,{checked:i.composerCollapseOnScroll,onCheckedChange:vr,"aria-label":`Collapse composer on scroll`}),e[259]=i.composerCollapseOnScroll,e[260]=vr,e[261]=br):br=e[261];let xr;e[262]!==_r||e[263]!==br?(xr=(0,$.jsx)(J,{...hr,description:`Rest the composer of an existing thread into a single line when you scroll the conversation. Focus the composer or start typing to expand it again.`,resetAction:_r,control:br}),e[262]=_r,e[263]=br,e[264]=xr):xr=e[264];let Cr;e[265]===Symbol.for(`react.memo_cache_sentinel`)?(Cr=X(`send-shortcut`),e[265]=Cr):Cr=e[265];let wr;e[266]!==i.sendShortcut||e[267]!==a?(wr=i.sendShortcut===c.sendShortcut?null:(0,$.jsx)(Y,{label:`send shortcut`,onClick:()=>a({sendShortcut:c.sendShortcut})}),e[266]=i.sendShortcut,e[267]=a,e[268]=wr):wr=e[268];let Tr;e[269]===a?Tr=e[270]:(Tr=e=>{let t=r.find(t=>t.value===e);t&&a({sendShortcut:t.value})},e[269]=a,e[270]=Tr);let Er=r.find(e=>e.value===i.sendShortcut)?.label,Dr;e[271]===Er?Dr=e[272]:(Dr=(0,$.jsx)(K,{size:`sm`,className:`w-auto min-w-0 max-w-full`,"aria-label":`Send shortcut`,children:(0,$.jsx)(me,{children:Er})}),e[271]=Er,e[272]=Dr);let Or;e[273]===i.sendShortcut?Or=e[274]:(Or=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:r.map(e=>(0,$.jsx)(G,{value:e.value,children:(0,$.jsxs)(`span`,{className:`flex items-center justify-between gap-4`,children:[e.label,i.sendShortcut===e.value&&(0,$.jsx)(s,{"aria-hidden":`true`})]})},e.value))}),e[273]=i.sendShortcut,e[274]=Or);let kr;e[275]!==i.sendShortcut||e[276]!==Tr||e[277]!==Dr||e[278]!==Or?(kr=(0,$.jsxs)(q,{value:i.sendShortcut,onValueChange:Tr,children:[Dr,Or]}),e[275]=i.sendShortcut,e[276]=Tr,e[277]=Dr,e[278]=Or,e[279]=kr):kr=e[279];let Ar;e[280]!==wr||e[281]!==kr?(Ar=(0,$.jsx)(J,{...Cr,description:`Choose when Enter sends a prompt or inserts a new line`,resetAction:wr,control:kr}),e[280]=wr,e[281]=kr,e[282]=Ar):Ar=e[282];let jr;e[283]===Symbol.for(`react.memo_cache_sentinel`)?(jr=X(`follow-up-behavior`),e[283]=jr):jr=e[283];let Mr=`Queue follow-ups while the agent runs or steer the current run. `+(i.sendShortcut===`mod-enter-multiline`?`Press ${t} + Enter for single-line prompts or ${t} + Shift + Enter for multiline prompts to do the opposite for one message.`:`Press ${t}${i.sendShortcut===`mod-enter`?` + Shift`:``} + Enter to do the opposite for one message.`),Nr;e[284]!==i.followUpBehavior||e[285]!==a?(Nr=i.followUpBehavior===c.followUpBehavior?null:(0,$.jsx)(Y,{label:`follow-up behavior`,onClick:()=>a({followUpBehavior:c.followUpBehavior})}),e[284]=i.followUpBehavior,e[285]=a,e[286]=Nr):Nr=e[286];let Pr;e[287]===a?Pr=e[288]:(Pr=e=>{(e===`queue`||e===`steer`)&&a({followUpBehavior:e})},e[287]=a,e[288]=Pr);let Fr=i.followUpBehavior===`queue`?`Queue`:`Steer`,Ir;e[289]===Fr?Ir=e[290]:(Ir=(0,$.jsx)(K,{size:`sm`,className:`w-auto min-w-0`,"aria-label":`Follow-up behavior`,children:(0,$.jsx)(me,{children:Fr})}),e[289]=Fr,e[290]=Ir);let Lr;e[291]===Symbol.for(`react.memo_cache_sentinel`)?(Lr=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`queue`,children:`Queue`}),(0,$.jsx)(G,{value:`steer`,children:`Steer`})]}),e[291]=Lr):Lr=e[291];let Rr;e[292]!==i.followUpBehavior||e[293]!==Pr||e[294]!==Ir?(Rr=(0,$.jsxs)(q,{value:i.followUpBehavior,onValueChange:Pr,children:[Ir,Lr]}),e[292]=i.followUpBehavior,e[293]=Pr,e[294]=Ir,e[295]=Rr):Rr=e[295];let zr;e[296]!==Mr||e[297]!==Nr||e[298]!==Rr?(zr=(0,$.jsx)(J,{...jr,description:Mr,resetAction:Nr,control:Rr}),e[296]=Mr,e[297]=Nr,e[298]=Rr,e[299]=zr):zr=e[299];let Br,Vr;e[300]===Symbol.for(`react.memo_cache_sentinel`)?(Br=[`enableProviderUpdateChecks`],Vr=X(`provider-update-checks`),e[300]=Br,e[301]=Vr):(Br=e[300],Vr=e[301]);let Hr;e[302]!==i.enableProviderUpdateChecks||e[303]!==a?(Hr=i.enableProviderUpdateChecks===c.enableProviderUpdateChecks?null:(0,$.jsx)(Y,{label:`provider update checks`,onClick:()=>a({enableProviderUpdateChecks:c.enableProviderUpdateChecks})}),e[302]=i.enableProviderUpdateChecks,e[303]=a,e[304]=Hr):Hr=e[304];let Ur;e[305]===Symbol.for(`react.memo_cache_sentinel`)?(Ur=[`enableProviderUpdateChecks`],e[305]=Ur):Ur=e[305];let Wr;e[306]===a?Wr=e[307]:(Wr=e=>a({enableProviderUpdateChecks:!!e}),e[306]=a,e[307]=Wr);let Gr;e[308]!==i.enableProviderUpdateChecks||e[309]!==Wr?(Gr=(0,$.jsx)(sr,{settingKeys:Ur,checked:i.enableProviderUpdateChecks,onCheckedChange:Wr,"aria-label":`Check provider versions`}),e[308]=i.enableProviderUpdateChecks,e[309]=Wr,e[310]=Gr):Gr=e[310];let Kr;e[311]!==Hr||e[312]!==Gr?(Kr=(0,$.jsx)(J,{serverScoped:!0,settingKeys:Br,...Vr,description:`Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear.`,resetAction:Hr,control:Gr}),e[311]=Hr,e[312]=Gr,e[313]=Kr):Kr=e[313];let qr;e[314]===Symbol.for(`react.memo_cache_sentinel`)?(qr=X(`continue-threads-after-server-update`),e[314]=qr):qr=e[314];let Jr;e[315]===Symbol.for(`react.memo_cache_sentinel`)?(Jr=[`continueThreadsAfterServerUpdate`],e[315]=Jr):Jr=e[315];let Yr=ae?void 0:`All selected connected environments must support restart continuation.`,Xr;e[316]!==i.continueThreadsAfterServerUpdate||e[317]!==ae||e[318]!==a?(Xr=ae&&i.continueThreadsAfterServerUpdate!==c.continueThreadsAfterServerUpdate?(0,$.jsx)(Y,{label:`continue threads after restarts`,onClick:()=>a({continueThreadsAfterServerUpdate:c.continueThreadsAfterServerUpdate})}):null,e[316]=i.continueThreadsAfterServerUpdate,e[317]=ae,e[318]=a,e[319]=Xr):Xr=e[319];let Zr;e[320]===Symbol.for(`react.memo_cache_sentinel`)?(Zr=[`continueThreadsAfterServerUpdate`],e[320]=Zr):Zr=e[320];let Qr=!ae,$r;e[321]===a?$r=e[322]:($r=e=>a({continueThreadsAfterServerUpdate:!!e}),e[321]=a,e[322]=$r);let ei;e[323]!==i.continueThreadsAfterServerUpdate||e[324]!==Qr||e[325]!==$r?(ei=(0,$.jsx)(sr,{settingKeys:Zr,checked:i.continueThreadsAfterServerUpdate,disabled:Qr,onCheckedChange:$r,"aria-label":`Continue threads after restarts`}),e[323]=i.continueThreadsAfterServerUpdate,e[324]=Qr,e[325]=$r,e[326]=ei):ei=e[326];let ti;e[327]!==Yr||e[328]!==Xr||e[329]!==ei?(ti=(0,$.jsx)(J,{...qr,serverScoped:!0,settingKeys:Jr,description:`Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments.`,status:Yr,resetAction:Xr,control:ei}),e[327]=Yr,e[328]=Xr,e[329]=ei,e[330]=ti):ti=e[330];let ni,ri;e[331]===Symbol.for(`react.memo_cache_sentinel`)?(ni=[`backgroundActivity`],ri=X(`background-activity`),e[331]=ni,e[332]=ri):(ni=e[331],ri=e[332]);let ii=ri.id,ai;e[333]===Symbol.for(`react.memo_cache_sentinel`)?(ai=X(`background-activity`),e[333]=ai):ai=e[333];let oi;e[334]===Symbol.for(`react.memo_cache_sentinel`)?(oi=(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[ai.title,(0,$.jsx)(un,{children:`This shared policy gates background work such as Git refreshes and provider health probes after their individual intervals elapse.`})]}),e[334]=oi):oi=e[334];let si;e[335]!==ze||e[336]!==a?(si=ze?(0,$.jsx)(Y,{label:`background activity`,onClick:()=>a(Eo())}):null,e[335]=ze,e[336]=a,e[337]=si):si=e[337];let ci=Me?null:Ae,li;e[338]!==O||e[339]!==a?(li=e=>{e===`advanced`?O&&M(!0):(e===`balanced`||e===`performance`||e===`battery-saver`)&&a(Do(e))},e[338]=O,e[339]=a,e[340]=li):li=e[340];let ui;e[341]===Symbol.for(`react.memo_cache_sentinel`)?(ui=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Background activity profile`,children:(0,$.jsx)(me,{children:Qo})}),e[341]=ui):ui=e[341];let di,fi,pi;e[342]===Symbol.for(`react.memo_cache_sentinel`)?(di=(0,$.jsx)(G,{hideIndicator:!0,value:`balanced`,children:bo.balanced}),fi=(0,$.jsx)(G,{hideIndicator:!0,value:`performance`,children:bo.performance}),pi=(0,$.jsx)(G,{hideIndicator:!0,value:`battery-saver`,children:bo[`battery-saver`]}),e[342]=di,e[343]=fi,e[344]=pi):(di=e[342],fi=e[343],pi=e[344]);let mi=!O,hi=O?xo.advanced:`${xo.advanced} (one environment)`,gi;e[345]!==mi||e[346]!==hi?(gi=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[di,fi,pi,(0,$.jsx)(G,{hideIndicator:!0,value:`advanced`,disabled:mi,children:hi})]}),e[345]=mi,e[346]=hi,e[347]=gi):gi=e[347];let _i;e[348]!==ci||e[349]!==li||e[350]!==gi?(_i=(0,$.jsxs)(q,{value:ci,onValueChange:li,children:[ui,gi]}),e[348]=ci,e[349]=li,e[350]=gi,e[351]=_i):_i=e[351];let vi;e[352]!==Ae||e[353]!==O?(vi=Ae===`advanced`&&O?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{size:`icon-sm`,variant:`outline`,"aria-label":`Configure advanced background activity`,onClick:()=>M(!0),children:(0,$.jsx)(V,{className:`size-4`})})}),(0,$.jsx)(bt,{side:`top`,children:`Configure background activity`})]}):null,e[352]=Ae,e[353]=O,e[354]=vi):vi=e[354];let yi=j&&O,bi;e[355]===yi?bi=e[356]:(bi=(0,$.jsx)(jo,{open:yi,onOpenChange:M}),e[355]=yi,e[356]=bi);let xi;e[357]!==_i||e[358]!==vi||e[359]!==bi?(xi=(0,$.jsxs)($.Fragment,{children:[_i,vi,bi]}),e[357]=_i,e[358]=vi,e[359]=bi,e[360]=xi):xi=e[360];let Si;e[361]!==Le||e[362]!==si||e[363]!==xi?(Si=(0,$.jsx)(J,{serverScoped:!0,settingKeys:ni,id:ii,title:oi,description:Le,resetAction:si,control:xi}),e[361]=Le,e[362]=si,e[363]=xi,e[364]=Si):Si=e[364];let Ci;e[365]!==Pn||e[366]!==Un||e[367]!==Jn||e[368]!==tr||e[369]!==mr||e[370]!==xr||e[371]!==Ar||e[372]!==zr||e[373]!==Kr||e[374]!==ti||e[375]!==Si||e[376]!==Lt||e[377]!==Rt||e[378]!==Kt||e[379]!==an||e[380]!==bn||e[381]!==Tn?(Ci=(0,$.jsxs)(ln,{id:`behavior`,title:`Behavior`,children:[Pt,Lt,Rt,Kt,an,bn,Tn,Pn,Un,Jn,tr,mr,xr,Ar,zr,Kr,ti,Si]}),e[365]=Pn,e[366]=Un,e[367]=Jn,e[368]=tr,e[369]=mr,e[370]=xr,e[371]=Ar,e[372]=zr,e[373]=Kr,e[374]=ti,e[375]=Si,e[376]=Lt,e[377]=Rt,e[378]=Kt,e[379]=an,e[380]=bn,e[381]=Tn,e[382]=Ci):Ci=e[382];let wi,Ti;e[383]===Symbol.for(`react.memo_cache_sentinel`)?(wi=[`newWorktreesStartFromOrigin`],Ti=X(`start-from-origin`),e[383]=wi,e[384]=Ti):(wi=e[383],Ti=e[384]);let Ei;e[385]!==i.newWorktreesStartFromOrigin||e[386]!==a?(Ei=i.newWorktreesStartFromOrigin===c.newWorktreesStartFromOrigin?null:(0,$.jsx)(Y,{label:`new worktrees start from origin`,onClick:()=>a({newWorktreesStartFromOrigin:c.newWorktreesStartFromOrigin})}),e[385]=i.newWorktreesStartFromOrigin,e[386]=a,e[387]=Ei):Ei=e[387];let Di;e[388]===Symbol.for(`react.memo_cache_sentinel`)?(Di=[`newWorktreesStartFromOrigin`],e[388]=Di):Di=e[388];let Oi;e[389]===a?Oi=e[390]:(Oi=e=>a({newWorktreesStartFromOrigin:!!e}),e[389]=a,e[390]=Oi);let ki;e[391]!==i.newWorktreesStartFromOrigin||e[392]!==Oi?(ki=(0,$.jsx)(sr,{settingKeys:Di,checked:i.newWorktreesStartFromOrigin,onCheckedChange:Oi,"aria-label":`Start new worktrees from origin by default`}),e[391]=i.newWorktreesStartFromOrigin,e[392]=Oi,e[393]=ki):ki=e[393];let Ai;e[394]!==Ei||e[395]!==ki?(Ai=(0,$.jsx)(J,{serverScoped:!0,settingKeys:wi,...Ti,description:`Creates the worktree from the latest matching branch on origin instead of your local branch.`,resetAction:Ei,control:ki}),e[394]=Ei,e[395]=ki,e[396]=Ai):Ai=e[396];let ji,Mi;e[397]===Symbol.for(`react.memo_cache_sentinel`)?(ji=[`addProjectBaseDirectory`],Mi=X(`add-project-starts-in`),e[397]=ji,e[398]=Mi):(ji=e[397],Mi=e[398]);let Ni;e[399]!==i.addProjectBaseDirectory||e[400]!==a?(Ni=i.addProjectBaseDirectory===c.addProjectBaseDirectory?null:(0,$.jsx)(Y,{label:`add project base directory`,onClick:()=>a({addProjectBaseDirectory:c.addProjectBaseDirectory})}),e[399]=i.addProjectBaseDirectory,e[400]=a,e[401]=Ni):Ni=e[401];let Pi=Pe?``:i.addProjectBaseDirectory,Fi;e[402]===a?Fi=e[403]:(Fi=e=>a({addProjectBaseDirectory:e}),e[402]=a,e[403]=Fi);let Ii=Pe?`Mixed`:`~/`,Li;e[404]!==Pi||e[405]!==Fi||e[406]!==Ii?(Li=(0,$.jsx)(or,{size:`sm`,className:`w-full sm:w-72`,value:Pi,onCommit:Fi,placeholder:Ii,spellCheck:!1,"aria-label":`Add project base directory`}),e[404]=Pi,e[405]=Fi,e[406]=Ii,e[407]=Li):Li=e[407];let Ri;e[408]!==Ni||e[409]!==Li?(Ri=(0,$.jsx)(J,{serverScoped:!0,settingKeys:ji,...Mi,description:`Leave empty to use "~/" when the Add Project browser opens.`,resetAction:Ni,control:Li}),e[408]=Ni,e[409]=Li,e[410]=Ri):Ri=e[410];let zi;e[411]!==Ai||e[412]!==Ri?(zi=(0,$.jsxs)(ln,{id:`projects-and-threads`,title:`Projects & threads`,children:[Ai,Ri]}),e[411]=Ai,e[412]=Ri,e[413]=zi):zi=e[413];let Bi;e[414]===Symbol.for(`react.memo_cache_sentinel`)?(Bi=X(`unpin-confirmation`),e[414]=Bi):Bi=e[414];let Vi;e[415]!==i.confirmThreadUnpin||e[416]!==a?(Vi=i.confirmThreadUnpin===c.confirmThreadUnpin?null:(0,$.jsx)(Y,{label:`unpin confirmation`,onClick:()=>a({confirmThreadUnpin:c.confirmThreadUnpin})}),e[415]=i.confirmThreadUnpin,e[416]=a,e[417]=Vi):Vi=e[417];let Hi;e[418]===a?Hi=e[419]:(Hi=e=>a({confirmThreadUnpin:!!e}),e[418]=a,e[419]=Hi);let Ui;e[420]!==i.confirmThreadUnpin||e[421]!==Hi?(Ui=(0,$.jsx)(Fn,{checked:i.confirmThreadUnpin,onCheckedChange:Hi,"aria-label":`Confirm thread unpinning`}),e[420]=i.confirmThreadUnpin,e[421]=Hi,e[422]=Ui):Ui=e[422];let Wi;e[423]!==Vi||e[424]!==Ui?(Wi=(0,$.jsx)(J,{...Bi,description:`Ask before unpinning a thread from the pinned section.`,resetAction:Vi,control:Ui}),e[423]=Vi,e[424]=Ui,e[425]=Wi):Wi=e[425];let Gi;e[426]===Symbol.for(`react.memo_cache_sentinel`)?(Gi=X(`archive-confirmation`),e[426]=Gi):Gi=e[426];let Ki;e[427]!==i.confirmThreadArchive||e[428]!==a?(Ki=i.confirmThreadArchive===c.confirmThreadArchive?null:(0,$.jsx)(Y,{label:`archive confirmation`,onClick:()=>a({confirmThreadArchive:c.confirmThreadArchive})}),e[427]=i.confirmThreadArchive,e[428]=a,e[429]=Ki):Ki=e[429];let qi;e[430]===a?qi=e[431]:(qi=e=>a({confirmThreadArchive:!!e}),e[430]=a,e[431]=qi);let Ji;e[432]!==i.confirmThreadArchive||e[433]!==qi?(Ji=(0,$.jsx)(Fn,{checked:i.confirmThreadArchive,onCheckedChange:qi,"aria-label":`Confirm thread archiving`}),e[432]=i.confirmThreadArchive,e[433]=qi,e[434]=Ji):Ji=e[434];let Yi;e[435]!==Ki||e[436]!==Ji?(Yi=(0,$.jsx)(J,{...Gi,description:`Require a second click on the inline archive action before a thread is archived.`,resetAction:Ki,control:Ji}),e[435]=Ki,e[436]=Ji,e[437]=Yi):Yi=e[437];let Xi;e[438]===Symbol.for(`react.memo_cache_sentinel`)?(Xi=X(`delete-confirmation`),e[438]=Xi):Xi=e[438];let Zi;e[439]!==i.confirmThreadDelete||e[440]!==a?(Zi=i.confirmThreadDelete===c.confirmThreadDelete?null:(0,$.jsx)(Y,{label:`delete confirmation`,onClick:()=>a({confirmThreadDelete:c.confirmThreadDelete})}),e[439]=i.confirmThreadDelete,e[440]=a,e[441]=Zi):Zi=e[441];let Qi;e[442]===a?Qi=e[443]:(Qi=e=>a({confirmThreadDelete:!!e}),e[442]=a,e[443]=Qi);let $i;e[444]!==i.confirmThreadDelete||e[445]!==Qi?($i=(0,$.jsx)(Fn,{checked:i.confirmThreadDelete,onCheckedChange:Qi,"aria-label":`Confirm thread deletion`}),e[444]=i.confirmThreadDelete,e[445]=Qi,e[446]=$i):$i=e[446];let ea;e[447]!==Zi||e[448]!==$i?(ea=(0,$.jsx)(J,{...Xi,description:`Ask before deleting a thread and its chat history.`,resetAction:Zi,control:$i}),e[447]=Zi,e[448]=$i,e[449]=ea):ea=e[449];let ta;e[450]!==i.confirmQuit||e[451]!==a?(ta=vt?(0,$.jsx)(J,{...X(`quit-confirmation`),description:`Hold mode also quits on two quick presses.`,resetAction:i.confirmQuit===c.confirmQuit?null:(0,$.jsx)(Y,{label:`quit shortcut behavior`,onClick:()=>a({confirmQuit:c.confirmQuit})}),control:(0,$.jsxs)(q,{value:i.confirmQuit,onValueChange:e=>{(e===`direct`||e===`hold`||e===`double-click`)&&a({confirmQuit:e})},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Quit shortcut behavior`,children:(0,$.jsx)(me,{children:yo[i.confirmQuit]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(yo).map(Zo)})]})}):null,e[450]=i.confirmQuit,e[451]=a,e[452]=ta):ta=e[452];let na;e[453]!==Wi||e[454]!==Yi||e[455]!==ea||e[456]!==ta?(na=(0,$.jsxs)(ln,{id:`confirmations`,title:`Confirmations`,children:[Wi,Yi,ea,ta]}),e[453]=Wi,e[454]=Yi,e[455]=ea,e[456]=ta,e[457]=na):na=e[457];let ra=ln,ia=J,aa,oa;e[458]===Symbol.for(`react.memo_cache_sentinel`)?(aa=[`textGenerationModelSelection`],oa=X(`text-generation-model`),e[458]=aa,e[459]=oa):(aa=e[458],oa=e[459]);let sa;e[460]!==k||e[461]!==Ce||e[462]!==a?(sa=k&&Ce?(0,$.jsx)(Y,{label:`text generation model`,onClick:()=>a({textGenerationModelSelection:c.textGenerationModelSelection})}):null,e[460]=k,e[461]=Ce,e[462]=a,e[463]=sa):sa=e[463];let ca=k?pe?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[(0,$.jsx)(er,{environmentId:D,activeInstanceId:le,model:ue,lockedProvider:null,instanceEntries:fe,modelOptionsByInstance:xe,triggerClassName:cn,...Ie?{triggerLabel:`Mixed`}:{},getModelDisabledReason:we,...D?{onOpenProviderSetup:e=>{o({to:`/settings/providers`,search:{environmentId:D,instanceId:e}})}}:{},onInstanceModelChange:(e,t)=>{let n=we(e,t);n?be.add({type:`error`,title:`Text generation model not saved`,description:n}):a({textGenerationModelSelection:m({...i,textGenerationModelSelection:p(e,t)},se)})}}),he?(0,$.jsx)(U,{provider:_e,models:he?.models??[],model:ue,modelOptions:de,allowPromptInjectedEffort:!1,planModeEnabled:i.planModeEnabled||v(de),triggerClassName:cn,onModelOptionsChange:e=>{a({textGenerationModelSelection:m({...i,textGenerationModelSelection:p(le,ue,e)},se)})}}):null]}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No text generation providers available.`}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Connect an environment to choose its text generation model.`}),la;e[464]!==ia||e[465]!==aa||e[466]!==oa||e[467]!==sa||e[468]!==ca?(la=(0,$.jsx)(ia,{serverScoped:!0,settingKeys:aa,...oa,description:`Used for thread titles and other generated text on connected devices with this provider. Source control can override it.`,resetAction:sa,control:ca}),e[464]=ia,e[465]=aa,e[466]=oa,e[467]=sa,e[468]=ca,e[469]=la):la=e[469];let ua;e[470]!==ra||e[471]!==la?(ua=(0,$.jsx)(ra,{id:`text-generation`,title:`Text generation`,children:la}),e[470]=ra,e[471]=la,e[472]=ua):ua=e[472];let da;e[473]===Symbol.for(`react.memo_cache_sentinel`)?(da=vt||oe?(0,$.jsx)(ko,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(Oo,{}),description:`Current version of the application.`}),pn?(0,$.jsx)(Yn,{}):null]}),e[473]=da):da=e[473];let fa;e[474]===Symbol.for(`react.memo_cache_sentinel`)?(fa=X(`privacy-policy`),e[474]=fa):fa=e[474];let pa;e[475]===Symbol.for(`react.memo_cache_sentinel`)?(pa=(0,$.jsxs)(ln,{id:`about`,title:`About`,children:[da,(0,$.jsx)(J,{...fa,description:`How we handle your data, including the anonymous usage data P4 Code collects.`,control:(0,$.jsx)(R,{render:(0,$.jsx)(`a`,{href:rr,target:`_blank`,rel:`noreferrer noopener`}),size:`sm`,variant:`outline`,children:`View policy`})})]}),e[475]=pa):pa=e[475];let ma;e[476]===Symbol.for(`react.memo_cache_sentinel`)?(ma=X(`diagnostics`),e[476]=ma):ma=e[476];let ha=O?`Inspect processes, resource use, and logs on this environment.`:`Inspect processes, resource use, and logs on one environment at a time.`,ga=D??void 0,_a;e[477]===ga?_a=e[478]:(_a=(0,$.jsx)(R,{render:(0,$.jsx)(ve,{to:`/settings/diagnostics`,search:{machine:ga}}),size:`sm`,variant:`outline`,children:`View diagnostics`}),e[477]=ga,e[478]=_a);let va;e[479]!==ha||e[480]!==_a?(va=(0,$.jsx)(J,{...ma,description:ha,control:_a}),e[479]=ha,e[480]=_a,e[481]=va):va=e[481];let ya;e[482]===Symbol.for(`react.memo_cache_sentinel`)?(ya=X(`open-source-licenses`),e[482]=ya):ya=e[482];let ba;e[483]===Symbol.for(`react.memo_cache_sentinel`)?(ba=(0,$.jsx)(J,{...ya,description:`Notices for dependencies, assets, and optional tools used by P4 Code.`,control:(0,$.jsx)(R,{render:(0,$.jsx)(ve,{to:`/settings/open-source-licenses`}),size:`sm`,variant:`outline`,children:`View licenses`})}),e[483]=ba):ba=e[483];let xa;e[484]===va?xa=e[485]:(xa=(0,$.jsxs)(ln,{title:`Diagnostics`,children:[va,ba]}),e[484]=va,e[485]=xa);let Sa;e[486]===Symbol.for(`react.memo_cache_sentinel`)?(Sa=(0,$.jsx)(Yo,{}),e[486]=Sa):Sa=e[486];let Ca;return e[487]!==Be||e[488]!==Ve||e[489]!==Ci||e[490]!==zi||e[491]!==na||e[492]!==ua||e[493]!==xa||e[494]!==Nt?(Ca=(0,$.jsxs)(Be,{children:[Ve,Nt,Ci,zi,na,ua,pa,xa,Sa]}),e[487]=Be,e[488]=Ve,e[489]=Ci,e[490]=zi,e[491]=na,e[492]=ua,e[493]=xa,e[494]=Nt,e[495]=Ca):Ca=e[495],Ca}function Zo(e){let[t,n]=e;return(0,$.jsx)(G,{hideIndicator:!0,value:t,children:n},t)}function Qo(e){return e===null?`Mixed`:xo[e]}function $o(e){return e===null?`Mixed`:uo[e]}function es(e){return(0,$.jsx)(G,{value:e,children:e===`off`?`Off`:e.charAt(0).toUpperCase()+e.slice(1)},e)}function ts(e){return e===null?`Mixed`:e===`off`?`Off`:e.charAt(0).toUpperCase()+e.slice(1)}function ns(e){return e===null?`Mixed`:x.find(t=>t.value===e)?.label}function rs(e){return(0,$.jsx)(G,{hideIndicator:!0,value:e,children:po[e]},e)}function is(e){return e.enabled&&e.isAvailable}function as(e){return e.supportsTextGeneration!==!1}function os(e){return e.serverConfig?.environment.capabilities.threadRestartContinuation===!0}function ss(e){return e.serverConfig?.environment.capabilities.threadAutoSettlementScope===!0}function cs(e){return e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}export{co as i,Xo as n,Ao as r,Mo as t};
|
|
46
|
-
//# sourceMappingURL=SettingsPanels-
|
|
44
|
+
}`,spellCheck:!1,value:r}),t[10]=n,t[11]=p,t[12]=m,t[13]=r,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==h?(g=(0,$.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-input bg-background shadow-xs/5 focus-within:border-ring focus-within:ring-3 focus-within:ring-inset focus-within:ring-ring/24`,children:[d,h]}),t[15]=d,t[16]=h,t[17]=g):g=t[17],g}function Ra({open:e,onOpenChange:t,onImported:n,onImportedMany:r}){let i=(0,Q.useRef)(null),[a,o]=(0,Q.useState)(``),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(null),_=(0,Q.useRef)(0);(0,Q.useEffect)(()=>{_.current+=1,m(!1),e&&(o(``),c(null),u(null),f(!1),g(null))},[e]);let v=(0,Q.useCallback)(async e=>{let t=Pa(e.size);if(t){u(t);return}let n=++_.current;f(!0);try{let t=await e.text();if(n!==_.current)return;o(t),c(e.name),u(null)}catch{if(n!==_.current)return;u(`Could not read that file. Paste the JSON below instead.`)}finally{n===_.current&&f(!1)}},[]),y=(0,Q.useCallback)(async e=>{let n=++_.current;f(!0);let i=[],a=[];try{for(let t of e)if(Pa(t.size))i.push(`${t.name}: too large`);else try{let e=JSON.parse(await t.text());a.push({sourceName:t.name,theme:_i(e)?xi(e):Ie(e)})}catch(e){i.push(`${t.name}: ${e instanceof Error?e.message:`not a theme file`}`)}if(n!==_.current)return;let o=[],s=[];for(let e of Si(Ci(a)))if($e().some(t=>t.id===e.id))s.push(e);else try{o.push(Ke(e))}catch(t){i.push(`${e.label}: ${t instanceof Error?t.message:`could not install`}`)}o.length>0&&r(o,{updated:!1}),i.length>0?u(i.join(` — `)):s.length>0?g(s):o.length>0&&t(!1)}finally{n===_.current&&f(!1)}},[r,t]),b=(0,Q.useCallback)(e=>{e.length!==0&&(e.length===1?v(e[0]):y(e))},[y,v]),x=(0,Q.useCallback)(()=>{let e=window.desktopBridge;e?.pickThemeFiles?e.pickThemeFiles().then(e=>{e&&e.length!==0&&b(e.map(e=>({name:e.name,size:e.size,text:()=>Promise.resolve(e.text)})))}):i.current?.click()},[b]),S=(0,Q.useCallback)(e=>{let t=[...e.currentTarget.files??[]];e.currentTarget.value=``,b(t)},[b]),C=(0,Q.useCallback)(e=>{e.preventDefault(),m(!1),b([...e.dataTransfer.files])},[b]),w=(e,t)=>{if(t&&t.toLowerCase()!==e.label.toLowerCase()){let n=Ie({version:1,name:t.slice(0,48),appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!$e().some(e=>e.id===n.id))return n}for(let t=1;t<100;t+=1){let n=Ie({version:1,name:`${e.label.slice(0,48-` (${t})`.length)} (${t})`,appearance:e.appearance,colors:e.colors,...e.variants?{variants:e.variants}:{},...e.managed?{managed:!0}:{}});if(!$e().some(e=>e.id===n.id))return n}throw Error(`Too many copies of "${e.label}".`)},T=(0,Q.useCallback)(e=>{if(!h)return;let n=[],i=[],a=h.length===1&&s?yi(s.replace(/\.[^.]+$/,``)):null;for(let t of h)try{let r=e===`update`?$e().find(e=>e.id===t.id):void 0,i=r?.collection?{...t,collection:r.collection}:t;n.push(e===`update`?Ue(i):Ke(w(t,a)))}catch(e){i.push(`${t.label}: ${e instanceof Error?e.message:`failed`}`)}n.length>0&&r(n,{updated:e===`update`}),g(null),i.length>0?u(i.join(` — `)):t(!1)},[h,s,r,t]),E=(0,Q.useCallback)(()=>{let e=Pa(a.length);if(e)u(e);else try{let e=JSON.parse(a),r=_i(e)?xi(e):Ie(e);if($e().some(e=>e.id===r.id)){u(null),g([r]);return}let i=Ke(r);if(!n(i)){try{Je(i.id)}catch{}u(`Theme added, but it could not be selected. Try again.`);return}t(!1)}catch(e){u(e instanceof Error?e.message:`That theme file is invalid.`)}},[a,n,t]);return(0,$.jsx)(Lt,{open:e,onOpenChange:e=>{e||u(null),t(e)},children:(0,$.jsxs)(It,{className:`max-w-3xl overflow-hidden`,children:[(0,$.jsx)(jt,{children:(0,$.jsx)(Mt,{children:`Add a theme`})}),(0,$.jsxs)(Pt,{children:[(0,$.jsx)(ka,{onInstalled:(e,n)=>{r(e,n),t(!1)},open:e}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,"aria-hidden":!0,children:[(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`}),(0,$.jsx)(`span`,{className:`text-muted-foreground text-2xs uppercase tracking-wider`,children:`or import a file`}),(0,$.jsx)(`div`,{className:`h-px flex-1 bg-border`})]}),(()=>{let e={onDragEnter:e=>{e.preventDefault(),m(!0)},onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||m(!1)},onDrop:C},n=(0,$.jsx)(`input`,{ref:i,accept:`.json,application/json`,className:`sr-only`,onChange:S,multiple:!0,type:`file`}),r=(e=`Choose files`)=>(0,$.jsxs)(R,{disabled:d,size:`sm`,variant:`outline`,onClick:x,children:[(0,$.jsx)(I,{}),d?`Reading…`:e]}),c=()=>(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`div`,{className:`flex items-baseline justify-between gap-3`,children:(0,$.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`theme-json-editor`,children:`Theme JSON`})}),(0,$.jsx)(La,{id:`theme-json-editor`,onChange:o,value:a})]});return h?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-muted/20 p-3`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Already installed`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:h.map(e=>e.label).join(`, `)})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(R,{size:`sm`,onClick:()=>T(`update`),children:`Update existing`}),(0,$.jsx)(R,{size:`sm`,variant:`outline`,onClick:()=>T(`copy`),children:`Keep both`}),(0,$.jsx)(R,{size:`sm`,variant:`ghost`,onClick:()=>g(null),children:`Back`}),(0,$.jsx)(R,{size:`sm`,variant:`ghost`,onClick:()=>t(!1),children:`Cancel`})]})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:W(`flex flex-wrap items-center justify-between gap-3 rounded-xl border border-dashed px-3 py-3 transition-colors`,p?`border-ring bg-accent/20`:`border-border/80 bg-muted/20`),...e,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Theme file`}),(0,$.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s??`Drop P4 Code or VS Code .json files`})]}),r(),n]}),c(),(0,$.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[(0,$.jsx)(R,{variant:`ghost`,onClick:()=>t(!1),children:`Cancel`}),(0,$.jsxs)(R,{disabled:!a.trim()||d,onClick:E,children:[(0,$.jsx)(P,{}),`Add theme`]})]})]})})(),l?(0,$.jsx)(Xt,{"aria-live":`polite`,variant:`error`,children:l}):null]})]})})}function za(e){let t=(0,Z.c)(45),{colors:n,clip:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?void 0:{clipPath:r===`left`?`polygon(0 0, calc(50% - 1px) 0, calc(50% - 1px) 100%, 0 100%)`:`polygon(calc(50% + 1px) 0, 100% 0, 100% 100%, calc(50% + 1px) 100%)`},t[0]=r,t[1]=i);let a;t[2]===n.canvas?a=t[3]:(a=(0,$.jsx)(`span`,{className:`absolute inset-0`,style:{backgroundColor:n.canvas}}),t[2]=n.canvas,t[3]=a);let o;t[4]===n.sidebar?o=t[5]:(o=(0,$.jsx)(`span`,{className:`absolute inset-y-0 left-0 w-[22%]`,style:{backgroundColor:n.sidebar,boxShadow:`inset -1px 0 0 rgb(127 127 127 / 0.25)`}}),t[4]=n.sidebar,t[5]=o);let s;t[6]===n.surface?s=t[7]:(s=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[8%] h-[8%] w-[16%] rounded-md`,style:{backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`}}),t[6]=n.surface,t[7]=s);let c;t[8]===n.accentSurface?c=t[9]:(c=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[22%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.accentSurface}}),t[8]=n.accentSurface,t[9]=c);let l;t[10]===n.messageSurface?l=t[11]:(l=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[32%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.7}}),t[10]=n.messageSurface,t[11]=l);let u;t[12]===n.messageSurface?u=t[13]:(u=(0,$.jsx)(`span`,{className:`absolute left-[3%] top-[42%] h-[7%] w-[16%] rounded-md`,style:{backgroundColor:n.messageSurface,opacity:.5}}),t[12]=n.messageSurface,t[13]=u);let d;t[14]===n.messageSurface?d=t[15]:(d=(0,$.jsx)(`span`,{className:`absolute right-[28%] top-[11%] h-[9%] w-[24%] rounded-lg`,style:{backgroundColor:n.messageSurface}}),t[14]=n.messageSurface,t[15]=d);let f;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[28%] h-[5%] w-[34%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[16]=f):f=t[16];let p;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`absolute left-[27%] top-[38%] h-[5%] w-[26%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}}),t[17]=p):p=t[17];let m;t[18]===n.surface?m=t[19]:(m={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25)`},t[18]=n.surface,t[19]=m);let h;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`block h-[26%] w-[34%] rounded-full`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`,opacity:.7}}),t[20]=h):h=t[20];let g;t[21]===n.messageAction?g=t[22]:(g=(0,$.jsx)(`span`,{className:`block aspect-square h-[58%] rounded-full`,style:{backgroundColor:n.messageAction}}),t[21]=n.messageAction,t[22]=g);let _;t[23]!==m||t[24]!==g?(_=(0,$.jsxs)(`span`,{className:`absolute bottom-[8%] left-[26%] right-[6%] flex h-[15%] items-center justify-between rounded-md px-1`,style:m,children:[h,g]}),t[23]=m,t[24]=g,t[25]=_):_=t[25];let v;t[26]===n.surface?v=t[27]:(v={backgroundColor:n.surface,boxShadow:`inset 0 0 0 1px rgb(127 127 127 / 0.25), 0 2px 5px rgb(0 0 0 / 0.14)`},t[26]=n.surface,t[27]=v);let y;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(y=[0,1,2],t[28]=y):y=t[28];let b;t[29]===n.messageAction?b=t[30]:(b=y.map(e=>(0,$.jsxs)(`span`,{className:`absolute left-[11%] right-[11%] flex items-center gap-1`,style:{top:`${10+e*30}%`,height:`20%`},children:[(0,$.jsx)(`span`,{className:`block aspect-square h-[26%] rounded-full`,style:{backgroundColor:e===0?`#34d399`:e===1?n.messageAction:`#fbbf24`,opacity:.55}}),(0,$.jsx)(`span`,{className:`block h-[30%] w-[52%] rounded-sm`,style:{backgroundColor:`rgb(127 127 127 / 0.25)`}})]},e)),t[29]=n.messageAction,t[30]=b);let x;t[31]!==v||t[32]!==b?(x=(0,$.jsx)(`span`,{className:`absolute right-[5%] top-[8%] h-[46%] w-[20%] rounded-lg`,style:v,children:b}),t[31]=v,t[32]=b,t[33]=x):x=t[33];let S;return t[34]!==i||t[35]!==_||t[36]!==x||t[37]!==a||t[38]!==o||t[39]!==s||t[40]!==c||t[41]!==l||t[42]!==u||t[43]!==d?(S=(0,$.jsxs)(`span`,{className:`absolute inset-0`,style:i,children:[a,o,s,c,l,u,d,f,p,_,x]}),t[34]=i,t[35]=_,t[36]=x,t[37]=a,t[38]=o,t[39]=s,t[40]=c,t[41]=l,t[42]=u,t[43]=d,t[44]=S):S=t[44],S}function Ba(e){let t=(0,Z.c)(7),{className:n,panes:r}=e,i;t[0]===n?i=t[1]:(i=W(`relative block w-full overflow-hidden rounded-lg border border-border/60`,n),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r.map(Va),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsx)(`span`,{"aria-hidden":!0,className:i,children:a}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Va(e){return(0,$.jsx)(za,{clip:e.clip,colors:e.colors},e.clip??`pane`)}var Ha=[ze,Re,Qe,We,Be];function Ua(e){if(e.length===0)return[];let t=e.map(e=>e.label.trim().split(/\s+/)),n=t[0],r=n.findIndex((e,n)=>t.some(t=>t[n]?.toLocaleLowerCase()!==e.toLocaleLowerCase())),i=r===-1?n.length-1:r;return e.map((e,n)=>t[n]?.slice(Math.max(0,i)).join(` `).trim()||e.label)}function Wa(e,t){let n=URL.createObjectURL(new Blob([t],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(n),3e4)}function Ga(e){let t=(0,Z.c)(7),{label:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(yt,{render:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,$.jsx)(bt,{children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(St,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Ka(e){let t=(0,Z.c)(59),{theme:n,isActive:r,onUse:i,onUseMode:a,activeModes:o,onEdit:s,onDuplicate:c,onDownload:l,onRemove:u,variantNavigation:d}=e,f;t[0]===n.previews?f=t[1]:(f=n.previews.map(qa),t[0]=n.previews,t[1]=f);let p=f,[m,h]=(0,Q.useState)(null),g,_,v,y,x,S,C,w;if(t[2]!==o||t[3]!==r||t[4]!==i||t[5]!==a||t[6]!==m||t[7]!==n.id||t[8]!==n.label||t[9]!==n.previews||t[10]!==d){let e=[`light`,`dark`].map(e=>{let t=d?.options.flatMap(t=>{let n=t.preview;return n.mode===e?[{option:t,preview:n}]:[]})??[];return{mode:e,options:t,selected:t.find(t=>{let{option:n}=t;return n.activeModes.includes(e)})??t[0]}});_=St,g=yt;let s=r&&`bg-accent/30`;t[19]===s?x=t[20]:(x=W(`cursor-pointer overflow-hidden rounded-xl border border-border/70 bg-card/60 transition-colors hover:bg-accent/10`,s),t[19]=s,t[20]=x),S=n.id,C=i,t[21]===r?w=t[22]:(w=r?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,t[21]=r,t[22]=w),v=`relative`,y=d?(0,$.jsx)(`div`,{"aria-label":`Light and dark theme variants`,className:`relative h-20`,role:`group`,onBlurCapture:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||h(null)},onKeyDown:e=>{e.key===`Escape`&&h(null)},onMouseLeave:()=>h(null),children:e.map(e=>{let{mode:t,options:n,selected:r}=e;if(!r)return null;let i=t===`light`?-52:52,a=m===t,o=r.option.activeModes.includes(t);return(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(Ga,{label:`${t===`light`?`Light`:`Dark`}: ${r.option.label}`,children:(0,$.jsxs)(`button`,{"aria-label":n.length>1?`Choose ${t} variant, ${n.length} options, currently ${r.option.label}`:`Use ${t} variant, currently ${r.option.label}`,"aria-pressed":o,className:`absolute left-1/2 top-2 z-20 flex size-14 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,style:{transform:`translateX(calc(-50% + ${i}px))`},type:`button`,onClick:e=>{e.stopPropagation(),d.onSelectAndUse(r.option.themeIndex,t)},onFocus:()=>h(t),onMouseEnter:()=>h(t),children:[(0,$.jsx)(fn,{colors:r.preview.colors,mode:r.preview.mode}),o?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 rounded-full ring-2 ring-inset ring-ring`}):null,o?(0,$.jsx)(`span`,{className:`pointer-events-none absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full border border-border/70 bg-background text-foreground shadow-sm`,children:t===`light`?(0,$.jsx)(B,{className:`size-2.5`}):(0,$.jsx)(j,{className:`size-2.5`})}):null]})}),(0,$.jsxs)(`span`,{className:`pointer-events-none absolute bottom-0 left-1/2 inline-flex max-w-24 -translate-x-1/2 items-center gap-1 text-2xs font-medium text-foreground`,style:{marginLeft:i},children:[(0,$.jsx)(`span`,{className:`truncate`,children:r.option.label}),n.length>1?(0,$.jsxs)(`span`,{className:`shrink-0 rounded-full bg-muted px-1 text-3xs text-muted-foreground`,children:[`+`,n.length-1]}):null]}),n.length>1?n.map((e,r)=>{let{option:o,preview:s}=e,c=r/(n.length-1)-.5,l=i+c*68,u=Math.abs(c)*10,f=o.activeModes.includes(t);return(0,$.jsx)(Ga,{label:`Use ${o.label} for ${t} mode`,children:(0,$.jsx)(`button`,{"aria-label":`Use ${o.label} for ${t} mode${f?`, currently active`:``}`,"aria-pressed":f,className:W(`absolute left-1/2 top-1 z-30 flex size-7 items-center justify-center rounded-full bg-background shadow-sm outline-none transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,f?`ring-2 ring-inset ring-ring`:`ring-1 ring-border/70`),style:{opacity:+!!a,pointerEvents:a?`auto`:`none`,transform:`translate(calc(-50% + ${a?l:i}px), ${a?u:28}px) scale(${a?1:.55})`,transitionDelay:a?`${r*35}ms`:`0ms`},type:`button`,onClick:e=>{e.stopPropagation(),d.onSelectAndUse(o.themeIndex,t)},onFocus:()=>h(t),onMouseEnter:()=>h(t),children:(0,$.jsx)(`span`,{className:`pointer-events-none scale-[0.43]`,children:(0,$.jsx)(fn,{colors:s.colors,mode:s.mode})})})},o.label)}):null]},t)})}):(0,$.jsx)(wn,{label:n.label,activeModes:o,onSelectMode:a,previews:n.previews}),t[2]=o,t[3]=r,t[4]=i,t[5]=a,t[6]=m,t[7]=n.id,t[8]=n.label,t[9]=n.previews,t[10]=d,t[11]=g,t[12]=_,t[13]=v,t[14]=y,t[15]=x,t[16]=S,t[17]=C,t[18]=w}else g=t[11],_=t[12],v=t[13],y=t[14],x=t[15],S=t[16],C=t[17],w=t[18];let T;t[23]!==v||t[24]!==y?(T=(0,$.jsx)(`div`,{className:v,children:y}),t[23]=v,t[24]=y,t[25]=T):T=t[25];let E=`Use ${d?`${d.collectionLabel}, ${n.label} variant`:`${n.label} theme`}${r?`, currently active`:``}`,D;t[26]===i?D=t[27]:(D=e=>{e.stopPropagation(),i()},t[26]=i,t[27]=D);let O=d?.collectionLabel??n.label,A;t[28]!==r||t[29]!==D||t[30]!==O||t[31]!==E?(A=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,$.jsx)(`button`,{"aria-label":E,"aria-pressed":r,className:`min-w-0 cursor-pointer truncate rounded-sm text-left text-sm font-medium text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card`,type:`button`,onClick:D,children:O})})}),t[28]=r,t[29]=D,t[30]=O,t[31]=E,t[32]=A):A=t[32];let N;t[33]!==l||t[34]!==c||t[35]!==s||t[36]!==u||t[37]!==n.label||t[38]!==d?(N=s||c||l||u?(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[c?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":`Duplicate ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),c()},children:(0,$.jsx)(z,{})})}),(0,$.jsx)(bt,{children:`Duplicate theme`})]}):null,s?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":`Edit ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),s()},children:(0,$.jsx)(M,{})})}),(0,$.jsx)(bt,{children:`Edit theme`})]}):null,l?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":`Export ${n.label}`,size:`icon-xs`,variant:`ghost`,onClick:e=>{e.stopPropagation(),l()},children:(0,$.jsx)(b,{})})}),(0,$.jsx)(bt,{children:`Export theme file`})]}):null,u?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{"aria-label":d?`Remove themes from ${d.collectionLabel}`:`Remove ${n.label}`,size:`icon-xs`,variant:`ghost-destructive`,onClick:e=>{e.stopPropagation(),u()},children:(0,$.jsx)(k,{})})}),(0,$.jsx)(bt,{children:d?`Remove themes`:`Remove theme`})]}):null]}):null,t[33]=l,t[34]=c,t[35]=s,t[36]=u,t[37]=n.label,t[38]=d,t[39]=N):N=t[39];let P;t[40]!==A||t[41]!==N?(P=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-3 pt-2`,children:[A,N]}),t[40]=A,t[41]=N,t[42]=P):P=t[42];let F;t[43]!==P||t[44]!==x||t[45]!==S||t[46]!==C||t[47]!==w||t[48]!==T?(F=(0,$.jsxs)(`div`,{className:x,"data-theme-library-card":S,onClick:C,style:w,children:[T,P]}),t[43]=P,t[44]=x,t[45]=S,t[46]=C,t[47]=w,t[48]=T,t[49]=F):F=t[49];let I;t[50]!==g||t[51]!==F?(I=(0,$.jsx)(g,{render:F}),t[50]=g,t[51]=F,t[52]=I):I=t[52];let L=d?`Use the first variants for light and dark`:p.length>1?`Use for both light and dark`:`Use for ${p[0]} mode only`,V;t[53]===L?V=t[54]:(V=(0,$.jsx)(bt,{children:L}),t[53]=L,t[54]=V);let H;return t[55]!==_||t[56]!==I||t[57]!==V?(H=(0,$.jsxs)(_,{children:[I,V]}),t[55]=_,t[56]=I,t[57]=V,t[58]=H):H=t[58],H}function qa(e){return e.mode}function Ja(e){let t=(0,Z.c)(49),{themes:n,activeModesFor:r,onUse:i,onUseMode:a,onDuplicate:o,onEdit:s,onDownload:c,onRemove:l}=e,u;t[0]!==r||t[1]!==n?(u=()=>{let e=n.findIndex(e=>r(e.id).length>0);return e<0?0:e},t[0]=r,t[1]=n,t[2]=u):u=t[2];let[d,f]=(0,Q.useState)(u),p=Math.min(d,n.length-1),m=n[p],h,g;if(t[3]!==p||t[4]!==d?(h=()=>{d!==p&&f(p)},g=[p,d],t[3]=p,t[4]=d,t[5]=h,t[6]=g):(h=t[5],g=t[6]),(0,Q.useEffect)(h,g),!m)return null;let _=m.collection?.label??m.label,v;if(t[7]!==r||t[8]!==_||t[9]!==c||t[10]!==o||t[11]!==s||t[12]!==l||t[13]!==i||t[14]!==a||t[15]!==m||t[16]!==n){let e=Ua(n),u;t[18]===n?u=t[19]:(u=n.find(Xa),t[18]=n,t[19]=u);let d=u,p;t[20]===n?p=t[21]:(p=n.find(Ya),t[20]=n,t[21]=p);let h=p,g;t[22]!==h||t[23]!==d||t[24]!==i||t[25]!==a||t[26]!==m||t[27]!==n.length?(g=()=>{n.length===1?i(m):(d&&a(d,`light`),h&&a(h,`dark`),f(0))},t[22]=h,t[23]=d,t[24]=i,t[25]=a,t[26]=m,t[27]=n.length,t[28]=g):g=t[28];let y=g,b;t[29]!==r||t[30]!==m.id?(b=r(m.id),t[29]=r,t[30]=m.id,t[31]=b):b=t[31];let x;t[32]!==c||t[33]!==m?(x=()=>c(m),t[32]=c,t[33]=m,t[34]=x):x=t[34];let S;t[35]!==o||t[36]!==m?(S=()=>o(m),t[35]=o,t[36]=m,t[37]=S):S=t[37];let C;t[38]!==s||t[39]!==m?(C=()=>s(m),t[38]=s,t[39]=m,t[40]=C):C=t[40];let w;t[41]!==l||t[42]!==m?(w=()=>l(m),t[41]=l,t[42]=m,t[43]=w):w=t[43];let T;t[44]!==a||t[45]!==m?(T=e=>a(m,e),t[44]=a,t[45]=m,t[46]=T):T=t[46];let E;t[47]===m?E=t[48]:(E=vn(m),t[47]=m,t[48]=E),v=(0,$.jsx)(Ka,{activeModes:b,isActive:!1,onDownload:x,onDuplicate:S,onEdit:C,onRemove:w,onUse:y,onUseMode:T,theme:E,...n.length>1?{variantNavigation:{collectionLabel:_,options:n.flatMap((t,n)=>vn(t).previews.map(i=>({themeIndex:n,label:e[n]??t.label,activeModes:r(t.id),preview:i}))),onSelectAndUse:(e,t)=>{let r=n[e];r&&(f(e),a(r,t))}}}:{}}),t[7]=r,t[8]=_,t[9]=c,t[10]=o,t[11]=s,t[12]=l,t[13]=i,t[14]=a,t[15]=m,t[16]=n,t[17]=v}else v=t[17];return v}function Ya(e){return et(e).includes(`dark`)}function Xa(e){return et(e).includes(`light`)}function Za(e){let t=(0,Z.c)(118),{theme:n,setTheme:r,appearanceMode:i,setAppearanceMode:a,customThemes:o,initialAppearance:c,refreshTheme:l,isImportOpen:u,onImportOpenChange:d,themeHalves:f,setThemeHalf:p}=e,m=zn(ao),h=Tn(),[g,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(!1),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[0]=b):b=t[0];let[x,S]=(0,Q.useState)(b),C;t[1]===x?C=t[2]:(C=new Set(x),t[1]=x,t[2]=C);let w=C,T=g?.theme,E;t[3]===g?.collectionThemes?E=t[4]:(E=g?.collectionThemes??[],t[3]=g?.collectionThemes,t[4]=E);let O=E,k=O.length>1,A=T?.collection?.label??T?.label,j=io,M=ro,N;t[5]===r?N=t[6]:(N=e=>{let t=r(e);return t||j(),t},t[5]=r,t[6]=N);let F=N,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(e,t)=>{_({theme:e,collectionThemes:t}),S(t.length>1?[]:[e.id]),y(!0)},t[7]=I):I=t[7];let L=I,z;t[8]!==i||t[9]!==F||t[10]!==p||t[11]!==n||t[12]!==x||t[13]!==g?(z=()=>{if(!g)return;let e=new Set(x);if(e.size===0)return;let t=e.has(Ge(n)?.id??``),r=Ce();if(!t||F(i===`system`?`system`:i)){for(let n of[`light`,`dark`]){let i=r[n];if(i===void 0)continue;let a=i&&e.has(i)?null:t?i:void 0;if(a!==void 0&&!p(n,a)){M();return}}try{Ne([...e])}catch{M();return}y(!1)}},t[8]=i,t[9]=F,t[10]=p,t[11]=n,t[12]=x,t[13]=g,t[14]=z):z=t[14];let B=z,V=Ge(n)?.id??null,H=f?.light??V,U=f?.dark??V,ee;t[15]!==i||t[16]!==V||t[17]!==F||t[18]!==r||t[19]!==p||t[20]!==n?(ee=(e,t)=>{let a=e===`light`?`dark`:`light`;if(t===null&&V!==null){let e=Ce()[a]??V;if(!F(i===`system`?`system`:i))return;p(a,e)||(r(n),j())}else p(e,t)||j()},t[15]=i,t[16]=V,t[17]=F,t[18]=r,t[19]=p,t[20]=n,t[21]=ee):ee=t[21];let te=ee,ne;t[22]!==U||t[23]!==c||t[24]!==H?(ne=Ge((c===`light`?H:U)??``)??null,t[22]=U,t[23]=c,t[24]=H,t[25]=ne):ne=t[25];let re=ne,ie=no,ae;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(e,t)=>{let n=ie(e);return Cn(n,t)??n.previews[0].colors},t[26]=ae):ae=t[26];let oe=ae,se;t[27]===a?se=t[28]:(se=e=>{a(e)||j()},t[27]=a,t[28]=se);let ce=se,le;t[29]===te?le=t[30]:(le=e=>t=>{t!==`system`&&te(t,e)},t[29]=te,t[30]=le);let ue=le,de;t[31]!==U||t[32]!==H?(de=e=>{let t=[];return H===e&&t.push(`light`),U===e&&t.push(`dark`),t},t[31]=U,t[32]=H,t[33]=de):de=t[33];let fe=de,pe;if(t[34]!==U||t[35]!==H){let e=e=>oe(e===`light`?H:U,e);pe=t=>(0,$.jsx)(Ba,{className:`h-[8.75rem]`,panes:t===`system`?[{clip:`left`,colors:e(`light`)},{clip:`right`,colors:e(`dark`)}]:[{colors:e(t===`dark`?`dark`:`light`)}]}),t[34]=U,t[35]=H,t[36]=pe}else pe=t[36];let G=pe,me;t[37]!==i||t[38]!==G||t[39]!==ce?(me=()=>(0,$.jsx)(`div`,{"aria-label":`Appearance mode`,className:`grid w-full grid-cols-3 gap-3`,role:`group`,children:[`system`,`light`,`dark`].map(e=>{let t=i===e;return(0,$.jsxs)(`button`,{"aria-label":e===`system`?`Follow the system appearance`:`Use ${e} mode`,"aria-pressed":t,className:W(`flex cursor-pointer flex-col items-stretch gap-1.5 rounded-xl border p-2 outline-none transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,t?`border-transparent bg-accent/30`:`border-border/70 bg-card/60 hover:bg-accent/10`),style:t?{boxShadow:`inset 0 0 0 1px var(--ring)`}:void 0,onClick:()=>ce(e),type:`button`,children:[G(e),(0,$.jsx)(`span`,{className:W(`flex items-center justify-center text-xs font-medium`,t?`text-foreground`:`text-muted-foreground`),children:e===`system`?`System`:e===`light`?`Light`:`Dark`})]},e)})}),t[37]=i,t[38]=G,t[39]=ce,t[40]=me):me=t[40];let he=me,ge,K,q,_e,ve;if(t[41]!==re?.id||t[42]!==i||t[43]!==te||t[44]!==o||t[45]!==h||t[46]!==ue||t[47]!==c||t[48]!==d||t[49]!==m||t[50]!==F||t[51]!==fe||t[52]!==he){let e=[...o.reduce(to,new Map).entries()],n=()=>(0,$.jsx)(xt,{children:(0,$.jsxs)(`div`,{className:`grid w-full gap-2`,style:{gridTemplateColumns:`repeat(auto-fit, minmax(min(100%, 16rem), 1fr))`},children:[$n.map(e=>(0,$.jsx)(Ka,{activeModes:fe(null),isActive:!1,onDuplicate:()=>m({editingThemeId:null,seedThemeId:null,seedName:`${e.label} copy`,initialAppearance:c}),onUse:()=>F(i===`system`?`system`:i),onUseMode:ue(null),theme:e},e.id)),Ha.map(e=>{let t=vn(e);return(0,$.jsx)(Ka,{activeModes:fe(e.id),isActive:!1,onDuplicate:()=>m({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:c}),onUse:()=>F(e.id),onUseMode:ue(e.id),theme:t},e.id)}),h.filter(e=>!o.some(t=>t.id===e.id)).map(e=>(0,$.jsx)(Ka,{activeModes:fe(e.id),isActive:!1,onDuplicate:()=>m({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:c}),onUse:()=>{let t=Ve(e);t===null?F(e.id):te(t,e.id)},onUseMode:ue(e.id),theme:vn(e)},e.id)),e.map(e=>{let[t,n]=e;return(0,$.jsx)(Ja,{activeModesFor:fe,onDownload:eo,onDuplicate:e=>m({editingThemeId:null,seedThemeId:e.id,seedName:`${e.label} copy`,initialAppearance:c}),onEdit:e=>m({editingThemeId:e.id,seedThemeId:null,seedName:null,initialAppearance:c}),onRemove:e=>L(e,n),onUse:e=>{let t=et(e);t.length===1?te(t[0],e.id):F(e.id)},onUseMode:(e,t)=>ue(e.id)(t),themes:n},t)})]})});ge=`space-y-3`,t[58]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsx)(`h3`,{className:`px-3 text-sm font-normal text-foreground/70 sm:px-4`,children:X(`color-scheme`).title}),t[58]=K):K=t[58],t[59]===he?q=t[60]:(q=he(),t[59]=he,t[60]=q);let r;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`h3`,{className:`text-sm font-normal text-foreground/70`,children:X(`theme`).title}),t[61]=r):r=t[61];let a;t[62]!==re?.id||t[63]!==c||t[64]!==m?(a=()=>m({editingThemeId:null,seedThemeId:re?.id??null,seedName:null,initialAppearance:c}),t[62]=re?.id,t[63]=c,t[64]=m,t[65]=a):a=t[65];let s;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(D,{}),t[66]=s):s=t[66];let l;t[67]===a?l=t[68]:(l=(0,$.jsxs)(R,{size:`xs`,variant:`outline`,onClick:a,children:[s,`Create theme`]}),t[67]=a,t[68]=l);let u;t[69]===d?u=t[70]:(u=()=>d(!0),t[69]=d,t[70]=u);let f;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(P,{}),t[71]=f):f=t[71];let p;t[72]===u?p=t[73]:(p=(0,$.jsxs)(R,{size:`xs`,variant:`outline`,onClick:u,children:[f,`Add theme`]}),t[72]=u,t[73]=p),t[74]!==l||t[75]!==p?(_e=(0,$.jsxs)(`div`,{className:`flex min-h-8 flex-wrap items-center justify-between gap-3 px-3 pt-2 sm:px-4`,children:[r,(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[l,p]})]}),t[74]=l,t[75]=p,t[76]=_e):_e=t[76],ve=n(),t[41]=re?.id,t[42]=i,t[43]=te,t[44]=o,t[45]=h,t[46]=ue,t[47]=c,t[48]=d,t[49]=m,t[50]=F,t[51]=fe,t[52]=he,t[53]=ge,t[54]=K,t[55]=q,t[56]=_e,t[57]=ve}else ge=t[53],K=t[54],q=t[55],_e=t[56],ve=t[57];let ye;t[77]===l?ye=t[78]:(ye=(e,t)=>{let{updated:n}=t;n&&l();let r=n?`updated`:`added`;be.add(je({type:`success`,title:e.length===1?`${e[0].label} ${r}`:`${e.length} themes ${r}`,description:e.map($a).join(`, `)}))},t[77]=l,t[78]=ye);let xe;t[79]!==te||t[80]!==F?(xe=e=>{let t=et(e);return t.length===1?(te(t[0],e.id),be.add(je({type:`success`,title:`${e.label} added`,description:`It’s now your ${t[0]} theme.`})),!0):F(e.id)?(be.add(je({type:`success`,title:`${e.label} added`,description:`It’s now active.`})),!0):!1},t[79]=te,t[80]=F,t[81]=xe):xe=t[81];let Se;t[82]!==u||t[83]!==d||t[84]!==ye||t[85]!==xe?(Se=(0,$.jsx)(Ra,{onImportedMany:ye,onImported:xe,onOpenChange:d,open:u}),t[82]=u,t[83]=d,t[84]=ye,t[85]=xe,t[86]=Se):Se=t[86];let we=k?`Remove themes from “${A}”?`:`Remove “${T?.label}”?`,Te;t[87]===we?Te=t[88]:(Te=(0,$.jsx)(An,{children:we}),t[87]=we,t[88]=Te);let Ee=k?`Select the variants you want to remove. You can restore them by importing the extension again.`:`You can bring it back anytime by importing its JSON file.`,De;t[89]===Ee?De=t[90]:(De=(0,$.jsx)(Gn,{children:Ee}),t[89]=Ee,t[90]=De);let Oe;t[91]!==Te||t[92]!==De?(Oe=(0,$.jsxs)(On,{children:[Te,De]}),t[91]=Te,t[92]=De,t[93]=Oe):Oe=t[93];let ke;t[94]!==k||t[95]!==O||t[96]!==w?(ke=k?(0,$.jsx)(`div`,{className:`grid max-h-72 grid-cols-1 gap-2 overflow-y-auto px-6 pb-6 sm:grid-cols-2`,children:O.map(e=>{let t=w.has(e.id),n=vn(e),r=`remove-theme-${e.id}`;return(0,$.jsxs)(`label`,{className:`group relative flex min-h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-border/70 bg-muted/25 p-3 has-checked:border-ring has-checked:bg-accent/20 hover:bg-muted/40`,htmlFor:r,children:[(0,$.jsxs)(`span`,{className:`absolute right-2 top-2 inline-grid size-5 grid-cols-1 sm:size-4`,children:[(0,$.jsx)(`input`,{checked:t,className:`col-start-1 row-start-1 size-full appearance-none rounded-sm border border-input bg-background outline-none checked:border-primary checked:bg-primary focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring checked:focus-visible:inset-ring-3 checked:focus-visible:inset-ring-background dark:not-checked:bg-input/32 forced-colors:appearance-auto`,id:r,name:`themes-to-remove`,type:`checkbox`,onChange:t=>{let n=t.currentTarget.checked;S(t=>n?[...t,e.id]:t.filter(t=>t!==e.id))}}),(0,$.jsx)(s,{className:`pointer-events-none col-start-1 row-start-1 size-3.5 shrink-0 self-center justify-self-center stroke-primary-foreground opacity-0 group-has-checked:opacity-100 sm:size-3`})]}),(0,$.jsx)(`span`,{className:`flex min-h-12 items-center justify-center gap-1`,children:n.previews.map(Qa)}),(0,$.jsx)(`p`,{className:`max-w-full truncate text-center text-base font-medium text-foreground sm:text-sm`,children:e.label})]},e.id)})}):null,t[94]=k,t[95]=O,t[96]=w,t[97]=ke):ke=t[97];let Ae;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,$.jsx)(bn,{render:(0,$.jsx)(R,{variant:`outline`}),children:`Cancel`}),t[98]=Ae):Ae=t[98];let Me=x.length===0,Pe=k?`Remove selected${x.length>0?` (${x.length})`:``}`:`Remove theme`,Fe;t[99]!==B||t[100]!==Me||t[101]!==Pe?(Fe=(0,$.jsxs)(yn,{children:[Ae,(0,$.jsx)(R,{disabled:Me,variant:`destructive`,onClick:B,children:Pe})]}),t[99]=B,t[100]=Me,t[101]=Pe,t[102]=Fe):Fe=t[102];let Ie;t[103]!==Oe||t[104]!==ke||t[105]!==Fe?(Ie=(0,$.jsxs)(En,{children:[Oe,ke,Fe]}),t[103]=Oe,t[104]=ke,t[105]=Fe,t[106]=Ie):Ie=t[106];let Le;t[107]!==v||t[108]!==Ie?(Le=(0,$.jsx)(_n,{open:v,onOpenChange:y,children:Ie}),t[107]=v,t[108]=Ie,t[109]=Le):Le=t[109];let Re;return t[110]!==ge||t[111]!==K||t[112]!==q||t[113]!==_e||t[114]!==ve||t[115]!==Se||t[116]!==Le?(Re=(0,$.jsxs)(`div`,{className:ge,children:[K,q,_e,ve,Se,Le]}),t[110]=ge,t[111]=K,t[112]=q,t[113]=_e,t[114]=ve,t[115]=Se,t[116]=Le,t[117]=Re):Re=t[117],Re}function Qa(e){return(0,$.jsx)(`span`,{className:`flex size-11 shrink-0 items-center justify-center`,children:(0,$.jsx)(`span`,{className:`flex scale-75`,children:(0,$.jsx)(fn,{colors:e.colors,mode:e.mode})})},e.mode)}function $a(e){return e.label}function eo(e){return Wa(`${e.id}.json`,Le(e))}function to(e,t){let n=t.collection?`collection:${t.collection.id}`:`theme:${t.id}`,r=e.get(n);return r?r.push(t):e.set(n,[t]),e}function no(e){if(e===null)return $n[0];let t=Ge(e);return t?vn(t):$n[0]}function ro(){be.add(je({type:`error`,title:`Couldn’t remove theme`,description:`Try again.`}))}function io(){be.add(je({type:`error`,title:`Couldn’t save theme selection`,description:`Try again.`}))}function ao(e){return e.openThemeEditor}function oo(e){let t=(0,Z.c)(22),{durationMs:n}=e,[r,i]=(0,Q.useState)(!0),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>i(so),t[0]=a):a=t[0];let o=`${n}ms`,s;t[1]===o?s=t[2]:(s={"--preview-duration":o},t[1]=o,t[2]=s);let c=s,l=r?`w-4`:`w-0`,u;t[3]===l?u=t[4]:(u=W(`h-full shrink-0 overflow-hidden rounded-md bg-sidebar`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,l),t[3]=l,t[4]=u);let d;t[5]===u?d=t[6]:(d=(0,$.jsx)(`span`,{"aria-hidden":!0,className:u}),t[5]=u,t[6]=d);let f;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(`span`,{className:`flex min-h-0 flex-1 flex-col gap-1 pt-1`,children:[(0,$.jsx)(`span`,{className:`h-0.5 w-full rounded-full bg-muted-foreground/25`}),(0,$.jsx)(`span`,{className:`h-0.5 w-4/5 rounded-full bg-muted-foreground/20`}),(0,$.jsx)(`span`,{className:`h-0.5 w-3/5 rounded-full bg-muted-foreground/15`})]}),t[7]=f):f=t[7];let p=r?`h-2 border-t border-border/70`:`h-0 border-t-0`,m;t[8]===p?m=t[9]:(m=W(`flex shrink-0 items-center overflow-hidden bg-foreground/5 px-2`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,p),t[8]=p,t[9]=m);let h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{className:`h-px w-2/3 rounded-full bg-muted-foreground/25`}),t[10]=h):h=t[10];let g;t[11]===m?g=t[12]:(g=(0,$.jsxs)(`span`,{"aria-hidden":!0,className:`flex min-w-0 flex-1 flex-col px-1`,children:[f,(0,$.jsx)(`span`,{className:m,children:h})]}),t[11]=m,t[12]=g);let _=r?`w-5`:`w-0`,v;t[13]===_?v=t[14]:(v=W(`h-full shrink-0 overflow-hidden rounded-md bg-muted`,`transition-[width,height,border-width] duration-(--preview-duration) ease-out motion-reduce:transition-none`,_),t[13]=_,t[14]=v);let y;t[15]===v?y=t[16]:(y=(0,$.jsx)(`span`,{"aria-hidden":!0,className:v}),t[15]=v,t[16]=y);let b;return t[17]!==g||t[18]!==y||t[19]!==c||t[20]!==d?(b=(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Replay panel animation preview`,className:`flex h-10 w-full cursor-pointer overflow-hidden rounded-lg border border-border bg-background p-1 shadow-xs/5 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,onClick:a,style:c,children:[d,g,y]}),t[17]=g,t[18]=y,t[19]=c,t[20]=d,t[21]=b):b=t[21],b}function so(e){return!e}function co(){let{scope:e,connectedEnvironments:t}=rn(),n=hn(),{snapshots:r,error:i,isLoading:a,refresh:o}=jn(e.environmentIds),s=Ae(t,F),[c,l]=(0,Q.useState)(``),[u,d]=(0,Q.useState)(`all`),[f,p]=(0,Q.useState)(`newest`),[m,h]=(0,Q.useState)(!1),g=(0,Q.useRef)(!1),[_,v]=(0,Q.useState)(null),y=(0,Q.useMemo)(()=>{let t=e.kind===`project`||e.kind===`checkout`?new Set(e.members.map(e=>`${e.environmentId}:${e.id}`)):null;return r.flatMap(({environmentId:e,snapshot:n})=>n.projects.flatMap(r=>{let i=`${e}:${r.id}`;if(t!==null&&!t.has(i))return[];let a=n.threads.filter(e=>e.projectId===r.id).map(t=>se(e,t));return a.length?[{key:i,project:{...r,environmentId:e},threads:a}]:[]}))},[r,e]),b=y.flatMap(e=>e.threads),x=y.some(e=>e.key===u)?u:`all`,S=y.flatMap(e=>{if(x!==`all`&&e.key!==x)return[];let t=e.threads.filter(e=>e.title.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())).toSorted((e,t)=>{if(f===`title`)return e.title.localeCompare(t.title);let n=(t.archivedAt??t.createdAt).localeCompare(e.archivedAt??e.createdAt);return f===`oldest`?-n:n});return t.length?[{...e,threads:t}]:[]}),C=!a&&!i&&e.environmentIds.every(e=>t.some(t=>t.environmentId===e)&&r.some(t=>t.environmentId===e)),w=async(t,r,i=!1)=>{if(!g.current){g.current=!0,h(!0),v(null);try{if(i&&!await we().dialogs.confirm(`Permanently delete all ${t.length} archived chats in ${e.label}? Search and project filters do not limit this action. This cannot be undone.`,{variant:`destructive`}))return;for(let e of t){let t=r===`unarchive`?await n.unarchiveThread(e):i?await n.deleteThread(e):await n.confirmAndDeleteThread(e);if(t._tag===`Failure`)throw ne(t)}}catch(e){v(e instanceof Error?e.message:`The action could not be completed. Try again.`)}finally{o(),g.current=!1,h(!1)}}};return(0,$.jsxs)(sn,{width:`wide`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Archived chats`}),(0,$.jsxs)(R,{variant:`destructive-outline`,size:`sm`,disabled:m||!C||!b.length||b.some(e=>!s.has(e.environmentId)),onClick:()=>void w(b.map(e=>O(e.environmentId,e.id)),`delete`,!0),children:[(0,$.jsx)(k,{"aria-hidden":!0}),` Delete all`]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-[minmax(0,1fr)_9rem_10rem]`,children:[(0,$.jsx)(`div`,{className:`col-span-2 min-w-0 sm:col-span-1`,children:(0,$.jsxs)(Kt,{children:[(0,$.jsx)(Wt,{children:(0,$.jsx)(te,{"aria-hidden":!0})}),(0,$.jsx)(Gt,{type:`search`,"aria-label":`Search archived chats`,placeholder:`Search archived chats`,value:c,onChange:e=>l(e.currentTarget.value)})]})}),(0,$.jsxs)(q,{value:f,onValueChange:e=>e&&p(e),children:[(0,$.jsx)(K,{"aria-label":`Sort archived chats`,children:(0,$.jsx)(me,{children:f===`newest`?`Newest first`:f===`oldest`?`Oldest first`:`By title`})}),(0,$.jsxs)(ge,{children:[(0,$.jsx)(G,{value:`newest`,children:`Newest first`}),(0,$.jsx)(G,{value:`oldest`,children:`Oldest first`}),(0,$.jsx)(G,{value:`title`,children:`By title`})]})]}),(0,$.jsxs)(q,{value:x,onValueChange:e=>e&&d(e),children:[(0,$.jsx)(K,{"aria-label":`Filter by project`,children:(0,$.jsx)(me,{children:x===`all`?`All projects`:y.find(e=>e.key===u)?.project.title??`All projects`})}),(0,$.jsxs)(ge,{children:[(0,$.jsx)(G,{value:`all`,children:`All projects`}),y.map(e=>(0,$.jsx)(G,{value:e.key,children:e.project.title},e.key))]})]})]}),_||i?(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-destructive-foreground`,children:[(0,$.jsx)(`p`,{children:_??i}),(0,$.jsx)(R,{variant:`outline`,size:`sm`,onClick:o,children:`Retry`})]}):null,S.map(({key:e,project:t,threads:n},r)=>(0,$.jsx)(ln,{id:r===0?`archive`:void 0,title:t.title,icon:(0,$.jsx)(Ut,{project:t}),headerAction:(0,$.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[n.length,` `,n.length===1?`chat`:`chats`]}),children:n.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-4`,onContextMenu:t=>{t.preventDefault(),!m&&s.has(e.environmentId)&&we().contextMenu.show([{id:`unarchive`,label:`Unarchive`},{id:`delete`,label:`Delete`,destructive:!0}],{x:t.clientX,y:t.clientY}).then(t=>{if(t===`delete`||t===`unarchive`)return w([O(e.environmentId,e.id)],t)}).catch(e=>v(e instanceof Error?e.message:`Could not open chat actions.`))},children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`break-words text-sm font-medium`,children:e.title||`Untitled chat`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:new Date(e.archivedAt??e.createdAt).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})})]}),(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{variant:`ghost-destructive`,size:`icon-sm`,"aria-label":`Delete ${e.title}`,disabled:m||!s.has(e.environmentId),onClick:()=>void w([O(e.environmentId,e.id)],`delete`),children:(0,$.jsx)(k,{"aria-hidden":!0})})}),(0,$.jsx)(bt,{children:`Delete chat`})]}),(0,$.jsx)(R,{variant:`soft`,size:`sm`,disabled:m||!s.has(e.environmentId),onClick:()=>void w([O(e.environmentId,e.id)],`unarchive`),children:`Unarchive`})]},e.id))},e)),S.length?null:(0,$.jsx)(`p`,{id:`archive`,role:`status`,className:`py-8 text-center text-sm text-muted-foreground`,children:a?`Loading archived chats…`:i?`Archived chats could not be loaded.`:b.length?`No chats match your filters.`:`No archived chats.`})]})}var lo={artwork:`Artwork`,pill:`Version pill`,none:`None`},uo={turn:`Wait for the full response`,paragraph:`Show finished paragraphs`},fo={turn:`Text appears once the agent finishes its turn.`,paragraph:`Each paragraph or code block appears as soon as it is complete.`},po={updated_at:`Last user message`,created_at:`Created at`,manual:`Manual`},mo=o(d),ho={locale:`System default`,"12-hour":`12-hour`,"24-hour":`24-hour`},go={comfortable:`Comfortable`,wide:`Wide`,full:`Full`},_o={p4:`P4`,lucide:`Lucide`},vo={stacked:`Stacked`,split:`Split`},yo={direct:`Direct`,hold:`Hold`,"double-click":`Double press`},bo={balanced:`Balanced`,performance:`Performance`,"battery-saver":`Battery saver`},xo={...bo,advanced:`Advanced`},So={balanced:`Pauses probes for idle clients, locked hosts, or low power mode.`,performance:`Allows scoped background probes while any subscribed client remains connected.`,"battery-saver":`Also pauses background probes when the host or client is on battery.`},Co=`Uses custom intervals.`,wo=g.make(`codex`),To=[{key:`pauseWhenHostLocked`,label:`Pause when host is locked`},{key:`pauseWhenHostLowPower`,label:`Pause on host low power`},{key:`pauseWhenClientLowPower`,label:`Pause on client low power`},{key:`pauseWhenOnBattery`,label:`Pause on battery`}];function Eo(){return{backgroundActivity:c.backgroundActivity}}function Do(e){return{backgroundActivity:{schemaVersion:1,profile:e,overrides:{}}}}function Oo(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`span`,{className:`inline-flex items-baseline gap-2`,children:[(0,$.jsx)(`span`,{children:`Version`}),(0,$.jsx)(`code`,{className:`text-2xs font-medium text-muted-foreground`,children:ie})]}),e[0]=t):t=e[0],t}function ko(){let e=Hn(),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(!1),a=typeof window<`u`&&!!window.desktopBridge,o=e?.channel??`latest`,s=a?null:ae,c=pn||a&&o===`nightly`,l=(0,Q.useCallback)(e=>{let t=window.desktopBridge;t&&typeof t.setUpdateChannel==`function`&&e!==o&&(n(!0),t.setUpdateChannel(e).catch(e=>{be.add(je({type:`error`,title:`Could not change update track`,description:e instanceof Error?e.message:`Update track change failed.`}))}).finally(()=>{n(!1)}))},[o]),u=(0,Q.useCallback)(async()=>{let t=window.desktopBridge;if(!t)return;let n=e?Wn(e):`none`;if(n===`download`)t.downloadUpdate().catch(e=>{be.add(je({type:`error`,title:`Could not download update`,description:e instanceof Error?e.message:`Download failed.`}))});else if(n===`install`){if(r)return;i(!0);let n=!1;try{n=await we().dialogs.confirm(Pn(e??{availableVersion:null,downloadedVersion:null}))}catch(e){i(!1),be.add(je({type:`error`,title:`Could not confirm update`,description:e instanceof Error?e.message:`Update confirmation failed.`}));return}if(!n){i(!1);return}t.installUpdate().catch(e=>{be.add(je({type:`error`,title:`Could not install update`,description:e instanceof Error?e.message:`Install failed.`}))}).finally(()=>i(!1))}else typeof t.checkForUpdate==`function`&&t.checkForUpdate().then(e=>{e.checked||be.add(je({type:`error`,title:`Could not check for updates`,description:e.state.message??`Automatic updates are not available in this build.`}))}).catch(e=>{be.add(je({type:`error`,title:`Could not check for updates`,description:e instanceof Error?e.message:`Update check failed.`}))})},[r,e]),d=e?Wn(e):`none`,f=e?qn(e):null,p=d===`none`?!Bn(e):Ln(e),m={download:`Download`,install:`Install`}[d]??{checking:`Checking…`,downloading:`Downloading…`,"up-to-date":`Up to Date`}[e?.status??``]??`Check for Updates`,h=d===`download`||d===`install`?`Update available.`:`Current version of the application.`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(Oo,{}),description:h,control:(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{size:`sm`,variant:`outline`,disabled:p||r,onClick:u,children:m})}),f?(0,$.jsx)(bt,{children:f}):null]})}),a?(0,$.jsx)(J,{...X(`update-track`),description:`Use stable releases or nightly builds. Switch back anytime.`,control:(0,$.jsxs)(q,{value:o,onValueChange:e=>{l(e)},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,disabled:t,children:(0,$.jsx)(me,{children:o===`nightly`?`Nightly`:`Stable`})}),(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`latest`,children:`Stable`}),(0,$.jsx)(G,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):s?(0,$.jsx)(J,{...X(`update-track`),description:`Switches the hosted app release channel.`,control:(0,$.jsxs)(q,{value:s,onValueChange:e=>{e!==s&&window.location.assign(ce({channel:e}))},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Update track`,children:(0,$.jsx)(me,{children:oe})}),(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`latest`,children:`Latest`}),(0,$.jsx)(G,{hideIndicator:!0,value:`nightly`,children:`Nightly`})]})]})}):null,c?(0,$.jsx)(Yn,{}):null,a?(0,$.jsx)(Cr,{}):null]})}function Ao(e){let{theme:t,setTheme:n,followSystem:r,setFollowSystem:i,setThemeHalf:a,clearThemeHalves:o,themeHalves:s}=Se(),l=Zt(),u=tn(),d=!A(l.textGenerationModelSelection??null,c.textGenerationModelSelection??null),f=_r(l),p=(0,Q.useMemo)(()=>[...t===`system`?[]:[`Theme`],...r?[]:[`Follow system`],...s===null?[]:[`Theme mix`],...l.appearanceContrast===c.appearanceContrast?[]:[`Contrast`],...l.glassOpacity===c.glassOpacity?[]:[`Glass opacity`],...l.diffColorScheme===c.diffColorScheme?[]:[`Diff colors`],...l.chatWidth===c.chatWidth?[]:[`Chat width`],...l.iconSet===c.iconSet?[]:[`Icon set`],...l.mathRenderingEnabled===c.mathRenderingEnabled?[]:[`Render math`],...l.panelAnimationDurationMs===c.panelAnimationDurationMs?[]:[`Panel animations`],...l.environmentIdentificationMode===c.environmentIdentificationMode?[]:[`Environment identification`],...l.timestampFormat===c.timestampFormat?[]:[`Time format`],...l.notificationMode===c.notificationMode?[]:[`Thread notifications`],...l.inAppNotificationsEnabled===c.inAppNotificationsEnabled?[]:[`In-app notifications`],...l.wakeScreenOnThreadEvents===c.wakeScreenOnThreadEvents?[]:[`Auto awake`],...l.sidebarThreadPreviewCount===c.sidebarThreadPreviewCount?[]:[`Visible threads`],...l.sidebarProjectGroupingMode===c.sidebarProjectGroupingMode?[]:[`Project Grouping`],...l.sidebarProjectSortOrder===c.sidebarProjectSortOrder?[]:[`Project order`],...l.sidebarWorkingShelfEnabled===c.sidebarWorkingShelfEnabled?[]:[`Working section`],...l.sidebarAutoSettleAfterDays===c.sidebarAutoSettleAfterDays?[]:[`Auto-settle inactive threads`],...l.sidebarAutoSettleKeepPullRequests===c.sidebarAutoSettleKeepPullRequests?[]:[`Keep threads with a PR`],...l.sidebarAutoSettleOnMerge===c.sidebarAutoSettleOnMerge?[]:[`Auto-settle merged threads`],...l.autoResumeLimitedThreads===c.autoResumeLimitedThreads?[]:[`Auto-resume limited threads`],...l.snoozeLimitedThreads===c.snoozeLimitedThreads?[]:[`Snooze limited threads`],...l.wordWrap===c.wordWrap?[]:[`Word wrap`],...l.persistComposerContextStrip===c.persistComposerContextStrip?[]:[`Composer context`],...hr(l),...l.diffFilesCollapsed===c.diffFilesCollapsed?[]:[`Default diff file state`],...l.diffIgnoreWhitespace===c.diffIgnoreWhitespace?[]:[`Diff whitespace changes`],...l.diffLayout===c.diffLayout?[]:[`Diff layout`],...l.proactivePanelsEnabled===c.proactivePanelsEnabled?[]:[`Proactive panels`],...l.showSkillsInSlashMenu===c.showSkillsInSlashMenu?[]:[`Show skills in slash menu`],...l.composerCollapseOnScroll===c.composerCollapseOnScroll?[]:[`Collapse composer on scroll`],...l.composerRichTextEnabled===c.composerRichTextEnabled?[]:[`Rich text composer`],...l.sendShortcut===c.sendShortcut?[]:[`Send shortcut`],...l.followUpBehavior===c.followUpBehavior?[]:[`Follow-up behavior`],...l.contextWindowMeterEnabled===c.contextWindowMeterEnabled?[]:[`Context window indicator`],...l.responseStreamingMode===c.responseStreamingMode?[]:[`Response streaming`],...l.enableProviderUpdateChecks===c.enableProviderUpdateChecks?[]:[`Provider update checks`],...l.continueThreadsAfterServerUpdate===c.continueThreadsAfterServerUpdate?[]:[`Continue threads after restarts`],...f?[`Background activity`]:[],...l.defaultThreadEnvMode===c.defaultThreadEnvMode?[]:[`New thread mode`],...l.newWorktreesStartFromOrigin===c.newWorktreesStartFromOrigin?[]:[`New worktrees start from origin`],...l.addProjectBaseDirectory===c.addProjectBaseDirectory?[]:[`Add project base directory`],...l.confirmThreadUnpin===c.confirmThreadUnpin?[]:[`Unpin confirmation`],...l.confirmThreadArchive===c.confirmThreadArchive?[]:[`Archive confirmation`],...l.confirmThreadDelete===c.confirmThreadDelete?[]:[`Delete confirmation`],...l.confirmQuit===c.confirmQuit?[]:[`Quit shortcut`],...d?[`Text generation model`]:[],...cr(l),...l.enableAgentBrowserAccess===c.enableAgentBrowserAccess?[]:[`Agent browser access`]],[d,f,l.browserDefaultViewport,l.browserDefaultZoomFactor,l.browserDefaultAppearance,l.browserRecordingFrameRate,l.browserRecordingShowKeyPresses,l.browserRecordingShowMousePresses,l.browserLinkTarget,l.browserAutoShowFloatingPreview,l.pullRequestLinksOpenInApp,l.appearanceContrast,l.diffColorScheme,l.chatWidth,l.iconSet,l.mathRenderingEnabled,l.enableAgentBrowserAccess,l.confirmQuit,l.confirmThreadArchive,l.confirmThreadDelete,l.confirmThreadUnpin,l.composerCollapseOnScroll,l.composerRichTextEnabled,l.sendShortcut,l.followUpBehavior,l.addProjectBaseDirectory,l.defaultThreadEnvMode,l.newWorktreesStartFromOrigin,l.diffFilesCollapsed,l.diffIgnoreWhitespace,l.diffLayout,l.proactivePanelsEnabled,l.environmentIdentificationMode,l.contextWindowMeterEnabled,l.fontFamilyCode,l.fontFamilyComposer,l.fontFamilySans,l.fontFamilyTerminal,l.fontSizeCode,l.fontSizeInterface,l.fontSizePrompt,l.fontSizeTerminal,l.glassOpacity,l.panelAnimationDurationMs,l.responseStreamingMode,l.persistComposerContextStrip,l.enableProviderUpdateChecks,l.continueThreadsAfterServerUpdate,l.sidebarAutoSettleAfterDays,l.sidebarAutoSettleKeepPullRequests,l.sidebarAutoSettleOnMerge,l.autoResumeLimitedThreads,l.snoozeLimitedThreads,l.sidebarProjectGroupingMode,l.sidebarProjectSortOrder,l.sidebarWorkingShelfEnabled,l.sidebarThreadPreviewCount,l.showSkillsInSlashMenu,l.timestampFormat,l.notificationMode,l.inAppNotificationsEnabled,l.wakeScreenOnThreadEvents,l.wordWrap,r,t,s]);return{changedSettingLabels:p,restoreDefaults:(0,Q.useCallback)(async()=>{if(p.length===0||!await(Oe()??we()).dialogs.confirm([`Restore default settings?`,`This will reset: ${p.join(`, `)}.`].join(`
|
|
45
|
+
`),{variant:`destructive`}))return;let r=t;try{r=Ee()}catch{}let s=De(),l=r!==`system`,d=s!==null,f=xe(r)!==`system`,m=()=>{be.add(je({type:`error`,title:`Couldn’t restore theme settings`,description:`Try again.`}))},h=s;l&&!n(`system`)?m():d&&!o()||f&&!i(!0)?(l&&n(r),h?.light&&a(`light`,h.light),h?.dark&&a(`dark`,h.dark),m()):(u({appearanceContrast:c.appearanceContrast,diffColorScheme:c.diffColorScheme,chatWidth:c.chatWidth,iconSet:c.iconSet,mathRenderingEnabled:c.mathRenderingEnabled,timestampFormat:c.timestampFormat,notificationMode:c.notificationMode,inAppNotificationsEnabled:c.inAppNotificationsEnabled,wakeScreenOnThreadEvents:c.wakeScreenOnThreadEvents,wordWrap:c.wordWrap,persistComposerContextStrip:c.persistComposerContextStrip,diffFilesCollapsed:c.diffFilesCollapsed,diffIgnoreWhitespace:c.diffIgnoreWhitespace,diffLayout:c.diffLayout,proactivePanelsEnabled:c.proactivePanelsEnabled,showSkillsInSlashMenu:c.showSkillsInSlashMenu,composerCollapseOnScroll:c.composerCollapseOnScroll,composerRichTextEnabled:c.composerRichTextEnabled,sendShortcut:c.sendShortcut,followUpBehavior:c.followUpBehavior,contextWindowMeterEnabled:c.contextWindowMeterEnabled,environmentIdentificationMode:c.environmentIdentificationMode,glassOpacity:c.glassOpacity,panelAnimationDurationMs:c.panelAnimationDurationMs,sidebarThreadPreviewCount:c.sidebarThreadPreviewCount,sidebarProjectGroupingMode:c.sidebarProjectGroupingMode,sidebarProjectSortOrder:c.sidebarProjectSortOrder,sidebarWorkingShelfEnabled:c.sidebarWorkingShelfEnabled,sidebarAutoSettleAfterDays:c.sidebarAutoSettleAfterDays,sidebarAutoSettleKeepPullRequests:c.sidebarAutoSettleKeepPullRequests,sidebarAutoSettleOnMerge:c.sidebarAutoSettleOnMerge,autoResumeLimitedThreads:c.autoResumeLimitedThreads,snoozeLimitedThreads:c.snoozeLimitedThreads,responseStreamingMode:c.responseStreamingMode,enableProviderUpdateChecks:c.enableProviderUpdateChecks,continueThreadsAfterServerUpdate:c.continueThreadsAfterServerUpdate,backgroundActivity:c.backgroundActivity,backgroundActivityProfile:c.backgroundActivityProfile,automaticGitFetchInterval:c.automaticGitFetchInterval,providerHealthRefreshInterval:c.providerHealthRefreshInterval,defaultThreadEnvMode:c.defaultThreadEnvMode,newWorktreesStartFromOrigin:c.newWorktreesStartFromOrigin,addProjectBaseDirectory:c.addProjectBaseDirectory,confirmThreadArchive:c.confirmThreadArchive,confirmThreadDelete:c.confirmThreadDelete,confirmThreadUnpin:c.confirmThreadUnpin,confirmQuit:c.confirmQuit,textGenerationModelSelection:c.textGenerationModelSelection,fontFamilySans:c.fontFamilySans,fontFamilyComposer:c.fontFamilyComposer,fontFamilyCode:c.fontFamilyCode,fontFamilyTerminal:c.fontFamilyTerminal,fontSizeInterface:c.fontSizeInterface,fontSizePrompt:c.fontSizePrompt,fontSizeCode:c.fontSizeCode,fontSizeTerminal:c.fontSizeTerminal,browserDefaultViewport:c.browserDefaultViewport,browserDefaultZoomFactor:c.browserDefaultZoomFactor,browserDefaultAppearance:c.browserDefaultAppearance,browserRecordingFrameRate:c.browserRecordingFrameRate,browserRecordingShowKeyPresses:c.browserRecordingShowKeyPresses,browserRecordingShowMousePresses:c.browserRecordingShowMousePresses,browserLinkTarget:c.browserLinkTarget,browserSearchEngine:c.browserSearchEngine,browserCustomSearchUrl:c.browserCustomSearchUrl,browserAutoShowFloatingPreview:c.browserAutoShowFloatingPreview,pullRequestLinksOpenInApp:c.pullRequestLinksOpenInApp,enableAgentBrowserAccess:c.enableAgentBrowserAccess}),e?.())},[p,o,e,i,n,a,t,s,u])}}function jo(e){let t=(0,Z.c)(98),{open:n,onOpenChange:r}=e,i=en(),a=Zt(),o=tn(),s,c,u,d,f,p;t[0]===a?(s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],p=t[6]):(f=Te(a),s=f.profile,c=fr(f.automaticGitFetchInterval),d=fr(f.providerHealthRefreshInterval),u=fr(f.hostPowerMonitorActiveInterval),p=fr(f.hostPowerMonitorIdleInterval),t[0]=a,t[1]=s,t[2]=c,t[3]=u,t[4]=d,t[5]=f,t[6]=p);let m=p,h=n&&i,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(jt,{children:[(0,$.jsx)(Mt,{children:`Background Activity`}),(0,$.jsx)(Ft,{children:`Tune the shared power policy and the background intervals that feed it.`})]}),t[7]=g):g=t[7];let _=!i,v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Shared policy`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Controls whether background work may run after a subscribed interval fires.`})]}),t[8]=v):v=t[8];let y;t[9]!==a||t[10]!==o?(y=e=>{(e===`balanced`||e===`performance`||e===`battery-saver`)&&o({backgroundActivity:mr(a,e)})},t[9]=a,t[10]=o,t[11]=y):y=t[11];let b=bo[s],x;t[12]===b?x=t[13]:(x=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Shared background policy`,children:(0,$.jsx)(me,{children:b})}),t[12]=b,t[13]=x);let S;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`balanced`,children:bo.balanced}),(0,$.jsx)(G,{hideIndicator:!0,value:`performance`,children:bo.performance}),(0,$.jsx)(G,{hideIndicator:!0,value:`battery-saver`,children:bo[`battery-saver`]})]}),t[14]=S):S=t[14];let C;t[15]!==s||t[16]!==y||t[17]!==x?(C=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[v,(0,$.jsxs)(q,{value:s,onValueChange:y,children:[x,S]})]}),t[15]=s,t[16]=y,t[17]=x,t[18]=C):C=t[18];let w;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:X(`git-fetch-interval`).title}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh remote branch status in the background.`})]}),t[19]=w):w=t[19];let T;t[20]!==f||t[21]!==a.backgroundActivity||t[22]!==o?(T=e=>o(vr(a.backgroundActivity,f,{automaticGitFetchInterval:l(pr(e))})),t[20]=f,t[21]=a.backgroundActivity,t[22]=o,t[23]=T):T=t[23];let E;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease Git fetch interval`}),(0,$.jsx)(le,{"aria-label":`Git fetch interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase Git fetch interval`})]}),t[24]=E):E=t[24];let D;t[25]!==c||t[26]!==T?(D=(0,$.jsx)(pe,{value:c,min:0,step:5,size:`sm`,className:`w-32`,onValueChange:T,children:E}),t[25]=c,t[26]=T,t[27]=D):D=t[27];let O;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[28]=O):O=t[28];let k;t[29]===D?k=t[30]:(k=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-b px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[w,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[D,O]})]}),t[29]=D,t[30]=k);let A;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Provider health interval`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Refresh provider availability, versions, and auth state. Model catalog updates follow Provider update checks.`})]}),t[31]=A):A=t[31];let j;t[32]!==f||t[33]!==a.backgroundActivity||t[34]!==o?(j=e=>o(vr(a.backgroundActivity,f,{providerHealthRefreshInterval:l(pr(e))})),t[32]=f,t[33]=a.backgroundActivity,t[34]=o,t[35]=j):j=t[35];let M;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease provider health interval`}),(0,$.jsx)(le,{"aria-label":`Provider health interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase provider health interval`})]}),t[36]=M):M=t[36];let N;t[37]!==d||t[38]!==j?(N=(0,$.jsx)(pe,{value:d,min:0,step:30,size:`sm`,className:`w-32`,onValueChange:j,children:M}),t[37]=d,t[38]=j,t[39]=N):N=t[39];let P;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[40]=P):P=t[40];let F;t[41]===N?F=t[42]:(F=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[A,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,P]})]}),t[41]=N,t[42]=F);let I;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Host power monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state while clients are active.`})]}),t[43]=I):I=t[43];let L;t[44]!==f||t[45]!==a.backgroundActivity||t[46]!==o?(L=e=>o(vr(a.backgroundActivity,f,{hostPowerMonitorActiveInterval:l(pr(e,5))})),t[44]=f,t[45]=a.backgroundActivity,t[46]=o,t[47]=L):L=t[47];let z;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease active host power interval`}),(0,$.jsx)(le,{"aria-label":`Active host power interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase active host power interval`})]}),t[48]=z):z=t[48];let B;t[49]!==u||t[50]!==L?(B=(0,$.jsx)(pe,{value:u,min:5,step:5,size:`sm`,className:`w-32`,onValueChange:L,children:z}),t[49]=u,t[50]=L,t[51]=B):B=t[51];let V;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[52]=V):V=t[52];let H;t[53]===B?H=t[54]:(H=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[I,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[B,V]})]}),t[53]=B,t[54]=H);let U;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:`Idle host monitor`}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Poll host power state when no foreground client is active.`})]}),t[55]=U):U=t[55];let ee;t[56]!==f||t[57]!==a.backgroundActivity||t[58]!==o?(ee=e=>o(vr(a.backgroundActivity,f,{hostPowerMonitorIdleInterval:l(pr(e,5))})),t[56]=f,t[57]=a.backgroundActivity,t[58]=o,t[59]=ee):ee=t[59];let W;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsxs)(fe,{children:[(0,$.jsx)(de,{"aria-label":`Decrease idle host power interval`}),(0,$.jsx)(le,{"aria-label":`Idle host power interval in seconds`}),(0,$.jsx)(ue,{"aria-label":`Increase idle host power interval`})]}),t[60]=W):W=t[60];let te;t[61]!==m||t[62]!==ee?(te=(0,$.jsx)(pe,{value:m,min:5,step:30,size:`sm`,className:`w-32`,onValueChange:ee,children:W}),t[61]=m,t[62]=ee,t[63]=te):te=t[63];let ne;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`seconds`}),t[64]=ne):ne=t[64];let re;t[65]===te?re=t[66]:(re=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 border-t px-4 py-3 sm:flex-row sm:items-center sm:justify-between`,children:[U,(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[te,ne]})]}),t[65]=te,t[66]=re);let ie;t[67]!==f||t[68]!==a.backgroundActivity||t[69]!==o?(ie=To.map(e=>{let{key:t,label:n}=e;return(0,$.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border-b px-4 py-3 last:border-b-0 sm:border-r sm:even:border-r-0`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium`,children:n}),(0,$.jsx)(Fn,{checked:f[t],onCheckedChange:e=>o(vr(a.backgroundActivity,f,{[t]:!!e})),"aria-label":n})]},t)}),t[67]=f,t[68]=a.backgroundActivity,t[69]=o,t[70]=ie):ie=t[70];let ae;t[71]===ie?ae=t[72]:(ae=(0,$.jsx)(`div`,{className:`grid gap-0 border-t sm:grid-cols-2`,children:ie}),t[71]=ie,t[72]=ae);let oe;t[73]!==C||t[74]!==k||t[75]!==F||t[76]!==H||t[77]!==re||t[78]!==ae||t[79]!==_?(oe=(0,$.jsx)(Pt,{children:(0,$.jsxs)(`fieldset`,{disabled:_,className:`min-w-0 overflow-hidden rounded-xl border bg-card text-card-foreground`,children:[C,k,F,H,re,ae]})}),t[73]=C,t[74]=k,t[75]=F,t[76]=H,t[77]=re,t[78]=ae,t[79]=_,t[80]=oe):oe=t[80];let se=!i,ce;t[81]===o?ce=t[82]:(ce=()=>o(Eo()),t[81]=o,t[82]=ce);let he;t[83]!==se||t[84]!==ce?(he=(0,$.jsx)(R,{variant:`outline`,disabled:se,onClick:ce,children:`Reset all`}),t[83]=se,t[84]=ce,t[85]=he):he=t[85];let _e;t[86]===r?_e=t[87]:(_e=(0,$.jsx)(R,{onClick:()=>r(!1),children:`Done`}),t[86]=r,t[87]=_e);let ve;t[88]!==he||t[89]!==_e?(ve=(0,$.jsxs)(Nt,{children:[he,_e]}),t[88]=he,t[89]=_e,t[90]=ve):ve=t[90];let ye;t[91]!==oe||t[92]!==ve?(ye=(0,$.jsxs)(It,{className:`max-w-xl`,children:[g,oe,ve]}),t[91]=oe,t[92]=ve,t[93]=ye):ye=t[93];let be;return t[94]!==r||t[95]!==h||t[96]!==ye?(be=(0,$.jsx)(Lt,{open:h,onOpenChange:r,children:ye}),t[94]=r,t[95]=h,t[96]=ye,t[97]=be):be=t[97],be}function Mo(){let e=(0,Z.c)(179),{appearanceMode:t,refreshTheme:n,resolvedTheme:r,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:l}=Se(),d=gn(),[f,p]=(0,Q.useState)(!1),m=Zt(),h=tn(),g=tr(),_;e[0]===g?_=e[1]:(_=nr(g),e[0]=g,e[1]=_);let v=_!==null,y=(m.glassOpacity-40)/60,b=`${y*100}%`,x=`${.5-y}rem`,S;e[2]!==b||e[3]!==x?(S={"--settings-slider-progress":b,"--settings-slider-fill-offset":x},e[2]=b,e[3]=x,e[4]=S):S=e[4];let C=S,w=(m.appearanceContrast-50)/150,T=`${w*100}%`,E=`${.5-w}rem`,D;e[5]!==T||e[6]!==E?(D={"--settings-slider-progress":T,"--settings-slider-fill-offset":E},e[5]=T,e[6]=E,e[7]=D):D=e[7];let O=D,k=(m.panelAnimationDurationMs-0)/400,A=`${k*100}%`,j=`${.5-k}rem`,M;e[8]!==A||e[9]!==j?(M={"--settings-slider-progress":A,"--settings-slider-fill-offset":j},e[8]=A,e[9]=j,e[10]=M):M=e[10];let N=M,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=X(`theme`),e[11]=P):P=e[11];let F;e[12]!==t||e[13]!==d||e[14]!==f||e[15]!==n||e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==o||e[20]!==s||e[21]!==l?(F=(0,$.jsx)(ln,{id:`appearance`,title:`Colors & themes`,variant:`plain`,hideTitle:!0,children:(0,$.jsx)(`div`,{id:P.id,children:(0,$.jsx)(Za,{appearanceMode:t,customThemes:d,initialAppearance:r,refreshTheme:n,isImportOpen:f,setAppearanceMode:i,setTheme:a,setThemeHalf:o,theme:s,themeHalves:l,onImportOpenChange:p})})}),e[12]=t,e[13]=d,e[14]=f,e[15]=n,e[16]=r,e[17]=i,e[18]=a,e[19]=o,e[20]=s,e[21]=l,e[22]=F):F=e[22];let I;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=X(`setting-appearance-contrast`),e[23]=I):I=e[23];let L;e[24]!==m.appearanceContrast||e[25]!==h?(L=m.appearanceContrast===c.appearanceContrast?null:(0,$.jsx)(Y,{label:`contrast`,onClick:()=>h({appearanceContrast:c.appearanceContrast})}),e[24]=m.appearanceContrast,e[25]=h,e[26]=L):L=e[26];let R;e[27]===m.appearanceContrast?R=e[28]:(R=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`appearance-contrast`,children:[m.appearanceContrast,`%`]}),e[27]=m.appearanceContrast,e[28]=R);let z;e[29]===h?z=e[30]:(z=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=50&&t<=200&&h({appearanceContrast:t})},e[29]=h,e[30]=z);let B;e[31]!==O||e[32]!==m.appearanceContrast||e[33]!==z?(B=(0,$.jsx)(`input`,{"aria-label":`Contrast`,className:`settings-slider min-w-0 flex-1`,id:`appearance-contrast`,max:200,min:50,onChange:z,step:5,style:O,type:`range`,value:m.appearanceContrast}),e[31]=O,e[32]=m.appearanceContrast,e[33]=z,e[34]=B):B=e[34];let V;e[35]!==R||e[36]!==B?(V=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[R,B]}),e[35]=R,e[36]=B,e[37]=V):V=e[37];let H;e[38]!==L||e[39]!==V?(H=(0,$.jsx)(J,{...I,description:`Adjust the contrast of colors and borders across the interface.`,resetAction:L,control:V}),e[38]=L,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=X(`setting-glass-opacity`),e[41]=U):U=e[41];let ee;e[42]!==m.glassOpacity||e[43]!==h?(ee=m.glassOpacity===c.glassOpacity?null:(0,$.jsx)(Y,{label:`glass opacity`,onClick:()=>h({glassOpacity:c.glassOpacity})}),e[42]=m.glassOpacity,e[43]=h,e[44]=ee):ee=e[44];let W;e[45]===m.glassOpacity?W=e[46]:(W=(0,$.jsxs)(`output`,{className:`min-w-12 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`glass-opacity`,children:[m.glassOpacity,`%`]}),e[45]=m.glassOpacity,e[46]=W);let te;e[47]===h?te=e[48]:(te=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=40&&t<=100&&h({glassOpacity:t})},e[47]=h,e[48]=te);let ne;e[49]!==C||e[50]!==m.glassOpacity||e[51]!==te?(ne=(0,$.jsx)(`input`,{"aria-label":`Glass opacity`,className:`settings-slider min-w-0 flex-1`,id:`glass-opacity`,max:100,min:40,onChange:te,step:5,style:C,type:`range`,value:m.glassOpacity}),e[49]=C,e[50]=m.glassOpacity,e[51]=te,e[52]=ne):ne=e[52];let re;e[53]!==W||e[54]!==ne?(re=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3 sm:w-52`,children:[W,ne]}),e[53]=W,e[54]=ne,e[55]=re):re=e[55];let ie;e[56]!==ee||e[57]!==re?(ie=(0,$.jsx)(J,{...U,description:`Higher values make menus, dialogs, and the composer more solid.`,resetAction:ee,control:re}),e[56]=ee,e[57]=re,e[58]=ie):ie=e[58];let ae;e[59]!==m.environmentIdentificationMode||e[60]!==v||e[61]!==h?(ae=v?(0,$.jsx)(J,{...X(`environment-identification`),description:`Choose how Dev and Nightly environments are identified.`,resetAction:m.environmentIdentificationMode===`artwork`?null:(0,$.jsx)(Y,{label:`environment identification`,onClick:()=>h({environmentIdentificationMode:u})}),control:(0,$.jsxs)(q,{value:m.environmentIdentificationMode,onValueChange:e=>{(e===`artwork`||e===`pill`||e===`none`)&&h({environmentIdentificationMode:e})},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Environment identification`,children:(0,$.jsx)(me,{children:lo[m.environmentIdentificationMode]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(lo).map(No)})]})}):null,e[59]=m.environmentIdentificationMode,e[60]=v,e[61]=h,e[62]=ae):ae=e[62];let oe;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(oe=X(`diff-color-scheme`),e[63]=oe):oe=e[63];let se;e[64]!==m.diffColorScheme||e[65]!==h?(se=m.diffColorScheme===c.diffColorScheme?null:(0,$.jsx)(Y,{label:`diff colors`,onClick:()=>h({diffColorScheme:c.diffColorScheme})}),e[64]=m.diffColorScheme,e[65]=h,e[66]=se):se=e[66];let ce;e[67]===h?ce=e[68]:(ce=e=>{(e===`red-green`||e===`blue-orange`)&&h({diffColorScheme:e})},e[67]=h,e[68]=ce);let le=m.diffColorScheme===`blue-orange`?`flex shrink-0 flex-row-reverse gap-1`:`flex shrink-0 gap-1`,ue,de;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-deletion`}),de=(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-diff-addition`}),e[69]=ue,e[70]=de):(ue=e[69],de=e[70]);let fe;e[71]===le?fe=e[72]:(fe=(0,$.jsxs)(`span`,{"aria-hidden":`true`,className:le,children:[ue,de]}),e[71]=le,e[72]=fe);let pe=m.diffColorScheme===`blue-orange`?`Blue & orange`:`Red & green`,he;e[73]===pe?he=e[74]:(he=(0,$.jsx)(me,{children:pe}),e[73]=pe,e[74]=he);let _e;e[75]!==fe||e[76]!==he?(_e=(0,$.jsxs)(K,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Diff colors`,children:[fe,he]}),e[75]=fe,e[76]=he,e[77]=_e):_e=e[77];let ve;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`red-green`,children:`Red & green (default)`}),(0,$.jsx)(G,{value:`blue-orange`,children:`Blue & orange`})]}),e[78]=ve):ve=e[78];let ye;e[79]!==m.diffColorScheme||e[80]!==ce||e[81]!==_e?(ye=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(q,{value:m.diffColorScheme,onValueChange:ce,children:[_e,ve]})}),e[79]=m.diffColorScheme,e[80]=ce,e[81]=_e,e[82]=ye):ye=e[82];let be;e[83]!==se||e[84]!==ye?(be=(0,$.jsx)(J,{...oe,description:`Choose colors for additions and deletions, including change counts.`,resetAction:se,control:ye}),e[83]=se,e[84]=ye,e[85]=be):be=e[85];let xe;e[86]===Symbol.for(`react.memo_cache_sentinel`)?(xe=X(`composer-context`),e[86]=xe):xe=e[86];let Ce;e[87]!==m.persistComposerContextStrip||e[88]!==h?(Ce=m.persistComposerContextStrip===c.persistComposerContextStrip?null:(0,$.jsx)(Y,{label:`composer context`,onClick:()=>h({persistComposerContextStrip:c.persistComposerContextStrip})}),e[87]=m.persistComposerContextStrip,e[88]=h,e[89]=Ce):Ce=e[89];let we;e[90]===h?we=e[91]:(we=e=>h({persistComposerContextStrip:!!e}),e[90]=h,e[91]=we);let Te;e[92]!==m.persistComposerContextStrip||e[93]!==we?(Te=(0,$.jsx)(Fn,{checked:m.persistComposerContextStrip,onCheckedChange:we,"aria-label":`Keep composer context visible in active threads`}),e[92]=m.persistComposerContextStrip,e[93]=we,e[94]=Te):Te=e[94];let Ee;e[95]!==Ce||e[96]!==Te?(Ee=(0,$.jsx)(J,{...xe,description:`Keep branch and worktree controls below the composer after a thread starts.`,resetAction:Ce,control:Te}),e[95]=Ce,e[96]=Te,e[97]=Ee):Ee=e[97];let De;e[98]===Symbol.for(`react.memo_cache_sentinel`)?(De=X(`chat-width`),e[98]=De):De=e[98];let Oe;e[99]!==m.chatWidth||e[100]!==h?(Oe=m.chatWidth===c.chatWidth?null:(0,$.jsx)(Y,{label:`chat width`,onClick:()=>h({chatWidth:c.chatWidth})}),e[99]=m.chatWidth,e[100]=h,e[101]=Oe):Oe=e[101];let ke;e[102]===h?ke=e[103]:(ke=e=>{(e===`comfortable`||e===`wide`||e===`full`)&&h({chatWidth:e})},e[102]=h,e[103]=ke);let Ae=go[m.chatWidth],je;e[104]===Ae?je=e[105]:(je=(0,$.jsx)(K,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Chat width`,children:(0,$.jsx)(me,{children:Ae})}),e[104]=Ae,e[105]=je);let Me;e[106]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`comfortable`,children:`Comfortable (default)`}),(0,$.jsx)(G,{value:`wide`,children:`Wide`}),(0,$.jsx)(G,{value:`full`,children:`Full`})]}),e[106]=Me):Me=e[106];let Ne;e[107]!==m.chatWidth||e[108]!==ke||e[109]!==je?(Ne=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(q,{value:m.chatWidth,onValueChange:ke,children:[je,Me]})}),e[107]=m.chatWidth,e[108]=ke,e[109]=je,e[110]=Ne):Ne=e[110];let Pe;e[111]!==Oe||e[112]!==Ne?(Pe=(0,$.jsx)(J,{...De,description:`Set how wide messages and the composer can grow on large screens.`,resetAction:Oe,control:Ne}),e[111]=Oe,e[112]=Ne,e[113]=Pe):Pe=e[113];let Fe;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=X(`icon-set`),e[114]=Fe):Fe=e[114];let Ie;e[115]!==m.iconSet||e[116]!==h?(Ie=m.iconSet===c.iconSet?null:(0,$.jsx)(Y,{label:`icon set`,onClick:()=>h({iconSet:c.iconSet})}),e[115]=m.iconSet,e[116]=h,e[117]=Ie):Ie=e[117];let Le;e[118]===h?Le=e[119]:(Le=e=>{(e===`p4`||e===`lucide`)&&h({iconSet:e})},e[118]=h,e[119]=Le);let Re=_o[m.iconSet],ze;e[120]===Re?ze=e[121]:(ze=(0,$.jsx)(K,{size:`sm`,className:`w-full min-w-0`,"aria-label":`Icon set`,children:(0,$.jsx)(me,{children:Re})}),e[120]=Re,e[121]=ze);let Be;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`p4`,children:`P4 (default)`}),(0,$.jsx)(G,{value:`lucide`,children:`Lucide`})]}),e[122]=Be):Be=e[122];let Ve;e[123]!==m.iconSet||e[124]!==Le||e[125]!==ze?(Ve=(0,$.jsx)(`div`,{className:`w-full sm:w-40`,children:(0,$.jsxs)(q,{value:m.iconSet,onValueChange:Le,children:[ze,Be]})}),e[123]=m.iconSet,e[124]=Le,e[125]=ze,e[126]=Ve):Ve=e[126];let He;e[127]!==Ie||e[128]!==Ve?(He=(0,$.jsx)(J,{...Fe,description:`Choose which icon drawings the app uses. An icon missing from one set shows the other set's drawing.`,resetAction:Ie,control:Ve}),e[127]=Ie,e[128]=Ve,e[129]=He):He=e[129];let Ue;e[130]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=X(`math-rendering`),e[130]=Ue):Ue=e[130];let We;e[131]!==m.mathRenderingEnabled||e[132]!==h?(We=m.mathRenderingEnabled===c.mathRenderingEnabled?null:(0,$.jsx)(Y,{label:`math rendering`,onClick:()=>h({mathRenderingEnabled:c.mathRenderingEnabled})}),e[131]=m.mathRenderingEnabled,e[132]=h,e[133]=We):We=e[133];let Ge;e[134]===h?Ge=e[135]:(Ge=e=>h({mathRenderingEnabled:!!e}),e[134]=h,e[135]=Ge);let Ke;e[136]!==m.mathRenderingEnabled||e[137]!==Ge?(Ke=(0,$.jsx)(Fn,{checked:m.mathRenderingEnabled,onCheckedChange:Ge,"aria-label":`Render math`}),e[136]=m.mathRenderingEnabled,e[137]=Ge,e[138]=Ke):Ke=e[138];let qe;e[139]!==We||e[140]!==Ke?(qe=(0,$.jsx)(J,{...Ue,description:`Typeset LaTeX math, such as $x^2$ or \\[x^2\\], in messages and Markdown previews. The composer keeps TeX source editable.`,resetAction:We,control:Ke}),e[139]=We,e[140]=Ke,e[141]=qe):qe=e[141];let Je;e[142]!==H||e[143]!==ie||e[144]!==ae||e[145]!==be||e[146]!==Ee||e[147]!==Pe||e[148]!==He||e[149]!==qe?(Je=(0,$.jsxs)(ln,{id:`appearance-interface`,title:`Interface`,children:[H,ie,ae,be,Ee,Pe,He,qe]}),e[142]=H,e[143]=ie,e[144]=ae,e[145]=be,e[146]=Ee,e[147]=Pe,e[148]=He,e[149]=qe,e[150]=Je):Je=e[150];let Ye;e[151]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=X(`panel-animations`),e[151]=Ye):Ye=e[151];let Xe;e[152]===m.panelAnimationDurationMs?Xe=e[153]:(Xe=(0,$.jsx)(oo,{durationMs:m.panelAnimationDurationMs}),e[152]=m.panelAnimationDurationMs,e[153]=Xe);let Ze;e[154]===m.panelAnimationDurationMs?Ze=e[155]:(Ze=(0,$.jsxs)(`output`,{className:`min-w-16 rounded-md bg-muted px-2 py-1 text-center font-mono text-xs font-medium tabular-nums text-foreground`,htmlFor:`panel-animation-duration`,children:[m.panelAnimationDurationMs,` ms`]}),e[154]=m.panelAnimationDurationMs,e[155]=Ze);let Qe;e[156]===h?Qe=e[157]:(Qe=e=>{let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=0&&t<=400&&h({panelAnimationDurationMs:t})},e[156]=h,e[157]=Qe);let $e;e[158]!==N||e[159]!==m.panelAnimationDurationMs||e[160]!==Qe?($e=(0,$.jsx)(`input`,{"aria-label":`Panel animation duration`,className:`settings-slider min-w-0 flex-1`,id:`panel-animation-duration`,max:400,min:0,onChange:Qe,step:25,style:N,type:`range`,value:m.panelAnimationDurationMs}),e[158]=N,e[159]=m.panelAnimationDurationMs,e[160]=Qe,e[161]=$e):$e=e[161];let et;e[162]!==Ze||e[163]!==$e?(et=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-3`,children:[Ze,$e]}),e[162]=Ze,e[163]=$e,e[164]=et):et=e[164];let tt;e[165]!==Xe||e[166]!==et?(tt=(0,$.jsxs)(`div`,{className:`grid w-full grid-cols-[5rem_minmax(0,1fr)] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_13rem] sm:gap-4`,children:[Xe,et]}),e[165]=Xe,e[166]=et,e[167]=tt):tt=e[167];let nt;e[168]!==m.panelAnimationDurationMs||e[169]!==h?(nt=m.panelAnimationDurationMs===c.panelAnimationDurationMs?null:(0,$.jsx)(Y,{label:`panel animations`,onClick:()=>h({panelAnimationDurationMs:c.panelAnimationDurationMs})}),e[168]=m.panelAnimationDurationMs,e[169]=h,e[170]=nt):nt=e[170];let rt;e[171]!==tt||e[172]!==nt?(rt=(0,$.jsx)(ln,{id:`motion`,title:`Motion`,children:(0,$.jsx)(J,{...Ye,description:`Set how fast panels open and close.`,control:tt,resetAction:nt})}),e[171]=tt,e[172]=nt,e[173]=rt):rt=e[173];let it;e[174]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,$.jsx)(Wo,{}),e[174]=it):it=e[174];let at;return e[175]!==F||e[176]!==Je||e[177]!==rt?(at=(0,$.jsxs)(sn,{children:[F,Je,rt,it]}),e[175]=F,e[176]=Je,e[177]=rt,e[178]=at):at=e[178],at}function No(e){let[t,n]=e;return(0,$.jsx)(G,{hideIndicator:!0,value:t,children:n},t)}function Po(){let e=(0,Z.c)(5),t=Zt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={sans:In(`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`)??`System default`,code:In(`"SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace`)??`System monospace`},e[0]=n):n=e[0];let r=n,i;e[1]===t.fontFamilySans?i=e[2]:(i=t.fontFamilySans.trim()||r.sans,e[1]=t.fontFamilySans,e[2]=i);let a;return e[3]===i?a=e[4]:(a={sans:r.sans,code:r.code,interfaceFamily:i},e[3]=i,e[4]=a),a}function Fo(e){let t=(0,Z.c)(18),{preview:n}=e,r=Zt(),i=tn(),a=Po(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=X(`interface-font`),t[0]=o):o=t[0];let s,l;t[1]===i?(s=t[2],l=t[3]):(s=e=>i({fontFamilySans:e}),l=()=>i({fontFamilySans:c.fontFamilySans,fontSizeInterface:c.fontSizeInterface}),t[1]=i,t[2]=s,t[3]=l);let u;t[4]===i?u=t[5]:(u=e=>i({fontSizeInterface:e}),t[4]=i,t[5]=u);let d;t[6]!==r.fontSizeInterface||t[7]!==u?(d={label:`Interface font size`,min:12,max:20,value:r.fontSizeInterface,defaultValue:c.fontSizeInterface,onChange:u},t[6]=r.fontSizeInterface,t[7]=u,t[8]=d):d=t[8];let f;t[9]===n?f=t[10]:(f=n===void 0?{}:{preview:n},t[9]=n,t[10]=f);let p;return t[11]!==a.sans||t[12]!==r.fontFamilySans||t[13]!==s||t[14]!==l||t[15]!==d||t[16]!==f?(p=(0,$.jsx)(Go,{...o,description:`Everything outside code blocks and the terminal.`,defaultFamily:a.sans,defaultValue:c.fontFamilySans,value:r.fontFamilySans,onValueChange:s,onReset:l,size:d,...f}),t[11]=a.sans,t[12]=r.fontFamilySans,t[13]=s,t[14]=l,t[15]=d,t[16]=f,t[17]=p):p=t[17],p}function Io(){let e=(0,Z.c)(16),t=Zt(),n=tn(),r=Po(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`prompt-font`),e[0]=i):i=e[0];let a,o;e[1]===n?(a=e[2],o=e[3]):(a=e=>n({fontFamilyComposer:e}),o=()=>n({fontFamilyComposer:c.fontFamilyComposer,fontSizePrompt:c.fontSizePrompt}),e[1]=n,e[2]=a,e[3]=o);let s;e[4]===n?s=e[5]:(s=e=>n({fontSizePrompt:e}),e[4]=n,e[5]=s);let l;e[6]!==t.fontSizePrompt||e[7]!==s?(l={label:`Prompt font size`,min:12,max:20,value:t.fontSizePrompt,defaultValue:c.fontSizePrompt,onChange:s},e[6]=t.fontSizePrompt,e[7]=s,e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Pr,{}),e[9]=u):u=e[9];let d;return e[10]!==r.interfaceFamily||e[11]!==t.fontFamilyComposer||e[12]!==a||e[13]!==o||e[14]!==l?(d=(0,$.jsx)(Go,{...i,description:`Only the box you write prompts in. Mono works well here.`,defaultFamily:r.interfaceFamily,defaultValue:c.fontFamilyComposer,value:t.fontFamilyComposer,onValueChange:a,onReset:o,size:l,preview:u}),e[10]=r.interfaceFamily,e[11]=t.fontFamilyComposer,e[12]=a,e[13]=o,e[14]=l,e[15]=d):d=e[15],d}function Lo(e){let t=(0,Z.c)(22),{title:n,description:r,preview:i}=e,a=r===void 0?`Code blocks, diffs, and file previews.`:r,o=Zt(),s=tn(),l=Po(),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=X(`code-font`),t[0]=u):u=t[0];let d;t[1]===n?d=t[2]:(d=n===void 0?{}:{title:n},t[1]=n,t[2]=d);let f,p;t[3]===s?(f=t[4],p=t[5]):(f=e=>s({fontFamilyCode:e}),p=()=>s({fontFamilyCode:c.fontFamilyCode,fontSizeCode:c.fontSizeCode}),t[3]=s,t[4]=f,t[5]=p);let m;t[6]===s?m=t[7]:(m=e=>s({fontSizeCode:e}),t[6]=s,t[7]=m);let h;t[8]!==o.fontSizeCode||t[9]!==m?(h={label:`Code font size`,min:10,max:18,value:o.fontSizeCode,defaultValue:c.fontSizeCode,onChange:m},t[8]=o.fontSizeCode,t[9]=m,t[10]=h):h=t[10];let g;t[11]===i?g=t[12]:(g=i??(0,$.jsx)(Br,{}),t[11]=i,t[12]=g);let _;return t[13]!==l.code||t[14]!==a||t[15]!==o.fontFamilyCode||t[16]!==d||t[17]!==f||t[18]!==p||t[19]!==h||t[20]!==g?(_=(0,$.jsx)(Go,{...u,...d,description:a,defaultFamily:l.code,defaultValue:c.fontFamilyCode,value:o.fontFamilyCode,onValueChange:f,onReset:p,requireMonospace:!0,size:h,preview:g}),t[13]=l.code,t[14]=a,t[15]=o.fontFamilyCode,t[16]=d,t[17]=f,t[18]=p,t[19]=h,t[20]=g,t[21]=_):_=t[21],_}function Ro(){let e=(0,Z.c)(22),t=Zt(),n=tn(),r=Po(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=X(`terminal-font`),e[0]=i):i=e[0];let a=r.code,o=t.fontFamilyTerminal,s,l;e[1]===n?(s=e[2],l=e[3]):(s=e=>n({fontFamilyTerminal:e}),l=()=>n({fontFamilyTerminal:c.fontFamilyTerminal,fontSizeTerminal:c.fontSizeTerminal}),e[1]=n,e[2]=s,e[3]=l);let u;e[4]===n?u=e[5]:(u=e=>n({fontSizeTerminal:e}),e[4]=n,e[5]=u);let d;e[6]!==t.fontSizeTerminal||e[7]!==u?(d={label:`Terminal font size`,min:8,max:20,value:t.fontSizeTerminal,defaultValue:c.fontSizeTerminal,onChange:u},e[6]=t.fontSizeTerminal,e[7]=u,e[8]=d):d=e[8];let f;e[9]!==t.fontFamilyCode||e[10]!==t.fontFamilyTerminal?(f=Kn({advanced:!0,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[9]=t.fontFamilyCode,e[10]=t.fontFamilyTerminal,e[11]=f):f=e[11];let p;e[12]!==t.fontSizeTerminal||e[13]!==f?(p=(0,$.jsx)(Gr,{family:f,size:t.fontSizeTerminal}),e[12]=t.fontSizeTerminal,e[13]=f,e[14]=p):p=e[14];let m;return e[15]!==r.code||e[16]!==t.fontFamilyTerminal||e[17]!==s||e[18]!==l||e[19]!==d||e[20]!==p?(m=(0,$.jsx)(Go,{...i,description:`Terminal output, independent from code blocks and diffs.`,defaultFamily:a,defaultValue:c.fontFamilyTerminal,value:o,onValueChange:s,onReset:l,requireMonospace:!0,size:d,preview:p}),e[15]=r.code,e[16]=t.fontFamilyTerminal,e[17]=s,e[18]=l,e[19]=d,e[20]=p,e[21]=m):m=e[21],m}function zo(){let e=(0,Z.c)(12),t=Zt(),n=tn();if(!E(navigator.platform))return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`font-smoothing`),e[0]=r):r=e[0];let i;e[1]!==t.fontSmoothing||e[2]!==n?(i=t.fontSmoothing===c.fontSmoothing?null:(0,$.jsx)(Y,{label:`font smoothing`,onClick:()=>n({fontSmoothing:c.fontSmoothing})}),e[1]=t.fontSmoothing,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({fontSmoothing:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.fontSmoothing||e[7]!==a?(o=(0,$.jsx)(Fn,{checked:t.fontSmoothing,onCheckedChange:a,"aria-label":`Font smoothing`}),e[6]=t.fontSmoothing,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Use thinner grayscale text smoothing instead of the macOS default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Bo(){let e=(0,Z.c)(12),t=Zt(),n=tn(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=X(`word-wrap`),e[0]=r):r=e[0];let i;e[1]!==t.wordWrap||e[2]!==n?(i=t.wordWrap===c.wordWrap?null:(0,$.jsx)(Y,{label:`word wrapping`,onClick:()=>n({wordWrap:c.wordWrap})}),e[1]=t.wordWrap,e[2]=n,e[3]=i):i=e[3];let a;e[4]===n?a=e[5]:(a=e=>n({wordWrap:!!e}),e[4]=n,e[5]=a);let o;e[6]!==t.wordWrap||e[7]!==a?(o=(0,$.jsx)(Fn,{checked:t.wordWrap,onCheckedChange:a,"aria-label":`Wrap code, tables, diffs, and file previews by default`}),e[6]=t.wordWrap,e[7]=a,e[8]=o):o=e[8];let s;return e[9]!==i||e[10]!==o?(s=(0,$.jsx)(J,{...r,description:`Wrap long lines in code blocks, tables, diffs, and file previews by default.`,resetAction:i,control:o}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}function Vo(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Fo,{}),(0,$.jsx)(Io,{}),(0,$.jsx)(Lo,{}),(0,$.jsx)(Ro,{}),(0,$.jsx)(zo,{})]}),e[0]=t):t=e[0],t}function Ho(){let e=(0,Z.c)(11),t=Zt(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Fo,{preview:(0,$.jsx)(Pr,{})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(Br,{}),e[1]=r):r=e[1];let i;e[2]!==t.fontFamilyCode||e[3]!==t.fontFamilyTerminal?(i=Kn({advanced:!1,code:t.fontFamilyCode,terminal:t.fontFamilyTerminal}),e[2]=t.fontFamilyCode,e[3]=t.fontFamilyTerminal,e[4]=i):i=e[4];let a;e[5]!==t.fontSizeCode||e[6]!==t.fontSizeTerminal?(a=Un({advanced:!1,code:t.fontSizeCode,terminal:t.fontSizeTerminal}),e[5]=t.fontSizeCode,e[6]=t.fontSizeTerminal,e[7]=a):a=e[7];let o;return e[8]!==i||e[9]!==a?(o=(0,$.jsxs)($.Fragment,{children:[n,(0,$.jsx)(Lo,{title:`Monospace font`,description:`Code blocks, diffs, file previews, and the terminal.`,preview:(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(Gr,{family:i,size:a})]})})]}),e[8]=i,e[9]=a,e[10]=o):o=e[10],o}var Uo=new Set([`prompt-font`,`terminal-font`,...typeof navigator<`u`&&E(navigator.platform)?[`font-smoothing`]:[]]);function Wo(){let e=(0,Z.c)(15),[t,n]=S(Dn,!1,H),r=on(),i=(0,Q.useRef)(null),a,o;e[0]!==r||e[1]!==n?(a=()=>{r!==null&&Uo.has(r)&&i.current!==r&&(i.current=r,n(!0))},o=[r,n],e[0]=r,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o);let s;e[4]===n?s=e[5]:(s=e=>n(!!e),e[4]=n,e[5]=s);let c;e[6]!==t||e[7]!==s?(c=(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-xs font-medium text-muted-foreground`,children:[`Advanced`,(0,$.jsx)(Fn,{checked:t,onCheckedChange:s,"aria-label":`Show advanced typography settings`})]}),e[6]=t,e[7]=s,e[8]=c):c=e[8];let l;e[9]===t?l=e[10]:(l=t?(0,$.jsx)(Vo,{}):(0,$.jsx)(Ho,{}),e[9]=t,e[10]=l);let u;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Bo,{}),e[11]=u):u=e[11];let d;return e[12]!==c||e[13]!==l?(d=(0,$.jsxs)(ln,{id:`typography`,title:`Typography`,headerAction:c,children:[l,u]}),e[12]=c,e[13]=l,e[14]=d):d=e[14],d}function Go({id:e,title:t,description:n,defaultFamily:r,defaultValue:i,preview:a,value:o,onValueChange:s,onReset:c,requireMonospace:l=!1,size:u}){let d=o.trim(),[f,p]=(0,Q.useState)(o),[m,h]=(0,Q.useState)(!0),g=(0,Q.useRef)(null),_=(0,Q.useRef)(o);_.current!==o&&(_.current=o,g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0)),(0,Q.useEffect)(()=>()=>{g.current!==null&&window.clearTimeout(g.current)},[]);let v=e=>kn(e)&&(!l||xn(e)),y=e=>{h(!0),(e.trim().length===0||v(e))&&s(e)},b=()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null,y(f))},x=f.trim(),S=m&&x.length>0&&x!==d,C=o!==i||u.value!==u.defaultValue?(0,$.jsx)(Y,{label:t.toLowerCase(),onClick:()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(i),h(!0),c()}}):null,w=ii(),T=(0,Q.useRef)(!1),E=w.status===`granted`?(0,$.jsx)(ai,{ariaLabel:`${t} family`,defaultFamily:r,selectedFamily:d,requireMonospace:l,initialOpen:T.current,onSelect:s}):(0,$.jsx)(At,{size:`sm`,"aria-label":`${t} family`,"aria-invalid":S||void 0,autoCapitalize:`off`,autoComplete:`off`,className:`min-w-0 flex-1`,maxLength:200,onFocus:()=>{T.current=!0,ti()},onBlur:()=>{T.current=!1,b()},onChange:e=>{let t=e.currentTarget.value;p(t),h(!1),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,y(t)},400)},onKeyDown:e=>{e.key===`Enter`&&b(),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),g.current!==null&&(window.clearTimeout(g.current),g.current=null),p(o),h(!0))},placeholder:r,spellCheck:!1,value:f}),D=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2 sm:w-auto`,children:[(0,$.jsx)(`div`,{className:`min-w-0 flex-1 sm:w-44 sm:flex-none`,children:E}),(0,$.jsxs)(q,{value:String(u.value),onValueChange:e=>{if(typeof e!=`string`)return;let t=Number(e);Number.isInteger(t)&&t>=u.min&&t<=u.max&&u.onChange(t)},children:[(0,$.jsx)(K,{size:`sm`,className:`w-22 shrink-0`,"aria-label":u.label,children:(0,$.jsxs)(me,{children:[u.value,` px`]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Array.from({length:u.max-u.min+1},(e,t)=>u.min+t).map(e=>(0,$.jsxs)(G,{hideIndicator:!0,value:String(e),children:[e,` px`]},e))})]})]});return(0,$.jsx)(J,{...e===void 0?{}:{id:e},title:t,description:n,resetAction:C,control:D,children:a})}var Ko=c.sidebarAutoSettleAfterDays??3;function qo(e){let t=(0,Z.c)(11),{value:n,onCommit:r}=e,[i,a]=(0,Q.useState)(String(n)),o,s;t[0]===n?(o=t[1],s=t[2]):(o=()=>{a(String(n))},s=[n],t[0]=n,t[1]=o,t[2]=s),(0,Q.useEffect)(o,s);let c;t[3]===r?c=t[4]:(c=e=>{a(e.target.value);let t=Number(e.target.value);Number.isInteger(t)&&t>=1&&t<=90&&r(t)},t[3]=r,t[4]=c);let l;t[5]===n?l=t[6]:(l=()=>a(String(n)),t[5]=n,t[6]=l);let u;return t[7]!==i||t[8]!==c||t[9]!==l?(u=(0,$.jsx)(At,{size:`sm`,type:`number`,min:1,max:90,className:`w-full sm:w-24`,value:i,onChange:c,onBlur:l,"aria-label":`Days of inactivity before auto-settle`}),t[7]=i,t[8]=c,t[9]=l,t[10]=u):u=t[10],u}var Jo=new Set([`legacy-plan-mode`,`legacy-context-window-indicator`]);function Yo(){let e=(0,Z.c)(25),t=Zt(),n=tn(),[r,i]=(0,Q.useState)(!1),a=on(),o=an(`legacy-features`),s=(0,Q.useRef)(null),c,l;e[0]===a?(c=e[1],l=e[2]):(c=()=>{a===null?s.current=null:Jo.has(a)&&s.current!==a&&(s.current=a,i(!0))},l=[a],e[0]=a,e[1]=c,e[2]=l),(0,Q.useEffect)(c,l);let u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(Jn,{className:`group flex min-h-8 w-full items-center gap-2 px-3 sm:px-4`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-normal text-foreground/70 transition-colors group-hover:text-foreground`,children:`Legacy features`}),(0,$.jsx)(C,{className:`size-4 text-muted-foreground transition-transform duration-200 group-data-panel-open:rotate-90`})]}),e[3]=u):u=e[3];let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=X(`legacy-plan-mode`),e[4]=d):d=e[4];let f;e[5]===n?f=e[6]:(f=e=>{n({planModeEnabled:!!e})},e[5]=n,e[6]=f);let p;e[7]!==t.planModeEnabled||e[8]!==f?(p=(0,$.jsx)(J,{...d,description:`Restore Build/Plan, /plan, /default, and Shift+Tab. Off uses build mode.`,control:(0,$.jsx)(Fn,{checked:t.planModeEnabled,onCheckedChange:f,"aria-label":`Plan mode (legacy)`})}),e[7]=t.planModeEnabled,e[8]=f,e[9]=p):p=e[9];let m;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=X(`legacy-context-window-indicator`),e[10]=m):m=e[10];let h;e[11]===n?h=e[12]:(h=e=>n({contextWindowMeterEnabled:!!e}),e[11]=n,e[12]=h);let g;e[13]!==t.contextWindowMeterEnabled||e[14]!==h?(g=(0,$.jsx)(J,{...m,description:`Shows context window usage as a circular indicator in the composer.`,control:(0,$.jsx)(Fn,{checked:t.contextWindowMeterEnabled,onCheckedChange:h,"aria-label":`Context window indicator (legacy)`})}),e[13]=t.contextWindowMeterEnabled,e[14]=h,e[15]=g):g=e[15];let _;e[16]!==p||e[17]!==g?(_=(0,$.jsx)(Vn,{children:(0,$.jsxs)(Qt,{children:[p,g]})}),e[16]=p,e[17]=g,e[18]=_):_=e[18];let v;e[19]!==r||e[20]!==_?(v=(0,$.jsxs)(Nn,{open:r,onOpenChange:i,children:[u,_]}),e[19]=r,e[20]=_,e[21]=v):v=e[21];let y;return e[22]!==v||e[23]!==o?(y=(0,$.jsx)(`section`,{id:`legacy-features`,ref:o,tabIndex:-1,className:`space-y-2.5`,children:v}),e[22]=v,e[23]=o,e[24]=y):y=e[24],y}function Xo(){let e=(0,Z.c)(496),t=E(navigator.platform)?`⌘`:`Ctrl`,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[{value:`enter`,label:`Enter`},{value:`mod-enter-multiline`,label:`${t} + Enter for multiline prompts`},{value:`mod-enter`,label:`${t} + Enter always`}],e[0]=n):n=e[0];let r=n,i=Zt(),a=tn(),o=ye(),{scope:l,environment:u,connectedEnvironments:f,target:g,targets:b}=rn(),S;e[1]!==i||e[2]!==b?(S=b.length>0?b:[{settings:i}],e[1]=i,e[2]=b,e[3]=S):S=e[3];let C;e[4]===S?C=e[5]:(C=nn(S),e[4]=S,e[5]=C);let w=C,D=u?.environmentId??null,O=l.environmentIds.length===1&&D!==null,k=f.length>0,[j,M]=(0,Q.useState)(!1),P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=[`compressMode`],e[6]=P):P=e[6];let F=$t(P),I;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=[`responseStreamingMode`],e[7]=I):I=e[7];let z=$t(I),B;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(B=ur(),e[8]=B):B=e[8];let H=(0,Q.useRef)(B),ee=u?.serverConfig?.providers??ke,W;e[9]===f?W=e[10]:(W=f.length>0&&f.every(cs),e[9]=f,e[10]=W);let te=W,ne;e[11]===f?ne=e[12]:(ne=f.every(ss),e[11]=f,e[12]=ne);let re=ne,ie;e[13]===f?ie=e[14]:(ie=f.length>0&&f.every(os),e[13]=f,e[14]=ie);let oe=ie,se=ee.filter(as),ce=m(i,se),le=ce.instanceId,ue=ce.model,de=ce.options,fe=y(N(h(se),i,g?.projectId??null)),pe=fe.some(is),he=fe.find(e=>e.instanceId===le),_e=he?.driverKind??wo,xe=T(i,se,le,ue),Se;e[15]===i.textGenerationModelSelection?Se=e[16]:(Se=A(i.textGenerationModelSelection??null,c.textGenerationModelSelection??null),e[15]=i.textGenerationModelSelection,e[16]=Se);let Ce=!Se,we=ir(i,fe),Ee=Te(i),De=Ee.profile,Oe;e[17]===i?Oe=e[18]:(Oe=gr(i),e[17]=i,e[18]=Oe);let Ae=Oe,je;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(je=[`backgroundActivity`],e[19]=je):je=e[19];let Me=$t(je),Ne;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=[`addProjectBaseDirectory`],e[20]=Ne):Ne=e[20];let Pe=$t(Ne),Fe;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=[`textGenerationModelSelection`],e[21]=Fe):Fe=e[21];let Ie=$t(Fe),Le=Ae===`advanced`?`${Co} Shared policy: ${bo[De]}.`:So[Ee.profile],Re;e[22]===i.backgroundActivity?Re=e[23]:(Re=A(i.backgroundActivity,c.backgroundActivity),e[22]=i.backgroundActivity,e[23]=Re);let ze=!Re,Be=sn,Ve;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,$.jsx)(ar,{category:`general`}),e[24]=Ve):Ve=e[24];let He;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(He=X(`project-grouping`),e[25]=He):He=e[25];let Ue;e[26]!==i.sidebarProjectGroupingMode||e[27]!==a?(Ue=i.sidebarProjectGroupingMode===c.sidebarProjectGroupingMode?null:(0,$.jsx)(Y,{label:`project grouping`,onClick:()=>a({sidebarProjectGroupingMode:c.sidebarProjectGroupingMode})}),e[26]=i.sidebarProjectGroupingMode,e[27]=a,e[28]=Ue):Ue=e[28];let We;e[29]===i.sidebarProjectGroupingMode?We=e[30]:(We=lr(i.sidebarProjectGroupingMode),e[29]=i.sidebarProjectGroupingMode,e[30]=We);let Ge;e[31]!==i.sidebarProjectGroupingMode||e[32]!==a?(Ge=e=>{!e&&i.sidebarProjectGroupingMode!==`separate`&&(H.current=i.sidebarProjectGroupingMode,dr(i.sidebarProjectGroupingMode)),a({sidebarProjectGroupingMode:yr(e,H.current)})},e[31]=i.sidebarProjectGroupingMode,e[32]=a,e[33]=Ge):Ge=e[33];let Ke;e[34]!==We||e[35]!==Ge?(Ke=(0,$.jsx)(Fn,{checked:We,onCheckedChange:Ge,"aria-label":`Project grouping`}),e[34]=We,e[35]=Ge,e[36]=Ke):Ke=e[36];let qe;e[37]!==Ue||e[38]!==Ke?(qe=(0,$.jsx)(J,{...He,description:`Combine matching repositories across environments.`,resetAction:Ue,control:Ke}),e[37]=Ue,e[38]=Ke,e[39]=qe):qe=e[39];let Je;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(Je=X(`project-order`),e[40]=Je):Je=e[40];let Ye;e[41]!==i.sidebarProjectSortOrder||e[42]!==a?(Ye=i.sidebarProjectSortOrder===c.sidebarProjectSortOrder?null:(0,$.jsx)(Y,{label:`project order`,onClick:()=>a({sidebarProjectSortOrder:c.sidebarProjectSortOrder})}),e[41]=i.sidebarProjectSortOrder,e[42]=a,e[43]=Ye):Ye=e[43];let Xe;e[44]===a?Xe=e[45]:(Xe=e=>{mo(e)&&a({sidebarProjectSortOrder:e})},e[44]=a,e[45]=Xe);let Ze=po[i.sidebarProjectSortOrder],Qe;e[46]===Ze?Qe=e[47]:(Qe=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-44`,"aria-label":`Project order`,children:(0,$.jsx)(me,{children:Ze})}),e[46]=Ze,e[47]=Qe);let $e;e[48]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:d.literals.map(rs)}),e[48]=$e):$e=e[48];let et;e[49]!==i.sidebarProjectSortOrder||e[50]!==Xe||e[51]!==Qe?(et=(0,$.jsxs)(q,{value:i.sidebarProjectSortOrder,onValueChange:Xe,children:[Qe,$e]}),e[49]=i.sidebarProjectSortOrder,e[50]=Xe,e[51]=Qe,e[52]=et):et=e[52];let tt;e[53]!==Ye||e[54]!==et?(tt=(0,$.jsx)(J,{...Je,description:`Order of projects in the sidebar project picker and command palette.`,resetAction:Ye,control:et}),e[53]=Ye,e[54]=et,e[55]=tt):tt=e[55];let nt;e[56]===Symbol.for(`react.memo_cache_sentinel`)?(nt=X(`auto-resume-limited-threads`),e[56]=nt):nt=e[56];let rt;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(rt=[`autoResumeLimitedThreads`],e[57]=rt):rt=e[57];let it;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(it=[`autoResumeLimitedThreads`],e[58]=it):it=e[58];let at;e[59]===a?at=e[60]:(at=e=>a({autoResumeLimitedThreads:!!e}),e[59]=a,e[60]=at);let ot;e[61]!==i.autoResumeLimitedThreads||e[62]!==at?(ot=(0,$.jsx)(J,{serverScoped:!0,...nt,description:`Resume usage-limit stops at the reported reset time. Each thread can cancel its scheduled continuation.`,settingKeys:rt,control:(0,$.jsx)(sr,{settingKeys:it,checked:i.autoResumeLimitedThreads,onCheckedChange:at,"aria-label":`Auto-resume limited threads`})}),e[61]=i.autoResumeLimitedThreads,e[62]=at,e[63]=ot):ot=e[63];let st;e[64]===Symbol.for(`react.memo_cache_sentinel`)?(st=X(`snooze-limited-threads`),e[64]=st):st=e[64];let ct;e[65]===Symbol.for(`react.memo_cache_sentinel`)?(ct=[`snoozeLimitedThreads`],e[65]=ct):ct=e[65];let lt;e[66]===Symbol.for(`react.memo_cache_sentinel`)?(lt=[`snoozeLimitedThreads`],e[66]=lt):lt=e[66];let ut;e[67]===a?ut=e[68]:(ut=e=>a({snoozeLimitedThreads:!!e}),e[67]=a,e[68]=ut);let dt;e[69]!==i.snoozeLimitedThreads||e[70]!==ut?(dt=(0,$.jsx)(J,{serverScoped:!0,...st,description:`Snooze usage-limit stops until the reported reset time. Combine with auto-resume to continue when they wake.`,settingKeys:ct,control:(0,$.jsx)(sr,{settingKeys:lt,checked:i.snoozeLimitedThreads,onCheckedChange:ut,"aria-label":`Snooze limited threads`})}),e[69]=i.snoozeLimitedThreads,e[70]=ut,e[71]=dt):dt=e[71];let ft;e[72]===Symbol.for(`react.memo_cache_sentinel`)?(ft=X(`working-shelf`),e[72]=ft):ft=e[72];let pt;e[73]!==i.sidebarWorkingShelfEnabled||e[74]!==a?(pt=i.sidebarWorkingShelfEnabled===c.sidebarWorkingShelfEnabled?null:(0,$.jsx)(Y,{label:`working section`,onClick:()=>a({sidebarWorkingShelfEnabled:c.sidebarWorkingShelfEnabled})}),e[73]=i.sidebarWorkingShelfEnabled,e[74]=a,e[75]=pt):pt=e[75];let mt;e[76]===a?mt=e[77]:(mt=e=>a({sidebarWorkingShelfEnabled:!!e}),e[76]=a,e[77]=mt);let ht;e[78]!==i.sidebarWorkingShelfEnabled||e[79]!==mt?(ht=(0,$.jsx)(Fn,{checked:i.sidebarWorkingShelfEnabled,onCheckedChange:mt,"aria-label":`Working section (beta)`}),e[78]=i.sidebarWorkingShelfEnabled,e[79]=mt,e[80]=ht):ht=e[80];let gt;e[81]!==pt||e[82]!==ht?(gt=(0,$.jsx)(J,{...ft,description:`Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you.`,resetAction:pt,control:ht}),e[81]=pt,e[82]=ht,e[83]=gt):gt=e[83];let _t;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(_t=[`idleCompaction`,`compactIdleThreads`],e[84]=_t):_t=e[84];let xt=w.mixed,Ct;e[85]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=X(`compact-idle-threads`),e[85]=Ct):Ct=e[85];let wt;e[86]!==i||e[87]!==a?(wt=_(i)===_(c)?null:(0,$.jsx)(Y,{label:`compact idle threads`,onClick:()=>a({idleCompaction:_(c)})}),e[86]=i,e[87]=a,e[88]=wt):wt=e[88];let Tt;e[89]!==w.mixed||e[90]!==i?(Tt=w.mixed?null:_(i),e[89]=w.mixed,e[90]=i,e[91]=Tt):Tt=e[91];let Et;e[92]===a?Et=e[93]:(Et=e=>{let t=x.find(t=>t.value===e);t&&a({idleCompaction:t.value})},e[92]=a,e[93]=Et);let Dt;e[94]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Compact idle threads`,children:(0,$.jsx)(me,{children:ns})}),e[94]=Dt):Dt=e[94];let Ot;e[95]===w.neverAvailable?Ot=e[96]:(Ot=x.map(e=>(0,$.jsx)(G,{hideIndicator:!0,value:e.value,disabled:e.value===`off`&&!w.neverAvailable,children:e.label},e.value)),e[95]=w.neverAvailable,e[96]=Ot);let kt;e[97]===Ot?kt=e[98]:(kt=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Ot}),e[97]=Ot,e[98]=kt);let At;e[99]!==Tt||e[100]!==Et||e[101]!==kt?(At=(0,$.jsxs)(q,{value:Tt,onValueChange:Et,children:[Dt,kt]}),e[99]=Tt,e[100]=Et,e[101]=kt,e[102]=At):At=e[102];let jt;e[103]!==w.mixed||e[104]!==wt||e[105]!==At?(jt=(0,$.jsx)(J,{serverScoped:!0,settingKeys:_t,mixed:xt,...Ct,description:`When to compact an idle Claude thread over 200,000 tokens: after you return, just before its prompt cache expires, or never. Each Claude provider can override this.`,resetAction:wt,control:At}),e[103]=w.mixed,e[104]=wt,e[105]=At,e[106]=jt):jt=e[106];let Mt;e[107]!==i.sidebarAutoSettleAfterDays||e[108]!==i.sidebarAutoSettleKeepPullRequests||e[109]!==i.sidebarAutoSettleOnMerge||e[110]!==te||e[111]!==re||e[112]!==a?(Mt=te?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleOnMerge`],...X(`auto-settle-merged-threads`),description:`Settle a thread when its pull request merges. Closed pull requests still settle automatically.`,resetAction:i.sidebarAutoSettleOnMerge===c.sidebarAutoSettleOnMerge?null:(0,$.jsx)(Y,{label:`auto-settle on merge`,onClick:()=>a({sidebarAutoSettleOnMerge:c.sidebarAutoSettleOnMerge})}),control:(0,$.jsx)(sr,{settingKeys:[`sidebarAutoSettleOnMerge`],checked:i.sidebarAutoSettleOnMerge,onCheckedChange:e=>a({sidebarAutoSettleOnMerge:!!e}),"aria-label":`Auto-settle merged threads`})}),(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],...X(`auto-settle-inactive-threads`),description:`Sidebar threads with no activity for this long settle automatically.`,resetAction:i.sidebarAutoSettleAfterDays===c.sidebarAutoSettleAfterDays?null:(0,$.jsx)(Y,{label:`auto-settle`,onClick:()=>a({sidebarAutoSettleAfterDays:c.sidebarAutoSettleAfterDays})}),control:(0,$.jsx)(sr,{settingKeys:[`sidebarAutoSettleAfterDays`],checked:i.sidebarAutoSettleAfterDays!==null,onCheckedChange:e=>a({sidebarAutoSettleAfterDays:e?Ko:null}),"aria-label":`Auto-settle inactive threads`})}),i.sidebarAutoSettleAfterDays===null?null:(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleAfterDays`],title:X(`days-before-auto-settle`).title,description:`Any new activity un-settles a thread automatically.`,control:(0,$.jsx)(qo,{value:i.sidebarAutoSettleAfterDays,onCommit:e=>a({sidebarAutoSettleAfterDays:e})})}),i.sidebarAutoSettleAfterDays!==null&&re?(0,$.jsx)(J,{serverScoped:!0,settingKeys:[`sidebarAutoSettleKeepPullRequests`],title:`Keep threads with a PR`,description:`Inactivity does not settle threads with a pull request. Merge and close still do.`,control:(0,$.jsx)(sr,{settingKeys:[`sidebarAutoSettleKeepPullRequests`],checked:i.sidebarAutoSettleKeepPullRequests,onCheckedChange:e=>a({sidebarAutoSettleKeepPullRequests:e}),"aria-label":`Keep threads with a PR`})}):null]}):null,e[107]=i.sidebarAutoSettleAfterDays,e[108]=i.sidebarAutoSettleKeepPullRequests,e[109]=i.sidebarAutoSettleOnMerge,e[110]=te,e[111]=re,e[112]=a,e[113]=Mt):Mt=e[113];let Nt;e[114]!==qe||e[115]!==tt||e[116]!==ot||e[117]!==dt||e[118]!==gt||e[119]!==jt||e[120]!==Mt?(Nt=(0,$.jsxs)(ln,{id:`organization`,title:`Organization`,children:[qe,tt,ot,dt,gt,jt,Mt]}),e[114]=qe,e[115]=tt,e[116]=ot,e[117]=dt,e[118]=gt,e[119]=jt,e[120]=Mt,e[121]=Nt):Nt=e[121];let Pt;e[122]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,$.jsx)(Sr,{}),e[122]=Pt):Pt=e[122];let Ft;e[123]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=X(`in-app-notifications`),e[123]=Ft):Ft=e[123];let It;e[124]===a?It=e[125]:(It=e=>a({inAppNotificationsEnabled:e}),e[124]=a,e[125]=It);let Lt;e[126]!==i.inAppNotificationsEnabled||e[127]!==It?(Lt=(0,$.jsx)(J,{...Ft,description:`Show a toast when another thread finishes, fails, or needs input or approval while this app has focus.`,control:(0,$.jsx)(Fn,{checked:i.inAppNotificationsEnabled,onCheckedChange:It,"aria-label":`In-app notifications`})}),e[126]=i.inAppNotificationsEnabled,e[127]=It,e[128]=Lt):Lt=e[128];let Rt;e[129]!==i.wakeScreenOnThreadEvents||e[130]!==a?(Rt=window.desktopBridge?.wakeDisplay?(0,$.jsx)(J,{...X(`wake-screen`),description:`Keep the Mac awake while threads run, and wake it when one finishes or needs you.`,control:(0,$.jsx)(Fn,{checked:i.wakeScreenOnThreadEvents,onCheckedChange:e=>a({wakeScreenOnThreadEvents:e}),"aria-label":`Auto awake`})}):null,e[129]=i.wakeScreenOnThreadEvents,e[130]=a,e[131]=Rt):Rt=e[131];let zt;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(zt=X(`time-format`),e[132]=zt):zt=e[132];let Bt;e[133]!==i.timestampFormat||e[134]!==a?(Bt=i.timestampFormat===c.timestampFormat?null:(0,$.jsx)(Y,{label:`time format`,onClick:()=>a({timestampFormat:c.timestampFormat})}),e[133]=i.timestampFormat,e[134]=a,e[135]=Bt):Bt=e[135];let Vt;e[136]===a?Vt=e[137]:(Vt=e=>{(e===`locale`||e===`12-hour`||e===`24-hour`)&&a({timestampFormat:e})},e[136]=a,e[137]=Vt);let Ht=ho[i.timestampFormat],Ut;e[138]===Ht?Ut=e[139]:(Ut=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Timestamp format`,children:(0,$.jsx)(me,{children:Ht})}),e[138]=Ht,e[139]=Ut);let Wt;e[140]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`locale`,children:ho.locale}),(0,$.jsx)(G,{hideIndicator:!0,value:`12-hour`,children:ho[`12-hour`]}),(0,$.jsx)(G,{hideIndicator:!0,value:`24-hour`,children:ho[`24-hour`]})]}),e[140]=Wt):Wt=e[140];let Gt;e[141]!==i.timestampFormat||e[142]!==Vt||e[143]!==Ut?(Gt=(0,$.jsxs)(q,{value:i.timestampFormat,onValueChange:Vt,children:[Ut,Wt]}),e[141]=i.timestampFormat,e[142]=Vt,e[143]=Ut,e[144]=Gt):Gt=e[144];let Kt;e[145]!==Bt||e[146]!==Gt?(Kt=(0,$.jsx)(J,{...zt,description:`System default follows your browser or OS clock preference.`,resetAction:Bt,control:Gt}),e[145]=Bt,e[146]=Gt,e[147]=Kt):Kt=e[147];let qt,Jt;e[148]===Symbol.for(`react.memo_cache_sentinel`)?(qt=[`compressMode`],Jt=X(`response-compression`),e[148]=qt,e[149]=Jt):(qt=e[148],Jt=e[149]);let Yt=F?null:i.compressMode,Xt;e[150]===a?Xt=e[151]:(Xt=e=>{L.literals.some(t=>t===e)&&a({compressMode:e})},e[150]=a,e[151]=Xt);let Qt;e[152]===Symbol.for(`react.memo_cache_sentinel`)?(Qt=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response compression`,children:(0,$.jsx)(me,{children:ts})}),e[152]=Qt):Qt=e[152];let en;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(en=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:L.literals.map(es)}),e[153]=en):en=e[153];let an;e[154]!==Yt||e[155]!==Xt?(an=(0,$.jsx)(J,{serverScoped:!0,settingKeys:qt,...Jt,description:`Response style for all threads on this server, starting next turn. Code and saved documents retain normal prose.`,control:(0,$.jsxs)(q,{value:Yt,onValueChange:Xt,children:[Qt,en]})}),e[154]=Yt,e[155]=Xt,e[156]=an):an=e[156];let on,dn;e[157]===Symbol.for(`react.memo_cache_sentinel`)?(on=[`responseStreamingMode`],dn=X(`response-streaming`),e[157]=on,e[158]=dn):(on=e[157],dn=e[158]);let fn=z?`The selected targets use different streaming modes.`:fo[i.responseStreamingMode],mn;e[159]!==i.responseStreamingMode||e[160]!==a?(mn=i.responseStreamingMode===c.responseStreamingMode?null:(0,$.jsx)(Y,{label:`response streaming`,onClick:()=>a({responseStreamingMode:c.responseStreamingMode})}),e[159]=i.responseStreamingMode,e[160]=a,e[161]=mn):mn=e[161];let hn=z?null:i.responseStreamingMode,gn;e[162]===a?gn=e[163]:(gn=e=>{(e===`turn`||e===`paragraph`)&&a({responseStreamingMode:e})},e[162]=a,e[163]=gn);let _n;e[164]===Symbol.for(`react.memo_cache_sentinel`)?(_n=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`Response streaming`,children:(0,$.jsx)(me,{children:$o})}),e[164]=_n):_n=e[164];let vn;e[165]===Symbol.for(`react.memo_cache_sentinel`)?(vn=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`turn`,children:uo.turn}),(0,$.jsx)(G,{hideIndicator:!0,value:`paragraph`,children:uo.paragraph})]}),e[165]=vn):vn=e[165];let yn;e[166]!==hn||e[167]!==gn?(yn=(0,$.jsxs)(q,{value:hn,onValueChange:gn,children:[_n,vn]}),e[166]=hn,e[167]=gn,e[168]=yn):yn=e[168];let bn;e[169]!==fn||e[170]!==mn||e[171]!==yn?(bn=(0,$.jsx)(J,{serverScoped:!0,settingKeys:on,...dn,description:fn,resetAction:mn,control:yn}),e[169]=fn,e[170]=mn,e[171]=yn,e[172]=bn):bn=e[172];let xn;e[173]===Symbol.for(`react.memo_cache_sentinel`)?(xn=X(`hide-whitespace-changes`),e[173]=xn):xn=e[173];let Sn;e[174]!==i.diffIgnoreWhitespace||e[175]!==a?(Sn=i.diffIgnoreWhitespace===c.diffIgnoreWhitespace?null:(0,$.jsx)(Y,{label:`diff whitespace changes`,onClick:()=>a({diffIgnoreWhitespace:c.diffIgnoreWhitespace})}),e[174]=i.diffIgnoreWhitespace,e[175]=a,e[176]=Sn):Sn=e[176];let Cn;e[177]===a?Cn=e[178]:(Cn=e=>a({diffIgnoreWhitespace:!!e}),e[177]=a,e[178]=Cn);let wn;e[179]!==i.diffIgnoreWhitespace||e[180]!==Cn?(wn=(0,$.jsx)(Fn,{checked:i.diffIgnoreWhitespace,onCheckedChange:Cn,"aria-label":`Hide whitespace changes by default`}),e[179]=i.diffIgnoreWhitespace,e[180]=Cn,e[181]=wn):wn=e[181];let Tn;e[182]!==Sn||e[183]!==wn?(Tn=(0,$.jsx)(J,{...xn,description:`Set whether the diff panel ignores whitespace-only edits by default.`,resetAction:Sn,control:wn}),e[182]=Sn,e[183]=wn,e[184]=Tn):Tn=e[184];let En;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(En=X(`default-diff-file-state`),e[185]=En):En=e[185];let Dn;e[186]!==i.diffFilesCollapsed||e[187]!==a?(Dn=i.diffFilesCollapsed===c.diffFilesCollapsed?null:(0,$.jsx)(Y,{label:`default diff file state`,onClick:()=>a({diffFilesCollapsed:c.diffFilesCollapsed})}),e[186]=i.diffFilesCollapsed,e[187]=a,e[188]=Dn):Dn=e[188];let On=i.diffFilesCollapsed?`collapsed`:`expanded`,kn;e[189]===a?kn=e[190]:(kn=e=>{(e===`expanded`||e===`collapsed`)&&a({diffFilesCollapsed:e===`collapsed`})},e[189]=a,e[190]=kn);let An=i.diffFilesCollapsed?`Collapsed`:`Expanded`,jn;e[191]===An?jn=e[192]:(jn=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Default diff file state`,children:(0,$.jsx)(me,{children:An})}),e[191]=An,e[192]=jn);let Mn;e[193]===Symbol.for(`react.memo_cache_sentinel`)?(Mn=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`expanded`,children:`Expanded`}),(0,$.jsx)(G,{hideIndicator:!0,value:`collapsed`,children:`Collapsed`})]}),e[193]=Mn):Mn=e[193];let Nn;e[194]!==On||e[195]!==kn||e[196]!==jn?(Nn=(0,$.jsxs)(q,{value:On,onValueChange:kn,children:[jn,Mn]}),e[194]=On,e[195]=kn,e[196]=jn,e[197]=Nn):Nn=e[197];let Pn;e[198]!==Nn||e[199]!==Dn?(Pn=(0,$.jsx)(J,{...En,description:`Start with files expanded or collapsed when opening diffs or a pull request's Code tab.`,resetAction:Dn,control:Nn}),e[198]=Nn,e[199]=Dn,e[200]=Pn):Pn=e[200];let In;e[201]===Symbol.for(`react.memo_cache_sentinel`)?(In=X(`diff-layout`),e[201]=In):In=e[201];let Ln;e[202]!==i.diffLayout||e[203]!==a?(Ln=i.diffLayout===c.diffLayout?null:(0,$.jsx)(Y,{label:`diff layout`,onClick:()=>a({diffLayout:c.diffLayout})}),e[202]=i.diffLayout,e[203]=a,e[204]=Ln):Ln=e[204];let Rn;e[205]===a?Rn=e[206]:(Rn=e=>{(e===`stacked`||e===`split`)&&a({diffLayout:e})},e[205]=a,e[206]=Rn);let zn=vo[i.diffLayout],Bn;e[207]===zn?Bn=e[208]:(Bn=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Diff layout`,children:(0,$.jsx)(me,{children:zn})}),e[207]=zn,e[208]=Bn);let Vn;e[209]===Symbol.for(`react.memo_cache_sentinel`)?(Vn=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{hideIndicator:!0,value:`stacked`,children:vo.stacked}),(0,$.jsx)(G,{hideIndicator:!0,value:`split`,children:vo.split})]}),e[209]=Vn):Vn=e[209];let Hn;e[210]!==i.diffLayout||e[211]!==Rn||e[212]!==Bn?(Hn=(0,$.jsxs)(q,{value:i.diffLayout,onValueChange:Rn,children:[Bn,Vn]}),e[210]=i.diffLayout,e[211]=Rn,e[212]=Bn,e[213]=Hn):Hn=e[213];let Un;e[214]!==Ln||e[215]!==Hn?(Un=(0,$.jsx)(J,{...In,description:`Show diffs stacked or side by side. The toggle in the diff toolbar changes this too.`,resetAction:Ln,control:Hn}),e[214]=Ln,e[215]=Hn,e[216]=Un):Un=e[216];let Wn;e[217]===Symbol.for(`react.memo_cache_sentinel`)?(Wn=X(`proactive-panels`),e[217]=Wn):Wn=e[217];let Gn;e[218]!==i.proactivePanelsEnabled||e[219]!==a?(Gn=i.proactivePanelsEnabled===c.proactivePanelsEnabled?null:(0,$.jsx)(Y,{label:`proactive panels`,onClick:()=>a({proactivePanelsEnabled:c.proactivePanelsEnabled})}),e[218]=i.proactivePanelsEnabled,e[219]=a,e[220]=Gn):Gn=e[220];let Kn;e[221]===a?Kn=e[222]:(Kn=e=>a({proactivePanelsEnabled:!!e}),e[221]=a,e[222]=Kn);let qn;e[223]!==i.proactivePanelsEnabled||e[224]!==Kn?(qn=(0,$.jsx)(Fn,{checked:i.proactivePanelsEnabled,onCheckedChange:Kn,"aria-label":`Proactive panels`}),e[223]=i.proactivePanelsEnabled,e[224]=Kn,e[225]=qn):qn=e[225];let Jn;e[226]!==Gn||e[227]!==qn?(Jn=(0,$.jsx)(J,{...Wn,description:`Open linked pull requests first. Otherwise, open Changes for edits to at least 3 files or 50 lines.`,resetAction:Gn,control:qn}),e[226]=Gn,e[227]=qn,e[228]=Jn):Jn=e[228];let Xn;e[229]===Symbol.for(`react.memo_cache_sentinel`)?(Xn=X(`skills-in-slash-menu`),e[229]=Xn):Xn=e[229];let Zn;e[230]!==i.showSkillsInSlashMenu||e[231]!==a?(Zn=i.showSkillsInSlashMenu===c.showSkillsInSlashMenu?null:(0,$.jsx)(Y,{label:`skills in slash menu`,onClick:()=>a({showSkillsInSlashMenu:c.showSkillsInSlashMenu})}),e[230]=i.showSkillsInSlashMenu,e[231]=a,e[232]=Zn):Zn=e[232];let Qn;e[233]===a?Qn=e[234]:(Qn=e=>a({showSkillsInSlashMenu:!!e}),e[233]=a,e[234]=Qn);let $n;e[235]!==i.showSkillsInSlashMenu||e[236]!==Qn?($n=(0,$.jsx)(Fn,{checked:i.showSkillsInSlashMenu,onCheckedChange:Qn,"aria-label":`Show skills in slash menu`}),e[235]=i.showSkillsInSlashMenu,e[236]=Qn,e[237]=$n):$n=e[237];let tr;e[238]!==Zn||e[239]!==$n?(tr=(0,$.jsx)(J,{...Xn,description:`Also include skills in the / command menu. Skills always appear when you type $.`,resetAction:Zn,control:$n}),e[238]=Zn,e[239]=$n,e[240]=tr):tr=e[240];let nr;e[241]===Symbol.for(`react.memo_cache_sentinel`)?(nr=X(`composer-rich-text`),e[241]=nr):nr=e[241];let cr;e[242]!==i.composerRichTextEnabled||e[243]!==a?(cr=i.composerRichTextEnabled===c.composerRichTextEnabled?null:(0,$.jsx)(Y,{label:`rich text composer`,onClick:()=>a({composerRichTextEnabled:c.composerRichTextEnabled})}),e[242]=i.composerRichTextEnabled,e[243]=a,e[244]=cr):cr=e[244];let fr;e[245]===a?fr=e[246]:(fr=e=>a({composerRichTextEnabled:!!e}),e[245]=a,e[246]=fr);let pr;e[247]!==i.composerRichTextEnabled||e[248]!==fr?(pr=(0,$.jsx)(Fn,{checked:i.composerRichTextEnabled,onCheckedChange:fr,"aria-label":`Rich text composer`}),e[247]=i.composerRichTextEnabled,e[248]=fr,e[249]=pr):pr=e[249];let mr;e[250]!==cr||e[251]!==pr?(mr=(0,$.jsx)(J,{...nr,description:`Show formatted Markdown as you type.`,resetAction:cr,control:pr}),e[250]=cr,e[251]=pr,e[252]=mr):mr=e[252];let hr;e[253]===Symbol.for(`react.memo_cache_sentinel`)?(hr=X(`composer-collapse`),e[253]=hr):hr=e[253];let _r;e[254]!==i.composerCollapseOnScroll||e[255]!==a?(_r=i.composerCollapseOnScroll===c.composerCollapseOnScroll?null:(0,$.jsx)(Y,{label:`collapse composer on scroll`,onClick:()=>a({composerCollapseOnScroll:c.composerCollapseOnScroll})}),e[254]=i.composerCollapseOnScroll,e[255]=a,e[256]=_r):_r=e[256];let vr;e[257]===a?vr=e[258]:(vr=e=>a({composerCollapseOnScroll:!!e}),e[257]=a,e[258]=vr);let br;e[259]!==i.composerCollapseOnScroll||e[260]!==vr?(br=(0,$.jsx)(Fn,{checked:i.composerCollapseOnScroll,onCheckedChange:vr,"aria-label":`Collapse composer on scroll`}),e[259]=i.composerCollapseOnScroll,e[260]=vr,e[261]=br):br=e[261];let xr;e[262]!==_r||e[263]!==br?(xr=(0,$.jsx)(J,{...hr,description:`Rest the composer of an existing thread into a single line when you scroll the conversation. Focus the composer or start typing to expand it again.`,resetAction:_r,control:br}),e[262]=_r,e[263]=br,e[264]=xr):xr=e[264];let Cr;e[265]===Symbol.for(`react.memo_cache_sentinel`)?(Cr=X(`send-shortcut`),e[265]=Cr):Cr=e[265];let wr;e[266]!==i.sendShortcut||e[267]!==a?(wr=i.sendShortcut===c.sendShortcut?null:(0,$.jsx)(Y,{label:`send shortcut`,onClick:()=>a({sendShortcut:c.sendShortcut})}),e[266]=i.sendShortcut,e[267]=a,e[268]=wr):wr=e[268];let Tr;e[269]===a?Tr=e[270]:(Tr=e=>{let t=r.find(t=>t.value===e);t&&a({sendShortcut:t.value})},e[269]=a,e[270]=Tr);let Er=r.find(e=>e.value===i.sendShortcut)?.label,Dr;e[271]===Er?Dr=e[272]:(Dr=(0,$.jsx)(K,{size:`sm`,className:`w-auto min-w-0 max-w-full`,"aria-label":`Send shortcut`,children:(0,$.jsx)(me,{children:Er})}),e[271]=Er,e[272]=Dr);let Or;e[273]===i.sendShortcut?Or=e[274]:(Or=(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:r.map(e=>(0,$.jsx)(G,{value:e.value,children:(0,$.jsxs)(`span`,{className:`flex items-center justify-between gap-4`,children:[e.label,i.sendShortcut===e.value&&(0,$.jsx)(s,{"aria-hidden":`true`})]})},e.value))}),e[273]=i.sendShortcut,e[274]=Or);let kr;e[275]!==i.sendShortcut||e[276]!==Tr||e[277]!==Dr||e[278]!==Or?(kr=(0,$.jsxs)(q,{value:i.sendShortcut,onValueChange:Tr,children:[Dr,Or]}),e[275]=i.sendShortcut,e[276]=Tr,e[277]=Dr,e[278]=Or,e[279]=kr):kr=e[279];let Ar;e[280]!==wr||e[281]!==kr?(Ar=(0,$.jsx)(J,{...Cr,description:`Choose when Enter sends a prompt or inserts a new line`,resetAction:wr,control:kr}),e[280]=wr,e[281]=kr,e[282]=Ar):Ar=e[282];let jr;e[283]===Symbol.for(`react.memo_cache_sentinel`)?(jr=X(`follow-up-behavior`),e[283]=jr):jr=e[283];let Mr=`Queue follow-ups while the agent runs or steer the current run. `+(i.sendShortcut===`mod-enter-multiline`?`Press ${t} + Enter for single-line prompts or ${t} + Shift + Enter for multiline prompts to do the opposite for one message.`:`Press ${t}${i.sendShortcut===`mod-enter`?` + Shift`:``} + Enter to do the opposite for one message.`),Nr;e[284]!==i.followUpBehavior||e[285]!==a?(Nr=i.followUpBehavior===c.followUpBehavior?null:(0,$.jsx)(Y,{label:`follow-up behavior`,onClick:()=>a({followUpBehavior:c.followUpBehavior})}),e[284]=i.followUpBehavior,e[285]=a,e[286]=Nr):Nr=e[286];let Pr;e[287]===a?Pr=e[288]:(Pr=e=>{(e===`queue`||e===`steer`)&&a({followUpBehavior:e})},e[287]=a,e[288]=Pr);let Fr=i.followUpBehavior===`queue`?`Queue`:`Steer`,Ir;e[289]===Fr?Ir=e[290]:(Ir=(0,$.jsx)(K,{size:`sm`,className:`w-auto min-w-0`,"aria-label":`Follow-up behavior`,children:(0,$.jsx)(me,{children:Fr})}),e[289]=Fr,e[290]=Ir);let Lr;e[291]===Symbol.for(`react.memo_cache_sentinel`)?(Lr=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(G,{value:`queue`,children:`Queue`}),(0,$.jsx)(G,{value:`steer`,children:`Steer`})]}),e[291]=Lr):Lr=e[291];let Rr;e[292]!==i.followUpBehavior||e[293]!==Pr||e[294]!==Ir?(Rr=(0,$.jsxs)(q,{value:i.followUpBehavior,onValueChange:Pr,children:[Ir,Lr]}),e[292]=i.followUpBehavior,e[293]=Pr,e[294]=Ir,e[295]=Rr):Rr=e[295];let zr;e[296]!==Mr||e[297]!==Nr||e[298]!==Rr?(zr=(0,$.jsx)(J,{...jr,description:Mr,resetAction:Nr,control:Rr}),e[296]=Mr,e[297]=Nr,e[298]=Rr,e[299]=zr):zr=e[299];let Br,Vr;e[300]===Symbol.for(`react.memo_cache_sentinel`)?(Br=[`enableProviderUpdateChecks`],Vr=X(`provider-update-checks`),e[300]=Br,e[301]=Vr):(Br=e[300],Vr=e[301]);let Hr;e[302]!==i.enableProviderUpdateChecks||e[303]!==a?(Hr=i.enableProviderUpdateChecks===c.enableProviderUpdateChecks?null:(0,$.jsx)(Y,{label:`provider update checks`,onClick:()=>a({enableProviderUpdateChecks:c.enableProviderUpdateChecks})}),e[302]=i.enableProviderUpdateChecks,e[303]=a,e[304]=Hr):Hr=e[304];let Ur;e[305]===Symbol.for(`react.memo_cache_sentinel`)?(Ur=[`enableProviderUpdateChecks`],e[305]=Ur):Ur=e[305];let Wr;e[306]===a?Wr=e[307]:(Wr=e=>a({enableProviderUpdateChecks:!!e}),e[306]=a,e[307]=Wr);let Gr;e[308]!==i.enableProviderUpdateChecks||e[309]!==Wr?(Gr=(0,$.jsx)(sr,{settingKeys:Ur,checked:i.enableProviderUpdateChecks,onCheckedChange:Wr,"aria-label":`Check provider versions`}),e[308]=i.enableProviderUpdateChecks,e[309]=Wr,e[310]=Gr):Gr=e[310];let Kr;e[311]!==Hr||e[312]!==Gr?(Kr=(0,$.jsx)(J,{serverScoped:!0,settingKeys:Br,...Vr,description:`Check installed provider CLIs for newer available versions and fetch model catalog updates. When off, new models may not appear.`,resetAction:Hr,control:Gr}),e[311]=Hr,e[312]=Gr,e[313]=Kr):Kr=e[313];let qr;e[314]===Symbol.for(`react.memo_cache_sentinel`)?(qr=X(`continue-threads-after-server-update`),e[314]=qr):qr=e[314];let Jr;e[315]===Symbol.for(`react.memo_cache_sentinel`)?(Jr=[`continueThreadsAfterServerUpdate`],e[315]=Jr):Jr=e[315];let Yr=oe?void 0:`All selected connected environments must support restart continuation.`,Xr;e[316]!==i.continueThreadsAfterServerUpdate||e[317]!==oe||e[318]!==a?(Xr=oe&&i.continueThreadsAfterServerUpdate!==c.continueThreadsAfterServerUpdate?(0,$.jsx)(Y,{label:`continue threads after restarts`,onClick:()=>a({continueThreadsAfterServerUpdate:c.continueThreadsAfterServerUpdate})}):null,e[316]=i.continueThreadsAfterServerUpdate,e[317]=oe,e[318]=a,e[319]=Xr):Xr=e[319];let Zr;e[320]===Symbol.for(`react.memo_cache_sentinel`)?(Zr=[`continueThreadsAfterServerUpdate`],e[320]=Zr):Zr=e[320];let Qr=!oe,$r;e[321]===a?$r=e[322]:($r=e=>a({continueThreadsAfterServerUpdate:!!e}),e[321]=a,e[322]=$r);let ei;e[323]!==i.continueThreadsAfterServerUpdate||e[324]!==Qr||e[325]!==$r?(ei=(0,$.jsx)(sr,{settingKeys:Zr,checked:i.continueThreadsAfterServerUpdate,disabled:Qr,onCheckedChange:$r,"aria-label":`Continue threads after restarts`}),e[323]=i.continueThreadsAfterServerUpdate,e[324]=Qr,e[325]=$r,e[326]=ei):ei=e[326];let ti;e[327]!==Yr||e[328]!==Xr||e[329]!==ei?(ti=(0,$.jsx)(J,{...qr,serverScoped:!0,settingKeys:Jr,description:`Automatically resume interrupted threads after an update, crash, or machine restart on the selected environments.`,status:Yr,resetAction:Xr,control:ei}),e[327]=Yr,e[328]=Xr,e[329]=ei,e[330]=ti):ti=e[330];let ni,ri;e[331]===Symbol.for(`react.memo_cache_sentinel`)?(ni=[`backgroundActivity`],ri=X(`background-activity`),e[331]=ni,e[332]=ri):(ni=e[331],ri=e[332]);let ii=ri.id,ai;e[333]===Symbol.for(`react.memo_cache_sentinel`)?(ai=X(`background-activity`),e[333]=ai):ai=e[333];let oi;e[334]===Symbol.for(`react.memo_cache_sentinel`)?(oi=(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[ai.title,(0,$.jsx)(un,{children:`This shared policy gates background work such as Git refreshes and provider health probes after their individual intervals elapse.`})]}),e[334]=oi):oi=e[334];let si;e[335]!==ze||e[336]!==a?(si=ze?(0,$.jsx)(Y,{label:`background activity`,onClick:()=>a(Eo())}):null,e[335]=ze,e[336]=a,e[337]=si):si=e[337];let ci=Me?null:Ae,li;e[338]!==O||e[339]!==a?(li=e=>{e===`advanced`?O&&M(!0):(e===`balanced`||e===`performance`||e===`battery-saver`)&&a(Do(e))},e[338]=O,e[339]=a,e[340]=li):li=e[340];let ui;e[341]===Symbol.for(`react.memo_cache_sentinel`)?(ui=(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Background activity profile`,children:(0,$.jsx)(me,{children:Qo})}),e[341]=ui):ui=e[341];let di,fi,pi;e[342]===Symbol.for(`react.memo_cache_sentinel`)?(di=(0,$.jsx)(G,{hideIndicator:!0,value:`balanced`,children:bo.balanced}),fi=(0,$.jsx)(G,{hideIndicator:!0,value:`performance`,children:bo.performance}),pi=(0,$.jsx)(G,{hideIndicator:!0,value:`battery-saver`,children:bo[`battery-saver`]}),e[342]=di,e[343]=fi,e[344]=pi):(di=e[342],fi=e[343],pi=e[344]);let mi=!O,hi=O?xo.advanced:`${xo.advanced} (one environment)`,gi;e[345]!==mi||e[346]!==hi?(gi=(0,$.jsxs)(ge,{align:`end`,alignItemWithTrigger:!1,children:[di,fi,pi,(0,$.jsx)(G,{hideIndicator:!0,value:`advanced`,disabled:mi,children:hi})]}),e[345]=mi,e[346]=hi,e[347]=gi):gi=e[347];let _i;e[348]!==ci||e[349]!==li||e[350]!==gi?(_i=(0,$.jsxs)(q,{value:ci,onValueChange:li,children:[ui,gi]}),e[348]=ci,e[349]=li,e[350]=gi,e[351]=_i):_i=e[351];let vi;e[352]!==Ae||e[353]!==O?(vi=Ae===`advanced`&&O?(0,$.jsxs)(St,{children:[(0,$.jsx)(yt,{render:(0,$.jsx)(R,{size:`icon-sm`,variant:`outline`,"aria-label":`Configure advanced background activity`,onClick:()=>M(!0),children:(0,$.jsx)(V,{className:`size-4`})})}),(0,$.jsx)(bt,{side:`top`,children:`Configure background activity`})]}):null,e[352]=Ae,e[353]=O,e[354]=vi):vi=e[354];let yi=j&&O,bi;e[355]===yi?bi=e[356]:(bi=(0,$.jsx)(jo,{open:yi,onOpenChange:M}),e[355]=yi,e[356]=bi);let xi;e[357]!==_i||e[358]!==vi||e[359]!==bi?(xi=(0,$.jsxs)($.Fragment,{children:[_i,vi,bi]}),e[357]=_i,e[358]=vi,e[359]=bi,e[360]=xi):xi=e[360];let Si;e[361]!==Le||e[362]!==si||e[363]!==xi?(Si=(0,$.jsx)(J,{serverScoped:!0,settingKeys:ni,id:ii,title:oi,description:Le,resetAction:si,control:xi}),e[361]=Le,e[362]=si,e[363]=xi,e[364]=Si):Si=e[364];let Ci;e[365]!==Pn||e[366]!==Un||e[367]!==Jn||e[368]!==tr||e[369]!==mr||e[370]!==xr||e[371]!==Ar||e[372]!==zr||e[373]!==Kr||e[374]!==ti||e[375]!==Si||e[376]!==Lt||e[377]!==Rt||e[378]!==Kt||e[379]!==an||e[380]!==bn||e[381]!==Tn?(Ci=(0,$.jsxs)(ln,{id:`behavior`,title:`Behavior`,children:[Pt,Lt,Rt,Kt,an,bn,Tn,Pn,Un,Jn,tr,mr,xr,Ar,zr,Kr,ti,Si]}),e[365]=Pn,e[366]=Un,e[367]=Jn,e[368]=tr,e[369]=mr,e[370]=xr,e[371]=Ar,e[372]=zr,e[373]=Kr,e[374]=ti,e[375]=Si,e[376]=Lt,e[377]=Rt,e[378]=Kt,e[379]=an,e[380]=bn,e[381]=Tn,e[382]=Ci):Ci=e[382];let wi,Ti;e[383]===Symbol.for(`react.memo_cache_sentinel`)?(wi=[`newWorktreesStartFromOrigin`],Ti=X(`start-from-origin`),e[383]=wi,e[384]=Ti):(wi=e[383],Ti=e[384]);let Ei;e[385]!==i.newWorktreesStartFromOrigin||e[386]!==a?(Ei=i.newWorktreesStartFromOrigin===c.newWorktreesStartFromOrigin?null:(0,$.jsx)(Y,{label:`new worktrees start from origin`,onClick:()=>a({newWorktreesStartFromOrigin:c.newWorktreesStartFromOrigin})}),e[385]=i.newWorktreesStartFromOrigin,e[386]=a,e[387]=Ei):Ei=e[387];let Di;e[388]===Symbol.for(`react.memo_cache_sentinel`)?(Di=[`newWorktreesStartFromOrigin`],e[388]=Di):Di=e[388];let Oi;e[389]===a?Oi=e[390]:(Oi=e=>a({newWorktreesStartFromOrigin:!!e}),e[389]=a,e[390]=Oi);let ki;e[391]!==i.newWorktreesStartFromOrigin||e[392]!==Oi?(ki=(0,$.jsx)(sr,{settingKeys:Di,checked:i.newWorktreesStartFromOrigin,onCheckedChange:Oi,"aria-label":`Start new worktrees from origin by default`}),e[391]=i.newWorktreesStartFromOrigin,e[392]=Oi,e[393]=ki):ki=e[393];let Ai;e[394]!==Ei||e[395]!==ki?(Ai=(0,$.jsx)(J,{serverScoped:!0,settingKeys:wi,...Ti,description:`Creates the worktree from the latest matching branch on origin instead of your local branch.`,resetAction:Ei,control:ki}),e[394]=Ei,e[395]=ki,e[396]=Ai):Ai=e[396];let ji,Mi;e[397]===Symbol.for(`react.memo_cache_sentinel`)?(ji=[`addProjectBaseDirectory`],Mi=X(`add-project-starts-in`),e[397]=ji,e[398]=Mi):(ji=e[397],Mi=e[398]);let Ni;e[399]!==i.addProjectBaseDirectory||e[400]!==a?(Ni=i.addProjectBaseDirectory===c.addProjectBaseDirectory?null:(0,$.jsx)(Y,{label:`add project base directory`,onClick:()=>a({addProjectBaseDirectory:c.addProjectBaseDirectory})}),e[399]=i.addProjectBaseDirectory,e[400]=a,e[401]=Ni):Ni=e[401];let Pi=Pe?``:i.addProjectBaseDirectory,Fi;e[402]===a?Fi=e[403]:(Fi=e=>a({addProjectBaseDirectory:e}),e[402]=a,e[403]=Fi);let Ii=Pe?`Mixed`:`~/`,Li;e[404]!==Pi||e[405]!==Fi||e[406]!==Ii?(Li=(0,$.jsx)(or,{size:`sm`,className:`w-full sm:w-72`,value:Pi,onCommit:Fi,placeholder:Ii,spellCheck:!1,"aria-label":`Add project base directory`}),e[404]=Pi,e[405]=Fi,e[406]=Ii,e[407]=Li):Li=e[407];let Ri;e[408]!==Ni||e[409]!==Li?(Ri=(0,$.jsx)(J,{serverScoped:!0,settingKeys:ji,...Mi,description:`Leave empty to use "~/" when the Add Project browser opens.`,resetAction:Ni,control:Li}),e[408]=Ni,e[409]=Li,e[410]=Ri):Ri=e[410];let zi;e[411]!==Ai||e[412]!==Ri?(zi=(0,$.jsxs)(ln,{id:`projects-and-threads`,title:`Projects & threads`,children:[Ai,Ri]}),e[411]=Ai,e[412]=Ri,e[413]=zi):zi=e[413];let Bi;e[414]===Symbol.for(`react.memo_cache_sentinel`)?(Bi=X(`unpin-confirmation`),e[414]=Bi):Bi=e[414];let Vi;e[415]!==i.confirmThreadUnpin||e[416]!==a?(Vi=i.confirmThreadUnpin===c.confirmThreadUnpin?null:(0,$.jsx)(Y,{label:`unpin confirmation`,onClick:()=>a({confirmThreadUnpin:c.confirmThreadUnpin})}),e[415]=i.confirmThreadUnpin,e[416]=a,e[417]=Vi):Vi=e[417];let Hi;e[418]===a?Hi=e[419]:(Hi=e=>a({confirmThreadUnpin:!!e}),e[418]=a,e[419]=Hi);let Ui;e[420]!==i.confirmThreadUnpin||e[421]!==Hi?(Ui=(0,$.jsx)(Fn,{checked:i.confirmThreadUnpin,onCheckedChange:Hi,"aria-label":`Confirm thread unpinning`}),e[420]=i.confirmThreadUnpin,e[421]=Hi,e[422]=Ui):Ui=e[422];let Wi;e[423]!==Vi||e[424]!==Ui?(Wi=(0,$.jsx)(J,{...Bi,description:`Ask before unpinning a thread from the pinned section.`,resetAction:Vi,control:Ui}),e[423]=Vi,e[424]=Ui,e[425]=Wi):Wi=e[425];let Gi;e[426]===Symbol.for(`react.memo_cache_sentinel`)?(Gi=X(`archive-confirmation`),e[426]=Gi):Gi=e[426];let Ki;e[427]!==i.confirmThreadArchive||e[428]!==a?(Ki=i.confirmThreadArchive===c.confirmThreadArchive?null:(0,$.jsx)(Y,{label:`archive confirmation`,onClick:()=>a({confirmThreadArchive:c.confirmThreadArchive})}),e[427]=i.confirmThreadArchive,e[428]=a,e[429]=Ki):Ki=e[429];let qi;e[430]===a?qi=e[431]:(qi=e=>a({confirmThreadArchive:!!e}),e[430]=a,e[431]=qi);let Ji;e[432]!==i.confirmThreadArchive||e[433]!==qi?(Ji=(0,$.jsx)(Fn,{checked:i.confirmThreadArchive,onCheckedChange:qi,"aria-label":`Confirm thread archiving`}),e[432]=i.confirmThreadArchive,e[433]=qi,e[434]=Ji):Ji=e[434];let Yi;e[435]!==Ki||e[436]!==Ji?(Yi=(0,$.jsx)(J,{...Gi,description:`Require a second click on the inline archive action before a thread is archived.`,resetAction:Ki,control:Ji}),e[435]=Ki,e[436]=Ji,e[437]=Yi):Yi=e[437];let Xi;e[438]===Symbol.for(`react.memo_cache_sentinel`)?(Xi=X(`delete-confirmation`),e[438]=Xi):Xi=e[438];let Zi;e[439]!==i.confirmThreadDelete||e[440]!==a?(Zi=i.confirmThreadDelete===c.confirmThreadDelete?null:(0,$.jsx)(Y,{label:`delete confirmation`,onClick:()=>a({confirmThreadDelete:c.confirmThreadDelete})}),e[439]=i.confirmThreadDelete,e[440]=a,e[441]=Zi):Zi=e[441];let Qi;e[442]===a?Qi=e[443]:(Qi=e=>a({confirmThreadDelete:!!e}),e[442]=a,e[443]=Qi);let $i;e[444]!==i.confirmThreadDelete||e[445]!==Qi?($i=(0,$.jsx)(Fn,{checked:i.confirmThreadDelete,onCheckedChange:Qi,"aria-label":`Confirm thread deletion`}),e[444]=i.confirmThreadDelete,e[445]=Qi,e[446]=$i):$i=e[446];let ea;e[447]!==Zi||e[448]!==$i?(ea=(0,$.jsx)(J,{...Xi,description:`Ask before deleting a thread and its chat history.`,resetAction:Zi,control:$i}),e[447]=Zi,e[448]=$i,e[449]=ea):ea=e[449];let ta;e[450]!==i.confirmQuit||e[451]!==a?(ta=vt?(0,$.jsx)(J,{...X(`quit-confirmation`),description:`Hold mode also quits on two quick presses.`,resetAction:i.confirmQuit===c.confirmQuit?null:(0,$.jsx)(Y,{label:`quit shortcut behavior`,onClick:()=>a({confirmQuit:c.confirmQuit})}),control:(0,$.jsxs)(q,{value:i.confirmQuit,onValueChange:e=>{(e===`direct`||e===`hold`||e===`double-click`)&&a({confirmQuit:e})},children:[(0,$.jsx)(K,{size:`sm`,className:`w-full sm:w-40`,"aria-label":`Quit shortcut behavior`,children:(0,$.jsx)(me,{children:yo[i.confirmQuit]})}),(0,$.jsx)(ge,{align:`end`,alignItemWithTrigger:!1,children:Object.entries(yo).map(Zo)})]})}):null,e[450]=i.confirmQuit,e[451]=a,e[452]=ta):ta=e[452];let na;e[453]!==Wi||e[454]!==Yi||e[455]!==ea||e[456]!==ta?(na=(0,$.jsxs)(ln,{id:`confirmations`,title:`Confirmations`,children:[Wi,Yi,ea,ta]}),e[453]=Wi,e[454]=Yi,e[455]=ea,e[456]=ta,e[457]=na):na=e[457];let ra=ln,ia=J,aa,oa;e[458]===Symbol.for(`react.memo_cache_sentinel`)?(aa=[`textGenerationModelSelection`],oa=X(`text-generation-model`),e[458]=aa,e[459]=oa):(aa=e[458],oa=e[459]);let sa;e[460]!==k||e[461]!==Ce||e[462]!==a?(sa=k&&Ce?(0,$.jsx)(Y,{label:`text generation model`,onClick:()=>a({textGenerationModelSelection:c.textGenerationModelSelection})}):null,e[460]=k,e[461]=Ce,e[462]=a,e[463]=sa):sa=e[463];let ca=k?pe?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[(0,$.jsx)(er,{environmentId:D,activeInstanceId:le,model:ue,lockedProvider:null,instanceEntries:fe,modelOptionsByInstance:xe,triggerClassName:cn,...Ie?{triggerLabel:`Mixed`}:{},getModelDisabledReason:we,...D?{onOpenProviderSetup:e=>{o({to:`/settings/providers`,search:{environmentId:D,instanceId:e}})}}:{},onInstanceModelChange:(e,t)=>{let n=we(e,t);n?be.add({type:`error`,title:`Text generation model not saved`,description:n}):a({textGenerationModelSelection:m({...i,textGenerationModelSelection:p(e,t)},se)})}}),he?(0,$.jsx)(U,{provider:_e,models:he?.models??[],model:ue,modelOptions:de,allowPromptInjectedEffort:!1,planModeEnabled:i.planModeEnabled||v(de),triggerClassName:cn,onModelOptionsChange:e=>{a({textGenerationModelSelection:m({...i,textGenerationModelSelection:p(le,ue,e)},se)})}}):null]}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No text generation providers available.`}):(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Connect an environment to choose its text generation model.`}),la;e[464]!==ia||e[465]!==aa||e[466]!==oa||e[467]!==sa||e[468]!==ca?(la=(0,$.jsx)(ia,{serverScoped:!0,settingKeys:aa,...oa,description:`Used for thread titles and other generated text on connected devices with this provider. Source control can override it.`,resetAction:sa,control:ca}),e[464]=ia,e[465]=aa,e[466]=oa,e[467]=sa,e[468]=ca,e[469]=la):la=e[469];let ua;e[470]!==ra||e[471]!==la?(ua=(0,$.jsx)(ra,{id:`text-generation`,title:`Text generation`,children:la}),e[470]=ra,e[471]=la,e[472]=ua):ua=e[472];let da;e[473]===Symbol.for(`react.memo_cache_sentinel`)?(da=vt||ae?(0,$.jsx)(ko,{}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{id:X(`app-version`).id,title:(0,$.jsx)(Oo,{}),description:`Current version of the application.`}),pn?(0,$.jsx)(Yn,{}):null]}),e[473]=da):da=e[473];let fa;e[474]===Symbol.for(`react.memo_cache_sentinel`)?(fa=X(`privacy-policy`),e[474]=fa):fa=e[474];let pa;e[475]===Symbol.for(`react.memo_cache_sentinel`)?(pa=(0,$.jsxs)(ln,{id:`about`,title:`About`,children:[da,(0,$.jsx)(J,{...fa,description:`How we handle your data, including the anonymous usage data P4 Code collects.`,control:(0,$.jsx)(R,{render:(0,$.jsx)(`a`,{href:rr,target:`_blank`,rel:`noreferrer noopener`}),size:`sm`,variant:`outline`,children:`View policy`})})]}),e[475]=pa):pa=e[475];let ma;e[476]===Symbol.for(`react.memo_cache_sentinel`)?(ma=X(`diagnostics`),e[476]=ma):ma=e[476];let ha=O?`Inspect processes, resource use, and logs on this environment.`:`Inspect processes, resource use, and logs on one environment at a time.`,ga=D??void 0,_a;e[477]===ga?_a=e[478]:(_a=(0,$.jsx)(R,{render:(0,$.jsx)(ve,{to:`/settings/diagnostics`,search:{machine:ga}}),size:`sm`,variant:`outline`,children:`View diagnostics`}),e[477]=ga,e[478]=_a);let va;e[479]!==ha||e[480]!==_a?(va=(0,$.jsx)(J,{...ma,description:ha,control:_a}),e[479]=ha,e[480]=_a,e[481]=va):va=e[481];let ya;e[482]===Symbol.for(`react.memo_cache_sentinel`)?(ya=X(`open-source-licenses`),e[482]=ya):ya=e[482];let ba;e[483]===Symbol.for(`react.memo_cache_sentinel`)?(ba=(0,$.jsx)(J,{...ya,description:`Notices for dependencies, assets, and optional tools used by P4 Code.`,control:(0,$.jsx)(R,{render:(0,$.jsx)(ve,{to:`/settings/open-source-licenses`}),size:`sm`,variant:`outline`,children:`View licenses`})}),e[483]=ba):ba=e[483];let xa;e[484]===va?xa=e[485]:(xa=(0,$.jsxs)(ln,{title:`Diagnostics`,children:[va,ba]}),e[484]=va,e[485]=xa);let Sa;e[486]===Symbol.for(`react.memo_cache_sentinel`)?(Sa=(0,$.jsx)(Yo,{}),e[486]=Sa):Sa=e[486];let Ca;return e[487]!==Be||e[488]!==Ve||e[489]!==Ci||e[490]!==zi||e[491]!==na||e[492]!==ua||e[493]!==xa||e[494]!==Nt?(Ca=(0,$.jsxs)(Be,{children:[Ve,Nt,Ci,zi,na,ua,pa,xa,Sa]}),e[487]=Be,e[488]=Ve,e[489]=Ci,e[490]=zi,e[491]=na,e[492]=ua,e[493]=xa,e[494]=Nt,e[495]=Ca):Ca=e[495],Ca}function Zo(e){let[t,n]=e;return(0,$.jsx)(G,{hideIndicator:!0,value:t,children:n},t)}function Qo(e){return e===null?`Mixed`:xo[e]}function $o(e){return e===null?`Mixed`:uo[e]}function es(e){return(0,$.jsx)(G,{value:e,children:e===`off`?`Off`:e.charAt(0).toUpperCase()+e.slice(1)},e)}function ts(e){return e===null?`Mixed`:e===`off`?`Off`:e.charAt(0).toUpperCase()+e.slice(1)}function ns(e){return e===null?`Mixed`:x.find(t=>t.value===e)?.label}function rs(e){return(0,$.jsx)(G,{hideIndicator:!0,value:e,children:po[e]},e)}function is(e){return e.enabled&&e.isAvailable}function as(e){return e.supportsTextGeneration!==!1}function os(e){return e.serverConfig?.environment.capabilities.threadRestartContinuation===!0}function ss(e){return e.serverConfig?.environment.capabilities.threadAutoSettlementScope===!0}function cs(e){return e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}export{co as i,Xo as n,Ao as r,Mo as t};
|
|
46
|
+
//# sourceMappingURL=SettingsPanels-DxAtLrQJ.js.map
|