@microvac/ui 0.1.0-rc.14 → 0.1.0-rc.15
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/assets/{ActiveAgentsPanel-C9AP9hJu.js → ActiveAgentsPanel-BEx06tMt.js} +1 -1
- package/dist/assets/{AdapterManager-CmxTUKJH.js → AdapterManager-3kEEQWFJ.js} +1 -1
- package/dist/assets/{AdvancedToolsRoute-CXsQnTei.js → AdvancedToolsRoute-CgS6B-oh.js} +1 -1
- package/dist/assets/{AgentActionButtons-DWq2OuVK.js → AgentActionButtons-Cz3jCEd7.js} +1 -1
- package/dist/assets/{AgentAdvancedTab-dhBDxF-H.js → AgentAdvancedTab-BG6ZIAuN.js} +1 -1
- package/dist/assets/{AgentBulkSettingsSheet-DYT4ovDg.js → AgentBulkSettingsSheet-BrrbvspS.js} +1 -1
- package/dist/assets/{AgentChat-r0TPOfPK.js → AgentChat-Dw9iXD6H.js} +1 -1
- package/dist/assets/{AgentDetailPage-Bc_okBuS.js → AgentDetailPage-CuVIHv_q.js} +3 -3
- package/dist/assets/{AgentIdentityChip-CB2NBXkZ.js → AgentIdentityChip-BrVCcuHQ.js} +1 -1
- package/dist/assets/{AgentRosterFilters-b7qMLv8-.js → AgentRosterFilters-GQ2bdXfW.js} +2 -2
- package/dist/assets/{Agents-BsvXy3pZ.js → Agents-clrVQnvc.js} +2 -2
- package/dist/assets/{Agents.production-BeOZmzaF.js → Agents.production-DTopo7XB.js} +2 -2
- package/dist/assets/{AnimatedDialogContent-CWshmxP2.js → AnimatedDialogContent-CDLfw-dJ.js} +1 -1
- package/dist/assets/{AppDetail-DbqENTF_.js → AppDetail-BcWBg5yW.js} +1 -1
- package/dist/assets/{AppNotConnected-BhnCqL0F.js → AppNotConnected-NgfyHZ4L.js} +1 -1
- package/dist/assets/{ApprovalDetail-B2KiYLTj.js → ApprovalDetail-Dm_1V4tC.js} +1 -1
- package/dist/assets/{Approvals-j-wRmqKj.js → Approvals-i5AB3JPj.js} +1 -1
- package/dist/assets/{AppsConnect-CcPVEZ0C.js → AppsConnect-D660Tpuo.js} +1 -1
- package/dist/assets/{AppsReview-B8eWvKkS.js → AppsReview-DdTqOisY.js} +1 -1
- package/dist/assets/{ArtifactEmptyGraphic-5mdkS5jj.js → ArtifactEmptyGraphic-DzxCruYA.js} +1 -1
- package/dist/assets/{Artifacts-Bz7Oo6VX.js → Artifacts-CkXBz6nh.js} +1 -1
- package/dist/assets/{AssigneePickerInner-DdpF7hck.js → AssigneePickerInner-BNjyABBe.js} +1 -1
- package/dist/assets/{AssistantConnection-BpaaJDc_.js → AssistantConnection-CNF6mDmO.js} +1 -1
- package/dist/assets/{AttentionInlineVerbs-DlPQVCO-.js → AttentionInlineVerbs-BiyZ1ekZ.js} +1 -1
- package/dist/assets/{AttentionQueueRow-BC6ezctS.js → AttentionQueueRow-Bh0dKHpF.js} +1 -1
- package/dist/assets/{AuditHub-BVP7LKL9.js → AuditHub-BK848cb4.js} +1 -1
- package/dist/assets/{AuditRuns-DqizHgX1.js → AuditRuns-CUdlbP7S.js} +1 -1
- package/dist/assets/{Auth-DOF0snjp.js → Auth-DDqxm5gD.js} +1 -1
- package/dist/assets/{BoardChat-BYAbDtfd.js → BoardChat-fvKqk0R7.js} +1 -1
- package/dist/assets/{BoardClaim-7y41Pr8e.js → BoardClaim-BEC5BZfz.js} +1 -1
- package/dist/assets/{BootstrapSetupUxLab-BftH1vOv.js → BootstrapSetupUxLab-CXzErrin.js} +1 -1
- package/dist/assets/{Browse-Ck01W1Yl.js → Browse-DoovSMuF.js} +1 -1
- package/dist/assets/{BudgetPolicyCard-CKhrzfgy.js → BudgetPolicyCard-BYMlczCq.js} +1 -1
- package/dist/assets/{CaseDetail-qlXKJ66D.js → CaseDetail-UMAcSH_x.js} +1 -1
- package/dist/assets/{CaseStatus-B3RiZVDH.js → CaseStatus-BI0aMl9l.js} +1 -1
- package/dist/assets/{Cases-CFV3V-5X.js → Cases-CMTkGghU.js} +1 -1
- package/dist/assets/{ChatEndpointDetail-7Hi5TJNt.js → ChatEndpointDetail-CocNEInH.js} +1 -1
- package/dist/assets/{ChatEndpointSetup-CtwgH6sg.js → ChatEndpointSetup-Cyi2tI9K.js} +1 -1
- package/dist/assets/{ChatIdentityConfirm-CXjksBwX.js → ChatIdentityConfirm-Ba3JuTX1.js} +1 -1
- package/dist/assets/{CliAuth-KVjrGMfZ.js → CliAuth-D2jnueGH.js} +1 -1
- package/dist/assets/{Companies-oeJem3De.js → Companies-K75I9dJs.js} +1 -1
- package/dist/assets/{CompanyAccess-vWT6G-n_.js → CompanyAccess-Cw6nLUhE.js} +1 -1
- package/dist/assets/{CompanyActivity-zOzzeN1B.js → CompanyActivity-BsgmVpWS.js} +1 -1
- package/dist/assets/CompanyActivity.production-w-KGxvo6.js +1 -0
- package/dist/assets/{CompanyConnections-llSEaVa2.js → CompanyConnections-yRPYSdm7.js} +1 -1
- package/dist/assets/{CompanyEnvironments-DNyyGC_S.js → CompanyEnvironments-BA7kWdOJ.js} +1 -1
- package/dist/assets/{CompanyExport-CFa-F8Es.js → CompanyExport-DfsK4b9c.js} +1 -1
- package/dist/assets/{CompanyImport-DG6qwQ8F.js → CompanyImport-DJHAsmSF.js} +1 -1
- package/dist/assets/{CompanySettings-Dv5Z3ZQi.js → CompanySettings-DwzHGXec.js} +1 -1
- package/dist/assets/{CompanySettingsPluginPage-CZk1d_0d.js → CompanySettingsPluginPage-Bpa81PF3.js} +1 -1
- package/dist/assets/{CompanySkills-CdzWhJfQ.js → CompanySkills-eTqgbqQN.js} +1 -1
- package/dist/assets/{CompanySkills.production-IoCRW5FQ.js → CompanySkills.production-CQSWfH0r.js} +1 -1
- package/dist/assets/{ConfigureBuiltInAgentModal-BwW7XQ1O.js → ConfigureBuiltInAgentModal-DgeD7t_i.js} +1 -1
- package/dist/assets/{CopyableGatewayUrl-PTn061ft.js → CopyableGatewayUrl-B6K3rOal.js} +1 -1
- package/dist/assets/{CordisPluginSettings-C_BeeGEc.js → CordisPluginSettings-DD3AnD2G.js} +1 -1
- package/dist/assets/{Costs-DhuNxwSj.js → Costs-orBM8T-a.js} +1 -1
- package/dist/assets/{CrossIssueCollaborationUxLab-ZaAXq46r.js → CrossIssueCollaborationUxLab-Bv9y9-NE.js} +1 -1
- package/dist/assets/{Dashboard-BaDnqiKo.js → Dashboard-CrSBNKX1.js} +1 -1
- package/dist/assets/{DashboardLive-D-Ed7osd.js → DashboardLive-Cg8C9RiS.js} +1 -1
- package/dist/assets/{DecisionDateChips-D3pl_mLn.js → DecisionDateChips-BLZKZH71.js} +1 -1
- package/dist/assets/{DecisionHistoryPanel-D5MzyrOh.js → DecisionHistoryPanel-yK-CP7Qg.js} +1 -1
- package/dist/assets/{DecisionQueuePage-D3UZ9oRk.js → DecisionQueuePage-BKXbERai.js} +1 -1
- package/dist/assets/{DesignGuide-COTo7ICj.js → DesignGuide-2FswNsXz.js} +1 -1
- package/dist/assets/{DesignSandboxTaskThread-CMeCSQid.js → DesignSandboxTaskThread-CGU--FXR.js} +1 -1
- package/dist/assets/{EmailConnectionAccess-kCL7obSr.js → EmailConnectionAccess-CZ5QRKyg.js} +1 -1
- package/dist/assets/{EmailEndpointSetup-BGrksR_u.js → EmailEndpointSetup-BI2vsd8Y.js} +1 -1
- package/dist/assets/{EnforcementBanner-_Eb_nK3M.js → EnforcementBanner-B-iX466h.js} +1 -1
- package/dist/assets/{EntityRow-gpsOgEtu.js → EntityRow-BsICt6pd.js} +1 -1
- package/dist/assets/{ExecutionWorkspaceDetail-DwGkH6d3.js → ExecutionWorkspaceDetail-CMqR9puh.js} +1 -1
- package/dist/assets/{ExternalAgentInviteDialog-CGid6pM9.js → ExternalAgentInviteDialog-De30ZrLP.js} +1 -1
- package/dist/assets/{FilterBar-1D-VhrvG.js → FilterBar-rCmsTtG4.js} +1 -1
- package/dist/assets/{FolderControls-CQ6kef3c.js → FolderControls-CmnB7Ap-.js} +1 -1
- package/dist/assets/{GatewayDetail-CCqekM1J.js → GatewayDetail-Duw9pJ10.js} +1 -1
- package/dist/assets/{GatewaysList-nFsRcszh.js → GatewaysList-BBhVGhRq.js} +1 -1
- package/dist/assets/{GitHubConnectionRecovery-B9sFWJup.js → GitHubConnectionRecovery-6VshLoNV.js} +1 -1
- package/dist/assets/{GoalDetail-BQ8y55P-.js → GoalDetail-CahntjlI.js} +1 -1
- package/dist/assets/{GoalTree-laRjXp0P.js → GoalTree-CU4GBFCh.js} +1 -1
- package/dist/assets/{Goals-Cm14EaeP.js → Goals-CzM2NDFR.js} +1 -1
- package/dist/assets/{InstanceAccess-DxQ-Akt_.js → InstanceAccess-CZzkE65W.js} +1 -1
- package/dist/assets/{InstanceExperimentalSettings-BxwqbXNw.js → InstanceExperimentalSettings-DWumKtOK.js} +1 -1
- package/dist/assets/{InviteLanding-Cf0L_u6s.js → InviteLanding-BIy2z50u.js} +1 -1
- package/dist/assets/{IssueChatLongThreadPerf-BfsF6FdF.js → IssueChatLongThreadPerf-D4DJvdOG.js} +1 -1
- package/dist/assets/{JoinRequestQueue-BXCdTFG_.js → JoinRequestQueue-C5rauGYm.js} +1 -1
- package/dist/assets/{Layout.production-CqzU0qMi.js → Layout.production-BSDWnupa.js} +1 -1
- package/dist/assets/{McpConnect-COWnZ9Eb.js → McpConnect-BN8ST0RS.js} +1 -1
- package/dist/assets/{MembershipAction-C9i9Sdmi.js → MembershipAction-DTjhGn-L.js} +1 -1
- package/dist/assets/{MetricCard-Bwnt3_p3.js → MetricCard-CeL9Pdn5.js} +1 -1
- package/dist/assets/{MissingPluginTabPlaceholder-B0Zxv1Kx.js → MissingPluginTabPlaceholder-CbQiSVnZ.js} +1 -1
- package/dist/assets/{NewAgent-BIlJ5Dyt.js → NewAgent-BszrNpQk.js} +1 -1
- package/dist/assets/{NewAgentDialog-CJdMxxYL.js → NewAgentDialog-U9qAcTzc.js} +1 -1
- package/dist/assets/{NewGoalDialog-B8izfKLm.js → NewGoalDialog-DqKbk4-i.js} +1 -1
- package/dist/assets/{NewProjectDialog-DXqjTYFK.js → NewProjectDialog-DrlUAF-N.js} +1 -1
- package/dist/assets/{OnboardingPrimitives-DHYBqn_0.js → OnboardingPrimitives-BkgPF4Mu.js} +1 -1
- package/dist/assets/{OnboardingWizard-DqSfZ13V.js → OnboardingWizard-CMBMcuXv.js} +1 -1
- package/dist/assets/{OrgChart.production-DrSFUf7i.js → OrgChart.production-BLczTjRj.js} +1 -1
- package/dist/assets/{PaperclipCloudOAuthHandoff-jPUvjJ8q.js → PaperclipCloudOAuthHandoff-BTtF8UPD.js} +1 -1
- package/dist/assets/{PluginManager-h3LFPaUq.js → PluginManager-CCcqlfgK.js} +1 -1
- package/dist/assets/{PluginPage-E5Im4454.js → PluginPage-B1empV69.js} +1 -1
- package/dist/assets/{PluginSettings-BBO0jAgo.js → PluginSettings-DtopaRqR.js} +1 -1
- package/dist/assets/{ProfileDetailRoute-CQBD7fms.js → ProfileDetailRoute-BqvVpBZi.js} +1 -1
- package/dist/assets/{ProfileSettings-BwnVEHLp.js → ProfileSettings-5__tVfGi.js} +1 -1
- package/dist/assets/{ProfileWizardRoute-By_SC6Gn.js → ProfileWizardRoute-vt-MRLuD.js} +1 -1
- package/dist/assets/{ProjectDetail-CbiwFBAE.js → ProjectDetail-DJ4zjube.js} +1 -1
- package/dist/assets/{ProjectRepositoryInput-DZF9bX4E.js → ProjectRepositoryInput-BJcnj3At.js} +1 -1
- package/dist/assets/{ProjectWorkspaceDetail-DPsl_4bD.js → ProjectWorkspaceDetail-DEAO3q6v.js} +1 -1
- package/dist/assets/{ProjectWorkspacesContent-COH4dOWK.js → ProjectWorkspacesContent-CZvO7p0i.js} +1 -1
- package/dist/assets/{Projects-Ch9Qu7sn.js → Projects-Dm7-zXUH.js} +1 -1
- package/dist/assets/{QuotaBar-DIFOT9Uh.js → QuotaBar-Drp3CaxX.js} +1 -1
- package/dist/assets/{RepositoryEditor-DHB1bqId.js → RepositoryEditor-BT_VAkJu.js} +1 -1
- package/dist/assets/{Responsibilities-C5O0JXXG.js → Responsibilities-DbUEtGZu.js} +1 -1
- package/dist/assets/{ResponsibilityDetail-D6NpZpkm.js → ResponsibilityDetail--S8_GOkb.js} +1 -1
- package/dist/assets/{ResponsibleUserDenialUxLab-CFrIWYwe.js → ResponsibleUserDenialUxLab-1PB3JNG0.js} +1 -1
- package/dist/assets/{ReviewQueueCard-BPC4Lm67.js → ReviewQueueCard-B8w9aXKU.js} +1 -1
- package/dist/assets/{RoutineAuditActivity-sKyzMajz.js → RoutineAuditActivity-BCo7pYe5.js} +1 -1
- package/dist/assets/{RoutineDetail-CG8HF5fp.js → RoutineDetail-C9Dwn5G9.js} +1 -1
- package/dist/assets/{RoutineRunVariablesDialog-CKh3CmLD.js → RoutineRunVariablesDialog-Baomcbe3.js} +1 -1
- package/dist/assets/{Routines-tF2qfUKo.js → Routines-Dkv4gJno.js} +1 -1
- package/dist/assets/{Routines.production-BTyj1Ljr.js → Routines.production-Cs2Y-lpt.js} +1 -1
- package/dist/assets/{RoutinesToolbar-CvUFVCGN.js → RoutinesToolbar-BNKfCrTo.js} +1 -1
- package/dist/assets/{Search-Z9D0NuS1.js → Search-CVx4cl2o.js} +1 -1
- package/dist/assets/{Secrets-DgmbLOJK.js → Secrets-C2qv2HKZ.js} +1 -1
- package/dist/assets/{SkillBinaryFile-F3_9qcaM.js → SkillBinaryFile-DDkhLlfC.js} +1 -1
- package/dist/assets/{SkillCardIcon-CXHUCMej.js → SkillCardIcon-Cp_hws0N.js} +1 -1
- package/dist/assets/{SkillFolderTree-CB3lrTIE.js → SkillFolderTree-Cv0CmfYx.js} +1 -1
- package/dist/assets/{SkillSourceTree-BbuciCo6.js → SkillSourceTree-DmjlUswf.js} +1 -1
- package/dist/assets/{SkillSources-Dlo6Cew3.js → SkillSources-nmlYypUU.js} +1 -1
- package/dist/assets/{SkillStudio-ZO-Nf7eI.js → SkillStudio-BK3y_3zr.js} +1 -1
- package/dist/assets/{SkillsNavigationTabs-B9Iqnlqt.js → SkillsNavigationTabs-DRwMP1eu.js} +1 -1
- package/dist/assets/{SpekoPhoneCallback-C4VnMiZh.js → SpekoPhoneCallback-Cqi7AIyH.js} +1 -1
- package/dist/assets/{SpekoProviderSetup-I4evPZb3.js → SpekoProviderSetup-CJI4oXk5.js} +1 -1
- package/dist/assets/{StatusCards-D0MVzbsw.js → StatusCards-DKyyY81S.js} +1 -1
- package/dist/assets/{SummarySlotCard-DUXgZPxG.js → SummarySlotCard-f3RomdZS.js} +1 -1
- package/dist/assets/{TailscaleConnector-CMhT73gj.js → TailscaleConnector-yQWLR1Ra.js} +1 -1
- package/dist/assets/{TaskChatLab-D9-KAE-7.js → TaskChatLab-Dsr7eyj4.js} +1 -1
- package/dist/assets/{TaskSummaryList-CUxieFNe.js → TaskSummaryList-eFDfK_QH.js} +1 -1
- package/dist/assets/{Timeline-BNMoRbtK.js → Timeline-BWA9dyk6.js} +1 -1
- package/dist/assets/{ToolsAdminGate-CEr0zy2T.js → ToolsAdminGate-DpBg30hQ.js} +1 -1
- package/dist/assets/{TrustPresetSection-B9YXZtkh.js → TrustPresetSection-DtWjK9Kp.js} +1 -1
- package/dist/assets/{UserProfile-D-tnW96X.js → UserProfile-C66UI5xx.js} +1 -1
- package/dist/assets/{WebhookUrlWarning-Ba_DixKh.js → WebhookUrlWarning-CDygVnDH.js} +1 -1
- package/dist/assets/{WhatNeedsMe-B-Jzj8_M.js → WhatNeedsMe-BQ82RHus.js} +1 -1
- package/dist/assets/{Workspaces-BqhDI_Bl.js → Workspaces-DrjJes30.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-Bn9P-nUW.js → abnfDiagram-YUKMZFIV-Crkksu2D.js} +1 -1
- package/dist/assets/{architecture-WOLXFQ4H-V1ldsZlt.js → architecture-WOLXFQ4H-bHU8FW0c.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-BkYxt-Gc.js → architectureDiagram-47P4ROYG-Bj5Styf9.js} +1 -1
- package/dist/assets/{arrow-down-left-o81ENfeW.js → arrow-down-left-Ck9VQyqQ.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-BO7pPYbp.js → blockDiagram-E7TT5TSB-OeHpNCQ-.js} +1 -1
- package/dist/assets/{budgets-0Dw6TH1A.js → budgets-CAWPqcn4.js} +1 -1
- package/dist/assets/{building-complex-DciZTnys.js → building-complex-Dxiyk_pH.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-D4EpmmzV.js → c4Diagram-CRA5TL53-QbK5p76P.js} +1 -1
- package/dist/assets/channel-BSmZkKA8.js +1 -0
- package/dist/assets/{chat-channels-DWyry-9M.js → chat-channels-CzTZV2fr.js} +1 -1
- package/dist/assets/{chunk-2BW5OAIV-DFXIyCJy.js → chunk-2BW5OAIV-Ckr4HfBO.js} +1 -1
- package/dist/assets/{chunk-3YJQHVM4-Dj5wEKIw.js → chunk-3YJQHVM4-C_uoPpLR.js} +1 -1
- package/dist/assets/{chunk-4EA7E6EY-5XiUVgzK.js → chunk-4EA7E6EY-BeMEfIRS.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-D0opKcsy.js → chunk-7TKQ45FW-DiwqWHvN.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-DnjsTe04.js → chunk-AW2ZBBNX-Cf57K3PO.js} +1 -1
- package/dist/assets/{chunk-DBDB3WZW-DNqSQPZ0.js → chunk-DBDB3WZW-B2qouVQO.js} +1 -1
- package/dist/assets/{chunk-E2ZNV5FY-cjSf_BTz.js → chunk-E2ZNV5FY-DG8wQ_NS.js} +1 -1
- package/dist/assets/{chunk-EU5HNXII-CZYBiaSw.js → chunk-EU5HNXII-cxRrXRGV.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-DSc0-wJA.js → chunk-FVRAUYC3-Dizswk0V.js} +1 -1
- package/dist/assets/{chunk-HJ2JQQFS-MXK0gYSP.js → chunk-HJ2JQQFS-DL4lnpSv.js} +1 -1
- package/dist/assets/{chunk-HTAEGDNF-BjDZm_5k.js → chunk-HTAEGDNF-Zxjdb6kj.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-Bfj0tDmO.js → chunk-KQW6MTUR-BsVaJdnu.js} +1 -1
- package/dist/assets/{chunk-NTY3LDVX-Bpz5TkVb.js → chunk-NTY3LDVX-DyT9N5sM.js} +1 -1
- package/dist/assets/{chunk-VPRB5NB3-CfeHjtbb.js → chunk-VPRB5NB3-BNz5CtBn.js} +1 -1
- package/dist/assets/{chunk-XC4XBNZT-FBCWmi6K.js → chunk-XC4XBNZT-CCgIhjYS.js} +1 -1
- package/dist/assets/{circle-slash-DqKFFqfb.js → circle-slash-uNv_ha0X.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-DbC_J0kK.js → classDiagram-v2-K4WV4PDN-Cdh3CEl4.js} +1 -1
- package/dist/assets/{coins-BztUbqyl.js → coins-BDAh8hDQ.js} +1 -1
- package/dist/assets/{collections-BxrcELwt.js → collections-B58p51lw.js} +1 -1
- package/dist/assets/{connection-owner-D-ikSHyR.js → connection-owner-D8fNrFqC.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-COwSJ4qP.js → cynefin-EF2NZ3EQ-BkwhfqJ0.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-diaEJq9Y.js → cynefinDiagram-3GCD6N5R-DuGb_wq2.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-BPAMRuIj.js → dagre-W4DXFKR2-Bxq_Mhia.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-BvRnO1Id.js → diagram-2UJZ2QOL-B-P_hrXV.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-CDgBeD0m.js → diagram-OVF4WLC6-Ds0BqQWH.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-DAw9lREG.js → diagram-PFPMY2P6-Dpqb2-Cb.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-ZQqQn22t.js → diagram-UMYRVEAY-BJSoxjiu.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-CoJtGgWs.js → diagram-YEKJPTXX-BxaG_9tT.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-qW_Zn_bO.js → diagram-ZIFT7M5P-6acvVOtc.js} +1 -1
- package/dist/assets/{dist-B2E6oBK1.js → dist-0EWXio4m.js} +1 -1
- package/dist/assets/{dist-IcdxEhjC.js → dist-BGvZP_Cl.js} +1 -1
- package/dist/assets/{dist-DXjkgaZX.js → dist-BZ7AbEhN.js} +1 -1
- package/dist/assets/{dist-_EtfntKJ.js → dist-BlosHr86.js} +1 -1
- package/dist/assets/{dist-DylHAy-6.js → dist-Bmr4uhSk.js} +1 -1
- package/dist/assets/{dist-DML0cJH3.js → dist-C6yMfMNS.js} +1 -1
- package/dist/assets/{dist-Dl94YqeS.js → dist-CMZQedYl.js} +1 -1
- package/dist/assets/{dist-DKyBHaH2.js → dist-C_N_-eaT.js} +1 -1
- package/dist/assets/{dist-CvRpZH53.js → dist-CaUbG4Hl.js} +1 -1
- package/dist/assets/{dist-ptDa9fKh.js → dist-Cn7-nxjU.js} +1 -1
- package/dist/assets/{dist-CG-phytt.js → dist-Cnj95_pX.js} +1 -1
- package/dist/assets/{dist-DbXGl-wj.js → dist-D9DR7k9k.js} +1 -1
- package/dist/assets/{dist-CjRqeLFz.js → dist-DIwsVdS2.js} +1 -1
- package/dist/assets/{dist-BCJybC91.js → dist-DVE0lLId.js} +1 -1
- package/dist/assets/{dist-CPgRB-NQ.js → dist-DkAPL4CQ.js} +1 -1
- package/dist/assets/{dist-CeSzCyeG.js → dist-Dl6N3kpQ.js} +1 -1
- package/dist/assets/{dist-DZruZxAk.js → dist-DmBvXBzK.js} +1 -1
- package/dist/assets/{dist-CdmdXwCZ.js → dist-DpgXK0aZ.js} +1 -1
- package/dist/assets/{dist-CYRzGbSY.js → dist-gMRyU9GJ.js} +1 -1
- package/dist/assets/{dist-CG6fC1Db.js → dist-jQQX2kOU.js} +1 -1
- package/dist/assets/{dist-DZIxMHOT.js → dist-lUaUoFTq.js} +1 -1
- package/dist/assets/{dist-CuwPDbnL.js → dist-qw1ZF2vD.js} +1 -1
- package/dist/assets/{dist-B6Qde8KJ.js → dist-rH4qrNAn.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-DA4UvKXV.js → ebnfDiagram-VR2GEFS7-Ytj3Z5qC.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-CM74d3mJ.js → elk-IJKZMXRS-CJurNqqK.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-d869V0qL.js → erDiagram-O2IAPWRE-hyXckW2d.js} +1 -1
- package/dist/assets/{eventmodeling-K75KTNOO-C-oz_eyI.js → eventmodeling-K75KTNOO-D3xQujrh.js} +1 -1
- package/dist/assets/flowDiagram-OXPTDLAJ-D4ojBTuY.js +1 -0
- package/dist/assets/{folder-plus-CxWXoYCi.js → folder-plus-BJZSMzuj.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-BBul4Kpm.js → ganttDiagram-R7TSEDQI-C8U_ITl4.js} +1 -1
- package/dist/assets/{gitGraph-VSP46ZUC-BriEZgAq.js → gitGraph-VSP46ZUC-CDeq3yKT.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-I12rg8s1.js → gitGraphDiagram-XJZIOB7I-CST3EWE9.js} +1 -1
- package/dist/assets/{goals-CvMWzjH4.js → goals-BNJZ4nzg.js} +1 -1
- package/dist/assets/{index-Bt31d8ga.js → index-BJtnP7H1.js} +8 -8
- package/dist/assets/{info-OHQRW6UA-CxrcGiem.js → info-OHQRW6UA-CPvTWk7J.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-4Sm0LiOu.js → infoDiagram-5W2HQ5XZ-BPUiNdxI.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-CKXvKV-s.js → ishikawaDiagram-K3B6WC7H-D5Z3rmaA.js} +1 -1
- package/dist/assets/{issue-detail-4PCbYpdv.js → issue-detail-CZfjXs0M.js} +3 -3
- package/dist/assets/{journeyDiagram-COXZFDF6-BHsrZLvQ.js → journeyDiagram-COXZFDF6-CEkwEYdR.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-8HhnIs_l.js → kanban-definition-P3RFRI5V-8h_R6Qjq.js} +1 -1
- package/dist/assets/{line-rrKrpB-b.js → line-Ljt_vfsb.js} +1 -1
- package/dist/assets/{link-BecLzmfo.js → link-DvgFK0mz.js} +1 -1
- package/dist/assets/{list-filter-BC3D4IoX.js → list-filter-BR4_dvwm.js} +1 -1
- package/dist/assets/{log-in-BJCGwGGT.js → log-in-Dvx9-FMC.js} +1 -1
- package/dist/assets/{mcpSkills-DRs3pGKn.js → mcpSkills-76szK_k1.js} +1 -1
- package/dist/assets/{mermaid-parser.core-DmG0b4S0.js → mermaid-parser.core-BjFu937m.js} +3 -3
- package/dist/assets/{mermaid.core-D1vILTuF.js → mermaid.core-B0t95EIS.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-DIMpL0de.js → mindmap-definition-LZFPQGKD-TVnHYUR4.js} +1 -1
- package/dist/assets/{packet-JDAUHWVQ-BnbYht3G.js → packet-JDAUHWVQ-aNGiRWLy.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-BUjtJVjT.js → pegDiagram-BGZESJAR-DDadxqWQ.js} +1 -1
- package/dist/assets/{pie-XZMESJXO-CM4VXUb-.js → pie-XZMESJXO-CydFP1hd.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-B3v8ryvG.js → pieDiagram-CAPJLFHJ-KhdUDwDS.js} +1 -1
- package/dist/assets/{power-0mw59G-l.js → power-sYV-WuqQ.js} +1 -1
- package/dist/assets/{profile-summary-B5rPf8v-.js → profile-summary-D4LPX-Dv.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-Cv-dS2Rn.js → quadrantDiagram-GDMTTRAM-B1X8K2Fs.js} +1 -1
- package/dist/assets/{radar-ABXABTNO-v6yZj4Fk.js → radar-ABXABTNO-BqodkLpx.js} +1 -1
- package/dist/assets/{railroad-I3PHUGI6-D-U8Cs0m.js → railroad-I3PHUGI6-HmRKXDJj.js} +1 -1
- package/dist/assets/{railroad-abnf-LNEFI6M7-Dw3fkrVy.js → railroad-abnf-LNEFI6M7-CkBttaHp.js} +1 -1
- package/dist/assets/{railroad-ebnf-DWYD2UWJ-_ln-e3Tx.js → railroad-ebnf-DWYD2UWJ-C6DBawFA.js} +1 -1
- package/dist/assets/{railroad-peg-JR7BVNR7-Bf8u1-RZ.js → railroad-peg-JR7BVNR7-Z9df3u5o.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-Drr5UhQI.js → railroadDiagram-SM67HX2B-2vDUUppL.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-D5ef6_ac.js → requirementDiagram-X7JNWC4A-DAuP39Hc.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-DncJWIz_.js → sankeyDiagram-UM26HJRW-ByS54QZK.js} +1 -1
- package/dist/assets/{saved-permissions-CizWg8-P.js → saved-permissions-CPiYtxkZ.js} +1 -1
- package/dist/assets/{scroll-text-Ck6HB7eM.js → scroll-text-CVSt6aO2.js} +1 -1
- package/dist/assets/{sdk-CWyUlmcn.js → sdk-vrG4HtB4.js} +1 -1
- package/dist/assets/{search-DkTqg7ab.js → search-CG-QtPVH.js} +1 -1
- package/dist/assets/{send-CYVi50sh.js → send-CH-0xdLm.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-Cs0nGCCg.js → sequenceDiagram-ZO4K6R2Y-DvWxKTLK.js} +1 -1
- package/dist/assets/{shared-CIwISWMj.js → shared-D37zfckm.js} +1 -1
- package/dist/assets/{smoke-lab-matrix-A7ubFpfk.js → smoke-lab-matrix-C5gR81E3.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-Dpp3m5Wq.js → stateDiagram-v2-TBUQTH76-DtiiZIXq.js} +1 -1
- package/dist/assets/{swimlanes-N4OXWK64-NXVbx1w8.js → swimlanes-N4OXWK64-BWSEtCbX.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Bl_9DvHU.js +8 -0
- package/dist/assets/{timeline-definition-YOQAKGHF-DqI-Mv2e.js → timeline-definition-YOQAKGHF-U4QcniMh.js} +1 -1
- package/dist/assets/{treeView-D4JQ5SDB-CZBlE7ya.js → treeView-D4JQ5SDB-B2tdrtsj.js} +1 -1
- package/dist/assets/{treemap-SAJKECNS-BlueznID.js → treemap-SAJKECNS-DodN8j4n.js} +1 -1
- package/dist/assets/{useAgentlessOnboardingAutoOpen-CnFwEQ-H.js → useAgentlessOnboardingAutoOpen-DSWW7Juw.js} +1 -1
- package/dist/assets/{useAuthorizationWindow-DnFQsiFj.js → useAuthorizationWindow-tg3aKEU7.js} +1 -1
- package/dist/assets/{useDateRange-9EbqkWXy.js → useDateRange-CnZQr2KO.js} +1 -1
- package/dist/assets/{useFastResponsesEnabled-D8dunm4j.js → useFastResponsesEnabled-B8tHSJ1y.js} +1 -1
- package/dist/assets/{usePageView-BiX5i8ck.js → usePageView-CtFMs34g.js} +1 -1
- package/dist/assets/{useProfilesData-0VYQ4lAT.js → useProfilesData-CWHdMSuL.js} +1 -1
- package/dist/assets/{useReviewCount-WBWxwKI3.js → useReviewCount-W_bCZ2Hz.js} +1 -1
- package/dist/assets/{useRoutineFormOptions-DnX5DBn1.js → useRoutineFormOptions-CCLMmVSF.js} +1 -1
- package/dist/assets/{useSummaryDraftStream-DPQRvaXT.js → useSummaryDraftStream-NVNYNt72.js} +1 -1
- package/dist/assets/{useTailscaleConnections-BDff6dWx.js → useTailscaleConnections-Dy52nCY3.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-BSDn8OaJ.js → usecaseDiagram-VIAY4XPW-kEHhqgOj.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-BBSA9KNN.js → vennDiagram-BLWOH2XV-NPJU0aCU.js} +1 -1
- package/dist/assets/{wardley-7MLQ67FV-CsT-rTZ9.js → wardley-7MLQ67FV-bUGKvIPT.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-BLClsIjw.js → wardleyDiagram-YMQ3BMBF-qtUDHfhb.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-2x4wB0gq.js → xychartDiagram-TAQBALBS-C-z57aZj.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/CompanyActivity.production-DbaFBsM0.js +0 -1
- package/dist/assets/channel-BQh2vFIU.js +0 -1
- package/dist/assets/flowDiagram-OXPTDLAJ-Be1xLbJu.js +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Ct3LnXZt.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{n as t}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import"./src-DYjgETqR.js";import"./chunk-VPRB5NB3-BNz5CtBn.js";import"./chunk-3YJQHVM4-C_uoPpLR.js";import"./chunk-HJ2JQQFS-DL4lnpSv.js";import"./chunk-E2ZNV5FY-DG8wQ_NS.js";import"./chunk-4EA7E6EY-BeMEfIRS.js";import"./chunk-XC4XBNZT-CCgIhjYS.js";import"./chunk-DBDB3WZW-B2qouVQO.js";import"./chunk-2BW5OAIV-Ckr4HfBO.js";import"./chunk-7TKQ45FW-DiwqWHvN.js";import"./chunk-XXDRQBXY-BdWplhUD.js";import"./chunk-KQW6MTUR-BsVaJdnu.js";import"./chunk-NTY3LDVX-DyT9N5sM.js";import{r as o,t as m}from"./chunk-EU5HNXII-cxRrXRGV.js";import"./mermaid.core-B0t95EIS.js";var $=m({styles:t(r=>`${o(r)}
|
|
2
|
+
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
+
stroke: ${r.clusterBorder} !important;
|
|
4
|
+
}
|
|
5
|
+
[data-look="neo"].cluster rect {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
`,"getStyles")});export{$ as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Pt=Object.defineProperty;var b=(e,t)=>Pt(e,"name",{value:t,configurable:!0});import{n as o,t as Bt}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m as v,p as j}from"./src-DYjgETqR.js";import{Y as yt,a as Vt,b as mt,it as Ft,nt as zt,o as Ot,tt as Gt,y as xt}from"./chunk-VPRB5NB3-
|
|
1
|
+
var Pt=Object.defineProperty;var b=(e,t)=>Pt(e,"name",{value:t,configurable:!0});import{n as o,t as Bt}from"./chunk-Y2CYZVJY-OvsAdhaO.js";import{m as v,p as j}from"./src-DYjgETqR.js";import{Y as yt,a as Vt,b as mt,it as Ft,nt as zt,o as Ot,tt as Gt,y as xt}from"./chunk-VPRB5NB3-BNz5CtBn.js";import{t as ht}from"./arc-Dnq9Aszq.js";import{m as Dt}from"./chunk-3YJQHVM4-C_uoPpLR.js";import{i as Kt,n as rt}from"./chunk-J5ZVWO5B-ClU583ja.js";import{a as Ut}from"./mermaid.core-B0t95EIS.js";var et=(function(){var e=o(function(s,c,u,d){for(u=u||{},d=s.length;d--;u[s[d]]=c);return u},"o"),t=[6,11,13,14,15,17,19,20,23,24],i=[1,12],r=[1,13],n=[1,14],h=[1,15],a=[1,16],l=[1,19],y=[1,20],f={trace:o(b(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(b(function(c,u,d,g,x,p,E){var k=p.length-1;switch(x){case 1:return p[k-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:p[k-1].push(p[k]),this.$=p[k-1];break;case 7:case 8:this.$=p[k];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(p[k].substr(6)),this.$=p[k].substr(6);break;case 12:this.$=p[k].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=p[k].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(p[k].substr(8)),this.$=p[k].substr(8);break;case 18:g.addTask(p[k],0,""),this.$=p[k];break;case 19:g.addEvent(p[k].substr(2)),this.$=p[k]}},"anonymous"),"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:i,15:r,17:n,19:h,20:a,21:17,22:18,23:l,24:y},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:i,15:r,17:n,19:h,20:a,21:17,22:18,23:l,24:y},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(b(function(c,u){if(u.recoverable)this.trace(c);else{var d=new Error(c);throw d.hash=u,d}},"parseError"),"parseError"),parse:o(b(function(c){var u=this,d=[0],g=[],x=[null],p=[],E=this.table,k="",M=0,P=0,V=0,F=2,H=1,R=p.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(A.yy[z]=this.yy[z]);S.setInput(c,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var $=S.yylloc;p.push($);var _=S.options&&S.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function T(B){d.length=d.length-2*B,x.length=x.length-B,p.length=p.length-B}b(T,"popStack"),o(T,"popStack");function N(){var B=g.pop()||S.lex()||H;return typeof B!="number"&&(B instanceof Array&&(g=B,B=g.pop()),B=u.symbols_[B]||B),B}b(N,"lex"),o(N,"lex");for(var w,L,W,I,K,D={},U,O,ct,q;;){if(W=d[d.length-1],this.defaultActions[W]?I=this.defaultActions[W]:((w===null||typeof w>"u")&&(w=N()),I=E[W]&&E[W][w]),typeof I>"u"||!I.length||!I[0]){var tt="";q=[];for(U in E[W])this.terminals_[U]&&U>F&&q.push("'"+this.terminals_[U]+"'");S.showPosition?tt="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":tt="Parse error on line "+(M+1)+": Unexpected "+(w==H?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(tt,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:$,expected:q})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+w);switch(I[0]){case 1:d.push(w),x.push(S.yytext),p.push(S.yylloc),d.push(I[1]),w=null,L?(w=L,L=null):(P=S.yyleng,k=S.yytext,M=S.yylineno,$=S.yylloc,V>0&&V--);break;case 2:if(O=this.productions_[I[1]][1],D.$=x[x.length-O],D._$={first_line:p[p.length-(O||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(O||1)].first_column,last_column:p[p.length-1].last_column},_&&(D._$.range=[p[p.length-(O||1)].range[0],p[p.length-1].range[1]]),K=this.performAction.apply(D,[k,P,M,A.yy,I[1],x,p].concat(R)),typeof K<"u")return K;O&&(d=d.slice(0,-1*O*2),x=x.slice(0,-1*O),p=p.slice(0,-1*O)),d.push(this.productions_[I[1]][0]),x.push(D.$),p.push(D._$),ct=E[d[d.length-2]][d[d.length-1]],d.push(ct);break;case 3:return!0}}return!0},"parse"),"parse")};f.lexer=(function(){return{EOF:1,parseError:o(b(function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},"parseError"),"parseError"),setInput:o(function(s,c){return this.yy=c||this.yy||{},this._input=s,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:o(function(){var s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:o(function(s){var c=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var d=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),u.length-1&&(this.yylineno-=u.length-1);var g=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),c=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-NGNAAXSQ-e5XI1hSt.js";import{c as i}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-NGNAAXSQ-e5XI1hSt.js";import{c as i}from"./mermaid-parser.core-BjFu937m.js";export{i as createTreeViewServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-NGNAAXSQ-e5XI1hSt.js";import{o}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-NGNAAXSQ-e5XI1hSt.js";import{o}from"./mermaid-parser.core-BjFu937m.js";export{o as createTreemapServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var a=(n,t)=>l(n,"name",{value:t,configurable:!0});import{a as p}from"./rolldown-runtime-DhZMWcEn.js";import{Dy as f,GS as c,LS as g,Pr as m,nE as b,nj as O,rb as h,xE as y}from"./index-
|
|
1
|
+
var l=Object.defineProperty;var a=(n,t)=>l(n,"name",{value:t,configurable:!0});import{a as p}from"./rolldown-runtime-DhZMWcEn.js";import{Dy as f,GS as c,LS as g,Pr as m,nE as b,nj as O,rb as h,xE as y}from"./index-BJtnP7H1.js";import{n as S}from"./onboarding-state-C5_mIw3o.js";var A=p(O(),1);function C(n,t,o){if(!t)return null;if(t.length===0)return{companyId:n,initialStep:3};if(t.some(e=>e.pauseReason!=="setup"||e.status==="terminated"))return null;try{const e=JSON.parse(o??"null");return e?.createdCompanyId!==n||e.createdAgentId||!t.some(r=>r.id===e.setupAgentId&&r.companyId===n)?null:{companyId:n,initialStep:4}}catch{return null}}a(C,"dashboardOnboardingOptions");var d=new Set;function q(n){return d.has(n)?!1:(d.add(n),!0)}a(q,"claimOnboardingOffer");function D(){const{selectedCompanyId:n}=g(),{openOnboarding:t}=f(),o=b(),{data:e,isFetching:r}=y({queryKey:c.agents.list(n),queryFn:a(()=>h.list(n),"queryFn"),enabled:!!n}),i=n?C(n,e,S.read()):null,s=i?.initialStep,u=m({pathname:o.pathname,agentsLoaded:e!==void 0,agentsRefreshing:r,agentCount:i?0:e?.length??0});(0,A.useEffect)(()=>{!u||!n||!s||q(n)&&t({companyId:n,initialStep:s})},[u,n,s,t])}a(D,"useAgentlessOnboardingAutoOpen");export{D as t};
|
package/dist/assets/{useAuthorizationWindow-DnFQsiFj.js → useAuthorizationWindow-tg3aKEU7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.defineProperty;var s=(n,o)=>h(n,"name",{value:o,configurable:!0});import{a as f}from"./rolldown-runtime-DhZMWcEn.js";import{$A as p,Gc as w,NE as b,nj as k,qc as g}from"./index-
|
|
1
|
+
var h=Object.defineProperty;var s=(n,o)=>h(n,"name",{value:o,configurable:!0});import{a as f}from"./rolldown-runtime-DhZMWcEn.js";import{$A as p,Gc as w,NE as b,nj as k,qc as g}from"./index-BJtnP7H1.js";var a=f(k(),1),c=f(p(),1);function y(){const n=(0,a.useRef)(null),[o,l]=(0,a.useState)(null),d=(0,a.useCallback)(()=>{if(l(null),!(n.current&&!n.current.closed))try{n.current=window.open("about:blank","_blank"),n.current&&(n.current.opener=null)}catch{n.current=null}},[]),i=(0,a.useCallback)(()=>{n.current?.close(),n.current=null,l(null)},[]);return{reserve:d,open:(0,a.useCallback)(async u=>{try{const e=typeof u=="string"?{authorizationUrl:u}:u,t=await w(e),r=n.current;if(t.kind==="reauthentication"&&e.handoff){if(!r||r.closed)throw new Error("Allow a sign-in window and try again to refresh your account.");g(e.handoff.session,r.sessionStorage)}return l(t.kind==="authorization"?t.url:null),r&&!r.closed&&(r.location.assign(t.url),r.focus()),t}catch(e){throw i(),e}},[i]),cancel:i,fallback:o?(0,c.jsx)(b,{variant:"outline",asChild:!0,children:(0,c.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:"Open sign-in in a new tab"})}):null,windowRef:n}}s(y,"useAuthorizationWindow");export{y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var $=Object.defineProperty;var r=(e,t)=>$(e,"name",{value:t,configurable:!0});import{a as j}from"./rolldown-runtime-DhZMWcEn.js";import{$A as D,E_ as T,HE as b,H_ as w,M_ as k,NE as v,O_ as _,UT as O,__ as A,ew as C,hC as y,j_ as I,k_ as M,nj as P,uE as i,xT as R}from"./index-
|
|
1
|
+
var $=Object.defineProperty;var r=(e,t)=>$(e,"name",{value:t,configurable:!0});import{a as j}from"./rolldown-runtime-DhZMWcEn.js";import{$A as D,E_ as T,HE as b,H_ as w,M_ as k,NE as v,O_ as _,UT as O,__ as A,ew as C,hC as y,j_ as I,k_ as M,nj as P,uE as i,xT as R}from"./index-BJtnP7H1.js";var d=j(P(),1),a=j(D(),1);function L(e){return(e/100).toFixed(2)}r(L,"centsInputValue");function E(e){const t=Number(e);return!Number.isFinite(t)||t<0?null:Math.round(t*100)}r(E,"parseDollarInput");function U(e){return e.status==="resolved"?"Resolved":e.status==="dismissed"?"Dismissed":e.approvalStatus==="revision_requested"?"Escalated":e.approvalStatus==="pending"?"Pending approval":"Open"}r(U,"incidentStateLabel");function W({incident:e,onRaiseAndResume:t,onKeepPaused:s,isMutating:n}){const o=e.thresholdType==="soft",[m,u]=(0,d.useState)(L(o?Math.max(e.amountObserved,e.amountLimit)+1e3:Math.max(e.amountObserved+1e3,e.amountLimit))),c=E(m),g=U(e);return(0,a.jsxs)(T,{className:o?"overflow-hidden border-amber-500/30 bg-amber-500/5":"overflow-hidden border-red-500/20 bg-(image:--gradient-extract-4)",children:[(0,a.jsx)(I,{className:"px-5 pt-5 pb-3",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:o?"text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-amber-700 dark:text-amber-200":"text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-red-700/90 dark:text-red-200/80",children:[e.scopeType," ",o?"budget warning":"hard stop"]}),(0,a.jsx)(w,{variant:e.status==="resolved"?"outline":"secondary",children:g})]}),(0,a.jsx)(k,{className:o?"mt-1 text-base":"mt-1 text-base text-red-950 dark:text-red-50",children:e.scopeName}),(0,a.jsx)(M,{className:o?"mt-1":"mt-1 text-red-900/75 dark:text-red-100/70",children:e.thresholdType==="hard"&&e.amountObserved<e.amountLimit?`Accounting is incomplete. Known spend is ${b(e.amountObserved)}; review pending or unpriced usage in the budget policy.`:`Spending reached ${b(e.amountObserved)} against a limit of ${b(e.amountLimit)}.`})]}),o?(0,a.jsx)("div",{className:"rounded-full border border-amber-500/30 bg-amber-500/10 p-2 text-amber-600 dark:text-amber-200",children:(0,a.jsx)(y,{className:"h-4 w-4"})}):(0,a.jsx)("div",{className:"rounded-full border border-red-400/30 bg-red-500/10 p-2 text-red-600 dark:text-red-200",children:(0,a.jsx)(C,{className:"h-4 w-4"})})]})}),(0,a.jsxs)(_,{className:"space-y-4 px-5 pb-5 pt-0",children:[o?(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-xl border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-950/90 dark:text-amber-50/90",children:[(0,a.jsx)(y,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,a.jsx)("div",{children:"Spending crossed the warning threshold. This warning does not pause work."})]}):(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-xl border border-red-400/20 bg-red-500/10 px-3 py-2 text-sm text-red-950/90 dark:text-red-50/90",children:[(0,a.jsx)(R,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,a.jsx)("div",{children:e.scopeType==="project"?"Project execution is paused. New work in this project will not start until you resolve the budget incident.":"This scope is paused. New heartbeats will not start until you resolve the budget incident."})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background/60 p-3",children:[(0,a.jsx)("label",{className:"text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground",children:"New budget (USD)"}),(0,a.jsxs)("div",{className:"mt-2 flex flex-col gap-3 sm:flex-row",children:[(0,a.jsx)(A,{value:m,onChange:r(f=>u(f.target.value),"onChange"),inputMode:"decimal",placeholder:"0.00"}),(0,a.jsxs)(v,{className:"gap-2",disabled:n||c===null||c<=e.amountObserved,onClick:r(()=>{typeof c=="number"&&t(c)},"onClick"),children:[(0,a.jsx)(O,{className:"h-4 w-4"}),n?"Applying...":o?"Raise budget":"Raise budget & resume"]})]}),c!==null&&c<=e.amountObserved?(0,a.jsx)("p",{className:"mt-2 text-xs text-red-700 dark:text-red-200/80",children:"The new budget must exceed current observed spend."}):null]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(v,{variant:"ghost",className:"text-muted-foreground",disabled:n,onClick:s,children:o?"Dismiss warning":"Keep paused"})})]})]})}r(W,"BudgetIncidentCard");function l(e,t){const s=new URLSearchParams;!e&&!t&&s.set("period","all"),e&&s.set("from",e),t&&s.set("to",t);const n=s.toString();return n?`?${n}`:""}r(l,"dateParams");var Q={dataQuality:r((e,t,s)=>i.get(`/companies/${e}/costs/data-quality${l(t,s)}`),"dataQuality"),retryAccounting:r((e,t)=>i.post(`/companies/${e}/costs/retry-accounting`,{runId:t}),"retryAccounting"),summary:r((e,t,s)=>i.get(`/companies/${e}/costs/summary${l(t,s)}`),"summary"),byUser:r((e,t,s)=>i.get(`/companies/${e}/costs/by-user${l(t,s)}`),"byUser"),byAgent:r((e,t,s)=>i.get(`/companies/${e}/costs/by-agent${l(t,s)}`),"byAgent"),byAgentModel:r((e,t,s)=>i.get(`/companies/${e}/costs/by-agent-model${l(t,s)}`),"byAgentModel"),byProject:r((e,t,s)=>i.get(`/companies/${e}/costs/by-project${l(t,s)}`),"byProject"),byProvider:r((e,t,s)=>i.get(`/companies/${e}/costs/by-provider${l(t,s)}`),"byProvider"),byBiller:r((e,t,s)=>i.get(`/companies/${e}/costs/by-biller${l(t,s)}`),"byBiller"),financeSummary:r((e,t,s)=>i.get(`/companies/${e}/costs/finance-summary${l(t,s)}`),"financeSummary"),financeByBiller:r((e,t,s)=>i.get(`/companies/${e}/costs/finance-by-biller${l(t,s)}`),"financeByBiller"),financeByKind:r((e,t,s)=>i.get(`/companies/${e}/costs/finance-by-kind${l(t,s)}`),"financeByKind"),financeEvents:r((e,t,s,n=100)=>i.get(`/companies/${e}/costs/finance-events${q(t,s,n)}`),"financeEvents"),windowSpend:r(e=>i.get(`/companies/${e}/costs/window-spend`),"windowSpend"),quotaWindows:r(e=>i.get(`/companies/${e}/costs/quota-windows`),"quotaWindows")};function q(e,t,s){const n=new URLSearchParams;!e&&!t&&n.set("period","all"),e&&n.set("from",e),t&&n.set("to",t),s&&n.set("limit",String(s));const o=n.toString();return o?`?${o}`:""}r(q,"dateParamsWithLimit");function B({eventCount:e,estimatedEventCount:t}){if(!t)return null;const s=t===e;return(0,a.jsx)(w,{variant:"outline",className:"font-normal text-muted-foreground",title:`${t} estimated ${t===1?"charge":"charges"}. Calculated from token usage and published rates; provider bills may differ.`,children:s?"Estimated":"Partially estimated"})}r(B,"CostEstimateLabel");function V({costCents:e,eventCount:t,estimatedEventCount:s,unpricedEventCount:n,showUnavailableCount:o=!1,suffix:m}){return(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1 text-right",children:[(0,a.jsxs)("div",{className:"whitespace-nowrap font-mono font-medium tabular-nums",children:[e===0&&(t??0)>0&&n===t?"—":b(e),m]}),(0,a.jsx)(B,{eventCount:t,estimatedEventCount:s}),o&&!!n&&(0,a.jsxs)(w,{variant:"outline",className:"font-normal text-muted-foreground",children:[n," ",n===1?"cost":"costs"," unavailable"]})]})}r(V,"CostAmount");var z={mtd:"Month to Date","7d":"7 Days","30d":"30 Days",ytd:"Year to Date",all:"All Time",custom:"Custom"},G=["mtd","7d","30d","ytd","all","custom"];function F(e){const t=new Date,s=t.toISOString();switch(e){case"mtd":return{from:new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1)).toISOString(),to:s};case"7d":return{from:new Date(t.getFullYear(),t.getMonth(),t.getDate()-7,0,0,0,0).toISOString(),to:s};case"30d":return{from:new Date(t.getFullYear(),t.getMonth(),t.getDate()-30,0,0,0,0).toISOString(),to:s};case"ytd":return{from:new Date(Date.UTC(t.getUTCFullYear(),0,1)).toISOString(),to:s};case"all":case"custom":return{from:"",to:""}}}r(F,"computeRange");function h(e){const t=new Date(e);return t.setSeconds(0,0),t.toISOString()}r(h,"floorToMinute");function J(){const[e,t]=(0,d.useState)("mtd"),[s,n]=(0,d.useState)(""),[o,m]=(0,d.useState)(""),u=(0,d.useRef)(null),[c,g]=(0,d.useState)(()=>h(new Date));(0,d.useEffect)(()=>{const p=new Date,x=(60-p.getSeconds())*1e3-p.getMilliseconds(),N=setTimeout(()=>{g(h(new Date)),u.current=setInterval(()=>g(h(new Date)),6e4)},x);return()=>{clearTimeout(N),u.current!=null&&clearInterval(u.current)}},[]);const{from:f,to:S}=(0,d.useMemo)(()=>{if(e!=="custom")return F(e);const p=s?new Date(s+"T00:00:00"):null,x=o?new Date(o+"T23:59:59.999"):null;return{from:p?p.toISOString():"",to:x?x.toISOString():""}},[e,s,o,c]);return{preset:e,setPreset:t,customFrom:s,setCustomFrom:n,customTo:o,setCustomTo:m,from:f,to:S,customReady:e!=="custom"||!!s&&!!o}}r(J,"useDateRange");export{B as a,V as i,z as n,Q as o,J as r,W as s,G as t};
|
package/dist/assets/{useFastResponsesEnabled-D8dunm4j.js → useFastResponsesEnabled-B8tHSJ1y.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,s)=>i(e,"name",{value:s,configurable:!0});import{GS as r,Kv as p,uE as n,ub as c,xE as m}from"./index-
|
|
1
|
+
var i=Object.defineProperty;var t=(e,s)=>i(e,"name",{value:s,configurable:!0});import{GS as r,Kv as p,uE as n,ub as c,xE as m}from"./index-BJtnP7H1.js";var l={settings:t(e=>n.get(`/companies/${e}/decision-model`),"settings"),update:t((e,s)=>n.put(`/companies/${e}/decision-model`,s),"update"),test:t(e=>n.post(`/companies/${e}/decision-model/test`,{}),"test"),history:t((e,s,o)=>{const a=new URLSearchParams({limit:"100"});return s&&a.set("from",s),o&&a.set("to",o),n.get(`/companies/${e}/decision-model/history?${a}`)},"history")},f={settings:t(e=>n.get(`/companies/${e}/fast-response`),"settings"),update:t((e,s)=>n.put(`/companies/${e}/fast-response`,s),"update"),models:t((e,s)=>n.get(`/companies/${e}/fast-response/models?connectionId=${encodeURIComponent(s)}`),"models"),test:t(e=>n.post(`/companies/${e}/fast-response/test`,{}),"test"),history:t((e,s,o)=>{const a=new URLSearchParams;return s&&a.set("from",s),o&&a.set("to",o),n.get(`/companies/${e}/fast-response/history?${a}`)},"history")};function y(){const e=m({queryKey:r.instance.experimentalSettings,queryFn:t(()=>p.getExperimental(),"queryFn")});return{enabled:c(e).kind!=="error"&&e.data?.enableFastResponses===!0,loaded:e.isFetched}}t(y,"useFastResponsesEnabled");export{f as n,l as r,y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var yt=Object.defineProperty;var r=(e,t)=>yt(e,"name",{value:t,configurable:!0});import{a as Ke}from"./rolldown-runtime-DhZMWcEn.js";import{An as Nt,Cr as wt,Dn as Q,En as H,Fr as qe,Gi as At,Gn as St,Hi as pe,Hn as _t,Ii as $t,Jn as Ue,Kn as Ce,Mr as Ye,Sr as It,Ui as Tt,Wn as De,Zn as Ct,_r as Ae,ar as Dt,br as Ge,cr as Et,dr as He,fr as ae,hr as re,jr as Rt,kr as Mt,lr as Lt,mr as Pt,nr as Ot,or as Ee,qn as Ft,rr as Bt,ur as ze,vr as Wt,wr as Kt,yr as qt}from"./issue-detail-4PCbYpdv.js";import{$A as Ut,BA as Re,Bb as Ve,Db as Yt,Dp as ve,EA as Gt,EC as Qe,ET as Ht,E_ as Xe,Eb as zt,Ek as Je,Ev as Se,GS as A,Gb as he,Gw as Vt,IA as Ze,IS as Qt,ME as q,MT as Me,NE as y,Ob as Xt,Ow as Jt,QE as V,RT as Zt,S_ as es,Sb as ts,TT as et,Tb as ss,Um as ns,Up as as,VC as rs,Vp as is,XC as os,Yb as ls,Yw as tt,__ as B,_b as us,_v as be,ab as ds,bE as W,bv as ye,dy as ie,eD as cs,fy as oe,g_ as st,hC as hs,hE as U,hv as _e,iC as ms,jT as fs,jb as nt,kb as gs,lS as xs,ly as $e,my as le,nE as ps,nT as vs,nj as bs,pv as Ie,rb as at,sy as Te,ub as js,uy as ue,vm as ks,vv as rt,wC as ys,wT as Ns,wb as ws,xE as X,xv as it,yp as As,yv as ot,zE as I}from"./index-Bt31d8ga.js";import{t as lt}from"./SkillCardIcon-CXHUCMej.js";import{r as ut}from"./company-skill-routes-D5LJ1l8M.js";var Ss=["behind","at_risk","on_track","unknown"],Nn={behind:"Behind",at_risk:"At risk",on_track:"On track",unknown:"Can't tell yet"};var _s=/(^#{1,6}\s)|(\*\*)|(\[[^\]]*\]\([^)]*\))|(`)/;function $s(e){const t=e.toLowerCase().replace(/[^a-z ]/g,"").replace(/\s+/g," ").trim();return["behind","at risk","on track","unknown","cant tell yet","ok","fine","good","bad"].includes(t)}r($s,"statusWordsOnly");var wn=Ze({status:Gt(Ss),message:Re().trim().min(3).max(200),detail:Re().trim().min(1).max(800).optional().nullable()}).strict().superRefine((e,t)=>{/[\r\n]/.test(e.message)&&t.addIssue({code:"custom",path:["message"],message:"Keep the message to one line; put anything more in detail"}),_s.test(e.message)&&t.addIssue({code:"custom",path:["message"],message:"Write the message as plain words, without markdown"}),$s(e.message)&&t.addIssue({code:"custom",path:["message"],message:"Say why, not only the status: what moved, and what it depends on"}),e.detail&&e.detail.split(/\r?\n/).filter(n=>n.trim()).length>4&&t.addIssue({code:"custom",path:["detail"],message:"Keep the detail to a few sentences"})}),An=Ze({}).strict(),b=Ke(bs(),1),s=Ke(Ut(),1);function C({label:e,hint:t,optional:n,error:a,children:i}){return(0,s.jsxs)("label",{className:"flex min-w-0 flex-col gap-1.5 text-sm",children:[(0,s.jsxs)("span",{className:"font-medium text-foreground",children:[e,n?(0,s.jsx)("span",{className:"font-normal text-muted-foreground",children:" (optional)"}):null]}),t?(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t}):null,i,a?(0,s.jsx)("span",{className:"text-xs text-destructive",children:a}):null]})}r(C,"Field");function Is({draft:e,onChange:t,missing:n,invalid:a,problems:i,showCurrent:o=!1}){const u=r(m=>t({...e,...m}),"set"),h=r((m,N)=>n?.has(m)?N:a?.has(m)?i?.[m]??"Enter a number":null,"errorFor"),d=e.metricKind,l=Ce.find(m=>m.value===d),c=Lt(e),x=r((m,N)=>(0,s.jsx)(B,{inputMode:"decimal",value:e[m],placeholder:N,"aria-invalid":n?.has(m)||a?.has(m)||void 0,onChange:r(T=>u({[m]:T.target.value}),"onChange")}),"numberInput"),f=(0,s.jsx)(C,{label:"Unit",optional:!0,children:(0,s.jsx)(B,{value:e.metricUnit,maxLength:40,placeholder:d==="range"?"e.g. months, $":"e.g. $, days",onChange:r(m=>u({metricUnit:m.target.value}),"onChange")})}),g=(0,s.jsx)(C,{label:"Better when it is",children:(0,s.jsx)(ve,{value:e.metricDirection,"aria-label":"Better when it is",onChange:r(m=>u({metricDirection:m.target.value}),"onChange"),children:St.map(m=>(0,s.jsx)("option",{value:m.value,children:m.label},m.value))})});return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(C,{label:"The bar",hint:"How is success measured? One sentence.",error:h("standard","Describe the bar"),children:(0,s.jsx)(st,{rows:2,value:e.standard,placeholder:"e.g. Every investor conversation has a next step within a week","aria-invalid":n?.has("standard")||void 0,onChange:r(m=>u({standard:m.target.value}),"onChange")})}),(0,s.jsx)(C,{label:"Kind of measure",hint:l?.summary,children:(0,s.jsx)(ve,{value:d,"aria-label":"Kind of measure",onChange:r(m=>u({metricKind:m.target.value,metricCurrent:""}),"onChange"),children:Ce.map(m=>(0,s.jsx)("option",{value:m.value,children:m.label},m.value))})}),(0,s.jsx)(C,{label:d==="yes_no"?"What should be true":"What you measure",error:h("metricName",d==="yes_no"?"Say what should be true":"Name what you measure"),children:(0,s.jsx)(B,{value:e.metricName,maxLength:200,placeholder:d==="yes_no"?"e.g. Board pack sent a week before the meeting":d==="range"?"e.g. Runway":"e.g. Investors contacted","aria-invalid":n?.has("metricName")||void 0,onChange:r(m=>u({metricName:m.target.value}),"onChange")})}),d==="volume"?(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[g,(0,s.jsx)(C,{label:"Target",error:h("metricTarget","Set a target"),children:x("metricTarget","e.g. 20")}),f]}):d==="percentage"?(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[g,(0,s.jsx)(C,{label:"Target (%)",error:h("metricTarget","Set a target"),children:x("metricTarget","e.g. 90")})]}):d==="range"?(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,s.jsx)(C,{label:"Low",error:h("metricLow","Set the low bound"),children:x("metricLow","e.g. 12")}),(0,s.jsx)(C,{label:"High",error:h("metricHigh","Set the high bound"),children:x("metricHigh","e.g. 24")}),f]}):null,c?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground","data-testid":"bar-status-rule",children:[c,"."]}):null,o?d==="yes_no"?(0,s.jsx)(C,{label:"Where it is now",optional:!0,hint:"Is it true today? The agents working on this keep it current.",children:(0,s.jsxs)(ve,{value:e.metricCurrent,"aria-label":"Where it is now",onChange:r(m=>u({metricCurrent:m.target.value}),"onChange"),children:[(0,s.jsx)("option",{value:"",children:"Not known yet"}),(0,s.jsx)("option",{value:"yes",children:"Yes"}),(0,s.jsx)("option",{value:"no",children:"No"})]})}):(0,s.jsx)(C,{label:"Where it is now",optional:!0,hint:"The latest reading, if you know it. The agents working on this keep it current.",error:h("metricCurrent",""),children:(0,s.jsx)(B,{inputMode:"decimal",value:e.metricCurrent,placeholder:d==="percentage"?"e.g. 85":"e.g. 9","aria-invalid":a?.has("metricCurrent")||void 0,onChange:r(m=>u({metricCurrent:m.target.value}),"onChange")})}):null]})}r(Is,"ResponsibilityBarFields");var Sn=[{value:"full",label:"Full"},{value:"outline",label:"Outline"},{value:"outline_v2",label:"Outline v2"},{value:"board",label:"Board"},{value:"exceptions",label:"Exceptions"},{value:"automation",label:"Automation"},{value:"agent_status",label:"Agent status"}],_n=[{value:"full",label:"Full"},{value:"scorecard",label:"Scorecard"},{value:"moving",label:"What's moving"},{value:"one_screen",label:"One screen"},{value:"one_screen_v2",label:"One screen v2"}],$n="outline_v2",In="one_screen_v2";function Ts(e,t){const n=new URLSearchParams(e).get("view");return t.some(a=>a.value===n)?n:null}r(Ts,"viewFromSearch");function ne(e,t,n){return`${e} ${e===1?t:n}`}r(ne,"count$1");function se(e){return e===1?"is":"are"}r(se,"isAre");function Tn(e){const{behind:t,at_risk:n,on_track:a,not_measured:i}=e,o=t+n+a+i,u=t>0?"behind":n>a?"at_risk":a>0?"on_track":"not_measured";let h;if(o===0)h="You do not own any responsibilities yet.";else if(t>0){const d=`${ne(t,"responsibility","responsibilities")} ${se(t)} behind`;h=n>0?`${d} and ${n} ${se(n)} at risk.`:`${d}.`}else n>0?h=`Nothing is behind. ${ne(n,"responsibility","responsibilities")} ${se(n)} at risk.`:a>0?h=i===0?"Everything you own is on track.":`Nothing is behind or at risk. ${ne(i,"responsibility","responsibilities")} ${se(i)} not measured yet.`:h="Nothing you own is measured yet.";return{health:u,sentence:h,total:o}}r(Tn,"overallStanding");function dt(e){return e.filter(t=>t.status==="active")}r(dt,"activeResponsibilities");function Cs(e,t){if(t<=0)return null;const n=Math.round(Math.max(0,Math.min(e,t))/t*100);return{percent:n,label:`${n}% on track`}}r(Cs,"onTrackShare");function ct(e,t,n=new Set){return Ae(e,Ye(dt(t)),n).map(a=>({...a,ownedLabel:`${ne(a.items.length,"responsibility","responsibilities")} you own`,share:Cs(a.items.filter(i=>i.rollup.health==="on_track").length,a.items.length)}))}r(ct,"outlineAreaGroups");function Cn(e,t){return ct(e,t).map(n=>{const a={behind:[],at_risk:[],on_track:[],not_measured:[]};for(const i of n.items)a[i.rollup.health].push(i);return{...n,byHealth:a}})}r(Cn,"boardAreaRows");function Dn(e){const{totals:t}=e,n=e.areas.filter(o=>o.activeResponsibilities>0),a=n.filter(o=>o.byHealth.behind>0).length,i=Object.values(t.byHealth).reduce((o,u)=>o+u,0);return{areas:{value:n.length,line:a>0?`${a} with something behind`:"None with anything behind",alert:a>0},responsibilities:{value:i,line:t.byHealth.behind>0?`${t.byHealth.behind} behind`:"None behind",alert:t.byHealth.behind>0},projects:{value:t.projects,line:t.lateProjects>0?`${t.lateProjects} late`:"None late",alert:t.lateProjects>0},tasks:{value:t.openTasks,line:t.blockedTasks>0?`${t.blockedTasks} blocked`:"None blocked",alert:t.blockedTasks>0}}}r(Dn,"dashboardSnapshot");function Ds(e){const{health:t,metric:n}=e.rollup;return t==="behind"||t==="at_risk"||t==="not_measured"?t:n?.stale?"stale":null}r(Ds,"exceptionReason");function En(e,t){const n=Ye(dt(t)),a=[];for(const o of n){const u=Ds(o);if(!u)continue;const h=o.rollup.workSummary.find(d=>d.tone==="attention")??null;a.push({responsibility:o,reason:u,signal:h})}const i=[];for(const o of Ae(e,n)){const u=o.items.filter(h=>h.rollup.health==="on_track");u.length!==0&&i.push({areaId:o.area?.id??null,label:`${o.area?.title??"Not in an area"}: ${u.length} of ${o.items.length} on track`,responsibilities:u.filter(h=>!h.rollup.metric?.stale)})}return{exceptions:a,onTrack:i}}r(En,"responsibilityExceptions");var Es={project:"Project",task:"Task",routine:"Routine"};function ht(e){return!!e.archivedAt||e.status==="completed"||e.status==="cancelled"}r(ht,"isFinishedProject");function Rs(e){return new Set(e.filter(t=>t.kind==="routine_failed"&&t.refType==="routine"&&t.refId).map(t=>t.refId))}r(Rs,"failedRoutineIds");function Ms(e,t){return e.filter(n=>n.kind===t).reduce((n,a)=>n+a.count,0)}r(Ms,"signalCount");var Le={project:0,task:1,routine:2};function Ls(e,t){const n=Rs(e.rollup.workSummary),a=[];let i=0;for(const o of e.projects){if(ht(o)){i+=1;continue}const u=He(o.targetDate,t);a.push({kind:"project",id:o.id,title:o.name,href:cs(o),attention:u?.late?`Late · ${u.label}`:null,note:u&&!u.late?`Due ${u.label}`:null,project:o})}for(const o of e.tasks){if(qt(o.status)){i+=1;continue}a.push({kind:"task",id:o.id,title:o.title,href:V(o),attention:o.status==="blocked"?"Blocked":null,note:null,task:o})}for(const o of e.routines){if(o.status==="archived"){i+=1;continue}a.push({kind:"routine",id:o.id,title:o.title,href:Mt(o.id),attention:n.has(o.id)?"Failed on its last run":null,note:o.status==="paused"?"Paused":null,routine:o})}return{items:a.map((o,u)=>({item:o,index:u})).sort((o,u)=>+(u.item.attention!==null)-+(o.item.attention!==null)||Le[o.item.kind]-Le[u.item.kind]||o.index-u.index).map(({item:o})=>o),finished:i}}r(Ls,"responsibilityWorkList");function Rn(e){const{rollup:t}=e,n=t.overdueProjects.length,a=Ms(t.workSummary,"routine_failed"),i=e.routines.filter(u=>u.status==="paused").length,o=[a>0?`${a} failed`:null,i>0?`${i} paused`:null].filter(Boolean);return{projects:{value:e.projects.filter(u=>!ht(u)).length,line:n>0?`${n} late`:"None late",alert:n>0},tasks:{value:t.openTasks,line:`${t.blockedTasks>0?`${t.blockedTasks} blocked`:"None blocked"}, ${t.agentTasks>0?`${t.agentTasks} with agents`:"none with agents"}`,alert:t.blockedTasks>0},routines:{value:t.routines,line:o.length>0?o.join(", "):"None failed or paused",alert:a>0}}}r(Rn,"responsibilityWorkCounts");function Mn(e,t){return{shown:e.slice(0,t),more:Math.max(0,e.length-t)}}r(Mn,"capList");function je(e,t){return t?.trim()==="%"?`${re(e,null)} ${e===1?"point":"points"}`:re(e,t)}r(je,"formatGapAmount");function ke(e){return Math.round(e*100)/100}r(ke,"roundGap");function mt(e,t,n){return Pt(e,t,n)}r(mt,"formatRange");function Ps(e){const{current:t,unit:n}=e;if(t===null)return null;if(e.kind==="yes_no")return t>=1?"Yes":"Not yet";if(e.kind==="range"){const{low:d,high:l}=e;if(d==null||l===null||l===void 0)return null;const c=mt(d,l,n);return t<d?`${je(ke(d-t),n)} below the range ${c}`:t>l?`${je(ke(t-l),n)} above the range ${c}`:`Inside the range ${c}`}const{target:a}=e;if(a===null)return null;const i=e.direction==="at_most",o=ke(i?t-a:a-t),u=re(a,n),h=je(Math.abs(o),n);return i?o>0?`${h} over the limit of ${u}`:o<0?`${h} inside the limit of ${u}`:`Right at the limit of ${u}`:o>0?`${h} short of ${u}`:o<0?`${h} past the target of ${u}`:`Right at the target of ${u}`}r(Ps,"describeMetricGap");function Ln(e){if(e.kind==="yes_no")return null;if(e.kind==="range")return e.low===null||e.low===void 0||e.high===null||e.high===void 0?"no range set":`range ${mt(e.low,e.high,e.unit)}`;if(e.target===null)return"no target set";const t=re(e.target,e.unit);return e.direction==="at_most"?`limit ${t}`:e.current===null?`target ${t}`:`of ${t}`}r(Ln,"describeTargetPhrase");function Pn(e){return ze({name:"",target:null,direction:null,attainment:null,...e}).current}r(Pn,"describeReadingValue");function Os(e){return e.charAt(0).toLowerCase()+e.slice(1)}r(Os,"lowerFirst");function Fs(e){if(!e)return"No number set: add what you measure and a target.";const t=Os(e.name.trim());if(e.kind==="yes_no")return e.current===null?"No answer yet.":null;if(e.kind==="range"){if(e.low===null||e.low===void 0||e.high===null||e.high===void 0)return`No range set for ${t}.`}else if(e.target===null)return`No target set for ${t}.`;return e.current===null?`No reading of ${t} yet.`:null}r(Fs,"describeMissingMeasure");var Bs=new Set(["routine_paused","tasks_open_unassigned"]),Ws=["tasks_completed_recently","tasks_open_agent","routine_active"];function On(e,t=2){const{rollup:n}=e,{health:a,metric:i,workSummary:o}=n,u=i?Ps(i):null,h=u?null:Fs(i),d=[];if(n.healthOverridden){const g=e.healthNote?.trim(),m=Ue[a].toLowerCase();d.push({kind:"override",role:"note",text:g?`You marked it ${m}: ${g}`:`You marked it ${m}.`})}const l=o.filter(g=>g.tone==="attention");let c;if(a==="on_track"){const g=l.filter(N=>N.kind==="metric_stale"),m=Ws.map(N=>o.find(T=>T.kind===N)).find(Boolean);c=g.length>0?g.map(N=>({kind:N.kind,role:"holding",text:N.text})):m?[{kind:m.kind,role:"keeping",text:m.text}]:[]}else if(c=[...l,...a==="not_measured"?[]:o.filter(g=>Bs.has(g.kind))].map(g=>({kind:g.kind,role:"holding",text:g.text})),c.length===0&&d.length===0){if(!(n.projects+n.routines+n.openTasks+n.doneTasks>0))c=[{kind:"no_work",role:"holding",text:"No work is filed under this yet."}];else if(a!=="not_measured"){const g=o.map(m=>({kind:m.kind,role:"note",text:m.text}));c=g.length>0?g:[{kind:"no_open_work",role:"note",text:"Nothing under this is open right now."}]}}const x=Math.max(0,t-d.length),f=c.slice(0,x);return{gap:u??(h?null:n.statusSentence),missing:h,lines:[...d,...f],more:c.length-f.length}}r(On,"explainResponsibilityStatus");var Pe={holding:0,moving:1,neutral:2},Ks=/last run (completed|succeeded|created a task)/;function qs(e,t){if(!e)return null;const n=`${t} is active, `;return e.text.startsWith(n)?e.text.slice(n.length):null}r(qs,"routineRunDetail");function Oe(e,t){return t(e)??"an agent"}r(Oe,"agentLabel$1");function Fn(e,t,n=()=>{}){const{items:a}=Ls(e,t),i=e.rollup.workSummary,o=new Map(e.rollup.overdueProjects.map(l=>[l.id,l])),u=It(t),h=a.map(l=>{if(l.kind==="project"){const{project:f}=l,g=He(f.targetDate,t);if(g?.late){const _=o.get(f.id)?.daysOverdue??Ee(`${f.targetDate}T00:00:00`,t);return{item:l,bearing:"holding",reason:`${_} ${_===1?"day":"days"} late (due ${g.label})`,finished:!1}}const m=f.targetDate&&f.targetDate>=u?Math.round((new Date(`${f.targetDate}T00:00:00`).getTime()-new Date(`${u}T00:00:00`).getTime())/864e5):null,N=m!==null&&m<=7;if(f.status==="in_progress"&&(N||f.leadAgentId)){const _=[N&&g?`Due ${g.label}, in progress`:"In progress"];return f.leadAgentId&&_.push(`led by ${Oe(f.leadAgentId,n)}`),{item:l,bearing:"moving",reason:_.join(", "),finished:!1}}const T=f.status==="backlog"||f.status==="planned"?"Not started":"In progress";return{item:l,bearing:"neutral",reason:g?`${T}, due ${g.label}`:T,finished:!1}}if(l.kind==="task"){const{task:f}=l;if(f.status==="blocked")return{item:l,bearing:"holding",reason:"Blocked",finished:!1};if(!f.assigneeAgentId&&!f.assigneeUserId)return{item:l,bearing:"holding",reason:"Not assigned to anyone",finished:!1};if(f.assigneeAgentId){const m=Oe(f.assigneeAgentId,n);return{item:l,bearing:"moving",reason:f.status==="in_progress"?`In progress with ${m}`:f.status==="in_review"?`In review with ${m}`:`With ${m}, not started`,finished:!1}}const g=f.assigneeUserId===e.ownerUserId?"you":"a person";return{item:l,bearing:"neutral",reason:f.status==="in_review"?`In review with ${g}`:`With ${g}`,finished:!1}}const{routine:c}=l;if(l.attention)return{item:l,bearing:"holding",reason:l.attention,finished:!1};if(c.status==="paused")return{item:l,bearing:"holding",reason:"Paused",finished:!1};if(!c.assigneeAgentId)return{item:l,bearing:"holding",reason:"No agent runs it",finished:!1};const x=qs(i.find(f=>f.kind==="routine_active"&&f.refId===c.id),c.title);return x&&Ks.test(x)?{item:l,bearing:"moving",reason:`Active, ${x}`,finished:!1}:{item:l,bearing:"neutral",reason:x?`Active, ${x}`:"Active",finished:!1}}).map((l,c)=>({entry:l,index:c})).sort((l,c)=>Pe[l.entry.bearing]-Pe[c.entry.bearing]||l.index-c.index).map(({entry:l})=>l),d=e.tasks.filter(l=>l.status==="done"&&Ee(l.updatedAt,t)<7).map(l=>({item:{kind:"task",id:l.id,title:l.title,href:V(l),attention:null,note:null,task:l},bearing:"moving",reason:`Completed ${ae(l.updatedAt,t)}`,finished:!0}));return[...h,...d]}r(Fn,"workBearings");var Bn={behind:Ht,at_risk:hs,on_track:et,not_measured:Ns};function Us({health:e,label:t,className:n}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:I("status-fill inline-block size-2.5 shrink-0 rounded-full",n),style:_t(e),"aria-hidden":"true"}),t?(0,s.jsx)("span",{className:"sr-only",children:t}):null]})}r(Us,"HealthDot");function Wn({health:e,className:t}){return(0,s.jsxs)("span",{className:I("inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",t),children:[(0,s.jsx)(Us,{health:e,className:"size-2"}),Ue[e]]})}r(Wn,"HealthMark");function Kn({count:e,onReview:t,subject:n="list",className:a}){if(e<=0)return null;const i=n==="this"?"This responsibility was proposed for you and is waiting for your review.":e===1?"1 proposed responsibility is waiting for your review.":`${e} proposed responsibilities are waiting for your review.`;return(0,s.jsxs)("div",{role:"status","data-proposals-notice":"",className:I("flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border bg-muted/40 px-4 py-2",a),children:[(0,s.jsxs)("p",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[(0,s.jsx)(Jt,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"}),i]}),(0,s.jsx)(y,{size:"xs",variant:"outline",onClick:t,children:n==="this"||e===1?"Review it":"Review them"})]})}r(Kn,"ProposalsNotice");function qn({responsibility:e,actions:t,children:n}){return(0,s.jsxs)("header",{className:"flex flex-col gap-1",children:[e.area?(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e.area.title}):null,(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsx)("h1",{className:"min-w-0 flex-1 text-2xl font-semibold text-foreground",children:e.title}),t]}),e.status==="let_go"?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"You let go of this."}):e.status==="dismissed"?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"You dismissed this when it was proposed."}):null,n]})}r(qn,"ResponsibilityViewHeader");function Un({status:e,actions:t}){const n=e==="active";return(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2","data-responsibility-header-actions":"",children:[n?(0,s.jsxs)(y,{variant:"outline",onClick:r(()=>t.newTask({defaultTitle:""}),"onClick"),children:[(0,s.jsx)(ys,{"aria-hidden":"true"}),"New task for an agent"]}):null,(0,s.jsxs)(Ie,{children:[(0,s.jsx)(Se,{asChild:!0,children:(0,s.jsx)(y,{size:"icon",variant:"ghost","aria-label":"More actions for this responsibility",children:(0,s.jsx)(vs,{"aria-hidden":"true"})})}),(0,s.jsxs)(_e,{align:"end",children:[n?(0,s.jsx)(be,{onSelect:r(()=>t.setStatus("let_go"),"onSelect"),children:"Let go"}):e==="let_go"||e==="dismissed"?(0,s.jsx)(be,{onSelect:r(()=>t.setStatus("active"),"onSelect"),children:"Take it back on"}):null,(0,s.jsx)(it,{}),(0,s.jsx)(be,{variant:"destructive",onSelect:t.requestDelete,children:"Delete…"})]})]})]})}r(Un,"ResponsibilityHeaderActions");var Ys={project:Vt,routine:rs};function Gs({item:e,showLabel:t}){const n=e.kind==="task"?null:Ys[e.kind];return(0,s.jsxs)("span",{className:I("flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",t&&"w-20"),children:[e.kind==="task"?(0,s.jsx)(is,{...as(e.task),size:"sm"}):n?(0,s.jsx)(n,{"aria-hidden":"true",className:"size-3.5 shrink-0"}):null,t?Es[e.kind]:null]})}r(Gs,"WorkKind");function Yn({item:e,dense:t=!1,showKind:n=!0}){return(0,s.jsx)("li",{"data-work-kind":e.kind,"data-work-id":e.id,"data-attention":e.attention?"true":void 0,children:(0,s.jsxs)(he,{to:e.href,className:I("flex min-w-0 items-center gap-3 px-4 text-sm transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",t?"py-1.5":"py-2"),children:[(0,s.jsx)(Gs,{item:e,showLabel:n}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.kind==="task"&&e.task.identifier?(0,s.jsx)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:e.task.identifier}):null,(0,s.jsx)("span",{className:"truncate text-foreground",children:e.title})]}),e.attention?(0,s.jsx)("span",{className:"shrink-0 text-xs text-(--status-task-icon-blocked)",children:e.attention}):e.note?(0,s.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.note}):null]})})}r(Yn,"WorkItemRow");function Hs(e,t,n=4){const a=Math.min(e,Math.max(Math.ceil(n/2),n-t));return{skills:a,artifacts:Math.min(t,n-a)}}r(Hs,"stripSlots");function zs(e,t,n){const a=[];return e>0&&a.push(`${e} more ${e===1?"skill":"skills"}`),t>0&&a.push(n?"many more artifacts":`${t.toLocaleString("en-US")} more ${t===1?"artifact":"artifacts"}`),a.length===0?null:`And ${a.join(" and ")}.`}r(zs,"moreLine");function de({to:e,icon:t,title:n,kind:a}){return(0,s.jsx)("li",{className:"min-w-0",children:(0,s.jsx)(Xe,{elevation:"low",className:"h-full gap-0 py-0",children:(0,s.jsxs)(he,{to:e,className:"flex min-w-0 items-center gap-2.5 rounded-lg px-3 py-2.5 transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[t,(0,s.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:n}),(0,s.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:a})]})]})})})}r(de,"StripCard");function ft(e,t,n,a=!1){return e<=0?null:a?`and many more ${n}`:`and ${e.toLocaleString("en-US")} more ${e===1?t:n}`}r(ft,"moreOf");function gt({kind:e,title:t,count:n,empty:a,more:i,children:o}){const u=`one-screen-${e}-heading`;return(0,s.jsxs)("section",{"aria-labelledby":u,className:"flex flex-col gap-2","data-card-list":e,children:[(0,s.jsxs)("h2",{id:u,className:"flex items-baseline gap-2 text-sm font-semibold text-foreground",children:[t," ",(0,s.jsx)("span",{className:"text-xs font-normal tabular-nums text-muted-foreground",children:n.toLocaleString("en-US")})]}),n===0?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:a}):(0,s.jsx)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2","data-testid":`responsibility-${e}-cards`,children:o}),i?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:i}):null]})}r(gt,"CardsSection");function Vs(e,t){return e.map(n=>{const a=n.agentIds[0]?t.get(n.agentIds[0])?.name:void 0;return(0,s.jsx)(de,{to:ut(n),icon:(0,s.jsx)(lt,{card:n,size:24}),title:n.name,kind:a?`${a}${n.agentIds.length>1?` and ${n.agentIds.length-1} more`:""}`:"Skill"},`skill:${n.id}`)})}r(Vs,"skillCards");function Qs(e){return e.map(t=>(0,s.jsx)(de,{to:t.href,icon:(0,s.jsx)(tt,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground"}),title:t.title,kind:t.issue.identifier?`From ${t.issue.identifier}`:"Artifact"},`artifact:${t.source}:${t.id}`))}r(Qs,"artifactCards");function Gn({skills:e,agentsById:t,cap:n=4}){const a=e.slice(0,n);return(0,s.jsx)(gt,{kind:"skill",title:"Skills",count:e.length,empty:"No skills yet. They come from the agents doing the work.",more:ft(e.length-a.length,"skill","skills"),children:Vs(a,t)})}r(Gn,"SkillCards");function Hn({artifacts:e,total:t,cap:n=4}){const a=e.slice(0,n);return(0,s.jsx)(gt,{kind:"artifact",title:"Artifacts",count:t,empty:"Nothing produced yet.",more:ft(Math.max(0,t-a.length),"artifact","artifacts",t>=Je),children:Qs(a)})}r(Hn,"ArtifactCards");function zn({skills:e,artifacts:t,artifactsTotal:n,agentsById:a,slots:i=4}){const o=Hs(e.length,t.length,i),u=e.slice(0,o.skills),h=t.slice(0,o.artifacts),d=zs(e.length-u.length,Math.max(0,n-h.length),n>=Je);return(0,s.jsxs)("section",{"aria-labelledby":"responsibility-strip-heading",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"responsibility-strip-heading",className:"text-sm font-semibold text-foreground",children:"Skills and artifacts"}),u.length+h.length===0?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No skills or artifacts yet."}):(0,s.jsxs)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4","data-testid":"responsibility-strip",children:[u.map(l=>{const c=l.agentIds[0]?a.get(l.agentIds[0])?.name:void 0;return(0,s.jsx)(de,{to:ut(l),icon:(0,s.jsx)(lt,{card:l,size:24}),title:l.name,kind:c?`Skill · ${c}${l.agentIds.length>1?` and ${l.agentIds.length-1} more`:""}`:"Skill"},`skill:${l.id}`)}),h.map(l=>(0,s.jsx)(de,{to:l.href,icon:(0,s.jsx)(tt,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground"}),title:l.title,kind:l.issue.identifier?`Artifact · ${l.issue.identifier}`:"Artifact"},`artifact:${l.source}:${l.id}`))]}),d?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:d}):null]})}r(zn,"SkillArtifactStrip");function Ne(e,t,n){return`${e} ${e===1?t:n}`}r(Ne,"count");function Xs(e){const t=At(e);return t===null?null:`${t}% automated`}r(Xs,"automationShareLabel");function Js(e,t){return`${Ne(e,"automation","automations")} · ${Ne(t,"manual task","manual tasks")}`}r(Js,"automationSplitWords");function Vn(e){return e.nothingFiled?"Nothing is filed under this yet.":e.automationCount+e.manualTaskCount===0?"No automations and no recent manual tasks.":Js(e.automationCount,e.manualTaskCount)}r(Vn,"automationCountsLine");function xt(e){return new Map(e.responsibilities.map(t=>[t.responsibilityId,t]))}r(xt,"automationById");function Qn(e,t,n,a){const i=xt(n),o=new Map(n.areas.map(d=>[d.areaId,d])),u=new Set(e.map(d=>d.id)),h=r((d,l)=>{const c=i.get(d.id);return{item:d,index:l,share:c?.share??0,manual:c?.manualTaskCount??0}},"order");return ct(e,t).flatMap(d=>{const l=d.items.map(h).sort((f,g)=>f.share-g.share||g.manual-f.manual||f.index-g.index).map(f=>f.item).filter(f=>!a||a.size===0||a.has(i.get(f.id)?.level??"manual"));if(l.length===0)return[];const c=d.area&&u.has(d.area.id)?d.area.id:null,x=o.get(c)??null;return[{...d,items:l,automationShare:x?Xs(x.share):null}]})}r(Qn,"automationAreaGroups");function Xn(e,t){const n=xt(t),a=Object.fromEntries(Tt.map(i=>[i,0]));for(const i of e)a[n.get(i.id)?.level??"manual"]+=1;return a}r(Xn,"automationLevelCounts");function Jn(e,t){const n=new Set;for(const a of e.responsibilities)for(const i of a.manualTaskIds)t.has(i)||n.add(i);return n.size}r(Jn,"remainingCandidateCount");function Zn(e){const{total:t,manual:n,candidates:a}=e;if(t===0)return"You do not own any responsibilities yet.";const i=a>0?`${Ne(a,"manual task","manual tasks")} could be automated.`:null;if(n===0)return i?`Every responsibility you own has something automated; ${i}`:"Everything you own is automated.";const o=n===t?t===1?"Your responsibility has nothing automated yet":`None of your ${t} responsibilities has anything automated yet`:`${n} of your ${t} responsibilities ${n===1?"has":"have"} nothing automated yet`;return i?`${o}; ${i}`:`${o}.`}r(Zn,"automationSentence");function ce(e,t,n="an agent"){return(e?t(e):void 0)??n}r(ce,"agentLabel");function Fe(e,t){const n=Math.floor((t.getTime()-new Date(e).getTime())/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n} ${n===1?"minute":"minutes"} ago`;const a=Math.floor(n/60);return a<24?`${a} ${a===1?"hour":"hours"} ago`:ae(e,t)}r(Fe,"describeCheckAge");function ea(e,t){const{start:n}=e;switch(n.kind){case"schedule":return{kind:n.kind,label:pe.schedule,detail:n.cadenceLabel,status:null};case"webhook":return{kind:n.kind,label:pe.webhook,detail:"when another system calls it",status:n.lastDeliveryAt?`Last called ${Fe(n.lastDeliveryAt,t)}`:"Not called yet"};case"standing_check":{const a=n.lastResult;return{kind:n.kind,label:pe.standing_check,detail:"on each wake-up",status:a?`Last checked ${Fe(a.checkedAt,t)}: ${a.outcome==="acted"?`acted${a.note?` (${a.note})`:""}`:"nothing needed"}`:"Not checked yet"}}case"on_request":return{kind:n.kind,label:"On request",detail:"when someone runs it",status:null}}}r(ea,"automationStartWords");function ta(e,t){switch(e.reason){case"paused":return"Paused";case"no_agent":return"No agent to run it";case"no_wakeups":return`Not running: ${ce(e.assigneeAgentId,t,"its agent")} doesn’t wake up on its own (heartbeat off)`}}r(ta,"stalledWords");function sa(e,t,n){switch(e.reason){case"pending_offer":{const a=e.pendingOffer;return a?`${t(a.agentId??"")??"Your agent"} offered: ${a.cadenceLabel}`:"An agent offered to repeat it"}case"hint":return e.hint?.why??null;case"done_by_agent":return`Done by ${ce(e.assigneeAgentId,t)} ${ae(e.completedAt??e.updatedAt,n)}`;case"done":return`Done by hand ${ae(e.completedAt??e.updatedAt,n)}`;case"with_agent":return`With ${ce(e.assigneeAgentId,t)} now`;case"open":return null}}r(sa,"candidateReasonWords");function na(e,t){const n=ce(e.responsibleAgentId,t,"your agent");return e.conversation?.state==="proposal_waiting"?`Review ${n}’s proposal`:e.conversation?.state==="discussing"?`Continue with ${n}`:`Automate with ${n}`}r(na,"conversationButtonLabel");function aa(e){return e.nothingFiled?null:e.manualTaskCount>0?"Nothing else here looks worth automating.":e.automationCount>0?"The automations are covering the work.":"No recent manual tasks to automate."}r(aa,"noCandidatesWords");function pt(e){return`paperclip:responsibilities:automation-dismissed:${e}`}r(pt,"automationDismissedStorageKey");function ra(e){try{const t=globalThis.localStorage?.getItem(pt(e)),n=t?JSON.parse(t):[];return new Set(Array.isArray(n)?n.filter(a=>typeof a=="string"):[])}catch{return new Set}}r(ra,"readDismissedCandidates");function ia(e,t){try{globalThis.localStorage?.setItem(pt(e),JSON.stringify([...t]))}catch{}}r(ia,"writeDismissedCandidates");function Zs(e){return e.hint!==null||e.pendingOffer!==null||e.conversation!==null}r(Zs,"isRelevant");function oa(e,t,n=3){const a=e.candidates.filter(c=>!t.has(c.issueId)),i=a.filter(Zs),o=(i.length>0?i:a).slice(0,i.length>0?n:1),u=new Set(o.map(c=>c.issueId)),h=a.filter(c=>!u.has(c.issueId)),d=e.manualTaskIds.filter(c=>t.has(c)).length,l=Math.max(0,e.candidateTotal-d-o.length);return{shown:o,others:h,unlisted:Math.max(0,l-h.length),more:l}}r(oa,"visibleCandidates");function la(){const e=q(),t=ls(),n=W({mutationFn:r(i=>Nt.start(i.issueId,{...i.agentId?{agentId:i.agentId}:{},...i.responsibilityId?{responsibilityId:i.responsibilityId}:{}}),"mutationFn"),onSuccess:r(async i=>{await e.invalidateQueries({queryKey:A.responsibilities.all}),i.conversation&&t(V({id:i.conversation.issueId,identifier:i.conversation.identifier}))},"onSuccess")});return{open:r(i=>{if(i.conversation){t(V({id:i.conversation.issueId,identifier:i.conversation.identifier}));return}n.mutate(i)},"open"),isPending:n.isPending,error:n.error}}r(la,"useOpenAutomationConversation");var en=[2e3,3e3,5e3,8e3,12e3,15e3];function Be(e,t){return e?.refreshing?en[Math.max(0,t-1)]??!1:!1}r(Be,"summaryRefetchDelay");function tn(e,t){return{source:e.source==="model"?"Written by AI":"Summarized from the numbers",when:Qt(e.generatedAt),pending:e.refreshing&&t&&e.source!=="model"?"AI summary on the way":null}}r(tn,"summaryAttribution");function vt(e,t,n){const a=q(),i=X({queryKey:e,queryFn:t,enabled:n,retry:1,refetchOnWindowFocus:!1,refetchInterval:r(h=>Be(h.state.data,h.state.dataUpdateCount),"refetchInterval")}),o=a.getQueryState(e)?.dataUpdateCount??0,u=Be(i.data,o)!==!1;return{summary:i.data??null,stillWaiting:u}}r(vt,"useNarrative");function ua(e){const{userId:t}=Ve();return vt(A.responsibilities.summary(e??"__none__",t),()=>H.companySummary(e),!!e&&!!t)}r(ua,"useDashboardNarrative");function da(e){return vt(A.responsibilities.detailSummary(e),()=>H.summary(e),!!e)}r(da,"useResponsibilitySummary");function ca({summary:e,stillWaiting:t,className:n}){const a=e?.text.trim();if(!e||!a)return null;const i=tn(e,t),o=new Date(e.generatedAt);return(0,s.jsxs)("div",{className:I("flex flex-col gap-1.5",n),"data-narrative-source":e.source,children:[(0,s.jsx)("p",{className:"text-sm leading-relaxed text-foreground",children:a}),(0,s.jsxs)("p",{className:"flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground","aria-live":"polite",children:[e.source==="model"?(0,s.jsx)(Qe,{"aria-hidden":"true",className:"size-3 shrink-0"}):null,(0,s.jsx)("span",{children:i.source}),(0,s.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,s.jsx)("time",{dateTime:e.generatedAt,title:Number.isNaN(o.getTime())?void 0:o.toLocaleString(),children:i.when}),i.pending?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,s.jsx)("span",{children:i.pending})]}):null]})]})}r(ca,"NarrativeParagraph");var sn={attention:"Needs attention",neutral:"",good:"Going well"};function nn({tone:e}){return(0,s.jsx)("span",{className:"status-fill mt-1.5 size-2 shrink-0 rounded-full",style:{"--sc":`var(${Ct[e]})`},"aria-hidden":"true"})}r(nn,"ToneDot");function ha({signals:e,renderAction:t,responsibilityHref:n,size:a="sm",className:i}){return(0,s.jsx)("ul",{className:I("flex flex-col",a==="xs"?"gap-0.5":"gap-1.5",i),children:e.map((o,u)=>{const h=o.refType==="responsibility"&&o.refId&&n?n(o.refId):Rt(o),d=sn[o.tone],l=(0,s.jsxs)(s.Fragment,{children:[o.text,d?(0,s.jsxs)("span",{className:"sr-only",children:[" (",d.toLowerCase(),")"]}):null]});return(0,s.jsxs)("li",{"data-tone":o.tone,className:I("flex min-w-0 items-start gap-2",a==="xs"?"text-xs":"text-sm"),children:[(0,s.jsx)(nn,{tone:o.tone}),(0,s.jsx)("span",{className:I("min-w-0 flex-1",o.tone==="attention"?"text-foreground":"text-muted-foreground"),children:h?h.startsWith("#")?(0,s.jsx)("a",{href:h,className:"underline-offset-4 hover:underline",children:l}):(0,s.jsx)(he,{to:h,className:"underline-offset-4 hover:underline",children:l}):l}),t?t(o):null]},`${o.kind}:${o.refId??u}`)})})}r(ha,"WorkSignalList");var an=[];function ma(e){const t=X({queryKey:A.agents.list(e??"__none__"),queryFn:r(()=>at.list(e),"queryFn"),enabled:!!e}),n=t.data??an;return{agents:n,byId:(0,b.useMemo)(()=>new Map(n.map(a=>[a.id,a])),[n]),query:t}}r(ma,"useAgentDirectory");function fa({agentIds:e,agentsById:t,className:n}){if(e.length===0)return(0,s.jsx)("span",{className:I("text-xs text-muted-foreground",n),children:"No agents on this yet"});const a=e.map(i=>t.get(i)?.name??"An agent");return(0,s.jsxs)("span",{className:I("inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",n),"aria-label":`Agents on this: ${a.join(", ")}`,children:[(0,s.jsx)("span",{className:"flex shrink-0 -space-x-1","aria-hidden":"true",children:e.slice(0,3).map(i=>(0,s.jsx)(nt,{agent:t.get(i)??{id:i},name:t.get(i)?.name,size:16},i))}),(0,s.jsx)("span",{className:"truncate text-foreground","aria-hidden":"true",children:a.join(", ")})]})}r(fa,"AgentsWorkingLabel");function ga({agents:e,agentsById:t}){return e.length===0?(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"No agent is working on this yet. Give one a task, a routine or a project below."}):(0,s.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:e.map(n=>{const a=t.get(n.agentId);return(0,s.jsxs)("li",{className:"flex items-center gap-1.5 text-sm",children:[(0,s.jsx)(nt,{agent:a??{id:n.agentId},name:a?.name,size:20}),(0,s.jsx)("span",{className:"text-foreground",children:a?.name??"An agent"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:Et(n)})]},n.agentId)})})}r(ga,"AgentsAtWorkList");function xa(e,t=!0){const{userId:n}=Ve({enabled:t});return X({queryKey:[...A.responsibilities.areas(e??"__none__"),n],queryFn:r(()=>Q.list(e),"queryFn"),enabled:t&&!!e&&!!n})}r(xa,"useResponsibilityAreas");function me(){const e=q();return()=>e.invalidateQueries({queryKey:A.responsibilities.all})}r(me,"useAreaMutationRefresh");function pa({open:e,onOpenChange:t,companyId:n,onCreated:a}){const i=me(),[o,u]=(0,b.useState)(""),h=W({mutationFn:r(()=>Q.create(n,{title:o.trim()}),"mutationFn"),onSuccess:r(c=>{i(),a?.(c),t(!1)},"onSuccess")}),d=h.reset;(0,b.useEffect)(()=>{e&&(u(""),d())},[e,d]);const l=r(c=>{c.preventDefault(),!(!o.trim()||h.isPending)&&h.mutate()},"submit");return(0,s.jsx)(Te,{open:e,onOpenChange:t,children:(0,s.jsx)($e,{children:(0,s.jsxs)("form",{className:"flex flex-col gap-5",onSubmit:l,children:[(0,s.jsxs)(oe,{children:[(0,s.jsx)(le,{children:"Add an area"}),(0,s.jsx)(ue,{children:"What do you care about? An area is broad, like Fundraising or Hiring. Nobody owns it and it has no deadline; the responsibilities you own sit under it."})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"Name"}),(0,s.jsx)(B,{autoFocus:!0,value:o,maxLength:200,placeholder:"e.g. Fundraising",onChange:r(c=>u(c.target.value),"onChange")})]}),h.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t add the area. ",U(h.error).body]}):null,(0,s.jsxs)(ie,{className:"items-center sm:justify-between",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),(0,s.jsx)(y,{type:"submit",disabled:!o.trim()||h.isPending,children:h.isPending?"Adding…":"Add area"})]})]})})})}r(pa,"AddAreaDialog");function va({area:e,onOpenChange:t}){const n=me(),[a,i]=(0,b.useState)(""),o=W({mutationFn:r(()=>Q.update(e.id,{title:a.trim()}),"mutationFn"),onSuccess:r(()=>{n(),t(!1)},"onSuccess")}),u=o.reset;(0,b.useEffect)(()=>{e&&(i(e.title),u())},[e,u]);const h=!e||a.trim()===e.title,d=r(l=>{l.preventDefault(),!(!a.trim()||h||o.isPending)&&o.mutate()},"submit");return(0,s.jsx)(Te,{open:e!==null,onOpenChange:t,children:(0,s.jsx)($e,{children:(0,s.jsxs)("form",{className:"flex flex-col gap-5",onSubmit:d,children:[(0,s.jsxs)(oe,{children:[(0,s.jsx)(le,{children:"Rename area"}),(0,s.jsx)(ue,{children:"Everyone in the company sees the new name."})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"Name"}),(0,s.jsx)(B,{autoFocus:!0,value:a,maxLength:200,onChange:r(l=>i(l.target.value),"onChange")})]}),o.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t rename the area. ",U(o.error).body]}):null,(0,s.jsxs)(ie,{className:"items-center sm:justify-between",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),(0,s.jsx)(y,{type:"submit",disabled:!a.trim()||h||o.isPending,children:o.isPending?"Saving…":"Save name"})]})]})})})}r(va,"RenameAreaDialog");function ba({area:e,ownedHere:t,onOpenChange:n}){const a=me(),i=W({mutationFn:r(()=>Q.update(e.id,{status:"archived"}),"mutationFn"),onSuccess:r(()=>{a(),n(!1)},"onSuccess")}),o=i.reset;return(0,b.useEffect)(()=>{e&&o()},[e,o]),(0,s.jsx)(ts,{open:e!==null,onOpenChange:n,children:(0,s.jsxs)(ss,{children:[(0,s.jsxs)(Xt,{children:[(0,s.jsxs)(gs,{children:["Archive ",e?.title,"?"]}),(0,s.jsxs)(zt,{children:["It is archived for everyone in the company, and nothing new can be filed under it.",t>0?` Your ${t===1?"responsibility":`${t} responsibilities`} in it stay${t===1?"s":""} there until you move ${t===1?"it":"them"} to another area.`:""," ","You can restore it later."]})]}),i.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t archive the area. ",U(i.error).body]}):null,(0,s.jsxs)(Yt,{className:"items-center sm:justify-between",children:[(0,s.jsx)(ws,{children:"Keep it"}),(0,s.jsx)(y,{disabled:i.isPending,onClick:r(()=>i.mutate(),"onClick"),children:i.isPending?"Archiving…":"Archive area"})]})]})})}r(ba,"ArchiveAreaDialog");function ja(){const e=me();return W({mutationFn:r(t=>Q.update(t,{status:"active"}),"mutationFn"),onSuccess:r(()=>{e()},"onSuccess")})}r(ja,"useRestoreArea");function rn(e,t,n){switch(t.kind){case"task":return xs.update(t.id,{assigneeAgentId:n,assigneeUserId:null});case"routine":return ns.update(t.id,{assigneeAgentId:n});case"project":return es.update(t.id,{leadAgentId:n},e)}}r(rn,"giveItemToAgent");function on(e){const t=q();return W({mutationFn:r(({item:n,agentId:a})=>rn(e,n,a),"mutationFn"),onSuccess:r((n,{item:a})=>{t.invalidateQueries({queryKey:A.responsibilities.all}),a.kind==="task"&&t.invalidateQueries({queryKey:A.issues.list(e)}),a.kind==="routine"&&t.invalidateQueries({queryKey:["routines",e]}),a.kind==="project"&&t.invalidateQueries({queryKey:A.projects.all(e)})},"onSuccess")})}r(on,"useGiveToAgent");function ka({companyId:e,item:t,agents:n,size:a="xs",variant:i="ghost"}){const o=on(e),[u,h]=(0,b.useState)(null),d=(0,b.useMemo)(()=>n.filter(c=>c.status!=="terminated").slice().sort((c,x)=>c.name.localeCompare(x.name)),[n]),l=t.kind==="project"?"project":t.kind==="routine"?"routine":"task";return(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1",children:[u?(0,s.jsx)("span",{role:u.ok?"status":"alert",className:u.ok?"text-xs text-muted-foreground":"text-xs text-destructive",children:u.text}):null,(0,s.jsxs)(Ie,{children:[(0,s.jsx)(Se,{asChild:!0,children:(0,s.jsxs)(y,{size:a,variant:i,className:i==="ghost"?"text-muted-foreground":void 0,disabled:o.isPending,"aria-label":`Give ${t.label} to an agent`,title:a==="icon-xs"?"Give to an agent":void 0,children:[(0,s.jsx)(Zt,{"aria-hidden":"true"}),a==="xs"?"Give to an agent":null]})}),(0,s.jsxs)(_e,{align:"end",className:"max-h-(--sz-50vh) overflow-y-auto",children:[(0,s.jsx)(rt,{children:t.kind==="project"?"Who leads this project":`Who takes this ${l}`}),d.length===0?(0,s.jsx)("p",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:"No agents yet. Add an agent first."}):(0,s.jsx)(ot,{value:t.currentAgentId??"",onValueChange:r(c=>{if(!c||c===t.currentAgentId)return;const x=d.find(f=>f.id===c)?.name??"the agent";h(null),o.mutate({item:t,agentId:c},{onSuccess:r(()=>h({ok:!0,text:t.kind==="project"?`${x} leads it now.`:`${x} has it now.`}),"onSuccess"),onError:r(f=>h({ok:!1,text:`Couldn’t give it to ${x}. ${U(f).body}`}),"onError")})},"onValueChange"),children:d.map(c=>(0,s.jsx)(ye,{value:c.id,children:c.name},c.id))})]})]})]})}r(ka,"GiveToAgentMenu");var ln=[],un=[];function we(e){return wt(e)}r(we,"proposalMissing");function bt(e){return Wt({...e,metricCurrent:""})}r(bt,"metricLeftBlank");function dn(e,t){const n=t.title.trim();if(!n)return null;if(bt(t.draft)){const i=$t(e)?{metricName:null,metricUnit:null,metricTarget:null,metricLow:null,metricHigh:null,metricCurrent:null}:{};return{title:n,standard:t.draft.standard.trim()||null,...i,status:"active"}}const a=qe(t.draft);return a.ok?{title:n,...Bt(a.value),status:"active"}:null}r(dn,"adjustedPatch");function We(e,t,n){const a=A.responsibilities.overviews(t),i=e.getQueriesData({queryKey:a});return e.setQueriesData({queryKey:a},o=>{if(!o)return o;const u=[],h=o.proposed.filter(l=>{const c=n.get(l.id);return c?(c.status==="active"&&u.push({...l,...c.patch,status:"active",confirmedAt:new Date}),!1):!0});if(h.length===o.proposed.length)return o;const d={...o.totals.byHealth};for(const l of u)d[l.rollup.health]+=1;return{...o,proposed:h,responsibilities:[...o.responsibilities,...u],totals:{...o.totals,byHealth:d}}}),i}r(We,"applyReviewToOverviews");function cn(e,t){for(const[n,a]of t)e.setQueryData(n,a)}r(cn,"restoreOverviews");function hn({proposal:e,editing:t,onChange:n,onCancel:a,onSubmit:i}){const o=bt(t.draft),u=qe(t.draft),h=t.attempted&&!o&&!u.ok,d=new Set([...h&&!u.ok?u.missing:[],...t.serverMissing]),l=new Set(h&&!u.ok?u.invalid:[]),c=t.attempted&&!t.title.trim();return(0,s.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:i,noValidate:!0,"aria-label":`Adjust ${e.title}`,children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"What you own"}),(0,s.jsx)(B,{autoFocus:!0,value:t.title,maxLength:200,"aria-invalid":c||void 0,onChange:r(x=>n({...t,title:x.target.value}),"onChange")}),c?(0,s.jsx)("span",{className:"text-xs text-destructive",children:"Name what you own"}):null]}),(0,s.jsx)(Is,{draft:t.draft,onChange:r(x=>n({...t,draft:x}),"onChange"),missing:d,invalid:l,problems:h&&!u.ok?u.problems:void 0}),o&&t.serverMissing.length===0?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"You can leave what you measure blank and set it up later."}):null,(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:a,children:"Cancel"}),(0,s.jsx)(y,{type:"submit",size:"sm",children:"Save and confirm"})]})]})}r(hn,"AdjustForm");function mn({proposal:e}){const t=e.rollup.metric,n=we(e);return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold text-foreground",children:e.title}),e.standard?(0,s.jsx)("p",{className:"text-sm text-foreground",children:e.standard}):null,t?(0,s.jsx)("p",{className:"text-sm tabular-nums text-muted-foreground",children:ze(t).summary}):null,n.length>0?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Needs ",Ge(n)," before you can confirm it."]}):null,e.evidence?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-medium",children:"Why: "}),e.evidence]}):null]})}r(mn,"ProposalSummary");function ya({companyId:e,proposed:t,areas:n,ownerUserId:a,onReviewed:i,heading:o="Proposed for you",description:u="Your guide drafted these from what it learned. Confirm each one you own as it is, adjust its bar or numbers, or dismiss it.",className:h}){const d=q(),l=X({queryKey:A.responsibilities.overview(e,{ownerUserId:a}),queryFn:r(()=>H.overview(e,{ownerUserId:a}),"queryFn"),enabled:t===void 0&&!!e}),c=t??l.data?.proposed??ln,x=n??l.data?.areas??un,[f,g]=(0,b.useState)(()=>new Set),[m,N]=(0,b.useState)({}),[T,_]=(0,b.useState)({}),[R,P]=(0,b.useState)(null),[O,D]=(0,b.useState)(!1),M=(0,b.useMemo)(()=>c.filter(p=>!f.has(p.id)),[c,f]),J=(0,b.useMemo)(()=>Ae(x,M),[x,M]),F=(0,b.useMemo)(()=>M.filter(p=>we(p).length===0),[M]),$=(0,b.useCallback)((p,v=[])=>{P({id:p.id,title:p.title,draft:Ot(p),attempted:v.length>0,serverMissing:v})},[]),K=(0,b.useCallback)(async(p,v,E)=>{if(p.length===0)return;const L=p.map(k=>k.id),z=v==="dismiss"?"dismissed":"active";g(k=>new Set([...k,...L])),N(k=>({...k,...Object.fromEntries(L.map(w=>[w,v]))})),_(k=>{const w={...k};for(const S of L)delete w[S];return w});const ee=new Map(p.map(k=>{const{status:w,...S}=E(k);return[k.id,{status:z,patch:S}]})),jt=We(d,e,ee),kt=await Promise.allSettled(p.map(k=>H.update(k.id,E(k)))),te=[],G=new Map;let ge=null;if(kt.forEach((k,w)=>{const S=p[w];if(k.status==="fulfilled"){te.push(k.value);return}const xe=Kt(k.reason);xe.length>0?(G.set(S.id,`Add ${Ge(xe)} to confirm it.`),ge??={item:S,missing:xe}):G.set(S.id,`Couldn’t save your answer for “${S.title}”. ${U(k.reason).body}`)}),G.size>0){cn(d,jt);const k=new Map([...ee].filter(([w])=>!G.has(w)));if(k.size>0&&We(d,e,k),g(w=>new Set([...w].filter(S=>!G.has(S)))),_(w=>({...w,...Object.fromEntries(G)})),ge){const{item:w,missing:S}=ge;$(w,S)}}N(k=>{const w={...k};for(const S of L)delete w[S];return w}),d.invalidateQueries({queryKey:A.responsibilities.all}),te.length>0&&i?.({confirmed:z==="active"?te:[],dismissed:z==="dismissed"?te:[]})},[e,i,d,$]),fe=r(p=>{const v=we(p);if(v.length>0){$(p,v);return}K([p],"confirm",()=>({status:"active"}))},"confirm"),Z=r(p=>K([p],"dismiss",()=>({status:"dismissed"})),"dismiss"),j=r(async()=>{D(!0);try{await K(F,"confirm",()=>({status:"active"}))}finally{D(!1)}},"confirmAll"),Y=r(async p=>{if(p.preventDefault(),!R)return;const v=c.find(L=>L.id===R.id);if(!v)return;const E=dn(v,R);if(!E){P({...R,attempted:!0});return}P(null),await K([v],"adjust",()=>E)},"saveAdjusted");return t===void 0&&l.isPending||M.length===0?null:(0,s.jsxs)("section",{"aria-labelledby":"proposed-responsibilities-heading",className:I("flex flex-col gap-3",h),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsxs)("h2",{id:"proposed-responsibilities-heading",className:"flex items-center gap-2 text-base font-semibold text-foreground",children:[(0,s.jsx)(Qe,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),o]}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:u})]}),F.length>1?(0,s.jsxs)(y,{size:"sm",onClick:r(()=>{j()},"onClick"),disabled:O,children:[(0,s.jsx)(Me,{"aria-hidden":"true"}),O?"Confirming…":`Confirm all ${F.length}`]}):null]}),(0,s.jsx)("div",{className:"flex flex-col gap-4",children:J.map(p=>(0,s.jsxs)("div",{className:"flex flex-col gap-2","data-area-group":p.area?.id??"none",children:[(0,s.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:p.area?p.area.title:"No area"}),(0,s.jsx)(Xe,{elevation:"low",className:"gap-0 py-1",children:(0,s.jsx)("ul",{className:"flex flex-col",children:p.items.map(v=>{const E=m[v.id],L=T[v.id],z=R?.id===v.id;return(0,s.jsxs)("li",{"data-proposal-id":v.id,className:"flex flex-col gap-3 border-b border-border px-5 py-4 last:border-b-0","aria-busy":E?!0:void 0,children:[z?(0,s.jsx)(hn,{proposal:v,editing:R,onChange:P,onCancel:r(()=>P(null),"onCancel"),onSubmit:r(ee=>{Y(ee)},"onSubmit")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(mn,{proposal:v}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)(y,{size:"sm",onClick:r(()=>fe(v),"onClick"),disabled:!!E||O,children:[(0,s.jsx)(Me,{"aria-hidden":"true"}),"Confirm"]}),(0,s.jsxs)(y,{size:"sm",variant:"ghost",onClick:r(()=>$(v),"onClick"),disabled:!!E||O,children:[(0,s.jsx)(os,{"aria-hidden":"true"}),"Adjust"]}),(0,s.jsxs)(y,{size:"sm",variant:"ghost",onClick:r(()=>{Z(v)},"onClick"),disabled:!!E||O,children:[(0,s.jsx)(ms,{"aria-hidden":"true"}),"Dismiss"]})]})]}),L?(0,s.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:L}):null]},v.id)})})})]},p.area?.id??"__no_area__"))})]})}r(ya,"ProposedResponsibilitiesReview");function fn(e){const t=q();return W({mutationFn:r(n=>H.update(e,{areaId:n}),"mutationFn"),onSuccess:r(()=>{t.invalidateQueries({queryKey:A.responsibilities.all})},"onSuccess")})}r(fn,"useMoveToArea");function gn({areas:e,value:t,onChange:n}){const a=e.filter(i=>i.status!=="archived"||i.id===t);return(0,s.jsxs)(ot,{value:t??"",onValueChange:r(i=>n(i||null),"onValueChange"),children:[a.map(i=>(0,s.jsxs)(ye,{value:i.id,disabled:i.status==="archived",children:[i.title,i.status==="archived"?" (archived)":""]},i.id)),a.length>0?(0,s.jsx)(it,{}):null,(0,s.jsx)(ye,{value:"",children:"No area"})]})}r(gn,"AreaRadioItems");function Na({responsibilityId:e,area:t,areas:n}){const a=fn(e);return(0,s.jsxs)("span",{className:"inline-flex flex-col gap-1",children:[(0,s.jsxs)(Ie,{children:[(0,s.jsx)(Se,{asChild:!0,children:(0,s.jsxs)(y,{size:"sm",variant:"ghost",disabled:a.isPending,"aria-label":t?`Area: ${t.title}. Move to another area`:"No area. Choose one",children:[t?t.title:(0,s.jsx)("span",{className:"text-muted-foreground",children:"No area"}),t?.status==="archived"?(0,s.jsx)("span",{className:"text-muted-foreground",children:"(archived)"}):null,(0,s.jsx)(fs,{"aria-hidden":"true"})]})}),(0,s.jsxs)(_e,{align:"start",className:"max-h-(--sz-50vh) overflow-y-auto",children:[(0,s.jsx)(rt,{children:"Move to area"}),(0,s.jsx)(gn,{areas:t&&!n.some(i=>i.id===t.id)?[t,...n]:n,value:t?.id??null,onChange:r(i=>{i!==(t?.id??null)&&a.mutate(i)},"onChange")})]})]}),a.error?(0,s.jsxs)("span",{role:"alert",className:"text-xs text-destructive",children:["Couldn’t move it. ",U(a.error).body]}):null]})}r(Na,"AreaControl");function xn(e,t){const n=e.filter(o=>o.status!=="terminated"),a=n.find(o=>o.id===t),i=n.filter(o=>o!==a).sort((o,u)=>o.name.localeCompare(u.name));return a?[a,...i]:i}r(xn,"orderDelegationAgents");function wa({open:e,onOpenChange:t,companyId:n,responsibility:a,defaultTitle:i="",projectId:o=null,onDelegated:u}){const h=q(),d=us(n)?.primaryAgentId??null,l=X({queryKey:A.agents.list(n),queryFn:r(()=>at.list(n),"queryFn"),enabled:e&&!!n}),c=js(l),x=(0,b.useMemo)(()=>xn(l.data??[],d),[l.data,d]),f=(0,b.useMemo)(()=>{const j=r(v=>({key:v.id,value:v.id,label:v.name,searchText:[v.title,v.role].filter(Boolean).join(" "),agent:v}),"toOption"),Y=x[0]?.id===d?x[0]:null,p=Y?x.slice(1):x;return[...Y?[{id:"primary",label:"Your primary agent",options:[j(Y)]}]:[],...p.length>0?[{id:"others",label:Y?"Other agents":void 0,options:p.map(j)}]:[]]},[x,d]),[g,m]=(0,b.useState)(""),[N,T]=(0,b.useState)(De),[_,R]=(0,b.useState)(i),[P,O]=(0,b.useState)(""),[D,M]=(0,b.useState)(null),J=(0,b.useRef)(null);(0,b.useEffect)(()=>{e&&(R(i),O(""),T(De),M(null),m(""))},[e,i]);const F=g||x[0]?.id||"",$=W({mutationFn:r(()=>H.delegate(a.id,Dt({title:_,instructions:P,assigneeAgentId:F,mode:N,projectId:o})),"mutationFn"),onSuccess:r(j=>{M(j),u?.(j),h.invalidateQueries({queryKey:A.responsibilities.all}),h.invalidateQueries({queryKey:A.issues.list(n)})},"onSuccess")}),K=$.reset;(0,b.useEffect)(()=>{e&&K()},[e,K]);const fe=r(j=>{j.preventDefault(),!(!_.trim()||!F||$.isPending)&&$.mutate()},"submit"),Z=D?x.find(j=>j.id===D.issue.assigneeAgentId):null;return(0,s.jsx)(Te,{open:e,onOpenChange:t,children:(0,s.jsx)($e,{className:"sm:max-w-xl",onOpenAutoFocus:r(j=>{j.preventDefault(),J.current?.focus()},"onOpenAutoFocus"),children:D?(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)(oe,{children:[(0,s.jsxs)(le,{className:"flex items-center gap-2",children:[(0,s.jsx)(et,{className:"size-5 text-(--status-task-icon-done)","aria-hidden":"true"}),"Task created"]}),(0,s.jsxs)(ue,{children:[Z?`${Z.name} has it.`:"The agent has it."," It is filed under ",a.title,"."]})]}),(0,s.jsxs)(he,{to:V(D.issue),className:"flex items-baseline gap-2 rounded-md text-sm text-foreground underline-offset-4 hover:underline",onClick:r(()=>t(!1),"onClick"),children:[D.issue.identifier?(0,s.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:D.issue.identifier}):null,(0,s.jsx)("span",{children:D.issue.title})]}),(0,s.jsxs)(ie,{className:"sm:justify-between",children:[(0,s.jsx)(y,{variant:"ghost",onClick:r(()=>M(null),"onClick"),children:"Give another task"}),(0,s.jsx)(y,{onClick:r(()=>t(!1),"onClick"),children:"Done"})]})]}):(0,s.jsxs)("form",{className:"flex flex-col gap-5",onSubmit:fe,children:[(0,s.jsxs)(oe,{children:[(0,s.jsx)(le,{children:"New task for an agent"}),(0,s.jsxs)(ue,{children:["Creates a task under ",a.title," and gives it to the agent."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Who"}),(0,s.jsx)(ks,{value:F,groups:f,onValueChange:r(j=>m(j),"onValueChange"),placeholder:l.isPending?"Loading agents…":"Choose an agent",searchPlaceholder:"Search agents…",emptyMessage:"No agents can take this. Add an agent first.",loading:l.isPending,triggerAriaLabel:"Agent",disablePortal:!0}),c.kind==="error"?(0,s.jsx)(ds,{error:c.error,size:"inline",action:"load agents",onRetry:c.retry,retrying:c.isFetching}):null]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"How"}),(0,s.jsx)(As,{ariaLabel:"How the agent works",value:N,onValueChange:r(j=>T(j),"onValueChange"),options:Ft.map(j=>({value:j.value,title:j.title,description:j.description})),className:"sm:grid-cols-2"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-2 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"What to do"}),(0,s.jsx)(B,{ref:J,value:_,maxLength:200,placeholder:"e.g. Draft the investor update",onChange:r(j=>R(j.target.value),"onChange"),required:!0})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-2 text-sm",children:[(0,s.jsxs)("span",{className:"font-medium text-foreground",children:["Anything else ",(0,s.jsx)("span",{className:"font-normal text-muted-foreground",children:"(optional)"})]}),(0,s.jsx)(st,{rows:3,value:P,placeholder:"Context, constraints, or what done looks like",onChange:r(j=>O(j.target.value),"onChange")})]}),$.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t create the task. ",U($.error).body]}):null,(0,s.jsxs)(ie,{className:"sm:justify-between",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),(0,s.jsx)(y,{type:"submit",disabled:!_.trim()||!F||$.isPending,children:$.isPending?"Creating task…":"Create task"})]})]})})})}r(wa,"ResponsibilityDelegateDialog");function Aa(e,t){const{search:n}=ps(),a=Ts(n,e),[i,o]=(0,b.useState)(null),u=(0,b.useCallback)(()=>o(null),[]);return{view:i??a??t,visiting:i!==null,visit:o,leave:u}}r(Aa,"usePageView");export{Cn as $,na as A,Wn as B,Vn as C,Js as D,Xs as E,oa as F,Gn as G,Un as H,ia as I,$n as J,Yn as K,Hn as L,ra as M,Jn as N,ea as O,ta as P,dt as Q,Bn as R,xt as S,Zn as T,qn as U,Kn as V,zn as W,In as X,Sn as Y,_n as Z,ca as _,fn as a,ht as at,la as b,pa as c,En as ct,xa as d,Fn as dt,Mn as et,ja as f,Is as ft,ha as g,ma as h,gn as i,On as it,aa as j,sa as k,ba as l,Rn as lt,fa as m,Ss as mt,wa as n,Pn as nt,ya as o,ct as ot,ga as p,Nn as pt,Gs as q,Na as r,Ln as rt,ka as s,Tn as st,Aa as t,Dn as tt,va as u,Ls as ut,ua as v,Xn as w,Qn as x,da as y,Us as z};
|
|
1
|
+
var yt=Object.defineProperty;var r=(e,t)=>yt(e,"name",{value:t,configurable:!0});import{a as Ke}from"./rolldown-runtime-DhZMWcEn.js";import{An as Nt,Cr as wt,Dn as Q,En as H,Fr as qe,Gi as At,Gn as St,Hi as pe,Hn as _t,Ii as $t,Jn as Ue,Kn as Ce,Mr as Ye,Sr as It,Ui as Tt,Wn as De,Zn as Ct,_r as Ae,ar as Dt,br as Ge,cr as Et,dr as He,fr as ae,hr as re,jr as Rt,kr as Mt,lr as Lt,mr as Pt,nr as Ot,or as Ee,qn as Ft,rr as Bt,ur as ze,vr as Wt,wr as Kt,yr as qt}from"./issue-detail-CZfjXs0M.js";import{$A as Ut,BA as Re,Bb as Ve,Db as Yt,Dp as ve,EA as Gt,EC as Qe,ET as Ht,E_ as Xe,Eb as zt,Ek as Je,Ev as Se,GS as A,Gb as he,Gw as Vt,IA as Ze,IS as Qt,ME as q,MT as Me,NE as y,Ob as Xt,Ow as Jt,QE as V,RT as Zt,S_ as es,Sb as ts,TT as et,Tb as ss,Um as ns,Up as as,VC as rs,Vp as is,XC as os,Yb as ls,Yw as tt,__ as B,_b as us,_v as be,ab as ds,bE as W,bv as ye,dy as ie,eD as cs,fy as oe,g_ as st,hC as hs,hE as U,hv as _e,iC as ms,jT as fs,jb as nt,kb as gs,lS as xs,ly as $e,my as le,nE as ps,nT as vs,nj as bs,pv as Ie,rb as at,sy as Te,ub as js,uy as ue,vm as ks,vv as rt,wC as ys,wT as Ns,wb as ws,xE as X,xv as it,yp as As,yv as ot,zE as I}from"./index-BJtnP7H1.js";import{t as lt}from"./SkillCardIcon-Cp_hws0N.js";import{r as ut}from"./company-skill-routes-D5LJ1l8M.js";var Ss=["behind","at_risk","on_track","unknown"],Nn={behind:"Behind",at_risk:"At risk",on_track:"On track",unknown:"Can't tell yet"};var _s=/(^#{1,6}\s)|(\*\*)|(\[[^\]]*\]\([^)]*\))|(`)/;function $s(e){const t=e.toLowerCase().replace(/[^a-z ]/g,"").replace(/\s+/g," ").trim();return["behind","at risk","on track","unknown","cant tell yet","ok","fine","good","bad"].includes(t)}r($s,"statusWordsOnly");var wn=Ze({status:Gt(Ss),message:Re().trim().min(3).max(200),detail:Re().trim().min(1).max(800).optional().nullable()}).strict().superRefine((e,t)=>{/[\r\n]/.test(e.message)&&t.addIssue({code:"custom",path:["message"],message:"Keep the message to one line; put anything more in detail"}),_s.test(e.message)&&t.addIssue({code:"custom",path:["message"],message:"Write the message as plain words, without markdown"}),$s(e.message)&&t.addIssue({code:"custom",path:["message"],message:"Say why, not only the status: what moved, and what it depends on"}),e.detail&&e.detail.split(/\r?\n/).filter(n=>n.trim()).length>4&&t.addIssue({code:"custom",path:["detail"],message:"Keep the detail to a few sentences"})}),An=Ze({}).strict(),b=Ke(bs(),1),s=Ke(Ut(),1);function C({label:e,hint:t,optional:n,error:a,children:i}){return(0,s.jsxs)("label",{className:"flex min-w-0 flex-col gap-1.5 text-sm",children:[(0,s.jsxs)("span",{className:"font-medium text-foreground",children:[e,n?(0,s.jsx)("span",{className:"font-normal text-muted-foreground",children:" (optional)"}):null]}),t?(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t}):null,i,a?(0,s.jsx)("span",{className:"text-xs text-destructive",children:a}):null]})}r(C,"Field");function Is({draft:e,onChange:t,missing:n,invalid:a,problems:i,showCurrent:o=!1}){const u=r(m=>t({...e,...m}),"set"),h=r((m,N)=>n?.has(m)?N:a?.has(m)?i?.[m]??"Enter a number":null,"errorFor"),d=e.metricKind,l=Ce.find(m=>m.value===d),c=Lt(e),x=r((m,N)=>(0,s.jsx)(B,{inputMode:"decimal",value:e[m],placeholder:N,"aria-invalid":n?.has(m)||a?.has(m)||void 0,onChange:r(T=>u({[m]:T.target.value}),"onChange")}),"numberInput"),f=(0,s.jsx)(C,{label:"Unit",optional:!0,children:(0,s.jsx)(B,{value:e.metricUnit,maxLength:40,placeholder:d==="range"?"e.g. months, $":"e.g. $, days",onChange:r(m=>u({metricUnit:m.target.value}),"onChange")})}),g=(0,s.jsx)(C,{label:"Better when it is",children:(0,s.jsx)(ve,{value:e.metricDirection,"aria-label":"Better when it is",onChange:r(m=>u({metricDirection:m.target.value}),"onChange"),children:St.map(m=>(0,s.jsx)("option",{value:m.value,children:m.label},m.value))})});return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(C,{label:"The bar",hint:"How is success measured? One sentence.",error:h("standard","Describe the bar"),children:(0,s.jsx)(st,{rows:2,value:e.standard,placeholder:"e.g. Every investor conversation has a next step within a week","aria-invalid":n?.has("standard")||void 0,onChange:r(m=>u({standard:m.target.value}),"onChange")})}),(0,s.jsx)(C,{label:"Kind of measure",hint:l?.summary,children:(0,s.jsx)(ve,{value:d,"aria-label":"Kind of measure",onChange:r(m=>u({metricKind:m.target.value,metricCurrent:""}),"onChange"),children:Ce.map(m=>(0,s.jsx)("option",{value:m.value,children:m.label},m.value))})}),(0,s.jsx)(C,{label:d==="yes_no"?"What should be true":"What you measure",error:h("metricName",d==="yes_no"?"Say what should be true":"Name what you measure"),children:(0,s.jsx)(B,{value:e.metricName,maxLength:200,placeholder:d==="yes_no"?"e.g. Board pack sent a week before the meeting":d==="range"?"e.g. Runway":"e.g. Investors contacted","aria-invalid":n?.has("metricName")||void 0,onChange:r(m=>u({metricName:m.target.value}),"onChange")})}),d==="volume"?(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[g,(0,s.jsx)(C,{label:"Target",error:h("metricTarget","Set a target"),children:x("metricTarget","e.g. 20")}),f]}):d==="percentage"?(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[g,(0,s.jsx)(C,{label:"Target (%)",error:h("metricTarget","Set a target"),children:x("metricTarget","e.g. 90")})]}):d==="range"?(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,s.jsx)(C,{label:"Low",error:h("metricLow","Set the low bound"),children:x("metricLow","e.g. 12")}),(0,s.jsx)(C,{label:"High",error:h("metricHigh","Set the high bound"),children:x("metricHigh","e.g. 24")}),f]}):null,c?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground","data-testid":"bar-status-rule",children:[c,"."]}):null,o?d==="yes_no"?(0,s.jsx)(C,{label:"Where it is now",optional:!0,hint:"Is it true today? The agents working on this keep it current.",children:(0,s.jsxs)(ve,{value:e.metricCurrent,"aria-label":"Where it is now",onChange:r(m=>u({metricCurrent:m.target.value}),"onChange"),children:[(0,s.jsx)("option",{value:"",children:"Not known yet"}),(0,s.jsx)("option",{value:"yes",children:"Yes"}),(0,s.jsx)("option",{value:"no",children:"No"})]})}):(0,s.jsx)(C,{label:"Where it is now",optional:!0,hint:"The latest reading, if you know it. The agents working on this keep it current.",error:h("metricCurrent",""),children:(0,s.jsx)(B,{inputMode:"decimal",value:e.metricCurrent,placeholder:d==="percentage"?"e.g. 85":"e.g. 9","aria-invalid":a?.has("metricCurrent")||void 0,onChange:r(m=>u({metricCurrent:m.target.value}),"onChange")})}):null]})}r(Is,"ResponsibilityBarFields");var Sn=[{value:"full",label:"Full"},{value:"outline",label:"Outline"},{value:"outline_v2",label:"Outline v2"},{value:"board",label:"Board"},{value:"exceptions",label:"Exceptions"},{value:"automation",label:"Automation"},{value:"agent_status",label:"Agent status"}],_n=[{value:"full",label:"Full"},{value:"scorecard",label:"Scorecard"},{value:"moving",label:"What's moving"},{value:"one_screen",label:"One screen"},{value:"one_screen_v2",label:"One screen v2"}],$n="outline_v2",In="one_screen_v2";function Ts(e,t){const n=new URLSearchParams(e).get("view");return t.some(a=>a.value===n)?n:null}r(Ts,"viewFromSearch");function ne(e,t,n){return`${e} ${e===1?t:n}`}r(ne,"count$1");function se(e){return e===1?"is":"are"}r(se,"isAre");function Tn(e){const{behind:t,at_risk:n,on_track:a,not_measured:i}=e,o=t+n+a+i,u=t>0?"behind":n>a?"at_risk":a>0?"on_track":"not_measured";let h;if(o===0)h="You do not own any responsibilities yet.";else if(t>0){const d=`${ne(t,"responsibility","responsibilities")} ${se(t)} behind`;h=n>0?`${d} and ${n} ${se(n)} at risk.`:`${d}.`}else n>0?h=`Nothing is behind. ${ne(n,"responsibility","responsibilities")} ${se(n)} at risk.`:a>0?h=i===0?"Everything you own is on track.":`Nothing is behind or at risk. ${ne(i,"responsibility","responsibilities")} ${se(i)} not measured yet.`:h="Nothing you own is measured yet.";return{health:u,sentence:h,total:o}}r(Tn,"overallStanding");function dt(e){return e.filter(t=>t.status==="active")}r(dt,"activeResponsibilities");function Cs(e,t){if(t<=0)return null;const n=Math.round(Math.max(0,Math.min(e,t))/t*100);return{percent:n,label:`${n}% on track`}}r(Cs,"onTrackShare");function ct(e,t,n=new Set){return Ae(e,Ye(dt(t)),n).map(a=>({...a,ownedLabel:`${ne(a.items.length,"responsibility","responsibilities")} you own`,share:Cs(a.items.filter(i=>i.rollup.health==="on_track").length,a.items.length)}))}r(ct,"outlineAreaGroups");function Cn(e,t){return ct(e,t).map(n=>{const a={behind:[],at_risk:[],on_track:[],not_measured:[]};for(const i of n.items)a[i.rollup.health].push(i);return{...n,byHealth:a}})}r(Cn,"boardAreaRows");function Dn(e){const{totals:t}=e,n=e.areas.filter(o=>o.activeResponsibilities>0),a=n.filter(o=>o.byHealth.behind>0).length,i=Object.values(t.byHealth).reduce((o,u)=>o+u,0);return{areas:{value:n.length,line:a>0?`${a} with something behind`:"None with anything behind",alert:a>0},responsibilities:{value:i,line:t.byHealth.behind>0?`${t.byHealth.behind} behind`:"None behind",alert:t.byHealth.behind>0},projects:{value:t.projects,line:t.lateProjects>0?`${t.lateProjects} late`:"None late",alert:t.lateProjects>0},tasks:{value:t.openTasks,line:t.blockedTasks>0?`${t.blockedTasks} blocked`:"None blocked",alert:t.blockedTasks>0}}}r(Dn,"dashboardSnapshot");function Ds(e){const{health:t,metric:n}=e.rollup;return t==="behind"||t==="at_risk"||t==="not_measured"?t:n?.stale?"stale":null}r(Ds,"exceptionReason");function En(e,t){const n=Ye(dt(t)),a=[];for(const o of n){const u=Ds(o);if(!u)continue;const h=o.rollup.workSummary.find(d=>d.tone==="attention")??null;a.push({responsibility:o,reason:u,signal:h})}const i=[];for(const o of Ae(e,n)){const u=o.items.filter(h=>h.rollup.health==="on_track");u.length!==0&&i.push({areaId:o.area?.id??null,label:`${o.area?.title??"Not in an area"}: ${u.length} of ${o.items.length} on track`,responsibilities:u.filter(h=>!h.rollup.metric?.stale)})}return{exceptions:a,onTrack:i}}r(En,"responsibilityExceptions");var Es={project:"Project",task:"Task",routine:"Routine"};function ht(e){return!!e.archivedAt||e.status==="completed"||e.status==="cancelled"}r(ht,"isFinishedProject");function Rs(e){return new Set(e.filter(t=>t.kind==="routine_failed"&&t.refType==="routine"&&t.refId).map(t=>t.refId))}r(Rs,"failedRoutineIds");function Ms(e,t){return e.filter(n=>n.kind===t).reduce((n,a)=>n+a.count,0)}r(Ms,"signalCount");var Le={project:0,task:1,routine:2};function Ls(e,t){const n=Rs(e.rollup.workSummary),a=[];let i=0;for(const o of e.projects){if(ht(o)){i+=1;continue}const u=He(o.targetDate,t);a.push({kind:"project",id:o.id,title:o.name,href:cs(o),attention:u?.late?`Late · ${u.label}`:null,note:u&&!u.late?`Due ${u.label}`:null,project:o})}for(const o of e.tasks){if(qt(o.status)){i+=1;continue}a.push({kind:"task",id:o.id,title:o.title,href:V(o),attention:o.status==="blocked"?"Blocked":null,note:null,task:o})}for(const o of e.routines){if(o.status==="archived"){i+=1;continue}a.push({kind:"routine",id:o.id,title:o.title,href:Mt(o.id),attention:n.has(o.id)?"Failed on its last run":null,note:o.status==="paused"?"Paused":null,routine:o})}return{items:a.map((o,u)=>({item:o,index:u})).sort((o,u)=>+(u.item.attention!==null)-+(o.item.attention!==null)||Le[o.item.kind]-Le[u.item.kind]||o.index-u.index).map(({item:o})=>o),finished:i}}r(Ls,"responsibilityWorkList");function Rn(e){const{rollup:t}=e,n=t.overdueProjects.length,a=Ms(t.workSummary,"routine_failed"),i=e.routines.filter(u=>u.status==="paused").length,o=[a>0?`${a} failed`:null,i>0?`${i} paused`:null].filter(Boolean);return{projects:{value:e.projects.filter(u=>!ht(u)).length,line:n>0?`${n} late`:"None late",alert:n>0},tasks:{value:t.openTasks,line:`${t.blockedTasks>0?`${t.blockedTasks} blocked`:"None blocked"}, ${t.agentTasks>0?`${t.agentTasks} with agents`:"none with agents"}`,alert:t.blockedTasks>0},routines:{value:t.routines,line:o.length>0?o.join(", "):"None failed or paused",alert:a>0}}}r(Rn,"responsibilityWorkCounts");function Mn(e,t){return{shown:e.slice(0,t),more:Math.max(0,e.length-t)}}r(Mn,"capList");function je(e,t){return t?.trim()==="%"?`${re(e,null)} ${e===1?"point":"points"}`:re(e,t)}r(je,"formatGapAmount");function ke(e){return Math.round(e*100)/100}r(ke,"roundGap");function mt(e,t,n){return Pt(e,t,n)}r(mt,"formatRange");function Ps(e){const{current:t,unit:n}=e;if(t===null)return null;if(e.kind==="yes_no")return t>=1?"Yes":"Not yet";if(e.kind==="range"){const{low:d,high:l}=e;if(d==null||l===null||l===void 0)return null;const c=mt(d,l,n);return t<d?`${je(ke(d-t),n)} below the range ${c}`:t>l?`${je(ke(t-l),n)} above the range ${c}`:`Inside the range ${c}`}const{target:a}=e;if(a===null)return null;const i=e.direction==="at_most",o=ke(i?t-a:a-t),u=re(a,n),h=je(Math.abs(o),n);return i?o>0?`${h} over the limit of ${u}`:o<0?`${h} inside the limit of ${u}`:`Right at the limit of ${u}`:o>0?`${h} short of ${u}`:o<0?`${h} past the target of ${u}`:`Right at the target of ${u}`}r(Ps,"describeMetricGap");function Ln(e){if(e.kind==="yes_no")return null;if(e.kind==="range")return e.low===null||e.low===void 0||e.high===null||e.high===void 0?"no range set":`range ${mt(e.low,e.high,e.unit)}`;if(e.target===null)return"no target set";const t=re(e.target,e.unit);return e.direction==="at_most"?`limit ${t}`:e.current===null?`target ${t}`:`of ${t}`}r(Ln,"describeTargetPhrase");function Pn(e){return ze({name:"",target:null,direction:null,attainment:null,...e}).current}r(Pn,"describeReadingValue");function Os(e){return e.charAt(0).toLowerCase()+e.slice(1)}r(Os,"lowerFirst");function Fs(e){if(!e)return"No number set: add what you measure and a target.";const t=Os(e.name.trim());if(e.kind==="yes_no")return e.current===null?"No answer yet.":null;if(e.kind==="range"){if(e.low===null||e.low===void 0||e.high===null||e.high===void 0)return`No range set for ${t}.`}else if(e.target===null)return`No target set for ${t}.`;return e.current===null?`No reading of ${t} yet.`:null}r(Fs,"describeMissingMeasure");var Bs=new Set(["routine_paused","tasks_open_unassigned"]),Ws=["tasks_completed_recently","tasks_open_agent","routine_active"];function On(e,t=2){const{rollup:n}=e,{health:a,metric:i,workSummary:o}=n,u=i?Ps(i):null,h=u?null:Fs(i),d=[];if(n.healthOverridden){const g=e.healthNote?.trim(),m=Ue[a].toLowerCase();d.push({kind:"override",role:"note",text:g?`You marked it ${m}: ${g}`:`You marked it ${m}.`})}const l=o.filter(g=>g.tone==="attention");let c;if(a==="on_track"){const g=l.filter(N=>N.kind==="metric_stale"),m=Ws.map(N=>o.find(T=>T.kind===N)).find(Boolean);c=g.length>0?g.map(N=>({kind:N.kind,role:"holding",text:N.text})):m?[{kind:m.kind,role:"keeping",text:m.text}]:[]}else if(c=[...l,...a==="not_measured"?[]:o.filter(g=>Bs.has(g.kind))].map(g=>({kind:g.kind,role:"holding",text:g.text})),c.length===0&&d.length===0){if(!(n.projects+n.routines+n.openTasks+n.doneTasks>0))c=[{kind:"no_work",role:"holding",text:"No work is filed under this yet."}];else if(a!=="not_measured"){const g=o.map(m=>({kind:m.kind,role:"note",text:m.text}));c=g.length>0?g:[{kind:"no_open_work",role:"note",text:"Nothing under this is open right now."}]}}const x=Math.max(0,t-d.length),f=c.slice(0,x);return{gap:u??(h?null:n.statusSentence),missing:h,lines:[...d,...f],more:c.length-f.length}}r(On,"explainResponsibilityStatus");var Pe={holding:0,moving:1,neutral:2},Ks=/last run (completed|succeeded|created a task)/;function qs(e,t){if(!e)return null;const n=`${t} is active, `;return e.text.startsWith(n)?e.text.slice(n.length):null}r(qs,"routineRunDetail");function Oe(e,t){return t(e)??"an agent"}r(Oe,"agentLabel$1");function Fn(e,t,n=()=>{}){const{items:a}=Ls(e,t),i=e.rollup.workSummary,o=new Map(e.rollup.overdueProjects.map(l=>[l.id,l])),u=It(t),h=a.map(l=>{if(l.kind==="project"){const{project:f}=l,g=He(f.targetDate,t);if(g?.late){const _=o.get(f.id)?.daysOverdue??Ee(`${f.targetDate}T00:00:00`,t);return{item:l,bearing:"holding",reason:`${_} ${_===1?"day":"days"} late (due ${g.label})`,finished:!1}}const m=f.targetDate&&f.targetDate>=u?Math.round((new Date(`${f.targetDate}T00:00:00`).getTime()-new Date(`${u}T00:00:00`).getTime())/864e5):null,N=m!==null&&m<=7;if(f.status==="in_progress"&&(N||f.leadAgentId)){const _=[N&&g?`Due ${g.label}, in progress`:"In progress"];return f.leadAgentId&&_.push(`led by ${Oe(f.leadAgentId,n)}`),{item:l,bearing:"moving",reason:_.join(", "),finished:!1}}const T=f.status==="backlog"||f.status==="planned"?"Not started":"In progress";return{item:l,bearing:"neutral",reason:g?`${T}, due ${g.label}`:T,finished:!1}}if(l.kind==="task"){const{task:f}=l;if(f.status==="blocked")return{item:l,bearing:"holding",reason:"Blocked",finished:!1};if(!f.assigneeAgentId&&!f.assigneeUserId)return{item:l,bearing:"holding",reason:"Not assigned to anyone",finished:!1};if(f.assigneeAgentId){const m=Oe(f.assigneeAgentId,n);return{item:l,bearing:"moving",reason:f.status==="in_progress"?`In progress with ${m}`:f.status==="in_review"?`In review with ${m}`:`With ${m}, not started`,finished:!1}}const g=f.assigneeUserId===e.ownerUserId?"you":"a person";return{item:l,bearing:"neutral",reason:f.status==="in_review"?`In review with ${g}`:`With ${g}`,finished:!1}}const{routine:c}=l;if(l.attention)return{item:l,bearing:"holding",reason:l.attention,finished:!1};if(c.status==="paused")return{item:l,bearing:"holding",reason:"Paused",finished:!1};if(!c.assigneeAgentId)return{item:l,bearing:"holding",reason:"No agent runs it",finished:!1};const x=qs(i.find(f=>f.kind==="routine_active"&&f.refId===c.id),c.title);return x&&Ks.test(x)?{item:l,bearing:"moving",reason:`Active, ${x}`,finished:!1}:{item:l,bearing:"neutral",reason:x?`Active, ${x}`:"Active",finished:!1}}).map((l,c)=>({entry:l,index:c})).sort((l,c)=>Pe[l.entry.bearing]-Pe[c.entry.bearing]||l.index-c.index).map(({entry:l})=>l),d=e.tasks.filter(l=>l.status==="done"&&Ee(l.updatedAt,t)<7).map(l=>({item:{kind:"task",id:l.id,title:l.title,href:V(l),attention:null,note:null,task:l},bearing:"moving",reason:`Completed ${ae(l.updatedAt,t)}`,finished:!0}));return[...h,...d]}r(Fn,"workBearings");var Bn={behind:Ht,at_risk:hs,on_track:et,not_measured:Ns};function Us({health:e,label:t,className:n}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:I("status-fill inline-block size-2.5 shrink-0 rounded-full",n),style:_t(e),"aria-hidden":"true"}),t?(0,s.jsx)("span",{className:"sr-only",children:t}):null]})}r(Us,"HealthDot");function Wn({health:e,className:t}){return(0,s.jsxs)("span",{className:I("inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",t),children:[(0,s.jsx)(Us,{health:e,className:"size-2"}),Ue[e]]})}r(Wn,"HealthMark");function Kn({count:e,onReview:t,subject:n="list",className:a}){if(e<=0)return null;const i=n==="this"?"This responsibility was proposed for you and is waiting for your review.":e===1?"1 proposed responsibility is waiting for your review.":`${e} proposed responsibilities are waiting for your review.`;return(0,s.jsxs)("div",{role:"status","data-proposals-notice":"",className:I("flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border bg-muted/40 px-4 py-2",a),children:[(0,s.jsxs)("p",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[(0,s.jsx)(Jt,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"}),i]}),(0,s.jsx)(y,{size:"xs",variant:"outline",onClick:t,children:n==="this"||e===1?"Review it":"Review them"})]})}r(Kn,"ProposalsNotice");function qn({responsibility:e,actions:t,children:n}){return(0,s.jsxs)("header",{className:"flex flex-col gap-1",children:[e.area?(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e.area.title}):null,(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsx)("h1",{className:"min-w-0 flex-1 text-2xl font-semibold text-foreground",children:e.title}),t]}),e.status==="let_go"?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"You let go of this."}):e.status==="dismissed"?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"You dismissed this when it was proposed."}):null,n]})}r(qn,"ResponsibilityViewHeader");function Un({status:e,actions:t}){const n=e==="active";return(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2","data-responsibility-header-actions":"",children:[n?(0,s.jsxs)(y,{variant:"outline",onClick:r(()=>t.newTask({defaultTitle:""}),"onClick"),children:[(0,s.jsx)(ys,{"aria-hidden":"true"}),"New task for an agent"]}):null,(0,s.jsxs)(Ie,{children:[(0,s.jsx)(Se,{asChild:!0,children:(0,s.jsx)(y,{size:"icon",variant:"ghost","aria-label":"More actions for this responsibility",children:(0,s.jsx)(vs,{"aria-hidden":"true"})})}),(0,s.jsxs)(_e,{align:"end",children:[n?(0,s.jsx)(be,{onSelect:r(()=>t.setStatus("let_go"),"onSelect"),children:"Let go"}):e==="let_go"||e==="dismissed"?(0,s.jsx)(be,{onSelect:r(()=>t.setStatus("active"),"onSelect"),children:"Take it back on"}):null,(0,s.jsx)(it,{}),(0,s.jsx)(be,{variant:"destructive",onSelect:t.requestDelete,children:"Delete…"})]})]})]})}r(Un,"ResponsibilityHeaderActions");var Ys={project:Vt,routine:rs};function Gs({item:e,showLabel:t}){const n=e.kind==="task"?null:Ys[e.kind];return(0,s.jsxs)("span",{className:I("flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",t&&"w-20"),children:[e.kind==="task"?(0,s.jsx)(is,{...as(e.task),size:"sm"}):n?(0,s.jsx)(n,{"aria-hidden":"true",className:"size-3.5 shrink-0"}):null,t?Es[e.kind]:null]})}r(Gs,"WorkKind");function Yn({item:e,dense:t=!1,showKind:n=!0}){return(0,s.jsx)("li",{"data-work-kind":e.kind,"data-work-id":e.id,"data-attention":e.attention?"true":void 0,children:(0,s.jsxs)(he,{to:e.href,className:I("flex min-w-0 items-center gap-3 px-4 text-sm transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",t?"py-1.5":"py-2"),children:[(0,s.jsx)(Gs,{item:e,showLabel:n}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.kind==="task"&&e.task.identifier?(0,s.jsx)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:e.task.identifier}):null,(0,s.jsx)("span",{className:"truncate text-foreground",children:e.title})]}),e.attention?(0,s.jsx)("span",{className:"shrink-0 text-xs text-(--status-task-icon-blocked)",children:e.attention}):e.note?(0,s.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.note}):null]})})}r(Yn,"WorkItemRow");function Hs(e,t,n=4){const a=Math.min(e,Math.max(Math.ceil(n/2),n-t));return{skills:a,artifacts:Math.min(t,n-a)}}r(Hs,"stripSlots");function zs(e,t,n){const a=[];return e>0&&a.push(`${e} more ${e===1?"skill":"skills"}`),t>0&&a.push(n?"many more artifacts":`${t.toLocaleString("en-US")} more ${t===1?"artifact":"artifacts"}`),a.length===0?null:`And ${a.join(" and ")}.`}r(zs,"moreLine");function de({to:e,icon:t,title:n,kind:a}){return(0,s.jsx)("li",{className:"min-w-0",children:(0,s.jsx)(Xe,{elevation:"low",className:"h-full gap-0 py-0",children:(0,s.jsxs)(he,{to:e,className:"flex min-w-0 items-center gap-2.5 rounded-lg px-3 py-2.5 transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[t,(0,s.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:n}),(0,s.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:a})]})]})})})}r(de,"StripCard");function ft(e,t,n,a=!1){return e<=0?null:a?`and many more ${n}`:`and ${e.toLocaleString("en-US")} more ${e===1?t:n}`}r(ft,"moreOf");function gt({kind:e,title:t,count:n,empty:a,more:i,children:o}){const u=`one-screen-${e}-heading`;return(0,s.jsxs)("section",{"aria-labelledby":u,className:"flex flex-col gap-2","data-card-list":e,children:[(0,s.jsxs)("h2",{id:u,className:"flex items-baseline gap-2 text-sm font-semibold text-foreground",children:[t," ",(0,s.jsx)("span",{className:"text-xs font-normal tabular-nums text-muted-foreground",children:n.toLocaleString("en-US")})]}),n===0?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:a}):(0,s.jsx)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2","data-testid":`responsibility-${e}-cards`,children:o}),i?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:i}):null]})}r(gt,"CardsSection");function Vs(e,t){return e.map(n=>{const a=n.agentIds[0]?t.get(n.agentIds[0])?.name:void 0;return(0,s.jsx)(de,{to:ut(n),icon:(0,s.jsx)(lt,{card:n,size:24}),title:n.name,kind:a?`${a}${n.agentIds.length>1?` and ${n.agentIds.length-1} more`:""}`:"Skill"},`skill:${n.id}`)})}r(Vs,"skillCards");function Qs(e){return e.map(t=>(0,s.jsx)(de,{to:t.href,icon:(0,s.jsx)(tt,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground"}),title:t.title,kind:t.issue.identifier?`From ${t.issue.identifier}`:"Artifact"},`artifact:${t.source}:${t.id}`))}r(Qs,"artifactCards");function Gn({skills:e,agentsById:t,cap:n=4}){const a=e.slice(0,n);return(0,s.jsx)(gt,{kind:"skill",title:"Skills",count:e.length,empty:"No skills yet. They come from the agents doing the work.",more:ft(e.length-a.length,"skill","skills"),children:Vs(a,t)})}r(Gn,"SkillCards");function Hn({artifacts:e,total:t,cap:n=4}){const a=e.slice(0,n);return(0,s.jsx)(gt,{kind:"artifact",title:"Artifacts",count:t,empty:"Nothing produced yet.",more:ft(Math.max(0,t-a.length),"artifact","artifacts",t>=Je),children:Qs(a)})}r(Hn,"ArtifactCards");function zn({skills:e,artifacts:t,artifactsTotal:n,agentsById:a,slots:i=4}){const o=Hs(e.length,t.length,i),u=e.slice(0,o.skills),h=t.slice(0,o.artifacts),d=zs(e.length-u.length,Math.max(0,n-h.length),n>=Je);return(0,s.jsxs)("section",{"aria-labelledby":"responsibility-strip-heading",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"responsibility-strip-heading",className:"text-sm font-semibold text-foreground",children:"Skills and artifacts"}),u.length+h.length===0?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No skills or artifacts yet."}):(0,s.jsxs)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4","data-testid":"responsibility-strip",children:[u.map(l=>{const c=l.agentIds[0]?a.get(l.agentIds[0])?.name:void 0;return(0,s.jsx)(de,{to:ut(l),icon:(0,s.jsx)(lt,{card:l,size:24}),title:l.name,kind:c?`Skill · ${c}${l.agentIds.length>1?` and ${l.agentIds.length-1} more`:""}`:"Skill"},`skill:${l.id}`)}),h.map(l=>(0,s.jsx)(de,{to:l.href,icon:(0,s.jsx)(tt,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground"}),title:l.title,kind:l.issue.identifier?`Artifact · ${l.issue.identifier}`:"Artifact"},`artifact:${l.source}:${l.id}`))]}),d?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:d}):null]})}r(zn,"SkillArtifactStrip");function Ne(e,t,n){return`${e} ${e===1?t:n}`}r(Ne,"count");function Xs(e){const t=At(e);return t===null?null:`${t}% automated`}r(Xs,"automationShareLabel");function Js(e,t){return`${Ne(e,"automation","automations")} · ${Ne(t,"manual task","manual tasks")}`}r(Js,"automationSplitWords");function Vn(e){return e.nothingFiled?"Nothing is filed under this yet.":e.automationCount+e.manualTaskCount===0?"No automations and no recent manual tasks.":Js(e.automationCount,e.manualTaskCount)}r(Vn,"automationCountsLine");function xt(e){return new Map(e.responsibilities.map(t=>[t.responsibilityId,t]))}r(xt,"automationById");function Qn(e,t,n,a){const i=xt(n),o=new Map(n.areas.map(d=>[d.areaId,d])),u=new Set(e.map(d=>d.id)),h=r((d,l)=>{const c=i.get(d.id);return{item:d,index:l,share:c?.share??0,manual:c?.manualTaskCount??0}},"order");return ct(e,t).flatMap(d=>{const l=d.items.map(h).sort((f,g)=>f.share-g.share||g.manual-f.manual||f.index-g.index).map(f=>f.item).filter(f=>!a||a.size===0||a.has(i.get(f.id)?.level??"manual"));if(l.length===0)return[];const c=d.area&&u.has(d.area.id)?d.area.id:null,x=o.get(c)??null;return[{...d,items:l,automationShare:x?Xs(x.share):null}]})}r(Qn,"automationAreaGroups");function Xn(e,t){const n=xt(t),a=Object.fromEntries(Tt.map(i=>[i,0]));for(const i of e)a[n.get(i.id)?.level??"manual"]+=1;return a}r(Xn,"automationLevelCounts");function Jn(e,t){const n=new Set;for(const a of e.responsibilities)for(const i of a.manualTaskIds)t.has(i)||n.add(i);return n.size}r(Jn,"remainingCandidateCount");function Zn(e){const{total:t,manual:n,candidates:a}=e;if(t===0)return"You do not own any responsibilities yet.";const i=a>0?`${Ne(a,"manual task","manual tasks")} could be automated.`:null;if(n===0)return i?`Every responsibility you own has something automated; ${i}`:"Everything you own is automated.";const o=n===t?t===1?"Your responsibility has nothing automated yet":`None of your ${t} responsibilities has anything automated yet`:`${n} of your ${t} responsibilities ${n===1?"has":"have"} nothing automated yet`;return i?`${o}; ${i}`:`${o}.`}r(Zn,"automationSentence");function ce(e,t,n="an agent"){return(e?t(e):void 0)??n}r(ce,"agentLabel");function Fe(e,t){const n=Math.floor((t.getTime()-new Date(e).getTime())/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n} ${n===1?"minute":"minutes"} ago`;const a=Math.floor(n/60);return a<24?`${a} ${a===1?"hour":"hours"} ago`:ae(e,t)}r(Fe,"describeCheckAge");function ea(e,t){const{start:n}=e;switch(n.kind){case"schedule":return{kind:n.kind,label:pe.schedule,detail:n.cadenceLabel,status:null};case"webhook":return{kind:n.kind,label:pe.webhook,detail:"when another system calls it",status:n.lastDeliveryAt?`Last called ${Fe(n.lastDeliveryAt,t)}`:"Not called yet"};case"standing_check":{const a=n.lastResult;return{kind:n.kind,label:pe.standing_check,detail:"on each wake-up",status:a?`Last checked ${Fe(a.checkedAt,t)}: ${a.outcome==="acted"?`acted${a.note?` (${a.note})`:""}`:"nothing needed"}`:"Not checked yet"}}case"on_request":return{kind:n.kind,label:"On request",detail:"when someone runs it",status:null}}}r(ea,"automationStartWords");function ta(e,t){switch(e.reason){case"paused":return"Paused";case"no_agent":return"No agent to run it";case"no_wakeups":return`Not running: ${ce(e.assigneeAgentId,t,"its agent")} doesn’t wake up on its own (heartbeat off)`}}r(ta,"stalledWords");function sa(e,t,n){switch(e.reason){case"pending_offer":{const a=e.pendingOffer;return a?`${t(a.agentId??"")??"Your agent"} offered: ${a.cadenceLabel}`:"An agent offered to repeat it"}case"hint":return e.hint?.why??null;case"done_by_agent":return`Done by ${ce(e.assigneeAgentId,t)} ${ae(e.completedAt??e.updatedAt,n)}`;case"done":return`Done by hand ${ae(e.completedAt??e.updatedAt,n)}`;case"with_agent":return`With ${ce(e.assigneeAgentId,t)} now`;case"open":return null}}r(sa,"candidateReasonWords");function na(e,t){const n=ce(e.responsibleAgentId,t,"your agent");return e.conversation?.state==="proposal_waiting"?`Review ${n}’s proposal`:e.conversation?.state==="discussing"?`Continue with ${n}`:`Automate with ${n}`}r(na,"conversationButtonLabel");function aa(e){return e.nothingFiled?null:e.manualTaskCount>0?"Nothing else here looks worth automating.":e.automationCount>0?"The automations are covering the work.":"No recent manual tasks to automate."}r(aa,"noCandidatesWords");function pt(e){return`paperclip:responsibilities:automation-dismissed:${e}`}r(pt,"automationDismissedStorageKey");function ra(e){try{const t=globalThis.localStorage?.getItem(pt(e)),n=t?JSON.parse(t):[];return new Set(Array.isArray(n)?n.filter(a=>typeof a=="string"):[])}catch{return new Set}}r(ra,"readDismissedCandidates");function ia(e,t){try{globalThis.localStorage?.setItem(pt(e),JSON.stringify([...t]))}catch{}}r(ia,"writeDismissedCandidates");function Zs(e){return e.hint!==null||e.pendingOffer!==null||e.conversation!==null}r(Zs,"isRelevant");function oa(e,t,n=3){const a=e.candidates.filter(c=>!t.has(c.issueId)),i=a.filter(Zs),o=(i.length>0?i:a).slice(0,i.length>0?n:1),u=new Set(o.map(c=>c.issueId)),h=a.filter(c=>!u.has(c.issueId)),d=e.manualTaskIds.filter(c=>t.has(c)).length,l=Math.max(0,e.candidateTotal-d-o.length);return{shown:o,others:h,unlisted:Math.max(0,l-h.length),more:l}}r(oa,"visibleCandidates");function la(){const e=q(),t=ls(),n=W({mutationFn:r(i=>Nt.start(i.issueId,{...i.agentId?{agentId:i.agentId}:{},...i.responsibilityId?{responsibilityId:i.responsibilityId}:{}}),"mutationFn"),onSuccess:r(async i=>{await e.invalidateQueries({queryKey:A.responsibilities.all}),i.conversation&&t(V({id:i.conversation.issueId,identifier:i.conversation.identifier}))},"onSuccess")});return{open:r(i=>{if(i.conversation){t(V({id:i.conversation.issueId,identifier:i.conversation.identifier}));return}n.mutate(i)},"open"),isPending:n.isPending,error:n.error}}r(la,"useOpenAutomationConversation");var en=[2e3,3e3,5e3,8e3,12e3,15e3];function Be(e,t){return e?.refreshing?en[Math.max(0,t-1)]??!1:!1}r(Be,"summaryRefetchDelay");function tn(e,t){return{source:e.source==="model"?"Written by AI":"Summarized from the numbers",when:Qt(e.generatedAt),pending:e.refreshing&&t&&e.source!=="model"?"AI summary on the way":null}}r(tn,"summaryAttribution");function vt(e,t,n){const a=q(),i=X({queryKey:e,queryFn:t,enabled:n,retry:1,refetchOnWindowFocus:!1,refetchInterval:r(h=>Be(h.state.data,h.state.dataUpdateCount),"refetchInterval")}),o=a.getQueryState(e)?.dataUpdateCount??0,u=Be(i.data,o)!==!1;return{summary:i.data??null,stillWaiting:u}}r(vt,"useNarrative");function ua(e){const{userId:t}=Ve();return vt(A.responsibilities.summary(e??"__none__",t),()=>H.companySummary(e),!!e&&!!t)}r(ua,"useDashboardNarrative");function da(e){return vt(A.responsibilities.detailSummary(e),()=>H.summary(e),!!e)}r(da,"useResponsibilitySummary");function ca({summary:e,stillWaiting:t,className:n}){const a=e?.text.trim();if(!e||!a)return null;const i=tn(e,t),o=new Date(e.generatedAt);return(0,s.jsxs)("div",{className:I("flex flex-col gap-1.5",n),"data-narrative-source":e.source,children:[(0,s.jsx)("p",{className:"text-sm leading-relaxed text-foreground",children:a}),(0,s.jsxs)("p",{className:"flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground","aria-live":"polite",children:[e.source==="model"?(0,s.jsx)(Qe,{"aria-hidden":"true",className:"size-3 shrink-0"}):null,(0,s.jsx)("span",{children:i.source}),(0,s.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,s.jsx)("time",{dateTime:e.generatedAt,title:Number.isNaN(o.getTime())?void 0:o.toLocaleString(),children:i.when}),i.pending?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,s.jsx)("span",{children:i.pending})]}):null]})]})}r(ca,"NarrativeParagraph");var sn={attention:"Needs attention",neutral:"",good:"Going well"};function nn({tone:e}){return(0,s.jsx)("span",{className:"status-fill mt-1.5 size-2 shrink-0 rounded-full",style:{"--sc":`var(${Ct[e]})`},"aria-hidden":"true"})}r(nn,"ToneDot");function ha({signals:e,renderAction:t,responsibilityHref:n,size:a="sm",className:i}){return(0,s.jsx)("ul",{className:I("flex flex-col",a==="xs"?"gap-0.5":"gap-1.5",i),children:e.map((o,u)=>{const h=o.refType==="responsibility"&&o.refId&&n?n(o.refId):Rt(o),d=sn[o.tone],l=(0,s.jsxs)(s.Fragment,{children:[o.text,d?(0,s.jsxs)("span",{className:"sr-only",children:[" (",d.toLowerCase(),")"]}):null]});return(0,s.jsxs)("li",{"data-tone":o.tone,className:I("flex min-w-0 items-start gap-2",a==="xs"?"text-xs":"text-sm"),children:[(0,s.jsx)(nn,{tone:o.tone}),(0,s.jsx)("span",{className:I("min-w-0 flex-1",o.tone==="attention"?"text-foreground":"text-muted-foreground"),children:h?h.startsWith("#")?(0,s.jsx)("a",{href:h,className:"underline-offset-4 hover:underline",children:l}):(0,s.jsx)(he,{to:h,className:"underline-offset-4 hover:underline",children:l}):l}),t?t(o):null]},`${o.kind}:${o.refId??u}`)})})}r(ha,"WorkSignalList");var an=[];function ma(e){const t=X({queryKey:A.agents.list(e??"__none__"),queryFn:r(()=>at.list(e),"queryFn"),enabled:!!e}),n=t.data??an;return{agents:n,byId:(0,b.useMemo)(()=>new Map(n.map(a=>[a.id,a])),[n]),query:t}}r(ma,"useAgentDirectory");function fa({agentIds:e,agentsById:t,className:n}){if(e.length===0)return(0,s.jsx)("span",{className:I("text-xs text-muted-foreground",n),children:"No agents on this yet"});const a=e.map(i=>t.get(i)?.name??"An agent");return(0,s.jsxs)("span",{className:I("inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",n),"aria-label":`Agents on this: ${a.join(", ")}`,children:[(0,s.jsx)("span",{className:"flex shrink-0 -space-x-1","aria-hidden":"true",children:e.slice(0,3).map(i=>(0,s.jsx)(nt,{agent:t.get(i)??{id:i},name:t.get(i)?.name,size:16},i))}),(0,s.jsx)("span",{className:"truncate text-foreground","aria-hidden":"true",children:a.join(", ")})]})}r(fa,"AgentsWorkingLabel");function ga({agents:e,agentsById:t}){return e.length===0?(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"No agent is working on this yet. Give one a task, a routine or a project below."}):(0,s.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:e.map(n=>{const a=t.get(n.agentId);return(0,s.jsxs)("li",{className:"flex items-center gap-1.5 text-sm",children:[(0,s.jsx)(nt,{agent:a??{id:n.agentId},name:a?.name,size:20}),(0,s.jsx)("span",{className:"text-foreground",children:a?.name??"An agent"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:Et(n)})]},n.agentId)})})}r(ga,"AgentsAtWorkList");function xa(e,t=!0){const{userId:n}=Ve({enabled:t});return X({queryKey:[...A.responsibilities.areas(e??"__none__"),n],queryFn:r(()=>Q.list(e),"queryFn"),enabled:t&&!!e&&!!n})}r(xa,"useResponsibilityAreas");function me(){const e=q();return()=>e.invalidateQueries({queryKey:A.responsibilities.all})}r(me,"useAreaMutationRefresh");function pa({open:e,onOpenChange:t,companyId:n,onCreated:a}){const i=me(),[o,u]=(0,b.useState)(""),h=W({mutationFn:r(()=>Q.create(n,{title:o.trim()}),"mutationFn"),onSuccess:r(c=>{i(),a?.(c),t(!1)},"onSuccess")}),d=h.reset;(0,b.useEffect)(()=>{e&&(u(""),d())},[e,d]);const l=r(c=>{c.preventDefault(),!(!o.trim()||h.isPending)&&h.mutate()},"submit");return(0,s.jsx)(Te,{open:e,onOpenChange:t,children:(0,s.jsx)($e,{children:(0,s.jsxs)("form",{className:"flex flex-col gap-5",onSubmit:l,children:[(0,s.jsxs)(oe,{children:[(0,s.jsx)(le,{children:"Add an area"}),(0,s.jsx)(ue,{children:"What do you care about? An area is broad, like Fundraising or Hiring. Nobody owns it and it has no deadline; the responsibilities you own sit under it."})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"Name"}),(0,s.jsx)(B,{autoFocus:!0,value:o,maxLength:200,placeholder:"e.g. Fundraising",onChange:r(c=>u(c.target.value),"onChange")})]}),h.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t add the area. ",U(h.error).body]}):null,(0,s.jsxs)(ie,{className:"items-center sm:justify-between",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),(0,s.jsx)(y,{type:"submit",disabled:!o.trim()||h.isPending,children:h.isPending?"Adding…":"Add area"})]})]})})})}r(pa,"AddAreaDialog");function va({area:e,onOpenChange:t}){const n=me(),[a,i]=(0,b.useState)(""),o=W({mutationFn:r(()=>Q.update(e.id,{title:a.trim()}),"mutationFn"),onSuccess:r(()=>{n(),t(!1)},"onSuccess")}),u=o.reset;(0,b.useEffect)(()=>{e&&(i(e.title),u())},[e,u]);const h=!e||a.trim()===e.title,d=r(l=>{l.preventDefault(),!(!a.trim()||h||o.isPending)&&o.mutate()},"submit");return(0,s.jsx)(Te,{open:e!==null,onOpenChange:t,children:(0,s.jsx)($e,{children:(0,s.jsxs)("form",{className:"flex flex-col gap-5",onSubmit:d,children:[(0,s.jsxs)(oe,{children:[(0,s.jsx)(le,{children:"Rename area"}),(0,s.jsx)(ue,{children:"Everyone in the company sees the new name."})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"Name"}),(0,s.jsx)(B,{autoFocus:!0,value:a,maxLength:200,onChange:r(l=>i(l.target.value),"onChange")})]}),o.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t rename the area. ",U(o.error).body]}):null,(0,s.jsxs)(ie,{className:"items-center sm:justify-between",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),(0,s.jsx)(y,{type:"submit",disabled:!a.trim()||h||o.isPending,children:o.isPending?"Saving…":"Save name"})]})]})})})}r(va,"RenameAreaDialog");function ba({area:e,ownedHere:t,onOpenChange:n}){const a=me(),i=W({mutationFn:r(()=>Q.update(e.id,{status:"archived"}),"mutationFn"),onSuccess:r(()=>{a(),n(!1)},"onSuccess")}),o=i.reset;return(0,b.useEffect)(()=>{e&&o()},[e,o]),(0,s.jsx)(ts,{open:e!==null,onOpenChange:n,children:(0,s.jsxs)(ss,{children:[(0,s.jsxs)(Xt,{children:[(0,s.jsxs)(gs,{children:["Archive ",e?.title,"?"]}),(0,s.jsxs)(zt,{children:["It is archived for everyone in the company, and nothing new can be filed under it.",t>0?` Your ${t===1?"responsibility":`${t} responsibilities`} in it stay${t===1?"s":""} there until you move ${t===1?"it":"them"} to another area.`:""," ","You can restore it later."]})]}),i.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t archive the area. ",U(i.error).body]}):null,(0,s.jsxs)(Yt,{className:"items-center sm:justify-between",children:[(0,s.jsx)(ws,{children:"Keep it"}),(0,s.jsx)(y,{disabled:i.isPending,onClick:r(()=>i.mutate(),"onClick"),children:i.isPending?"Archiving…":"Archive area"})]})]})})}r(ba,"ArchiveAreaDialog");function ja(){const e=me();return W({mutationFn:r(t=>Q.update(t,{status:"active"}),"mutationFn"),onSuccess:r(()=>{e()},"onSuccess")})}r(ja,"useRestoreArea");function rn(e,t,n){switch(t.kind){case"task":return xs.update(t.id,{assigneeAgentId:n,assigneeUserId:null});case"routine":return ns.update(t.id,{assigneeAgentId:n});case"project":return es.update(t.id,{leadAgentId:n},e)}}r(rn,"giveItemToAgent");function on(e){const t=q();return W({mutationFn:r(({item:n,agentId:a})=>rn(e,n,a),"mutationFn"),onSuccess:r((n,{item:a})=>{t.invalidateQueries({queryKey:A.responsibilities.all}),a.kind==="task"&&t.invalidateQueries({queryKey:A.issues.list(e)}),a.kind==="routine"&&t.invalidateQueries({queryKey:["routines",e]}),a.kind==="project"&&t.invalidateQueries({queryKey:A.projects.all(e)})},"onSuccess")})}r(on,"useGiveToAgent");function ka({companyId:e,item:t,agents:n,size:a="xs",variant:i="ghost"}){const o=on(e),[u,h]=(0,b.useState)(null),d=(0,b.useMemo)(()=>n.filter(c=>c.status!=="terminated").slice().sort((c,x)=>c.name.localeCompare(x.name)),[n]),l=t.kind==="project"?"project":t.kind==="routine"?"routine":"task";return(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1",children:[u?(0,s.jsx)("span",{role:u.ok?"status":"alert",className:u.ok?"text-xs text-muted-foreground":"text-xs text-destructive",children:u.text}):null,(0,s.jsxs)(Ie,{children:[(0,s.jsx)(Se,{asChild:!0,children:(0,s.jsxs)(y,{size:a,variant:i,className:i==="ghost"?"text-muted-foreground":void 0,disabled:o.isPending,"aria-label":`Give ${t.label} to an agent`,title:a==="icon-xs"?"Give to an agent":void 0,children:[(0,s.jsx)(Zt,{"aria-hidden":"true"}),a==="xs"?"Give to an agent":null]})}),(0,s.jsxs)(_e,{align:"end",className:"max-h-(--sz-50vh) overflow-y-auto",children:[(0,s.jsx)(rt,{children:t.kind==="project"?"Who leads this project":`Who takes this ${l}`}),d.length===0?(0,s.jsx)("p",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:"No agents yet. Add an agent first."}):(0,s.jsx)(ot,{value:t.currentAgentId??"",onValueChange:r(c=>{if(!c||c===t.currentAgentId)return;const x=d.find(f=>f.id===c)?.name??"the agent";h(null),o.mutate({item:t,agentId:c},{onSuccess:r(()=>h({ok:!0,text:t.kind==="project"?`${x} leads it now.`:`${x} has it now.`}),"onSuccess"),onError:r(f=>h({ok:!1,text:`Couldn’t give it to ${x}. ${U(f).body}`}),"onError")})},"onValueChange"),children:d.map(c=>(0,s.jsx)(ye,{value:c.id,children:c.name},c.id))})]})]})]})}r(ka,"GiveToAgentMenu");var ln=[],un=[];function we(e){return wt(e)}r(we,"proposalMissing");function bt(e){return Wt({...e,metricCurrent:""})}r(bt,"metricLeftBlank");function dn(e,t){const n=t.title.trim();if(!n)return null;if(bt(t.draft)){const i=$t(e)?{metricName:null,metricUnit:null,metricTarget:null,metricLow:null,metricHigh:null,metricCurrent:null}:{};return{title:n,standard:t.draft.standard.trim()||null,...i,status:"active"}}const a=qe(t.draft);return a.ok?{title:n,...Bt(a.value),status:"active"}:null}r(dn,"adjustedPatch");function We(e,t,n){const a=A.responsibilities.overviews(t),i=e.getQueriesData({queryKey:a});return e.setQueriesData({queryKey:a},o=>{if(!o)return o;const u=[],h=o.proposed.filter(l=>{const c=n.get(l.id);return c?(c.status==="active"&&u.push({...l,...c.patch,status:"active",confirmedAt:new Date}),!1):!0});if(h.length===o.proposed.length)return o;const d={...o.totals.byHealth};for(const l of u)d[l.rollup.health]+=1;return{...o,proposed:h,responsibilities:[...o.responsibilities,...u],totals:{...o.totals,byHealth:d}}}),i}r(We,"applyReviewToOverviews");function cn(e,t){for(const[n,a]of t)e.setQueryData(n,a)}r(cn,"restoreOverviews");function hn({proposal:e,editing:t,onChange:n,onCancel:a,onSubmit:i}){const o=bt(t.draft),u=qe(t.draft),h=t.attempted&&!o&&!u.ok,d=new Set([...h&&!u.ok?u.missing:[],...t.serverMissing]),l=new Set(h&&!u.ok?u.invalid:[]),c=t.attempted&&!t.title.trim();return(0,s.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:i,noValidate:!0,"aria-label":`Adjust ${e.title}`,children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"What you own"}),(0,s.jsx)(B,{autoFocus:!0,value:t.title,maxLength:200,"aria-invalid":c||void 0,onChange:r(x=>n({...t,title:x.target.value}),"onChange")}),c?(0,s.jsx)("span",{className:"text-xs text-destructive",children:"Name what you own"}):null]}),(0,s.jsx)(Is,{draft:t.draft,onChange:r(x=>n({...t,draft:x}),"onChange"),missing:d,invalid:l,problems:h&&!u.ok?u.problems:void 0}),o&&t.serverMissing.length===0?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"You can leave what you measure blank and set it up later."}):null,(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:a,children:"Cancel"}),(0,s.jsx)(y,{type:"submit",size:"sm",children:"Save and confirm"})]})]})}r(hn,"AdjustForm");function mn({proposal:e}){const t=e.rollup.metric,n=we(e);return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold text-foreground",children:e.title}),e.standard?(0,s.jsx)("p",{className:"text-sm text-foreground",children:e.standard}):null,t?(0,s.jsx)("p",{className:"text-sm tabular-nums text-muted-foreground",children:ze(t).summary}):null,n.length>0?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Needs ",Ge(n)," before you can confirm it."]}):null,e.evidence?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-medium",children:"Why: "}),e.evidence]}):null]})}r(mn,"ProposalSummary");function ya({companyId:e,proposed:t,areas:n,ownerUserId:a,onReviewed:i,heading:o="Proposed for you",description:u="Your guide drafted these from what it learned. Confirm each one you own as it is, adjust its bar or numbers, or dismiss it.",className:h}){const d=q(),l=X({queryKey:A.responsibilities.overview(e,{ownerUserId:a}),queryFn:r(()=>H.overview(e,{ownerUserId:a}),"queryFn"),enabled:t===void 0&&!!e}),c=t??l.data?.proposed??ln,x=n??l.data?.areas??un,[f,g]=(0,b.useState)(()=>new Set),[m,N]=(0,b.useState)({}),[T,_]=(0,b.useState)({}),[R,P]=(0,b.useState)(null),[O,D]=(0,b.useState)(!1),M=(0,b.useMemo)(()=>c.filter(p=>!f.has(p.id)),[c,f]),J=(0,b.useMemo)(()=>Ae(x,M),[x,M]),F=(0,b.useMemo)(()=>M.filter(p=>we(p).length===0),[M]),$=(0,b.useCallback)((p,v=[])=>{P({id:p.id,title:p.title,draft:Ot(p),attempted:v.length>0,serverMissing:v})},[]),K=(0,b.useCallback)(async(p,v,E)=>{if(p.length===0)return;const L=p.map(k=>k.id),z=v==="dismiss"?"dismissed":"active";g(k=>new Set([...k,...L])),N(k=>({...k,...Object.fromEntries(L.map(w=>[w,v]))})),_(k=>{const w={...k};for(const S of L)delete w[S];return w});const ee=new Map(p.map(k=>{const{status:w,...S}=E(k);return[k.id,{status:z,patch:S}]})),jt=We(d,e,ee),kt=await Promise.allSettled(p.map(k=>H.update(k.id,E(k)))),te=[],G=new Map;let ge=null;if(kt.forEach((k,w)=>{const S=p[w];if(k.status==="fulfilled"){te.push(k.value);return}const xe=Kt(k.reason);xe.length>0?(G.set(S.id,`Add ${Ge(xe)} to confirm it.`),ge??={item:S,missing:xe}):G.set(S.id,`Couldn’t save your answer for “${S.title}”. ${U(k.reason).body}`)}),G.size>0){cn(d,jt);const k=new Map([...ee].filter(([w])=>!G.has(w)));if(k.size>0&&We(d,e,k),g(w=>new Set([...w].filter(S=>!G.has(S)))),_(w=>({...w,...Object.fromEntries(G)})),ge){const{item:w,missing:S}=ge;$(w,S)}}N(k=>{const w={...k};for(const S of L)delete w[S];return w}),d.invalidateQueries({queryKey:A.responsibilities.all}),te.length>0&&i?.({confirmed:z==="active"?te:[],dismissed:z==="dismissed"?te:[]})},[e,i,d,$]),fe=r(p=>{const v=we(p);if(v.length>0){$(p,v);return}K([p],"confirm",()=>({status:"active"}))},"confirm"),Z=r(p=>K([p],"dismiss",()=>({status:"dismissed"})),"dismiss"),j=r(async()=>{D(!0);try{await K(F,"confirm",()=>({status:"active"}))}finally{D(!1)}},"confirmAll"),Y=r(async p=>{if(p.preventDefault(),!R)return;const v=c.find(L=>L.id===R.id);if(!v)return;const E=dn(v,R);if(!E){P({...R,attempted:!0});return}P(null),await K([v],"adjust",()=>E)},"saveAdjusted");return t===void 0&&l.isPending||M.length===0?null:(0,s.jsxs)("section",{"aria-labelledby":"proposed-responsibilities-heading",className:I("flex flex-col gap-3",h),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsxs)("h2",{id:"proposed-responsibilities-heading",className:"flex items-center gap-2 text-base font-semibold text-foreground",children:[(0,s.jsx)(Qe,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),o]}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:u})]}),F.length>1?(0,s.jsxs)(y,{size:"sm",onClick:r(()=>{j()},"onClick"),disabled:O,children:[(0,s.jsx)(Me,{"aria-hidden":"true"}),O?"Confirming…":`Confirm all ${F.length}`]}):null]}),(0,s.jsx)("div",{className:"flex flex-col gap-4",children:J.map(p=>(0,s.jsxs)("div",{className:"flex flex-col gap-2","data-area-group":p.area?.id??"none",children:[(0,s.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:p.area?p.area.title:"No area"}),(0,s.jsx)(Xe,{elevation:"low",className:"gap-0 py-1",children:(0,s.jsx)("ul",{className:"flex flex-col",children:p.items.map(v=>{const E=m[v.id],L=T[v.id],z=R?.id===v.id;return(0,s.jsxs)("li",{"data-proposal-id":v.id,className:"flex flex-col gap-3 border-b border-border px-5 py-4 last:border-b-0","aria-busy":E?!0:void 0,children:[z?(0,s.jsx)(hn,{proposal:v,editing:R,onChange:P,onCancel:r(()=>P(null),"onCancel"),onSubmit:r(ee=>{Y(ee)},"onSubmit")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(mn,{proposal:v}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)(y,{size:"sm",onClick:r(()=>fe(v),"onClick"),disabled:!!E||O,children:[(0,s.jsx)(Me,{"aria-hidden":"true"}),"Confirm"]}),(0,s.jsxs)(y,{size:"sm",variant:"ghost",onClick:r(()=>$(v),"onClick"),disabled:!!E||O,children:[(0,s.jsx)(os,{"aria-hidden":"true"}),"Adjust"]}),(0,s.jsxs)(y,{size:"sm",variant:"ghost",onClick:r(()=>{Z(v)},"onClick"),disabled:!!E||O,children:[(0,s.jsx)(ms,{"aria-hidden":"true"}),"Dismiss"]})]})]}),L?(0,s.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:L}):null]},v.id)})})})]},p.area?.id??"__no_area__"))})]})}r(ya,"ProposedResponsibilitiesReview");function fn(e){const t=q();return W({mutationFn:r(n=>H.update(e,{areaId:n}),"mutationFn"),onSuccess:r(()=>{t.invalidateQueries({queryKey:A.responsibilities.all})},"onSuccess")})}r(fn,"useMoveToArea");function gn({areas:e,value:t,onChange:n}){const a=e.filter(i=>i.status!=="archived"||i.id===t);return(0,s.jsxs)(ot,{value:t??"",onValueChange:r(i=>n(i||null),"onValueChange"),children:[a.map(i=>(0,s.jsxs)(ye,{value:i.id,disabled:i.status==="archived",children:[i.title,i.status==="archived"?" (archived)":""]},i.id)),a.length>0?(0,s.jsx)(it,{}):null,(0,s.jsx)(ye,{value:"",children:"No area"})]})}r(gn,"AreaRadioItems");function Na({responsibilityId:e,area:t,areas:n}){const a=fn(e);return(0,s.jsxs)("span",{className:"inline-flex flex-col gap-1",children:[(0,s.jsxs)(Ie,{children:[(0,s.jsx)(Se,{asChild:!0,children:(0,s.jsxs)(y,{size:"sm",variant:"ghost",disabled:a.isPending,"aria-label":t?`Area: ${t.title}. Move to another area`:"No area. Choose one",children:[t?t.title:(0,s.jsx)("span",{className:"text-muted-foreground",children:"No area"}),t?.status==="archived"?(0,s.jsx)("span",{className:"text-muted-foreground",children:"(archived)"}):null,(0,s.jsx)(fs,{"aria-hidden":"true"})]})}),(0,s.jsxs)(_e,{align:"start",className:"max-h-(--sz-50vh) overflow-y-auto",children:[(0,s.jsx)(rt,{children:"Move to area"}),(0,s.jsx)(gn,{areas:t&&!n.some(i=>i.id===t.id)?[t,...n]:n,value:t?.id??null,onChange:r(i=>{i!==(t?.id??null)&&a.mutate(i)},"onChange")})]})]}),a.error?(0,s.jsxs)("span",{role:"alert",className:"text-xs text-destructive",children:["Couldn’t move it. ",U(a.error).body]}):null]})}r(Na,"AreaControl");function xn(e,t){const n=e.filter(o=>o.status!=="terminated"),a=n.find(o=>o.id===t),i=n.filter(o=>o!==a).sort((o,u)=>o.name.localeCompare(u.name));return a?[a,...i]:i}r(xn,"orderDelegationAgents");function wa({open:e,onOpenChange:t,companyId:n,responsibility:a,defaultTitle:i="",projectId:o=null,onDelegated:u}){const h=q(),d=us(n)?.primaryAgentId??null,l=X({queryKey:A.agents.list(n),queryFn:r(()=>at.list(n),"queryFn"),enabled:e&&!!n}),c=js(l),x=(0,b.useMemo)(()=>xn(l.data??[],d),[l.data,d]),f=(0,b.useMemo)(()=>{const j=r(v=>({key:v.id,value:v.id,label:v.name,searchText:[v.title,v.role].filter(Boolean).join(" "),agent:v}),"toOption"),Y=x[0]?.id===d?x[0]:null,p=Y?x.slice(1):x;return[...Y?[{id:"primary",label:"Your primary agent",options:[j(Y)]}]:[],...p.length>0?[{id:"others",label:Y?"Other agents":void 0,options:p.map(j)}]:[]]},[x,d]),[g,m]=(0,b.useState)(""),[N,T]=(0,b.useState)(De),[_,R]=(0,b.useState)(i),[P,O]=(0,b.useState)(""),[D,M]=(0,b.useState)(null),J=(0,b.useRef)(null);(0,b.useEffect)(()=>{e&&(R(i),O(""),T(De),M(null),m(""))},[e,i]);const F=g||x[0]?.id||"",$=W({mutationFn:r(()=>H.delegate(a.id,Dt({title:_,instructions:P,assigneeAgentId:F,mode:N,projectId:o})),"mutationFn"),onSuccess:r(j=>{M(j),u?.(j),h.invalidateQueries({queryKey:A.responsibilities.all}),h.invalidateQueries({queryKey:A.issues.list(n)})},"onSuccess")}),K=$.reset;(0,b.useEffect)(()=>{e&&K()},[e,K]);const fe=r(j=>{j.preventDefault(),!(!_.trim()||!F||$.isPending)&&$.mutate()},"submit"),Z=D?x.find(j=>j.id===D.issue.assigneeAgentId):null;return(0,s.jsx)(Te,{open:e,onOpenChange:t,children:(0,s.jsx)($e,{className:"sm:max-w-xl",onOpenAutoFocus:r(j=>{j.preventDefault(),J.current?.focus()},"onOpenAutoFocus"),children:D?(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)(oe,{children:[(0,s.jsxs)(le,{className:"flex items-center gap-2",children:[(0,s.jsx)(et,{className:"size-5 text-(--status-task-icon-done)","aria-hidden":"true"}),"Task created"]}),(0,s.jsxs)(ue,{children:[Z?`${Z.name} has it.`:"The agent has it."," It is filed under ",a.title,"."]})]}),(0,s.jsxs)(he,{to:V(D.issue),className:"flex items-baseline gap-2 rounded-md text-sm text-foreground underline-offset-4 hover:underline",onClick:r(()=>t(!1),"onClick"),children:[D.issue.identifier?(0,s.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:D.issue.identifier}):null,(0,s.jsx)("span",{children:D.issue.title})]}),(0,s.jsxs)(ie,{className:"sm:justify-between",children:[(0,s.jsx)(y,{variant:"ghost",onClick:r(()=>M(null),"onClick"),children:"Give another task"}),(0,s.jsx)(y,{onClick:r(()=>t(!1),"onClick"),children:"Done"})]})]}):(0,s.jsxs)("form",{className:"flex flex-col gap-5",onSubmit:fe,children:[(0,s.jsxs)(oe,{children:[(0,s.jsx)(le,{children:"New task for an agent"}),(0,s.jsxs)(ue,{children:["Creates a task under ",a.title," and gives it to the agent."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Who"}),(0,s.jsx)(ks,{value:F,groups:f,onValueChange:r(j=>m(j),"onValueChange"),placeholder:l.isPending?"Loading agents…":"Choose an agent",searchPlaceholder:"Search agents…",emptyMessage:"No agents can take this. Add an agent first.",loading:l.isPending,triggerAriaLabel:"Agent",disablePortal:!0}),c.kind==="error"?(0,s.jsx)(ds,{error:c.error,size:"inline",action:"load agents",onRetry:c.retry,retrying:c.isFetching}):null]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"How"}),(0,s.jsx)(As,{ariaLabel:"How the agent works",value:N,onValueChange:r(j=>T(j),"onValueChange"),options:Ft.map(j=>({value:j.value,title:j.title,description:j.description})),className:"sm:grid-cols-2"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-2 text-sm",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:"What to do"}),(0,s.jsx)(B,{ref:J,value:_,maxLength:200,placeholder:"e.g. Draft the investor update",onChange:r(j=>R(j.target.value),"onChange"),required:!0})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-2 text-sm",children:[(0,s.jsxs)("span",{className:"font-medium text-foreground",children:["Anything else ",(0,s.jsx)("span",{className:"font-normal text-muted-foreground",children:"(optional)"})]}),(0,s.jsx)(st,{rows:3,value:P,placeholder:"Context, constraints, or what done looks like",onChange:r(j=>O(j.target.value),"onChange")})]}),$.error?(0,s.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t create the task. ",U($.error).body]}):null,(0,s.jsxs)(ie,{className:"sm:justify-between",children:[(0,s.jsx)(y,{type:"button",variant:"ghost",onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),(0,s.jsx)(y,{type:"submit",disabled:!_.trim()||!F||$.isPending,children:$.isPending?"Creating task…":"Create task"})]})]})})})}r(wa,"ResponsibilityDelegateDialog");function Aa(e,t){const{search:n}=ps(),a=Ts(n,e),[i,o]=(0,b.useState)(null),u=(0,b.useCallback)(()=>o(null),[]);return{view:i??a??t,visiting:i!==null,visit:o,leave:u}}r(Aa,"usePageView");export{Cn as $,na as A,Wn as B,Vn as C,Js as D,Xs as E,oa as F,Gn as G,Un as H,ia as I,$n as J,Yn as K,Hn as L,ra as M,Jn as N,ea as O,ta as P,dt as Q,Bn as R,xt as S,Zn as T,qn as U,Kn as V,zn as W,In as X,Sn as Y,_n as Z,ca as _,fn as a,ht as at,la as b,pa as c,En as ct,xa as d,Fn as dt,Mn as et,ja as f,Is as ft,ha as g,ma as h,gn as i,On as it,aa as j,sa as k,ba as l,Rn as lt,fa as m,Ss as mt,wa as n,Pn as nt,ya as o,ct as ot,ga as p,Nn as pt,Gs as q,Na as r,Ln as rt,ka as s,Tn as st,Aa as t,Dn as tt,va as u,Ls as ut,ua as v,Xn as w,Qn as x,da as y,Us as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var S=Object.defineProperty;var d=(e,i)=>S(e,"name",{value:i,configurable:!0});import{a as T}from"./rolldown-runtime-DhZMWcEn.js";import{CE as q,GS as f,Jp as h,Um as M,nj as A,rb as w,xE as y,x_ as E}from"./index-
|
|
1
|
+
var S=Object.defineProperty;var d=(e,i)=>S(e,"name",{value:i,configurable:!0});import{a as T}from"./rolldown-runtime-DhZMWcEn.js";import{CE as q,GS as f,Jp as h,Um as M,nj as A,rb as w,xE as y,x_ as E}from"./index-BJtnP7H1.js";var _=T(A(),1);function x(e){return e.isDestructive?"destructive":e.isWrite?"write":"read"}d(x,"toolCapability");var P={read:"Read-only",write:"Makes changes",destructive:"Destructive"};function B(e,i,s){const a=new Map;for(const n of e){const o=n.applicationId??n.connectionId;let l=a.get(o);if(!l){const r=(n.applicationId?i.get(n.applicationId):null)??s.get(n.connectionId)??"Tools";l={appKey:o,applicationId:n.applicationId,connectionId:n.connectionId,name:r,tools:[]},a.set(o,l)}l.tools.push(n)}for(const n of a.values())n.tools.sort((o,l)=>o.toolName.localeCompare(l.toolName));return[...a.values()].sort((n,o)=>n.name.localeCompare(o.name))}d(B,"groupCatalogByApp");function k(e,i){if(!i||i.kind==="none")return new Set;if(i.kind==="all")return new Set(e.tools.map(a=>a.id));if(i.kind==="all_except"){const a=new Set(i.excluded);return new Set(e.tools.filter(n=>!a.has(n.id)).map(n=>n.id))}const s=new Set(i.included);return new Set(e.tools.filter(a=>s.has(a.id)).map(a=>a.id))}d(k,"selectedToolIds");function $(e,i,s){return k(e,i).has(s)}d($,"isToolSelected");function K(e,i){const s=k(e,i).size;return s===0?"unchecked":s===e.tools.length?"checked":"indeterminate"}d(K,"appCheckState");function z(e,i){const s=e.tools.length;if(K(e,i)==="unchecked")return"None selected";if(i?.kind==="all"||i?.kind==="all_except"&&i.excluded.length===0)return`All ${e.name} tools (${s})`;if(i?.kind==="all_except"){const a=i.excluded.length;return`All ${e.name} except ${a}`}return`${k(e,i).size} of ${s} ${e.name} tools`}d(z,"appSelectionLabel");function N(e,i){return K(e,i)==="unchecked"?{kind:"all"}:{kind:"none"}}d(N,"toggleApp");function j(e,i,s){const a=i??{kind:"none"},n=!k(e,a).has(s);if(a.kind==="all"||a.kind==="all_except"){const l=new Set(a.kind==="all_except"?a.excluded:[]);return n?l.delete(s):l.add(s),l.size===0?{kind:"all"}:l.size>=e.tools.length?{kind:"none"}:{kind:"all_except",excluded:e.tools.filter(r=>l.has(r.id)).map(r=>r.id)}}const o=new Set(a.kind==="some"?a.included:[]);return n?o.add(s):o.delete(s),o.size===0?{kind:"none"}:{kind:"some",included:e.tools.filter(l=>o.has(l.id)).map(l=>l.id)}}d(j,"toggleTool");function D(e,i,s=[],a="deny"){const n=[];for(const o of e){const l=i[o.appKey];if(l){if(a==="allow"){const r=k(o,l);for(const u of o.tools)r.has(u.id)||n.push({selectorType:"catalog_entry",effect:"exclude",catalogEntryId:u.id});continue}if(l.kind!=="none")if(l.kind==="all"||l.kind==="all_except"){if(o.applicationId?n.push({selectorType:"application",effect:"include",applicationId:o.applicationId}):n.push({selectorType:"connection",effect:"include",connectionId:o.connectionId}),l.kind==="all_except")for(const r of l.excluded)n.push({selectorType:"catalog_entry",effect:"exclude",catalogEntryId:r})}else for(const r of l.included)n.push({selectorType:"catalog_entry",effect:"include",catalogEntryId:r})}}for(const o of s)o.kind==="tool_name"?n.push({selectorType:"tool_name",effect:o.effect,toolName:o.value}):o.kind==="risk_level"?n.push({selectorType:"risk_level",effect:o.effect,riskLevel:o.riskLevel??"destructive"}):n.push({selectorType:"catalog_entry",effect:o.effect,catalogEntryId:o.value});return n}d(D,"buildEntries");function Q(e,i){const s={},a=[],n=new Map;for(const t of e)for(const p of t.tools)n.set(p.id,t.appKey);const o=new Map,l=new Map;for(const t of e)t.applicationId&&o.set(t.applicationId,t),l.set(t.connectionId,t);const r=new Set,u=new Map,g=new Map;for(const t of i){if(t.effect==="include"&&t.selectorType==="application"&&t.applicationId){const p=o.get(t.applicationId);p&&r.add(p.appKey);continue}if(t.effect==="include"&&t.selectorType==="connection"&&t.connectionId){const p=l.get(t.connectionId);p&&!p.applicationId?r.add(p.appKey):a.push({id:t.id,kind:"catalog_entry",value:t.connectionId,effect:"include"});continue}if(t.selectorType==="catalog_entry"&&t.catalogEntryId){const p=n.get(t.catalogEntryId);if(!p){a.push({id:t.id,kind:"catalog_entry",value:t.catalogEntryId,effect:t.effect});continue}const c=t.effect==="exclude"?u:g,m=c.get(p)??new Set;m.add(t.catalogEntryId),c.set(p,m);continue}if(t.selectorType==="tool_name"&&t.toolName){a.push({id:t.id,kind:"tool_name",value:t.toolName,effect:t.effect});continue}if(t.selectorType==="risk_level"&&t.riskLevel){a.push({id:t.id,kind:"risk_level",value:t.riskLevel,riskLevel:t.riskLevel,effect:t.effect});continue}}for(const t of e){const p=r.has(t.appKey),c=[...u.get(t.appKey)??[]].filter(v=>t.tools.some(I=>I.id===v)),m=[...g.get(t.appKey)??[]].filter(v=>t.tools.some(I=>I.id===v));p?s[t.appKey]=c.length>0?{kind:"all_except",excluded:c}:{kind:"all"}:m.length>0?s[t.appKey]={kind:"some",included:m}:s[t.appKey]={kind:"none"}}return{selections:s,advancedRules:a}}d(Q,"parseEntries");function R(e,i,s,a){if(s==="allow"){let o=0;for(const l of e){const r=i[l.appKey];r?.kind==="all_except"?o+=r.excluded.length:r?.kind==="some"?o+=l.tools.length-r.included.length:r?.kind==="none"&&(o+=l.tools.length)}return{allowed:Math.max(0,a-o),total:a}}let n=0;for(const o of e)n+=k(o,i[o.appKey]).size;return{allowed:n,total:a}}d(R,"countAllowedTools");var G=[{key:"read_only",title:"Read-only",description:"See and fetch, but never change anything."},{key:"everyday",title:"Everyday work",description:"Read and make routine changes — no destructive tools."},{key:"full_access",title:"Full access",description:"Everything every connected app offers."},{key:"scratch",title:"Start from scratch",description:"An empty profile you build up tool by tool."},{key:"copy",title:"Copy an existing profile",description:"Start from a profile you already have."}];function L(e){return e==="read_only"?i=>x(i)==="read":e==="everyday"?i=>x(i)!=="destructive":()=>!0}d(L,"capabilityPredicate");function J(e,i){const s={};if(e==="scratch"||e==="copy"){for(const n of i)s[n.appKey]={kind:"none"};return s}const a=L(e);for(const n of i){const o=n.tools.filter(a).map(l=>l.id);o.length===0?s[n.appKey]={kind:"none"}:o.length===n.tools.length?s[n.appKey]={kind:"all"}:s[n.appKey]={kind:"some",included:o}}return s}d(J,"templateSelections");function O(e){return{profiles:y({queryKey:[...f.tools.profiles(e),"summary"],queryFn:d(()=>h.listProfileSummaries(e),"queryFn")}),agents:y({queryKey:f.agents.list(e),queryFn:d(()=>w.list(e),"queryFn")})}}d(O,"useProfileIndexData");function U(e){const i=y({queryKey:f.tools.profiles(e),queryFn:d(()=>h.listProfiles(e),"queryFn")}),s=y({queryKey:f.tools.applications(e),queryFn:d(()=>h.listApplications(e),"queryFn")}),a=y({queryKey:f.tools.connections(e),queryFn:d(()=>h.listConnections(e),"queryFn")}),n=y({queryKey:f.agents.list(e),queryFn:d(()=>w.list(e),"queryFn")}),o=y({...E(e)}),l=y({queryKey:f.routines.list(e),queryFn:d(()=>M.list(e),"queryFn")}),r=a.data?.connections??[],u=q({queries:r.map(c=>({queryKey:f.tools.catalog(c.id),queryFn:d(()=>h.listCatalog(c.id),"queryFn"),staleTime:6e4}))}),g=(0,_.useMemo)(()=>u.flatMap(c=>c.data?.catalog??[]),[u]),t=a.isLoading||u.some(c=>c.isLoading),p=(0,_.useMemo)(()=>({applicationsById:new Map((s.data?.applications??[]).map(c=>[c.id,c.name])),connectionsById:new Map(r.map(c=>[c.id,c.name])),agentsById:new Map((n.data??[]).map(c=>[c.id,c.name])),projectsById:new Map((o.data??[]).map(c=>[c.id,c.name])),routinesById:new Map((l.data??[]).map(c=>[c.id,c.title]))}),[s.data,r,n.data,o.data,l.data]);return{profiles:i,applications:s,connections:a,agents:n,projects:o,routines:l,catalog:g,catalogLoading:t,appGroups:(0,_.useMemo)(()=>B(g,p.applicationsById,p.connectionsById),[g,p.applicationsById,p.connectionsById]),maps:p}}d(U,"useProfilesData");export{K as a,R as c,J as d,N as f,G as i,$ as l,x as m,U as n,z as o,j as p,P as r,D as s,O as t,Q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var r=Object.defineProperty;var n=(t,e)=>r(t,"name",{value:e,configurable:!0});import{a as i}from"./rolldown-runtime-DhZMWcEn.js";import{GS as u,Jp as c,LS as p,nj as m,rO as d,xE as l}from"./index-
|
|
1
|
+
var r=Object.defineProperty;var n=(t,e)=>r(t,"name",{value:e,configurable:!0});import{a as i}from"./rolldown-runtime-DhZMWcEn.js";import{GS as u,Jp as c,LS as p,nj as m,rO as d,xE as l}from"./index-BJtnP7H1.js";var y=i(m(),1);function v(){const{selectedCompanyId:t}=p(),e=l({queryKey:u.tools.actionRequests(t??"__none__","pending"),queryFn:n(()=>c.listActionRequests(t,"pending"),"queryFn"),enabled:!!t,refetchInterval:2e4}).data?.actionRequests,s=(0,y.useMemo)(()=>{const a=new Set;for(const o of e??[])o.applicationName&&a.add(d(o.applicationName));return[...a]},[e]);return{count:e?.length??0,loaded:e!==void 0,apps:s}}n(v,"useReviewQueue");export{v as t};
|