@p4code/cli 0.8.11 → 0.8.12
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-DY9l0jFs.mjs → binCli-DUdPoqDO.mjs} +2 -2
- package/dist/client/.vite/manifest.json +1286 -1286
- package/dist/client/assets/{AuthSurfaceShell-B_P0_qZ6.js → AuthSurfaceShell-TTILQgs8.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-fMcoYEDa.js → ChatGptUsageButton-BG4sHSE5.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-B7b91JUl.js → ChatMarkdown-6z7RF4Ki.js} +4 -4
- package/dist/client/assets/{CodexSetupSection.logic-CeUTTu-x.js → CodexSetupSection.logic-CesZU0jj.js} +2 -2
- package/dist/client/assets/{CommandBlock-BI3ZCXsB.js → CommandBlock-CgdYijxc.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-BkRvKIiZ.js → ComposerPromptEditor-5vyHXxd7.js} +4 -4
- package/dist/client/assets/{DevicePanel-B_jOvmeL.js → DevicePanel-DQ8cLDHy.js} +2 -2
- package/dist/client/assets/{DeviceSetup-BXjqCO_9.js → DeviceSetup-BP4bZJQS.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-D_1Iw0oL.js → DiffCommentAnnotation-x4D5cVr3.js} +2 -2
- package/dist/client/assets/{DiffFileTree-D6386u9x.js → DiffFileTree-oPb1WMLR.js} +2 -2
- package/dist/client/assets/{DiffPanel-D6VVj6BF.js → DiffPanel-FegTwEoZ.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-Cw5WeG1t.js → DiffWorkerPoolProvider-D2__qhqn.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-Drkomo9K.js → EmbeddedDesign-ClvOPYvI.js} +2 -2
- package/dist/client/assets/{FileDiff-FK4mtyx3.js → FileDiff-CrB6gsM6.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-ncsuf7iX.js → FilePreviewPanel-BrfGUkiA.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-CRlh3-BO.js → FoldedSettingsSection-DGBHqNlE.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-8d3l2unf.js → NoProjectsHero-CCYi-y6n.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-3fTyX_SN.js → PanelLayoutControls-CNS9IpqP.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-DtlkLdir.js → PierreEntryIcon-CKjQpgLO.js} +2 -2
- package/dist/client/assets/{PreviewPanel-Ca3_DPh_.js → PreviewPanel-CJ81wdo6.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-B--7QlKN.js → ProjectDefaultsSettings-CXY57B72.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-YdOZ4g5-.js → ProjectFavicon-fx1QfVoh.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-C23nnU1a.js → ProjectIconPickerDialog-CFdK4dy-.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-YztsMr2F.js → ProviderAuthTerminal-B43zNZyt.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-S_tiGeLH.js → ProviderModelPicker-7TESki3o.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-C3nbCFfS.js → ProviderSettingsForm-DTbceLMt.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-BdP3_tNe.js → PullRequestCodeTab-ClHfRIZg.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-BNe8pyVf.js → ReadOnlySourcePreview-b2w3OoiX.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-DEgVmtJL.js → RenderErrorBoundary-Dkgc28VE.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-CISo4C7r.js → ScheduledTasksSettings-CEsxWqiH.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-eWB5GlaA.js → ScopedSwitch-Bku3NuH1.js} +2 -2
- package/dist/client/assets/{SettingsPanels-DA7lXl0N.js → SettingsPanels-BoxSRF3Y.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-lCZaJhKM.js → SettingsPanels.logic-DIWicQHy.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-BAtVWG0d.js → SettingsScopeNotice-4PZ3qjUl.js} +2 -2
- package/dist/client/assets/{T3ConnectAccountPages-nabxuL18.js → T3ConnectAccountPages-DA0BptAt.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-CSVR5Zot.js → T3ConnectSidebarSignIn-B05eHBr6.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-BMtL4rIt.js → ThemeEditorPanel-DWb0qJem.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-CLfVfvoq.js → ThreadTerminalDrawer-g8xlxRvR.js} +2 -2
- package/dist/client/assets/{Virtualizer-Bi8p4Z6E.js → Virtualizer-Cyq5hRoq.js} +2 -2
- package/dist/client/assets/{_chat-D-Gcj0-9.js → _chat-BCpoMsA8.js} +5 -5
- package/dist/client/assets/{_chat.index-k4jctzPr.js → _chat.index-obkH3dRC.js} +2 -2
- package/dist/client/assets/{_chat.new-BlFtqZqt.js → _chat.new-DVE644MB.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-DrLHGpqx.js → _chat.pull-requests-Dl8vaGsi.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-BVKlsgtX.js → abnfDiagram-VCTEODGH-CPHKGdm2.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-Dr1CsNUa.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-zBJWGViu.js → architectureDiagram-5GKGNRK7-DZFW2-cw.js} +2 -2
- package/dist/client/assets/{assets-BhchpDuq.js → assets-Bv4X710m.js} +2 -2
- package/dist/client/assets/{blockDiagram-I7D4REHJ-BdiAAtHi.js → blockDiagram-I7D4REHJ-DmEMRtTm.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-CqGVWa5a.js → browserHistoryStore-VpfOHXQM.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-CINrbcxi.js → browserLinkTarget-BPuATALO.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-CqnmSo8f.js → c4Diagram-7LVT6UL2-eYwJlimj.js} +2 -2
- package/dist/client/assets/channel-DSsQ3W5t.js +2 -0
- package/dist/client/assets/{chunk-4HAMMTFA-BpyojyCk.js → chunk-4HAMMTFA-cctCxKWZ.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-LBmwoUvq.js → chunk-75Z2AOVW-yaFLBspz.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-zhv2Vnfx.js → chunk-DU6HZSFF-COvkbqst.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-K5uPeDhv.js → chunk-F27PBJKO-BoZkG8KP.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-CAAu3Cn5.js → chunk-GMAD6QVW-D54p8a4L.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-Br_UAx49.js → chunk-GVQU2GXP-CDiM6HNZ.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-Kqfxrrdn.js → chunk-IMKFNOWR-BCKRWLFe.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-D1cWO7rm.js → chunk-L3NEJ4N5-DFKc7N9P.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-BiMJbcHf.js → chunk-OSK3NFVY-DGczxohY.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-BuGzzo3g.js → chunk-P2QGCYS3-C-hXHVpV.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-C_w0mNLk.js → chunk-POPQ4Y6H-BMxZmq3k.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-CJFd7LKC.js → chunk-PWAF6VOD-CtRucGgL.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-Beev3ZeU.js → chunk-SHT3W25Y-B5VCRMvd.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-BqpBEmtK.js → chunk-SVP7TREG-BpH-ABz6.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-B0vIU1Au.js → chunk-TICWLB2K-CTkLpoi-.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-BBQf0-yA.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BBQf0-yA.js +2 -0
- package/dist/client/assets/{connect-agent-DFwOzcLG.js → connect-agent-CMmb-Zab.js} +2 -2
- package/dist/client/assets/{connect-DGwXUKTk.js → connect-liVdG7hL.js} +2 -2
- package/dist/client/assets/{cynefin-OW5HDTMX-BjcFswd0.js → cynefin-OW5HDTMX-B4foSkMN.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-BDWLg5Tt.js → cynefinDiagram-5FMLGOSQ-Cq1u5nRd.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-DZpVjkDw.js → dagre-GXQ25YYZ-BnWkCI00.js} +2 -2
- package/dist/client/assets/{device-BEgZIK7u.js → device-DLB3WAXi.js} +2 -2
- package/dist/client/assets/{diagram-S7CK7UJ4-BpVs-kYJ.js → diagram-S7CK7UJ4-Bk90dFWN.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-EN7yKI08.js → diagram-UQ7AKVKN-Dh52RrnP.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-B2oljv94.js → diagram-VSXAHHWV-uV_w7lVo.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-BIl0lJ6d.js → diagram-VX7I27RA-DL1AuClH.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-B8uoK-O5.js → diagram-Z3DM3KII-B5dyOgFp.js} +2 -2
- package/dist/client/assets/{diffRendering-DeZLcalP.js → diffRendering-DHxotmCj.js} +2 -2
- package/dist/client/assets/{dist-Bd1WIVAz.js → dist-DtZBcVS4.js} +2 -2
- package/dist/client/assets/{duoViewer-BZ7rNqkx.js → duoViewer-zxcLfYBx.js} +2 -2
- package/dist/client/assets/{dynamic-BMz3CcWG.js → dynamic-6kg5nPKs.js} +2 -2
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-BQcQotuk.js → ebnfDiagram-PWID7BFC-1CxZtGTD.js} +2 -2
- package/dist/client/assets/{embeddedScripts-Cek5ppgQ.js → embeddedScripts-DYX91Iqp.js} +2 -2
- package/dist/client/assets/{entities-DPIZFvN7.js → entities-ed9IspYf.js} +2 -2
- package/dist/client/assets/{environments-Dm2_6Uan.js → environments-C3ohMa2W.js} +2 -2
- package/dist/client/assets/{erDiagram-RLTQ6QDP-Y5XhNz9b.js → erDiagram-RLTQ6QDP-CsGV-1_T.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-Ji6bAwP8.js +1 -0
- package/dist/client/assets/{fileLinks-1xYacDKI.js → fileLinks-Dm5o4ow4.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-B24BhRqA.js → fileTreeExpansion-C8bS7Zih.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-AAO2RT67.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DqWb0OUJ.js → ganttDiagram-EL5Y4UJY-DPJOvh4Y.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-CCYVAWRm.js → getDiffFileInput-Dl5o7z9L.js} +2 -2
- package/dist/client/assets/{gitGraph-4MIJSDKK-5lcY1dZk.js → gitGraph-4MIJSDKK-BZfRHVrB.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BJKz_rGI.js → gitGraphDiagram-WWUBYQGX-DAAU0j3h.js} +2 -2
- package/dist/client/assets/{guideRunStore-BhlldU3q.js → guideRunStore-CEASlKCi.js} +2 -2
- package/dist/client/assets/{index-Dc7GC03y.js → index-B_GLtP0M.js} +3 -3
- package/dist/client/assets/{info-A6RAGUB7-BWnMlmF7.js → info-A6RAGUB7-ycVybacD.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-DKW68xDy.js → infoDiagram-27XIBGKW-oqlTnqq9.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-dRMCvDN0.js → ishikawaDiagram-5VMMS53U-BUi7N4un.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-CAxCpgF5.js → journeyDiagram-3NMN7TZE-B2J9IlBm.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-BaSkJW47.js → kanban-definition-UXKFOSKX-49qHmkgE.js} +2 -2
- package/dist/client/assets/{line-B59oA22i.js → line-C5HQ6j78.js} +2 -2
- package/dist/client/assets/{linkedPrompt-Cqfqh2Aq.js → linkedPrompt-FeVRd-O-.js} +2 -2
- package/dist/client/assets/{main-Ch-SjebX.css → main-CuoFsMGE.css} +1 -1
- package/dist/client/assets/{main-CxOeqlhD.js → main-DUXMPAgZ.js} +19 -19
- package/dist/client/assets/{mediaReference-DRC-8GdL.js → mediaReference-ltmoE8jM.js} +2 -2
- package/dist/client/assets/{mediaSource-DWSwwPfV.js → mediaSource-CMMCxBE2.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-DcamukpZ.js → mermaid-parser.core-CrL8urD6.js} +4 -4
- package/dist/client/assets/{mermaid.core-C6GXL70P.js → mermaid.core-P-NUuG-D.js} +5 -5
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-CEVz3xGI.js → mindmap-definition-YA3MSWOX-CIwOTWEt.js} +2 -2
- package/dist/client/assets/{onboarding-CLIRA2Sa.js → onboarding-BU1V8wHr.js} +2 -2
- package/dist/client/assets/{openFileInPreview-uS9Qgrru.js → openFileInPreview-DHDgTtRZ.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-CIYnqKbl.js → p4ProjectFile-D9Mx0dmO.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-B9XAEihD.js → packet-AYTQ26CC-Dx1MWiCF.js} +1 -1
- package/dist/client/assets/{pair-DTfs9_4K.js → pair-Cu7mXLMq.js} +2 -2
- package/dist/client/assets/{pegDiagram-XKGWAZYB-tcLsMhrs.js → pegDiagram-XKGWAZYB-6LaNggoU.js} +2 -2
- package/dist/client/assets/{phoneViewer-wYjPQP4U.js → phoneViewer-DxbJZZ1_.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-B3ig0TFp.js → pie-WAS4IAKB-BHElrMQ0.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-uaJgfQOp.js → pieDiagram-E7YTZNPT-BZ-KGbt4.js} +2 -2
- package/dist/client/assets/{pierre-icons-Dav7jMBk.js → pierre-icons-BoPbdUrw.js} +2 -2
- package/dist/client/assets/{preview-C4lGbDhm.js → preview-Bdfy10VL.js} +2 -2
- package/dist/client/assets/{primary-CRkgnOCY.js → primary-Ce2kT30K.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-B_VNTJYL.js → primaryCloudLinkState-Do0JJRXu.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-U08pztRu.js → projectFilesQueryState-CRMf46rk.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-D8mxKLOb.js → projectScriptEditor-BCJfjG7L.js} +2 -2
- package/dist/client/assets/{providerSkills-C7CtJefh.js → providerSkills-CKg8n_Pc.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-DGX-Sd8d.js → pullRequestDetail.logic-rvhEbiFP.js} +2 -2
- package/dist/client/assets/{pullRequests-BbD7hNlR.js → pullRequests-DJrYzynz.js} +2 -2
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-BOFUpnyi.js → quadrantDiagram-AXDQQJYC-CvnGxXew.js} +2 -2
- package/dist/client/assets/{queries-BVPZtaQA.js → queries-p9BAZLb-.js} +2 -2
- package/dist/client/assets/{radar-RG4KPBEZ--djmIj49.js → radar-RG4KPBEZ-BrffrDRx.js} +1 -1
- package/dist/client/assets/{railroad-74A4TZTK-DMMw049f.js → railroad-74A4TZTK-B3VSFrGQ.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-BS7JDegU.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-PJ7TdaXJ.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-BnDwBnfu.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-Df9rhhFk.js → railroadDiagram-O6MQD6OU-BbIi-aIS.js} +2 -2
- package/dist/client/assets/{renderScheduler-b0pOdWwc.js → renderScheduler-B_XMfDdk.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-BtGYMd7U.js → requirementDiagram-BXWQKSXE-BcjJ0oP9.js} +2 -2
- package/dist/client/assets/{runtime-DZfpb67Q.js → runtime-AivVP3k8.js} +3 -3
- package/dist/client/assets/{runtime-Bc4kgQim.js → runtime-BfjHqyQH.js} +2 -2
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-D7_y-s_u.js → sankeyDiagram-P5KCCOFB-DmFJ2EWh.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-CvvQA-b7.js → scheduledTasksSettings.logic-BYBxTiFF.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-AuXrX-b5.js → sequenceDiagram-WJ2MYXX4-D8YdQDYA.js} +2 -2
- package/dist/client/assets/{server-LJ0-FVGH.js → server-BC4-DXjw.js} +2 -2
- package/dist/client/assets/{session-Bc1P10r_.js → session-CLz6NCKX.js} +2 -2
- package/dist/client/assets/{session-logic-BNtU33qU.js → session-logic-CD6ctino.js} +2 -2
- package/dist/client/assets/{settings-CZSrxmjf.js → settings-Swwhfgp0.js} +2 -2
- package/dist/client/assets/{settings.appearance-B_LipS5_.js → settings.appearance-BSzr_T9U.js} +2 -2
- package/dist/client/assets/settings.archived-BoCdDvJy.js +2 -0
- package/dist/client/assets/{settings.computer-use-BAzpb53_.js → settings.computer-use-nLbSQfdv.js} +2 -2
- package/dist/client/assets/{settings.connections-Bv37N8Tm.js → settings.connections-C4NVZA2N.js} +2 -2
- package/dist/client/assets/{settings.data-controls-DIkcwUy1.js → settings.data-controls-BZsALFNW.js} +2 -2
- package/dist/client/assets/{settings.decisions-BN9ozN_A.js → settings.decisions-ewNyURd9.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-DuoGRNGf.js → settings.diagnostics-DD8ubhwU.js} +2 -2
- package/dist/client/assets/{settings.general-B-Bt2-nG.js → settings.general-CtzJh4Rx.js} +2 -2
- package/dist/client/assets/{settings.integrations-CT3opViE.js → settings.integrations-Cra2dW7z.js} +2 -2
- package/dist/client/assets/{settings.keybindings-BBTkicWk.js → settings.keybindings-TlPhoEQg.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-C_hoYTwe.js → settings.open-source-licenses-B-yrCrWG.js} +2 -2
- package/dist/client/assets/{settings.plugins-DafKnC5Q.js → settings.plugins-imKgCVn_.js} +2 -2
- package/dist/client/assets/{settings.projects-r2ZcxKud.js → settings.projects-tzSgXlw4.js} +3 -3
- package/dist/client/assets/{settings.providers-jbZijXPV.js → settings.providers-CJMKBwGi.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-C0d4wkYE.js → settings.scheduled-tasks-CsxzXKIe.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-D-zJVnjT.js → settings.snap-shot-DjahqLFc.js} +2 -2
- package/dist/client/assets/{settings.source-control-DIU1xRUy.js → settings.source-control-2ejyJuaq.js} +2 -2
- package/dist/client/assets/{settings.storage-DRxTKEjG.js → settings.storage-CWhyfrpB.js} +2 -2
- package/dist/client/assets/{settingsLayout-Cbpy7Mfz.js → settingsLayout-D-5E1K-3.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-DXnDcqLY.js → sidebarProjectGrouping-D1iMa8Uh.js} +2 -2
- package/dist/client/assets/{sortable.esm-Boen_E7K.js → sortable.esm-By3lSBxO.js} +2 -2
- package/dist/client/assets/{sourceControl-DE9QO1yg.js → sourceControl-mPa5Da0-.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-EwB2WAAm.js → stateDiagram-D77RDMKH-DoURp1ek.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-D7St643I.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-RngRFsjR.js → swimlanes-42K2YHIH-CnIKMVp7.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-D5SXc1iu.js +9 -0
- package/dist/client/assets/{terminalSessions-Cj-MqjH8.js → terminalSessions-5_U2zswb.js} +2 -2
- package/dist/client/assets/{threadSort-DD61dseb.js → threadSort-CGw2yc3P.js} +2 -2
- package/dist/client/assets/{timeline-definition-24CTP7MA-BfIggpP3.js → timeline-definition-24CTP7MA-Bb4-XE1H.js} +2 -2
- package/dist/client/assets/{toast-DYfY2t_z.js → toast-BYGWNQVa.js} +2 -2
- package/dist/client/assets/{treeView-Q6P3EWNA-BjKaOr9u.js → treeView-Q6P3EWNA-m0IX4uRr.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-ffFPsmk1.js → treemap-WGGIJYW6-DjF5oRc6.js} +1 -1
- package/dist/client/assets/{usage-CRK5JZJm.js → usage-DozNd-7N.js} +2 -2
- package/dist/client/assets/{use-atom-command-Dz_yqN35.js → use-atom-command-BEC7Dpf5.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-DjevdE0U.js → useHandleNewThread-B6GE4-lt.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BKpChcp1.js → usePullRequestActions-C9Nx99x7.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-mUid6EfJ.js → useScopedModelAvailability-Bx5MEwNY.js} +2 -2
- package/dist/client/assets/{useSettings-DCI8Hv09.js → useSettings-CbuRZg7F.js} +2 -2
- package/dist/client/assets/{useT3ConnectAuthPrompt-C7Dm8xCm.js → useT3ConnectAuthPrompt-B9-kgi3N.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-3pHpDJC2.js → vcsRefInvalidation-Dkz0bLCm.js} +2 -2
- package/dist/client/assets/{vennDiagram-4TSXK5OY-Bw5_1h9Y.js → vennDiagram-4TSXK5OY-CCjFehou.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-BzzHb86M.js → wardley-WFR3VGLG-C8OgmKG3.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-RCSx0hV5.js → wardleyDiagram-VM6X3IG4-aAotQeyV.js} +2 -2
- package/dist/client/assets/{welcome-RXSMyzlx.js → welcome-DgOu9i5m.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CcISZM46.js → xychartDiagram-S5SC5T6Z-B6Gl2NIG.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/architecture-7GRP2DOG-BNBr3Sao.js +0 -1
- package/dist/client/assets/channel-CfHDq-fp.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-Cm99q1tS.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cm99q1tS.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-B7plRWX7.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-BEpQPBfI.js +0 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-BJdCwb3O.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-a9vhoAEG.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-Cyo-vXW_.js +0 -1
- package/dist/client/assets/settings.archived-B_h3CK_T.js +0 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CcnJHQ4a.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CrkPrysy.js +0 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,Es as r,Gs as i,Jy as a,Ks as o,Lc as s,ME as c,MT as l,PT as u,Pd as d,Rf as f,Ss as p,T_ as m,Xo as h,Yo as g,_m as _,by as v,cE as y,cp as b,cy as x,g_ as S,gy as C,hd as w,l as T,ly as E,o as D,qu as O,r_ as k,sr as A,t as j,t_ as M,vd as N}from"./utils-CRwA5SKO.js";import{At as P,M as F,N as I,R as L,W as R,o as z}from"./runtime-DZfpb67Q.js";import{C as B,Q as V,W as H,f as U}from"./entities-DPIZFvN7.js";import{t as W}from"./runtime-Bc4kgQim.js";import{t as G}from"./spinner-Bnjv_L8F.js";import{t as K}from"./useNavigate-Dvl9uiuL.js";import{t as q}from"./useLocation-UcmQE5FC.js";import{i as J}from"./toast-DYfY2t_z.js";import{a as ee,n as te,t as ne}from"./tooltip-924Ikq0L.js";import{a as re,o as ie}from"./environments-Dm2_6Uan.js";import{f as ae}from"./server-LJ0-FVGH.js";import{i as oe,n as Y,o as se}from"./session-Bc1P10r_.js";import{t as ce}from"./query-CpOQgkic.js";import{t as le}from"./use-atom-command-Dz_yqN35.js";import{a as ue}from"./timestampFormat-wac2e_Jz.js";import{t as de}from"./input-DhWmPSxf.js";import{t as fe}from"./scroll-area-BDT5qfX2.js";import{r as pe}from"./dist-Bd1WIVAz.js";import{t as me}from"./dialog-x5a5g_fa.js";import{t as he}from"./useT3ConnectAuthPrompt-C7Dm8xCm.js";import{t as ge}from"./CommandBlock-BI3ZCXsB.js";import{t as X}from"./checkbox-DU_a7ZnJ.js";import{t as _e}from"./ThreadTerminalDrawer-CLfVfvoq.js";import{i as ve}from"./terminalSessions-Cj-MqjH8.js";import{n as ye}from"./useHandleNewThread-DjevdE0U.js";import{r as be,t as xe}from"./alert-B2wk0CaO.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-fMcoYEDa.js";import{t as we}from"./onboarding-CLIRA2Sa.js";import{Aa as Te,Fa as Ee,Ia as De,Kr as Oe,Ma as ke,Na as Ae,Pa as je,_ as Me,f as Ne,ja as Pe,nn as Fe,rn as Ie,sn as Le,xa as Re}from"./main-CxOeqlhD.js";import{t as ze}from"./NoProjectsHero-8d3l2unf.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-lCZaJhKM.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-CeUTTu-x.js";var Z=e(t(),1),Q=c(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);if(a===void 0){t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt});continue}a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)})}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=V(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=I(W,{label:`environment-data:agent-sessions:scan`,tag:s.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=F(W,{label:`environment-data:agent-sessions:import`,tag:s.agentSessionsImport});function st(e){return P(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),r=(0,Z.useContext)(h),i;return t[0]!==e||t[1]!==r?(i=n(t=>e.map(e=>{let n=at({environmentId:e,input:{}}),i=t(n);return{environmentId:e,data:l(p(i)),error:i._tag===`Failure`?ce(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>r.refresh(n)}})),t[0]=e,t[1]=r,t[2]=i):i=t[2],g(i)}var $=e(y(),1),ut=[],dt=C.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Le(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=re(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(!1),m=(0,Z.useRef)(null),h=(0,Z.useRef)(null),g=ie();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let _=s??new Set(g?[g.environmentId]:[]),v=lt(i===`import`?u:ut),y=i===`import`&&v.every(e=>e.data===null)&&v.some(e=>e.isPending),b=e=>{e.length!==0&&(d(e),a(`agents`))},x=i===`agents`?1:i===`import`?2:0,S=(0,Z.useCallback)((e,n,i=0)=>{if(m.current!==null)return m.current;h.current!==null&&(J.close(h.current),h.current=null);let a=r().then(async()=>(h.current!==null&&(J.close(h.current),h.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return h.current===null?h.current=J.add(e):J.update(h.current,e),!1}).finally(()=>{m.current===a&&(m.current=null)});return m.current=a,a},[r,t]);return(0,$.jsxs)(me,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(ke,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(Te,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Oe,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Ae,{steps:ft,currentStep:x,isStepDisabled:e=>f||e>=x,onStepChange:e=>{f||e>x||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(Pe,{holdHeight:y,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!z(),selectedIds:_,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??_);return t?r.add(e):r.delete(e),r}),onContinue:()=>b(ct(o,_).environmentIds),onPaired:e=>{c(new Set([..._,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:v,isImporting:f,setIsImporting:p,onDone:S})})]}),(0,$.jsx)(Me,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:i,onSelectionChange:a,onToggleEnvironment:o,onContinue:s,onPaired:c}=e,{environments:l}=re(),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=z(),t[0]=u):u=t[0];let d=u,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>!d||!st(e),t[1]=p):p=t[1];let m=l.filter(p),[h,g]=(0,Z.useState)(r),[_,v]=(0,Z.useState)(!1),{ready:y,skippedIds:x}=ct(l,i),S=l.filter(e=>x.includes(e.environmentId)).map(gt),C=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{y&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&C.current?.focus()},[y]);let w,T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),T=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=w,t[3]=T):(w=t[2],T=t[3]);let E=m.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),m.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(X,{checked:i.has(e.environmentId),onCheckedChange:t=>{let n=new Set(i);t?n.add(e.environmentId):n.delete(e.environmentId),a(n)}}),(0,$.jsx)(b,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Ie(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,D;t[4]!==n||t[5]!==_||t[6]!==o||t[7]!==i?(D=d?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:_,selectedIds:i,onToggleEnvironment:o}):null,t[4]=n,t[5]=_,t[6]=o,t[7]=i,t[8]=D):D=t[8];let k,M,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(A,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),M=(0,$.jsx)(f,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=k,t[10]=M,t[11]=P):(k=t[9],M=t[10],P=t[11]);let F=h&&`rotate-90`,I;t[12]===F?I=t[13]:(I=j(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let L;t[14]===I?L=t[15]:(L=(0,$.jsx)(N,{className:I}),t[14]=I,t[15]=L);let R;t[16]!==_||t[17]!==L?(R=(0,$.jsxs)(De,{disabled:_,render:k,children:[M,P,L]}),t[16]=_,t[17]=L,t[18]=R):R=t[18];let B;t[19]===c?B=t[20]:(B=e=>{g(!1),c(e),requestAnimationFrame(()=>C.current?.focus())},t[19]=c,t[20]=B);let V;t[21]!==_||t[22]!==B?(V=(0,$.jsx)(Ee,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:_,setIsPairing:v,onPaired:B})})}),t[21]=_,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==h||t[25]!==R||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(je,{open:h,onOpenChange:g,children:[R,V]})}),t[24]=h,t[25]=R,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==D?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[D,H]}),t[28]=H,t[29]=D,t[30]=U):U=t[30];let W=S.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,S.join(`, `),`. You can set`,` `,S.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!y||_,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(O,{className:`size-3.5`}),t[32]=J):J=t[32];let ee;t[33]!==s||t[34]!==K||t[35]!==q?(ee=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(A,{className:`shrink-0 self-end`,ref:C,autoFocus:K,disabled:q,onClick:s,children:[`Continue`,J]})]}),t[33]=s,t[34]=K,t[35]=q,t[36]=ee):ee=t[36];let te;return t[37]!==U||t[38]!==W||t[39]!==ee||t[40]!==w||t[41]!==T||t[42]!==E?(te=(0,$.jsxs)($.Fragment,{children:[w,T,E,U,W,ee]}),t[37]=U,t[38]=W,t[39]=ee,t[40]=w,t[41]=T,t[42]=E,t[43]=te):te=t[43],te}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:i,onToggleEnvironment:a}=e,{environments:o}=re(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={treatPendingAsSignedOut:!1},t[0]=s):s=t[0];let{isLoaded:c,isSignedIn:l}=pe(s),{openAuthPrompt:u}=he(),[f,p]=(0,Z.useState)(!0),[m,h]=(0,Z.useState)(!1),g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>h(!0),t[1]=g):g=t[1];let _=g,v=f&&!!l&&m,y=r||!c,b;t[2]!==l||t[3]!==u?(b=e=>{l||(e.preventDefault(),p(!0),u())},t[2]=l,t[3]=u,t[4]=b):b=t[4];let x,S,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(A,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),S=(0,$.jsx)(d,{className:`size-4 text-muted-foreground`}),C=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=x,t[6]=S,t[7]=C):(x=t[5],S=t[6],C=t[7]);let w=c?l?m?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,T;t[8]===w?T=t[9]:(T=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:w}),t[8]=w,t[9]=T);let E=f&&l&&`rotate-90`,D;t[10]===E?D=t[11]:(D=j(`size-4 text-muted-foreground`,E),t[10]=E,t[11]=D);let O;t[12]===D?O=t[13]:(O=(0,$.jsx)(N,{className:D}),t[12]=D,t[13]=O);let k;t[14]!==T||t[15]!==O||t[16]!==y||t[17]!==b?(k=(0,$.jsxs)(De,{disabled:y,onClick:b,render:x,children:[S,C,T,O]}),t[14]=T,t[15]=O,t[16]=y,t[17]=b,t[18]=k):k=t[18];let M;t[19]!==n||t[20]!==o||t[21]!==l||t[22]!==a||t[23]!==i?(M=l?(0,$.jsx)(Fe,{primaryEnvironmentId:null,savedEnvironments:o,showSavedEnvironments:!0,onDiscoveryReady:_,selection:{selectedIds:i,onChange:a,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=o,t[21]=l,t[22]=a,t[23]=i,t[24]=M):M=t[24];let P;t[25]===M?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:M}),t[25]=M,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(ge,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(Ee,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==k||t[33]!==R||t[34]!==v?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(je,{open:v,onOpenChange:p,children:[k,R]})}),t[32]=k,t[33]=R,t[34]=v,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(38),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let o=le(we,a),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(``),d=(0,Z.useRef)(!0),f,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>(d.current=!0,()=>{d.current=!1}),p=[],t[1]=f,t[2]=p):(f=t[1],p=t[2]),(0,Z.useEffect)(f,p);let m;t[3]!==o||t[4]!==n||t[5]!==i||t[6]!==s||t[7]!==r?(m=async()=>{if(n||s.trim().length===0)return;r(!0),u(``);let e=await o({pairingUrl:s.trim()});if(!d.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(L(e))return;let t=R(e);u(t instanceof Error?t.message:`Pairing failed.`)},t[3]=o,t[4]=n,t[5]=i,t[6]=s,t[7]=r,t[8]=m):m=t[8];let h=m,g;t[9]===h?g=t[10]:(g=e=>{e.preventDefault(),h()},t[9]=h,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=_):_=t[11];let v=l.length>0,y=l?`onboarding-pairing-error`:void 0,b;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>c(e.currentTarget.value),t[12]=b):b=t[12];let x;t[13]!==n||t[14]!==s||t[15]!==v||t[16]!==y?(x=(0,$.jsxs)(`div`,{children:[_,(0,$.jsx)(de,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":v,"aria-describedby":y,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:s,onChange:b,onKeyDown:yt})]}),t[13]=n,t[14]=s,t[15]=v,t[16]=y,t[17]=x):x=t[17];let S;t[18]===l?S=t[19]:(S=l?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:l})}):null,t[18]=l,t[19]=S);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsxs)(De,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(N,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=C):C=t[20];let w;t[21]!==n||t[22]!==s?(w=n||s.trim().length===0,t[21]=n,t[22]=s,t[23]=w):w=t[23];let T=n?`Pairing...`:`Pair`,E;t[24]!==w||t[25]!==T?(E=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[C,(0,$.jsx)(A,{type:`submit`,disabled:w,children:T})]}),t[24]=w,t[25]=T,t[26]=E):E=t[26];let D,O;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:`Run this on the computer with your code.`}),O=(0,$.jsx)(ge,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=D,t[28]=O):(D=t[27],O=t[28]);let k;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),t[29]=k):k=t[29];let j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(Ee,{children:[D,O,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`Start P4 Code first, or run `,k,`. Add `,(0,$.jsx)(`code`,{className:`font-mono`,children:`--tailscale`}),` to use your tailnet.`]})]}),t[30]=j):j=t[30];let M;t[31]===E?M=t[32]:(M=(0,$.jsxs)(je,{children:[E,j]}),t[31]=E,t[32]=M);let P;return t[33]!==x||t[34]!==S||t[35]!==M||t[36]!==g?(P=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:g,children:[x,S,M]})}),t[33]=x,t[34]=S,t[35]=M,t[36]=g,t[37]=P):P=t[37],P}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=re(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(fe,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(O,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(A,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(Kt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function St(e){let t=(0,Q.c)(57),{environmentId:n,machineLabel:r}=e,i;t[0]===n?i=t[1]:(i=ae.providersValueAtom(n),t[0]=n,t[1]=i);let a=g(i),o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o={reportFailure:!1},t[2]=o):o=t[2];let s=le(ae.refreshProviders,o),c;t[3]===n?c=t[4]:(c=ae.configValueAtom(n),t[3]=n,t[4]=c);let l=g(c),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(null),v=oe(n,m),y,b;t[5]!==n||t[6]!==s?(y=()=>{s({environmentId:n,input:{}})},b=[n,s],t[5]=n,t[6]=s,t[7]=y,t[8]=b):(y=t[7],b=t[8]),(0,Z.useEffect)(y,b);let x;t[9]===a?x=t[10]:(x=Ue(a),t[9]=a,t[10]=x);let S=x,C,w,T,E;if(t[11]!==S||t[12]!==v||t[13]!==h||t[14]!==n||t[15]!==r||t[16]!==a||t[17]!==l||t[18]!==u?.driver){let e;t[23]!==S||t[24]!==a?(e=e=>{let t=e===`codex`?a?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:S.get(e),instanceId:S.get(e)?.instanceId}]},t[23]=S,t[24]=a,t[25]=e):e=t[25];let i=bt.flatMap(e);if(h){let e;t[26]===h?e=t[27]:(e=e=>e.instanceId===h.instanceId,t[26]=h,t[27]=e);let n=i.findIndex(e),[r]=n>=0?i.splice(n,1):[];i.unshift(r??{driver:`codex`,provider:void 0,instanceId:h.instanceId})}t[28]===r?E=t[29]:(E=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:r}),t[28]=r,t[29]=E),t[30]===v?C=t[31]:(C=v?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=v,t[31]=C),w=`space-y-1.5`;let o;t[32]!==v||t[33]!==h||t[34]!==n||t[35]!==l||t[36]!==u?.driver?(o=e=>{let{driver:t,provider:r,instanceId:i}=e;return t===`codex`&&l!==null?(0,$.jsx)(Tt,{environmentId:n,provider:r,serverConfig:l,createdAccount:i===h?.instanceId?h:null,onAutoStartConsumed:()=>_(wt),terminalOpen:u?.driver===t,onOpenTerminal:()=>{r!==void 0&&Y(n,`terminal:operate`)&&d({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:l.cwd,command:r.installed?He(r,l.settings,l.environment.platform.os):Ye(t,l.environment.platform.os),keybindings:l.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:r,terminalOpen:u?.driver===t,terminalAvailable:l!==null&&v,onOpenTerminal:()=>{r!==void 0&&l!==null&&Y(n,`terminal:operate`)&&d({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:l.cwd,command:r.installed?He(r,l.settings,l.environment.platform.os):Ye(t,l.environment.platform.os),keybindings:l.keybindings})}},t)},t[32]=v,t[33]=h,t[34]=n,t[35]=l,t[36]=u?.driver,t[37]=o):o=t[37],T=i.map(o),t[11]=S,t[12]=v,t[13]=h,t[14]=n,t[15]=r,t[16]=a,t[17]=l,t[18]=u?.driver,t[19]=C,t[20]=w,t[21]=T,t[22]=E}else C=t[19],w=t[20],T=t[21],E=t[22];let D;t[38]!==w||t[39]!==T?(D=(0,$.jsx)(`div`,{className:w,children:T}),t[38]=w,t[39]=T,t[40]=D):D=t[40];let O;t[41]===a?O=t[42]:(O=a?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(A,{size:`xs`,variant:`ghost-muted`,onClick:()=>p(!0),children:`Connect another ChatGPT account`})}):null,t[41]=a,t[42]=O);let k;t[43]!==f||t[44]!==n?(k=f?(0,$.jsx)(Ke,{environmentId:n,onClose:()=>p(!1),onAccountCreated:(e,t)=>_({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=f,t[44]=n,t[45]=k):k=t[45];let j;t[46]!==n||t[47]!==s||t[48]!==u?(j=u===null?null:(0,$.jsx)(Dt,{session:u,onClose:()=>{d(null),s({environmentId:n,input:{}})}},`${u.environmentId}:${u.providerInstanceId}:${u.driver}`),t[46]=n,t[47]=s,t[48]=u,t[49]=j):j=t[49];let M;return t[50]!==C||t[51]!==D||t[52]!==O||t[53]!==k||t[54]!==j||t[55]!==E?(M=(0,$.jsxs)(`section`,{children:[E,C,D,O,k,j]}),t[50]=C,t[51]=D,t[52]=O,t[53]=k,t[54]=j,t[55]=E,t[56]=M):M=t[56],M}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:o,terminalOpen:s,onOpenTerminal:c}=e,l=oe(i,m),u=le(ae.updateSettings,`Codex setup settings`),d;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(d=n?.instanceId??a?.instanceId??k(M.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=d):d=t[2];let f=d,p=o.settings,h;t[3]!==n||t[4]!==f||t[5]!==p.providerInstances?(h=p.providerInstances[f]??{driver:M.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=f,t[5]=p.providerInstances,t[6]=h):h=t[6];let g=h,_;t[7]===g.config?_=t[8]:(_=Je(g.config),t[7]=g.config,t[8]=_);let v=_,y=v===`existing`&&g.config!==null&&typeof g.config==`object`&&`setupMode`in g.config&&g.config.setupMode===`existing`,b;t[9]!==i||t[10]!==g||t[11]!==f||t[12]!==p||t[13]!==u?(b=e=>{u({environmentId:i,input:{patch:Ve({settings:p,instanceId:f,instance:{...g,enabled:!0,config:{...g.config!==null&&typeof g.config==`object`?g.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=g,t[11]=f,t[12]=p,t[13]=u,t[14]=b):b=t[14];let x=b,S;return t[15]!==l||t[16]!==x||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==y||t[21]!==f||t[22]!==v||t[23]!==r||t[24]!==c||t[25]!==a||t[26]!==s?(S=y?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:s,terminalAvailable:l,onOpenTerminal:c}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:f,provider:a,mode:v,enabled:a?.enabled??!0,onModeChange:x}),t[15]=l,t[16]=x,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=y,t[21]=f,t[22]=v,t[23]=r,t[24]=c,t[25]=a,t[26]=s,t[27]=S):S=t[27],S}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:o}=e,s;t[0]===n?s=t[1]:(s=Se.get(M.make(n)),t[0]=n,t[1]=s);let c=s,l=r?.displayName||(n===`claudeAgent`?`Claude Code`:c?.label??n),u;t[2]===r?u=t[3]:(u=qe(r),t[2]=r,t[3]=u);let d=u,f;t[4]===r?f=t[5]:(f=Ge(r),t[4]=r,t[5]=f);let p=f,m;t[6]===n?m=t[7]:(m=M.make(n),t[6]=n,t[7]=m);let h;t[8]!==l||t[9]!==m?(h=(0,$.jsx)(Ce,{driverKind:m,displayName:l,iconClassName:`size-5`}),t[8]=l,t[9]=m,t[10]=h):h=t[10];let g;t[11]===l?g=t[12]:(g=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:l}),t[11]=l,t[12]=g);let v=p===`ready`?`Ready to code.`:d.headline,y=p!==`ready`&&d.detail?` · ${d.detail}`:``,b;t[13]!==v||t[14]!==y?(b=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[v,y]}),t[13]=v,t[14]=y,t[15]=b):b=t[15];let x;t[16]!==g||t[17]!==b?(x=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[g,b]}),t[16]=g,t[17]=b,t[18]=x):x=t[18];let S;t[19]!==o||t[20]!==p||t[21]!==d||t[22]!==a||t[23]!==i?(S=(0,$.jsx)(`div`,{className:`shrink-0`,children:p===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(w,{className:`size-3.5`}),`Ready`]}):p===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):p===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):p===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d.headline}):(0,$.jsxs)(A,{size:`xs`,variant:`ghost`,onClick:o,disabled:i||!a,children:[(0,$.jsx)(_,{className:`size-3.5`}),p===`signIn`?`Sign in`:`Install`]})}),t[19]=o,t[20]=p,t[21]=d,t[22]=a,t[23]=i,t[24]=S):S=t[24];let C;return t[25]!==x||t[26]!==S||t[27]!==h?(C=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[h,x,S]}),t[25]=x,t[26]=S,t[27]=h,t[28]=C):C=t[28],C}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:i}=e,{command:a,cwd:s,driver:c,environmentId:l,keybindings:u,providerInstanceId:d}=n,f=oe(l,m),[p]=r(Re,!1,v),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={reportFailure:!1},t[0]=h):h=t[0];let g=le(ve.open,h),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_={reportFailure:!1},t[1]=_):_=t[1];let y=le(ve.write,_),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b={reportFailure:!1},t[2]=b):b=t[2];let x=le(ve.close,b),S;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=Promise.resolve(),t[3]=S):S=t[3];let C=(0,Z.useRef)(S),w=(0,Z.useRef)(0),E=(0,Z.useRef)(null),D;t[4]===c?D=t[5]:(D=()=>`onboarding-${c}-${T()}`,t[4]=c,t[5]=D);let[O]=(0,Z.useState)(D),k;t[6]===l?k=t[7]:(k=o(l,dt),t[6]=l,t[7]=k);let j=k,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==x||t[9]!==a||t[10]!==s||t[11]!==l||t[12]!==g||t[13]!==d||t[14]!==O||t[15]!==y?(L=()=>{let e=w.current+1;return w.current=e,E.current=e,F(`preparing`),C.current=C.current.then(async()=>{if(E.current!==e)return;if(!Y(l,`terminal:operate`)){F(`openFailed`);return}if((await g({environmentId:l,input:{threadId:dt,terminalId:O,cwd:s,providerInstanceId:d}}))._tag!==`Success`){E.current===e&&F(`openFailed`);return}if(E.current!==e)return;if(!Y(l,`terminal:operate`)){F(`writeFailed`);return}let t=await y({environmentId:l,input:{threadId:dt,terminalId:O,data:a}});E.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{E.current===e&&(E.current=null),C.current=C.current.then(async()=>{Y(l,`terminal:operate`)&&await x({environmentId:l,input:{threadId:dt,terminalId:O,deleteHistory:!0}})})}},t[8]=x,t[9]=a,t[10]=s,t[11]=l,t[12]=g,t[13]=d,t[14]=O,t[15]=y,t[16]=L):L=t[16];let R;t[17]!==x||t[18]!==a||t[19]!==s||t[20]!==l||t[21]!==g||t[22]!==d||t[23]!==M||t[24]!==O||t[25]!==y?(R=[x,a,s,l,g,d,M,O,y],t[17]=x,t[18]=a,t[19]=s,t[20]=l,t[21]=g,t[22]=d,t[23]=M,t[24]=O,t[25]=y,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==f||t[28]!==a||t[29]!==P?(z=f?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:a}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=f,t[28]=a,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==f||t[34]!==l||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(A,{size:`xs`,variant:`ghost`,disabled:!f,onClick:()=>{Y(l,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=f,t[34]=l,t[35]=P,t[36]=V):V=t[36];let H;t[37]===i?H=t[38]:(H=(0,$.jsx)(A,{size:`xs`,variant:`ghost-muted`,onClick:i,children:`Close`}),t[37]=i,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==p||t[46]!==s||t[47]!==c||t[48]!==u||t[49]!==i||t[50]!==d||t[51]!==O||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:O,terminalLabel:`Install ${c}`,cwd:s,providerInstanceId:d,advancedTypography:p,onSessionExited:i,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:u}):null,t[45]=p,t[46]=s,t[47]=c,t[48]=u,t[49]=i,t[50]=d,t[51]=O,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(81),{scans:n,isImporting:r,setIsImporting:a,onDone:o}=e,{environments:s}=re(),c=se(n,S),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={reportFailure:!1},t[0]=l):l=t[0];let u=le(H.create,l),d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d={reportFailure:!1},t[1]=d):d=t[1];let f=le(ot,d),p=B(),[m,h]=(0,Z.useState)(null),g=(0,Z.useRef)(``),_=(0,Z.useRef)(0),[v,y]=(0,Z.useState)(null),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=new Map,t[2]=b):b=t[2];let C=(0,Z.useRef)(b),w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=new Map,t[3]=w):w=t[3];let T=(0,Z.useRef)(w),E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[4]=E):E=t[4];let O=(0,Z.useRef)(E),k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(k=new Map,t[5]=k):k=t[5];let j=(0,Z.useRef)(k),M=(0,Z.useRef)(0),N,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>(M.current+=1,()=>{M.current+=1}),P=[],t[6]=N,t[7]=P):(N=t[6],P=t[7]),(0,Z.useEffect)(N,P);let F,I;t[8]!==v||t[9]!==o||t[10]!==p||t[11]!==a?(I=()=>{v!==null&&p.some(e=>e.id===v.projectId&&e.environmentId===v.environmentId)&&(y(null),o(v,g.current,_.current).then(e=>{e||a(!1)}))},F=[v,o,p,a],t[8]=v,t[9]=o,t[10]=p,t[11]=a,t[12]=F,t[13]=I):(F=t[12],I=t[13]),(0,Z.useEffect)(I,F);let R;t[14]===n?R=t[15]:(R=Qe(n.flatMap(Lt)),t[14]=n,t[15]=R);let{available:z,recent:V}=R,W;t[16]!==V||t[17]!==m?(W=m??new Set(V.map(It)),t[16]=V,t[17]=m,t[18]=W):W=t[18];let K=W,q,J;if(t[19]!==z||t[20]!==K||t[21]!==c){let e;t[24]===K?e=t[25]:(e=e=>K.has(e.key),t[24]=K,t[25]=e),q=z.filter(e);let n;t[26]===c?n=t[27]:(n=e=>c.has(e.environmentId),t[26]=c,t[27]=n),J=q.every(n),t[19]=z,t[20]=K,t[21]=c,t[22]=q,t[23]=J}else q=t[22],J=t[23];let ee=J,[te,ne]=(0,Z.useState)(``),ie=ee?te===kt?``:te:kt,ae;t[28]!==o||t[29]!==a?(ae=()=>{let e=nt(O.current,T.current,C.current);if(e===void 0){o(void 0,g.current,_.current);return}a(!0),y(e)},t[28]=o,t[29]=a,t[30]=ae):ae=t[30];let oe=ae,Y;t[31]!==u||t[32]!==oe||t[33]!==f||t[34]!==r||t[35]!==o||t[36]!==n||t[37]!==a?(Y=async e=>{if(r)return;let t=()=>e.every(Ft),s=()=>{a(!1),ne(kt)};if(!t()){s();return}if(e.length===0){o();return}a(!0),g.current=``,_.current=0,O.current=e.map(Pt);let c=M.current,l=C.current,d=j.current,p=l.size>0?e.filter(e=>l.has(e.key)).length:0,m=0,h=0,v=new Set;for(let n of e){let{environmentId:e}=n;if(c!==M.current||l!==C.current)return;if(!t()){s();return}if(l.has(n.key))continue;let r=tt(U(),e,n);if(r===null){let t=d.get(n.key);if(t===void 0){let e=D();t={projectId:e,commandId:x.make(`onboarding:project:create:${e}`)},d.set(n.key,t)}r=t.projectId;let i=await u({environmentId:e,input:{projectId:r,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(c!==M.current||l!==C.current)return;if(i._tag!==`Success`){L(i)||(d.delete(n.key),v.add(e));continue}}if(!t()){s();return}let a=await f({environmentId:e,input:{projectId:r,expectedWorkspaceRoot:n.path}});if(c!==M.current||l!==C.current)return;a._tag===`Success`?(m+=a.value.importedCount,h+=a.value.skippedCount,a.value.importedCount>0&&T.current.set(n.key,i(e,r)),a.value.skippedCount===0&&(p+=1,l.set(n.key,i(e,r)))):L(a)||(d.delete(n.key),v.add(e))}for(let e of n)v.has(e.environmentId)&&e.refresh();a(!1),_.current=m,p<e.length&&(m>0&&h>0?g.current=`Imported ${m} ${m===1?`thread`:`threads`}. ${h} ${h===1?`thread`:`threads`} could not be imported.`:h>0?g.current=`${h} ${h===1?`thread could`:`threads could`} not be imported.`:m>0?g.current=`Imported ${m} ${m===1?`thread`:`threads`}. Some thread history could not be imported.`:g.current=`Could not import thread history.`),oe()},t[31]=u,t[32]=oe,t[33]=f,t[34]=r,t[35]=o,t[36]=n,t[37]=a,t[38]=Y):Y=t[38];let ce=Y;if(n.every(Nt)&&n.some(Mt)){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[39]=e):e=t[39];let n;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[40]=n):n=t[40];let r;return t[41]===o?r=t[42]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(A,{variant:`ghost-muted`,onClick:()=>void o(),children:`Do not import projects`})})]}),t[41]=o,t[42]=r),r}let ue;t[43]!==z||t[44]!==r||t[45]!==q?(ue=z.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[q.length,` of `,z.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(A,{variant:`ghost`,size:`xs`,disabled:r||q.length===z.length,onClick:()=>h(new Set(z.map(jt))),children:`Select all`}),(0,$.jsx)(A,{variant:`ghost`,size:`xs`,disabled:r||q.length===0,onClick:()=>h(new Set),children:`Select none`})]})]}):null,t[43]=z,t[44]=r,t[45]=q,t[46]=ue):ue=t[46];let de;if(t[47]!==z||t[48]!==s||t[49]!==r||t[50]!==n||t[51]!==K){let e;t[53]!==z||t[54]!==s||t[55]!==r||t[56]!==n.length||t[57]!==K?(e=e=>{let t=z.filter(t=>t.environmentId===e.environmentId),i=s.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:r,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:i}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(A,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Rt,{candidates:t,selectedKeys:K,onSelectionChange:h})]},e.environmentId)},t[53]=z,t[54]=s,t[55]=r,t[56]=n.length,t[57]=K,t[58]=e):e=t[58],de=n.map(e),t[47]=z,t[48]=s,t[49]=r,t[50]=n,t[51]=K,t[52]=de}else de=t[52];let pe;t[59]===de?pe=t[60]:(pe=(0,$.jsx)(fe,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:de})}),t[59]=de,t[60]=pe);let me;t[61]===ie?me=t[62]:(me=ie?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:ie}):null,t[61]=ie,t[62]=me);let he;t[63]!==oe||t[64]!==r?(he=(0,$.jsx)(A,{variant:`ghost-muted`,disabled:r,onClick:oe,children:`Do not import projects`}),t[63]=oe,t[64]=r,t[65]=he):he=t[65];let ge=!ee||r||q.length===0,X;t[66]!==ce||t[67]!==q?(X=()=>void ce(q),t[66]=ce,t[67]=q,t[68]=X):X=t[68];let _e=r?`Importing…`:`Import ${q.length} ${q.length===1?`project`:`projects`}`,ve;t[69]!==ge||t[70]!==X||t[71]!==_e?(ve=(0,$.jsx)(A,{autoFocus:!0,disabled:ge,onClick:X,children:_e}),t[69]=ge,t[70]=X,t[71]=_e,t[72]=ve):ve=t[72];let ye;t[73]!==he||t[74]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[he,ve]}),t[73]=he,t[74]=ve,t[75]=ye):ye=t[75];let be;return t[76]!==ue||t[77]!==pe||t[78]!==me||t[79]!==ye?(be=(0,$.jsxs)(Kt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[ue,pe,me,ye]}),t[76]=ue,t[77]=pe,t[78]=me,t[79]=ye,t[80]=be):be=t[80],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return Y(e.environmentId,S)}function It(e){return e.key}function Lt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Rt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:o,other:s}=a,c;t[2]!==i||t[3]!==r?(c=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=c):c=t[4];let l=c,u;if(t[5]!==s||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),u=s.filter(e),t[5]=s,t[6]=r,t[7]=u}else u=t[7];let d=u.length,f;if(t[10]!==o||t[11]!==r||t[12]!==l){let e;t[14]!==r||t[15]!==l?(e=e=>(0,$.jsx)(Bt,{group:e,selectedKeys:r,onToggle:l},e.key),t[14]=r,t[15]=l,t[16]=e):e=t[16],f=o.map(e),t[10]=o,t[11]=r,t[12]=l,t[13]=f}else f=t[13];let p;t[17]!==s||t[18]!==d||t[19]!==r||t[20]!==l?(p=s.length>0?(0,$.jsxs)(je,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(X,{checked:d===s.length,indeterminate:d>0&&d<s.length,onCheckedChange:e=>l(s.map(zt),e===!0)}),(0,$.jsxs)(De,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(N,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[s.length,` `,s.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(Ee,{children:s.map(e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>l([e.key],t)},e.key))})]}):null,t[17]=s,t[18]=d,t[19]=r,t[20]=l,t[21]=p):p=t[21];let m;return t[22]!==f||t[23]!==p?(m=(0,$.jsxs)($.Fragment,{children:[f,p]}),t[22]=f,t[23]=p,t[24]=m):m=t[24],m}function zt(e){return e.key}function Bt(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,o;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Ht);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),o=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=o}else a=t[2],o=t[3];let s=o.length,c=n.candidates.length===1,l=n.candidates[0];if(c&&l!==void 0){let e=n.label,a=l.path,o;t[6]!==l.key||t[7]!==r?(o=r.has(l.key),t[6]=l.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==l.key?(s=e=>i([l.key],e),t[9]=i,t[10]=l.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==l||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(Wt,{candidate:l,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=l,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let u=s===a.length,d=s>0&&s<a.length,f;t[17]!==a||t[18]!==i?(f=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=f):f=t[19];let p;t[20]!==u||t[21]!==d||t[22]!==f?(p=(0,$.jsx)(X,{checked:u,indeterminate:d,onCheckedChange:f}),t[20]=u,t[21]=d,t[22]=f,t[23]=p):p=t[23];let m;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(N,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=m):m=t[24];let h;t[25]===n.label?h=t[26]:(h=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=h);let g;t[27]===n.candidates?g=t[28]:(g=new Set(n.candidates.flatMap(Vt)),t[27]=n.candidates,t[28]=g);let _;t[29]===g?_=t[30]:(_=[...g],t[29]=g,t[30]=_);let v;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==_?(v=(0,$.jsx)(Gt,{sources:_,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=_,t[34]=v):v=t[34];let y;t[35]!==v||t[36]!==h?(y=(0,$.jsxs)(De,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[m,h,v]}),t[35]=v,t[36]=h,t[37]=y):y=t[37];let b;t[38]!==y||t[39]!==p?(b=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[p,y]}),t[38]=y,t[39]=p,t[40]=b):b=t[40];let x;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],x=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=x}else x=t[44];let S;t[48]===x?S=t[49]:(S=(0,$.jsx)(Ee,{children:x}),t[48]=x,t[49]=S);let C;return t[50]!==b||t[51]!==S?(C=(0,$.jsxs)(je,{defaultOpen:!0,children:[b,S]}),t[50]=b,t[51]=S,t[52]=C):C=t[52],C}function Vt(e){return e.sources}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=j(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Wt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=j(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(X,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Ut,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(ee,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(te,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(ne,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let y=c?null:n.sources,b;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==y?(b=(0,$.jsx)(Gt,{sources:y,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==v||t[26]!==b||t[27]!==u||t[28]!==f?(x=(0,$.jsxs)(`label`,{className:u,children:[f,v,b]}),t[25]=v,t[26]=b,t[27]=u,t[28]=f,t[29]=x):x=t[29],x}function Gt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:ue(i),t[0]=i,t[1]=a);let o=a,s=o===null?``:o.suffix===null?`now`:o.value,c;t[2]===n?c=t[3]:(c=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:M.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=c);let l;t[4]===c?l=t[5]:(l=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:c}),t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:M.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=u);let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:u}),t[8]=u,t[9]=d);let f;t[10]===r?f=t[11]:(f=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=f);let p;t[12]===s?p=t[13]:(p=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:s}),t[12]=s,t[13]=p);let m;return t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[l,d,f,p]}),t[14]=l,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Kt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var qt=a(E);function Jt(){let e=(0,Q.c)(14),{authGateState:t}=Ne.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:Xt},e[0]=r):r=e[0];let i=q(r),a;e[1]===i?a=e[2]:(a=i.startsWith(`agents:`)?u(qt(i.slice(7))):void 0,e[1]=i,e[2]=a);let o=a,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={select:Yt},e[3]=s):s=e[3];let c=q(s),[l,d]=(0,Z.useState)(!1),f=ye(),p=t.status===`authenticated`,m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(ze,{}),e[4]=m):m=e[4];let h;e[5]!==l||e[6]!==c||e[7]!==p||e[8]!==n||e[9]!==f||e[10]!==o?(h=c&&!l?(0,$.jsx)(mt,{localAvailable:p,resumeEnvironmentId:o,onDone:async e=>{if(d(!0),e!==void 0){await f(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}));return}await n({to:`/`,replace:!0})}}):null,e[5]=l,e[6]=c,e[7]=p,e[8]=n,e[9]=f,e[10]=o,e[11]=h):h=e[11];let g;return e[12]===h?g=e[13]:(g=(0,$.jsxs)($.Fragment,{children:[m,h]}),e[12]=h,e[13]=g),g}function Yt(e){return e.pathname===`/welcome`}function Xt(e){return e.hash}export{Jt as component};
|
|
2
|
-
//# sourceMappingURL=welcome-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,Es as r,Gs as i,Jy as a,Ks as o,Lc as s,ME as c,MT as l,PT as u,Pd as d,Rf as f,Ss as p,T_ as m,Xo as h,Yo as g,_m as _,by as v,cE as y,cp as b,cy as x,g_ as S,gy as C,hd as w,l as T,ly as E,o as D,qu as O,r_ as k,sr as A,t as j,t_ as M,vd as N}from"./utils-CRwA5SKO.js";import{At as P,M as F,N as I,R as L,W as R,o as z}from"./runtime-AivVP3k8.js";import{C as B,Q as V,W as H,f as U}from"./entities-ed9IspYf.js";import{t as W}from"./runtime-BfjHqyQH.js";import{t as G}from"./spinner-Bnjv_L8F.js";import{t as K}from"./useNavigate-Dvl9uiuL.js";import{t as q}from"./useLocation-UcmQE5FC.js";import{i as J}from"./toast-BYGWNQVa.js";import{a as ee,n as te,t as ne}from"./tooltip-924Ikq0L.js";import{a as re,o as ie}from"./environments-C3ohMa2W.js";import{f as ae}from"./server-BC4-DXjw.js";import{i as oe,n as Y,o as se}from"./session-CLz6NCKX.js";import{t as ce}from"./query-CpOQgkic.js";import{t as le}from"./use-atom-command-BEC7Dpf5.js";import{a as ue}from"./timestampFormat-wac2e_Jz.js";import{t as de}from"./input-DhWmPSxf.js";import{t as fe}from"./scroll-area-BDT5qfX2.js";import{r as pe}from"./dist-DtZBcVS4.js";import{t as me}from"./dialog-x5a5g_fa.js";import{t as he}from"./useT3ConnectAuthPrompt-B9-kgi3N.js";import{t as ge}from"./CommandBlock-CgdYijxc.js";import{t as X}from"./checkbox-DU_a7ZnJ.js";import{t as _e}from"./ThreadTerminalDrawer-g8xlxRvR.js";import{i as ve}from"./terminalSessions-5_U2zswb.js";import{n as ye}from"./useHandleNewThread-B6GE4-lt.js";import{r as be,t as xe}from"./alert-B2wk0CaO.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-BG4sHSE5.js";import{t as we}from"./onboarding-BU1V8wHr.js";import{Aa as Te,Fa as Ee,Ia as De,Kr as Oe,Ma as ke,Na as Ae,Pa as je,_ as Me,f as Ne,ja as Pe,nn as Fe,rn as Ie,sn as Le,xa as Re}from"./main-DUXMPAgZ.js";import{t as ze}from"./NoProjectsHero-CCYi-y6n.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-DIWicQHy.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-CesZU0jj.js";var Z=e(t(),1),Q=c(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);if(a===void 0){t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt});continue}a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)})}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=V(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=I(W,{label:`environment-data:agent-sessions:scan`,tag:s.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=F(W,{label:`environment-data:agent-sessions:import`,tag:s.agentSessionsImport});function st(e){return P(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),r=(0,Z.useContext)(h),i;return t[0]!==e||t[1]!==r?(i=n(t=>e.map(e=>{let n=at({environmentId:e,input:{}}),i=t(n);return{environmentId:e,data:l(p(i)),error:i._tag===`Failure`?ce(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>r.refresh(n)}})),t[0]=e,t[1]=r,t[2]=i):i=t[2],g(i)}var $=e(y(),1),ut=[],dt=C.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Le(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=re(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(!1),m=(0,Z.useRef)(null),h=(0,Z.useRef)(null),g=ie();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let _=s??new Set(g?[g.environmentId]:[]),v=lt(i===`import`?u:ut),y=i===`import`&&v.every(e=>e.data===null)&&v.some(e=>e.isPending),b=e=>{e.length!==0&&(d(e),a(`agents`))},x=i===`agents`?1:i===`import`?2:0,S=(0,Z.useCallback)((e,n,i=0)=>{if(m.current!==null)return m.current;h.current!==null&&(J.close(h.current),h.current=null);let a=r().then(async()=>(h.current!==null&&(J.close(h.current),h.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return h.current===null?h.current=J.add(e):J.update(h.current,e),!1}).finally(()=>{m.current===a&&(m.current=null)});return m.current=a,a},[r,t]);return(0,$.jsxs)(me,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(ke,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(Te,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Oe,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Ae,{steps:ft,currentStep:x,isStepDisabled:e=>f||e>=x,onStepChange:e=>{f||e>x||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(Pe,{holdHeight:y,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!z(),selectedIds:_,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??_);return t?r.add(e):r.delete(e),r}),onContinue:()=>b(ct(o,_).environmentIds),onPaired:e=>{c(new Set([..._,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:v,isImporting:f,setIsImporting:p,onDone:S})})]}),(0,$.jsx)(Me,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:i,onSelectionChange:a,onToggleEnvironment:o,onContinue:s,onPaired:c}=e,{environments:l}=re(),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=z(),t[0]=u):u=t[0];let d=u,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>!d||!st(e),t[1]=p):p=t[1];let m=l.filter(p),[h,g]=(0,Z.useState)(r),[_,v]=(0,Z.useState)(!1),{ready:y,skippedIds:x}=ct(l,i),S=l.filter(e=>x.includes(e.environmentId)).map(gt),C=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{y&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&C.current?.focus()},[y]);let w,T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),T=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=w,t[3]=T):(w=t[2],T=t[3]);let E=m.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),m.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(X,{checked:i.has(e.environmentId),onCheckedChange:t=>{let n=new Set(i);t?n.add(e.environmentId):n.delete(e.environmentId),a(n)}}),(0,$.jsx)(b,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Ie(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,D;t[4]!==n||t[5]!==_||t[6]!==o||t[7]!==i?(D=d?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:_,selectedIds:i,onToggleEnvironment:o}):null,t[4]=n,t[5]=_,t[6]=o,t[7]=i,t[8]=D):D=t[8];let k,M,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(A,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),M=(0,$.jsx)(f,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=k,t[10]=M,t[11]=P):(k=t[9],M=t[10],P=t[11]);let F=h&&`rotate-90`,I;t[12]===F?I=t[13]:(I=j(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let L;t[14]===I?L=t[15]:(L=(0,$.jsx)(N,{className:I}),t[14]=I,t[15]=L);let R;t[16]!==_||t[17]!==L?(R=(0,$.jsxs)(De,{disabled:_,render:k,children:[M,P,L]}),t[16]=_,t[17]=L,t[18]=R):R=t[18];let B;t[19]===c?B=t[20]:(B=e=>{g(!1),c(e),requestAnimationFrame(()=>C.current?.focus())},t[19]=c,t[20]=B);let V;t[21]!==_||t[22]!==B?(V=(0,$.jsx)(Ee,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:_,setIsPairing:v,onPaired:B})})}),t[21]=_,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==h||t[25]!==R||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(je,{open:h,onOpenChange:g,children:[R,V]})}),t[24]=h,t[25]=R,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==D?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[D,H]}),t[28]=H,t[29]=D,t[30]=U):U=t[30];let W=S.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,S.join(`, `),`. You can set`,` `,S.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!y||_,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(O,{className:`size-3.5`}),t[32]=J):J=t[32];let ee;t[33]!==s||t[34]!==K||t[35]!==q?(ee=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(A,{className:`shrink-0 self-end`,ref:C,autoFocus:K,disabled:q,onClick:s,children:[`Continue`,J]})]}),t[33]=s,t[34]=K,t[35]=q,t[36]=ee):ee=t[36];let te;return t[37]!==U||t[38]!==W||t[39]!==ee||t[40]!==w||t[41]!==T||t[42]!==E?(te=(0,$.jsxs)($.Fragment,{children:[w,T,E,U,W,ee]}),t[37]=U,t[38]=W,t[39]=ee,t[40]=w,t[41]=T,t[42]=E,t[43]=te):te=t[43],te}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:i,onToggleEnvironment:a}=e,{environments:o}=re(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={treatPendingAsSignedOut:!1},t[0]=s):s=t[0];let{isLoaded:c,isSignedIn:l}=pe(s),{openAuthPrompt:u}=he(),[f,p]=(0,Z.useState)(!0),[m,h]=(0,Z.useState)(!1),g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>h(!0),t[1]=g):g=t[1];let _=g,v=f&&!!l&&m,y=r||!c,b;t[2]!==l||t[3]!==u?(b=e=>{l||(e.preventDefault(),p(!0),u())},t[2]=l,t[3]=u,t[4]=b):b=t[4];let x,S,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(A,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),S=(0,$.jsx)(d,{className:`size-4 text-muted-foreground`}),C=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=x,t[6]=S,t[7]=C):(x=t[5],S=t[6],C=t[7]);let w=c?l?m?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,T;t[8]===w?T=t[9]:(T=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:w}),t[8]=w,t[9]=T);let E=f&&l&&`rotate-90`,D;t[10]===E?D=t[11]:(D=j(`size-4 text-muted-foreground`,E),t[10]=E,t[11]=D);let O;t[12]===D?O=t[13]:(O=(0,$.jsx)(N,{className:D}),t[12]=D,t[13]=O);let k;t[14]!==T||t[15]!==O||t[16]!==y||t[17]!==b?(k=(0,$.jsxs)(De,{disabled:y,onClick:b,render:x,children:[S,C,T,O]}),t[14]=T,t[15]=O,t[16]=y,t[17]=b,t[18]=k):k=t[18];let M;t[19]!==n||t[20]!==o||t[21]!==l||t[22]!==a||t[23]!==i?(M=l?(0,$.jsx)(Fe,{primaryEnvironmentId:null,savedEnvironments:o,showSavedEnvironments:!0,onDiscoveryReady:_,selection:{selectedIds:i,onChange:a,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=o,t[21]=l,t[22]=a,t[23]=i,t[24]=M):M=t[24];let P;t[25]===M?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:M}),t[25]=M,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(ge,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(Ee,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==k||t[33]!==R||t[34]!==v?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(je,{open:v,onOpenChange:p,children:[k,R]})}),t[32]=k,t[33]=R,t[34]=v,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(38),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let o=le(we,a),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(``),d=(0,Z.useRef)(!0),f,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>(d.current=!0,()=>{d.current=!1}),p=[],t[1]=f,t[2]=p):(f=t[1],p=t[2]),(0,Z.useEffect)(f,p);let m;t[3]!==o||t[4]!==n||t[5]!==i||t[6]!==s||t[7]!==r?(m=async()=>{if(n||s.trim().length===0)return;r(!0),u(``);let e=await o({pairingUrl:s.trim()});if(!d.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(L(e))return;let t=R(e);u(t instanceof Error?t.message:`Pairing failed.`)},t[3]=o,t[4]=n,t[5]=i,t[6]=s,t[7]=r,t[8]=m):m=t[8];let h=m,g;t[9]===h?g=t[10]:(g=e=>{e.preventDefault(),h()},t[9]=h,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=_):_=t[11];let v=l.length>0,y=l?`onboarding-pairing-error`:void 0,b;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>c(e.currentTarget.value),t[12]=b):b=t[12];let x;t[13]!==n||t[14]!==s||t[15]!==v||t[16]!==y?(x=(0,$.jsxs)(`div`,{children:[_,(0,$.jsx)(de,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":v,"aria-describedby":y,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:s,onChange:b,onKeyDown:yt})]}),t[13]=n,t[14]=s,t[15]=v,t[16]=y,t[17]=x):x=t[17];let S;t[18]===l?S=t[19]:(S=l?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:l})}):null,t[18]=l,t[19]=S);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsxs)(De,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(N,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=C):C=t[20];let w;t[21]!==n||t[22]!==s?(w=n||s.trim().length===0,t[21]=n,t[22]=s,t[23]=w):w=t[23];let T=n?`Pairing...`:`Pair`,E;t[24]!==w||t[25]!==T?(E=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[C,(0,$.jsx)(A,{type:`submit`,disabled:w,children:T})]}),t[24]=w,t[25]=T,t[26]=E):E=t[26];let D,O;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:`Run this on the computer with your code.`}),O=(0,$.jsx)(ge,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=D,t[28]=O):(D=t[27],O=t[28]);let k;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),t[29]=k):k=t[29];let j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(Ee,{children:[D,O,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`Start P4 Code first, or run `,k,`. Add `,(0,$.jsx)(`code`,{className:`font-mono`,children:`--tailscale`}),` to use your tailnet.`]})]}),t[30]=j):j=t[30];let M;t[31]===E?M=t[32]:(M=(0,$.jsxs)(je,{children:[E,j]}),t[31]=E,t[32]=M);let P;return t[33]!==x||t[34]!==S||t[35]!==M||t[36]!==g?(P=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:g,children:[x,S,M]})}),t[33]=x,t[34]=S,t[35]=M,t[36]=g,t[37]=P):P=t[37],P}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=re(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(fe,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(O,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(A,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(Kt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function St(e){let t=(0,Q.c)(57),{environmentId:n,machineLabel:r}=e,i;t[0]===n?i=t[1]:(i=ae.providersValueAtom(n),t[0]=n,t[1]=i);let a=g(i),o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o={reportFailure:!1},t[2]=o):o=t[2];let s=le(ae.refreshProviders,o),c;t[3]===n?c=t[4]:(c=ae.configValueAtom(n),t[3]=n,t[4]=c);let l=g(c),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(null),v=oe(n,m),y,b;t[5]!==n||t[6]!==s?(y=()=>{s({environmentId:n,input:{}})},b=[n,s],t[5]=n,t[6]=s,t[7]=y,t[8]=b):(y=t[7],b=t[8]),(0,Z.useEffect)(y,b);let x;t[9]===a?x=t[10]:(x=Ue(a),t[9]=a,t[10]=x);let S=x,C,w,T,E;if(t[11]!==S||t[12]!==v||t[13]!==h||t[14]!==n||t[15]!==r||t[16]!==a||t[17]!==l||t[18]!==u?.driver){let e;t[23]!==S||t[24]!==a?(e=e=>{let t=e===`codex`?a?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:S.get(e),instanceId:S.get(e)?.instanceId}]},t[23]=S,t[24]=a,t[25]=e):e=t[25];let i=bt.flatMap(e);if(h){let e;t[26]===h?e=t[27]:(e=e=>e.instanceId===h.instanceId,t[26]=h,t[27]=e);let n=i.findIndex(e),[r]=n>=0?i.splice(n,1):[];i.unshift(r??{driver:`codex`,provider:void 0,instanceId:h.instanceId})}t[28]===r?E=t[29]:(E=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:r}),t[28]=r,t[29]=E),t[30]===v?C=t[31]:(C=v?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=v,t[31]=C),w=`space-y-1.5`;let o;t[32]!==v||t[33]!==h||t[34]!==n||t[35]!==l||t[36]!==u?.driver?(o=e=>{let{driver:t,provider:r,instanceId:i}=e;return t===`codex`&&l!==null?(0,$.jsx)(Tt,{environmentId:n,provider:r,serverConfig:l,createdAccount:i===h?.instanceId?h:null,onAutoStartConsumed:()=>_(wt),terminalOpen:u?.driver===t,onOpenTerminal:()=>{r!==void 0&&Y(n,`terminal:operate`)&&d({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:l.cwd,command:r.installed?He(r,l.settings,l.environment.platform.os):Ye(t,l.environment.platform.os),keybindings:l.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:r,terminalOpen:u?.driver===t,terminalAvailable:l!==null&&v,onOpenTerminal:()=>{r!==void 0&&l!==null&&Y(n,`terminal:operate`)&&d({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:l.cwd,command:r.installed?He(r,l.settings,l.environment.platform.os):Ye(t,l.environment.platform.os),keybindings:l.keybindings})}},t)},t[32]=v,t[33]=h,t[34]=n,t[35]=l,t[36]=u?.driver,t[37]=o):o=t[37],T=i.map(o),t[11]=S,t[12]=v,t[13]=h,t[14]=n,t[15]=r,t[16]=a,t[17]=l,t[18]=u?.driver,t[19]=C,t[20]=w,t[21]=T,t[22]=E}else C=t[19],w=t[20],T=t[21],E=t[22];let D;t[38]!==w||t[39]!==T?(D=(0,$.jsx)(`div`,{className:w,children:T}),t[38]=w,t[39]=T,t[40]=D):D=t[40];let O;t[41]===a?O=t[42]:(O=a?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(A,{size:`xs`,variant:`ghost-muted`,onClick:()=>p(!0),children:`Connect another ChatGPT account`})}):null,t[41]=a,t[42]=O);let k;t[43]!==f||t[44]!==n?(k=f?(0,$.jsx)(Ke,{environmentId:n,onClose:()=>p(!1),onAccountCreated:(e,t)=>_({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=f,t[44]=n,t[45]=k):k=t[45];let j;t[46]!==n||t[47]!==s||t[48]!==u?(j=u===null?null:(0,$.jsx)(Dt,{session:u,onClose:()=>{d(null),s({environmentId:n,input:{}})}},`${u.environmentId}:${u.providerInstanceId}:${u.driver}`),t[46]=n,t[47]=s,t[48]=u,t[49]=j):j=t[49];let M;return t[50]!==C||t[51]!==D||t[52]!==O||t[53]!==k||t[54]!==j||t[55]!==E?(M=(0,$.jsxs)(`section`,{children:[E,C,D,O,k,j]}),t[50]=C,t[51]=D,t[52]=O,t[53]=k,t[54]=j,t[55]=E,t[56]=M):M=t[56],M}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:o,terminalOpen:s,onOpenTerminal:c}=e,l=oe(i,m),u=le(ae.updateSettings,`Codex setup settings`),d;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(d=n?.instanceId??a?.instanceId??k(M.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=d):d=t[2];let f=d,p=o.settings,h;t[3]!==n||t[4]!==f||t[5]!==p.providerInstances?(h=p.providerInstances[f]??{driver:M.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=f,t[5]=p.providerInstances,t[6]=h):h=t[6];let g=h,_;t[7]===g.config?_=t[8]:(_=Je(g.config),t[7]=g.config,t[8]=_);let v=_,y=v===`existing`&&g.config!==null&&typeof g.config==`object`&&`setupMode`in g.config&&g.config.setupMode===`existing`,b;t[9]!==i||t[10]!==g||t[11]!==f||t[12]!==p||t[13]!==u?(b=e=>{u({environmentId:i,input:{patch:Ve({settings:p,instanceId:f,instance:{...g,enabled:!0,config:{...g.config!==null&&typeof g.config==`object`?g.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=g,t[11]=f,t[12]=p,t[13]=u,t[14]=b):b=t[14];let x=b,S;return t[15]!==l||t[16]!==x||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==y||t[21]!==f||t[22]!==v||t[23]!==r||t[24]!==c||t[25]!==a||t[26]!==s?(S=y?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:s,terminalAvailable:l,onOpenTerminal:c}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:f,provider:a,mode:v,enabled:a?.enabled??!0,onModeChange:x}),t[15]=l,t[16]=x,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=y,t[21]=f,t[22]=v,t[23]=r,t[24]=c,t[25]=a,t[26]=s,t[27]=S):S=t[27],S}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:o}=e,s;t[0]===n?s=t[1]:(s=Se.get(M.make(n)),t[0]=n,t[1]=s);let c=s,l=r?.displayName||(n===`claudeAgent`?`Claude Code`:c?.label??n),u;t[2]===r?u=t[3]:(u=qe(r),t[2]=r,t[3]=u);let d=u,f;t[4]===r?f=t[5]:(f=Ge(r),t[4]=r,t[5]=f);let p=f,m;t[6]===n?m=t[7]:(m=M.make(n),t[6]=n,t[7]=m);let h;t[8]!==l||t[9]!==m?(h=(0,$.jsx)(Ce,{driverKind:m,displayName:l,iconClassName:`size-5`}),t[8]=l,t[9]=m,t[10]=h):h=t[10];let g;t[11]===l?g=t[12]:(g=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:l}),t[11]=l,t[12]=g);let v=p===`ready`?`Ready to code.`:d.headline,y=p!==`ready`&&d.detail?` · ${d.detail}`:``,b;t[13]!==v||t[14]!==y?(b=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[v,y]}),t[13]=v,t[14]=y,t[15]=b):b=t[15];let x;t[16]!==g||t[17]!==b?(x=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[g,b]}),t[16]=g,t[17]=b,t[18]=x):x=t[18];let S;t[19]!==o||t[20]!==p||t[21]!==d||t[22]!==a||t[23]!==i?(S=(0,$.jsx)(`div`,{className:`shrink-0`,children:p===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(w,{className:`size-3.5`}),`Ready`]}):p===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):p===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):p===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d.headline}):(0,$.jsxs)(A,{size:`xs`,variant:`ghost`,onClick:o,disabled:i||!a,children:[(0,$.jsx)(_,{className:`size-3.5`}),p===`signIn`?`Sign in`:`Install`]})}),t[19]=o,t[20]=p,t[21]=d,t[22]=a,t[23]=i,t[24]=S):S=t[24];let C;return t[25]!==x||t[26]!==S||t[27]!==h?(C=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[h,x,S]}),t[25]=x,t[26]=S,t[27]=h,t[28]=C):C=t[28],C}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:i}=e,{command:a,cwd:s,driver:c,environmentId:l,keybindings:u,providerInstanceId:d}=n,f=oe(l,m),[p]=r(Re,!1,v),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={reportFailure:!1},t[0]=h):h=t[0];let g=le(ve.open,h),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_={reportFailure:!1},t[1]=_):_=t[1];let y=le(ve.write,_),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b={reportFailure:!1},t[2]=b):b=t[2];let x=le(ve.close,b),S;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=Promise.resolve(),t[3]=S):S=t[3];let C=(0,Z.useRef)(S),w=(0,Z.useRef)(0),E=(0,Z.useRef)(null),D;t[4]===c?D=t[5]:(D=()=>`onboarding-${c}-${T()}`,t[4]=c,t[5]=D);let[O]=(0,Z.useState)(D),k;t[6]===l?k=t[7]:(k=o(l,dt),t[6]=l,t[7]=k);let j=k,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==x||t[9]!==a||t[10]!==s||t[11]!==l||t[12]!==g||t[13]!==d||t[14]!==O||t[15]!==y?(L=()=>{let e=w.current+1;return w.current=e,E.current=e,F(`preparing`),C.current=C.current.then(async()=>{if(E.current!==e)return;if(!Y(l,`terminal:operate`)){F(`openFailed`);return}if((await g({environmentId:l,input:{threadId:dt,terminalId:O,cwd:s,providerInstanceId:d}}))._tag!==`Success`){E.current===e&&F(`openFailed`);return}if(E.current!==e)return;if(!Y(l,`terminal:operate`)){F(`writeFailed`);return}let t=await y({environmentId:l,input:{threadId:dt,terminalId:O,data:a}});E.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{E.current===e&&(E.current=null),C.current=C.current.then(async()=>{Y(l,`terminal:operate`)&&await x({environmentId:l,input:{threadId:dt,terminalId:O,deleteHistory:!0}})})}},t[8]=x,t[9]=a,t[10]=s,t[11]=l,t[12]=g,t[13]=d,t[14]=O,t[15]=y,t[16]=L):L=t[16];let R;t[17]!==x||t[18]!==a||t[19]!==s||t[20]!==l||t[21]!==g||t[22]!==d||t[23]!==M||t[24]!==O||t[25]!==y?(R=[x,a,s,l,g,d,M,O,y],t[17]=x,t[18]=a,t[19]=s,t[20]=l,t[21]=g,t[22]=d,t[23]=M,t[24]=O,t[25]=y,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==f||t[28]!==a||t[29]!==P?(z=f?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:a}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=f,t[28]=a,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==f||t[34]!==l||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(A,{size:`xs`,variant:`ghost`,disabled:!f,onClick:()=>{Y(l,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=f,t[34]=l,t[35]=P,t[36]=V):V=t[36];let H;t[37]===i?H=t[38]:(H=(0,$.jsx)(A,{size:`xs`,variant:`ghost-muted`,onClick:i,children:`Close`}),t[37]=i,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==p||t[46]!==s||t[47]!==c||t[48]!==u||t[49]!==i||t[50]!==d||t[51]!==O||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:O,terminalLabel:`Install ${c}`,cwd:s,providerInstanceId:d,advancedTypography:p,onSessionExited:i,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:u}):null,t[45]=p,t[46]=s,t[47]=c,t[48]=u,t[49]=i,t[50]=d,t[51]=O,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(81),{scans:n,isImporting:r,setIsImporting:a,onDone:o}=e,{environments:s}=re(),c=se(n,S),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={reportFailure:!1},t[0]=l):l=t[0];let u=le(H.create,l),d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d={reportFailure:!1},t[1]=d):d=t[1];let f=le(ot,d),p=B(),[m,h]=(0,Z.useState)(null),g=(0,Z.useRef)(``),_=(0,Z.useRef)(0),[v,y]=(0,Z.useState)(null),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=new Map,t[2]=b):b=t[2];let C=(0,Z.useRef)(b),w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=new Map,t[3]=w):w=t[3];let T=(0,Z.useRef)(w),E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[4]=E):E=t[4];let O=(0,Z.useRef)(E),k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(k=new Map,t[5]=k):k=t[5];let j=(0,Z.useRef)(k),M=(0,Z.useRef)(0),N,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>(M.current+=1,()=>{M.current+=1}),P=[],t[6]=N,t[7]=P):(N=t[6],P=t[7]),(0,Z.useEffect)(N,P);let F,I;t[8]!==v||t[9]!==o||t[10]!==p||t[11]!==a?(I=()=>{v!==null&&p.some(e=>e.id===v.projectId&&e.environmentId===v.environmentId)&&(y(null),o(v,g.current,_.current).then(e=>{e||a(!1)}))},F=[v,o,p,a],t[8]=v,t[9]=o,t[10]=p,t[11]=a,t[12]=F,t[13]=I):(F=t[12],I=t[13]),(0,Z.useEffect)(I,F);let R;t[14]===n?R=t[15]:(R=Qe(n.flatMap(Lt)),t[14]=n,t[15]=R);let{available:z,recent:V}=R,W;t[16]!==V||t[17]!==m?(W=m??new Set(V.map(It)),t[16]=V,t[17]=m,t[18]=W):W=t[18];let K=W,q,J;if(t[19]!==z||t[20]!==K||t[21]!==c){let e;t[24]===K?e=t[25]:(e=e=>K.has(e.key),t[24]=K,t[25]=e),q=z.filter(e);let n;t[26]===c?n=t[27]:(n=e=>c.has(e.environmentId),t[26]=c,t[27]=n),J=q.every(n),t[19]=z,t[20]=K,t[21]=c,t[22]=q,t[23]=J}else q=t[22],J=t[23];let ee=J,[te,ne]=(0,Z.useState)(``),ie=ee?te===kt?``:te:kt,ae;t[28]!==o||t[29]!==a?(ae=()=>{let e=nt(O.current,T.current,C.current);if(e===void 0){o(void 0,g.current,_.current);return}a(!0),y(e)},t[28]=o,t[29]=a,t[30]=ae):ae=t[30];let oe=ae,Y;t[31]!==u||t[32]!==oe||t[33]!==f||t[34]!==r||t[35]!==o||t[36]!==n||t[37]!==a?(Y=async e=>{if(r)return;let t=()=>e.every(Ft),s=()=>{a(!1),ne(kt)};if(!t()){s();return}if(e.length===0){o();return}a(!0),g.current=``,_.current=0,O.current=e.map(Pt);let c=M.current,l=C.current,d=j.current,p=l.size>0?e.filter(e=>l.has(e.key)).length:0,m=0,h=0,v=new Set;for(let n of e){let{environmentId:e}=n;if(c!==M.current||l!==C.current)return;if(!t()){s();return}if(l.has(n.key))continue;let r=tt(U(),e,n);if(r===null){let t=d.get(n.key);if(t===void 0){let e=D();t={projectId:e,commandId:x.make(`onboarding:project:create:${e}`)},d.set(n.key,t)}r=t.projectId;let i=await u({environmentId:e,input:{projectId:r,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(c!==M.current||l!==C.current)return;if(i._tag!==`Success`){L(i)||(d.delete(n.key),v.add(e));continue}}if(!t()){s();return}let a=await f({environmentId:e,input:{projectId:r,expectedWorkspaceRoot:n.path}});if(c!==M.current||l!==C.current)return;a._tag===`Success`?(m+=a.value.importedCount,h+=a.value.skippedCount,a.value.importedCount>0&&T.current.set(n.key,i(e,r)),a.value.skippedCount===0&&(p+=1,l.set(n.key,i(e,r)))):L(a)||(d.delete(n.key),v.add(e))}for(let e of n)v.has(e.environmentId)&&e.refresh();a(!1),_.current=m,p<e.length&&(m>0&&h>0?g.current=`Imported ${m} ${m===1?`thread`:`threads`}. ${h} ${h===1?`thread`:`threads`} could not be imported.`:h>0?g.current=`${h} ${h===1?`thread could`:`threads could`} not be imported.`:m>0?g.current=`Imported ${m} ${m===1?`thread`:`threads`}. Some thread history could not be imported.`:g.current=`Could not import thread history.`),oe()},t[31]=u,t[32]=oe,t[33]=f,t[34]=r,t[35]=o,t[36]=n,t[37]=a,t[38]=Y):Y=t[38];let ce=Y;if(n.every(Nt)&&n.some(Mt)){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[39]=e):e=t[39];let n;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[40]=n):n=t[40];let r;return t[41]===o?r=t[42]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(A,{variant:`ghost-muted`,onClick:()=>void o(),children:`Do not import projects`})})]}),t[41]=o,t[42]=r),r}let ue;t[43]!==z||t[44]!==r||t[45]!==q?(ue=z.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[q.length,` of `,z.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(A,{variant:`ghost`,size:`xs`,disabled:r||q.length===z.length,onClick:()=>h(new Set(z.map(jt))),children:`Select all`}),(0,$.jsx)(A,{variant:`ghost`,size:`xs`,disabled:r||q.length===0,onClick:()=>h(new Set),children:`Select none`})]})]}):null,t[43]=z,t[44]=r,t[45]=q,t[46]=ue):ue=t[46];let de;if(t[47]!==z||t[48]!==s||t[49]!==r||t[50]!==n||t[51]!==K){let e;t[53]!==z||t[54]!==s||t[55]!==r||t[56]!==n.length||t[57]!==K?(e=e=>{let t=z.filter(t=>t.environmentId===e.environmentId),i=s.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:r,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:i}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(A,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Rt,{candidates:t,selectedKeys:K,onSelectionChange:h})]},e.environmentId)},t[53]=z,t[54]=s,t[55]=r,t[56]=n.length,t[57]=K,t[58]=e):e=t[58],de=n.map(e),t[47]=z,t[48]=s,t[49]=r,t[50]=n,t[51]=K,t[52]=de}else de=t[52];let pe;t[59]===de?pe=t[60]:(pe=(0,$.jsx)(fe,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:de})}),t[59]=de,t[60]=pe);let me;t[61]===ie?me=t[62]:(me=ie?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:ie}):null,t[61]=ie,t[62]=me);let he;t[63]!==oe||t[64]!==r?(he=(0,$.jsx)(A,{variant:`ghost-muted`,disabled:r,onClick:oe,children:`Do not import projects`}),t[63]=oe,t[64]=r,t[65]=he):he=t[65];let ge=!ee||r||q.length===0,X;t[66]!==ce||t[67]!==q?(X=()=>void ce(q),t[66]=ce,t[67]=q,t[68]=X):X=t[68];let _e=r?`Importing…`:`Import ${q.length} ${q.length===1?`project`:`projects`}`,ve;t[69]!==ge||t[70]!==X||t[71]!==_e?(ve=(0,$.jsx)(A,{autoFocus:!0,disabled:ge,onClick:X,children:_e}),t[69]=ge,t[70]=X,t[71]=_e,t[72]=ve):ve=t[72];let ye;t[73]!==he||t[74]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[he,ve]}),t[73]=he,t[74]=ve,t[75]=ye):ye=t[75];let be;return t[76]!==ue||t[77]!==pe||t[78]!==me||t[79]!==ye?(be=(0,$.jsxs)(Kt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[ue,pe,me,ye]}),t[76]=ue,t[77]=pe,t[78]=me,t[79]=ye,t[80]=be):be=t[80],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return Y(e.environmentId,S)}function It(e){return e.key}function Lt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Rt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:o,other:s}=a,c;t[2]!==i||t[3]!==r?(c=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=c):c=t[4];let l=c,u;if(t[5]!==s||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),u=s.filter(e),t[5]=s,t[6]=r,t[7]=u}else u=t[7];let d=u.length,f;if(t[10]!==o||t[11]!==r||t[12]!==l){let e;t[14]!==r||t[15]!==l?(e=e=>(0,$.jsx)(Bt,{group:e,selectedKeys:r,onToggle:l},e.key),t[14]=r,t[15]=l,t[16]=e):e=t[16],f=o.map(e),t[10]=o,t[11]=r,t[12]=l,t[13]=f}else f=t[13];let p;t[17]!==s||t[18]!==d||t[19]!==r||t[20]!==l?(p=s.length>0?(0,$.jsxs)(je,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(X,{checked:d===s.length,indeterminate:d>0&&d<s.length,onCheckedChange:e=>l(s.map(zt),e===!0)}),(0,$.jsxs)(De,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(N,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[s.length,` `,s.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(Ee,{children:s.map(e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>l([e.key],t)},e.key))})]}):null,t[17]=s,t[18]=d,t[19]=r,t[20]=l,t[21]=p):p=t[21];let m;return t[22]!==f||t[23]!==p?(m=(0,$.jsxs)($.Fragment,{children:[f,p]}),t[22]=f,t[23]=p,t[24]=m):m=t[24],m}function zt(e){return e.key}function Bt(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,o;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Ht);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),o=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=o}else a=t[2],o=t[3];let s=o.length,c=n.candidates.length===1,l=n.candidates[0];if(c&&l!==void 0){let e=n.label,a=l.path,o;t[6]!==l.key||t[7]!==r?(o=r.has(l.key),t[6]=l.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==l.key?(s=e=>i([l.key],e),t[9]=i,t[10]=l.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==l||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(Wt,{candidate:l,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=l,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let u=s===a.length,d=s>0&&s<a.length,f;t[17]!==a||t[18]!==i?(f=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=f):f=t[19];let p;t[20]!==u||t[21]!==d||t[22]!==f?(p=(0,$.jsx)(X,{checked:u,indeterminate:d,onCheckedChange:f}),t[20]=u,t[21]=d,t[22]=f,t[23]=p):p=t[23];let m;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(N,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=m):m=t[24];let h;t[25]===n.label?h=t[26]:(h=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=h);let g;t[27]===n.candidates?g=t[28]:(g=new Set(n.candidates.flatMap(Vt)),t[27]=n.candidates,t[28]=g);let _;t[29]===g?_=t[30]:(_=[...g],t[29]=g,t[30]=_);let v;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==_?(v=(0,$.jsx)(Gt,{sources:_,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=_,t[34]=v):v=t[34];let y;t[35]!==v||t[36]!==h?(y=(0,$.jsxs)(De,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[m,h,v]}),t[35]=v,t[36]=h,t[37]=y):y=t[37];let b;t[38]!==y||t[39]!==p?(b=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[p,y]}),t[38]=y,t[39]=p,t[40]=b):b=t[40];let x;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],x=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=x}else x=t[44];let S;t[48]===x?S=t[49]:(S=(0,$.jsx)(Ee,{children:x}),t[48]=x,t[49]=S);let C;return t[50]!==b||t[51]!==S?(C=(0,$.jsxs)(je,{defaultOpen:!0,children:[b,S]}),t[50]=b,t[51]=S,t[52]=C):C=t[52],C}function Vt(e){return e.sources}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=j(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Wt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=j(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(X,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Ut,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(ee,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(te,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(ne,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let y=c?null:n.sources,b;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==y?(b=(0,$.jsx)(Gt,{sources:y,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==v||t[26]!==b||t[27]!==u||t[28]!==f?(x=(0,$.jsxs)(`label`,{className:u,children:[f,v,b]}),t[25]=v,t[26]=b,t[27]=u,t[28]=f,t[29]=x):x=t[29],x}function Gt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:ue(i),t[0]=i,t[1]=a);let o=a,s=o===null?``:o.suffix===null?`now`:o.value,c;t[2]===n?c=t[3]:(c=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:M.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=c);let l;t[4]===c?l=t[5]:(l=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:c}),t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:M.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=u);let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:u}),t[8]=u,t[9]=d);let f;t[10]===r?f=t[11]:(f=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=f);let p;t[12]===s?p=t[13]:(p=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:s}),t[12]=s,t[13]=p);let m;return t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[l,d,f,p]}),t[14]=l,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Kt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var qt=a(E);function Jt(){let e=(0,Q.c)(14),{authGateState:t}=Ne.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:Xt},e[0]=r):r=e[0];let i=q(r),a;e[1]===i?a=e[2]:(a=i.startsWith(`agents:`)?u(qt(i.slice(7))):void 0,e[1]=i,e[2]=a);let o=a,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={select:Yt},e[3]=s):s=e[3];let c=q(s),[l,d]=(0,Z.useState)(!1),f=ye(),p=t.status===`authenticated`,m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(ze,{}),e[4]=m):m=e[4];let h;e[5]!==l||e[6]!==c||e[7]!==p||e[8]!==n||e[9]!==f||e[10]!==o?(h=c&&!l?(0,$.jsx)(mt,{localAvailable:p,resumeEnvironmentId:o,onDone:async e=>{if(d(!0),e!==void 0){await f(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}));return}await n({to:`/`,replace:!0})}}):null,e[5]=l,e[6]=c,e[7]=p,e[8]=n,e[9]=f,e[10]=o,e[11]=h):h=e[11];let g;return e[12]===h?g=e[13]:(g=(0,$.jsxs)($.Fragment,{children:[m,h]}),e[12]=h,e[13]=g),g}function Yt(e){return e.pathname===`/welcome`}function Xt(e){return e.hash}export{Jt as component};
|
|
2
|
+
//# sourceMappingURL=welcome-DgOu9i5m.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-oBChb5qS.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-oBChb5qS.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-DU6HZSFF-COvkbqst.js";import{t as m}from"./linear-BUnzfXgk.js";import{t as h}from"./ordinal-BDEzSJ7C.js";import{t as g}from"./init-C-OQMol4.js";import{i as _}from"./chunk-75Z2AOVW-yaFLBspz.js";import{t as v}from"./line-C5HQ6j78.js";import"./chunk-PWAF6VOD-CtRucGgL.js";import{t as y}from"./chunk-GMAD6QVW-D54p8a4L.js";import{f as b}from"./mermaid.core-P-NUuG-D.js";function x(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function S(){var e=h().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=x(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return S(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},g.apply(d(),arguments)}var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,36]),t(c,[2,37]),t(c,[2,38]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),t(E,[2,40]),t(E,[2,41]),t(D,[2,42]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(D,[2,52]),t(D,[2,53]),t(T,[2,10]),t(T,[2,24],{32:41,31:56,24:x,29:S}),t(T,[2,26]),t(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,11]),t(T,[2,32],{35:60,29:C}),t(T,[2,34]),{33:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},t(T,[2,14]),{17:66,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,43]),t(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(T,[2,33]),{29:[1,70]},t(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(k,[2,23],{30:[1,73]}),t(T,[2,15]),t(T,[2,28]),t(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,35]),t(T,[2,19]),{25:75,27:64,29:O},t(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
5
|
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return e(j,`Parser`),j.prototype=A,A.Parser=j,new j})();C.parser=C;var w=C;function T(e){return e.type===`bar`}e(T,`isBarPlot`);function E(e){return e.type===`band`}e(E,`isBandAxisData`);function D(e){return e.type===`linear`}e(D,`isLinearAxisData`);var O=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},k=.7,A=.2,j=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){k*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(k*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},M=class extends j{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=S().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),t.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ee=class extends j{static{e(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=m().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=m().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function N(e,t,n,r){let i=new O(r);return E(e)?new M(t,n,e.categories,e.title,i):new ee(t,n,[e.min,e.max],e.title,i)}e(N,`getAxis`);var te=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function P(e,t,n,r){return new te(new O(r),e,t,n)}e(P,`getChartTitleComponent`);var ne=.75,re=.5,ie=.35;function F(e){return{fontSize:e,markerSize:e*ne,markerSpacing:e*ie,itemSpacing:e*re}}e(F,`getLegendLayout`);var ae=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{e(this,`ChartLegend`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(e=>e.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:t,markerSize:n,markerSpacing:r,itemSpacing:i}=F(this.chartConfig.legendFontSize),a=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(e=>e.title),t),o=this.chartConfig.legendPadding*2+n+r+a.width,s=this.chartConfig.legendPadding*2+this.visiblePlots.length*t+(this.visiblePlots.length-1)*i;return o<=e.width&&s<=e.height?(this.boundingRect.width=o,this.boundingRect.height=s):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:t,markerSpacing:n,itemSpacing:r}=F(this.chartConfig.legendFontSize),i=e+r,a=this.boundingRect.x+this.chartConfig.legendPadding,o=this.boundingRect.y+this.chartConfig.legendPadding,s=[],c=[];for(let[e,n]of this.visiblePlots.entries())if(T(n))s.push({x:a,y:o+e*i,width:t,height:t,fill:n.fill,strokeFill:n.fill,strokeWidth:0});else{let r=o+e*i+t/2;c.push({path:`M ${a},${r} L ${a+t},${r}`,strokeFill:n.strokeFill,strokeWidth:n.strokeWidth})}return[{groupTexts:[`legend`,`markers`],type:`rect`,data:s},{groupTexts:[`legend`,`markers`],type:`path`,data:c},{groupTexts:[`legend`,`label`],type:`text`,data:this.visiblePlots.map((r,s)=>({text:r.title,x:a+t+n,y:o+s*i+t/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:`middle`,horizontalPos:`left`}))}]}};function I(e,t,n,r){return new ae(new O(r),e,t,n)}e(I,`getChartLegendComponent`);var oe=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?v().y(e=>e[0]).x(e=>e[1])(e):v().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},se=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ce=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new oe(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new se(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}}return e}};function le(e,t,n){return new ce(e,t,n)}e(le,`getPlotComponent`);var ue=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:P(e,t,n,r),plot:le(e,t,n),legend:I(e,t,n,r),xAxis:N(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:N(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i={width:0,height:0},a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`bottom`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=s.height,this.componentStore.yAxis.setAxisPosition(`left`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=s.width,e-=s.width,i=this.componentStore.legend.calculateSpace({width:e,height:o}),e-=i.width,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.legend.setBoundingBoxXY({x:n+a,y:r+Math.max((o-i.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+o}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a={width:0,height:0},o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),c=this.componentStore.plot.calculateSpace({width:o,height:s});e-=c.width,t-=c.height,c=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=c.height,t-=c.height,this.componentStore.xAxis.setAxisPosition(`left`),c=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=c.width,r=c.width,this.componentStore.yAxis.setAxisPosition(`top`),c=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=c.height,i=n+c.height,a=this.componentStore.legend.calculateSpace({width:e,height:s}),e-=a.width,e>0&&(o+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:o,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.legend.setBoundingBoxXY({x:r+o,y:i+Math.max((s-a.height)/2,0)}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},de=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new ue(e,t,n,r).getDrawableElement()}},L=0,R,z=K(),B=G(),V=q(),H=B.plotColorPalette.split(`,`).map(e=>e.trim()),U=!1,W=!1;function G(){let e=n(),t=s();return _(e.xyChart,t.themeVariables.xyChart)}e(G,`getChartDefaultThemeConfig`);function K(){let e=s();return _(l.xyChart,e.xyChart)}e(K,`getChartDefaultConfig`);function q(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(q,`getChartDefaultData`);function J(e){let t=s();return p(e.trim(),t)}e(J,`textSanitizer`);function Y(e){R=e}e(Y,`setTmpSVGG`);function fe(e){e===`horizontal`?z.chartOrientation=`horizontal`:z.chartOrientation=`vertical`}e(fe,`setOrientation`);function pe(e){V.xAxis.title=J(e.text)}e(pe,`setXAxisTitle`);function X(e,t){V.xAxis={type:`linear`,title:V.xAxis.title,min:e,max:t},U=!0}e(X,`setXAxisRangeData`);function me(e){V.xAxis={type:`band`,title:V.xAxis.title,categories:e.map(e=>J(e.text))},U=!0}e(me,`setXAxisBand`);function he(e){V.yAxis.title=J(e.text)}e(he,`setYAxisTitle`);function Z(e,t){V.yAxis={type:`linear`,title:V.yAxis.title,min:e,max:t},W=!0}e(Z,`setYAxisRangeData`);function ge(e){let t=Math.min(...e),n=Math.max(...e),r=D(V.yAxis)?V.yAxis.min:1/0,i=D(V.yAxis)?V.yAxis.max:-1/0;V.yAxis={type:`linear`,title:V.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(ge,`setYAxisRangeFromPlotData`);function Q(e){let t=[];if(e.length===0)return t;if(!U){let t=D(V.xAxis)?V.xAxis.min:1/0,n=D(V.xAxis)?V.xAxis.max:-1/0;X(Math.min(t,1),Math.max(n,e.length))}if(E(V.xAxis)&&e.length>V.xAxis.categories.length&&(e=e.slice(0,V.xAxis.categories.length)),W||ge(e),E(V.xAxis)&&(t=V.xAxis.categories.map((t,n)=>[t,e[n]])),D(V.xAxis)){let n=V.xAxis.min,r=V.xAxis.max;if(e.length===1)t=[[`${n}`,e[0]]];else{let i=(r-n)/(e.length-1);t=e.map((e,t)=>[`${n+t*i}`,e])}}return t}e(Q,`transformDataWithoutCategory`);function $(e){return H[e===0?0:e%H.length]}e($,`getPlotColorFromPalette`);function _e(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?J(e.label):``),i=Q(n),a=r.some(e=>e!==``);V.plots.push({type:`line`,title:J(e.text),strokeFill:$(L),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),L++}e(_e,`setLineData`);function ve(e,t){let n=Q(t.map(e=>e.value));V.plots.push({type:`bar`,title:J(e.text),fill:$(L),data:n}),L++}e(ve,`setBarData`);function ye(){if(V.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return V.title=d(),de.build(z,V,B,R)}e(ye,`getDrawableElem`);function be(){return B}e(be,`getChartThemeConfig`);function xe(){return z}e(xe,`getChartConfig`);function Se(){return V}e(Se,`getXYChartData`);var Ce={parser:w,db:{getDrawableElem:ye,clear:e(function(){o(),L=0,z=K(),V=q(),B=G(),H=B.plotColorPalette.split(`,`).map(e=>e.trim()),U=!1,W=!1},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r,setOrientation:fe,setXAxisTitle:pe,setXAxisRangeData:X,setXAxisBand:me,setYAxisTitle:he,setYAxisRangeData:Z,setLineData:_e,setBarData:ve,setTmpSVGG:Y,getChartThemeConfig:be,getChartConfig:xe,getXYChartData:Se},renderer:{draw:e((n,r,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),l=o.getChartConfig(),u=o.getXYChartData().plots[0].data.map(e=>e[1]);function d(e){return e===`top`?`text-before-edge`:`middle`}e(d,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(p,`getTextTransformation`),t.debug(`Rendering xychart chart
|
|
7
7
|
`+n);let m=b(r),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,l.width).attr(`height`,l.height).attr(`class`,`background`);c(m,l.height,l.width,!0),m.attr(`viewBox`,`0 0 ${l.width} ${l.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let _=o.getDrawableElem(),v={};function y(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&v[n]&&(i=v[n]),n+=e[r],t=v[n],t||=v[n]=i.append(`g`).attr(`class`,e[r])}return t}e(y,`getGroup`);for(let t of _){if(t.data.length===0)continue;let n=y(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),l.showDataLabel){let r=l.showDataLabelOutsideBar;if(l.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};e(i,`fitsHorizontally`);let a=.7,o=10,c=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),l=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...l)),f=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),l=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,l).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>d(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth)}}},`draw`)}};export{Ce as diagram};
|
|
8
|
-
//# sourceMappingURL=xychartDiagram-S5SC5T6Z-
|
|
8
|
+
//# sourceMappingURL=xychartDiagram-S5SC5T6Z-B6Gl2NIG.js.map
|
package/dist/client/index.html
CHANGED
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
</script>
|
|
407
407
|
<style>html,body,#root{width:100%;height:100%;margin:0}body{color:#262626;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}html.dark body{color:#f5f5f5;background:#0a0a0a}#boot-shell{background:inherit;min-height:100%;color:inherit;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}html[data-theme-selected=true] #boot-shell{background:var(--boot-background);color:var(--boot-foreground)}#boot-shell-card{z-index:1;justify-content:center;align-items:center;width:96px;height:96px;display:flex;position:relative}#boot-shell-logo{object-fit:contain;width:64px;height:64px}#boot-error{text-align:center;justify-items:center;gap:16px;max-width:600px;padding:24px;display:grid}#boot-error p{overflow-wrap:anywhere;margin:0}#boot-error button{color:inherit;font:inherit;cursor:pointer;background:0 0;border:1px solid;border-radius:4px;padding:8px 16px}</style>
|
|
408
408
|
<title>P4 Code</title>
|
|
409
|
-
<script type="module" crossorigin src="/assets/index-
|
|
409
|
+
<script type="module" crossorigin src="/assets/index-B_GLtP0M.js"></script>
|
|
410
410
|
</head>
|
|
411
411
|
<body>
|
|
412
412
|
<div id="root">
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{M as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createArchitectureServices};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-zhv2Vnfx.js";import"./chunk-75Z2AOVW-LBmwoUvq.js";import"./chunk-PWAF6VOD-CJFd7LKC.js";import"./chunk-GMAD6QVW-CAAu3Cn5.js";import"./chunk-P2QGCYS3-BuGzzo3g.js";import"./chunk-4HAMMTFA-BpyojyCk.js";import"./chunk-GVQU2GXP-Br_UAx49.js";import"./chunk-OSK3NFVY-BiMJbcHf.js";import"./chunk-F27PBJKO-K5uPeDhv.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C_w0mNLk.js";import"./chunk-L3NEJ4N5-D1cWO7rm.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-B0vIU1Au.js";import"./mermaid.core-C6GXL70P.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=classDiagram-ZZMXUADV-Cm99q1tS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-zhv2Vnfx.js";import"./chunk-75Z2AOVW-LBmwoUvq.js";import"./chunk-PWAF6VOD-CJFd7LKC.js";import"./chunk-GMAD6QVW-CAAu3Cn5.js";import"./chunk-P2QGCYS3-BuGzzo3g.js";import"./chunk-4HAMMTFA-BpyojyCk.js";import"./chunk-GVQU2GXP-Br_UAx49.js";import"./chunk-OSK3NFVY-BiMJbcHf.js";import"./chunk-F27PBJKO-K5uPeDhv.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C_w0mNLk.js";import"./chunk-L3NEJ4N5-D1cWO7rm.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-B0vIU1Au.js";import"./mermaid.core-C6GXL70P.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=classDiagram-v2-VYDZK3BY-Cm99q1tS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{O as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createEventModelingServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-zhv2Vnfx.js";import"./chunk-75Z2AOVW-LBmwoUvq.js";import"./chunk-PWAF6VOD-CJFd7LKC.js";import"./chunk-GMAD6QVW-CAAu3Cn5.js";import"./chunk-P2QGCYS3-BuGzzo3g.js";import"./chunk-4HAMMTFA-BpyojyCk.js";import"./chunk-GVQU2GXP-Br_UAx49.js";import"./chunk-OSK3NFVY-BiMJbcHf.js";import"./chunk-F27PBJKO-K5uPeDhv.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C_w0mNLk.js";import"./chunk-L3NEJ4N5-D1cWO7rm.js";import{n as e}from"./chunk-SHT3W25Y-Beev3ZeU.js";import"./mermaid.core-C6GXL70P.js";export{e as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{m as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createRailroadAbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{f as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createRailroadEbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{u as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createRailroadPegServices};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-zhv2Vnfx.js";import"./chunk-75Z2AOVW-LBmwoUvq.js";import"./chunk-PWAF6VOD-CJFd7LKC.js";import"./chunk-GMAD6QVW-CAAu3Cn5.js";import"./chunk-P2QGCYS3-BuGzzo3g.js";import"./chunk-4HAMMTFA-BpyojyCk.js";import"./chunk-GVQU2GXP-Br_UAx49.js";import"./chunk-OSK3NFVY-BiMJbcHf.js";import"./chunk-F27PBJKO-K5uPeDhv.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C_w0mNLk.js";import"./chunk-L3NEJ4N5-D1cWO7rm.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-Kqfxrrdn.js";import"./mermaid.core-C6GXL70P.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=stateDiagram-v2-MP3YSRHH-CcnJHQ4a.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-zhv2Vnfx.js";import"./chunk-75Z2AOVW-LBmwoUvq.js";import"./chunk-PWAF6VOD-CJFd7LKC.js";import"./chunk-GMAD6QVW-CAAu3Cn5.js";import"./chunk-P2QGCYS3-BuGzzo3g.js";import"./chunk-4HAMMTFA-BpyojyCk.js";import"./chunk-GVQU2GXP-Br_UAx49.js";import"./chunk-OSK3NFVY-BiMJbcHf.js";import"./chunk-F27PBJKO-K5uPeDhv.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C_w0mNLk.js";import"./chunk-L3NEJ4N5-D1cWO7rm.js";import{r as t,t as n}from"./chunk-SHT3W25Y-Beev3ZeU.js";import"./mermaid.core-C6GXL70P.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)});export{r as diagram};
|
|
9
|
-
//# sourceMappingURL=swimlanesDiagram-VR7AAH4N-CrkPrysy.js.map
|