agim-cli 1.4.8 → 1.4.9
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/core/memory-distiller.d.ts +10 -4
- package/dist/core/memory-distiller.d.ts.map +1 -1
- package/dist/core/memory-distiller.js +23 -9
- package/dist/core/memory-distiller.js.map +1 -1
- package/dist/web/public/assets/{a2a-Dnc-MHI-.js → a2a-CZxwvgvh.js} +2 -2
- package/dist/web/public/assets/{a2a-Dnc-MHI-.js.map → a2a-CZxwvgvh.js.map} +1 -1
- package/dist/web/public/assets/{activity-CKQwfSVC.js → activity-BnlFGipw.js} +2 -2
- package/dist/web/public/assets/{activity-CKQwfSVC.js.map → activity-BnlFGipw.js.map} +1 -1
- package/dist/web/public/assets/{admins-C7MdDEF0.js → admins-CH84Rw1d.js} +2 -2
- package/dist/web/public/assets/{admins-C7MdDEF0.js.map → admins-CH84Rw1d.js.map} +1 -1
- package/dist/web/public/assets/{agents-Be4IUCYz.js → agents-CFB4Uj6b.js} +2 -2
- package/dist/web/public/assets/{agents-Be4IUCYz.js.map → agents-CFB4Uj6b.js.map} +1 -1
- package/dist/web/public/assets/{approvals-KCd1BSvN.js → approvals-DnzjbDR6.js} +2 -2
- package/dist/web/public/assets/{approvals-KCd1BSvN.js.map → approvals-DnzjbDR6.js.map} +1 -1
- package/dist/web/public/assets/{arrow-down-NRUr_gzg.js → arrow-down-DxlRHrs8.js} +2 -2
- package/dist/web/public/assets/{arrow-down-NRUr_gzg.js.map → arrow-down-DxlRHrs8.js.map} +1 -1
- package/dist/web/public/assets/{arrow-up-4KyqPaSd.js → arrow-up-CAiQ2jy-.js} +2 -2
- package/dist/web/public/assets/{arrow-up-4KyqPaSd.js.map → arrow-up-CAiQ2jy-.js.map} +1 -1
- package/dist/web/public/assets/{asks-nKwuDJpD.js → asks-DyUQopay.js} +2 -2
- package/dist/web/public/assets/{asks-nKwuDJpD.js.map → asks-DyUQopay.js.map} +1 -1
- package/dist/web/public/assets/{audit-Bf4Yv1or.js → audit-BVHTMS82.js} +2 -2
- package/dist/web/public/assets/{audit-Bf4Yv1or.js.map → audit-BVHTMS82.js.map} +1 -1
- package/dist/web/public/assets/{bell--lSOhH-X.js → bell-D7iS7ctN.js} +2 -2
- package/dist/web/public/assets/{bell--lSOhH-X.js.map → bell-D7iS7ctN.js.map} +1 -1
- package/dist/web/public/assets/{bgjobs-Daya2BMh.js → bgjobs-BYCQhd_1.js} +2 -2
- package/dist/web/public/assets/{bgjobs-Daya2BMh.js.map → bgjobs-BYCQhd_1.js.map} +1 -1
- package/dist/web/public/assets/{brain-DF90t0yo.js → brain-CCF25Egu.js} +2 -2
- package/dist/web/public/assets/{brain-DF90t0yo.js.map → brain-CCF25Egu.js.map} +1 -1
- package/dist/web/public/assets/{briefcase-aRM_fCrr.js → briefcase-BMLMD8nM.js} +2 -2
- package/dist/web/public/assets/{briefcase-aRM_fCrr.js.map → briefcase-BMLMD8nM.js.map} +1 -1
- package/dist/web/public/assets/{chat-BhnNXkIJ.js → chat-DPkKy5y_.js} +2 -2
- package/dist/web/public/assets/{chat-BhnNXkIJ.js.map → chat-DPkKy5y_.js.map} +1 -1
- package/dist/web/public/assets/{chevron-left-DK-fhgiL.js → chevron-left-BDO3vw8G.js} +2 -2
- package/dist/web/public/assets/{chevron-left-DK-fhgiL.js.map → chevron-left-BDO3vw8G.js.map} +1 -1
- package/dist/web/public/assets/{chevron-right-BGhMfCcE.js → chevron-right-5ZUC2opg.js} +2 -2
- package/dist/web/public/assets/{chevron-right-BGhMfCcE.js.map → chevron-right-5ZUC2opg.js.map} +1 -1
- package/dist/web/public/assets/{circle-check-BWBI4Qhk.js → circle-check-COhM5JsK.js} +2 -2
- package/dist/web/public/assets/{circle-check-BWBI4Qhk.js.map → circle-check-COhM5JsK.js.map} +1 -1
- package/dist/web/public/assets/{circle-check-big-BppjBT7j.js → circle-check-big-DHAHqUlS.js} +2 -2
- package/dist/web/public/assets/{circle-check-big-BppjBT7j.js.map → circle-check-big-DHAHqUlS.js.map} +1 -1
- package/dist/web/public/assets/{circle-x-BZ3UUhcm.js → circle-x-7VaoZ7dY.js} +2 -2
- package/dist/web/public/assets/{circle-x-BZ3UUhcm.js.map → circle-x-7VaoZ7dY.js.map} +1 -1
- package/dist/web/public/assets/{clock-ChP0IxI4.js → clock-ZPVXnd6V.js} +2 -2
- package/dist/web/public/assets/{clock-ChP0IxI4.js.map → clock-ZPVXnd6V.js.map} +1 -1
- package/dist/web/public/assets/{confirm-dialog-DrP5Lfwx.js → confirm-dialog-CgpJL9oN.js} +2 -2
- package/dist/web/public/assets/{confirm-dialog-DrP5Lfwx.js.map → confirm-dialog-CgpJL9oN.js.map} +1 -1
- package/dist/web/public/assets/{copy-CR2c0pyG.js → copy-BaZl52tH.js} +2 -2
- package/dist/web/public/assets/{copy-CR2c0pyG.js.map → copy-BaZl52tH.js.map} +1 -1
- package/dist/web/public/assets/{data-table-DElP7TJm.js → data-table-BLYG79TX.js} +2 -2
- package/dist/web/public/assets/{data-table-DElP7TJm.js.map → data-table-BLYG79TX.js.map} +1 -1
- package/dist/web/public/assets/distill-D9p8O8Jf.js +7 -0
- package/dist/web/public/assets/distill-D9p8O8Jf.js.map +1 -0
- package/dist/web/public/assets/{download-DO4Kw3Fi.js → download-bzCepctg.js} +2 -2
- package/dist/web/public/assets/{download-DO4Kw3Fi.js.map → download-bzCepctg.js.map} +1 -1
- package/dist/web/public/assets/{email-Dkqwudqq.js → email-Douv-rZ5.js} +2 -2
- package/dist/web/public/assets/{email-Dkqwudqq.js.map → email-Douv-rZ5.js.map} +1 -1
- package/dist/web/public/assets/{empty-state-DGH3i5i2.js → empty-state-96qpPTNg.js} +2 -2
- package/dist/web/public/assets/{empty-state-DGH3i5i2.js.map → empty-state-96qpPTNg.js.map} +1 -1
- package/dist/web/public/assets/{external-link-B6aOBfUG.js → external-link-J4nIlCem.js} +2 -2
- package/dist/web/public/assets/{external-link-B6aOBfUG.js.map → external-link-J4nIlCem.js.map} +1 -1
- package/dist/web/public/assets/{eye-BMxHZFil.js → eye-BvsBLK42.js} +2 -2
- package/dist/web/public/assets/{eye-BMxHZFil.js.map → eye-BvsBLK42.js.map} +1 -1
- package/dist/web/public/assets/{facts-B9PlO3xo.js → facts-DMucDXYd.js} +2 -2
- package/dist/web/public/assets/{facts-B9PlO3xo.js.map → facts-DMucDXYd.js.map} +1 -1
- package/dist/web/public/assets/{goals-DX_RjDAM.js → goals-B9ETHgL0.js} +2 -2
- package/dist/web/public/assets/{goals-DX_RjDAM.js.map → goals-B9ETHgL0.js.map} +1 -1
- package/dist/web/public/assets/{health-BAcwcy02.js → health-DLzZ7KHc.js} +2 -2
- package/dist/web/public/assets/{health-BAcwcy02.js.map → health-DLzZ7KHc.js.map} +1 -1
- package/dist/web/public/assets/{heart-pulse-Cl-tJTJY.js → heart-pulse-CVEeD2sz.js} +2 -2
- package/dist/web/public/assets/{heart-pulse-Cl-tJTJY.js.map → heart-pulse-CVEeD2sz.js.map} +1 -1
- package/dist/web/public/assets/{heartbeat-BF_rPcKb.js → heartbeat-B1BEBHge.js} +2 -2
- package/dist/web/public/assets/{heartbeat-BF_rPcKb.js.map → heartbeat-B1BEBHge.js.map} +1 -1
- package/dist/web/public/assets/{hot-XOCA1xAY.js → hot-Yc7iad0D.js} +2 -2
- package/dist/web/public/assets/{hot-XOCA1xAY.js.map → hot-Yc7iad0D.js.map} +1 -1
- package/dist/web/public/assets/{index-CzlhMSb2.js → index-DY2Zglku.js} +3 -3
- package/dist/web/public/assets/{index-CzlhMSb2.js.map → index-DY2Zglku.js.map} +1 -1
- package/dist/web/public/assets/{injection-ecvQ-6Ya.js → injection-Ca-9gbo0.js} +2 -2
- package/dist/web/public/assets/{injection-ecvQ-6Ya.js.map → injection-Ca-9gbo0.js.map} +1 -1
- package/dist/web/public/assets/{installed-D8VzYRBe.js → installed-Zz34apdi.js} +2 -2
- package/dist/web/public/assets/{installed-D8VzYRBe.js.map → installed-Zz34apdi.js.map} +1 -1
- package/dist/web/public/assets/{jobs-CpuY6G8D.js → jobs-CtVRpl0r.js} +2 -2
- package/dist/web/public/assets/{jobs-CpuY6G8D.js.map → jobs-CtVRpl0r.js.map} +1 -1
- package/dist/web/public/assets/{layout-DdbuRh8P.js → layout-BTCLgkgN.js} +2 -2
- package/dist/web/public/assets/{layout-DdbuRh8P.js.map → layout-BTCLgkgN.js.map} +1 -1
- package/dist/web/public/assets/{layout-Pxfmfh_2.js → layout-CtDc2i7w.js} +2 -2
- package/dist/web/public/assets/{layout-Pxfmfh_2.js.map → layout-CtDc2i7w.js.map} +1 -1
- package/dist/web/public/assets/{layout--XsfZzpI.js → layout-Cxch59sI.js} +2 -2
- package/dist/web/public/assets/{layout--XsfZzpI.js.map → layout-Cxch59sI.js.map} +1 -1
- package/dist/web/public/assets/{layout-BROGs5wv.js → layout-DnANw2Q2.js} +2 -2
- package/dist/web/public/assets/{layout-BROGs5wv.js.map → layout-DnANw2Q2.js.map} +1 -1
- package/dist/web/public/assets/{layout-BezPqRLV.js → layout-yIZG87fq.js} +2 -2
- package/dist/web/public/assets/{layout-BezPqRLV.js.map → layout-yIZG87fq.js.map} +1 -1
- package/dist/web/public/assets/{llm-IXFv_MMM.js → llm-CMMa85Ig.js} +2 -2
- package/dist/web/public/assets/{llm-IXFv_MMM.js.map → llm-CMMa85Ig.js.map} +1 -1
- package/dist/web/public/assets/{loader-circle-AgQ2XO06.js → loader-circle-D8L1w9c1.js} +2 -2
- package/dist/web/public/assets/{loader-circle-AgQ2XO06.js.map → loader-circle-D8L1w9c1.js.map} +1 -1
- package/dist/web/public/assets/{map-pin-C6sGB9SZ.js → map-pin--GMunU9n.js} +2 -2
- package/dist/web/public/assets/{map-pin-C6sGB9SZ.js.map → map-pin--GMunU9n.js.map} +1 -1
- package/dist/web/public/assets/{mcp-jqsjSumH.js → mcp-DhnXhO9B.js} +2 -2
- package/dist/web/public/assets/{mcp-jqsjSumH.js.map → mcp-DhnXhO9B.js.map} +1 -1
- package/dist/web/public/assets/{memos-C38YN2Rf.js → memos-DQZc7llR.js} +2 -2
- package/dist/web/public/assets/{memos-C38YN2Rf.js.map → memos-DQZc7llR.js.map} +1 -1
- package/dist/web/public/assets/{messengers-l74nqYZF.js → messengers-DwSmauLs.js} +2 -2
- package/dist/web/public/assets/{messengers-l74nqYZF.js.map → messengers-DwSmauLs.js.map} +1 -1
- package/dist/web/public/assets/{mobile-CHhYS0Tw.js → mobile-CUZ359rQ.js} +2 -2
- package/dist/web/public/assets/{mobile-CHhYS0Tw.js.map → mobile-CUZ359rQ.js.map} +1 -1
- package/dist/web/public/assets/{network-CIrcKaZn.js → network-BBdRdrH_.js} +2 -2
- package/dist/web/public/assets/{network-CIrcKaZn.js.map → network-BBdRdrH_.js.map} +1 -1
- package/dist/web/public/assets/{outbox-O1lzMZPk.js → outbox-CmN0U35l.js} +2 -2
- package/dist/web/public/assets/{outbox-O1lzMZPk.js.map → outbox-CmN0U35l.js.map} +1 -1
- package/dist/web/public/assets/{pagination-CXBUSf6r.js → pagination-DcsgDXXM.js} +2 -2
- package/dist/web/public/assets/{pagination-CXBUSf6r.js.map → pagination-DcsgDXXM.js.map} +1 -1
- package/dist/web/public/assets/{persona-CI4tkm_n.js → persona-ig2ac4mY.js} +2 -2
- package/dist/web/public/assets/{persona-CI4tkm_n.js.map → persona-ig2ac4mY.js.map} +1 -1
- package/dist/web/public/assets/{plans-D8RZ9aXq.js → plans-Bzbk8eUr.js} +2 -2
- package/dist/web/public/assets/{plans-D8RZ9aXq.js.map → plans-Bzbk8eUr.js.map} +1 -1
- package/dist/web/public/assets/{play-DQ3P_XWl.js → play-Di1jqulh.js} +2 -2
- package/dist/web/public/assets/{play-DQ3P_XWl.js.map → play-Di1jqulh.js.map} +1 -1
- package/dist/web/public/assets/{plus-Zai0UXKL.js → plus-C2zyJ1mF.js} +2 -2
- package/dist/web/public/assets/{plus-Zai0UXKL.js.map → plus-C2zyJ1mF.js.map} +1 -1
- package/dist/web/public/assets/{policy-BodrOHl5.js → policy-yD1c2Pcn.js} +2 -2
- package/dist/web/public/assets/{policy-BodrOHl5.js.map → policy-yD1c2Pcn.js.map} +1 -1
- package/dist/web/public/assets/{qr-code-zcjicWRK.js → qr-code-C-ACsKv_.js} +2 -2
- package/dist/web/public/assets/{qr-code-zcjicWRK.js.map → qr-code-C-ACsKv_.js.map} +1 -1
- package/dist/web/public/assets/{refresh-ccw-CM-Cjwud.js → refresh-ccw-7HdadG5V.js} +2 -2
- package/dist/web/public/assets/{refresh-ccw-CM-Cjwud.js.map → refresh-ccw-7HdadG5V.js.map} +1 -1
- package/dist/web/public/assets/{reminders-BR6noe6I.js → reminders-BDeiVYTC.js} +2 -2
- package/dist/web/public/assets/{reminders-BR6noe6I.js.map → reminders-BDeiVYTC.js.map} +1 -1
- package/dist/web/public/assets/{save-xBMgs6Bd.js → save-BYFmz9gD.js} +2 -2
- package/dist/web/public/assets/{save-xBMgs6Bd.js.map → save-BYFmz9gD.js.map} +1 -1
- package/dist/web/public/assets/{schedules-Brp1Fomd.js → schedules-BddzBrxI.js} +2 -2
- package/dist/web/public/assets/{schedules-Brp1Fomd.js.map → schedules-BddzBrxI.js.map} +1 -1
- package/dist/web/public/assets/{search-nk8nyLFI.js → search-B8PlbtLg.js} +2 -2
- package/dist/web/public/assets/{search-nk8nyLFI.js.map → search-B8PlbtLg.js.map} +1 -1
- package/dist/web/public/assets/{search-CIc8bWW1.js → search-DxkvV-8p.js} +2 -2
- package/dist/web/public/assets/{search-CIc8bWW1.js.map → search-DxkvV-8p.js.map} +1 -1
- package/dist/web/public/assets/{security-DWxWfpuX.js → security-DpOGp3nS.js} +2 -2
- package/dist/web/public/assets/{security-DWxWfpuX.js.map → security-DpOGp3nS.js.map} +1 -1
- package/dist/web/public/assets/{service-Bo9rkfQX.js → service-BsY8CaNG.js} +2 -2
- package/dist/web/public/assets/{service-Bo9rkfQX.js.map → service-BsY8CaNG.js.map} +1 -1
- package/dist/web/public/assets/{shield-alert-bg0_ILjD.js → shield-alert-DXGk9Rak.js} +2 -2
- package/dist/web/public/assets/{shield-alert-bg0_ILjD.js.map → shield-alert-DXGk9Rak.js.map} +1 -1
- package/dist/web/public/assets/{status-badge-Bw4TDDCb.js → status-badge-D0nbFSom.js} +2 -2
- package/dist/web/public/assets/{status-badge-Bw4TDDCb.js.map → status-badge-D0nbFSom.js.map} +1 -1
- package/dist/web/public/assets/{subtasks-D58R9C_Z.js → subtasks-DFiAXvDp.js} +2 -2
- package/dist/web/public/assets/{subtasks-D58R9C_Z.js.map → subtasks-DFiAXvDp.js.map} +1 -1
- package/dist/web/public/assets/{table-D4S5FCk_.js → table-_WsrnZ_T.js} +2 -2
- package/dist/web/public/assets/{table-D4S5FCk_.js.map → table-_WsrnZ_T.js.map} +1 -1
- package/dist/web/public/assets/{topn-DDxDNIZf.js → topn-C2PHE4tX.js} +2 -2
- package/dist/web/public/assets/{topn-DDxDNIZf.js.map → topn-C2PHE4tX.js.map} +1 -1
- package/dist/web/public/assets/{trash-2-CB7X8tay.js → trash-2-1Km439fW.js} +2 -2
- package/dist/web/public/assets/{trash-2-CB7X8tay.js.map → trash-2-1Km439fW.js.map} +1 -1
- package/dist/web/public/assets/{use-agim-skills-BV2IJPlc.js → use-agim-skills-COSqZrdH.js} +2 -2
- package/dist/web/public/assets/{use-agim-skills-BV2IJPlc.js.map → use-agim-skills-COSqZrdH.js.map} +1 -1
- package/dist/web/public/assets/{use-background-tasks-Dk9S55ip.js → use-background-tasks-wCL7jn68.js} +2 -2
- package/dist/web/public/assets/{use-background-tasks-Dk9S55ip.js.map → use-background-tasks-wCL7jn68.js.map} +1 -1
- package/dist/web/public/assets/{use-memory-DncmZXGJ.js → use-memory-B9oRyQC8.js} +2 -2
- package/dist/web/public/assets/{use-memory-DncmZXGJ.js.map → use-memory-B9oRyQC8.js.map} +1 -1
- package/dist/web/public/assets/{use-observability-CcDO7PdN.js → use-observability-DGkN80qa.js} +2 -2
- package/dist/web/public/assets/{use-observability-CcDO7PdN.js.map → use-observability-DGkN80qa.js.map} +1 -1
- package/dist/web/public/assets/{use-settings-DZhfMpNR.js → use-settings-Co-iafXD.js} +2 -2
- package/dist/web/public/assets/{use-settings-DZhfMpNR.js.map → use-settings-Co-iafXD.js.map} +1 -1
- package/dist/web/public/assets/{use-workspace-ywkrT7Aj.js → use-workspace-BDXP5XO1.js} +2 -2
- package/dist/web/public/assets/{use-workspace-ywkrT7Aj.js.map → use-workspace-BDXP5XO1.js.map} +1 -1
- package/dist/web/public/assets/{vector-B3h4iyfn.js → vector-BfIEx8xX.js} +2 -2
- package/dist/web/public/assets/{vector-B3h4iyfn.js.map → vector-BfIEx8xX.js.map} +1 -1
- package/dist/web/public/assets/{viewer-Bz3wL-99.js → viewer-BPMZkT05.js} +2 -2
- package/dist/web/public/assets/{viewer-Bz3wL-99.js.map → viewer-BPMZkT05.js.map} +1 -1
- package/dist/web/public/assets/{workspace-BvrXvliN.js → workspace-BbCchiHE.js} +2 -2
- package/dist/web/public/assets/{workspace-BvrXvliN.js.map → workspace-BbCchiHE.js.map} +1 -1
- package/dist/web/public/assets/{workspaces-0H6Dzz6N.js → workspaces-5HE7pjdA.js} +2 -2
- package/dist/web/public/assets/{workspaces-0H6Dzz6N.js.map → workspaces-5HE7pjdA.js.map} +1 -1
- package/dist/web/public/index.html +1 -1
- package/dist/web/server.js +3 -1
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/public/assets/distill-DxSq7g_8.js +0 -7
- package/dist/web/public/assets/distill-DxSq7g_8.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memos-C38YN2Rf.js","sources":["../../node_modules/lucide-react/dist/esm/icons/circle.js","../../node_modules/lucide-react/dist/esm/icons/notebook-text.js","../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../node_modules/@radix-ui/react-menu/dist/index.mjs","../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs","../../src/components/ui/dropdown-menu.tsx","../../src/hooks/use-memos.ts","../../src/routes/memos.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Circle = createLucideIcon(\"Circle\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n]);\n\nexport { Circle as default };\n//# sourceMappingURL=circle.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst NotebookText = createLucideIcon(\"NotebookText\", [\n [\"path\", { d: \"M2 6h4\", key: \"aawbzj\" }],\n [\"path\", { d: \"M2 10h4\", key: \"l0bgd4\" }],\n [\"path\", { d: \"M2 14h4\", key: \"1gsvsf\" }],\n [\"path\", { d: \"M2 18h4\", key: \"1bu2t1\" }],\n [\"rect\", { width: \"16\", height: \"20\", x: \"4\", y: \"2\", rx: \"2\", key: \"1nb95v\" }],\n [\"path\", { d: \"M9.5 8h5\", key: \"11mslq\" }],\n [\"path\", { d: \"M9.5 12H16\", key: \"ktog6x\" }],\n [\"path\", { d: \"M9.5 16H14\", key: \"p1seyn\" }]\n]);\n\nexport { NotebookText as default };\n//# sourceMappingURL=notebook-text.js.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n React.useEffect(() => {\n if (!open) {\n return;\n }\n const handleBlur = () => handleOpenChange(false);\n window.addEventListener(\"blur\", handleBlur);\n return () => window.removeEventListener(\"blur\", handleBlur);\n }, [open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? subContext.contentId : void 0,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, align = \"start\", ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align,\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: \"DropdownMenuSub\"\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * DropdownMenu — Radix-backed menu for row actions, agent picker, etc.\n * The check / radio item variants ship below; we don't import every\n * Radix sub-primitive eagerly to keep the bundle small if a page\n * doesn't need them.\n */\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none',\n 'focus:bg-surface-hover data-[state=open]:bg-surface-hover',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none',\n 'focus:bg-surface-hover focus:text-text',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none',\n 'focus:bg-surface-hover',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none',\n 'focus:bg-surface-hover',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-xs font-semibold uppercase tracking-wide text-text-muted',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): JSX.Element => (\n <span\n className={cn('ml-auto text-xs tracking-widest text-text-muted', className)}\n {...props}\n />\n)\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","/**\n * useMemos — react-query wrappers for memos search + delete.\n *\n * useMemos(query) — search/list\n * useDeleteMemo() — DELETE /api/memos/:id\n *\n * No SSE channel for memos (they're operator-created from chat, not\n * from autonomous agent activity), and no background poll: the page\n * shows search results which are inherently user-triggered.\n * Mutation onSuccess invalidates so a delete removes the row\n * immediately without a manual refresh.\n */\n\nimport { useQueryClient, useQuery, useMutation } from '@tanstack/react-query'\nimport { api } from '@/lib/api/endpoints'\nimport type {\n DeleteMemoResponse,\n ListMemosQuery,\n ListMemosResponse,\n} from '@/types/api'\n\nexport const memosKeys = {\n all: ['memos'] as const,\n list: (q: ListMemosQuery) => ['memos', 'list', q] as const,\n}\n\nexport function useMemos(query: ListMemosQuery) {\n return useQuery<ListMemosResponse>({\n queryKey: memosKeys.list(query),\n queryFn: () => api.listMemos(query),\n })\n}\n\nexport function useInvalidateMemos() {\n const qc = useQueryClient()\n return () => qc.invalidateQueries({ queryKey: memosKeys.all })\n}\n\nexport function useDeleteMemo() {\n const qc = useQueryClient()\n return useMutation<DeleteMemoResponse, Error, number>({\n mutationFn: (id) => api.deleteMemo(id),\n onSuccess: () => qc.invalidateQueries({ queryKey: memosKeys.all }),\n })\n}\n","/**\n * /memos — searchable memo list. Free-form text + who/what filters +\n * has-location toggle. Delete is the one mutation.\n *\n * Memos with location surface a small \"Open map\" dropdown that\n * routes to the provider URLs the backend prepared in `mapUrls`\n * (Baidu / Apple / Google / OSM).\n *\n * Searches are user-triggered (input + debounce) rather than poll-\n * driven — the query is read straight from URL params so deep-link\n * sharing works (\"memos about taxes between Jan and April\").\n *\n * Debounce: 300ms between the last keystroke and URL/query commit\n * — keeps the backend's FTS5 from running on every keypress.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport { useSearchParams } from 'react-router-dom'\nimport { useTranslation } from 'react-i18next'\nimport { toast } from 'sonner'\nimport { MapPin, NotebookText, RefreshCcw, Search, Trash2 } from 'lucide-react'\n\nimport { Topbar } from '@/components/shell/topbar'\nimport { DataTable, type DataTableColumn } from '@/components/common/data-table'\nimport { EmptyState } from '@/components/common/empty-state'\nimport { ConfirmDialog } from '@/components/common/confirm-dialog'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { useMemos, useDeleteMemo } from '@/hooks/use-memos'\nimport { describeError } from '@/lib/api/errors'\nimport type { Memo, ListMemosQuery } from '@/types/api'\n\nconst SEARCH_DEBOUNCE_MS = 300\n\nexport default function MemosRoute(): JSX.Element {\n const { t } = useTranslation(['memos', 'common'])\n const [params, setParams] = useSearchParams()\n\n // URL-driven filter state (read once per render).\n const q = params.get('q') ?? ''\n const who = params.get('who') ?? ''\n const what = params.get('what') ?? ''\n const hasLoc = params.get('has_location') === '1'\n const incExpired = params.get('include_expired') === '1'\n\n // Local-only echo of the text input. Effects below sync the URL\n // after the debounce so each keypress doesn't kick a fetch.\n const [qDraft, setQDraft] = useState(q)\n\n useEffect(() => {\n if (qDraft === q) return\n const timer = window.setTimeout(() => {\n patchParams({ q: qDraft || null })\n }, SEARCH_DEBOUNCE_MS)\n return () => window.clearTimeout(timer)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [qDraft])\n\n const query: ListMemosQuery = useMemo(\n () => ({\n ...(q ? { query: q } : {}),\n ...(who ? { who } : {}),\n ...(what ? { what } : {}),\n ...(hasLoc ? { has_location: true } : {}),\n ...(incExpired ? { include_expired: true } : {}),\n limit: 200,\n }),\n [q, who, what, hasLoc, incExpired],\n )\n\n const { data, isLoading, isFetching, refetch } = useMemos(query)\n const memos = data?.memos ?? []\n\n const del = useDeleteMemo()\n const [confirmDeleteId, setConfirmDeleteId] = useState<number | null>(null)\n\n function patchParams(patch: Record<string, string | null>): void {\n const next = new URLSearchParams(params)\n for (const [k, v] of Object.entries(patch)) {\n if (v == null || v === '') next.delete(k)\n else next.set(k, v)\n }\n setParams(next, { replace: true })\n }\n\n async function onConfirmDelete(): Promise<void> {\n if (confirmDeleteId == null) return\n try {\n await del.mutateAsync(confirmDeleteId)\n toast.success(t('toast.deleted'))\n } catch (err) {\n const { message } = describeError(err, t)\n toast.error(message)\n throw err\n }\n }\n\n const columns: DataTableColumn<Memo>[] = useMemo(\n () => [\n {\n id: 'id',\n header: t('col.id'),\n cell: (r) => <span className=\"tabular-nums text-text-dim\">#{r.id}</span>,\n headClassName: 'w-16',\n },\n {\n id: 'what',\n header: t('col.what'),\n cell: (r) => (\n <span className=\"line-clamp-2\">\n {r.memo ? <span className=\"text-text\">{r.memo}</span> : <span className=\"font-medium text-text\">{r.what}</span>}\n </span>\n ),\n asCardTitle: true,\n },\n {\n id: 'who',\n header: t('col.who'),\n cell: (r) =>\n r.who ? (\n <Badge variant=\"secondary\">{r.who}</Badge>\n ) : (\n <span className=\"text-text-muted\">—</span>\n ),\n headClassName: 'w-32',\n },\n {\n id: 'when',\n header: t('col.when'),\n cell: (r) => (\n <span className=\"text-text-dim\">\n {r.whenText || (r.whenAt ? formatTime(r.whenAt) : '—')}\n </span>\n ),\n headClassName: 'w-36',\n },\n {\n id: 'where',\n header: t('col.where'),\n cell: (r) =>\n r.where_label || (r.where_lat != null && r.where_lng != null) ? (\n <MapCell memo={r} />\n ) : (\n <span className=\"text-text-muted\">—</span>\n ),\n headClassName: 'w-44',\n },\n {\n id: 'platform',\n header: t('col.platform'),\n cell: (r) => <span className=\"text-text-dim\">{r.platform}</span>,\n headClassName: 'w-24',\n hideOnMobile: true,\n },\n {\n id: 'createdAt',\n header: t('col.createdAt'),\n cell: (r) => <span className=\"text-text-dim\">{formatTime(r.createdAt)}</span>,\n headClassName: 'w-36',\n hideOnMobile: true,\n },\n {\n id: 'actions',\n header: '',\n cell: (r) => (\n <div className=\"flex justify-end\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={(e) => {\n e.stopPropagation()\n setConfirmDeleteId(r.id)\n }}\n disabled={del.isPending}\n aria-label={t('action.delete')}\n >\n <Trash2 className=\"h-3 w-3\" />\n <span className=\"sr-only sm:not-sr-only sm:ml-1\">{t('action.delete')}</span>\n </Button>\n </div>\n ),\n headClassName: 'w-24',\n },\n ],\n [t, del.isPending],\n )\n\n return (\n <div className=\"flex min-h-dvh flex-col bg-bg\">\n <Topbar />\n\n <main className=\"mx-auto flex w-full max-w-7xl flex-1 flex-col gap-4 px-3 py-4 sm:px-4 pb-safe\">\n <header className=\"flex flex-col gap-1\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <h1 className=\"text-xl font-semibold\">{t('pageTitle')}</h1>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"ml-auto\"\n onClick={() => refetch()}\n disabled={isFetching}\n aria-label={t('actions.refresh', { ns: 'common' })}\n >\n <RefreshCcw className={`h-4 w-4 ${isFetching ? 'animate-spin' : ''}`} />\n <span className=\"hidden sm:inline\">{t('actions.refresh', { ns: 'common' })}</span>\n </Button>\n </div>\n <p className=\"text-sm text-text-dim\">{t('subtitle')}</p>\n </header>\n\n {/* Search bar */}\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-end\">\n <div className=\"relative flex-1 max-w-md\">\n <Search className=\"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-text-muted\" />\n <Input\n value={qDraft}\n onChange={(e) => setQDraft(e.target.value)}\n placeholder={t('search.placeholder')}\n className=\"pl-7\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-2 sm:flex sm:items-end\">\n <div className=\"flex flex-col gap-1\">\n <Label htmlFor=\"who-filter\" className=\"text-xs text-text-dim\">\n {t('search.who')}\n </Label>\n <Input\n id=\"who-filter\"\n value={who}\n onChange={(e) => patchParams({ who: e.target.value || null })}\n className=\"w-36\"\n />\n </div>\n <div className=\"flex flex-col gap-1\">\n <Label htmlFor=\"what-filter\" className=\"text-xs text-text-dim\">\n {t('search.what')}\n </Label>\n <Input\n id=\"what-filter\"\n value={what}\n onChange={(e) => patchParams({ what: e.target.value || null })}\n className=\"w-36\"\n />\n </div>\n </div>\n <div className=\"flex items-center gap-3\">\n <label className=\"inline-flex items-center gap-1 text-sm text-text-dim\">\n <input\n type=\"checkbox\"\n checked={hasLoc}\n onChange={(e) => patchParams({ has_location: e.target.checked ? '1' : null })}\n className=\"h-4 w-4 accent-accent\"\n />\n {t('search.hasLocation')}\n </label>\n <label className=\"inline-flex items-center gap-1 text-sm text-text-dim\">\n <input\n type=\"checkbox\"\n checked={incExpired}\n onChange={(e) => patchParams({ include_expired: e.target.checked ? '1' : null })}\n className=\"h-4 w-4 accent-accent\"\n />\n {t('search.includeExpired')}\n </label>\n </div>\n </div>\n\n <DataTable\n columns={columns}\n rows={memos}\n getRowId={(r) => String(r.id)}\n loading={isLoading}\n emptyState={\n <EmptyState\n icon={<NotebookText />}\n title={t('empty.title')}\n description={t('empty.description')}\n />\n }\n />\n\n <ConfirmDialog\n open={confirmDeleteId != null}\n onOpenChange={(open) => {\n if (!open) setConfirmDeleteId(null)\n }}\n title={t('action.confirmDelete')}\n description={t('action.confirmDeleteDesc')}\n intent=\"danger\"\n confirmLabel={t('action.delete')}\n onConfirm={onConfirmDelete}\n />\n </main>\n </div>\n )\n}\n\ninterface MapCellProps {\n memo: Memo\n}\n\nconst PROVIDER_LABEL_KEY: Record<string, string> = {\n baidu: 'openMap.baidu',\n apple: 'openMap.apple',\n google: 'openMap.google',\n osm: 'openMap.osm',\n}\n\nfunction MapCell({ memo }: MapCellProps): JSX.Element {\n const { t } = useTranslation('memos')\n const label = memo.where_label || `${memo.where_lat}, ${memo.where_lng}`\n const entries = Object.entries(memo.mapUrls ?? {})\n if (entries.length === 0) {\n return <span className=\"text-text-dim\">{label}</span>\n }\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-1 text-sm text-text-dim hover:text-accent\"\n onClick={(e) => e.stopPropagation()}\n >\n <MapPin className=\"h-3 w-3\" />\n <span className=\"line-clamp-1 underline-offset-2 hover:underline\">{label}</span>\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n {entries.map(([provider, url]) => (\n <DropdownMenuItem key={provider} asChild>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {t(PROVIDER_LABEL_KEY[provider] ?? 'openMap.label', { defaultValue: provider })}\n </a>\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nfunction formatTime(iso: string): string {\n try {\n const d = new Date(iso)\n if (Number.isNaN(d.getTime())) return iso\n return d.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })\n } catch {\n return iso\n }\n}\n"],"names":["Circle","createLucideIcon","NotebookText","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","React.useRef","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item","SELECTION_KEYS","FIRST_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS","SUB_CLOSE_KEYS","MENU_NAME","createMenuContext","createMenuScope","createPopperScope","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","__scopeMenu","open","onOpenChange","modal","popperScope","content","setContent","isUsingKeyboardRef","handleOpenChange","handleKeyDown","handlePointer","handleBlur","PopperPrimitive.Root","ANCHOR_NAME","MenuAnchor","anchorProps","PopperPrimitive.Anchor","PORTAL_NAME","PortalProvider","usePortalContext","MenuPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","MenuRootContentModal","MenuRootContentNonModal","hideOthers","MenuContentImpl","Slot","createSlot","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll","rovingFocusGroupScope","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","RemoveScroll","React.Fragment","scrollLockWrapperProps","handleTypeaheadSearch","search","currentMatch","values","nextMatch","getNextMatch","newItem","updateSearch","value","useFocusGuards","isPointerMovingToSubmenu","isPointerInGraceArea","intent","FocusScope","DismissableLayer","RovingFocusGroup.Root","PopperPrimitive.Content","getOpenState","isKeyDownInside","isModifierKey","isCharacterKey","whenMouse","target","pointerXHasChanged","newDir","MenuGroup","LABEL_NAME","MenuLabel","labelProps","ITEM_SELECT","MenuItem","disabled","onSelect","contentContext","isPointerDownRef","handleSelect","menuItem","itemSelectEvent","dispatchDiscreteCustomEvent","MenuItemImpl","isTypingAhead","textValue","isFocused","setIsFocused","textContent","setTextContent","RovingFocusGroup.Item","CHECKBOX_ITEM_NAME","MenuCheckboxItem","checked","onCheckedChange","checkboxItemProps","ItemIndicatorProvider","isIndeterminate","getCheckedState","RADIO_GROUP_NAME","RadioGroupProvider","useRadioGroupContext","MenuRadioGroup","onValueChange","handleValueChange","RADIO_ITEM_NAME","MenuRadioItem","radioItemProps","ITEM_INDICATOR_NAME","useItemIndicatorContext","MenuItemIndicator","itemIndicatorProps","indicatorContext","SEPARATOR_NAME","MenuSeparator","separatorProps","ARROW_NAME","MenuArrow","arrowProps","PopperPrimitive.Arrow","SUB_NAME","MenuSubProvider","useMenuSubContext","SUB_TRIGGER_NAME","MenuSubTrigger","subContext","openTimerRef","onPointerGraceIntentChange","scope","clearOpenTimer","pointerGraceTimer","composeRefs","contentRect","side","rightSide","bleed","contentNearEdge","contentFarEdge","SUB_CONTENT_NAME","MenuSubContent","align","subContentProps","isCloseKey","normalizedSearch","char","currentMatchIndex","wrappedValues","v","isPointInPolygon","point","polygon","x","y","inside","i","j","ii","jj","xi","yi","xj","yj","area","cursorPos","handler","Root3","Anchor2","Portal","Content2","Group","Label","Item2","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow2","SubTrigger","SubContent","DROPDOWN_MENU_NAME","createDropdownMenuContext","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","__scopeDropdownMenu","openProp","defaultOpen","menuScope","triggerRef","setOpen","prevOpen","MenuPrimitive.Root","TRIGGER_NAME","DropdownMenuTrigger","triggerProps","MenuPrimitive.Anchor","DropdownMenuPortal","portalProps","MenuPrimitive.Portal","DropdownMenuContent","hasInteractedOutsideRef","MenuPrimitive.Content","originalEvent","ctrlLeftClick","isRightClick","DropdownMenuGroup","MenuPrimitive.Group","DropdownMenuLabel","MenuPrimitive.Label","DropdownMenuItem","MenuPrimitive.Item","DropdownMenuCheckboxItem","MenuPrimitive.CheckboxItem","DropdownMenuRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","DropdownMenuRadioItem","MenuPrimitive.RadioItem","INDICATOR_NAME","DropdownMenuItemIndicator","MenuPrimitive.ItemIndicator","DropdownMenuSeparator","MenuPrimitive.Separator","DropdownMenuArrow","MenuPrimitive.Arrow","DropdownMenuSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","DropdownMenuSubContent","MenuPrimitive.SubContent","Root2","Trigger","Portal2","Label2","CheckboxItem2","RadioItem2","ItemIndicator2","Separator2","SubTrigger2","SubContent2","DropdownMenuPrimitive.Root","DropdownMenuPrimitive.Trigger","className","inset","jsxs","DropdownMenuPrimitive.SubTrigger","cn","ChevronRight","DropdownMenuPrimitive.SubContent","sideOffset","DropdownMenuPrimitive.Portal","DropdownMenuPrimitive.Content","DropdownMenuPrimitive.Item","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","Check","DropdownMenuPrimitive.RadioItem","DropdownMenuPrimitive.Label","DropdownMenuPrimitive.Separator","memosKeys","q","useMemos","query","useQuery","api","useDeleteMemo","qc","useQueryClient","useMutation","SEARCH_DEBOUNCE_MS","MemosRoute","t","useTranslation","params","setParams","useSearchParams","who","what","hasLoc","incExpired","qDraft","setQDraft","useState","useEffect","timer","patchParams","useMemo","data","isLoading","isFetching","refetch","memos","del","confirmDeleteId","setConfirmDeleteId","patch","next","k","onConfirmDelete","toast","err","message","describeError","columns","r","Badge","formatTime","MapCell","Button","e","Trash2","Topbar","RefreshCcw","Search","Input","DataTable","EmptyState","ConfirmDialog","PROVIDER_L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AAG,IAC1Brb,EAAAA,IAACkU,GAAA,CAAgC,QAAO,GACtC,SAAAlU,EAAAA,IAAC,IAAA,CACC,KAAMqb,EACN,OAAO,SACP,IAAI,sBAEH,SAAArD,EAAE+C,GAAmBK,CAAQ,GAAK,gBAAiB,CAAE,aAAcA,EAAU,CAAA,CAAA,CAChF,EAPqBA,CAQvB,CACD,CAAA,CACH,CAAA,EACF,CAEJ,CAEA,SAASjB,GAAWmB,EAAqB,CACvC,GAAI,CACF,MAAMC,EAAI,IAAI,KAAKD,CAAG,EACtB,OAAI,OAAO,MAAMC,EAAE,QAAA,CAAS,EAAUD,EAC/BC,EAAE,eAAe,OAAW,CAAE,MAAO,QAAS,IAAK,UAAW,KAAM,UAAW,OAAQ,SAAA,CAAW,CAC3G,MAAQ,CACN,OAAOD,CACT,CACF","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"memos-DQZc7llR.js","sources":["../../node_modules/lucide-react/dist/esm/icons/circle.js","../../node_modules/lucide-react/dist/esm/icons/notebook-text.js","../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../node_modules/@radix-ui/react-menu/dist/index.mjs","../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs","../../src/components/ui/dropdown-menu.tsx","../../src/hooks/use-memos.ts","../../src/routes/memos.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Circle = createLucideIcon(\"Circle\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n]);\n\nexport { Circle as default };\n//# sourceMappingURL=circle.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst NotebookText = createLucideIcon(\"NotebookText\", [\n [\"path\", { d: \"M2 6h4\", key: \"aawbzj\" }],\n [\"path\", { d: \"M2 10h4\", key: \"l0bgd4\" }],\n [\"path\", { d: \"M2 14h4\", key: \"1gsvsf\" }],\n [\"path\", { d: \"M2 18h4\", key: \"1bu2t1\" }],\n [\"rect\", { width: \"16\", height: \"20\", x: \"4\", y: \"2\", rx: \"2\", key: \"1nb95v\" }],\n [\"path\", { d: \"M9.5 8h5\", key: \"11mslq\" }],\n [\"path\", { d: \"M9.5 12H16\", key: \"ktog6x\" }],\n [\"path\", { d: \"M9.5 16H14\", key: \"p1seyn\" }]\n]);\n\nexport { NotebookText as default };\n//# sourceMappingURL=notebook-text.js.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n React.useEffect(() => {\n if (!open) {\n return;\n }\n const handleBlur = () => handleOpenChange(false);\n window.addEventListener(\"blur\", handleBlur);\n return () => window.removeEventListener(\"blur\", handleBlur);\n }, [open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? subContext.contentId : void 0,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, align = \"start\", ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align,\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: \"DropdownMenuSub\"\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * DropdownMenu — Radix-backed menu for row actions, agent picker, etc.\n * The check / radio item variants ship below; we don't import every\n * Radix sub-primitive eagerly to keep the bundle small if a page\n * doesn't need them.\n */\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none',\n 'focus:bg-surface-hover data-[state=open]:bg-surface-hover',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none',\n 'focus:bg-surface-hover focus:text-text',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none',\n 'focus:bg-surface-hover',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none',\n 'focus:bg-surface-hover',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-xs font-semibold uppercase tracking-wide text-text-muted',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): JSX.Element => (\n <span\n className={cn('ml-auto text-xs tracking-widest text-text-muted', className)}\n {...props}\n />\n)\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","/**\n * useMemos — react-query wrappers for memos search + delete.\n *\n * useMemos(query) — search/list\n * useDeleteMemo() — DELETE /api/memos/:id\n *\n * No SSE channel for memos (they're operator-created from chat, not\n * from autonomous agent activity), and no background poll: the page\n * shows search results which are inherently user-triggered.\n * Mutation onSuccess invalidates so a delete removes the row\n * immediately without a manual refresh.\n */\n\nimport { useQueryClient, useQuery, useMutation } from '@tanstack/react-query'\nimport { api } from '@/lib/api/endpoints'\nimport type {\n DeleteMemoResponse,\n ListMemosQuery,\n ListMemosResponse,\n} from '@/types/api'\n\nexport const memosKeys = {\n all: ['memos'] as const,\n list: (q: ListMemosQuery) => ['memos', 'list', q] as const,\n}\n\nexport function useMemos(query: ListMemosQuery) {\n return useQuery<ListMemosResponse>({\n queryKey: memosKeys.list(query),\n queryFn: () => api.listMemos(query),\n })\n}\n\nexport function useInvalidateMemos() {\n const qc = useQueryClient()\n return () => qc.invalidateQueries({ queryKey: memosKeys.all })\n}\n\nexport function useDeleteMemo() {\n const qc = useQueryClient()\n return useMutation<DeleteMemoResponse, Error, number>({\n mutationFn: (id) => api.deleteMemo(id),\n onSuccess: () => qc.invalidateQueries({ queryKey: memosKeys.all }),\n })\n}\n","/**\n * /memos — searchable memo list. Free-form text + who/what filters +\n * has-location toggle. Delete is the one mutation.\n *\n * Memos with location surface a small \"Open map\" dropdown that\n * routes to the provider URLs the backend prepared in `mapUrls`\n * (Baidu / Apple / Google / OSM).\n *\n * Searches are user-triggered (input + debounce) rather than poll-\n * driven — the query is read straight from URL params so deep-link\n * sharing works (\"memos about taxes between Jan and April\").\n *\n * Debounce: 300ms between the last keystroke and URL/query commit\n * — keeps the backend's FTS5 from running on every keypress.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport { useSearchParams } from 'react-router-dom'\nimport { useTranslation } from 'react-i18next'\nimport { toast } from 'sonner'\nimport { MapPin, NotebookText, RefreshCcw, Search, Trash2 } from 'lucide-react'\n\nimport { Topbar } from '@/components/shell/topbar'\nimport { DataTable, type DataTableColumn } from '@/components/common/data-table'\nimport { EmptyState } from '@/components/common/empty-state'\nimport { ConfirmDialog } from '@/components/common/confirm-dialog'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { useMemos, useDeleteMemo } from '@/hooks/use-memos'\nimport { describeError } from '@/lib/api/errors'\nimport type { Memo, ListMemosQuery } from '@/types/api'\n\nconst SEARCH_DEBOUNCE_MS = 300\n\nexport default function MemosRoute(): JSX.Element {\n const { t } = useTranslation(['memos', 'common'])\n const [params, setParams] = useSearchParams()\n\n // URL-driven filter state (read once per render).\n const q = params.get('q') ?? ''\n const who = params.get('who') ?? ''\n const what = params.get('what') ?? ''\n const hasLoc = params.get('has_location') === '1'\n const incExpired = params.get('include_expired') === '1'\n\n // Local-only echo of the text input. Effects below sync the URL\n // after the debounce so each keypress doesn't kick a fetch.\n const [qDraft, setQDraft] = useState(q)\n\n useEffect(() => {\n if (qDraft === q) return\n const timer = window.setTimeout(() => {\n patchParams({ q: qDraft || null })\n }, SEARCH_DEBOUNCE_MS)\n return () => window.clearTimeout(timer)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [qDraft])\n\n const query: ListMemosQuery = useMemo(\n () => ({\n ...(q ? { query: q } : {}),\n ...(who ? { who } : {}),\n ...(what ? { what } : {}),\n ...(hasLoc ? { has_location: true } : {}),\n ...(incExpired ? { include_expired: true } : {}),\n limit: 200,\n }),\n [q, who, what, hasLoc, incExpired],\n )\n\n const { data, isLoading, isFetching, refetch } = useMemos(query)\n const memos = data?.memos ?? []\n\n const del = useDeleteMemo()\n const [confirmDeleteId, setConfirmDeleteId] = useState<number | null>(null)\n\n function patchParams(patch: Record<string, string | null>): void {\n const next = new URLSearchParams(params)\n for (const [k, v] of Object.entries(patch)) {\n if (v == null || v === '') next.delete(k)\n else next.set(k, v)\n }\n setParams(next, { replace: true })\n }\n\n async function onConfirmDelete(): Promise<void> {\n if (confirmDeleteId == null) return\n try {\n await del.mutateAsync(confirmDeleteId)\n toast.success(t('toast.deleted'))\n } catch (err) {\n const { message } = describeError(err, t)\n toast.error(message)\n throw err\n }\n }\n\n const columns: DataTableColumn<Memo>[] = useMemo(\n () => [\n {\n id: 'id',\n header: t('col.id'),\n cell: (r) => <span className=\"tabular-nums text-text-dim\">#{r.id}</span>,\n headClassName: 'w-16',\n },\n {\n id: 'what',\n header: t('col.what'),\n cell: (r) => (\n <span className=\"line-clamp-2\">\n {r.memo ? <span className=\"text-text\">{r.memo}</span> : <span className=\"font-medium text-text\">{r.what}</span>}\n </span>\n ),\n asCardTitle: true,\n },\n {\n id: 'who',\n header: t('col.who'),\n cell: (r) =>\n r.who ? (\n <Badge variant=\"secondary\">{r.who}</Badge>\n ) : (\n <span className=\"text-text-muted\">—</span>\n ),\n headClassName: 'w-32',\n },\n {\n id: 'when',\n header: t('col.when'),\n cell: (r) => (\n <span className=\"text-text-dim\">\n {r.whenText || (r.whenAt ? formatTime(r.whenAt) : '—')}\n </span>\n ),\n headClassName: 'w-36',\n },\n {\n id: 'where',\n header: t('col.where'),\n cell: (r) =>\n r.where_label || (r.where_lat != null && r.where_lng != null) ? (\n <MapCell memo={r} />\n ) : (\n <span className=\"text-text-muted\">—</span>\n ),\n headClassName: 'w-44',\n },\n {\n id: 'platform',\n header: t('col.platform'),\n cell: (r) => <span className=\"text-text-dim\">{r.platform}</span>,\n headClassName: 'w-24',\n hideOnMobile: true,\n },\n {\n id: 'createdAt',\n header: t('col.createdAt'),\n cell: (r) => <span className=\"text-text-dim\">{formatTime(r.createdAt)}</span>,\n headClassName: 'w-36',\n hideOnMobile: true,\n },\n {\n id: 'actions',\n header: '',\n cell: (r) => (\n <div className=\"flex justify-end\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={(e) => {\n e.stopPropagation()\n setConfirmDeleteId(r.id)\n }}\n disabled={del.isPending}\n aria-label={t('action.delete')}\n >\n <Trash2 className=\"h-3 w-3\" />\n <span className=\"sr-only sm:not-sr-only sm:ml-1\">{t('action.delete')}</span>\n </Button>\n </div>\n ),\n headClassName: 'w-24',\n },\n ],\n [t, del.isPending],\n )\n\n return (\n <div className=\"flex min-h-dvh flex-col bg-bg\">\n <Topbar />\n\n <main className=\"mx-auto flex w-full max-w-7xl flex-1 flex-col gap-4 px-3 py-4 sm:px-4 pb-safe\">\n <header className=\"flex flex-col gap-1\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <h1 className=\"text-xl font-semibold\">{t('pageTitle')}</h1>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"ml-auto\"\n onClick={() => refetch()}\n disabled={isFetching}\n aria-label={t('actions.refresh', { ns: 'common' })}\n >\n <RefreshCcw className={`h-4 w-4 ${isFetching ? 'animate-spin' : ''}`} />\n <span className=\"hidden sm:inline\">{t('actions.refresh', { ns: 'common' })}</span>\n </Button>\n </div>\n <p className=\"text-sm text-text-dim\">{t('subtitle')}</p>\n </header>\n\n {/* Search bar */}\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-end\">\n <div className=\"relative flex-1 max-w-md\">\n <Search className=\"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-text-muted\" />\n <Input\n value={qDraft}\n onChange={(e) => setQDraft(e.target.value)}\n placeholder={t('search.placeholder')}\n className=\"pl-7\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-2 sm:flex sm:items-end\">\n <div className=\"flex flex-col gap-1\">\n <Label htmlFor=\"who-filter\" className=\"text-xs text-text-dim\">\n {t('search.who')}\n </Label>\n <Input\n id=\"who-filter\"\n value={who}\n onChange={(e) => patchParams({ who: e.target.value || null })}\n className=\"w-36\"\n />\n </div>\n <div className=\"flex flex-col gap-1\">\n <Label htmlFor=\"what-filter\" className=\"text-xs text-text-dim\">\n {t('search.what')}\n </Label>\n <Input\n id=\"what-filter\"\n value={what}\n onChange={(e) => patchParams({ what: e.target.value || null })}\n className=\"w-36\"\n />\n </div>\n </div>\n <div className=\"flex items-center gap-3\">\n <label className=\"inline-flex items-center gap-1 text-sm text-text-dim\">\n <input\n type=\"checkbox\"\n checked={hasLoc}\n onChange={(e) => patchParams({ has_location: e.target.checked ? '1' : null })}\n className=\"h-4 w-4 accent-accent\"\n />\n {t('search.hasLocation')}\n </label>\n <label className=\"inline-flex items-center gap-1 text-sm text-text-dim\">\n <input\n type=\"checkbox\"\n checked={incExpired}\n onChange={(e) => patchParams({ include_expired: e.target.checked ? '1' : null })}\n className=\"h-4 w-4 accent-accent\"\n />\n {t('search.includeExpired')}\n </label>\n </div>\n </div>\n\n <DataTable\n columns={columns}\n rows={memos}\n getRowId={(r) => String(r.id)}\n loading={isLoading}\n emptyState={\n <EmptyState\n icon={<NotebookText />}\n title={t('empty.title')}\n description={t('empty.description')}\n />\n }\n />\n\n <ConfirmDialog\n open={confirmDeleteId != null}\n onOpenChange={(open) => {\n if (!open) setConfirmDeleteId(null)\n }}\n title={t('action.confirmDelete')}\n description={t('action.confirmDeleteDesc')}\n intent=\"danger\"\n confirmLabel={t('action.delete')}\n onConfirm={onConfirmDelete}\n />\n </main>\n </div>\n )\n}\n\ninterface MapCellProps {\n memo: Memo\n}\n\nconst PROVIDER_LABEL_KEY: Record<string, string> = {\n baidu: 'openMap.baidu',\n apple: 'openMap.apple',\n google: 'openMap.google',\n osm: 'openMap.osm',\n}\n\nfunction MapCell({ memo }: MapCellProps): JSX.Element {\n const { t } = useTranslation('memos')\n const label = memo.where_label || `${memo.where_lat}, ${memo.where_lng}`\n const entries = Object.entries(memo.mapUrls ?? {})\n if (entries.length === 0) {\n return <span className=\"text-text-dim\">{label}</span>\n }\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-1 text-sm text-text-dim hover:text-accent\"\n onClick={(e) => e.stopPropagation()}\n >\n <MapPin className=\"h-3 w-3\" />\n <span className=\"line-clamp-1 underline-offset-2 hover:underline\">{label}</span>\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n {entries.map(([provider, url]) => (\n <DropdownMenuItem key={provider} asChild>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {t(PROVIDER_LABEL_KEY[provider] ?? 'openMap.label', { defaultValue: provider })}\n </a>\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nfunction formatTime(iso: string): string {\n try {\n const d = new Date(iso)\n if (Number.isNaN(d.getTime())) return iso\n return d.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })\n } catch {\n return iso\n }\n}\n"],"names":["Circle","createLucideIcon","NotebookText","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","React.useRef","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item","SELECTION_KEYS","FIRST_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS","SUB_CLOSE_KEYS","MENU_NAME","createMenuContext","createMenuScope","createPopperScope","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","__scopeMenu","open","onOpenChange","modal","popperScope","content","setContent","isUsingKeyboardRef","handleOpenChange","handleKeyDown","handlePointer","handleBlur","PopperPrimitive.Root","ANCHOR_NAME","MenuAnchor","anchorProps","PopperPrimitive.Anchor","PORTAL_NAME","PortalProvider","usePortalContext","MenuPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","MenuRootContentModal","MenuRootContentNonModal","hideOthers","MenuContentImpl","Slot","createSlot","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll","rovingFocusGroupScope","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","RemoveScroll","React.Fragment","scrollLockWrapperProps","handleTypeaheadSearch","search","currentMatch","values","nextMatch","getNextMatch","newItem","updateSearch","value","useFocusGuards","isPointerMovingToSubmenu","isPointerInGraceArea","intent","FocusScope","DismissableLayer","RovingFocusGroup.Root","PopperPrimitive.Content","getOpenState","isKeyDownInside","isModifierKey","isCharacterKey","whenMouse","target","pointerXHasChanged","newDir","MenuGroup","LABEL_NAME","MenuLabel","labelProps","ITEM_SELECT","MenuItem","disabled","onSelect","contentContext","isPointerDownRef","handleSelect","menuItem","itemSelectEvent","dispatchDiscreteCustomEvent","MenuItemImpl","isTypingAhead","textValue","isFocused","setIsFocused","textContent","setTextContent","RovingFocusGroup.Item","CHECKBOX_ITEM_NAME","MenuCheckboxItem","checked","onCheckedChange","checkboxItemProps","ItemIndicatorProvider","isIndeterminate","getCheckedState","RADIO_GROUP_NAME","RadioGroupProvider","useRadioGroupContext","MenuRadioGroup","onValueChange","handleValueChange","RADIO_ITEM_NAME","MenuRadioItem","radioItemProps","ITEM_INDICATOR_NAME","useItemIndicatorContext","MenuItemIndicator","itemIndicatorProps","indicatorContext","SEPARATOR_NAME","MenuSeparator","separatorProps","ARROW_NAME","MenuArrow","arrowProps","PopperPrimitive.Arrow","SUB_NAME","MenuSubProvider","useMenuSubContext","SUB_TRIGGER_NAME","MenuSubTrigger","subContext","openTimerRef","onPointerGraceIntentChange","scope","clearOpenTimer","pointerGraceTimer","composeRefs","contentRect","side","rightSide","bleed","contentNearEdge","contentFarEdge","SUB_CONTENT_NAME","MenuSubContent","align","subContentProps","isCloseKey","normalizedSearch","char","currentMatchIndex","wrappedValues","v","isPointInPolygon","point","polygon","x","y","inside","i","j","ii","jj","xi","yi","xj","yj","area","cursorPos","handler","Root3","Anchor2","Portal","Content2","Group","Label","Item2","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow2","SubTrigger","SubContent","DROPDOWN_MENU_NAME","createDropdownMenuContext","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","__scopeDropdownMenu","openProp","defaultOpen","menuScope","triggerRef","setOpen","prevOpen","MenuPrimitive.Root","TRIGGER_NAME","DropdownMenuTrigger","triggerProps","MenuPrimitive.Anchor","DropdownMenuPortal","portalProps","MenuPrimitive.Portal","DropdownMenuContent","hasInteractedOutsideRef","MenuPrimitive.Content","originalEvent","ctrlLeftClick","isRightClick","DropdownMenuGroup","MenuPrimitive.Group","DropdownMenuLabel","MenuPrimitive.Label","DropdownMenuItem","MenuPrimitive.Item","DropdownMenuCheckboxItem","MenuPrimitive.CheckboxItem","DropdownMenuRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","DropdownMenuRadioItem","MenuPrimitive.RadioItem","INDICATOR_NAME","DropdownMenuItemIndicator","MenuPrimitive.ItemIndicator","DropdownMenuSeparator","MenuPrimitive.Separator","DropdownMenuArrow","MenuPrimitive.Arrow","DropdownMenuSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","DropdownMenuSubContent","MenuPrimitive.SubContent","Root2","Trigger","Portal2","Label2","CheckboxItem2","RadioItem2","ItemIndicator2","Separator2","SubTrigger2","SubContent2","DropdownMenuPrimitive.Root","DropdownMenuPrimitive.Trigger","className","inset","jsxs","DropdownMenuPrimitive.SubTrigger","cn","ChevronRight","DropdownMenuPrimitive.SubContent","sideOffset","DropdownMenuPrimitive.Portal","DropdownMenuPrimitive.Content","DropdownMenuPrimitive.Item","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","Check","DropdownMenuPrimitive.RadioItem","DropdownMenuPrimitive.Label","DropdownMenuPrimitive.Separator","memosKeys","q","useMemos","query","useQuery","api","useDeleteMemo","qc","useQueryClient","useMutation","SEARCH_DEBOUNCE_MS","MemosRoute","t","useTranslation","params","setParams","useSearchParams","who","what","hasLoc","incExpired","qDraft","setQDraft","useState","useEffect","timer","patchParams","useMemo","data","isLoading","isFetching","refetch","memos","del","confirmDeleteId","setConfirmDeleteId","patch","next","k","onConfirmDelete","toast","err","message","describeError","columns","r","Badge","formatTime","MapCell","Button","e","Trash2","Topbar","RefreshCcw","Search","Input","DataTable","EmptyState","ConfirmDialog","PROVIDER_LABEL_KEY","memo","label","entries","MapPin","provider","url","iso","d"],"mappings":"61BAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,GAASC,GAAiB,SAAU,CACxC,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,IAAK,QAAQ,CAAE,CAC3D,CAAC,ECXD;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMC,GAAeD,GAAiB,eAAgB,CACpD,CAAC,OAAQ,CAAE,EAAG,SAAU,IAAK,QAAQ,CAAE,EACvC,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,OAAQ,CAAE,EAAG,UAAW,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