@inkeep/open-knowledge 0.52.0-beta.5 → 0.52.0-beta.6
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/{acp-harness-probe-B82BNHVD.mjs → acp-harness-probe-Oco-vzbb.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-C3LdY4-b.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-DyTIhXDy.mjs → init-3ynssnTV.mjs} +3 -3
- package/dist/init-Djv0aq5j.mjs +1 -0
- package/dist/{launch-json-removal-C9gwkhKJ.mjs → launch-json-removal-CPurK0jD.mjs} +2 -2
- package/dist/loader-Cwl2ZS4i.mjs +1 -0
- package/dist/{loader-BwmZkCIK.mjs → loader-DAruuWzH.mjs} +2 -2
- package/dist/{preview-BARW59Yd.mjs → preview-CC6sojTR.mjs} +2 -2
- package/dist/preview-CYRkVM0P.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-rgEhhGgw.js → ActivityModeContent-BrdwpjRB.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DtG18o1u.js → AgentDiffPane-D56wAlnw.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DkD2M_dd.js → AgentThreadClientBinder-Bq0gVhV7.js} +1 -1
- package/dist/public/assets/{BugReportHistory-C59fSH13.js → BugReportHistory-CDRTpJV0.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-C2b4xA3d.js → BugReportHistoryDialog--YdGm_GJ.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-DdpCQcxq.js → ChangedOutsideBadge-6xW5IDHL.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-D11rfM17.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-4T5uhyyt.js → ConfigSharingInfoTooltip-CuqrTakc.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-DfhGpXdb.js → ConsentDialogBody-CmMu4IpT.js} +1 -1
- package/dist/public/assets/{DiffView-C-imhjB8.js → DiffView-BcZip7m3.js} +1 -1
- package/dist/public/assets/{DocumentContext-BN8gSwJ-.js → DocumentContext-DCB_2FMP.js} +10 -10
- package/dist/public/assets/{EditorModeToggle-CrnEz11k.js → EditorModeToggle-Big-nZpB.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-623sSYbd.js → EnableSyncConfirmDialog-Dnl12e_9.js} +1 -1
- package/dist/public/assets/FeedbackForm-goeo0WLf.js +1 -0
- package/dist/public/assets/{GraphPanel-C-3KrSdC.js → GraphPanel-BxgcJTL5.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-B7gKx_GY.js → ImportSkillDialog-Dxe9uGaK.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-B-XaVu0m.js → LintConfigEditor-3U8aK9da.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-Bn-na6ua.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-DQMTHKMr.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-BS3RE3LY.js → McpConsentDialogBody-Dt3X7boO.js} +1 -1
- package/dist/public/assets/{Mermaid-BHfANkja.js → Mermaid-mUyEEsA0.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-CI90q10w.js → MermaidDocEditor-d-Wp_Ka_.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-gjOJZp_B.js → RegisteredAgentIcon-BxpJAHOj.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BWXO0gto.js → ReportBugDialogBody-w6ZUZtd9.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-eh-ijdLu.js → SchemaConfigEditor-FYNlbIie.js} +1 -1
- package/dist/public/assets/{SessionsHost-BOgQOcv6.js → SessionsHost-BUC4h4T5.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-BAUPvgPO.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-DpmQmmrq.js → ShareBranchSwitchDialog-BMXRhCIc.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-C3fS1Ax2.js → ShareReceiveDialog-D8o-97rY.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DzeOwnyS.js → ShareReceiveMissDialog-DPKorVX0.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DGB_nnDm.js → SkillEditBanner-BpiKPrLW.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-C4x3nMIH.js → SkillOriginInline-C1YncGFC.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DXBGIWug.js → SkillToolbarControls-DMHQY-lw.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-Buv-SEot.js → SlidesToolbarControls-DNGGM8G-.js} +1 -1
- package/dist/public/assets/{SourceEditor-B64VJl_F.js → SourceEditor-Bt93LccY.js} +1 -1
- package/dist/public/assets/{TerminalPanel-Bch10p1r.js → TerminalPanel-c_g1B919.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-s4mNyUki.js → TerminalWindowApp-QRDsxPvH.js} +1 -1
- package/dist/public/assets/{TextDocEditor-DtDvo7eF.js → TextDocEditor-CGo9TVsr.js} +1 -1
- package/dist/public/assets/{ThreadView-CGOz1ms_.js → ThreadView-D4m34cEL.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-B7aD7QN-.js → TimelineDiffPane-DLergBgi.js} +1 -1
- package/dist/public/assets/{agent-diff-store-BJiYj2BI.js → agent-diff-store-DvvlIWsW.js} +1 -1
- package/dist/public/assets/{auth-state-cache-5wocICj2.js → auth-state-cache-se0_UkK4.js} +3 -3
- package/dist/public/assets/{checkbox-vidgONxv.js → checkbox-Bxl4H4lV.js} +1 -1
- package/dist/public/assets/{client-version---DsZj2h.js → client-version-Cv0iyIKr.js} +1 -1
- package/dist/public/assets/{cm-theme-DZT10ikr.js → cm-theme-BygK2tYf.js} +1 -1
- package/dist/public/assets/{comment-chips-BjkVSykR.js → comment-chips-DTAZbaPZ.js} +1 -1
- package/dist/public/assets/{config-provider-DGQwNZtP.js → config-provider-cC1aAoqP.js} +3 -3
- package/dist/public/assets/{dialog-DztIj-ZS.js → dialog-R8GugqUq.js} +1 -1
- package/dist/public/assets/{dist-BgBcg3TP.js → dist-BE8rPie-.js} +1 -1
- package/dist/public/assets/{dist-CkFATl39.js → dist-BR5M-SiF.js} +1 -1
- package/dist/public/assets/{dist-DfLFtHzK.js → dist-BTo1AB3U.js} +1 -1
- package/dist/public/assets/{dist-BRmJz2fY.js → dist-BZW14CKf.js} +1 -1
- package/dist/public/assets/{dist-z-y_5Bgj.js → dist-CElLQlwI.js} +1 -1
- package/dist/public/assets/{dist-DsH7eETa.js → dist-CUhsr-gg.js} +1 -1
- package/dist/public/assets/{dist-dO0W-CVt.js → dist-CcIAtWVJ.js} +1 -1
- package/dist/public/assets/{dist-DM6osNK2.js → dist-Cfmj7R4I.js} +1 -1
- package/dist/public/assets/{dist-ofeGnIBD.js → dist-D7MIhDGJ.js} +1 -1
- package/dist/public/assets/{dist-DQyQPRvE.js → dist-DBhufbLS.js} +1 -1
- package/dist/public/assets/{dist-GenOktAv.js → dist-DPUOICsM.js} +183 -183
- package/dist/public/assets/{dist-BVpMlVG3.js → dist-DRufJFR7.js} +1 -1
- package/dist/public/assets/{dist-BiwzWInZ.js → dist-Dm-VLxvd.js} +1 -1
- package/dist/public/assets/{doc-paths-CB3USVY1.js → doc-paths-6W3B04qd.js} +1 -1
- package/dist/public/assets/{documents-events-rgFBXE2Z.js → documents-events-CFb6q7t5.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-4JTjxhHS.js → file-tree-adapter-DhmmoAjL.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CYn1f82_.js → file-tree-utils-Dua-6LtX.js} +1 -1
- package/dist/public/assets/{folder-config-api-ByqyyP9w.js → folder-config-api-CrrPk9A0.js} +1 -1
- package/dist/public/assets/{follow-file-kuGZjRsi.js → follow-file-K86Sp_6-.js} +1 -1
- package/dist/public/assets/i18n-BnkAuR_3.js +1 -0
- package/dist/public/assets/{index-DmXrGqKD.js → index-Bme5x35Q.js} +17 -17
- package/dist/public/assets/{input-group-BiaQ-rIw.js → input-group-ClrIuhWi.js} +1 -1
- package/dist/public/assets/{lint-config-client-DydgEnDK.js → lint-config-client-DPwH-VHu.js} +1 -1
- package/dist/public/assets/lint-plugin-meta-CsGPauME.js +1 -0
- package/dist/public/assets/{markdownlint-rule-browser-DwEGxp2H.js → markdownlint-rule-browser-BdGLlEVb.js} +1 -1
- package/dist/public/assets/messages-B6wDP6_L.js +1 -0
- package/dist/public/assets/messages-BS6hWxWK.js +1 -0
- package/dist/public/assets/messages-Bg44_w_B.js +1 -0
- package/dist/public/assets/messages-D9hQcSkC.js +1 -0
- package/dist/public/assets/messages-DAPhT0w6.js +1 -0
- package/dist/public/assets/messages-DaVac3jo.js +1 -0
- package/dist/public/assets/messages-Dbqu7ts9.js +1 -0
- package/dist/public/assets/messages-DdoJCt_r.js +1 -0
- package/dist/public/assets/messages-Djc_MIS0.js +1 -0
- package/dist/public/assets/messages-DmHqd1yQ.js +1 -0
- package/dist/public/assets/messages-xKq8BSm6.js +1 -0
- package/dist/public/assets/navigation-targets-DSqzY6pU.js +1 -0
- package/dist/public/assets/{open-managed-artifact-tab-DpfEVLG-.js → open-managed-artifact-tab-Cojj8juW.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-BHeTqy0Z.js → pending-receive-nav-store-wVA1ZjL8.js} +1 -1
- package/dist/public/assets/{project-paths-_w2mRvRX.js → project-paths-DOOtPmjl.js} +1 -1
- package/dist/public/assets/{prop-types-ClS-DLuz.js → prop-types-7a0cKWM0.js} +1 -1
- package/dist/public/assets/{receive-store-R5sEQn80.js → receive-store-CFEx5X5f.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-DiE8NL9y.js → schema-fields-view-intent-D0jz38_6.js} +1 -1
- package/dist/public/assets/{selection-context-CHJ-gfRx.js → selection-context-Bq_81z9T.js} +1 -1
- package/dist/public/assets/{skill-actions-B9BGbzJZ.js → skill-actions-BfBwH98z.js} +2 -2
- package/dist/public/assets/{skill-scope-CFwClOyk.js → skill-scope-TY2S7Be7.js} +1 -1
- package/dist/public/assets/{skills-api-B41p5sp3.js → skills-api-OBRuLm8a.js} +1 -1
- package/dist/public/assets/{src-gXOrH5MP.js → src-CDup1x-i.js} +1 -1
- package/dist/public/assets/{tag-pill-input-BTKlFD92.js → tag-pill-input-CIUq78uG.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CIjVZTkZ.js → target-navigation-intent-TFQElcz0.js} +1 -1
- package/dist/public/assets/{telemetry-startup-C8JOSRcr.js → telemetry-startup-htUA83Zn.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-CW7j5kqb.js → terminal-cli-display-DphQFt7y.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-CW7Dk9L6.js → terminal-launch-events-CkYhv0hD.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CxkpCpp5.js → terminal-telemetry-BrUGs0cG.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-oVDGEYYY.js → text-viewer-languages-epnUVwhY.js} +2 -2
- package/dist/public/assets/{typing-burst-detector-fIHJv2J1.js → typing-burst-detector-3ZZiF2mv.js} +4 -4
- package/dist/public/assets/{uninstall-CYpAgTNE.js → uninstall-ocJf-hjC.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BEnqyFcJ.js → use-activity-panel-B8mUHgso.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-Dw8J4H8Z.js → use-apply-config-color-theme-C68-iamG.js} +1 -1
- package/dist/public/assets/{use-collab-url-CbdhvhFJ.js → use-collab-url-CJzhnqks.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-B_qB957b.js → use-live-xterm-theme-BnbloOyE.js} +1 -1
- package/dist/public/assets/{use-open-skill-Ca4D1I53.js → use-open-skill-BQ_vHG4k.js} +1 -1
- package/dist/public/assets/{use-popular-skills-ByV4BHXd.js → use-popular-skills-DOSbQRlG.js} +1 -1
- package/dist/public/assets/{use-settings-route-4qI--CpZ.js → use-settings-route-Cv-ibnUF.js} +1 -1
- package/dist/public/assets/{use-skill-origin-DGj0sj4C.js → use-skill-origin-clrL7XV6.js} +1 -1
- package/dist/public/assets/{use-skills-WWbAKl3q.js → use-skills-BDWr4yYQ.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-Dz_qAFuD.js → use-terminal-enabled-CRhATtRE.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-C3vXYWPC.js +6 -0
- package/dist/public/assets/{use-workspace-BRfhPAI8.js → use-workspace-DNFQbKXx.js} +1 -1
- package/dist/public/index.html +102 -102
- package/dist/public/uninstall.html +10 -10
- package/dist/{repair-launch-json-zI-mBgW_.mjs → repair-launch-json-mJ3Ye_Mw.mjs} +2 -2
- package/dist/{repair-mcp-configs-WM4SJK2A.mjs → repair-mcp-configs-BeS1bCUD.mjs} +2 -2
- package/dist/src-DDuAov3v.mjs +1 -0
- package/dist/{src-te5DY9Ox.mjs → src-Dc3F4mTO.mjs} +2 -2
- package/dist/start-B0EAId8s.mjs +1 -0
- package/dist/{start-Cd0u3yrx.mjs → start-Coiq5FC4.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-j7LiQjjD.mjs +0 -2
- package/dist/init-CNfHIYix.mjs +0 -1
- package/dist/loader-Cby9ww2X.mjs +0 -1
- package/dist/preview-CUquHJiS.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-Cydg0jHr.js +0 -3
- package/dist/public/assets/FeedbackForm-CiQQiFp-.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CUMQh4tz.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-iclZPRJv.js +0 -2
- package/dist/public/assets/SettingsDialogBody-BaYDHshm.js +0 -12
- package/dist/public/assets/i18n-CrYaxckE.js +0 -1
- package/dist/public/assets/lint-plugin-meta-FPoTE-0t.js +0 -1
- package/dist/public/assets/messages-7cAk2vbZ.js +0 -1
- package/dist/public/assets/messages-BNv51jKY.js +0 -1
- package/dist/public/assets/messages-BS_zCLy8.js +0 -1
- package/dist/public/assets/messages-BmYExk_R.js +0 -1
- package/dist/public/assets/messages-C3vvvgBK.js +0 -1
- package/dist/public/assets/messages-CmD7dBQ3.js +0 -1
- package/dist/public/assets/messages-CpVNkvrj.js +0 -1
- package/dist/public/assets/messages-CxF28E4J.js +0 -1
- package/dist/public/assets/messages-D9UyuwOS.js +0 -1
- package/dist/public/assets/messages-DQ5yKIrs.js +0 -1
- package/dist/public/assets/messages-DdBrUUBf.js +0 -1
- package/dist/public/assets/navigation-targets-iVnea4YK.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-RrvwSA9l.js +0 -6
- package/dist/src-Czloc6k1.mjs +0 -1
- package/dist/start-_lvmR0Ig.mjs +0 -1
- /package/dist/public/assets/{CopyButton-ByR_1gcU.js → CopyButton-CKyZY1PL.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-Cz1weVX3.js → asset-dispatch-Ccnji1rt.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-BYOv6_8O.js → auth-prompt-store-C4YJf5De.js} +0 -0
- /package/dist/public/assets/{badge-DFX4S3a5.js → badge-BYteLKha.js} +0 -0
- /package/dist/public/assets/{copilot-Dh1BU6kS.js → copilot-CmkvU8CH.js} +0 -0
- /package/dist/public/assets/{cursor-B6reg1lS.js → cursor-CIl_AjI1.js} +0 -0
- /package/dist/public/assets/{dist-DAqA-GDU.js → dist-sSZdzHur.js} +0 -0
- /package/dist/public/assets/{documents-fetch-CV8lWh8v.js → documents-fetch-DnpUYK4R.js} +0 -0
- /package/dist/public/assets/{download-C3PYuI1f.js → download-Dn5ulvxm.js} +0 -0
- /package/dist/public/assets/{external-link-BIMZpgNa.js → external-link-3El87eIe.js} +0 -0
- /package/dist/public/assets/{eye-CSz7ogHo.js → eye-DmhHKPNd.js} +0 -0
- /package/dist/public/assets/{field-CtVP3IIV.js → field-CvwbVfuf.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-CCqiFGp1.js → file-tree-rename-validation-C2Ibtqn6.js} +0 -0
- /package/dist/public/assets/{folder-CopDpuy5.js → folder-CWlDik9N.js} +0 -0
- /package/dist/public/assets/{folder-open-DUSc8NL8.js → folder-open-BTTec8yg.js} +0 -0
- /package/dist/public/assets/{hash-DI30zEBt.js → hash-PyoMEEnH.js} +0 -0
- /package/dist/public/assets/{info-CV59RycV.js → info-w0kv2CeC.js} +0 -0
- /package/dist/public/assets/{input-BYiOK210.js → input-BFt4qZaV.js} +0 -0
- /package/dist/public/assets/{list-plus-DBdmIc6v.js → list-plus-2r7_ATZj.js} +0 -0
- /package/dist/public/assets/{minus-D07ZsfDZ.js → minus-DNhR60ON.js} +0 -0
- /package/dist/public/assets/{miss-dialog-store-sSyy54tn.js → miss-dialog-store-DzXIxgCB.js} +0 -0
- /package/dist/public/assets/{panel-CbGx_cRv.js → panel-D2VXQC58.js} +0 -0
- /package/dist/public/assets/{panel-right-open-B66oA9M1.js → panel-right-open-DAyUhiQN.js} +0 -0
- /package/dist/public/assets/{paperclip-BlKB6Xwa.js → paperclip-B6sgPA4f.js} +0 -0
- /package/dist/public/assets/{refresh-cw-DQervzDZ.js → refresh-cw-CR2QWccs.js} +0 -0
- /package/dist/public/assets/{spinner-BqySY7qY.js → spinner-CHTY-VE-.js} +0 -0
- /package/dist/public/assets/{square-pen-Cb57Y3fg.js → square-pen-DdAKbKU7.js} +0 -0
- /package/dist/public/assets/{startup-marks-Cdkh8q3E.js → startup-marks-CTM7uDIJ.js} +0 -0
- /package/dist/public/assets/{stex-PMopVeEZ.js → stex-s_JxeNEZ.js} +0 -0
- /package/dist/public/assets/{terminal-Cvoe7pfU.js → terminal-DRi0ugpC.js} +0 -0
- /package/dist/public/assets/{textarea-yZk4yd9U.js → textarea-CzW0aR0j.js} +0 -0
- /package/dist/public/assets/{trash-2-N0ilsnnr.js → trash-2-BWJWOK8-.js} +0 -0
- /package/dist/public/assets/{triangle-alert-COo6wbUK.js → triangle-alert-DV20-jn9.js} +0 -0
- /package/dist/public/assets/{undo-2-WGCwknr8.js → undo-2-CMyZc9mZ.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-Cydpb5jd.js → use-installed-clis-DmyaQmU9.js} +0 -0
- /package/dist/public/assets/{wrench-CP2MIQHF.js → wrench-C3BL-uHg.js} +0 -0
- /package/dist/public/assets/{x-DS57FvHW.js → x-BaJrHZK_.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as e,ft as t,l as n,m as r,u as i}from"./sleep-A0G7hOuG.mjs";import{Vs as a}from"./src-RGB2pEts.mjs";import{_ as o}from"./src-BVxZYLJj.mjs";import{I as s,k as c}from"./fs-traced-DV9uD41t.mjs";import{t as l}from"./constants-
|
|
2
|
-
//# sourceMappingURL=loader-
|
|
1
|
+
import{d as e,ft as t,l as n,m as r,u as i}from"./sleep-A0G7hOuG.mjs";import{Vs as a}from"./src-RGB2pEts.mjs";import{_ as o}from"./src-BVxZYLJj.mjs";import{I as s,k as c}from"./fs-traced-DV9uD41t.mjs";import{t as l}from"./constants-C3LdY4-b.mjs";import{t as u}from"./is-object-ByG7RnjH.mjs";import{resolve as d}from"node:path";import{existsSync as f,readFileSync as p}from"node:fs";import{realpath as m}from"node:fs/promises";var h=t();async function g(e){let t=d(e);try{return await m(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function _(e){if(!f(e))return{value:null,path:e,source:null,doc:null};let t;try{t=p(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,h.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function v(t,n){return t.map(t=>{let r=t.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:t.message,issueCode:t.code};if(n.doc!==null&&n.source!==null){let t=e({file:n.path,source:n.source,doc:n.doc,path:r});if(t!==void 0)return{...i,source:t}}return i})}function y(e){let t=e??process.cwd(),u=[],f=[],p=[],m=c(`user`,t),h=s({absPath:m});f.push(...h.diagnostics),!h.valid&&h.sidelinedTo!==void 0&&p.push({from:m,to:h.sidelinedTo}),h.valid&&h.source!==void 0&&u.push(m);let g=e=>{let t=_(e);if(t.diagnostic!==void 0&&f.push(t.diagnostic),t.value===null)return{};let r=n({value:t.value,file:t.path,source:t.source,doc:t.doc});return f.push(...r),u.push(e),r.length>0?i(t.value):t.value},y=d(t,`.ok`,l),b=g(y),x=g(c(`project-local`,t)),S=a(h.value,b,x),C=o.safeParse(S);if(!C.success){let e=_(y),t={code:`SCHEMA_INVALID`,issues:v(C.error.issues,e)};throw Error(r(t))}return{config:C.data,sources:u,diagnostics:f,sidelined:p}}function b(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??y,r=new Map,i=new Map,a=g(e.startupCwd);return async o=>{let s=await g(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{y as n,b as t};
|
|
2
|
+
//# sourceMappingURL=loader-DAruuWzH.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Vr as e}from"./src-BVxZYLJj.mjs";import"./constants-
|
|
1
|
+
import{Vr as e}from"./src-BVxZYLJj.mjs";import"./constants-C3LdY4-b.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);return a.push(``),r(t(i,`.ok`,`config.yml`))?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-CC6sojTR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-CC6sojTR.mjs";export{t as formatPreviewBlock,e as previewContent};
|
package/dist/public/assets/{ActivityModeContent-rgEhhGgw.js → ActivityModeContent-BrdwpjRB.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{a as n,o as r}from"./DocumentContext-BN8gSwJ-.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./button-CA0dewJJ.js";import{i as l,n as u,t as d}from"./tooltip-DHXgxWLL.js";import{a as f,c as p,i as m,o as h,s as g,t as _}from"./dialog-DztIj-ZS.js";import{t as v}from"./dist-DUfEoSbR.js";import{n as y}from"./dist-B6jB2qbD2.js";import{c as b}from"./Mermaid-BHfANkja.js";import{r as x}from"./CopyButton-ByR_1gcU.js";import{i as S}from"./prop-types-ClS-DLuz.js";import{t as C}from"./spinner-BqySY7qY.js";import{t as w}from"./undo-2-WGCwknr8.js";import{c as T}from"./navigation-targets-iVnea4YK.js";import{a as E,i as D,n as O,o as k,t as A}from"./agent-diff-store-BJiYj2BI.js";import{t as j}from"./timeline-diff-store-DnRthkM7.js";import{n as M}from"./use-activity-panel-BEnqyFcJ.js";var N=s(),P=e(i(),1),F=t();function I(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function ee(e){let t=(0,N.c)(86),{burst:n,docName:r,editCount:i,sessionAlive:s,inFlight:v,onOpenDiff:y,onRestore:b}=e,{_:x}=o(),[S,T]=(0,P.useState)(te),D,O;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{let e=setInterval(()=>T(Date.now()),3e4);return()=>clearInterval(e)},O=[],t[0]=D,t[1]=O):(D=t[0],O=t[1]),(0,P.useEffect)(D,O);let[k,A]=(0,P.useState)(!1),j=E(),M=n.stackIndex+1,ee=j?.docName===r&&j.keptCount===M,L=i-M,ne=!s||v||L<=0,re;t[2]!==L||t[3]!==b?(re=function(){A(!1),b(L)},t[2]=L,t[3]=b,t[4]=re):re=t[4];let ie=re,R;t[5]!==n||t[6]!==y?(R=()=>y(n),t[5]=n,t[6]=y,t[7]=R):R=t[7];let z;t[8]!==x||t[9]!==M||t[10]!==r?(z=x({id:`Z79bnE`,values:{burstNumber:M,docName:r}}),t[8]=x,t[9]=M,t[10]=r,t[11]=z):z=t[11];let ae=ee?`bg-muted`:`hover:bg-muted/40`,oe;t[12]===ae?oe=t[13]:(oe=[`flex min-w-0 flex-1 items-center gap-2 px-4 py-1.5 text-xs text-muted-foreground transition-colors`,ae],t[12]=ae,t[13]=oe);let se=oe.join(` `),B;t[14]!==n.ts||t[15]!==S?(B=I(n.ts,S),t[14]=n.ts,t[15]=S,t[16]=B):B=t[16];let V;t[17]===B?V=t[18]:(V=(0,F.jsx)(`span`,{className:`font-mono`,children:B}),t[17]=B,t[18]=V);let H;t[19]===n.additions?H=t[20]:(H=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additions]}),t[19]=n.additions,t[20]=H);let U;t[21]===n.deletions?U=t[22]:(U=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletions]}),t[21]=n.deletions,t[22]=U);let W;t[23]!==H||t[24]!==U?(W=(0,F.jsxs)(`span`,{className:`ml-auto font-mono`,children:[H,` `,U]}),t[23]=H,t[24]=U,t[25]=W):W=t[25];let G;t[26]!==ee||t[27]!==V||t[28]!==W||t[29]!==R||t[30]!==z||t[31]!==se?(G=(0,F.jsxs)(`button`,{type:`button`,onClick:R,"aria-pressed":ee,"aria-label":z,"data-testid":`activity-panel-burst-open`,className:se,children:[V,W]}),t[26]=ee,t[27]=V,t[28]=W,t[29]=R,t[30]=z,t[31]=se,t[32]=G):G=t[32];let ce;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1.5 h-3 w-px shrink-0 bg-border`}),t[33]=ce):ce=t[33];let K;t[34]!==x||t[35]!==M||t[36]!==r?(K=x({id:`Zhe80e`,values:{burstNumber:M,docName:r}}),t[34]=x,t[35]=M,t[36]=r,t[37]=K):K=t[37];let le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>A(!0),t[38]=le):le=t[38];let q;t[39]===v?q=t[40]:(q=v?(0,F.jsx)(C,{className:`size-3`,"aria-hidden":`true`}):(0,F.jsx)(w,{className:`size-3`,"aria-hidden":`true`}),t[39]=v,t[40]=q);let J;t[41]!==ne||t[42]!==K||t[43]!==q?(J=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`activity-panel-burst-restore`,"aria-label":K,disabled:ne,onClick:le,children:q})}),t[41]=ne,t[42]=K,t[43]=q,t[44]=J):J=t[44];let Y;t[45]!==x||t[46]!==L||t[47]!==s?(Y=x(s?L>0?{id:`SOPwPh`}:{id:`62bOuM`}:{id:`NzFvyK`}),t[45]=x,t[46]=L,t[47]=s,t[48]=Y):Y=t[48];let X;t[49]===Y?X=t[50]:(X=(0,F.jsx)(u,{side:`left`,children:Y}),t[49]=Y,t[50]=X);let Z;t[51]!==J||t[52]!==X?(Z=(0,F.jsxs)(d,{children:[J,X]}),t[51]=J,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==G||t[55]!==Z?(Q=(0,F.jsxs)(`div`,{className:`flex items-center border-t border-border/50 pr-3`,children:[G,ce,Z]}),t[54]=G,t[55]=Z,t[56]=Q):Q=t[56];let ue;t[57]===v?ue=t[58]:(ue=e=>{!e&&!v?A(!1):e&&A(!0)},t[57]=v,t[58]=ue);let de;t[59]===x?de=t[60]:(de=x({id:`a4FRQv`}),t[59]=x,t[60]=de);let fe;t[61]===de?fe=t[62]:(fe=(0,F.jsx)(p,{children:de}),t[61]=de,t[62]=fe);let pe;t[63]===L?pe=t[64]:(pe=(0,F.jsx)(f,{children:(0,F.jsx)(a,{id:`LKIPzv`,values:{laterEdits:L}})}),t[63]=L,t[64]=pe);let $;t[65]!==fe||t[66]!==pe?($=(0,F.jsxs)(g,{children:[fe,pe]}),t[65]=fe,t[66]=pe,t[67]=$):$=t[67];let me;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,F.jsx)(c,{variant:`outline`,"data-testid":`activity-panel-burst-restore-cancel`,onClick:()=>A(!1),children:(0,F.jsx)(a,{id:`dEgA5A`})}),t[68]=me):me=t[68];let he;t[69]===v?he=t[70]:(he=v?(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}):null,t[69]=v,t[70]=he);let ge;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,F.jsx)(a,{id:`9uI_rE`}),t[71]=ge):ge=t[71];let _e;t[72]!==ie||t[73]!==v||t[74]!==he?(_e=(0,F.jsxs)(h,{children:[me,(0,F.jsxs)(c,{variant:`destructive`,"data-testid":`activity-panel-burst-restore-confirm`,disabled:v,onClick:ie,children:[he,ge]})]}),t[72]=ie,t[73]=v,t[74]=he,t[75]=_e):_e=t[75];let ve;t[76]!==$||t[77]!==_e?(ve=(0,F.jsxs)(m,{children:[$,_e]}),t[76]=$,t[77]=_e,t[78]=ve):ve=t[78];let ye;t[79]!==k||t[80]!==ue||t[81]!==ve?(ye=(0,F.jsx)(_,{open:k,onOpenChange:ue,children:ve}),t[79]=k,t[80]=ue,t[81]=ve,t[82]=ye):ye=t[82];let be;return t[83]!==Q||t[84]!==ye?(be=(0,F.jsxs)(F.Fragment,{children:[Q,ye]}),t[83]=Q,t[84]=ye,t[85]=be):be=t[85],be}function te(){return Date.now()}function L(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let r=Math.round(n/36e5);return v._({id:`nYeBmY`,values:{hours:r}})}function ne(e){let t=(0,N.c)(56),{file:n,sessionAlive:r,isWriting:i,onNavigate:s,onUndoDrop:c,onSetVersion:l}=e,{_:u}=o(),{docName:d}=n,[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(re),g,_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{let e=setInterval(()=>h(Date.now()),3e4);return()=>clearInterval(e)},_=[],t[0]=g,t[1]=_):(g=t[0],_=t[1]),(0,P.useEffect)(g,_);let v=n.bursts.length,y;t[2]!==n.docName||t[3]!==c||t[4]!==r||t[5]!==f?(y=e=>{e<=0||!r||f||(p(!0),Promise.resolve(c(n.docName,e)).finally(()=>{p(!1),A()}))},t[2]=n.docName,t[3]=c,t[4]=r,t[5]=f,t[6]=y):y=t[6];let b=y;if(n.bursts.length===0)return null;let x;t[7]!==n.docName||t[8]!==s?(x=()=>s(n.docName),t[7]=n.docName,t[8]=s,t[9]=x):x=t[9];let S;t[10]!==u||t[11]!==d?(S=u({id:`QcpeeE`,values:{docName:d}}),t[10]=u,t[11]=d,t[12]=S):S=t[12];let C;t[13]!==n.docName||t[14]!==x||t[15]!==S?(C=(0,F.jsx)(`button`,{type:`button`,onClick:x,className:`min-w-0 flex-1 truncate text-left text-foreground hover:underline focus-visible:outline-ring`,"aria-label":S,"data-testid":`activity-panel-file-row-filename`,title:n.docName,children:n.docName}),t[13]=n.docName,t[14]=x,t[15]=S,t[16]=C):C=t[16];let w;t[17]===n.additionsTotal?w=t[18]:(w=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additionsTotal]}),t[17]=n.additionsTotal,t[18]=w);let T;t[19]===n.deletionsTotal?T=t[20]:(T=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletionsTotal]}),t[19]=n.deletionsTotal,t[20]=T);let E;t[21]!==w||t[22]!==T?(E=(0,F.jsxs)(`span`,{className:`shrink-0 font-mono text-xs`,children:[w,` `,T]}),t[21]=w,t[22]=T,t[23]=E):E=t[23];let D;t[24]!==n.lastTs||t[25]!==m?(D=L(n.lastTs,m),t[24]=n.lastTs,t[25]=m,t[26]=D):D=t[26];let O;t[27]===D?O=t[28]:(O=(0,F.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:D}),t[27]=D,t[28]=O);let k;t[29]===i?k=t[30]:(k=i?(0,F.jsx)(`span`,{className:`shrink-0 text-[11px] text-primary animate-pulse`,role:`status`,children:(0,F.jsx)(a,{id:`6q0rnH`})}):null,t[29]=i,t[30]=k);let j;t[31]!==O||t[32]!==k||t[33]!==C||t[34]!==E?(j=(0,F.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[C,E,O,k]}),t[31]=O,t[32]=k,t[33]=C,t[34]=E,t[35]=j):j=t[35];let M;if(t[36]!==b||t[37]!==v||t[38]!==n.bursts||t[39]!==n.docName||t[40]!==l||t[41]!==r||t[42]!==f){let e;t[44]!==b||t[45]!==v||t[46]!==n.docName||t[47]!==l||t[48]!==r||t[49]!==f?(e=e=>(0,F.jsx)(ee,{burst:e,docName:n.docName,editCount:v,sessionAlive:r,inFlight:f,onOpenDiff:e=>l(e.stackIndex+1),onRestore:b},`${n.docName}:${e.stackIndex}`),t[44]=b,t[45]=v,t[46]=n.docName,t[47]=l,t[48]=r,t[49]=f,t[50]=e):e=t[50],M=n.bursts.map(e),t[36]=b,t[37]=v,t[38]=n.bursts,t[39]=n.docName,t[40]=l,t[41]=r,t[42]=f,t[43]=M}else M=t[43];let I;t[51]===M?I=t[52]:(I=(0,F.jsx)(`div`,{children:M}),t[51]=M,t[52]=I);let te;return t[53]!==j||t[54]!==I?(te=(0,F.jsxs)(`div`,{className:`border-b border-border`,"data-testid":`activity-panel-file-row`,children:[j,I]}),t[53]=j,t[54]=I,t[55]=te):te=t[55],te}function re(){return Date.now()}async function ie(e){let t=await fetch(`/api/agent-undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,agentId:e.connectionId})});if(!t.ok)throw Error(`agent-undo failed: HTTP ${t.status}`)}function R(e){return`#/${e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`}function z(e){typeof window>`u`||(window.location.hash=R(e))}function ae(){let e=(0,N.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,role:`status`,"aria-busy":`true`,children:[t,(0,F.jsx)(`span`,{className:`text-sm`,children:(0,F.jsx)(a,{id:`ONPvOb`})})]}),e[1]=n):n=e[1],n}function oe(e){let t=(0,N.c)(10),{error:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(x,{className:`size-6 text-destructive`,"aria-hidden":`true`}),t[0]=i):i=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,F.jsx)(`p`,{className:`text-sm font-medium`,children:(0,F.jsx)(a,{id:`DhLHEb`})}),t[1]=o):o=t[1];let s;t[2]===n?s=t[3]:(s=(0,F.jsxs)(`div`,{className:`space-y-1`,children:[o,(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),t[2]=n,t[3]=s);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(a,{id:`6gRgw8`}),t[4]=l):l=t[4];let u;t[5]===r?u=t[6]:(u=(0,F.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:l}),t[5]=r,t[6]=u);let d;return t[7]!==s||t[8]!==u?(d=(0,F.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center`,role:`alert`,"data-testid":`activity-panel-error`,children:[i,s,u]}),t[7]=s,t[8]=u,t[9]=d):d=t[9],d}function se(){let e=(0,N.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,"data-testid":`activity-panel-empty`,children:(0,F.jsx)(`p`,{className:`text-sm italic`,children:(0,F.jsx)(a,{id:`iuTKci`})})}),e[0]=t):t=e[0],t}function B(e){let t=(0,N.c)(12),{onExit:n,showBackButton:r}=e,{_:i}=o(),s;t[0]===i?s=t[1]:(s=i({id:`kYL1lH`}),t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==r?(c=r?(0,F.jsx)(V,{onClick:n}):null,t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})}),t[5]=l):l=t[5];let u;t[6]===c?u=t[7]:(u=(0,F.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-2 border-b border-border px-3 py-2`,children:[c,l]}),t[6]=c,t[7]=u);let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,F.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-muted-foreground`,children:(0,F.jsx)(`p`,{className:`text-center text-sm italic`,children:(0,F.jsx)(a,{id:`D_WKe_`})})}),t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==u?(f=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel-no-agent`,"aria-label":s,children:[u,d]}),t[9]=s,t[10]=u,t[11]=f):f=t[11],f}function V(e){let t=(0,N.c)(9),{onClick:n}=e,{_:r}=o(),i;t[0]===r?i=t[1]:(i=r({id:`ogAuyr`}),t[0]=r,t[1]=i);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(b,{}),t[2]=s):s=t[2];let f;t[3]!==n||t[4]!==i?(f=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:n,"aria-label":i,"data-testid":`docpanel-exit-agent-mode`,children:s})}),t[3]=n,t[4]=i,t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,F.jsx)(u,{side:`bottom`,children:(0,F.jsx)(a,{id:`ogAuyr`})}),t[6]=p):p=t[6];let m;return t[7]===f?m=t[8]:(m=(0,F.jsxs)(d,{children:[f,p]}),t[7]=f,t[8]=m),m}function H(e){let t=(0,N.c)(9),{lastTs:n}=e,[r]=(0,P.useState)(U),i;t[0]!==n||t[1]!==r?(i=n?W(r-n):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let o=i,s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(`span`,{className:`font-medium`,children:(0,F.jsx)(a,{id:`LCUy_N`})}),t[3]=s):s=t[3];let c;t[4]===o?c=t[5]:(c=o?(0,F.jsxs)(`span`,{children:[` · `,o]}):null,t[4]=o,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`div`,{className:`mt-1 opacity-80`,children:(0,F.jsx)(a,{id:`GK-IRZ`})}),t[6]=l):l=t[6];let u;return t[7]===c?u=t[8]:(u=(0,F.jsxs)(`div`,{className:`border-b border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,"data-testid":`activity-panel-session-ended`,children:[s,c,l]}),t[7]=c,t[8]=u),u}function U(){return Date.now()}function W(e){let t=Math.max(0,e);if(t<6e4){let e=Math.round(t/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(t<36e5){let e=Math.round(t/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let n=Math.round(t/36e5);return v._({id:`nYeBmY`,values:{hours:n}})}function G(e){let t=(0,N.c)(10),{agent:n,size:r}=e,i=r===void 0?28:r,a;t[0]!==n.color||t[1]!==i?(a={backgroundColor:n.color,width:i,height:i},t[0]=n.color,t[1]=i,t[2]=a):a=t[2];let o=i*.57,s=i*.57,c;t[3]!==n.icon||t[4]!==o||t[5]!==s?(c=(0,F.jsx)(k,{icon:n.icon,width:o,height:s}),t[3]=n.icon,t[4]=o,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==c?(l=(0,F.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-full text-white ring-2 ring-background`,style:a,"aria-hidden":`true`,children:c}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function ce(e){let t=(0,N.c)(25),{data:n,status:r,error:i,reload:s,onExit:c,onNavigate:l,onUndoDrop:u,onSetVersion:d,showBackButton:f}=e,{_:p}=o(),m=n?.files?.[0]?.lastTs??null,h=n?.files?.length??0,g;t[0]===p?g=t[1]:(g=p({id:`kYL1lH`}),t[0]=p,t[1]=g);let _;t[2]!==c||t[3]!==f?(_=f?(0,F.jsx)(V,{onClick:c}):null,t[2]=c,t[3]=f,t[4]=_):_=t[4];let v;t[5]!==n||t[6]!==h||t[7]!==m?(v=n?.agent?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(G,{agent:n.agent}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:n.agent.displayName}),(0,F.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[n.sessionAlive?(0,F.jsx)(a,{id:`F6pfE9`}):m===null?(0,F.jsx)(a,{id:`PMyJ9C`}):(0,F.jsx)(a,{id:`237hSL`}),n.files.length>0?(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(a,{id:`u3BOHd`,values:{fileCount:h}})]}):null]})]})]}):(0,F.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})})}),t[5]=n,t[6]=h,t[7]=m,t[8]=v):v=t[8];let y;t[9]!==_||t[10]!==v?(y=(0,F.jsxs)(`div`,{className:`flex flex-row items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[_,v]}),t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]!==n||t[13]!==i||t[14]!==m||t[15]!==l||t[16]!==d||t[17]!==u||t[18]!==s||t[19]!==r?(b=(0,F.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`activity-panel-body`,children:r===`loading`&&n===null?(0,F.jsx)(ae,{}):r===`error`&&i?(0,F.jsx)(oe,{error:i,onRetry:s}):n===null?(0,F.jsx)(se,{}):(0,F.jsxs)(F.Fragment,{children:[!n.sessionAlive&&m!==null?(0,F.jsx)(H,{lastTs:m}):null,n.files.length===0?(0,F.jsx)(se,{}):n.files.map(e=>(0,F.jsx)(ne,{file:e,sessionAlive:n.sessionAlive,isWriting:n.writingDocs.has(e.docName),onNavigate:l,onUndoDrop:u,onSetVersion:t=>d(e,t)},e.docName))]})}),t[12]=n,t[13]=i,t[14]=m,t[15]=l,t[16]=d,t[17]=u,t[18]=s,t[19]=r,t[20]=b):b=t[20];let x;return t[21]!==g||t[22]!==y||t[23]!==b?(x=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel`,"aria-label":g,children:[y,b]}),t[21]=g,t[22]=y,t[23]=b,t[24]=x):x=t[24],x}function K(e){let t=(0,N.c)(30),i;t[0]===e?i=t[1]:(i=e===void 0?{}:e,t[0]=e,t[1]=i);let{showBackButton:a}=i,s=a===void 0?!0:a,{_:c}=o(),{docPanelAgentId:l,closeActivityPanel:u}=n(),{openTargetTransition:d}=r(),{pageMeta:f}=S(),{data:p,status:m,error:h,reload:g}=M(l),_,v;if(t[2]!==p||t[3]!==l?(_=()=>{if(!(!p||l===null))for(let e of p.files)D(l,e.docName,e.bursts.length)},v=[p,l],t[2]=p,t[3]=l,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,P.useEffect)(_,v),l===null){let e;return t[6]!==u||t[7]!==s?(e=(0,F.jsx)(B,{onExit:u,showBackButton:s}),t[6]=u,t[7]=s,t[8]=e):e=t[8],e}let b;t[9]!==d||t[10]!==f?(b=e=>{d(T({kind:`doc`,target:e,docName:e},f),{disposition:`permanent`,consumeActiveNewTab:!0}),z(e)},t[9]=d,t[10]=f,t[11]=b):b=t[11];let x=b,C;t[12]!==p||t[13]!==l?(C=(e,t)=>{if(!p?.agent||l===null)return;j();let n=e.bursts.length;O({agentId:l,agentName:p.agent.displayName,agentColor:p.agent.color,agentIcon:p.agent.icon,docName:e.docName,keptCount:Math.max(0,Math.min(t,n)),maxVersions:n})},t[12]=p,t[13]=l,t[14]=C):C=t[14];let w=C,E;t[15]!==c||t[16]!==p||t[17]!==l||t[18]!==g?(E=async(e,t)=>{if(!(t<=0))try{await ie({connectionId:l,docName:e,scope:`count`,count:t,agentName:p?.agent?.displayName}),y.success(c(t===1?{id:`-dNlfM`,values:{docName:e}}:{id:`ApeA0n`,values:{dropCount:t,docName:e}})),g()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);y.error(c({id:`EqrC_R`,values:{message:n}})),g()}},t[15]=c,t[16]=p,t[17]=l,t[18]=g,t[19]=E):E=t[19];let k=E,A;return t[20]!==u||t[21]!==p||t[22]!==h||t[23]!==x||t[24]!==w||t[25]!==k||t[26]!==g||t[27]!==s||t[28]!==m?(A=(0,F.jsx)(ce,{data:p,status:m,error:h,reload:g,onExit:u,onNavigate:x,onUndoDrop:k,onSetVersion:w,showBackButton:s}),t[20]=u,t[21]=p,t[22]=h,t[23]=x,t[24]=w,t[25]=k,t[26]=g,t[27]=s,t[28]=m,t[29]=A):A=t[29],A}export{K as ActivityModeContent};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{a as n,o as r}from"./DocumentContext-DCB_2FMP.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./button-CA0dewJJ.js";import{i as l,n as u,t as d}from"./tooltip-DHXgxWLL.js";import{a as f,c as p,i as m,o as h,s as g,t as _}from"./dialog-R8GugqUq.js";import{t as v}from"./dist-DUfEoSbR.js";import{n as y}from"./dist-B6jB2qbD2.js";import{c as b}from"./Mermaid-mUyEEsA0.js";import{r as x}from"./CopyButton-CKyZY1PL.js";import{i as S}from"./prop-types-7a0cKWM0.js";import{t as C}from"./spinner-CHTY-VE-.js";import{t as w}from"./undo-2-CMyZc9mZ.js";import{c as T}from"./navigation-targets-DSqzY6pU.js";import{a as E,i as D,n as O,o as k,t as A}from"./agent-diff-store-DvvlIWsW.js";import{t as j}from"./timeline-diff-store-DnRthkM7.js";import{n as M}from"./use-activity-panel-B8mUHgso.js";var N=s(),P=e(i(),1),F=t();function I(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function ee(e){let t=(0,N.c)(86),{burst:n,docName:r,editCount:i,sessionAlive:s,inFlight:v,onOpenDiff:y,onRestore:b}=e,{_:x}=o(),[S,T]=(0,P.useState)(te),D,O;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{let e=setInterval(()=>T(Date.now()),3e4);return()=>clearInterval(e)},O=[],t[0]=D,t[1]=O):(D=t[0],O=t[1]),(0,P.useEffect)(D,O);let[k,A]=(0,P.useState)(!1),j=E(),M=n.stackIndex+1,ee=j?.docName===r&&j.keptCount===M,L=i-M,ne=!s||v||L<=0,re;t[2]!==L||t[3]!==b?(re=function(){A(!1),b(L)},t[2]=L,t[3]=b,t[4]=re):re=t[4];let ie=re,R;t[5]!==n||t[6]!==y?(R=()=>y(n),t[5]=n,t[6]=y,t[7]=R):R=t[7];let z;t[8]!==x||t[9]!==M||t[10]!==r?(z=x({id:`Z79bnE`,values:{burstNumber:M,docName:r}}),t[8]=x,t[9]=M,t[10]=r,t[11]=z):z=t[11];let ae=ee?`bg-muted`:`hover:bg-muted/40`,oe;t[12]===ae?oe=t[13]:(oe=[`flex min-w-0 flex-1 items-center gap-2 px-4 py-1.5 text-xs text-muted-foreground transition-colors`,ae],t[12]=ae,t[13]=oe);let se=oe.join(` `),B;t[14]!==n.ts||t[15]!==S?(B=I(n.ts,S),t[14]=n.ts,t[15]=S,t[16]=B):B=t[16];let V;t[17]===B?V=t[18]:(V=(0,F.jsx)(`span`,{className:`font-mono`,children:B}),t[17]=B,t[18]=V);let H;t[19]===n.additions?H=t[20]:(H=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additions]}),t[19]=n.additions,t[20]=H);let U;t[21]===n.deletions?U=t[22]:(U=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletions]}),t[21]=n.deletions,t[22]=U);let W;t[23]!==H||t[24]!==U?(W=(0,F.jsxs)(`span`,{className:`ml-auto font-mono`,children:[H,` `,U]}),t[23]=H,t[24]=U,t[25]=W):W=t[25];let G;t[26]!==ee||t[27]!==V||t[28]!==W||t[29]!==R||t[30]!==z||t[31]!==se?(G=(0,F.jsxs)(`button`,{type:`button`,onClick:R,"aria-pressed":ee,"aria-label":z,"data-testid":`activity-panel-burst-open`,className:se,children:[V,W]}),t[26]=ee,t[27]=V,t[28]=W,t[29]=R,t[30]=z,t[31]=se,t[32]=G):G=t[32];let ce;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1.5 h-3 w-px shrink-0 bg-border`}),t[33]=ce):ce=t[33];let K;t[34]!==x||t[35]!==M||t[36]!==r?(K=x({id:`Zhe80e`,values:{burstNumber:M,docName:r}}),t[34]=x,t[35]=M,t[36]=r,t[37]=K):K=t[37];let le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>A(!0),t[38]=le):le=t[38];let q;t[39]===v?q=t[40]:(q=v?(0,F.jsx)(C,{className:`size-3`,"aria-hidden":`true`}):(0,F.jsx)(w,{className:`size-3`,"aria-hidden":`true`}),t[39]=v,t[40]=q);let J;t[41]!==ne||t[42]!==K||t[43]!==q?(J=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`activity-panel-burst-restore`,"aria-label":K,disabled:ne,onClick:le,children:q})}),t[41]=ne,t[42]=K,t[43]=q,t[44]=J):J=t[44];let Y;t[45]!==x||t[46]!==L||t[47]!==s?(Y=x(s?L>0?{id:`SOPwPh`}:{id:`62bOuM`}:{id:`NzFvyK`}),t[45]=x,t[46]=L,t[47]=s,t[48]=Y):Y=t[48];let X;t[49]===Y?X=t[50]:(X=(0,F.jsx)(u,{side:`left`,children:Y}),t[49]=Y,t[50]=X);let Z;t[51]!==J||t[52]!==X?(Z=(0,F.jsxs)(d,{children:[J,X]}),t[51]=J,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==G||t[55]!==Z?(Q=(0,F.jsxs)(`div`,{className:`flex items-center border-t border-border/50 pr-3`,children:[G,ce,Z]}),t[54]=G,t[55]=Z,t[56]=Q):Q=t[56];let ue;t[57]===v?ue=t[58]:(ue=e=>{!e&&!v?A(!1):e&&A(!0)},t[57]=v,t[58]=ue);let de;t[59]===x?de=t[60]:(de=x({id:`a4FRQv`}),t[59]=x,t[60]=de);let fe;t[61]===de?fe=t[62]:(fe=(0,F.jsx)(p,{children:de}),t[61]=de,t[62]=fe);let pe;t[63]===L?pe=t[64]:(pe=(0,F.jsx)(f,{children:(0,F.jsx)(a,{id:`LKIPzv`,values:{laterEdits:L}})}),t[63]=L,t[64]=pe);let $;t[65]!==fe||t[66]!==pe?($=(0,F.jsxs)(g,{children:[fe,pe]}),t[65]=fe,t[66]=pe,t[67]=$):$=t[67];let me;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,F.jsx)(c,{variant:`outline`,"data-testid":`activity-panel-burst-restore-cancel`,onClick:()=>A(!1),children:(0,F.jsx)(a,{id:`dEgA5A`})}),t[68]=me):me=t[68];let he;t[69]===v?he=t[70]:(he=v?(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}):null,t[69]=v,t[70]=he);let ge;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,F.jsx)(a,{id:`9uI_rE`}),t[71]=ge):ge=t[71];let _e;t[72]!==ie||t[73]!==v||t[74]!==he?(_e=(0,F.jsxs)(h,{children:[me,(0,F.jsxs)(c,{variant:`destructive`,"data-testid":`activity-panel-burst-restore-confirm`,disabled:v,onClick:ie,children:[he,ge]})]}),t[72]=ie,t[73]=v,t[74]=he,t[75]=_e):_e=t[75];let ve;t[76]!==$||t[77]!==_e?(ve=(0,F.jsxs)(m,{children:[$,_e]}),t[76]=$,t[77]=_e,t[78]=ve):ve=t[78];let ye;t[79]!==k||t[80]!==ue||t[81]!==ve?(ye=(0,F.jsx)(_,{open:k,onOpenChange:ue,children:ve}),t[79]=k,t[80]=ue,t[81]=ve,t[82]=ye):ye=t[82];let be;return t[83]!==Q||t[84]!==ye?(be=(0,F.jsxs)(F.Fragment,{children:[Q,ye]}),t[83]=Q,t[84]=ye,t[85]=be):be=t[85],be}function te(){return Date.now()}function L(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let r=Math.round(n/36e5);return v._({id:`nYeBmY`,values:{hours:r}})}function ne(e){let t=(0,N.c)(56),{file:n,sessionAlive:r,isWriting:i,onNavigate:s,onUndoDrop:c,onSetVersion:l}=e,{_:u}=o(),{docName:d}=n,[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(re),g,_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{let e=setInterval(()=>h(Date.now()),3e4);return()=>clearInterval(e)},_=[],t[0]=g,t[1]=_):(g=t[0],_=t[1]),(0,P.useEffect)(g,_);let v=n.bursts.length,y;t[2]!==n.docName||t[3]!==c||t[4]!==r||t[5]!==f?(y=e=>{e<=0||!r||f||(p(!0),Promise.resolve(c(n.docName,e)).finally(()=>{p(!1),A()}))},t[2]=n.docName,t[3]=c,t[4]=r,t[5]=f,t[6]=y):y=t[6];let b=y;if(n.bursts.length===0)return null;let x;t[7]!==n.docName||t[8]!==s?(x=()=>s(n.docName),t[7]=n.docName,t[8]=s,t[9]=x):x=t[9];let S;t[10]!==u||t[11]!==d?(S=u({id:`QcpeeE`,values:{docName:d}}),t[10]=u,t[11]=d,t[12]=S):S=t[12];let C;t[13]!==n.docName||t[14]!==x||t[15]!==S?(C=(0,F.jsx)(`button`,{type:`button`,onClick:x,className:`min-w-0 flex-1 truncate text-left text-foreground hover:underline focus-visible:outline-ring`,"aria-label":S,"data-testid":`activity-panel-file-row-filename`,title:n.docName,children:n.docName}),t[13]=n.docName,t[14]=x,t[15]=S,t[16]=C):C=t[16];let w;t[17]===n.additionsTotal?w=t[18]:(w=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additionsTotal]}),t[17]=n.additionsTotal,t[18]=w);let T;t[19]===n.deletionsTotal?T=t[20]:(T=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletionsTotal]}),t[19]=n.deletionsTotal,t[20]=T);let E;t[21]!==w||t[22]!==T?(E=(0,F.jsxs)(`span`,{className:`shrink-0 font-mono text-xs`,children:[w,` `,T]}),t[21]=w,t[22]=T,t[23]=E):E=t[23];let D;t[24]!==n.lastTs||t[25]!==m?(D=L(n.lastTs,m),t[24]=n.lastTs,t[25]=m,t[26]=D):D=t[26];let O;t[27]===D?O=t[28]:(O=(0,F.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:D}),t[27]=D,t[28]=O);let k;t[29]===i?k=t[30]:(k=i?(0,F.jsx)(`span`,{className:`shrink-0 text-[11px] text-primary animate-pulse`,role:`status`,children:(0,F.jsx)(a,{id:`6q0rnH`})}):null,t[29]=i,t[30]=k);let j;t[31]!==O||t[32]!==k||t[33]!==C||t[34]!==E?(j=(0,F.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[C,E,O,k]}),t[31]=O,t[32]=k,t[33]=C,t[34]=E,t[35]=j):j=t[35];let M;if(t[36]!==b||t[37]!==v||t[38]!==n.bursts||t[39]!==n.docName||t[40]!==l||t[41]!==r||t[42]!==f){let e;t[44]!==b||t[45]!==v||t[46]!==n.docName||t[47]!==l||t[48]!==r||t[49]!==f?(e=e=>(0,F.jsx)(ee,{burst:e,docName:n.docName,editCount:v,sessionAlive:r,inFlight:f,onOpenDiff:e=>l(e.stackIndex+1),onRestore:b},`${n.docName}:${e.stackIndex}`),t[44]=b,t[45]=v,t[46]=n.docName,t[47]=l,t[48]=r,t[49]=f,t[50]=e):e=t[50],M=n.bursts.map(e),t[36]=b,t[37]=v,t[38]=n.bursts,t[39]=n.docName,t[40]=l,t[41]=r,t[42]=f,t[43]=M}else M=t[43];let I;t[51]===M?I=t[52]:(I=(0,F.jsx)(`div`,{children:M}),t[51]=M,t[52]=I);let te;return t[53]!==j||t[54]!==I?(te=(0,F.jsxs)(`div`,{className:`border-b border-border`,"data-testid":`activity-panel-file-row`,children:[j,I]}),t[53]=j,t[54]=I,t[55]=te):te=t[55],te}function re(){return Date.now()}async function ie(e){let t=await fetch(`/api/agent-undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,agentId:e.connectionId})});if(!t.ok)throw Error(`agent-undo failed: HTTP ${t.status}`)}function R(e){return`#/${e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`}function z(e){typeof window>`u`||(window.location.hash=R(e))}function ae(){let e=(0,N.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,role:`status`,"aria-busy":`true`,children:[t,(0,F.jsx)(`span`,{className:`text-sm`,children:(0,F.jsx)(a,{id:`ONPvOb`})})]}),e[1]=n):n=e[1],n}function oe(e){let t=(0,N.c)(10),{error:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(x,{className:`size-6 text-destructive`,"aria-hidden":`true`}),t[0]=i):i=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,F.jsx)(`p`,{className:`text-sm font-medium`,children:(0,F.jsx)(a,{id:`DhLHEb`})}),t[1]=o):o=t[1];let s;t[2]===n?s=t[3]:(s=(0,F.jsxs)(`div`,{className:`space-y-1`,children:[o,(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),t[2]=n,t[3]=s);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(a,{id:`6gRgw8`}),t[4]=l):l=t[4];let u;t[5]===r?u=t[6]:(u=(0,F.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:l}),t[5]=r,t[6]=u);let d;return t[7]!==s||t[8]!==u?(d=(0,F.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center`,role:`alert`,"data-testid":`activity-panel-error`,children:[i,s,u]}),t[7]=s,t[8]=u,t[9]=d):d=t[9],d}function se(){let e=(0,N.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,"data-testid":`activity-panel-empty`,children:(0,F.jsx)(`p`,{className:`text-sm italic`,children:(0,F.jsx)(a,{id:`iuTKci`})})}),e[0]=t):t=e[0],t}function B(e){let t=(0,N.c)(12),{onExit:n,showBackButton:r}=e,{_:i}=o(),s;t[0]===i?s=t[1]:(s=i({id:`kYL1lH`}),t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==r?(c=r?(0,F.jsx)(V,{onClick:n}):null,t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})}),t[5]=l):l=t[5];let u;t[6]===c?u=t[7]:(u=(0,F.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-2 border-b border-border px-3 py-2`,children:[c,l]}),t[6]=c,t[7]=u);let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,F.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-muted-foreground`,children:(0,F.jsx)(`p`,{className:`text-center text-sm italic`,children:(0,F.jsx)(a,{id:`D_WKe_`})})}),t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==u?(f=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel-no-agent`,"aria-label":s,children:[u,d]}),t[9]=s,t[10]=u,t[11]=f):f=t[11],f}function V(e){let t=(0,N.c)(9),{onClick:n}=e,{_:r}=o(),i;t[0]===r?i=t[1]:(i=r({id:`ogAuyr`}),t[0]=r,t[1]=i);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(b,{}),t[2]=s):s=t[2];let f;t[3]!==n||t[4]!==i?(f=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:n,"aria-label":i,"data-testid":`docpanel-exit-agent-mode`,children:s})}),t[3]=n,t[4]=i,t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,F.jsx)(u,{side:`bottom`,children:(0,F.jsx)(a,{id:`ogAuyr`})}),t[6]=p):p=t[6];let m;return t[7]===f?m=t[8]:(m=(0,F.jsxs)(d,{children:[f,p]}),t[7]=f,t[8]=m),m}function H(e){let t=(0,N.c)(9),{lastTs:n}=e,[r]=(0,P.useState)(U),i;t[0]!==n||t[1]!==r?(i=n?W(r-n):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let o=i,s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(`span`,{className:`font-medium`,children:(0,F.jsx)(a,{id:`LCUy_N`})}),t[3]=s):s=t[3];let c;t[4]===o?c=t[5]:(c=o?(0,F.jsxs)(`span`,{children:[` · `,o]}):null,t[4]=o,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`div`,{className:`mt-1 opacity-80`,children:(0,F.jsx)(a,{id:`GK-IRZ`})}),t[6]=l):l=t[6];let u;return t[7]===c?u=t[8]:(u=(0,F.jsxs)(`div`,{className:`border-b border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,"data-testid":`activity-panel-session-ended`,children:[s,c,l]}),t[7]=c,t[8]=u),u}function U(){return Date.now()}function W(e){let t=Math.max(0,e);if(t<6e4){let e=Math.round(t/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(t<36e5){let e=Math.round(t/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let n=Math.round(t/36e5);return v._({id:`nYeBmY`,values:{hours:n}})}function G(e){let t=(0,N.c)(10),{agent:n,size:r}=e,i=r===void 0?28:r,a;t[0]!==n.color||t[1]!==i?(a={backgroundColor:n.color,width:i,height:i},t[0]=n.color,t[1]=i,t[2]=a):a=t[2];let o=i*.57,s=i*.57,c;t[3]!==n.icon||t[4]!==o||t[5]!==s?(c=(0,F.jsx)(k,{icon:n.icon,width:o,height:s}),t[3]=n.icon,t[4]=o,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==c?(l=(0,F.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-full text-white ring-2 ring-background`,style:a,"aria-hidden":`true`,children:c}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function ce(e){let t=(0,N.c)(25),{data:n,status:r,error:i,reload:s,onExit:c,onNavigate:l,onUndoDrop:u,onSetVersion:d,showBackButton:f}=e,{_:p}=o(),m=n?.files?.[0]?.lastTs??null,h=n?.files?.length??0,g;t[0]===p?g=t[1]:(g=p({id:`kYL1lH`}),t[0]=p,t[1]=g);let _;t[2]!==c||t[3]!==f?(_=f?(0,F.jsx)(V,{onClick:c}):null,t[2]=c,t[3]=f,t[4]=_):_=t[4];let v;t[5]!==n||t[6]!==h||t[7]!==m?(v=n?.agent?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(G,{agent:n.agent}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:n.agent.displayName}),(0,F.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[n.sessionAlive?(0,F.jsx)(a,{id:`F6pfE9`}):m===null?(0,F.jsx)(a,{id:`PMyJ9C`}):(0,F.jsx)(a,{id:`237hSL`}),n.files.length>0?(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(a,{id:`u3BOHd`,values:{fileCount:h}})]}):null]})]})]}):(0,F.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})})}),t[5]=n,t[6]=h,t[7]=m,t[8]=v):v=t[8];let y;t[9]!==_||t[10]!==v?(y=(0,F.jsxs)(`div`,{className:`flex flex-row items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[_,v]}),t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]!==n||t[13]!==i||t[14]!==m||t[15]!==l||t[16]!==d||t[17]!==u||t[18]!==s||t[19]!==r?(b=(0,F.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`activity-panel-body`,children:r===`loading`&&n===null?(0,F.jsx)(ae,{}):r===`error`&&i?(0,F.jsx)(oe,{error:i,onRetry:s}):n===null?(0,F.jsx)(se,{}):(0,F.jsxs)(F.Fragment,{children:[!n.sessionAlive&&m!==null?(0,F.jsx)(H,{lastTs:m}):null,n.files.length===0?(0,F.jsx)(se,{}):n.files.map(e=>(0,F.jsx)(ne,{file:e,sessionAlive:n.sessionAlive,isWriting:n.writingDocs.has(e.docName),onNavigate:l,onUndoDrop:u,onSetVersion:t=>d(e,t)},e.docName))]})}),t[12]=n,t[13]=i,t[14]=m,t[15]=l,t[16]=d,t[17]=u,t[18]=s,t[19]=r,t[20]=b):b=t[20];let x;return t[21]!==g||t[22]!==y||t[23]!==b?(x=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel`,"aria-label":g,children:[y,b]}),t[21]=g,t[22]=y,t[23]=b,t[24]=x):x=t[24],x}function K(e){let t=(0,N.c)(30),i;t[0]===e?i=t[1]:(i=e===void 0?{}:e,t[0]=e,t[1]=i);let{showBackButton:a}=i,s=a===void 0?!0:a,{_:c}=o(),{docPanelAgentId:l,closeActivityPanel:u}=n(),{openTargetTransition:d}=r(),{pageMeta:f}=S(),{data:p,status:m,error:h,reload:g}=M(l),_,v;if(t[2]!==p||t[3]!==l?(_=()=>{if(!(!p||l===null))for(let e of p.files)D(l,e.docName,e.bursts.length)},v=[p,l],t[2]=p,t[3]=l,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,P.useEffect)(_,v),l===null){let e;return t[6]!==u||t[7]!==s?(e=(0,F.jsx)(B,{onExit:u,showBackButton:s}),t[6]=u,t[7]=s,t[8]=e):e=t[8],e}let b;t[9]!==d||t[10]!==f?(b=e=>{d(T({kind:`doc`,target:e,docName:e},f),{disposition:`permanent`,consumeActiveNewTab:!0}),z(e)},t[9]=d,t[10]=f,t[11]=b):b=t[11];let x=b,C;t[12]!==p||t[13]!==l?(C=(e,t)=>{if(!p?.agent||l===null)return;j();let n=e.bursts.length;O({agentId:l,agentName:p.agent.displayName,agentColor:p.agent.color,agentIcon:p.agent.icon,docName:e.docName,keptCount:Math.max(0,Math.min(t,n)),maxVersions:n})},t[12]=p,t[13]=l,t[14]=C):C=t[14];let w=C,E;t[15]!==c||t[16]!==p||t[17]!==l||t[18]!==g?(E=async(e,t)=>{if(!(t<=0))try{await ie({connectionId:l,docName:e,scope:`count`,count:t,agentName:p?.agent?.displayName}),y.success(c(t===1?{id:`-dNlfM`,values:{docName:e}}:{id:`ApeA0n`,values:{dropCount:t,docName:e}})),g()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);y.error(c({id:`EqrC_R`,values:{message:n}})),g()}},t[15]=c,t[16]=p,t[17]=l,t[18]=g,t[19]=E):E=t[19];let k=E,A;return t[20]!==u||t[21]!==p||t[22]!==h||t[23]!==x||t[24]!==w||t[25]!==k||t[26]!==g||t[27]!==s||t[28]!==m?(A=(0,F.jsx)(ce,{data:p,status:m,error:h,reload:g,onExit:u,onNavigate:x,onUndoDrop:k,onSetVersion:w,showBackButton:s}),t[20]=u,t[21]=p,t[22]=h,t[23]=x,t[24]=w,t[25]=k,t[26]=g,t[27]=s,t[28]=m,t[29]=A):A=t[29],A}export{K as ActivityModeContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActivityPanelDiffView-GFnvFJPJ.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./compiler-runtime-BfE3aGVn.js","./ActivityPanelDiffView-legcy4jI.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./overlay-layers-Bj-TVfKw.js";import{t as ee}from"./button-CA0dewJJ.js";import{i as te,n as ne,t as re}from"./tooltip-DHXgxWLL.js";import{n as c,t as l}from"./toggle-group-CZcn-1gX.js";import{t as u}from"./spinner-
|
|
2
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./overlay-layers-Bj-TVfKw.js";import{t as ee}from"./button-CA0dewJJ.js";import{i as te,n as ne,t as re}from"./tooltip-DHXgxWLL.js";import{n as c,t as l}from"./toggle-group-CZcn-1gX.js";import{t as u}from"./spinner-CHTY-VE-.js";import{n as d,t as ie}from"./panel-right-open-DAyUhiQN.js";import{t as ae}from"./x-BaJrHZK_.js";import{o as oe,r as se,t as ce}from"./agent-diff-store-DvvlIWsW.js";import{t as f}from"./lru-string-cache-Ckr1Pjrr.js";import{t as le}from"./use-activity-panel-B8mUHgso.js";import{a as ue,o as de,r as fe,t as pe}from"./use-timeline-entry-diff-C3vXYWPC.js";var me=o(),p=e(r(),1),m=n(),he=(0,p.lazy)(async()=>({default:(await t(()=>import(`./ActivityPanelDiffView-GFnvFJPJ.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)).ActivityPanelDiffView})),h=64;function g(e){let t=(0,me.c)(115),{view:n,isPanelCollapsed:r,onTogglePanel:o}=e,{_:f}=a(),{agentId:h,agentName:g,agentColor:_,agentIcon:v,docName:y,keptCount:b}=n,[x]=(0,p.useState)(_e),ve=(0,p.useRef)(null),[S,ye]=(0,p.useState)(`rendered`),be;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(be={status:`loading`,diff:``,before:``,after:``},t[0]=be):be=t[0];let[C,xe]=(0,p.useState)(be),Se,Ce;t[1]!==h||t[2]!==x||t[3]!==y||t[4]!==b?(Se=()=>{let e=!1;xe({status:`loading`,diff:``,before:``,after:``});let t=`${y}\0${b}`,n=x.get(t);if(n!==void 0){xe({status:`ready`,...JSON.parse(n)});return}return le(h,y,b).then(n=>{e||(x.set(t,JSON.stringify(n)),xe({status:`ready`,...n}))}).catch(t=>{e||(console.error(`[agent-diff] failed to load burst diff`,{agentId:h,docName:y,keptCount:b,err:t}),xe({status:`error`,diff:``,before:``,after:``}))}),()=>{e=!0}},Ce=[h,y,b,x],t[1]=h,t[2]=x,t[3]=y,t[4]=b,t[5]=Se,t[6]=Ce):(Se=t[5],Ce=t[6]),(0,p.useEffect)(Se,Ce);let w;t[7]!==C.after||t[8]!==C.before||t[9]!==C.status?(w=C.status===`ready`?de(C.before,C.after):null,t[7]=C.after,t[8]=C.before,t[9]=C.status,t[10]=w):w=t[10];let T=w,E=C.status===`ready`&&C.diff!==``?`${S}:${C.diff}`:``,D,O;t[11]===E?(D=t[12],O=t[13]):(D=()=>{let e=ve.current;if(E===``||!e)return;let t=!1,n=null,r,i,a=()=>{if(t)return;let r=e.querySelector(`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`)??fe(e)[0];if(!r)return;t=!0,n?.disconnect();let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollIntoView({block:`center`,behavior:i?`auto`:`smooth`})},o=()=>{t||(r!==void 0&&clearTimeout(r),r=setTimeout(()=>{i!==void 0&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=requestAnimationFrame(a)})},120))};n=new MutationObserver(o),n.observe(e,{childList:!0,subtree:!0}),o();let s=setTimeout(()=>n?.disconnect(),5e3);return()=>{n?.disconnect(),r!==void 0&&clearTimeout(r),i!==void 0&&cancelAnimationFrame(i),clearTimeout(s)}},O=[E],t[11]=E,t[12]=D,t[13]=O),(0,p.useEffect)(D,O);let k,A;t[14]===b?(k=t[15],A=t[16]):(k=()=>{let e=e=>{if(e.key===`Escape`&&e.defaultPrevented||s())return;let t=e.target;t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable)||(e.key===`Escape`?ce():e.key===`j`||e.key===`ArrowRight`?(e.preventDefault(),se(b+1)):(e.key===`k`||e.key===`ArrowLeft`)&&(e.preventDefault(),se(b-1)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},A=[b],t[14]=b,t[15]=k,t[16]=A),(0,p.useEffect)(k,A);let j,M,N,P,F,I,L,R;if(t[17]!==f||t[18]!==_||t[19]!==v||t[20]!==g||t[21]!==y||t[22]!==C.diff||t[23]!==C.status){let e=C.status===`ready`?pe(C.diff):{additions:0,deletions:0},n=e.additions>0||e.deletions>0;I=`absolute inset-0 z-20 flex flex-col bg-background`,L=`agent-diff-pane`,M=`flex flex-wrap items-center gap-x-2 gap-y-1.5 border-b border-border px-3 py-2`;let r;t[32]===f?r=t[33]:(r=f({id:`b18t0_`}),t[32]=f,t[33]=r);let i;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,m.jsx)(ae,{className:`size-4`}),t[34]=i):i=t[34];let a;t[35]===r?a=t[36]:(a=(0,m.jsx)(te,{asChild:!0,children:(0,m.jsx)(ee,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`agent-diff-close`,"aria-label":r,onClick:ge,children:i})}),t[35]=r,t[36]=a);let o;t[37]===f?o=t[38]:(o=f({id:`b18t0_`}),t[37]=f,t[38]=o);let s;t[39]===o?s=t[40]:(s=(0,m.jsx)(ne,{side:`bottom`,children:o}),t[39]=o,t[40]=s),t[41]!==a||t[42]!==s?(N=(0,m.jsxs)(re,{children:[a,s]}),t[41]=a,t[42]=s,t[43]=N):N=t[43];let c;t[44]===_?c=t[45]:(c={backgroundColor:_},t[44]=_,t[45]=c);let l;t[46]===v?l=t[47]:(l=(0,m.jsx)(oe,{icon:v,width:13,height:13}),t[46]=v,t[47]=l),t[48]!==c||t[49]!==l?(P=(0,m.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full text-white`,style:c,children:l}),t[48]=c,t[49]=l,t[50]=P):P=t[50];let u;t[51]===y?u=t[52]:(u=(0,m.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,children:y}),t[51]=y,t[52]=u);let d;t[53]===g?d=t[54]:(d=(0,m.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:g}),t[53]=g,t[54]=d),t[55]!==u||t[56]!==d?(F=(0,m.jsxs)(`div`,{className:`min-w-0 max-w-[14rem] shrink`,children:[u,d]}),t[55]=u,t[56]=d,t[57]=F):F=t[57],R=`ml-auto flex flex-wrap items-center justify-end gap-2`,j=n&&(0,m.jsxs)(`span`,{role:`img`,className:`shrink-0 text-xs tabular-nums`,"data-testid":`agent-diff-stat`,"aria-label":f({id:`8lwQlE`,values:{0:e.additions,1:e.deletions}}),children:[(0,m.jsxs)(`span`,{"aria-hidden":`true`,className:`text-emerald-600 dark:text-emerald-500`,children:[`+`,e.additions]}),` `,(0,m.jsxs)(`span`,{"aria-hidden":`true`,className:`text-red-600 dark:text-red-500`,children:[`−`,e.deletions]})]}),t[17]=f,t[18]=_,t[19]=v,t[20]=g,t[21]=y,t[22]=C.diff,t[23]=C.status,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I,t[30]=L,t[31]=R}else j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29],L=t[30],R=t[31];let z;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{(e===`rendered`||e===`source`)&&ye(e)},t[58]=z):z=t[58];let B;t[59]===f?B=t[60]:(B=f({id:`ZW3mlR`}),t[59]=f,t[60]=B);let we;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,m.jsx)(c,{value:`rendered`,className:`h-6 px-2 text-xs`,"data-testid":`agent-diff-render-rendered`,children:(0,m.jsx)(i,{id:`4z_1j2`})}),t[61]=we):we=t[61];let Te;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,m.jsx)(c,{value:`source`,className:`h-6 px-2 text-xs`,"data-testid":`agent-diff-render-source`,children:(0,m.jsx)(i,{id:`wdxz7K`})}),t[62]=Te):Te=t[62];let V;t[63]!==S||t[64]!==B?(V=(0,m.jsxs)(l,{type:`single`,value:S,onValueChange:z,"aria-label":B,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 rounded-md bg-muted p-0.5 dark:bg-background`,children:[we,Te]}),t[63]=S,t[64]=B,t[65]=V):V=t[65];let H;t[66]!==f||t[67]!==r?(H=f(r?{id:`6iDEWA`}:{id:`170Js2`}),t[66]=f,t[67]=r,t[68]=H):H=t[68];let Ee=!r,U;t[69]===r?U=t[70]:(U=r?(0,m.jsx)(ie,{className:`size-4`}):(0,m.jsx)(d,{className:`size-4`}),t[69]=r,t[70]=U);let W;t[71]!==o||t[72]!==H||t[73]!==Ee||t[74]!==U?(W=(0,m.jsx)(te,{asChild:!0,children:(0,m.jsx)(ee,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`agent-diff-toggle-panel`,"aria-label":H,"aria-expanded":Ee,onClick:o,children:U})}),t[71]=o,t[72]=H,t[73]=Ee,t[74]=U,t[75]=W):W=t[75];let G;t[76]!==f||t[77]!==r?(G=f(r?{id:`6iDEWA`}:{id:`170Js2`}),t[76]=f,t[77]=r,t[78]=G):G=t[78];let K;t[79]===G?K=t[80]:(K=(0,m.jsx)(ne,{side:`bottom`,children:G}),t[79]=G,t[80]=K);let q;t[81]!==W||t[82]!==K?(q=(0,m.jsxs)(re,{children:[W,K]}),t[81]=W,t[82]=K,t[83]=q):q=t[83];let J;t[84]!==j||t[85]!==V||t[86]!==q||t[87]!==R?(J=(0,m.jsxs)(`div`,{className:R,children:[j,V,q]}),t[84]=j,t[85]=V,t[86]=q,t[87]=R,t[88]=J):J=t[88];let Y;t[89]!==M||t[90]!==N||t[91]!==P||t[92]!==F||t[93]!==J?(Y=(0,m.jsxs)(`div`,{className:M,children:[N,P,F,J]}),t[89]=M,t[90]=N,t[91]=P,t[92]=F,t[93]=J,t[94]=Y):Y=t[94];let X;t[95]===C.status?X=t[96]:(X=C.status===`loading`&&(0,m.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,m.jsx)(u,{"aria-hidden":`true`,className:`size-3`}),(0,m.jsx)(i,{id:`38foVZ`})]}),t[95]=C.status,t[96]=X);let Z;t[97]===C.status?Z=t[98]:(Z=C.status===`error`&&(0,m.jsx)(`p`,{className:`px-4 py-3 text-xs text-destructive`,children:(0,m.jsx)(i,{id:`vvWZnu`})}),t[97]=C.status,t[98]=Z);let Q;t[99]!==b||t[100]!==S||t[101]!==T||t[102]!==C.after||t[103]!==C.diff||t[104]!==C.status?(Q=C.status===`ready`&&(S===`rendered`&&T?.ok?(0,m.jsx)(ue,{diff:T}):C.diff===``?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`p`,{className:`border-b border-border px-4 py-2 text-xs text-muted-foreground italic`,children:b===0?(0,m.jsx)(i,{id:`klPS-L`}):(0,m.jsx)(i,{id:`k7Hoig`})}),(0,m.jsx)(`pre`,{className:`whitespace-pre-wrap px-4 py-3 font-mono text-xs text-foreground/90`,children:C.after})]}):(0,m.jsx)(p.Suspense,{fallback:(0,m.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,m.jsx)(u,{"aria-hidden":`true`,className:`size-3`}),(0,m.jsx)(i,{id:`EDm3wJ`})]}),children:(0,m.jsx)(he,{diff:C.diff,viewType:`unified`})})),t[99]=b,t[100]=S,t[101]=T,t[102]=C.after,t[103]=C.diff,t[104]=C.status,t[105]=Q):Q=t[105];let $;t[106]!==X||t[107]!==Z||t[108]!==Q?($=(0,m.jsxs)(`div`,{ref:ve,className:`min-h-0 flex-1 overflow-auto subtle-scrollbar`,children:[X,Z,Q]}),t[106]=X,t[107]=Z,t[108]=Q,t[109]=$):$=t[109];let De;return t[110]!==I||t[111]!==L||t[112]!==Y||t[113]!==$?(De=(0,m.jsxs)(`div`,{className:I,"data-testid":L,children:[Y,$]}),t[110]=I,t[111]=L,t[112]=Y,t[113]=$,t[114]=De):De=t[114],De}function ge(){return ce()}function _e(){return new f(h)}export{g as AgentDiffPane};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{n as r}from"./use-collab-url-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{n as r}from"./use-collab-url-CJzhnqks.js";import{i,r as a}from"./thread-client-DnaLPSLV.js";var o=n(),s=e(t(),1);function c(){let e=(0,o.c)(3),{collabUrl:t}=r(),n,c;return e[0]===t?(n=e[1],c=e[2]):(n=()=>{a().setUrl(i(t))},c=[t],e[0]=t,e[1]=n,e[2]=c),(0,s.useEffect)(n,c),null}export{c as AgentThreadClientBinder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-CA0dewJJ.js";import{n as s,r as c,t as l}from"./collapsible-COrqeoHr.js";import{t as u}from"./createLucideIcon-Bhw2PmPp.js";import{t as d}from"./chevron-down-DabHDQTe.js";import{t as f}from"./folder-open-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-CA0dewJJ.js";import{n as s,r as c,t as l}from"./collapsible-COrqeoHr.js";import{t as u}from"./createLucideIcon-Bhw2PmPp.js";import{t as d}from"./chevron-down-DabHDQTe.js";import{t as f}from"./folder-open-BTTec8yg.js";import{t as p}from"./spinner-CHTY-VE-.js";import{t as m}from"./trash-2-BWJWOK8-.js";import{t as h}from"./badge-BYteLKha.js";import{n as g}from"./platform-labels-glrfxkSh.js";var _=u(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),v=a(),y=e(n(),1),b=t();function x(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:e>=1024?`${Math.max(1,Math.round(e/1024))} KB`:`${e} B`}function S(){let e=(0,v.c)(13),[t,n]=(0,y.useState)(`loading`),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[0]=r):r=e[0];let[i,a]=(0,y.useState)(r),o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o={},e[1]=o):o=e[1];let[s,c]=(0,y.useState)(o),l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=async function(){let e=window.okDesktop?.bugReport;if(!e){n(`error`);return}try{let t=await e.list();t.ok?(a(t.reports),n(`ready`)):n(`error`)}catch{n(`error`)}},e[2]=l):l=e[2];let u=l,d,f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{u()},f=[],e[3]=d,e[4]=f):(d=e[3],f=e[4]),(0,y.useEffect)(d,f);let p;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=function(e){c(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})},e[5]=p):p=e[5];let m=p,h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=async function(e){let t=window.okDesktop?.bugReport;if(!t||!e.retryable)return;c(t=>({...t,[e.id]:`retrying`}));let n=await t.send({zipPath:e.zipPath,metadata:{level:e.bundleLevel===`unknown`?`standard`:e.bundleLevel,systemWide:e.systemWide,projectSlug:e.projectSlug}}).catch(w);n&&!n.ok&&n.reason===`email-draft`&&window.okDesktop?.shell.openExternal(n.fallback.mailtoUrl),await u(),m(e.id)},e[6]=h):h=e[6];let g=h,_;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=async function(e){let t=window.okDesktop?.bugReport;t&&(c(t=>({...t,[e.id]:`deleting`})),await t.delete(e.id).catch(C),await u(),m(e.id))},e[7]=_):_=e[7];let b=_,x;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(e){window.okDesktop?.shell.showItemInFolder(e.zipPath)},e[8]=x):x=e[8];let S=x,T;return e[9]!==s||e[10]!==i||e[11]!==t?(T={status:t,reports:i,pending:s,retry:g,remove:b,reveal:S},e[9]=s,e[10]=i,e[11]=t,e[12]=T):T=e[12],T}function C(){}function w(){return null}function T(e){let t=(0,v.c)(6),{state:n}=e;switch(n){case`sent`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(h,{variant:`primary`,children:(0,b.jsx)(r,{id:`h69WC6`})}),t[0]=e):e=t[0],e}case`upload-failed`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(h,{variant:`destructive`,children:(0,b.jsx)(r,{id:`7Bj3x9`})}),t[1]=e):e=t[1],e}case`uploading`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(h,{variant:`warning`,children:(0,b.jsx)(r,{id:`9bG48P`})}),t[2]=e):e=t[2],e}case`email-drafted`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(h,{variant:`secondary`,children:(0,b.jsx)(r,{id:`cPAWbl`})}),t[3]=e):e=t[3],e}case`generated`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(h,{variant:`gray`,children:(0,b.jsx)(r,{id:`2C-6zf`})}),t[4]=e):e=t[4],e}default:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(h,{variant:`outline`,children:(0,b.jsx)(r,{id:`Ef7StM`})}),t[5]=e):e=t[5],e}}}function E(e){let t=(0,v.c)(50),{row:n,pending:a,onRetry:s,onReveal:c,onDelete:l}=e,{_:u,i18n:d}=i(),y=a!==void 0,S;t[0]!==u||t[1]!==d||t[2]!==n.createdAt?(S=n.createdAt===``?u({id:`wF2wqQ`}):new Intl.DateTimeFormat(d.locale||void 0,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(n.createdAt)),t[0]=u,t[1]=d,t[2]=n.createdAt,t[3]=S):S=t[3];let C=S,w;t[4]===n.state?w=t[5]:(w=(0,b.jsx)(T,{state:n.state}),t[4]=n.state,t[5]=w);let E;t[6]===n.bundleLevel?E=t[7]:(E=n.bundleLevel===`unknown`?null:(0,b.jsx)(h,{variant:`gray`,children:n.bundleLevel}),t[6]=n.bundleLevel,t[7]=E);let D;t[8]===C?D=t[9]:(D=(0,b.jsx)(`span`,{className:`truncate text-1sm text-muted-foreground`,children:C}),t[8]=C,t[9]=D);let O;t[10]!==w||t[11]!==E||t[12]!==D?(O=(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[w,E,D]}),t[10]=w,t[11]=E,t[12]=D,t[13]=O):O=t[13];let k;t[14]!==n.lastError||t[15]!==n.reference||t[16]!==n.state||t[17]!==n.zipBytes?(k=(0,b.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.state===`sent`&&n.reference!==void 0?(0,b.jsx)(r,{id:`SInSnF`,values:{0:n.reference},components:{0:(0,b.jsx)(`span`,{className:`font-mono text-foreground`})}}):n.state===`upload-failed`&&n.lastError!==void 0?(0,b.jsx)(`span`,{className:`text-destructive`,children:n.lastError.reason}):(0,b.jsx)(`span`,{children:x(n.zipBytes)})}),t[14]=n.lastError,t[15]=n.reference,t[16]=n.state,t[17]=n.zipBytes,t[18]=k):k=t[18];let A;t[19]!==O||t[20]!==k?(A=(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[O,k]}),t[19]=O,t[20]=k,t[21]=A):A=t[21];let j;t[22]!==y||t[23]!==s||t[24]!==a||t[25]!==n?(j=n.retryable?(0,b.jsxs)(o,{variant:`outline`,size:`xs`,disabled:y,onClick:()=>s(n),children:[a===`retrying`?(0,b.jsx)(p,{"aria-hidden":`true`}):(0,b.jsx)(_,{"aria-hidden":`true`}),(0,b.jsx)(r,{id:`6gRgw8`})]}):null,t[22]=y,t[23]=s,t[24]=a,t[25]=n,t[26]=j):j=t[26];let M;t[27]!==y||t[28]!==c||t[29]!==n?(M=n.zipExists?(0,b.jsx)(o,{variant:`ghost`,size:`icon-xs`,disabled:y,"aria-label":g(typeof window<`u`?window.okDesktop?.platform:void 0),onClick:()=>c(n),children:(0,b.jsx)(f,{"aria-hidden":`true`})}):null,t[27]=y,t[28]=c,t[29]=n,t[30]=M):M=t[30];let N;t[31]===u?N=t[32]:(N=u({id:`rUWrSE`}),t[31]=u,t[32]=N);let P;t[33]!==l||t[34]!==n?(P=()=>l(n),t[33]=l,t[34]=n,t[35]=P):P=t[35];let F;t[36]===a?F=t[37]:(F=a===`deleting`?(0,b.jsx)(p,{"aria-hidden":`true`}):(0,b.jsx)(m,{"aria-hidden":`true`}),t[36]=a,t[37]=F);let I;t[38]!==y||t[39]!==N||t[40]!==P||t[41]!==F?(I=(0,b.jsx)(o,{variant:`ghost`,size:`icon-xs`,disabled:y,"aria-label":N,onClick:P,children:F}),t[38]=y,t[39]=N,t[40]=P,t[41]=F,t[42]=I):I=t[42];let L;t[43]!==I||t[44]!==j||t[45]!==M?(L=(0,b.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[j,M,I]}),t[43]=I,t[44]=j,t[45]=M,t[46]=L):L=t[46];let R;return t[47]!==L||t[48]!==A?(R=(0,b.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-md border px-3 py-2.5`,children:[A,L]}),t[47]=L,t[48]=A,t[49]=R):R=t[49],R}function D(e){let t=(0,v.c)(13),{reports:n,pending:r,retry:i,remove:a,reveal:o}=e,s;if(t[0]!==r||t[1]!==a||t[2]!==n||t[3]!==i||t[4]!==o){let e;t[6]!==r||t[7]!==a||t[8]!==i||t[9]!==o?(e=e=>(0,b.jsx)(E,{row:e,pending:r[e.id],onRetry:i,onReveal:o,onDelete:a},e.id),t[6]=r,t[7]=a,t[8]=i,t[9]=o,t[10]=e):e=t[10],s=n.map(e),t[0]=r,t[1]=a,t[2]=n,t[3]=i,t[4]=o,t[5]=s}else s=t[5];let c;return t[11]===s?c=t[12]:(c=(0,b.jsx)(`div`,{className:`flex flex-col gap-2`,children:s}),t[11]=s,t[12]=c),c}function O(e){let t=(0,v.c)(9),{onReportABug:n}=e,i=S();if(i.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2.5 py-6 text-sm text-muted-foreground`,children:[(0,b.jsx)(p,{className:`size-4`,"aria-hidden":`true`}),(0,b.jsx)(r,{id:`VmJT51`})]}),t[0]=e):e=t[0],e}if(i.status===`error`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(`p`,{className:`py-6 text-sm text-muted-foreground`,children:(0,b.jsx)(r,{id:`FgQ7XZ`})}),t[1]=e):e=t[1],e}if(i.reports.length===0){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,b.jsx)(r,{id:`wcfO9r`})}),t[2]=e):e=t[2];let i;t[3]===n?i=t[4]:(i=n?(0,b.jsx)(o,{onClick:n,children:(0,b.jsx)(r,{id:`cd5EXh`})}):null,t[3]=n,t[4]=i);let a;return t[5]===i?a=t[6]:(a=(0,b.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6 text-center`,children:[e,i]}),t[5]=i,t[6]=a),a}let a;return t[7]===i?a=t[8]:(a=(0,b.jsx)(D,{...i}),t[7]=i,t[8]=a),a}function k(){let e=(0,v.c)(14),[t,n]=(0,y.useState)(!1),i=S();if(i.status!==`ready`||i.reports.length===0)return null;let a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,b.jsx)(r,{id:`c2ktXL`}),e[0]=a):a=e[0];let u;e[1]===i.reports.length?u=e[2]:(u=(0,b.jsxs)(`span`,{className:`text-sm font-medium`,children:[a,` `,(0,b.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,i.reports.length,`)`]})]}),e[1]=i.reports.length,e[2]=u);let f=`transition-transform motion-reduce:transition-none ${t?`rotate-180`:``}`,p;e[3]===f?p=e[4]:(p=(0,b.jsx)(d,{className:f,"aria-hidden":`true`}),e[3]=f,e[4]=p);let m;e[5]!==u||e[6]!==p?(m=(0,b.jsx)(c,{asChild:!0,children:(0,b.jsxs)(o,{variant:`ghost`,size:`sm`,className:`-mx-2 -my-0.5 h-auto w-[calc(100%+1rem)] justify-between px-2 py-1.5 data-[state=open]:bg-transparent data-[state=open]:hover:bg-muted`,children:[u,p]})}),e[5]=u,e[6]=p,e[7]=m):m=e[7];let h;e[8]===i?h=e[9]:(h=(0,b.jsx)(s,{className:`pt-2`,children:(0,b.jsx)(D,{...i})}),e[8]=i,e[9]=h);let g;return e[10]!==t||e[11]!==m||e[12]!==h?(g=(0,b.jsxs)(l,{open:t,onOpenChange:n,children:[m,h]}),e[10]=t,e[11]=m,e[12]=h,e[13]=g):g=e[13],g}export{k as n,O as t};
|
package/dist/public/assets/{BugReportHistoryDialog-C2b4xA3d.js → BugReportHistoryDialog--YdGm_GJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{n as t}from"./dist-Nvb76hAm.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{a as r,c as i,i as a,n as o,s,t as c}from"./dialog-
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{n as t}from"./dist-Nvb76hAm.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{a as r,c as i,i as a,n as o,s,t as c}from"./dialog-R8GugqUq.js";import{t as l}from"./BugReportHistory-CDRTpJV0.js";var u=n(),d=e();function f(e){let n=(0,u.c)(11),{open:f,onOpenChange:p,onReportABug:m}=e,h;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(i,{children:(0,d.jsx)(t,{id:`QHCx0c`})}),n[0]=h):h=n[0];let g;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,d.jsxs)(s,{children:[h,(0,d.jsx)(r,{children:(0,d.jsx)(t,{id:`5ss1kT`})})]}),n[1]=g):g=n[1];let _;n[2]!==m||n[3]!==f?(_=f?(0,d.jsx)(l,{onReportABug:m}):null,n[2]=m,n[3]=f,n[4]=_):_=n[4];let v;n[5]===_?v=n[6]:(v=(0,d.jsxs)(a,{className:`sm:max-w-md`,children:[g,(0,d.jsx)(o,{className:`max-h-[60vh] overflow-y-auto`,children:_})]}),n[5]=_,n[6]=v);let y;return n[7]!==p||n[8]!==f||n[9]!==v?(y=(0,d.jsx)(c,{open:f,onOpenChange:p,children:v}),n[7]=p,n[8]=f,n[9]=v,n[10]=y):y=n[10],y}export{f as default};
|
package/dist/public/assets/{ChangedOutsideBadge-DdpCQcxq.js → ChangedOutsideBadge-6xW5IDHL.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Tn as n}from"./DocumentContext-BN8gSwJ-.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./mascot-outline-CtS592mc.js";import{t as l}from"./button-CA0dewJJ.js";import{a as u,r as d}from"./dist-mv8e6dBX.js";import{c as f,o as p}from"./dist-DsLZcVyZ.js";import{i as m,n as h,t as g}from"./tooltip-DHXgxWLL.js";import{_,d as v,f as y,g as b,h as x,l as S,m as C,p as w,u as T,v as E}from"./dialog-DztIj-ZS.js";import{p as D,r as O}from"./terminal-cli-display-CW7j5kqb.js";import{Ba as k}from"./dist-GenOktAv.js";import{t as A}from"./createLucideIcon-Bhw2PmPp.js";import{t as j}from"./folder-CopDpuy5.js";import{t as ee}from"./spinner-BqySY7qY.js";var M=t(),N=e(r(),1),P=o(),te=3100,ne=3;function re(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??ne;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var ie={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},ae=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function oe(e,t={}){let n=t.rng??Math.random,r=t.colors??ae,i=ie[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var se=1.8,ce=90,le=16,ue=380,de=.025,fe=.1,pe=.18,me=400,he=9.2736,ge=18.1799,F=14.5244,_e={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function ve(e,t){let{halfWidth:n,apexLift:r}=_e[t];return`M${e-n} ${F+.3} Q${e} ${F-r}, ${e+n} ${F+.3}`}function ye(e){let t=1.5,n=.3;return`M${e-t} ${F-n} Q${e} ${F+1.4}, ${e+t} ${F-n}`}var be=15,xe=15;function I(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function L(e){let t=(0,P.c)(73),{size:n,className:r,style:i,trackMouse:a,variant:o,celebrateSignal:l,onRage:u}=e,d=n===void 0?48:n,f=a===void 0?!0:a,p=o===void 0?`default`:o,m=l===void 0?0:l,h=(0,N.useRef)(null),g=(0,N.useRef)(null),_=(0,N.useRef)(null),v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={x:0,y:0},t[0]=v):v=t[0];let y=(0,N.useRef)(v),[b,x]=(0,N.useState)(0),[S,C]=(0,N.useState)(0),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=[],t[1]=w):w=t[1];let[T,E]=(0,N.useState)(w),D=(0,N.useRef)(0),O=(0,N.useRef)(void 0),k=p===`sleeping`,A;t[2]!==b||t[3]!==k||t[4]!==u?(A=function(){if(k)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=D.current===0?1/0:e-D.current;D.current=e;let n=re(b,t);n===3&&u?.(),x(n),C(Te),E(oe(n)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te)},t[2]=b,t[3]=k,t[4]=u,t[5]=A):A=t[5];let j=A,ee,ne;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>()=>clearTimeout(O.current),ne=[],t[6]=ee,t[7]=ne):(ee=t[6],ne=t[7]),(0,N.useEffect)(ee,ne);let ie,ae;t[8]!==m||t[9]!==k?(ie=()=>{m===0||k||(x(3),C(we),E(oe(3)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te))},ae=[m,k],t[8]=m,t[9]=k,t[10]=ie,t[11]=ae):(ie=t[10],ae=t[11]),(0,N.useEffect)(ie,ae);let _e,be;t[12]!==k||t[13]!==f?(_e=()=>{if(!f||k||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,c=function(){s===0&&(s=requestAnimationFrame(u))},l=function(r){e=r.clientX,t=r.clientY,n=!0,c()};function u(){s=0;let l=g.current,u=h.current;if(!l||!u){c();return}let d=n;n=!1;let f=l.getBoundingClientRect(),p=f.left+f.width/2,m=f.top+f.height*.48,v=e-p,b=t-m,x=Math.hypot(v,b),S=Math.max(-1,Math.min(1,v/ue)),C=-Math.max(-1,Math.min(1,b/ue))*le,w=S*le,T=0,E=0;if(x>=1){let e=Math.min(x/ce,1)*se;T=v/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!d&&D)return;c(),r+=(C-r)*fe,i+=(w-i)*fe,u.style.transform=`perspective(${me}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*pe,o+=(E-o)*pe;let O=i*de,k=-r*de,A=a+O,j=o+k;y.current.x=A,y.current.y=j,_.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,l,{passive:!0}),c(),()=>{document.removeEventListener(`mousemove`,l),s!==0&&cancelAnimationFrame(s),s=0,h.current&&(h.current.style.transform=``),y.current={x:0,y:0},_.current?.removeAttribute(`transform`)}},be=[f,k],t[12]=k,t[13]=f,t[14]=_e,t[15]=be):(_e=t[14],be=t[15]),(0,N.useEffect)(_e,be);let xe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(xe=()=>{let e=_.current;if(!e)return;let{x:t,y:n}=y.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[16]=xe):xe=t[16],(0,N.useLayoutEffect)(xe);let I=b>0,L=I?b:1,Ee=I?`ok-blob-clicked-${b}`:null,R;t[17]===r?R=t[18]:(R=s(`ok-blob-3d-wrapper`,r),t[17]=r,t[18]=R);let De=k?`cursor-default`:`cursor-pointer`,z=`body-${S}`,Oe=k&&`ok-blob-sleeping`,B;t[19]!==Ee||t[20]!==Oe?(B=s(`ok-blob-group`,Oe,Ee),t[19]=Ee,t[20]=Oe,t[21]=B):B=t[21];let ke;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,M.jsx)(`path`,{d:c,className:`ok-blob-body`}),t[22]=ke):ke=t[22];let Ae=(I||k)&&`ok-blob-eye-hidden`,V;t[23]===Ae?V=t[24]:(V=s(`ok-blob-eye`,Ae),t[23]=Ae,t[24]=V);let H;t[25]===V?H=t[26]:(H=(0,M.jsx)(`ellipse`,{cx:he,cy:F,rx:1.2722,ry:1.9083,className:V}),t[25]=V,t[26]=H);let je=(I||k)&&`ok-blob-eye-hidden`,U;t[27]===je?U=t[28]:(U=s(`ok-blob-eye ok-blob-eye-right`,je),t[27]=je,t[28]=U);let W;t[29]===U?W=t[30]:(W=(0,M.jsx)(`ellipse`,{cx:ge,cy:F,rx:1.2722,ry:1.9083,className:U}),t[29]=U,t[30]=W);let G;t[31]===L?G=t[32]:(G=ve(he,L),t[31]=L,t[32]=G);let Me=(!I||k)&&`ok-blob-eye-hidden`,K;t[33]===Me?K=t[34]:(K=s(`ok-blob-happy-eye`,Me),t[33]=Me,t[34]=K);let q;t[35]!==G||t[36]!==K?(q=(0,M.jsx)(`path`,{d:G,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:K}),t[35]=G,t[36]=K,t[37]=q):q=t[37];let J;t[38]===L?J=t[39]:(J=ve(ge,L),t[38]=L,t[39]=J);let Ne=(!I||k)&&`ok-blob-eye-hidden`,Y;t[40]===Ne?Y=t[41]:(Y=s(`ok-blob-happy-eye`,Ne),t[40]=Ne,t[41]=Y);let X;t[42]!==J||t[43]!==Y?(X=(0,M.jsx)(`path`,{d:J,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:Y}),t[42]=J,t[43]=Y,t[44]=X):X=t[44];let Z;t[45]===k?Z=t[46]:(Z=k?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:ye(he),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,M.jsx)(`path`,{d:ye(ge),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[45]=k,t[46]=Z);let Q;t[47]!==H||t[48]!==W||t[49]!==q||t[50]!==X||t[51]!==Z?(Q=(0,M.jsxs)(`g`,{ref:_,children:[H,W,q,X,Z]}),t[47]=H,t[48]=W,t[49]=q,t[50]=X,t[51]=Z,t[52]=Q):Q=t[52];let $;t[53]!==z||t[54]!==B||t[55]!==Q?($=(0,M.jsxs)(`g`,{className:B,children:[ke,Q]},z),t[53]=z,t[54]=B,t[55]=Q,t[56]=$):$=t[56];let Pe;t[57]===k?Pe=t[58]:(Pe=k?(0,M.jsxs)(`g`,{children:[(0,M.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,M.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[57]=k,t[58]=Pe);let Fe;t[59]!==S||t[60]!==T?(Fe=T.length>0&&(0,M.jsx)(`g`,{children:T.map(Se)},`firework-${S}`),t[59]=S,t[60]=T,t[61]=Fe):Fe=t[61];let Ie;t[62]!==j||t[63]!==d||t[64]!==De||t[65]!==$||t[66]!==Pe||t[67]!==Fe?(Ie=(0,M.jsxs)(`svg`,{ref:g,width:d,height:d,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:De,"aria-hidden":`true`,onClick:j,onMouseDown:Ce,children:[$,Pe,Fe]}),t[62]=j,t[63]=d,t[64]=De,t[65]=$,t[66]=Pe,t[67]=Fe,t[68]=Ie):Ie=t[68];let Le;return t[69]!==i||t[70]!==R||t[71]!==Ie?(Le=(0,M.jsx)(`span`,{ref:h,className:R,style:i,children:Ie}),t[69]=i,t[70]=R,t[71]=Ie,t[72]=Le):Le=t[72],Le}function Se(e){return(0,M.jsx)(`circle`,{cx:be+e.originDx,cy:xe+e.originDy,r:e.size,className:`ok-blob-firework`,style:I(e)},e.id)}function Ce(e){return e.preventDefault()}function we(e){return e+1}function Te(e){return e+1}var Ee=`AlertDialog`,[R,De]=f(Ee,[E]),z=E(),Oe=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(C,{...r,...n,modal:!0})};Oe.displayName=Ee;var B=`AlertDialogTrigger`,ke=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(b,{...i,...r,ref:t})});ke.displayName=B;var Ae=`AlertDialogPortal`,V=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(w,{...r,...n})};V.displayName=Ae;var H=`AlertDialogOverlay`,je=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(y,{...i,...r,ref:t})});je.displayName=H;var U=`AlertDialogContent`,[W,G]=R(U),Me=d(`AlertDialogContent`),K=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=z(n),o=N.useRef(null),s=u(t,o),c=N.useRef(null);return(0,M.jsx)(_,{contentName:U,titleName:q,docsSlug:`alert-dialog`,children:(0,M.jsx)(W,{scope:n,cancelRef:c,children:(0,M.jsxs)(T,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:p(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,M.jsx)(Me,{children:r}),(0,M.jsx)(Pe,{contentRef:o})]})})})});K.displayName=U;var q=`AlertDialogTitle`,J=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(x,{...i,...r,ref:t})});J.displayName=q;var Ne=`AlertDialogDescription`,Y=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(v,{...i,...r,ref:t})});Y.displayName=Ne;var X=`AlertDialogAction`,Z=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(S,{...i,...r,ref:t})});Z.displayName=X;var Q=`AlertDialogCancel`,$=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=G(Q,n),a=z(n),o=u(t,i);return(0,M.jsx)(S,{...a,...r,ref:o})});$.displayName=Q;var Pe=({contentRef:e})=>{let t=`\`${U}\` requires a description for the component to be accessible for screen reader users.
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Tn as n}from"./DocumentContext-DCB_2FMP.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./mascot-outline-CtS592mc.js";import{t as l}from"./button-CA0dewJJ.js";import{a as u,r as d}from"./dist-mv8e6dBX.js";import{c as f,o as p}from"./dist-DsLZcVyZ.js";import{i as m,n as h,t as g}from"./tooltip-DHXgxWLL.js";import{_,d as v,f as y,g as b,h as x,l as S,m as C,p as w,u as T,v as E}from"./dialog-R8GugqUq.js";import{p as D,r as O}from"./terminal-cli-display-DphQFt7y.js";import{Ha as k}from"./dist-DPUOICsM.js";import{t as A}from"./createLucideIcon-Bhw2PmPp.js";import{t as j}from"./folder-CWlDik9N.js";import{t as ee}from"./spinner-CHTY-VE-.js";var M=t(),N=e(r(),1),P=o(),te=3100,ne=3;function re(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??ne;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var ie={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},ae=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function oe(e,t={}){let n=t.rng??Math.random,r=t.colors??ae,i=ie[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var se=1.8,ce=90,le=16,ue=380,de=.025,fe=.1,pe=.18,me=400,he=9.2736,ge=18.1799,F=14.5244,_e={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function ve(e,t){let{halfWidth:n,apexLift:r}=_e[t];return`M${e-n} ${F+.3} Q${e} ${F-r}, ${e+n} ${F+.3}`}function ye(e){let t=1.5,n=.3;return`M${e-t} ${F-n} Q${e} ${F+1.4}, ${e+t} ${F-n}`}var be=15,xe=15;function I(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function L(e){let t=(0,P.c)(73),{size:n,className:r,style:i,trackMouse:a,variant:o,celebrateSignal:l,onRage:u}=e,d=n===void 0?48:n,f=a===void 0?!0:a,p=o===void 0?`default`:o,m=l===void 0?0:l,h=(0,N.useRef)(null),g=(0,N.useRef)(null),_=(0,N.useRef)(null),v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={x:0,y:0},t[0]=v):v=t[0];let y=(0,N.useRef)(v),[b,x]=(0,N.useState)(0),[S,C]=(0,N.useState)(0),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=[],t[1]=w):w=t[1];let[T,E]=(0,N.useState)(w),D=(0,N.useRef)(0),O=(0,N.useRef)(void 0),k=p===`sleeping`,A;t[2]!==b||t[3]!==k||t[4]!==u?(A=function(){if(k)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=D.current===0?1/0:e-D.current;D.current=e;let n=re(b,t);n===3&&u?.(),x(n),C(Te),E(oe(n)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te)},t[2]=b,t[3]=k,t[4]=u,t[5]=A):A=t[5];let j=A,ee,ne;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>()=>clearTimeout(O.current),ne=[],t[6]=ee,t[7]=ne):(ee=t[6],ne=t[7]),(0,N.useEffect)(ee,ne);let ie,ae;t[8]!==m||t[9]!==k?(ie=()=>{m===0||k||(x(3),C(we),E(oe(3)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te))},ae=[m,k],t[8]=m,t[9]=k,t[10]=ie,t[11]=ae):(ie=t[10],ae=t[11]),(0,N.useEffect)(ie,ae);let _e,be;t[12]!==k||t[13]!==f?(_e=()=>{if(!f||k||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,c=function(){s===0&&(s=requestAnimationFrame(u))},l=function(r){e=r.clientX,t=r.clientY,n=!0,c()};function u(){s=0;let l=g.current,u=h.current;if(!l||!u){c();return}let d=n;n=!1;let f=l.getBoundingClientRect(),p=f.left+f.width/2,m=f.top+f.height*.48,v=e-p,b=t-m,x=Math.hypot(v,b),S=Math.max(-1,Math.min(1,v/ue)),C=-Math.max(-1,Math.min(1,b/ue))*le,w=S*le,T=0,E=0;if(x>=1){let e=Math.min(x/ce,1)*se;T=v/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!d&&D)return;c(),r+=(C-r)*fe,i+=(w-i)*fe,u.style.transform=`perspective(${me}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*pe,o+=(E-o)*pe;let O=i*de,k=-r*de,A=a+O,j=o+k;y.current.x=A,y.current.y=j,_.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,l,{passive:!0}),c(),()=>{document.removeEventListener(`mousemove`,l),s!==0&&cancelAnimationFrame(s),s=0,h.current&&(h.current.style.transform=``),y.current={x:0,y:0},_.current?.removeAttribute(`transform`)}},be=[f,k],t[12]=k,t[13]=f,t[14]=_e,t[15]=be):(_e=t[14],be=t[15]),(0,N.useEffect)(_e,be);let xe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(xe=()=>{let e=_.current;if(!e)return;let{x:t,y:n}=y.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[16]=xe):xe=t[16],(0,N.useLayoutEffect)(xe);let I=b>0,L=I?b:1,Ee=I?`ok-blob-clicked-${b}`:null,R;t[17]===r?R=t[18]:(R=s(`ok-blob-3d-wrapper`,r),t[17]=r,t[18]=R);let De=k?`cursor-default`:`cursor-pointer`,z=`body-${S}`,Oe=k&&`ok-blob-sleeping`,B;t[19]!==Ee||t[20]!==Oe?(B=s(`ok-blob-group`,Oe,Ee),t[19]=Ee,t[20]=Oe,t[21]=B):B=t[21];let ke;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,M.jsx)(`path`,{d:c,className:`ok-blob-body`}),t[22]=ke):ke=t[22];let Ae=(I||k)&&`ok-blob-eye-hidden`,V;t[23]===Ae?V=t[24]:(V=s(`ok-blob-eye`,Ae),t[23]=Ae,t[24]=V);let H;t[25]===V?H=t[26]:(H=(0,M.jsx)(`ellipse`,{cx:he,cy:F,rx:1.2722,ry:1.9083,className:V}),t[25]=V,t[26]=H);let je=(I||k)&&`ok-blob-eye-hidden`,U;t[27]===je?U=t[28]:(U=s(`ok-blob-eye ok-blob-eye-right`,je),t[27]=je,t[28]=U);let W;t[29]===U?W=t[30]:(W=(0,M.jsx)(`ellipse`,{cx:ge,cy:F,rx:1.2722,ry:1.9083,className:U}),t[29]=U,t[30]=W);let G;t[31]===L?G=t[32]:(G=ve(he,L),t[31]=L,t[32]=G);let Me=(!I||k)&&`ok-blob-eye-hidden`,K;t[33]===Me?K=t[34]:(K=s(`ok-blob-happy-eye`,Me),t[33]=Me,t[34]=K);let q;t[35]!==G||t[36]!==K?(q=(0,M.jsx)(`path`,{d:G,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:K}),t[35]=G,t[36]=K,t[37]=q):q=t[37];let J;t[38]===L?J=t[39]:(J=ve(ge,L),t[38]=L,t[39]=J);let Ne=(!I||k)&&`ok-blob-eye-hidden`,Y;t[40]===Ne?Y=t[41]:(Y=s(`ok-blob-happy-eye`,Ne),t[40]=Ne,t[41]=Y);let X;t[42]!==J||t[43]!==Y?(X=(0,M.jsx)(`path`,{d:J,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:Y}),t[42]=J,t[43]=Y,t[44]=X):X=t[44];let Z;t[45]===k?Z=t[46]:(Z=k?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:ye(he),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,M.jsx)(`path`,{d:ye(ge),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[45]=k,t[46]=Z);let Q;t[47]!==H||t[48]!==W||t[49]!==q||t[50]!==X||t[51]!==Z?(Q=(0,M.jsxs)(`g`,{ref:_,children:[H,W,q,X,Z]}),t[47]=H,t[48]=W,t[49]=q,t[50]=X,t[51]=Z,t[52]=Q):Q=t[52];let $;t[53]!==z||t[54]!==B||t[55]!==Q?($=(0,M.jsxs)(`g`,{className:B,children:[ke,Q]},z),t[53]=z,t[54]=B,t[55]=Q,t[56]=$):$=t[56];let Pe;t[57]===k?Pe=t[58]:(Pe=k?(0,M.jsxs)(`g`,{children:[(0,M.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,M.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[57]=k,t[58]=Pe);let Fe;t[59]!==S||t[60]!==T?(Fe=T.length>0&&(0,M.jsx)(`g`,{children:T.map(Se)},`firework-${S}`),t[59]=S,t[60]=T,t[61]=Fe):Fe=t[61];let Ie;t[62]!==j||t[63]!==d||t[64]!==De||t[65]!==$||t[66]!==Pe||t[67]!==Fe?(Ie=(0,M.jsxs)(`svg`,{ref:g,width:d,height:d,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:De,"aria-hidden":`true`,onClick:j,onMouseDown:Ce,children:[$,Pe,Fe]}),t[62]=j,t[63]=d,t[64]=De,t[65]=$,t[66]=Pe,t[67]=Fe,t[68]=Ie):Ie=t[68];let Le;return t[69]!==i||t[70]!==R||t[71]!==Ie?(Le=(0,M.jsx)(`span`,{ref:h,className:R,style:i,children:Ie}),t[69]=i,t[70]=R,t[71]=Ie,t[72]=Le):Le=t[72],Le}function Se(e){return(0,M.jsx)(`circle`,{cx:be+e.originDx,cy:xe+e.originDy,r:e.size,className:`ok-blob-firework`,style:I(e)},e.id)}function Ce(e){return e.preventDefault()}function we(e){return e+1}function Te(e){return e+1}var Ee=`AlertDialog`,[R,De]=f(Ee,[E]),z=E(),Oe=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(C,{...r,...n,modal:!0})};Oe.displayName=Ee;var B=`AlertDialogTrigger`,ke=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(b,{...i,...r,ref:t})});ke.displayName=B;var Ae=`AlertDialogPortal`,V=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(w,{...r,...n})};V.displayName=Ae;var H=`AlertDialogOverlay`,je=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(y,{...i,...r,ref:t})});je.displayName=H;var U=`AlertDialogContent`,[W,G]=R(U),Me=d(`AlertDialogContent`),K=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=z(n),o=N.useRef(null),s=u(t,o),c=N.useRef(null);return(0,M.jsx)(_,{contentName:U,titleName:q,docsSlug:`alert-dialog`,children:(0,M.jsx)(W,{scope:n,cancelRef:c,children:(0,M.jsxs)(T,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:p(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,M.jsx)(Me,{children:r}),(0,M.jsx)(Pe,{contentRef:o})]})})})});K.displayName=U;var q=`AlertDialogTitle`,J=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(x,{...i,...r,ref:t})});J.displayName=q;var Ne=`AlertDialogDescription`,Y=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(v,{...i,...r,ref:t})});Y.displayName=Ne;var X=`AlertDialogAction`,Z=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(S,{...i,...r,ref:t})});Z.displayName=X;var Q=`AlertDialogCancel`,$=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=G(Q,n),a=z(n),o=u(t,i);return(0,M.jsx)(S,{...a,...r,ref:o})});$.displayName=Q;var Pe=({contentRef:e})=>{let t=`\`${U}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${U}\` by passing a \`${Ne}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|