prefect 3.6.14.dev1__py3-none-any.whl → 3.6.14.dev2__py3-none-any.whl
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.
- prefect/_build_info.py +3 -3
- prefect/_observers.py +20 -8
- prefect/cli/server.py +18 -3
- prefect/deployments/runner.py +448 -8
- prefect/flows.py +162 -34
- prefect/runner/runner.py +48 -0
- prefect/server/orchestration/global_policy.py +4 -2
- prefect/server/ui-v2/assets/{artifact-card-DkgEVahF.js → artifact-card-D41jcvLX.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-DkgEVahF.js.map → artifact-card-D41jcvLX.js.map} +1 -1
- prefect/server/ui-v2/assets/{artifact._id-C7yJhkKY.js → artifact._id-CYMvBFBb.js} +2 -2
- prefect/server/ui-v2/assets/{artifact._id-C7yJhkKY.js.map → artifact._id-CYMvBFBb.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-wizard-BLI4sqs9.js → automation-wizard-DHsWJ8JS.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-BLI4sqs9.js.map → automation-wizard-DHsWJ8JS.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation._id-OLes3du9.js → automation._id-CCroE1-1.js} +2 -2
- prefect/server/ui-v2/assets/{automation._id-OLes3du9.js.map → automation._id-CCroE1-1.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-QrSzkDDB.js → automation_._id.edit-BgpDmMq7.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-QrSzkDDB.js.map → automation_._id.edit-BgpDmMq7.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-BoJc9HK8.js → automations-header-BEZXZmli.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-BoJc9HK8.js.map → automations-header-BEZXZmli.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-Br6s0jNS.js → base-job-template-form-section-BubT4OHj.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-Br6s0jNS.js.map → base-job-template-form-section-BubT4OHj.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-BSbBP-Nm.js → block-type-details-DCWuBOwb.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-BSbBP-Nm.js.map → block-type-details-DCWuBOwb.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-logo-DNFERTyH.js → block-type-logo-SZMe2NdY.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-logo-DNFERTyH.js.map → block-type-logo-SZMe2NdY.js.map} +1 -1
- prefect/server/ui-v2/assets/{block._id-DO6Hulrv.js → block._id-B6_kwTZ-.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-DO6Hulrv.js.map → block._id-B6_kwTZ-.js.map} +1 -1
- prefect/server/ui-v2/assets/{block_._id.edit-BWF0TQvv.js → block_._id.edit-Bjg9WgY6.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-BWF0TQvv.js.map → block_._id.edit-Bjg9WgY6.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog-BlaqZP0r.js → catalog-Bv8x-rIx.js} +2 -2
- prefect/server/ui-v2/assets/{catalog-BlaqZP0r.js.map → catalog-Bv8x-rIx.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug-BZWiMtjq.js → catalog_._slug-2GldfHc0.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug-BZWiMtjq.js.map → catalog_._slug-2GldfHc0.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug_.create-oHffbeMs.js → catalog_._slug_.create-Bjt7az95.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-oHffbeMs.js.map → catalog_._slug_.create-Bjt7az95.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-D45P93xU.js → collapsible-BT0EnMmT.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-D45P93xU.js.map → collapsible-BT0EnMmT.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-B6oyPVya.js → concurrency-limit._id-Ba5Uof4l.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-B6oyPVya.js.map → concurrency-limit._id-Ba5Uof4l.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-CcYMd6w6.js → create-DK8Cy1hG.js} +2 -2
- prefect/server/ui-v2/assets/{create-CcYMd6w6.js.map → create-DK8Cy1hG.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-DK1WvDhf.js → create-Ds8Lheyk.js} +2 -2
- prefect/server/ui-v2/assets/{create-DK1WvDhf.js.map → create-Ds8Lheyk.js.map} +1 -1
- prefect/server/ui-v2/assets/cronstrue-C72j5NDa.js +2 -0
- prefect/server/ui-v2/assets/cronstrue-C72j5NDa.js.map +1 -0
- prefect/server/ui-v2/assets/{data-table-B_iyrrTm.js → data-table-B6bdz5Zj.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-B_iyrrTm.js.map → data-table-B6bdz5Zj.js.map} +1 -1
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-7GKqeKy1.js → delete-confirmation-dialog-CV8ITEEW.js} +2 -2
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-7GKqeKy1.js.map → delete-confirmation-dialog-CV8ITEEW.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-action-header-DrvnfE9Y.js → deployment-action-header-DpjOcab0.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-action-header-DrvnfE9Y.js.map → deployment-action-header-DpjOcab0.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-DsAij22s.js → deployment-form-CjIPPnwV.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-DsAij22s.js.map → deployment-form-CjIPPnwV.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-BwqfKWQX.js → deployment-links--VkBo9wV.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-BwqfKWQX.js.map → deployment-links--VkBo9wV.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-E5e5s6bO.js → deployment._id-CW00MZGG.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-E5e5s6bO.js.map → deployment._id-CW00MZGG.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-U6KrtWw0.js → deployment._id-DjYh9IiR.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-U6KrtWw0.js.map → deployment._id-DjYh9IiR.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-18ZQHHgI.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-C_kNyCA9.js.map → deployment_._id.duplicate-18ZQHHgI.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-C9H0Teuv.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-BP8pfTOR.js.map → deployment_._id.edit-C9H0Teuv.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-Di3-4Mtk.js → deployment_._id.run-CwHYw8j1.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-Di3-4Mtk.js.map → deployment_._id.run-CwHYw8j1.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-iS8iJMpx.js → dropdown-menu-BYgkpoqb.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-iS8iJMpx.js.map → dropdown-menu-BYgkpoqb.js.map} +1 -1
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CG15qDSZ.js → event._eventDate._eventId-mPwFHce2.js} +2 -2
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CG15qDSZ.js.map → event._eventDate._eventId-mPwFHce2.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run-graph-BMp5vJJa.js +2 -0
- prefect/server/ui-v2/assets/flow-run-graph-BMp5vJJa.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-D_eAHZ5z.js → flow-run._id-CafHaMND.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-D_eAHZ5z.js.map → flow-run._id-CafHaMND.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-CelqqA9P.js +4 -0
- prefect/server/ui-v2/assets/flow-run._id-CelqqA9P.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-wco0Q19f.js → flow-run._id-hVuHWXbi.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-wco0Q19f.js.map → flow-run._id-hVuHWXbi.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-runs-pagination-DzGHOht3.js → flow-runs-pagination-CqjL9gOj.js} +2 -2
- prefect/server/ui-v2/assets/{flow-runs-pagination-DzGHOht3.js.map → flow-runs-pagination-CqjL9gOj.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow._id-Dn2so3rK.js → flow._id-C1Djus0m.js} +2 -2
- prefect/server/ui-v2/assets/{flow._id-Dn2so3rK.js.map → flow._id-C1Djus0m.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-rC8pxeRl.js → form-z_RaFdEo.js} +2 -2
- prefect/server/ui-v2/assets/{form-rC8pxeRl.js.map → form-z_RaFdEo.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-CuAwmJ64.js → header-B-PvVnN7.js} +2 -2
- prefect/server/ui-v2/assets/{header-CuAwmJ64.js.map → header-B-PvVnN7.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-C0zV3WDn.js → header-BSXYXvPS.js} +2 -2
- prefect/server/ui-v2/assets/{header-C0zV3WDn.js.map → header-BSXYXvPS.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-C6ko3O7G.js → header-CKVO4oLE.js} +2 -2
- prefect/server/ui-v2/assets/{header-C6ko3O7G.js.map → header-CKVO4oLE.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CotXErTe.js → index-B5zctA6A.js} +2 -2
- prefect/server/ui-v2/assets/{index-CotXErTe.js.map → index-B5zctA6A.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-k2161reF.js → index-BCzGofA2.js} +2 -2
- prefect/server/ui-v2/assets/{index-k2161reF.js.map → index-BCzGofA2.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BdgomKuA.js → index-BOuQzuoR.js} +2 -2
- prefect/server/ui-v2/assets/{index-BdgomKuA.js.map → index-BOuQzuoR.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-pE_31vXF.js → index-BQOxk1xu.js} +2 -2
- prefect/server/ui-v2/assets/{index-pE_31vXF.js.map → index-BQOxk1xu.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Benf9xn3.js → index-BU1Y-wgo.js} +2 -2
- prefect/server/ui-v2/assets/{index-Benf9xn3.js.map → index-BU1Y-wgo.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CYpFLd7y.js → index-BxGluvOD.js} +2 -2
- prefect/server/ui-v2/assets/{index-CYpFLd7y.js.map → index-BxGluvOD.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CcVSC2pV.js → index-CAbBPipD.js} +2 -2
- prefect/server/ui-v2/assets/{index-CcVSC2pV.js.map → index-CAbBPipD.js.map} +1 -1
- prefect/server/ui-v2/assets/index-CHwhYh-B.js +2 -0
- prefect/server/ui-v2/assets/{index-BYQ1P2TC.js.map → index-CHwhYh-B.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-0g8aAM30.js → index-CIKCrLeZ.js} +2 -2
- prefect/server/ui-v2/assets/{index-0g8aAM30.js.map → index-CIKCrLeZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-fhrsIceD.js → index-CLUjhc4A.js} +2 -2
- prefect/server/ui-v2/assets/{index-fhrsIceD.js.map → index-CLUjhc4A.js.map} +1 -1
- prefect/server/ui-v2/assets/index-CX5uU1zd.js +2 -0
- prefect/server/ui-v2/assets/index-CX5uU1zd.js.map +1 -0
- prefect/server/ui-v2/assets/{index-DwkedbVy.js → index-CXVePXfG.js} +2 -2
- prefect/server/ui-v2/assets/{index-DwkedbVy.js.map → index-CXVePXfG.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DB2qeheX.js → index-D-ZIgaBw.js} +2 -2
- prefect/server/ui-v2/assets/{index-DB2qeheX.js.map → index-D-ZIgaBw.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D8fZaZa7.js → index-D10Svo9k.js} +2 -2
- prefect/server/ui-v2/assets/{index-D8fZaZa7.js.map → index-D10Svo9k.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CEStyUb-.js → index-D2EEipYt.js} +2 -2
- prefect/server/ui-v2/assets/{index-CEStyUb-.js.map → index-D2EEipYt.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BIqzfifB.js → index-DV5fpxXB.js} +2 -2
- prefect/server/ui-v2/assets/{index-BIqzfifB.js.map → index-DV5fpxXB.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-C3D0Re7U.js → index-FHRYGk_R.js} +2 -2
- prefect/server/ui-v2/assets/{index-C3D0Re7U.js.map → index-FHRYGk_R.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CCs20W5W.js → index-IGxqySze.js} +2 -2
- prefect/server/ui-v2/assets/{index-CCs20W5W.js.map → index-IGxqySze.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BKbBu9gL.js → index-P2xc38Yh.js} +2 -2
- prefect/server/ui-v2/assets/{index-BKbBu9gL.js.map → index-P2xc38Yh.js.map} +1 -1
- prefect/server/ui-v2/assets/index-Yzhlw6-Q.js +17 -0
- prefect/server/ui-v2/assets/index-Yzhlw6-Q.js.map +1 -0
- prefect/server/ui-v2/assets/{index-BjsWjEUO.js → index-n7YFiQkB.js} +2 -2
- prefect/server/ui-v2/assets/{index-BjsWjEUO.js.map → index-n7YFiQkB.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-C9dkBSdc.js → json-input-Dlzy_XLK.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-C9dkBSdc.js.map → json-input-Dlzy_XLK.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-BBVH44_R.js → key._key-DN_txnIw.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-BBVH44_R.js.map → key._key-DN_txnIw.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-BoMKGRXo.js → lazy-markdown-CPQjrQrX.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-BoMKGRXo.js.map → lazy-markdown-CPQjrQrX.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-BmmIDesJ.js → login-BsnFlv-8.js} +2 -2
- prefect/server/ui-v2/assets/{login-BmmIDesJ.js.map → login-BsnFlv-8.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-C6P8cYT1.js → markdown-input-b0zl1NLl.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-C6P8cYT1.js.map → markdown-input-b0zl1NLl.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-example-snippet-DPumgTpL.js → python-example-snippet-W9Z_3hjQ.js} +3 -3
- prefect/server/ui-v2/assets/{python-example-snippet-DPumgTpL.js.map → python-example-snippet-W9Z_3hjQ.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-DX4uV8MF.js → python-input-EKDBgTDE.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-DX4uV8MF.js.map → python-input-EKDBgTDE.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-DeNK-Ob0.js → radio-group-BMeznoY8.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-DeNK-Ob0.js.map → radio-group-BMeznoY8.js.map} +1 -1
- prefect/server/ui-v2/assets/{route-error-state-C9CbByMx.js → route-error-state-BGOi4dn-.js} +2 -2
- prefect/server/ui-v2/assets/{route-error-state-C9CbByMx.js.map → route-error-state-BGOi4dn-.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-B45xnsnK.js → schema-form-BHWTZ8Sy.js} +2 -2
- prefect/server/ui-v2/assets/{schema-form-B45xnsnK.js.map → schema-form-BHWTZ8Sy.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BJj81bu-.js → schema-form-input-string-format-datetime-hWIr4wQr.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BJj81bu-.js.map → schema-form-input-string-format-datetime-hWIr4wQr.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-CbkeWqQ9.js → settings-DVSPGBen.js} +2 -2
- prefect/server/ui-v2/assets/{settings-CbkeWqQ9.js.map → settings-DVSPGBen.js.map} +1 -1
- prefect/server/ui-v2/assets/{sort-filter-DM7SvBB0.js → sort-filter-MiwMjIYc.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-DM7SvBB0.js.map → sort-filter-MiwMjIYc.js.map} +1 -1
- prefect/server/ui-v2/assets/{table-CEPo6xb_.js → table-BJkw82b1.js} +2 -2
- prefect/server/ui-v2/assets/{table-CEPo6xb_.js.map → table-BJkw82b1.js.map} +1 -1
- prefect/server/ui-v2/assets/{tags-input-DJiZSVHp.js → tags-input-1KkWhGJZ.js} +2 -2
- prefect/server/ui-v2/assets/{tags-input-DJiZSVHp.js.map → tags-input-1KkWhGJZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-vJEkvqWp.js → task-run-concurrency-limits-reset-dialog-ClBlDic_.js} +2 -2
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-vJEkvqWp.js.map → task-run-concurrency-limits-reset-dialog-ClBlDic_.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-BCnDnXrL.js → task-run._id-48TwMBP1.js} +2 -2
- prefect/server/ui-v2/assets/{task-run._id-BCnDnXrL.js.map → task-run._id-48TwMBP1.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-ByJw1K82.js → task-run._id-BmK7HGNl.js} +2 -2
- prefect/server/ui-v2/assets/{task-run._id-ByJw1K82.js.map → task-run._id-BmK7HGNl.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-runs-pagination-DbjB6XnY.js → task-runs-pagination-DA4izCRv.js} +2 -2
- prefect/server/ui-v2/assets/{task-runs-pagination-DbjB6XnY.js.map → task-runs-pagination-DA4izCRv.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-BX8KbLGx.js → textarea-BqtBNhJB.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-BX8KbLGx.js.map → textarea-BqtBNhJB.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-TBj2n6Ox.js → timezone-select-BgD_PENN.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-TBj2n6Ox.js.map → timezone-select-BgD_PENN.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-D7mfSUim.js → toggle-group-ChA-JYQB.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-D7mfSUim.js.map → toggle-group-ChA-JYQB.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-BpBSjz60.js → use-delete-automation-confirmation-dialog-Da1iWNZ_.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-BpBSjz60.js.map → use-delete-automation-confirmation-dialog-Da1iWNZ_.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BjKsNw6b.js → use-delete-block-document-confirmation-dialog-DfrxGSyY.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BjKsNw6b.js.map → use-delete-block-document-confirmation-dialog-DfrxGSyY.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-B_BlBMic.js → use-flow-runs-selected-rows-CYOsQ-Df.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-B_BlBMic.js.map → use-flow-runs-selected-rows-CYOsQ-Df.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BfE433bC.js → use-get-artifacts-flow-task-runs-C0V3_gYz.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BfE433bC.js.map → use-get-artifacts-flow-task-runs-C0V3_gYz.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-quick-run-qrtcF-DD.js → use-quick-run-CgM0EheE.js} +2 -2
- prefect/server/ui-v2/assets/{use-quick-run-qrtcF-DD.js.map → use-quick-run-CgM0EheE.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-CVy1_GBw.js → use-stepper-CSAs1T4U.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-CVy1_GBw.js.map → use-stepper-CSAs1T4U.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-D5-00wjP.js → utilities-DqaYuzh1.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-D5-00wjP.js.map → utilities-DqaYuzh1.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-date-7GxEwcQM.js → vendor-date-JS-ReHrg.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-date-7GxEwcQM.js.map → vendor-date-JS-ReHrg.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-graphs-R8z6S3Jg.js → vendor-graphs-BRVnayIy.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-graphs-R8z6S3Jg.js.map → vendor-graphs-BRVnayIy.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-radix-CznP1SOq.js → vendor-radix-BZJHvSaq.js} +9 -9
- prefect/server/ui-v2/assets/{vendor-radix-CznP1SOq.js.map → vendor-radix-BZJHvSaq.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-filter-D8MkTbSW.js → work-pool-filter-T6dM4jKE.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-D8MkTbSW.js.map → work-pool-filter-T6dM4jKE.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-CbI7Gfu5.js → work-pool-queue-toggle-CdUw2mAH.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-CbI7Gfu5.js.map → work-pool-queue-toggle-CdUw2mAH.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-CCzzgVV2.js → work-pool._workPoolName-DD8gh9X-.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-CCzzgVV2.js.map → work-pool._workPoolName-DD8gh9X-.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-BAgiuU_j.js → work-pool_._workPoolName.edit-mmnZTSTy.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-BAgiuU_j.js.map → work-pool_._workPoolName.edit-mmnZTSTy.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BUawWJEy.js → work-pool_._workPoolName.queue._workQueueName-fbwQqkVN.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BUawWJEy.js.map → work-pool_._workPoolName.queue._workQueueName-fbwQqkVN.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-D_G_UCJX.js → work-queue-icon-text-YyKOH96e.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-D_G_UCJX.js.map → work-queue-icon-text-YyKOH96e.js.map} +1 -1
- prefect/server/ui-v2/index.html +3 -3
- prefect/settings/models/runner.py +11 -0
- prefect/tasks.py +30 -4
- {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/METADATA +1 -1
- {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/RECORD +215 -215
- prefect/server/ui-v2/assets/cronstrue-WDy4rv2V.js +0 -2
- prefect/server/ui-v2/assets/cronstrue-WDy4rv2V.js.map +0 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-C_kNyCA9.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-BP8pfTOR.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-B1vF1w0Z.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-B1vF1w0Z.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-BHY61H6u.js +0 -4
- prefect/server/ui-v2/assets/flow-run._id-BHY61H6u.js.map +0 -1
- prefect/server/ui-v2/assets/index-BYQ1P2TC.js +0 -2
- prefect/server/ui-v2/assets/index-Cd7pM9pk.js +0 -17
- prefect/server/ui-v2/assets/index-Cd7pM9pk.js.map +0 -1
- prefect/server/ui-v2/assets/index-DvKYj8ko.js +0 -2
- prefect/server/ui-v2/assets/index-DvKYj8ko.js.map +0 -1
- {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/WHEEL +0 -0
- {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{r as a,R as po,j as f,a as tn,b as al,c as B}from"./vendor-tanstack-BK8oseNA.js";function tr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ce(...e){return t=>{let n=!1;const o=e.map(r=>{const s=tr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():tr(e[r],null)}}}}function N(...e){return a.useCallback(Ce(...e),e)}var il=Symbol.for("react.lazy"),Vt=po[" use ".trim().toString()];function cl(e){return typeof e=="object"&&e!==null&&"then"in e}function Ar(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===il&&"_payload"in e&&cl(e._payload)}function vo(e){const t=ll(e),n=a.forwardRef((o,r)=>{let{children:s,...i}=o;Ar(s)&&typeof Vt=="function"&&(s=Vt(s._payload));const c=a.Children.toArray(s),l=c.find(dl);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var Dm=vo("Slot");function ll(e){const t=a.forwardRef((n,o)=>{let{children:r,...s}=n;if(Ar(r)&&typeof Vt=="function"&&(r=Vt(r._payload)),a.isValidElement(r)){const i=pl(r),c=fl(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ul=Symbol("radix.slottable");function dl(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ul}function fl(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function pl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hl=vl.reduce((e,t)=>{const n=vo(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),ml="Separator",nr="horizontal",gl=["horizontal","vertical"],_r=a.forwardRef((e,t)=>{const{decorative:n,orientation:o=nr,...r}=e,s=xl(o)?o:nr,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return f.jsx(hl.div,{"data-orientation":s,...c,...r,ref:t})});_r.displayName=ml;function xl(e){return gl.includes(e)}var jm=_r;function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function wl(e,t){const n=a.createContext(t),o=s=>{const{children:i,...c}=s,l=a.useMemo(()=>c,Object.values(c));return f.jsx(n.Provider,{value:l,children:i})};o.displayName=e+"Provider";function r(s){const i=a.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function z(e,t=[]){let n=[];function o(s,i){const c=a.createContext(i),l=n.length;n=[...n,i];const u=p=>{const{scope:v,children:m,...g}=p,h=v?.[e]?.[l]||c,x=a.useMemo(()=>g,Object.values(g));return f.jsx(h.Provider,{value:x,children:m})};u.displayName=s+"Provider";function d(p,v){const m=v?.[e]?.[l]||c,g=a.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(i=>a.createContext(i));return function(c){const l=c?.[e]||s;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Cl(r,...t)]}function Cl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=o.reduce((c,{useScope:l,scopeName:u})=>{const p=l(s)[`__scope${u}`];return{...c,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var q=globalThis?.document?a.useLayoutEffect:()=>{},bl=po[" useId ".trim().toString()]||(()=>{}),yl=0;function J(e){const[t,n]=a.useState(bl());return q(()=>{n(o=>o??String(yl++))},[e]),e||(t?`radix-${t}`:"")}var Sl=po[" useInsertionEffect ".trim().toString()]||q;function Z({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,i]=Rl({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=a.useRef(e!==void 0);a.useEffect(()=>{const p=d.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,o])}const u=a.useCallback(d=>{if(c){const p=El(d)?d(e):d;p!==e&&i.current?.(p)}else s(d)},[c,e,s,i]);return[l,u]}function Rl({defaultProp:e,onChange:t}){const[n,o]=a.useState(e),r=a.useRef(n),s=a.useRef(t);return Sl(()=>{s.current=t},[t]),a.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function El(e){return typeof e=="function"}function Pl(e){const t=Al(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Tl);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Al(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Il(r),c=Ml(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _l=Symbol("radix.slottable");function Tl(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_l}function Ml(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Il(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_=Nl.reduce((e,t)=>{const n=Pl(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Tr(e,t){e&&tn.flushSync(()=>e.dispatchEvent(t))}function Q(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ol(e,t=globalThis?.document){const n=Q(e);a.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Dl="DismissableLayer",Kn="dismissableLayer.update",jl="dismissableLayer.pointerDownOutside",kl="dismissableLayer.focusOutside",or,Mr=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ue=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...l}=e,u=a.useContext(Mr),[d,p]=a.useState(null),v=d?.ownerDocument??globalThis?.document,[,m]=a.useState({}),g=N(t,E=>p(E)),h=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),C=h.indexOf(x),w=d?h.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,y=w>=C,R=Fl(E=>{const T=E.target,I=[...u.branches].some(O=>O.contains(T));!y||I||(r?.(E),i?.(E),E.defaultPrevented||c?.())},v),P=Vl(E=>{const T=E.target;[...u.branches].some(O=>O.contains(T))||(s?.(E),i?.(E),E.defaultPrevented||c?.())},v);return Ol(E=>{w===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},v),a.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(or=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),rr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=or)}},[d,v,n,u]),a.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),rr())},[d,u]),a.useEffect(()=>{const E=()=>m({});return document.addEventListener(Kn,E),()=>document.removeEventListener(Kn,E)},[]),f.jsx(_.div,{...l,ref:g,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,P.onFocusCapture),onBlurCapture:S(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,R.onPointerDownCapture)})});Ue.displayName=Dl;var Ll="DismissableLayerBranch",$l=a.forwardRef((e,t)=>{const n=a.useContext(Mr),o=a.useRef(null),r=N(t,o);return a.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(_.div,{...e,ref:r})});$l.displayName=Ll;function Fl(e,t=globalThis?.document){const n=Q(e),o=a.useRef(!1),r=a.useRef(()=>{});return a.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){Ir(jl,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Vl(e,t=globalThis?.document){const n=Q(e),o=a.useRef(!1);return a.useEffect(()=>{const r=s=>{s.target&&!o.current&&Ir(kl,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function rr(){const e=new CustomEvent(Kn);document.dispatchEvent(e)}function Ir(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Tr(r,s):r.dispatchEvent(s)}var jn="focusScope.autoFocusOnMount",kn="focusScope.autoFocusOnUnmount",sr={bubbles:!1,cancelable:!0},Bl="FocusScope",mt=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[c,l]=a.useState(null),u=Q(r),d=Q(s),p=a.useRef(null),v=N(t,h=>l(h)),m=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(o){let h=function(b){if(m.paused||!c)return;const y=b.target;c.contains(y)?p.current=y:Ie(p.current,{select:!0})},x=function(b){if(m.paused||!c)return;const y=b.relatedTarget;y!==null&&(c.contains(y)||Ie(p.current,{select:!0}))},C=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&Ie(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const w=new MutationObserver(C);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),w.disconnect()}}},[o,c,m.paused]),a.useEffect(()=>{if(c){ir.add(m);const h=document.activeElement;if(!c.contains(h)){const C=new CustomEvent(jn,sr);c.addEventListener(jn,u),c.dispatchEvent(C),C.defaultPrevented||(Hl(zl(Nr(c)),{select:!0}),document.activeElement===h&&Ie(c))}return()=>{c.removeEventListener(jn,u),setTimeout(()=>{const C=new CustomEvent(kn,sr);c.addEventListener(kn,d),c.dispatchEvent(C),C.defaultPrevented||Ie(h??document.body,{select:!0}),c.removeEventListener(kn,d),ir.remove(m)},0)}}},[c,u,d,m]);const g=a.useCallback(h=>{if(!n&&!o||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,C=document.activeElement;if(x&&C){const w=h.currentTarget,[b,y]=Wl(w);b&&y?!h.shiftKey&&C===y?(h.preventDefault(),n&&Ie(b,{select:!0})):h.shiftKey&&C===b&&(h.preventDefault(),n&&Ie(y,{select:!0})):C===w&&h.preventDefault()}},[n,o,m.paused]);return f.jsx(_.div,{tabIndex:-1,...i,ref:v,onKeyDown:g})});mt.displayName=Bl;function Hl(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ie(o,{select:t}),document.activeElement!==n)return}function Wl(e){const t=Nr(e),n=ar(t,e),o=ar(t.reverse(),e);return[n,o]}function Nr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ar(e,t){for(const n of e)if(!Gl(n,{upTo:t}))return n}function Gl(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ul(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ul(e)&&t&&e.select()}}var ir=Kl();function Kl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=cr(e,t),e.unshift(t)},remove(t){e=cr(e,t),e[0]?.resume()}}}function cr(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function zl(e){return e.filter(t=>t.tagName!=="A")}var Yl="Portal",rt=a.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=a.useState(!1);q(()=>s(!0),[]);const i=n||r&&globalThis?.document?.body;return i?al.createPortal(f.jsx(_.div,{...o,ref:t}),i):null});rt.displayName=Yl;function Xl(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Y=e=>{const{present:t,children:n}=e,o=Zl(t),r=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),s=N(o.ref,ql(r));return typeof n=="function"||o.isPresent?a.cloneElement(r,{ref:s}):null};Y.displayName="Presence";function Zl(e){const[t,n]=a.useState(),o=a.useRef(null),r=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[c,l]=Xl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=It(o.current);s.current=c==="mounted"?u:"none"},[c]),q(()=>{const u=o.current,d=r.current;if(d!==e){const v=s.current,m=It(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&v!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),q(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,p=m=>{const h=It(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(l("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=m=>{m.target===t&&(s.current=It(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function It(e){return e?.animationName||"none"}function ql(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ln=0;function nn(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lr()),document.body.insertAdjacentElement("beforeend",e[1]??lr()),Ln++,()=>{Ln===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ln--}},[])}function lr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zn=function(e,t){return zn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},zn(e,t)};function km(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ge=function(){return ge=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ge.apply(this,arguments)};function Or(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Ql(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Lt="right-scroll-bar-position",$t="width-before-scroll-bar",Jl="with-scroll-bars-hidden",eu="--removed-body-scroll-bar-size";function $n(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tu(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var nu=typeof window<"u"?a.useLayoutEffect:a.useEffect,ur=new WeakMap;function ou(e,t){var n=tu(null,function(o){return e.forEach(function(r){return $n(r,o)})});return nu(function(){var o=ur.get(n);if(o){var r=new Set(o),s=new Set(e),i=n.current;r.forEach(function(c){s.has(c)||$n(c,null)}),s.forEach(function(c){r.has(c)||$n(c,i)})}ur.set(n,e)},[e]),n}function ru(e){return e}function su(e,t){t===void 0&&(t=ru);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,o);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(o=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return r}function au(e){e===void 0&&(e={});var t=su(null);return t.options=ge({async:!0,ssr:!1},e),t}var Dr=function(e){var t=e.sideCar,n=Or(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return a.createElement(o,ge({},n))};Dr.isSideCarExport=!0;function iu(e,t){return e.useMedium(t),Dr}var jr=au(),Fn=function(){},on=a.forwardRef(function(e,t){var n=a.useRef(null),o=a.useState({onScrollCapture:Fn,onWheelCapture:Fn,onTouchMoveCapture:Fn}),r=o[0],s=o[1],i=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,g=e.inert,h=e.allowPinchZoom,x=e.as,C=x===void 0?"div":x,w=e.gapMode,b=Or(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),y=v,R=ou([n,t]),P=ge(ge({},b),r);return a.createElement(a.Fragment,null,d&&a.createElement(y,{sideCar:jr,removeScrollBar:u,shards:p,noIsolation:m,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:w}),i?a.cloneElement(a.Children.only(c),ge(ge({},P),{ref:R})):a.createElement(C,ge({},P,{className:l,ref:R}),c))});on.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};on.classNames={fullWidth:$t,zeroRight:Lt};var cu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cu();return t&&e.setAttribute("nonce",t),e}function uu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function du(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lu())&&(uu(t,n),du(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pu=function(){var e=fu();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kr=function(){var e=pu(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},vu={left:0,top:0,right:0,gap:0},Vn=function(e){return parseInt(e||"",10)||0},hu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Vn(n),Vn(o),Vn(r)]},mu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vu;var t=hu(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},gu=kr(),qe="data-scroll-locked",xu=function(e,t,n,o){var r=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
import{r as a,R as po,j as f,a as tn,b as il,c as B}from"./vendor-tanstack-BK8oseNA.js";function tr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ce(...e){return t=>{let n=!1;const o=e.map(r=>{const s=tr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():tr(e[r],null)}}}}function N(...e){return a.useCallback(Ce(...e),e)}var cl=Symbol.for("react.lazy"),Vt=po[" use ".trim().toString()];function ll(e){return typeof e=="object"&&e!==null&&"then"in e}function Ar(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cl&&"_payload"in e&&ll(e._payload)}function vo(e){const t=ul(e),n=a.forwardRef((o,r)=>{let{children:s,...i}=o;Ar(s)&&typeof Vt=="function"&&(s=Vt(s._payload));const c=a.Children.toArray(s),l=c.find(fl);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var Dm=vo("Slot");function ul(e){const t=a.forwardRef((n,o)=>{let{children:r,...s}=n;if(Ar(r)&&typeof Vt=="function"&&(r=Vt(r._payload)),a.isValidElement(r)){const i=vl(r),c=pl(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dl=Symbol("radix.slottable");function fl(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dl}function pl(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function vl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ml=hl.reduce((e,t)=>{const n=vo(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),gl="Separator",nr="horizontal",xl=["horizontal","vertical"],_r=a.forwardRef((e,t)=>{const{decorative:n,orientation:o=nr,...r}=e,s=wl(o)?o:nr,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return f.jsx(ml.div,{"data-orientation":s,...c,...r,ref:t})});_r.displayName=gl;function wl(e){return xl.includes(e)}var jm=_r;function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Cl(e,t){const n=a.createContext(t),o=s=>{const{children:i,...c}=s,l=a.useMemo(()=>c,Object.values(c));return f.jsx(n.Provider,{value:l,children:i})};o.displayName=e+"Provider";function r(s){const i=a.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function z(e,t=[]){let n=[];function o(s,i){const c=a.createContext(i),l=n.length;n=[...n,i];const u=p=>{const{scope:v,children:m,...g}=p,h=v?.[e]?.[l]||c,x=a.useMemo(()=>g,Object.values(g));return f.jsx(h.Provider,{value:x,children:m})};u.displayName=s+"Provider";function d(p,v){const m=v?.[e]?.[l]||c,g=a.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(i=>a.createContext(i));return function(c){const l=c?.[e]||s;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,bl(r,...t)]}function bl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=o.reduce((c,{useScope:l,scopeName:u})=>{const p=l(s)[`__scope${u}`];return{...c,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var q=globalThis?.document?a.useLayoutEffect:()=>{},yl=po[" useId ".trim().toString()]||(()=>{}),Sl=0;function J(e){const[t,n]=a.useState(yl());return q(()=>{n(o=>o??String(Sl++))},[e]),e||(t?`radix-${t}`:"")}var Rl=po[" useInsertionEffect ".trim().toString()]||q;function Z({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,i]=El({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=a.useRef(e!==void 0);a.useEffect(()=>{const p=d.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,o])}const u=a.useCallback(d=>{if(c){const p=Pl(d)?d(e):d;p!==e&&i.current?.(p)}else s(d)},[c,e,s,i]);return[l,u]}function El({defaultProp:e,onChange:t}){const[n,o]=a.useState(e),r=a.useRef(n),s=a.useRef(t);return Rl(()=>{s.current=t},[t]),a.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Pl(e){return typeof e=="function"}function Al(e){const t=_l(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Ml);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function _l(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Nl(r),c=Il(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tl=Symbol("radix.slottable");function Ml(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tl}function Il(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Nl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ol=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_=Ol.reduce((e,t)=>{const n=Al(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Tr(e,t){e&&tn.flushSync(()=>e.dispatchEvent(t))}function Q(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function Dl(e,t=globalThis?.document){const n=Q(e);a.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var jl="DismissableLayer",Kn="dismissableLayer.update",kl="dismissableLayer.pointerDownOutside",Ll="dismissableLayer.focusOutside",or,Mr=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ue=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...l}=e,u=a.useContext(Mr),[d,p]=a.useState(null),v=d?.ownerDocument??globalThis?.document,[,m]=a.useState({}),g=N(t,E=>p(E)),h=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),C=h.indexOf(x),w=d?h.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,y=w>=C,R=Vl(E=>{const T=E.target,I=[...u.branches].some(O=>O.contains(T));!y||I||(r?.(E),i?.(E),E.defaultPrevented||c?.())},v),P=Bl(E=>{const T=E.target;[...u.branches].some(O=>O.contains(T))||(s?.(E),i?.(E),E.defaultPrevented||c?.())},v);return Dl(E=>{w===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},v),a.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(or=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),rr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=or)}},[d,v,n,u]),a.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),rr())},[d,u]),a.useEffect(()=>{const E=()=>m({});return document.addEventListener(Kn,E),()=>document.removeEventListener(Kn,E)},[]),f.jsx(_.div,{...l,ref:g,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,P.onFocusCapture),onBlurCapture:S(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,R.onPointerDownCapture)})});Ue.displayName=jl;var $l="DismissableLayerBranch",Fl=a.forwardRef((e,t)=>{const n=a.useContext(Mr),o=a.useRef(null),r=N(t,o);return a.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(_.div,{...e,ref:r})});Fl.displayName=$l;function Vl(e,t=globalThis?.document){const n=Q(e),o=a.useRef(!1),r=a.useRef(()=>{});return a.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){Ir(kl,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Bl(e,t=globalThis?.document){const n=Q(e),o=a.useRef(!1);return a.useEffect(()=>{const r=s=>{s.target&&!o.current&&Ir(Ll,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function rr(){const e=new CustomEvent(Kn);document.dispatchEvent(e)}function Ir(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Tr(r,s):r.dispatchEvent(s)}var jn="focusScope.autoFocusOnMount",kn="focusScope.autoFocusOnUnmount",sr={bubbles:!1,cancelable:!0},Hl="FocusScope",mt=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[c,l]=a.useState(null),u=Q(r),d=Q(s),p=a.useRef(null),v=N(t,h=>l(h)),m=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(o){let h=function(b){if(m.paused||!c)return;const y=b.target;c.contains(y)?p.current=y:Ie(p.current,{select:!0})},x=function(b){if(m.paused||!c)return;const y=b.relatedTarget;y!==null&&(c.contains(y)||Ie(p.current,{select:!0}))},C=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&Ie(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const w=new MutationObserver(C);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),w.disconnect()}}},[o,c,m.paused]),a.useEffect(()=>{if(c){ir.add(m);const h=document.activeElement;if(!c.contains(h)){const C=new CustomEvent(jn,sr);c.addEventListener(jn,u),c.dispatchEvent(C),C.defaultPrevented||(Wl(Yl(Nr(c)),{select:!0}),document.activeElement===h&&Ie(c))}return()=>{c.removeEventListener(jn,u),setTimeout(()=>{const C=new CustomEvent(kn,sr);c.addEventListener(kn,d),c.dispatchEvent(C),C.defaultPrevented||Ie(h??document.body,{select:!0}),c.removeEventListener(kn,d),ir.remove(m)},0)}}},[c,u,d,m]);const g=a.useCallback(h=>{if(!n&&!o||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,C=document.activeElement;if(x&&C){const w=h.currentTarget,[b,y]=Gl(w);b&&y?!h.shiftKey&&C===y?(h.preventDefault(),n&&Ie(b,{select:!0})):h.shiftKey&&C===b&&(h.preventDefault(),n&&Ie(y,{select:!0})):C===w&&h.preventDefault()}},[n,o,m.paused]);return f.jsx(_.div,{tabIndex:-1,...i,ref:v,onKeyDown:g})});mt.displayName=Hl;function Wl(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ie(o,{select:t}),document.activeElement!==n)return}function Gl(e){const t=Nr(e),n=ar(t,e),o=ar(t.reverse(),e);return[n,o]}function Nr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ar(e,t){for(const n of e)if(!Ul(n,{upTo:t}))return n}function Ul(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Kl(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Kl(e)&&t&&e.select()}}var ir=zl();function zl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=cr(e,t),e.unshift(t)},remove(t){e=cr(e,t),e[0]?.resume()}}}function cr(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Yl(e){return e.filter(t=>t.tagName!=="A")}var Xl="Portal",rt=a.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=a.useState(!1);q(()=>s(!0),[]);const i=n||r&&globalThis?.document?.body;return i?il.createPortal(f.jsx(_.div,{...o,ref:t}),i):null});rt.displayName=Xl;function Zl(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Y=e=>{const{present:t,children:n}=e,o=ql(t),r=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),s=N(o.ref,Ql(r));return typeof n=="function"||o.isPresent?a.cloneElement(r,{ref:s}):null};Y.displayName="Presence";function ql(e){const[t,n]=a.useState(),o=a.useRef(null),r=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[c,l]=Zl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=It(o.current);s.current=c==="mounted"?u:"none"},[c]),q(()=>{const u=o.current,d=r.current;if(d!==e){const v=s.current,m=It(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&v!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),q(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,p=m=>{const h=It(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(l("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=m=>{m.target===t&&(s.current=It(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function It(e){return e?.animationName||"none"}function Ql(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ln=0;function nn(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lr()),document.body.insertAdjacentElement("beforeend",e[1]??lr()),Ln++,()=>{Ln===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ln--}},[])}function lr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zn=function(e,t){return zn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},zn(e,t)};function km(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ge=function(){return ge=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ge.apply(this,arguments)};function Or(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Jl(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Lt="right-scroll-bar-position",$t="width-before-scroll-bar",eu="with-scroll-bars-hidden",tu="--removed-body-scroll-bar-size";function $n(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nu(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var ou=typeof window<"u"?a.useLayoutEffect:a.useEffect,ur=new WeakMap;function ru(e,t){var n=nu(null,function(o){return e.forEach(function(r){return $n(r,o)})});return ou(function(){var o=ur.get(n);if(o){var r=new Set(o),s=new Set(e),i=n.current;r.forEach(function(c){s.has(c)||$n(c,null)}),s.forEach(function(c){r.has(c)||$n(c,i)})}ur.set(n,e)},[e]),n}function su(e){return e}function au(e,t){t===void 0&&(t=su);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,o);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(o=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return r}function iu(e){e===void 0&&(e={});var t=au(null);return t.options=ge({async:!0,ssr:!1},e),t}var Dr=function(e){var t=e.sideCar,n=Or(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return a.createElement(o,ge({},n))};Dr.isSideCarExport=!0;function cu(e,t){return e.useMedium(t),Dr}var jr=iu(),Fn=function(){},on=a.forwardRef(function(e,t){var n=a.useRef(null),o=a.useState({onScrollCapture:Fn,onWheelCapture:Fn,onTouchMoveCapture:Fn}),r=o[0],s=o[1],i=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,g=e.inert,h=e.allowPinchZoom,x=e.as,C=x===void 0?"div":x,w=e.gapMode,b=Or(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),y=v,R=ru([n,t]),P=ge(ge({},b),r);return a.createElement(a.Fragment,null,d&&a.createElement(y,{sideCar:jr,removeScrollBar:u,shards:p,noIsolation:m,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:w}),i?a.cloneElement(a.Children.only(c),ge(ge({},P),{ref:R})):a.createElement(C,ge({},P,{className:l,ref:R}),c))});on.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};on.classNames={fullWidth:$t,zeroRight:Lt};var lu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=lu();return t&&e.setAttribute("nonce",t),e}function du(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uu())&&(du(t,n),fu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vu=function(){var e=pu();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kr=function(){var e=vu(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},hu={left:0,top:0,right:0,gap:0},Vn=function(e){return parseInt(e||"",10)||0},mu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Vn(n),Vn(o),Vn(r)]},gu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return hu;var t=mu(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},xu=kr(),qe="data-scroll-locked",wu=function(e,t,n,o){var r=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(eu,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
5
|
}
|
|
@@ -33,20 +33,20 @@ import{r as a,R as po,j as f,a as tn,b as al,c as B}from"./vendor-tanstack-BK8os
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body[`).concat(qe,`] {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(tu,": ").concat(c,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},dr=function(){var e=parseInt(document.body.getAttribute(qe)||"0",10);return isFinite(e)?e:0},
|
|
38
|
+
`)},dr=function(){var e=parseInt(document.body.getAttribute(qe)||"0",10);return isFinite(e)?e:0},Cu=function(){a.useEffect(function(){return document.body.setAttribute(qe,(dr()+1).toString()),function(){var e=dr()-1;e<=0?document.body.removeAttribute(qe):document.body.setAttribute(qe,e.toString())}},[])},bu=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Cu();var s=a.useMemo(function(){return gu(r)},[r]);return a.createElement(xu,{styles:wu(s,!t,r,n?"":"!important")})},Yn=!1;if(typeof window<"u")try{var Nt=Object.defineProperty({},"passive",{get:function(){return Yn=!0,!0}});window.addEventListener("test",Nt,Nt),window.removeEventListener("test",Nt,Nt)}catch{Yn=!1}var Ye=Yn?{passive:!1}:!1,yu=function(e){return e.tagName==="TEXTAREA"},Lr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yu(e)&&n[t]==="visible")},Su=function(e){return Lr(e,"overflowY")},Ru=function(e){return Lr(e,"overflowX")},fr=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=$r(e,o);if(r){var s=Fr(e,o),i=s[1],c=s[2];if(i>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Eu=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Pu=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},$r=function(e,t){return e==="v"?Su(t):Ru(t)},Fr=function(e,t){return e==="v"?Eu(t):Pu(t)},Au=function(e,t){return e==="h"&&t==="rtl"?-1:1},_u=function(e,t,n,o,r){var s=Au(e,window.getComputedStyle(t).direction),i=s*o,c=n.target,l=t.contains(c),u=!1,d=i>0,p=0,v=0;do{var m=Fr(e,c),g=m[0],h=m[1],x=m[2],C=h-x-s*g;(g||C)&&$r(e,c)&&(p+=C,v+=g),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(p)<1||!d&&Math.abs(v)<1)&&(u=!0),u},Ot=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pr=function(e){return[e.deltaX,e.deltaY]},vr=function(e){return e&&"current"in e?e.current:e},Tu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mu=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Mu=0,Xe=[];function Iu(e){var t=a.useRef([]),n=a.useRef([0,0]),o=a.useRef(),r=a.useState(Mu++)[0],s=a.useState(kr)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=Ql([e.lockRef.current],(e.shards||[]).map(vr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var C=Ot(h),w=n.current,b="deltaX"in h?h.deltaX:w[0]-C[0],y="deltaY"in h?h.deltaY:w[1]-C[1],R,P=h.target,E=Math.abs(b)>Math.abs(y)?"h":"v";if("touches"in h&&E==="h"&&P.type==="range")return!1;var T=fr(E,P);if(!T)return!0;if(T?R=E:(R=E==="v"?"h":"v",T=fr(E,P)),!T)return!1;if(!o.current&&"changedTouches"in h&&(b||y)&&(o.current=R),!R)return!0;var I=o.current||R;return Au(I,x,h,I==="h"?b:y)},[]),l=a.useCallback(function(h){var x=h;if(!(!Xe.length||Xe[Xe.length-1]!==s)){var C="deltaY"in x?pr(x):Ot(x),w=t.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&_u(R.delta,C)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var b=(i.current.shards||[]).map(vr).filter(Boolean).filter(function(R){return R.contains(x.target)}),y=b.length>0?c(x,b[0]):!i.current.noIsolation;y&&x.cancelable&&x.preventDefault()}}},[]),u=a.useCallback(function(h,x,C,w){var b={name:h,delta:x,target:C,should:w,shadowParent:Nu(C)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(y){return y!==b})},1)},[]),d=a.useCallback(function(h){n.current=Ot(h),o.current=void 0},[]),p=a.useCallback(function(h){u(h.type,pr(h),h.target,c(h,e.lockRef.current))},[]),v=a.useCallback(function(h){u(h.type,Ot(h),h.target,c(h,e.lockRef.current))},[]);a.useEffect(function(){return Xe.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",l,Ye),document.addEventListener("touchmove",l,Ye),document.addEventListener("touchstart",d,Ye),function(){Xe=Xe.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,Ye),document.removeEventListener("touchmove",l,Ye),document.removeEventListener("touchstart",d,Ye)}},[]);var m=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:Tu(r)}):null,m?a.createElement(Cu,{gapMode:e.gapMode}):null)}function Nu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ou=iu(jr,Iu);var gt=a.forwardRef(function(e,t){return a.createElement(on,ge({},e,{ref:t,sideCar:Ou}))});gt.classNames=on.classNames;var Du=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ze=new WeakMap,Dt=new WeakMap,jt={},Bn=0,Vr=function(e){return e&&(e.host||Vr(e.parentNode))},ju=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Vr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ku=function(e,t,n,o){var r=ju(t,Array.isArray(e)?e:[e]);jt[n]||(jt[n]=new WeakMap);var s=jt[n],i=[],c=new Set,l=new Set(r),u=function(p){!p||c.has(p)||(c.add(p),u(p.parentNode))};r.forEach(u);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(v){if(c.has(v))d(v);else try{var m=v.getAttribute(o),g=m!==null&&m!=="false",h=(Ze.get(v)||0)+1,x=(s.get(v)||0)+1;Ze.set(v,h),s.set(v,x),i.push(v),h===1&&g&&Dt.set(v,!0),x===1&&v.setAttribute(n,"true"),g||v.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return d(t),c.clear(),Bn++,function(){i.forEach(function(p){var v=Ze.get(p)-1,m=s.get(p)-1;Ze.set(p,v),s.set(p,m),v||(Dt.has(p)||p.removeAttribute(o),Dt.delete(p)),m||p.removeAttribute(n)}),Bn--,Bn||(Ze=new WeakMap,Ze=new WeakMap,Dt=new WeakMap,jt={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Du(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),ku(o,r,n,"aria-hidden")):function(){return null}};function Lu(e){const t=$u(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Vu);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function $u(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Hu(r),c=Bu(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fu=Symbol("radix.slottable");function Vu(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fu}function Bu(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Hu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sn="Dialog",[Br,Hr]=z(sn),[Wu,he]=Br(sn),Wr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,c=a.useRef(null),l=a.useRef(null),[u,d]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:sn});return f.jsx(Wu,{scope:t,triggerRef:c,contentRef:l,contentId:J(),titleId:J(),descriptionId:J(),open:u,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(p=>!p),[d]),modal:i,children:n})};Wr.displayName=sn;var Gr="DialogTrigger",Ur=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(Gr,n),s=N(t,r.triggerRef);return f.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":go(r.open),...o,ref:s,onClick:S(e.onClick,r.onOpenToggle)})});Ur.displayName=Gr;var ho="DialogPortal",[Gu,Kr]=Br(ho,{forceMount:void 0}),zr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=he(ho,t);return f.jsx(Gu,{scope:t,forceMount:n,children:a.Children.map(o,i=>f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:i})}))})};zr.displayName=ho;var Bt="DialogOverlay",Yr=a.forwardRef((e,t)=>{const n=Kr(Bt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=he(Bt,e.__scopeDialog);return s.modal?f.jsx(Y,{present:o||s.open,children:f.jsx(Ku,{...r,ref:t})}):null});Yr.displayName=Bt;var Uu=Lu("DialogOverlay.RemoveScroll"),Ku=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(Bt,n);return f.jsx(gt,{as:Uu,allowPinchZoom:!0,shards:[r.contentRef],children:f.jsx(_.div,{"data-state":go(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Be="DialogContent",Xr=a.forwardRef((e,t)=>{const n=Kr(Be,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=he(Be,e.__scopeDialog);return f.jsx(Y,{present:o||s.open,children:s.modal?f.jsx(zu,{...r,ref:t}):f.jsx(Yu,{...r,ref:t})})});Xr.displayName=Be;var zu=a.forwardRef((e,t)=>{const n=he(Be,e.__scopeDialog),o=a.useRef(null),r=N(t,n.contentRef,o);return a.useEffect(()=>{const s=o.current;if(s)return rn(s)},[]),f.jsx(Zr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:S(e.onFocusOutside,s=>s.preventDefault())})}),Yu=a.forwardRef((e,t)=>{const n=he(Be,e.__scopeDialog),o=a.useRef(!1),r=a.useRef(!1);return f.jsx(Zr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Zr=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,c=he(Be,n),l=a.useRef(null),u=N(t,l);return nn(),f.jsxs(f.Fragment,{children:[f.jsx(mt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:f.jsx(Ue,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":go(c.open),...i,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(Zu,{titleId:c.titleId}),f.jsx(Qu,{contentRef:l,descriptionId:c.descriptionId})]})]})}),mo="DialogTitle",qr=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(mo,n);return f.jsx(_.h2,{id:r.titleId,...o,ref:t})});qr.displayName=mo;var Qr="DialogDescription",Jr=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(Qr,n);return f.jsx(_.p,{id:r.descriptionId,...o,ref:t})});Jr.displayName=Qr;var es="DialogClose",ts=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(es,n);return f.jsx(_.button,{type:"button",...o,ref:t,onClick:S(e.onClick,()=>r.onOpenChange(!1))})});ts.displayName=es;function go(e){return e?"open":"closed"}var ns="DialogTitleWarning",[Xu,os]=wl(ns,{contentName:Be,titleName:mo,docsSlug:"dialog"}),Zu=({titleId:e})=>{const t=os(ns),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
41
|
+
`)},Iu=0,Xe=[];function Nu(e){var t=a.useRef([]),n=a.useRef([0,0]),o=a.useRef(),r=a.useState(Iu++)[0],s=a.useState(kr)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=Jl([e.lockRef.current],(e.shards||[]).map(vr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var C=Ot(h),w=n.current,b="deltaX"in h?h.deltaX:w[0]-C[0],y="deltaY"in h?h.deltaY:w[1]-C[1],R,P=h.target,E=Math.abs(b)>Math.abs(y)?"h":"v";if("touches"in h&&E==="h"&&P.type==="range")return!1;var T=fr(E,P);if(!T)return!0;if(T?R=E:(R=E==="v"?"h":"v",T=fr(E,P)),!T)return!1;if(!o.current&&"changedTouches"in h&&(b||y)&&(o.current=R),!R)return!0;var I=o.current||R;return _u(I,x,h,I==="h"?b:y)},[]),l=a.useCallback(function(h){var x=h;if(!(!Xe.length||Xe[Xe.length-1]!==s)){var C="deltaY"in x?pr(x):Ot(x),w=t.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&Tu(R.delta,C)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var b=(i.current.shards||[]).map(vr).filter(Boolean).filter(function(R){return R.contains(x.target)}),y=b.length>0?c(x,b[0]):!i.current.noIsolation;y&&x.cancelable&&x.preventDefault()}}},[]),u=a.useCallback(function(h,x,C,w){var b={name:h,delta:x,target:C,should:w,shadowParent:Ou(C)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(y){return y!==b})},1)},[]),d=a.useCallback(function(h){n.current=Ot(h),o.current=void 0},[]),p=a.useCallback(function(h){u(h.type,pr(h),h.target,c(h,e.lockRef.current))},[]),v=a.useCallback(function(h){u(h.type,Ot(h),h.target,c(h,e.lockRef.current))},[]);a.useEffect(function(){return Xe.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",l,Ye),document.addEventListener("touchmove",l,Ye),document.addEventListener("touchstart",d,Ye),function(){Xe=Xe.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,Ye),document.removeEventListener("touchmove",l,Ye),document.removeEventListener("touchstart",d,Ye)}},[]);var m=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:Mu(r)}):null,m?a.createElement(bu,{gapMode:e.gapMode}):null)}function Ou(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Du=cu(jr,Nu);var gt=a.forwardRef(function(e,t){return a.createElement(on,ge({},e,{ref:t,sideCar:Du}))});gt.classNames=on.classNames;var ju=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ze=new WeakMap,Dt=new WeakMap,jt={},Bn=0,Vr=function(e){return e&&(e.host||Vr(e.parentNode))},ku=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Vr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Lu=function(e,t,n,o){var r=ku(t,Array.isArray(e)?e:[e]);jt[n]||(jt[n]=new WeakMap);var s=jt[n],i=[],c=new Set,l=new Set(r),u=function(p){!p||c.has(p)||(c.add(p),u(p.parentNode))};r.forEach(u);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(v){if(c.has(v))d(v);else try{var m=v.getAttribute(o),g=m!==null&&m!=="false",h=(Ze.get(v)||0)+1,x=(s.get(v)||0)+1;Ze.set(v,h),s.set(v,x),i.push(v),h===1&&g&&Dt.set(v,!0),x===1&&v.setAttribute(n,"true"),g||v.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return d(t),c.clear(),Bn++,function(){i.forEach(function(p){var v=Ze.get(p)-1,m=s.get(p)-1;Ze.set(p,v),s.set(p,m),v||(Dt.has(p)||p.removeAttribute(o),Dt.delete(p)),m||p.removeAttribute(n)}),Bn--,Bn||(Ze=new WeakMap,Ze=new WeakMap,Dt=new WeakMap,jt={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ju(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),Lu(o,r,n,"aria-hidden")):function(){return null}};function $u(e){const t=Fu(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Bu);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Fu(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Wu(r),c=Hu(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vu=Symbol("radix.slottable");function Bu(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vu}function Hu(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Wu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sn="Dialog",[Br,Hr]=z(sn),[Gu,he]=Br(sn),Wr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,c=a.useRef(null),l=a.useRef(null),[u,d]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:sn});return f.jsx(Gu,{scope:t,triggerRef:c,contentRef:l,contentId:J(),titleId:J(),descriptionId:J(),open:u,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(p=>!p),[d]),modal:i,children:n})};Wr.displayName=sn;var Gr="DialogTrigger",Ur=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(Gr,n),s=N(t,r.triggerRef);return f.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":go(r.open),...o,ref:s,onClick:S(e.onClick,r.onOpenToggle)})});Ur.displayName=Gr;var ho="DialogPortal",[Uu,Kr]=Br(ho,{forceMount:void 0}),zr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=he(ho,t);return f.jsx(Uu,{scope:t,forceMount:n,children:a.Children.map(o,i=>f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:i})}))})};zr.displayName=ho;var Bt="DialogOverlay",Yr=a.forwardRef((e,t)=>{const n=Kr(Bt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=he(Bt,e.__scopeDialog);return s.modal?f.jsx(Y,{present:o||s.open,children:f.jsx(zu,{...r,ref:t})}):null});Yr.displayName=Bt;var Ku=$u("DialogOverlay.RemoveScroll"),zu=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(Bt,n);return f.jsx(gt,{as:Ku,allowPinchZoom:!0,shards:[r.contentRef],children:f.jsx(_.div,{"data-state":go(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Be="DialogContent",Xr=a.forwardRef((e,t)=>{const n=Kr(Be,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=he(Be,e.__scopeDialog);return f.jsx(Y,{present:o||s.open,children:s.modal?f.jsx(Yu,{...r,ref:t}):f.jsx(Xu,{...r,ref:t})})});Xr.displayName=Be;var Yu=a.forwardRef((e,t)=>{const n=he(Be,e.__scopeDialog),o=a.useRef(null),r=N(t,n.contentRef,o);return a.useEffect(()=>{const s=o.current;if(s)return rn(s)},[]),f.jsx(Zr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:S(e.onFocusOutside,s=>s.preventDefault())})}),Xu=a.forwardRef((e,t)=>{const n=he(Be,e.__scopeDialog),o=a.useRef(!1),r=a.useRef(!1);return f.jsx(Zr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Zr=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,c=he(Be,n),l=a.useRef(null),u=N(t,l);return nn(),f.jsxs(f.Fragment,{children:[f.jsx(mt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:f.jsx(Ue,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":go(c.open),...i,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(qu,{titleId:c.titleId}),f.jsx(Ju,{contentRef:l,descriptionId:c.descriptionId})]})]})}),mo="DialogTitle",qr=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(mo,n);return f.jsx(_.h2,{id:r.titleId,...o,ref:t})});qr.displayName=mo;var Qr="DialogDescription",Jr=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(Qr,n);return f.jsx(_.p,{id:r.descriptionId,...o,ref:t})});Jr.displayName=Qr;var es="DialogClose",ts=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=he(es,n);return f.jsx(_.button,{type:"button",...o,ref:t,onClick:S(e.onClick,()=>r.onOpenChange(!1))})});ts.displayName=es;function go(e){return e?"open":"closed"}var ns="DialogTitleWarning",[Zu,os]=Cl(ns,{contentName:Be,titleName:mo,docsSlug:"dialog"}),qu=({titleId:e})=>{const t=os(ns),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},qu="DialogDescriptionWarning",Qu=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${os(qu).contentName}}.`;return a.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Ju=Wr,ed=Ur,td=zr,nd=Yr,od=Xr,rd=qr,sd=Jr,rs=ts;const ad=["top","right","bottom","left"],Oe=Math.min,se=Math.max,Ht=Math.round,kt=Math.floor,xe=e=>({x:e,y:e}),id={left:"right",right:"left",bottom:"top",top:"bottom"},cd={start:"end",end:"start"};function Xn(e,t,n){return se(e,Oe(t,n))}function Ae(e,t){return typeof e=="function"?e(t):e}function _e(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function xo(e){return e==="x"?"y":"x"}function wo(e){return e==="y"?"height":"width"}function De(e){return["top","bottom"].includes(_e(e))?"y":"x"}function Co(e){return xo(De(e))}function ld(e,t,n){n===void 0&&(n=!1);const o=st(e),r=Co(e),s=wo(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Wt(i)),[i,Wt(i)]}function ud(e){const t=Wt(e);return[Zn(e),t,Zn(t)]}function Zn(e){return e.replace(/start|end/g,t=>cd[t])}function dd(e,t,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?s:i;default:return[]}}function fd(e,t,n,o){const r=st(e);let s=dd(_e(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(Zn)))),s}function Wt(e){return e.replace(/left|right|bottom|top/g,t=>id[t])}function pd(e){return{top:0,right:0,bottom:0,left:0,...e}}function ss(e){return typeof e!="number"?pd(e):{top:e,right:e,bottom:e,left:e}}function Gt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function hr(e,t,n){let{reference:o,floating:r}=e;const s=De(t),i=Co(t),c=wo(i),l=_e(t),u=s==="y",d=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,v=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:d,y:o.y-r.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:p};break;case"left":m={x:o.x-r.width,y:p};break;default:m={x:o.x,y:o.y}}switch(st(t)){case"start":m[i]-=v*(n&&u?-1:1);break;case"end":m[i]+=v*(n&&u?-1:1);break}return m}const vd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=hr(u,o,l),v=o,m={},g=0;for(let h=0;h<c.length;h++){const{name:x,fn:C}=c[h],{x:w,y:b,data:y,reset:R}=await C({x:d,y:p,initialPlacement:o,placement:v,strategy:r,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});d=w??d,p=b??p,m={...m,[x]:{...m[x],...y}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:d,y:p}=hr(u,v,l)),h=-1)}return{x:d,y:p,placement:v,strategy:r,middlewareData:m}};async function dt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=Ae(t,e),g=ss(m),x=c[v?p==="floating"?"reference":"floating":p],C=Gt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},R=Gt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return{top:(C.top-R.top+g.top)/y.y,bottom:(R.bottom-C.bottom+g.bottom)/y.y,left:(C.left-R.left+g.left)/y.x,right:(R.right-C.right+g.right)/y.x}}const hd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Ae(e,t)||{};if(u==null)return{};const p=ss(d),v={x:n,y:o},m=Co(r),g=wo(m),h=await i.getDimensions(u),x=m==="y",C=x?"top":"left",w=x?"bottom":"right",b=x?"clientHeight":"clientWidth",y=s.reference[g]+s.reference[m]-v[m]-s.floating[g],R=v[m]-s.reference[m],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=P?P[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(P)))&&(E=c.floating[b]||s.floating[g]);const T=y/2-R/2,I=E/2-h[g]/2-1,O=Oe(p[C],I),k=Oe(p[w],I),F=O,$=E-h[g]-k,L=E/2-h[g]/2+T,H=Xn(F,L,$),j=!l.arrow&&st(r)!=null&&L!==H&&s.reference[g]/2-(L<F?O:k)-h[g]/2<0,V=j?L<F?L-F:L-$:0;return{[m]:v[m]+V,data:{[m]:H,centerOffset:L-H-V,...j&&{alignmentOffset:V}},reset:j}}}),md=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=Ae(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=_e(r),w=De(c),b=_e(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=v||(b||!h?[Wt(c)]:ud(c)),P=g!=="none";!v&&P&&R.push(...fd(c,h,g,y));const E=[c,...R],T=await dt(t,x),I=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&I.push(T[C]),p){const L=ld(r,i,y);I.push(T[L[0]],T[L[1]])}if(O=[...O,{placement:r,overflows:I}],!I.every(L=>L<=0)){var k,F;const L=(((k=s.flip)==null?void 0:k.index)||0)+1,H=E[L];if(H)return{data:{index:L,overflows:O},reset:{placement:H}};let j=(F=O.filter(V=>V.overflows[0]<=0).sort((V,D)=>V.overflows[1]-D.overflows[1])[0])==null?void 0:F.placement;if(!j)switch(m){case"bestFit":{var $;const V=($=O.filter(D=>{if(P){const A=De(D.placement);return A===w||A==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(A=>A>0).reduce((A,K)=>A+K,0)]).sort((D,A)=>D[1]-A[1])[0])==null?void 0:$[0];V&&(j=V);break}case"initialPlacement":j=c;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function mr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gr(e){return ad.some(t=>e[t]>=0)}const gd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ae(e,t);switch(o){case"referenceHidden":{const s=await dt(t,{...r,elementContext:"reference"}),i=mr(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:gr(i)}}}case"escaped":{const s=await dt(t,{...r,altBoundary:!0}),i=mr(s,n.floating);return{data:{escapedOffsets:i,escaped:gr(i)}}}default:return{}}}}};async function xd(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=_e(n),c=st(n),l=De(n)==="y",u=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,p=Ae(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof g=="number"&&(m=c==="end"?g*-1:g),l?{x:m*d,y:v*u}:{x:v*u,y:m*d}}const wd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await xd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Cd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:C,y:w}=x;return{x:C,y:w}}},...l}=Ae(e,t),u={x:n,y:o},d=await dt(t,l),p=De(_e(r)),v=xo(p);let m=u[v],g=u[p];if(s){const x=v==="y"?"top":"left",C=v==="y"?"bottom":"right",w=m+d[x],b=m-d[C];m=Xn(w,m,b)}if(i){const x=p==="y"?"top":"left",C=p==="y"?"bottom":"right",w=g+d[x],b=g-d[C];g=Xn(w,g,b)}const h=c.fn({...t,[v]:m,[p]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[v]:s,[p]:i}}}}}},bd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Ae(e,t),d={x:n,y:o},p=De(r),v=xo(p);let m=d[v],g=d[p];const h=Ae(c,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=v==="y"?"height":"width",y=s.reference[v]-s.floating[b]+x.mainAxis,R=s.reference[v]+s.reference[b]-x.mainAxis;m<y?m=y:m>R&&(m=R)}if(u){var C,w;const b=v==="y"?"width":"height",y=["top","left"].includes(_e(r)),R=s.reference[p]-s.floating[b]+(y&&((C=i.offset)==null?void 0:C[p])||0)+(y?0:x.crossAxis),P=s.reference[p]+s.reference[b]+(y?0:((w=i.offset)==null?void 0:w[p])||0)-(y?x.crossAxis:0);g<R?g=R:g>P&&(g=P)}return{[v]:m,[p]:g}}}},yd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:c}=t,{apply:l=()=>{},...u}=Ae(e,t),d=await dt(t,u),p=_e(r),v=st(r),m=De(r)==="y",{width:g,height:h}=s.floating;let x,C;p==="top"||p==="bottom"?(x=p,C=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(C=p,x=v==="end"?"top":"bottom");const w=h-d.top-d.bottom,b=g-d.left-d.right,y=Oe(h-d[x],w),R=Oe(g-d[C],b),P=!t.middlewareData.shift;let E=y,T=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=w),P&&!v){const O=se(d.left,0),k=se(d.right,0),F=se(d.top,0),$=se(d.bottom,0);m?T=g-2*(O!==0||k!==0?O+k:se(d.left,d.right)):E=h-2*(F!==0||$!==0?F+$:se(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:E});const I=await i.getDimensions(c.floating);return g!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function an(){return typeof window<"u"}function at(e){return as(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){var t;return(t=(as(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function as(e){return an()?e instanceof Node||e instanceof ae(e).Node:!1}function pe(e){return an()?e instanceof Element||e instanceof ae(e).Element:!1}function we(e){return an()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function xr(e){return!an()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function xt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Sd(e){return["table","td","th"].includes(at(e))}function cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function bo(e){const t=yo(),n=pe(e)?ve(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Rd(e){let t=je(e);for(;we(t)&&!et(t);){if(bo(t))return t;if(cn(t))return null;t=je(t)}return null}function yo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(e){return["html","body","#document"].includes(at(e))}function ve(e){return ae(e).getComputedStyle(e)}function ln(e){return pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(at(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xr(e)&&e.host||be(e);return xr(t)?t.host:t}function is(e){const t=je(e);return et(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&xt(t)?t:is(t)}function ft(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=is(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=ae(r);if(s){const c=qn(i);return t.concat(i,i.visualViewport||[],xt(r)?r:[],c&&n?ft(c):[])}return t.concat(r,ft(r,[],n))}function qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=ve(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=we(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Ht(n)!==s||Ht(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function So(e){return pe(e)?e:e.contextElement}function Qe(e){const t=So(e);if(!we(t))return xe(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=cs(t);let i=(s?Ht(n.width):n.width)/o,c=(s?Ht(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ed=xe(0);function ls(e){const t=ae(e);return!yo()||!t.visualViewport?Ed:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function He(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=So(e);let i=xe(1);t&&(o?pe(o)&&(i=Qe(o)):i=Qe(e));const c=Pd(s,n,o)?ls(s):xe(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,d=r.width/i.x,p=r.height/i.y;if(s){const v=ae(s),m=o&&pe(o)?ae(o):o;let g=v,h=qn(g);for(;h&&o&&m!==g;){const x=Qe(h),C=h.getBoundingClientRect(),w=ve(h),b=C.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,y=C.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,p*=x.y,l+=b,u+=y,g=ae(h),h=qn(g)}}return Gt({width:d,height:p,x:l,y:u})}function Ro(e,t){const n=ln(e).scrollLeft;return t?t.left+n:He(be(e)).left+n}function us(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:Ro(e,o)),s=o.top+t.scrollTop;return{x:r,y:s}}function Ad(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=be(o),c=t?cn(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=xe(1);const d=xe(0),p=we(o);if((p||!p&&!s)&&((at(o)!=="body"||xt(i))&&(l=ln(o)),we(o))){const m=He(o);u=Qe(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const v=i&&!p&&!s?us(i,l,!0):xe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+v.x,y:n.y*u.y-l.scrollTop*u.y+d.y+v.y}}function _d(e){return Array.from(e.getClientRects())}function Td(e){const t=be(e),n=ln(e),o=e.ownerDocument.body,r=se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Ro(e);const c=-n.scrollTop;return ve(o).direction==="rtl"&&(i+=se(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}function Md(e,t){const n=ae(e),o=be(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(r){s=r.width,i=r.height;const u=yo();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:c,y:l}}function Id(e,t){const n=He(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=we(e)?Qe(e):xe(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:c,x:l,y:u}}function wr(e,t,n){let o;if(t==="viewport")o=Md(e,n);else if(t==="document")o=Td(be(e));else if(pe(t))o=Id(t,n);else{const r=ls(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Gt(o)}function ds(e,t){const n=je(e);return n===t||!pe(n)||et(n)?!1:ve(n).position==="fixed"||ds(n,t)}function Nd(e,t){const n=t.get(e);if(n)return n;let o=ft(e,[],!1).filter(c=>pe(c)&&at(c)!=="body"),r=null;const s=ve(e).position==="fixed";let i=s?je(e):e;for(;pe(i)&&!et(i);){const c=ve(i),l=bo(i);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||xt(i)&&!l&&ds(e,i))?o=o.filter(d=>d!==i):r=c,i=je(i)}return t.set(e,o),o}function Od(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?cn(t)?[]:Nd(t,this._c):[].concat(n),o],c=i[0],l=i.reduce((u,d)=>{const p=wr(t,d,r);return u.top=se(p.top,u.top),u.right=Oe(p.right,u.right),u.bottom=Oe(p.bottom,u.bottom),u.left=se(p.left,u.left),u},wr(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dd(e){const{width:t,height:n}=cs(e);return{width:t,height:n}}function jd(e,t,n){const o=we(t),r=be(t),s=n==="fixed",i=He(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=xe(0);if(o||!o&&!s)if((at(t)!=="body"||xt(r))&&(c=ln(t)),o){const v=He(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else r&&(l.x=Ro(r));const u=r&&!o&&!s?us(r,c):xe(0),d=i.left+c.scrollLeft-l.x-u.x,p=i.top+c.scrollTop-l.y-u.y;return{x:d,y:p,width:i.width,height:i.height}}function Hn(e){return ve(e).position==="static"}function Cr(e,t){if(!we(e)||ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function fs(e,t){const n=ae(e);if(cn(e))return n;if(!we(e)){let r=je(e);for(;r&&!et(r);){if(pe(r)&&!Hn(r))return r;r=je(r)}return n}let o=Cr(e,t);for(;o&&Sd(o)&&Hn(o);)o=Cr(o,t);return o&&et(o)&&Hn(o)&&!bo(o)?n:o||Rd(e)||n}const kd=async function(e){const t=this.getOffsetParent||fs,n=this.getDimensions,o=await n(e.floating);return{reference:jd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ld(e){return ve(e).direction==="rtl"}const $d={convertOffsetParentRelativeRectToViewportRelativeRect:Ad,getDocumentElement:be,getClippingRect:Od,getOffsetParent:fs,getElementRects:kd,getClientRects:_d,getDimensions:Dd,getScale:Qe,isElement:pe,isRTL:Ld};function Fd(e,t){let n=null,o;const r=be(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:d,width:p,height:v}=e.getBoundingClientRect();if(c||t(),!p||!v)return;const m=kt(d),g=kt(r.clientWidth-(u+p)),h=kt(r.clientHeight-(d+v)),x=kt(u),w={rootMargin:-m+"px "+-g+"px "+-h+"px "+-x+"px",threshold:se(0,Oe(1,l))||1};let b=!0;function y(R){const P=R[0].intersectionRatio;if(P!==l){if(!b)return i();P?i(!1,P):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(y,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,w)}n.observe(e)}return i(!0),s}function Vd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=So(e),d=r||s?[...u?ft(u):[],...ft(t)]:[];d.forEach(C=>{r&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const p=u&&c?Fd(u,n):null;let v=-1,m=null;i&&(m=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let g,h=l?He(e):null;l&&x();function x(){const C=He(e);h&&(C.x!==h.x||C.y!==h.y||C.width!==h.width||C.height!==h.height)&&n(),h=C,g=requestAnimationFrame(x)}return n(),()=>{var C;d.forEach(w=>{r&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),p?.(),(C=m)==null||C.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const Bd=wd,Hd=Cd,Wd=md,Gd=yd,Ud=gd,br=hd,Kd=bd,zd=(e,t,n)=>{const o=new Map,r={platform:$d,...n},s={...r.platform,_c:o};return vd(e,t,{...r,platform:s})};var Ft=typeof document<"u"?a.useLayoutEffect:a.useEffect;function Ut(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Ut(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Ut(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ps(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yr(e,t){const n=ps(e);return Math.round(t*n)/n}function Wn(e){const t=a.useRef(e);return Ft(()=>{t.current=e}),t}function Yd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=a.useState(o);Ut(v,o)||m(o);const[g,h]=a.useState(null),[x,C]=a.useState(null),w=a.useCallback(D=>{D!==P.current&&(P.current=D,h(D))},[]),b=a.useCallback(D=>{D!==E.current&&(E.current=D,C(D))},[]),y=s||g,R=i||x,P=a.useRef(null),E=a.useRef(null),T=a.useRef(d),I=l!=null,O=Wn(l),k=Wn(r),F=Wn(u),$=a.useCallback(()=>{if(!P.current||!E.current)return;const D={placement:t,strategy:n,middleware:v};k.current&&(D.platform=k.current),zd(P.current,E.current,D).then(A=>{const K={...A,isPositioned:F.current!==!1};L.current&&!Ut(T.current,K)&&(T.current=K,tn.flushSync(()=>{p(K)}))})},[v,t,n,k,F]);Ft(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[u]);const L=a.useRef(!1);Ft(()=>(L.current=!0,()=>{L.current=!1}),[]),Ft(()=>{if(y&&(P.current=y),R&&(E.current=R),y&&R){if(O.current)return O.current(y,R,$);$()}},[y,R,$,O,I]);const H=a.useMemo(()=>({reference:P,floating:E,setReference:w,setFloating:b}),[w,b]),j=a.useMemo(()=>({reference:y,floating:R}),[y,R]),V=a.useMemo(()=>{const D={position:n,left:0,top:0};if(!j.floating)return D;const A=yr(j.floating,d.x),K=yr(j.floating,d.y);return c?{...D,transform:"translate("+A+"px, "+K+"px)",...ps(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:K}},[n,c,j.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:$,refs:H,elements:j,floatingStyles:V}),[d,$,H,j,V])}const Xd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?br({element:o.current,padding:r}).fn(n):{}:o?br({element:o,padding:r}).fn(n):{}}}},Zd=(e,t)=>({...Bd(e),options:[e,t]}),qd=(e,t)=>({...Hd(e),options:[e,t]}),Qd=(e,t)=>({...Kd(e),options:[e,t]}),Jd=(e,t)=>({...Wd(e),options:[e,t]}),ef=(e,t)=>({...Gd(e),options:[e,t]}),tf=(e,t)=>({...Ud(e),options:[e,t]}),nf=(e,t)=>({...Xd(e),options:[e,t]});var of="Arrow",vs=a.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(_.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});vs.displayName=of;var rf=vs;function un(e){const[t,n]=a.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,c=u.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Eo="Popper",[hs,ye]=z(Eo),[sf,ms]=hs(Eo),gs=e=>{const{__scopePopper:t,children:n}=e,[o,r]=a.useState(null);return f.jsx(sf,{scope:t,anchor:o,onAnchorChange:r,children:n})};gs.displayName=Eo;var xs="PopperAnchor",ws=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=ms(xs,n),i=a.useRef(null),c=N(t,i),l=a.useRef(null);return a.useEffect(()=>{const u=l.current;l.current=o?.current||i.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:f.jsx(_.div,{...r,ref:c})});ws.displayName=xs;var Po="PopperContent",[af,cf]=hs(Po),Cs=a.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:g,...h}=e,x=ms(Po,n),[C,w]=a.useState(null),b=N(t,M=>w(M)),[y,R]=a.useState(null),P=un(y),E=P?.width??0,T=P?.height??0,I=o+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},k=Array.isArray(u)?u:[u],F=k.length>0,$={padding:O,boundary:k.filter(uf),altBoundary:F},{refs:L,floatingStyles:H,placement:j,isPositioned:V,middlewareData:D}=Yd({strategy:"fixed",placement:I,whileElementsMounted:(...M)=>Vd(...M,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Zd({mainAxis:r+T,alignmentAxis:i}),l&&qd({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Qd():void 0,...$}),l&&Jd({...$}),ef({...$,apply:({elements:M,rects:W,availableWidth:te,availableHeight:G})=>{const{width:U,height:X}=W.reference,ce=M.floating.style;ce.setProperty("--radix-popper-available-width",`${te}px`),ce.setProperty("--radix-popper-available-height",`${G}px`),ce.setProperty("--radix-popper-anchor-width",`${U}px`),ce.setProperty("--radix-popper-anchor-height",`${X}px`)}}),y&&nf({element:y,padding:c}),df({arrowWidth:E,arrowHeight:T}),v&&tf({strategy:"referenceHidden",...$})]}),[A,K]=Ss(j),ee=Q(g);q(()=>{V&&ee?.()},[V,ee]);const de=D.arrow?.x,Ee=D.arrow?.y,ie=D.arrow?.centerOffset!==0,[Pe,re]=a.useState();return q(()=>{C&&re(window.getComputedStyle(C).zIndex)},[C]),f.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:V?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(af,{scope:n,placedSide:A,onArrowChange:R,arrowX:de,arrowY:Ee,shouldHideArrow:ie,children:f.jsx(_.div,{"data-side":A,"data-align":K,...h,ref:b,style:{...h.style,animation:V?void 0:"none"}})})})});Cs.displayName=Po;var bs="PopperArrow",lf={top:"bottom",right:"left",bottom:"top",left:"right"},ys=a.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=cf(bs,o),i=lf[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(rf,{...r,ref:n,style:{...r.style,display:"block"}})})});ys.displayName=bs;function uf(e){return e!==null}var df=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=Ss(n),p={start:"0%",center:"50%",end:"100%"}[d],v=(r.arrow?.x??0)+c/2,m=(r.arrow?.y??0)+l/2;let g="",h="";return u==="bottom"?(g=i?p:`${v}px`,h=`${-l}px`):u==="top"?(g=i?p:`${v}px`,h=`${o.floating.height+l}px`):u==="right"?(g=`${-l}px`,h=i?p:`${m}px`):u==="left"&&(g=`${o.floating.width+l}px`,h=i?p:`${m}px`),{data:{x:g,y:h}}}});function Ss(e){const[t,n="center"]=e.split("-");return[t,n]}var wt=gs,it=ws,Ct=Cs,bt=ys,ff=Symbol("radix.slottable");function pf(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ff,t}var Rs=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),vf="VisuallyHidden",Es=a.forwardRef((e,t)=>f.jsx(_.span,{...e,ref:t,style:{...Rs,...e.style}}));Es.displayName=vf;var hf=Es,[dn,Lm]=z("Tooltip",[ye]),fn=ye(),Ps="TooltipProvider",mf=700,Qn="tooltip.open",[gf,Ao]=dn(Ps),As=e=>{const{__scopeTooltip:t,delayDuration:n=mf,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,i=a.useRef(!0),c=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),f.jsx(gf,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};As.displayName=Ps;var pt="Tooltip",[xf,yt]=dn(pt),_s=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,l=Ao(pt,e.__scopeTooltip),u=fn(t),[d,p]=a.useState(null),v=J(),m=a.useRef(0),g=i??l.disableHoverableContent,h=c??l.delayDuration,x=a.useRef(!1),[C,w]=Z({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qn))):l.onClose(),s?.(E)},caller:pt}),b=a.useMemo(()=>C?x.current?"delayed-open":"instant-open":"closed",[C]),y=a.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,w(!0)},[w]),R=a.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),P=a.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,w(!0),m.current=0},h)},[h,w]);return a.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),f.jsx(wt,{...u,children:f.jsx(xf,{scope:t,contentId:v,open:C,stateAttribute:b,trigger:d,onTriggerChange:p,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?P():y()},[l.isOpenDelayedRef,P,y]),onTriggerLeave:a.useCallback(()=>{g?R():(window.clearTimeout(m.current),m.current=0)},[R,g]),onOpen:y,onClose:R,disableHoverableContent:g,children:n})})};_s.displayName=pt;var Jn="TooltipTrigger",Ts=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=yt(Jn,n),s=Ao(Jn,n),i=fn(n),c=a.useRef(null),l=N(t,c,r.onTriggerChange),u=a.useRef(!1),d=a.useRef(!1),p=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(it,{asChild:!0,...i,children:f.jsx(_.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:S(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:S(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:S(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:S(e.onBlur,r.onClose),onClick:S(e.onClick,r.onClose)})})});Ts.displayName=Jn;var _o="TooltipPortal",[wf,Cf]=dn(_o,{forceMount:void 0}),Ms=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=yt(_o,t);return f.jsx(wf,{scope:t,forceMount:n,children:f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:o})})})};Ms.displayName=_o;var tt="TooltipContent",Is=a.forwardRef((e,t)=>{const n=Cf(tt,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,i=yt(tt,e.__scopeTooltip);return f.jsx(Y,{present:o||i.open,children:i.disableHoverableContent?f.jsx(Ns,{side:r,...s,ref:t}):f.jsx(bf,{side:r,...s,ref:t})})}),bf=a.forwardRef((e,t)=>{const n=yt(tt,e.__scopeTooltip),o=Ao(tt,e.__scopeTooltip),r=a.useRef(null),s=N(t,r),[i,c]=a.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:p}=o,v=a.useCallback(()=>{c(null),p(!1)},[p]),m=a.useCallback((g,h)=>{const x=g.currentTarget,C={x:g.clientX,y:g.clientY},w=Ef(C,x.getBoundingClientRect()),b=Pf(C,w),y=Af(h.getBoundingClientRect()),R=Tf([...b,...y]);c(R),p(!0)},[p]);return a.useEffect(()=>()=>v(),[v]),a.useEffect(()=>{if(l&&d){const g=x=>m(x,d),h=x=>m(x,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[l,d,m,v]),a.useEffect(()=>{if(i){const g=h=>{const x=h.target,C={x:h.clientX,y:h.clientY},w=l?.contains(x)||d?.contains(x),b=!_f(C,i);w?v():b&&(v(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,i,u,v]),f.jsx(Ns,{...e,ref:s})}),[yf,Sf]=dn(pt,{isInside:!1}),Rf=pf("TooltipContent"),Ns=a.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,l=yt(tt,n),u=fn(n),{onClose:d}=l;return a.useEffect(()=>(document.addEventListener(Qn,d),()=>document.removeEventListener(Qn,d)),[d]),a.useEffect(()=>{if(l.trigger){const p=v=>{v.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:f.jsxs(Ct,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(Rf,{children:o}),f.jsx(yf,{scope:n,isInside:!0,children:f.jsx(hf,{id:l.contentId,role:"tooltip",children:r||o})})]})})});Is.displayName=tt;var Os="TooltipArrow",Ds=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=fn(n);return Sf(Os,n).isInside?null:f.jsx(bt,{...r,...o,ref:t})});Ds.displayName=Os;function Ef(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Pf(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Af(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function _f(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],l=t[i],u=c.x,d=c.y,p=l.x,v=l.y;d>o!=v>o&&n<(p-u)*(o-d)/(v-d)+u&&(r=!r)}return r}function Tf(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Mf(t)}function Mf(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $m=As,Fm=_s,Vm=Ts,Bm=Ms,Hm=Is,Wm=Ds;function Sr(e){const t=If(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Of);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function If(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=jf(r),c=Df(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nf=Symbol("radix.slottable");function Of(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nf}function Df(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function jf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function St(e){const t=e+"CollectionProvider",[n,o]=z(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:C}=h,w=B.useRef(null),b=B.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:b,collectionRef:w,children:C})};i.displayName=t;const c=e+"CollectionSlot",l=Sr(c),u=B.forwardRef((h,x)=>{const{scope:C,children:w}=h,b=s(c,C),y=N(x,b.collectionRef);return f.jsx(l,{ref:y,children:w})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",v=Sr(d),m=B.forwardRef((h,x)=>{const{scope:C,children:w,...b}=h,y=B.useRef(null),R=N(x,y),P=s(d,C);return B.useEffect(()=>(P.itemMap.set(y,{ref:y,...b}),()=>{P.itemMap.delete(y)})),f.jsx(v,{[p]:"",ref:R,children:w})});m.displayName=d;function g(h){const x=s(e+"CollectionConsumer",h);return B.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((P,E)=>b.indexOf(P.ref.current)-b.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},g,o]}var pn="Collapsible",[kf,js]=z(pn),[Lf,To]=kf(pn),ks=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:i,...c}=e,[l,u]=Z({prop:o,defaultProp:r??!1,onChange:i,caller:pn});return f.jsx(Lf,{scope:n,disabled:s,contentId:J(),open:l,onOpenToggle:a.useCallback(()=>u(d=>!d),[u]),children:f.jsx(_.div,{"data-state":Io(l),"data-disabled":s?"":void 0,...c,ref:t})})});ks.displayName=pn;var Ls="CollapsibleTrigger",$s=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=To(Ls,n);return f.jsx(_.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":Io(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:S(e.onClick,r.onOpenToggle)})});$s.displayName=Ls;var Mo="CollapsibleContent",Fs=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=To(Mo,e.__scopeCollapsible);return f.jsx(Y,{present:n||r.open,children:({present:s})=>f.jsx($f,{...o,ref:t,present:s})})});Fs.displayName=Mo;var $f=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,i=To(Mo,n),[c,l]=a.useState(o),u=a.useRef(null),d=N(t,u),p=a.useRef(0),v=p.current,m=a.useRef(0),g=m.current,h=i.open||c,x=a.useRef(h),C=a.useRef(void 0);return a.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),q(()=>{const w=u.current;if(w){C.current=C.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const b=w.getBoundingClientRect();p.current=b.height,m.current=b.width,x.current||(w.style.transitionDuration=C.current.transitionDuration,w.style.animationName=C.current.animationName),l(o)}},[i.open,o]),f.jsx(_.div,{"data-state":Io(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:h&&r})});function Io(e){return e?"open":"closed"}var Ff=ks,Vf=$s,Bf=Fs,Hf=a.createContext(void 0);function Te(e){const t=a.useContext(Hf);return e||t||"ltr"}var me="Accordion",Wf=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[No,Gf,Uf]=St(me),[vn,Gm]=z(me,[Uf,js]),Oo=js(),Vs=B.forwardRef((e,t)=>{const{type:n,...o}=e,r=o,s=o;return f.jsx(No.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(Xf,{...s,ref:t}):f.jsx(Yf,{...r,ref:t})})});Vs.displayName=me;var[Bs,Kf]=vn(me),[Hs,zf]=vn(me,{collapsible:!1}),Yf=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},collapsible:s=!1,...i}=e,[c,l]=Z({prop:n,defaultProp:o??"",onChange:r,caller:me});return f.jsx(Bs,{scope:e.__scopeAccordion,value:B.useMemo(()=>c?[c]:[],[c]),onItemOpen:l,onItemClose:B.useCallback(()=>s&&l(""),[s,l]),children:f.jsx(Hs,{scope:e.__scopeAccordion,collapsible:s,children:f.jsx(Ws,{...i,ref:t})})})}),Xf=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,c]=Z({prop:n,defaultProp:o??[],onChange:r,caller:me}),l=B.useCallback(d=>c((p=[])=>[...p,d]),[c]),u=B.useCallback(d=>c((p=[])=>p.filter(v=>v!==d)),[c]);return f.jsx(Bs,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:f.jsx(Hs,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(Ws,{...s,ref:t})})})}),[Zf,hn]=vn(me),Ws=B.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:o,dir:r,orientation:s="vertical",...i}=e,c=B.useRef(null),l=N(c,t),u=Gf(n),p=Te(r)==="ltr",v=S(e.onKeyDown,m=>{if(!Wf.includes(m.key))return;const g=m.target,h=u().filter(T=>!T.ref.current?.disabled),x=h.findIndex(T=>T.ref.current===g),C=h.length;if(x===-1)return;m.preventDefault();let w=x;const b=0,y=C-1,R=()=>{w=x+1,w>y&&(w=b)},P=()=>{w=x-1,w<b&&(w=y)};switch(m.key){case"Home":w=b;break;case"End":w=y;break;case"ArrowRight":s==="horizontal"&&(p?R():P());break;case"ArrowDown":s==="vertical"&&R();break;case"ArrowLeft":s==="horizontal"&&(p?P():R());break;case"ArrowUp":s==="vertical"&&P();break}const E=w%C;h[E].ref.current?.focus()});return f.jsx(Zf,{scope:n,disabled:o,direction:r,orientation:s,children:f.jsx(No.Slot,{scope:n,children:f.jsx(_.div,{...i,"data-orientation":s,ref:l,onKeyDown:o?void 0:v})})})}),Kt="AccordionItem",[qf,Do]=vn(Kt),Gs=B.forwardRef((e,t)=>{const{__scopeAccordion:n,value:o,...r}=e,s=hn(Kt,n),i=Kf(Kt,n),c=Oo(n),l=J(),u=o&&i.value.includes(o)||!1,d=s.disabled||e.disabled;return f.jsx(qf,{scope:n,open:u,disabled:d,triggerId:l,children:f.jsx(Ff,{"data-orientation":s.orientation,"data-state":Zs(u),...c,...r,ref:t,disabled:d,open:u,onOpenChange:p=>{p?i.onItemOpen(o):i.onItemClose(o)}})})});Gs.displayName=Kt;var Us="AccordionHeader",Ks=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=hn(me,n),s=Do(Us,n);return f.jsx(_.h3,{"data-orientation":r.orientation,"data-state":Zs(s.open),"data-disabled":s.disabled?"":void 0,...o,ref:t})});Ks.displayName=Us;var eo="AccordionTrigger",zs=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=hn(me,n),s=Do(eo,n),i=zf(eo,n),c=Oo(n);return f.jsx(No.ItemSlot,{scope:n,children:f.jsx(Vf,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...c,...o,ref:t})})});zs.displayName=eo;var Ys="AccordionContent",Xs=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=hn(me,n),s=Do(Ys,n),i=Oo(n);return f.jsx(Bf,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Xs.displayName=Ys;function Zs(e){return e?"open":"closed"}var Um=Vs,Km=Gs,zm=Ks,Ym=zs,Xm=Xs;function mn(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gn="Checkbox",[Qf,Zm]=z(gn),[Jf,jo]=Qf(gn);function ep(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:i,name:c,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:p}=e,[v,m]=Z({prop:n,defaultProp:r??!1,onChange:l,caller:gn}),[g,h]=a.useState(null),[x,C]=a.useState(null),w=a.useRef(!1),b=g?!!i||!!g.closest("form"):!0,y={checked:v,disabled:s,setChecked:m,control:g,setControl:h,name:c,form:i,value:d,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Ne(r)?!1:r,isFormControl:b,bubbleInput:x,setBubbleInput:C};return f.jsx(Jf,{scope:t,...y,children:op(p)?p(y):o})}var qs="CheckboxTrigger",Qs=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:i,disabled:c,checked:l,required:u,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:g}=jo(qs,e),h=N(r,d),x=a.useRef(l);return a.useEffect(()=>{const C=s?.form;if(C){const w=()=>p(x.current);return C.addEventListener("reset",w),()=>C.removeEventListener("reset",w)}},[s,p]),f.jsx(_.button,{type:"button",role:"checkbox","aria-checked":Ne(l)?"mixed":l,"aria-required":u,"data-state":na(l),"data-disabled":c?"":void 0,disabled:c,value:i,...o,ref:h,onKeyDown:S(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:S(n,C=>{p(w=>Ne(w)?!0:!w),g&&m&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})})});Qs.displayName=qs;var tp=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:i,disabled:c,value:l,onCheckedChange:u,form:d,...p}=e;return f.jsx(ep,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:c,required:i,onCheckedChange:u,name:o,form:d,value:l,internal_do_not_use_render:({isFormControl:v})=>f.jsxs(f.Fragment,{children:[f.jsx(Qs,{...p,ref:t,__scopeCheckbox:n}),v&&f.jsx(ta,{__scopeCheckbox:n})]})})});tp.displayName=gn;var Js="CheckboxIndicator",np=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=jo(Js,n);return f.jsx(Y,{present:o||Ne(s.checked)||s.checked===!0,children:f.jsx(_.span,{"data-state":na(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});np.displayName=Js;var ea="CheckboxBubbleInput",ta=a.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:i,required:c,disabled:l,name:u,value:d,form:p,bubbleInput:v,setBubbleInput:m}=jo(ea,e),g=N(n,m),h=mn(s),x=un(o);a.useEffect(()=>{const w=v;if(!w)return;const b=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(b,"checked").set,P=!r.current;if(h!==s&&R){const E=new Event("click",{bubbles:P});w.indeterminate=Ne(s),R.call(w,Ne(s)?!1:s),w.dispatchEvent(E)}},[v,h,s,r]);const C=a.useRef(Ne(s)?!1:s);return f.jsx(_.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??C.current,required:c,disabled:l,name:u,value:d,form:p,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ta.displayName=ea;function op(e){return typeof e=="function"}function Ne(e){return e==="indeterminate"}function na(e){return Ne(e)?"indeterminate":e?"checked":"unchecked"}var Gn,xn="HoverCard",[oa,qm]=z(xn,[ye]),wn=ye(),[rp,ko]=oa(xn),ra=e=>{const{__scopeHoverCard:t,children:n,open:o,defaultOpen:r,onOpenChange:s,openDelay:i=700,closeDelay:c=300}=e,l=wn(t),u=a.useRef(0),d=a.useRef(0),p=a.useRef(!1),v=a.useRef(!1),[m,g]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:xn}),h=a.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),x=a.useCallback(()=>{clearTimeout(u.current),!p.current&&!v.current&&(d.current=window.setTimeout(()=>g(!1),c))},[c,g]),C=a.useCallback(()=>g(!1),[g]);return a.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),f.jsx(rp,{scope:t,open:m,onOpenChange:g,onOpen:h,onClose:x,onDismiss:C,hasSelectionRef:p,isPointerDownOnContentRef:v,children:f.jsx(wt,{...l,children:n})})};ra.displayName=xn;var sa="HoverCardTrigger",aa=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...o}=e,r=ko(sa,n),s=wn(n);return f.jsx(it,{asChild:!0,...s,children:f.jsx(_.a,{"data-state":r.open?"open":"closed",...o,ref:t,onPointerEnter:S(e.onPointerEnter,Yt(r.onOpen)),onPointerLeave:S(e.onPointerLeave,Yt(r.onClose)),onFocus:S(e.onFocus,r.onOpen),onBlur:S(e.onBlur,r.onClose),onTouchStart:S(e.onTouchStart,i=>i.preventDefault())})})});aa.displayName=sa;var sp="HoverCardPortal",[Qm,ap]=oa(sp,{forceMount:void 0}),zt="HoverCardContent",ia=a.forwardRef((e,t)=>{const n=ap(zt,e.__scopeHoverCard),{forceMount:o=n.forceMount,...r}=e,s=ko(zt,e.__scopeHoverCard);return f.jsx(Y,{present:o||s.open,children:f.jsx(ip,{"data-state":s.open?"open":"closed",...r,onPointerEnter:S(e.onPointerEnter,Yt(s.onOpen)),onPointerLeave:S(e.onPointerLeave,Yt(s.onClose)),ref:t})})});ia.displayName=zt;var ip=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,...c}=e,l=ko(zt,n),u=wn(n),d=a.useRef(null),p=N(t,d),[v,m]=a.useState(!1);return a.useEffect(()=>{if(v){const g=document.body;return Gn=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Gn,g.style.webkitUserSelect=Gn}}},[v]),a.useEffect(()=>{if(d.current){const g=()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),a.useEffect(()=>{d.current&&up(d.current).forEach(h=>h.setAttribute("tabindex","-1"))}),f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:S(s,g=>{g.preventDefault()}),onDismiss:l.onDismiss,children:f.jsx(Ct,{...u,...c,onPointerDown:S(c.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:v?"text":void 0,WebkitUserSelect:v?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),cp="HoverCardArrow",lp=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...o}=e,r=wn(n);return f.jsx(bt,{...r,...o,ref:t})});lp.displayName=cp;function Yt(e){return t=>t.pointerType==="touch"?void 0:e()}function up(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var Jm=ra,eg=aa,tg=ia;function ca(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,s;for(s=0;s<o.length;s++)r=o[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var dp=["color"],ng=a.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=ca(e,dp);return a.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),a.createElement("path",{d:"M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),fp=["color"],og=a.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=ca(e,fp);return a.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),a.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Un="rovingFocusGroup.onEntryFocus",pp={bubbles:!1,cancelable:!0},Rt="RovingFocusGroup",[to,la,vp]=St(Rt),[hp,Se]=z(Rt,[vp]),[mp,gp]=hp(Rt),ua=a.forwardRef((e,t)=>f.jsx(to.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(to.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(xp,{...e,ref:t})})}));ua.displayName=Rt;var xp=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...p}=e,v=a.useRef(null),m=N(t,v),g=Te(s),[h,x]=Z({prop:i,defaultProp:c??null,onChange:l,caller:Rt}),[C,w]=a.useState(!1),b=Q(u),y=la(n),R=a.useRef(!1),[P,E]=a.useState(0);return a.useEffect(()=>{const T=v.current;if(T)return T.addEventListener(Un,b),()=>T.removeEventListener(Un,b)},[b]),f.jsx(mp,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:h,onItemFocus:a.useCallback(T=>x(T),[x]),onItemShiftTab:a.useCallback(()=>w(!0),[]),onFocusableItemAdd:a.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:a.useCallback(()=>E(T=>T-1),[]),children:f.jsx(_.div,{tabIndex:C||P===0?-1:0,"data-orientation":o,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{R.current=!0}),onFocus:S(e.onFocus,T=>{const I=!R.current;if(T.target===T.currentTarget&&I&&!C){const O=new CustomEvent(Un,pp);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const k=y().filter(j=>j.focusable),F=k.find(j=>j.active),$=k.find(j=>j.id===h),H=[F,$,...k].filter(Boolean).map(j=>j.ref.current);pa(H,d)}}R.current=!1}),onBlur:S(e.onBlur,()=>w(!1))})})}),da="RovingFocusGroupItem",fa=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:i,...c}=e,l=J(),u=s||l,d=gp(da,n),p=d.currentTabStopId===u,v=la(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:h}=d;return a.useEffect(()=>{if(o)return m(),()=>g()},[o,m,g]),f.jsx(to.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:f.jsx(_.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,x=>{o?d.onItemFocus(u):x.preventDefault()}),onFocus:S(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:S(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const C=bp(x,d.orientation,d.dir);if(C!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=v().filter(y=>y.focusable).map(y=>y.ref.current);if(C==="last")b.reverse();else if(C==="prev"||C==="next"){C==="prev"&&b.reverse();const y=b.indexOf(x.currentTarget);b=d.loop?yp(b,y+1):b.slice(y+1)}setTimeout(()=>pa(b))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:h!=null}):i})})});fa.displayName=da;var wp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bp(e,t,n){const o=Cp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return wp[o]}function pa(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function yp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Et=ua,Pt=fa,Cn="Tabs",[Sp,rg]=z(Cn,[Se]),va=Se(),[Rp,Lo]=Sp(Cn),ha=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:i="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=Te(c),[p,v]=Z({prop:o,onChange:r,defaultProp:s??"",caller:Cn});return f.jsx(Rp,{scope:n,baseId:J(),value:p,onValueChange:v,orientation:i,dir:d,activationMode:l,children:f.jsx(_.div,{dir:d,"data-orientation":i,...u,ref:t})})});ha.displayName=Cn;var ma="TabsList",ga=a.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=Lo(ma,n),i=va(n);return f.jsx(Et,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:o,children:f.jsx(_.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});ga.displayName=ma;var xa="TabsTrigger",wa=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,i=Lo(xa,n),c=va(n),l=ya(i.baseId,o),u=Sa(i.baseId,o),d=o===i.value;return f.jsx(Pt,{asChild:!0,...c,focusable:!r,active:d,children:f.jsx(_.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:S(e.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?i.onValueChange(o):p.preventDefault()}),onKeyDown:S(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(o)}),onFocus:S(e.onFocus,()=>{const p=i.activationMode!=="manual";!d&&!r&&p&&i.onValueChange(o)})})})});wa.displayName=xa;var Ca="TabsContent",ba=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...i}=e,c=Lo(Ca,n),l=ya(c.baseId,o),u=Sa(c.baseId,o),d=o===c.value,p=a.useRef(d);return a.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),f.jsx(Y,{present:r||d,children:({present:v})=>f.jsx(_.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!v,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:v&&s})})});ba.displayName=Ca;function ya(e,t){return`${e}-trigger-${t}`}function Sa(e,t){return`${e}-content-${t}`}var sg=ha,ag=ga,ig=wa,cg=ba;function Ep(e){const t=Pp(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(_p);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Pp(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Mp(r),c=Tp(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ap=Symbol("radix.slottable");function _p(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ap}function Tp(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Mp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bn="Popover",[Ra,lg]=z(bn,[ye]),At=ye(),[Ip,ke]=Ra(bn),Ea=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!1}=e,c=At(t),l=a.useRef(null),[u,d]=a.useState(!1),[p,v]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:bn});return f.jsx(wt,{...c,children:f.jsx(Ip,{scope:t,contentId:J(),triggerRef:l,open:p,onOpenChange:v,onOpenToggle:a.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>d(!0),[]),onCustomAnchorRemove:a.useCallback(()=>d(!1),[]),modal:i,children:n})})};Ea.displayName=bn;var Pa="PopoverAnchor",Np=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ke(Pa,n),s=At(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return a.useEffect(()=>(i(),()=>c()),[i,c]),f.jsx(it,{...s,...o,ref:t})});Np.displayName=Pa;var Aa="PopoverTrigger",_a=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ke(Aa,n),s=At(n),i=N(t,r.triggerRef),c=f.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Oa(r.open),...o,ref:i,onClick:S(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:f.jsx(it,{asChild:!0,...s,children:c})});_a.displayName=Aa;var $o="PopoverPortal",[Op,Dp]=Ra($o,{forceMount:void 0}),Ta=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=ke($o,t);return f.jsx(Op,{scope:t,forceMount:n,children:f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:o})})})};Ta.displayName=$o;var nt="PopoverContent",Ma=a.forwardRef((e,t)=>{const n=Dp(nt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=ke(nt,e.__scopePopover);return f.jsx(Y,{present:o||s.open,children:s.modal?f.jsx(kp,{...r,ref:t}):f.jsx(Lp,{...r,ref:t})})});Ma.displayName=nt;var jp=Ep("PopoverContent.RemoveScroll"),kp=a.forwardRef((e,t)=>{const n=ke(nt,e.__scopePopover),o=a.useRef(null),r=N(t,o),s=a.useRef(!1);return a.useEffect(()=>{const i=o.current;if(i)return rn(i)},[]),f.jsx(gt,{as:jp,allowPinchZoom:!0,children:f.jsx(Ia,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Lp=a.forwardRef((e,t)=>{const n=ke(nt,e.__scopePopover),o=a.useRef(!1),r=a.useRef(!1);return f.jsx(Ia,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Ia=a.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...p}=e,v=ke(nt,n),m=At(n);return nn(),f.jsx(mt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:f.jsx(Ct,{"data-state":Oa(v.open),role:"dialog",id:v.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Na="PopoverClose",$p=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ke(Na,n);return f.jsx(_.button,{type:"button",...o,ref:t,onClick:S(e.onClick,()=>r.onOpenChange(!1))})});$p.displayName=Na;var Fp="PopoverArrow",Vp=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=At(n);return f.jsx(bt,{...r,...o,ref:t})});Vp.displayName=Fp;function Oa(e){return e?"open":"closed"}var ug=Ea,dg=_a,fg=Ta,pg=Ma;function no(e,[t,n]){return Math.min(n,Math.max(t,e))}function Bp(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Fo="ScrollArea",[Da,vg]=z(Fo),[Hp,ue]=Da(Fo),ja=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...i}=e,[c,l]=a.useState(null),[u,d]=a.useState(null),[p,v]=a.useState(null),[m,g]=a.useState(null),[h,x]=a.useState(null),[C,w]=a.useState(0),[b,y]=a.useState(0),[R,P]=a.useState(!1),[E,T]=a.useState(!1),I=N(t,k=>l(k)),O=Te(r);return f.jsx(Hp,{scope:n,type:o,dir:O,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:p,onContentChange:v,scrollbarX:m,onScrollbarXChange:g,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:E,onScrollbarYEnabledChange:T,onCornerWidthChange:w,onCornerHeightChange:y,children:f.jsx(_.div,{dir:O,...i,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});ja.displayName=Fo;var ka="ScrollAreaViewport",La=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,i=ue(ka,n),c=a.useRef(null),l=N(t,c,i.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(_.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:f.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});La.displayName=ka;var Re="ScrollAreaScrollbar",Wp=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ue(Re,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=r,c=e.orientation==="horizontal";return a.useEffect(()=>(c?s(!0):i(!0),()=>{c?s(!1):i(!1)}),[c,s,i]),r.type==="hover"?f.jsx(Gp,{...o,ref:t,forceMount:n}):r.type==="scroll"?f.jsx(Up,{...o,ref:t,forceMount:n}):r.type==="auto"?f.jsx($a,{...o,ref:t,forceMount:n}):r.type==="always"?f.jsx(Vo,{...o,ref:t}):null});Wp.displayName=Re;var Gp=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ue(Re,e.__scopeScrollArea),[s,i]=a.useState(!1);return a.useEffect(()=>{const c=r.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),i(!0)},d=()=>{l=window.setTimeout(()=>i(!1),r.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),f.jsx(Y,{present:n||s,children:f.jsx($a,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Up=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ue(Re,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Sn(()=>l("SCROLL_END"),100),[c,l]=Bp("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,r.scrollHideDelay,l]),a.useEffect(()=>{const u=r.viewport,d=s?"scrollLeft":"scrollTop";if(u){let p=u[d];const v=()=>{const m=u[d];p!==m&&(l("SCROLL"),i()),p=m};return u.addEventListener("scroll",v),()=>u.removeEventListener("scroll",v)}},[r.viewport,s,l,i]),f.jsx(Y,{present:n||c!=="hidden",children:f.jsx(Vo,{"data-state":c==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:S(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:S(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),$a=a.forwardRef((e,t)=>{const n=ue(Re,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,i]=a.useState(!1),c=e.orientation==="horizontal",l=Sn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?u:d)}},10);return ot(n.viewport,l),ot(n.content,l),f.jsx(Y,{present:o||s,children:f.jsx(Vo,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Vo=a.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ue(Re,e.__scopeScrollArea),s=a.useRef(null),i=a.useRef(0),[c,l]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Ha(c.viewport,c.content),d={...o,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:v=>i.current=v};function p(v,m){return Qp(v,i.current,c,m)}return n==="horizontal"?f.jsx(Kp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const v=r.viewport.scrollLeft,m=Rr(v,c,r.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{r.viewport&&(r.viewport.scrollLeft=v)},onDragScroll:v=>{r.viewport&&(r.viewport.scrollLeft=p(v,r.dir))}}):n==="vertical"?f.jsx(zp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const v=r.viewport.scrollTop,m=Rr(v,c);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{r.viewport&&(r.viewport.scrollTop=v)},onDragScroll:v=>{r.viewport&&(r.viewport.scrollTop=p(v))}}):null}),Kp=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ue(Re,e.__scopeScrollArea),[i,c]=a.useState(),l=a.useRef(null),u=N(t,l,s.onScrollbarXChange);return a.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),f.jsx(Va,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":yn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(s.viewport){const v=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),Ga(v,p)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Zt(i.paddingLeft),paddingEnd:Zt(i.paddingRight)}})}})}),zp=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ue(Re,e.__scopeScrollArea),[i,c]=a.useState(),l=a.useRef(null),u=N(t,l,s.onScrollbarYChange);return a.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),f.jsx(Va,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":yn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(s.viewport){const v=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),Ga(v,p)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Zt(i.paddingTop),paddingEnd:Zt(i.paddingBottom)}})}})}),[Yp,Fa]=Da(Re),Va=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:p,...v}=e,m=ue(Re,n),[g,h]=a.useState(null),x=N(t,I=>h(I)),C=a.useRef(null),w=a.useRef(""),b=m.viewport,y=o.content-o.viewport,R=Q(d),P=Q(l),E=Sn(p,10);function T(I){if(C.current){const O=I.clientX-C.current.left,k=I.clientY-C.current.top;u({x:O,y:k})}}return a.useEffect(()=>{const I=O=>{const k=O.target;g?.contains(k)&&R(O,y)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,g,y,R]),a.useEffect(P,[o,P]),ot(g,E),ot(m.content,E),f.jsx(Yp,{scope:n,scrollbar:g,hasThumb:r,onThumbChange:Q(s),onThumbPointerUp:Q(i),onThumbPositionChange:P,onThumbPointerDown:Q(c),children:f.jsx(_.div,{...v,ref:x,style:{position:"absolute",...v.style},onPointerDown:S(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),C.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),T(I))}),onPointerMove:S(e.onPointerMove,T),onPointerUp:S(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),C.current=null})})})}),Xt="ScrollAreaThumb",Xp=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Fa(Xt,e.__scopeScrollArea);return f.jsx(Y,{present:n||r.hasThumb,children:f.jsx(Zp,{ref:t,...o})})}),Zp=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ue(Xt,n),i=Fa(Xt,n),{onThumbPositionChange:c}=i,l=N(t,p=>i.onThumbChange(p)),u=a.useRef(void 0),d=Sn(()=>{u.current&&(u.current(),u.current=void 0)},100);return a.useEffect(()=>{const p=s.viewport;if(p){const v=()=>{if(d(),!u.current){const m=Jp(p,c);u.current=m,c()}};return c(),p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[s.viewport,d,c]),f.jsx(_.div,{"data-state":i.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:S(e.onPointerDownCapture,p=>{const m=p.target.getBoundingClientRect(),g=p.clientX-m.left,h=p.clientY-m.top;i.onThumbPointerDown({x:g,y:h})}),onPointerUp:S(e.onPointerUp,i.onThumbPointerUp)})});Xp.displayName=Xt;var Bo="ScrollAreaCorner",Ba=a.forwardRef((e,t)=>{const n=ue(Bo,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?f.jsx(qp,{...e,ref:t}):null});Ba.displayName=Bo;var qp=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ue(Bo,n),[s,i]=a.useState(0),[c,l]=a.useState(0),u=!!(s&&c);return ot(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),ot(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),i(d)}),u?f.jsx(_.div,{...o,ref:t,style:{width:s,height:c,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Zt(e){return e?parseInt(e,10):0}function Ha(e,t){const n=e/t;return isNaN(n)?0:n}function yn(e){const t=Ha(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Qp(e,t,n,o="ltr"){const r=yn(n),s=r/2,i=t||s,c=r-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,p=o==="ltr"?[0,d]:[d*-1,0];return Wa([l,u],p)(e)}function Rr(e,t,n="ltr"){const o=yn(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,i=t.content-t.viewport,c=s-o,l=n==="ltr"?[0,i]:[i*-1,0],u=no(e,l);return Wa([0,i],[0,c])(u)}function Wa(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Ga(e,t){return e>0&&e<t}var Jp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,c=n.top!==s.top;(i||c)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function Sn(e,t){const n=Q(e),o=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),a.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function ot(e,t){const n=Q(t);q(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var hg=ja,mg=La,gg=Ba;function ev(e){const t=tv(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(ov);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function tv(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=sv(r),c=rv(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nv=Symbol("radix.slottable");function ov(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nv}function rv(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function sv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var av=[" ","Enter","ArrowUp","ArrowDown"],iv=[" ","Enter"],We="Select",[Rn,En,cv]=St(We),[ct,xg]=z(We,[cv,ye]),Pn=ye(),[lv,Le]=ct(We),[uv,dv]=ct(We),Ua=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:i,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:p,disabled:v,required:m,form:g}=e,h=Pn(t),[x,C]=a.useState(null),[w,b]=a.useState(null),[y,R]=a.useState(!1),P=Te(u),[E,T]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:We}),[I,O]=Z({prop:i,defaultProp:c,onChange:l,caller:We}),k=a.useRef(null),F=x?g||!!x.closest("form"):!0,[$,L]=a.useState(new Set),H=Array.from($).map(j=>j.props.value).join(";");return f.jsx(wt,{...h,children:f.jsxs(lv,{required:m,scope:t,trigger:x,onTriggerChange:C,valueNode:w,onValueNodeChange:b,valueNodeHasChildren:y,onValueNodeHasChildrenChange:R,contentId:J(),value:I,onValueChange:O,open:E,onOpenChange:T,dir:P,triggerPointerDownPosRef:k,disabled:v,children:[f.jsx(Rn.Provider,{scope:t,children:f.jsx(uv,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(j=>{L(V=>new Set(V).add(j))},[]),onNativeOptionRemove:a.useCallback(j=>{L(V=>{const D=new Set(V);return D.delete(j),D})},[]),children:n})}),F?f.jsxs(hi,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:p,value:I,onChange:j=>O(j.target.value),disabled:v,form:g,children:[I===void 0?f.jsx("option",{value:""}):null,Array.from($)]},H):null]})})};Ua.displayName=We;var Ka="SelectTrigger",za=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=Pn(n),i=Le(Ka,n),c=i.disabled||o,l=N(t,i.onTriggerChange),u=En(n),d=a.useRef("touch"),[p,v,m]=gi(h=>{const x=u().filter(b=>!b.disabled),C=x.find(b=>b.value===i.value),w=xi(x,h,C);w!==void 0&&i.onValueChange(w.value)}),g=h=>{c||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return f.jsx(it,{asChild:!0,...s,children:f.jsx(_.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":mi(i.value)?"":void 0,...r,ref:l,onClick:S(r.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&g(h)}),onPointerDown:S(r.onPointerDown,h=>{d.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(g(h),h.preventDefault())}),onKeyDown:S(r.onKeyDown,h=>{const x=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&v(h.key),!(x&&h.key===" ")&&av.includes(h.key)&&(g(),h.preventDefault())})})})});za.displayName=Ka;var Ya="SelectValue",Xa=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:i="",...c}=e,l=Le(Ya,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,p=N(t,l.onValueNodeChange);return q(()=>{u(d)},[u,d]),f.jsx(_.span,{...c,ref:p,style:{pointerEvents:"none"},children:mi(l.value)?f.jsx(f.Fragment,{children:i}):s})});Xa.displayName=Ya;var fv="SelectIcon",Za=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return f.jsx(_.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Za.displayName=fv;var pv="SelectPortal",qa=e=>f.jsx(rt,{asChild:!0,...e});qa.displayName=pv;var Ge="SelectContent",Qa=a.forwardRef((e,t)=>{const n=Le(Ge,e.__scopeSelect),[o,r]=a.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?tn.createPortal(f.jsx(Ja,{scope:e.__scopeSelect,children:f.jsx(Rn.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(ei,{...e,ref:t})});Qa.displayName=Ge;var fe=10,[Ja,$e]=ct(Ge),vv="SelectContentImpl",hv=ev("SelectContent.RemoveScroll"),ei=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:g,hideWhenDetached:h,avoidCollisions:x,...C}=e,w=Le(Ge,n),[b,y]=a.useState(null),[R,P]=a.useState(null),E=N(t,M=>y(M)),[T,I]=a.useState(null),[O,k]=a.useState(null),F=En(n),[$,L]=a.useState(!1),H=a.useRef(!1);a.useEffect(()=>{if(b)return rn(b)},[b]),nn();const j=a.useCallback(M=>{const[W,...te]=F().map(X=>X.ref.current),[G]=te.slice(-1),U=document.activeElement;for(const X of M)if(X===U||(X?.scrollIntoView({block:"nearest"}),X===W&&R&&(R.scrollTop=0),X===G&&R&&(R.scrollTop=R.scrollHeight),X?.focus(),document.activeElement!==U))return},[F,R]),V=a.useCallback(()=>j([T,b]),[j,T,b]);a.useEffect(()=>{$&&V()},[$,V]);const{onOpenChange:D,triggerPointerDownPosRef:A}=w;a.useEffect(()=>{if(b){let M={x:0,y:0};const W=G=>{M={x:Math.abs(Math.round(G.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(G.pageY)-(A.current?.y??0))}},te=G=>{M.x<=10&&M.y<=10?G.preventDefault():b.contains(G.target)||D(!1),document.removeEventListener("pointermove",W),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",te,{capture:!0})}}},[b,D,A]),a.useEffect(()=>{const M=()=>D(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[D]);const[K,ee]=gi(M=>{const W=F().filter(U=>!U.disabled),te=W.find(U=>U.ref.current===document.activeElement),G=xi(W,M,te);G&&setTimeout(()=>G.ref.current.focus())}),de=a.useCallback((M,W,te)=>{const G=!H.current&&!te;(w.value!==void 0&&w.value===W||G)&&(I(M),G&&(H.current=!0))},[w.value]),Ee=a.useCallback(()=>b?.focus(),[b]),ie=a.useCallback((M,W,te)=>{const G=!H.current&&!te;(w.value!==void 0&&w.value===W||G)&&k(M)},[w.value]),Pe=o==="popper"?oo:ti,re=Pe===oo?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:g,hideWhenDetached:h,avoidCollisions:x}:{};return f.jsx(Ja,{scope:n,content:b,viewport:R,onViewportChange:P,itemRefCallback:de,selectedItem:T,onItemLeave:Ee,itemTextRefCallback:ie,focusSelectedItem:V,selectedItemText:O,position:o,isPositioned:$,searchRef:K,children:f.jsx(gt,{as:hv,allowPinchZoom:!0,children:f.jsx(mt,{asChild:!0,trapped:w.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:S(r,M=>{w.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:f.jsx(Pe,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:M=>M.preventDefault(),...C,...re,onPlaced:()=>L(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:S(C.onKeyDown,M=>{const W=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!W&&M.key.length===1&&ee(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let G=F().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(M.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const U=M.target,X=G.indexOf(U);G=G.slice(X+1)}setTimeout(()=>j(G)),M.preventDefault()}})})})})})})});ei.displayName=vv;var mv="SelectItemAlignedPosition",ti=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Le(Ge,n),i=$e(Ge,n),[c,l]=a.useState(null),[u,d]=a.useState(null),p=N(t,E=>d(E)),v=En(n),m=a.useRef(!1),g=a.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:C,focusSelectedItem:w}=i,b=a.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&h&&x&&C){const E=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),O=C.getBoundingClientRect();if(s.dir!=="rtl"){const U=O.left-T.left,X=I.left-U,ce=E.left-X,Ve=E.width+ce,Nn=Math.max(Ve,T.width),On=window.innerWidth-fe,Dn=no(X,[fe,Math.max(fe,On-Nn)]);c.style.minWidth=Ve+"px",c.style.left=Dn+"px"}else{const U=T.right-O.right,X=window.innerWidth-I.right-U,ce=window.innerWidth-E.right-X,Ve=E.width+ce,Nn=Math.max(Ve,T.width),On=window.innerWidth-fe,Dn=no(X,[fe,Math.max(fe,On-Nn)]);c.style.minWidth=Ve+"px",c.style.right=Dn+"px"}const k=v(),F=window.innerHeight-fe*2,$=h.scrollHeight,L=window.getComputedStyle(u),H=parseInt(L.borderTopWidth,10),j=parseInt(L.paddingTop,10),V=parseInt(L.borderBottomWidth,10),D=parseInt(L.paddingBottom,10),A=H+j+$+D+V,K=Math.min(x.offsetHeight*5,A),ee=window.getComputedStyle(h),de=parseInt(ee.paddingTop,10),Ee=parseInt(ee.paddingBottom,10),ie=E.top+E.height/2-fe,Pe=F-ie,re=x.offsetHeight/2,M=x.offsetTop+re,W=H+j+M,te=A-W;if(W<=ie){const U=k.length>0&&x===k[k.length-1].ref.current;c.style.bottom="0px";const X=u.clientHeight-h.offsetTop-h.offsetHeight,ce=Math.max(Pe,re+(U?Ee:0)+X+V),Ve=W+ce;c.style.height=Ve+"px"}else{const U=k.length>0&&x===k[0].ref.current;c.style.top="0px";const ce=Math.max(ie,H+h.offsetTop+(U?de:0)+re)+te;c.style.height=ce+"px",h.scrollTop=W-ie+h.offsetTop}c.style.margin=`${fe}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=F+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[v,s.trigger,s.valueNode,c,u,h,x,C,s.dir,o]);q(()=>b(),[b]);const[y,R]=a.useState();q(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const P=a.useCallback(E=>{E&&g.current===!0&&(b(),w?.(),g.current=!1)},[b,w]);return f.jsx(xv,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:P,children:f.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:f.jsx(_.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ti.displayName=mv;var gv="SelectPopperPosition",oo=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=fe,...s}=e,i=Pn(n);return f.jsx(Ct,{...i,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oo.displayName=gv;var[xv,Ho]=ct(Ge,{}),ro="SelectViewport",ni=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=$e(ro,n),i=Ho(ro,n),c=N(t,s.onViewportChange),l=a.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),f.jsx(Rn.Slot,{scope:n,children:f.jsx(_.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:S(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=i;if(v?.current&&p){const m=Math.abs(l.current-d.scrollTop);if(m>0){const g=window.innerHeight-fe*2,h=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),C=Math.max(h,x);if(C<g){const w=C+m,b=Math.min(g,w),y=w-b;p.style.height=b+"px",p.style.bottom==="0px"&&(d.scrollTop=y>0?y:0,p.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});ni.displayName=ro;var oi="SelectGroup",[wv,Cv]=ct(oi),ri=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=J();return f.jsx(wv,{scope:n,id:r,children:f.jsx(_.div,{role:"group","aria-labelledby":r,...o,ref:t})})});ri.displayName=oi;var si="SelectLabel",ai=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Cv(si,n);return f.jsx(_.div,{id:r.id,...o,ref:t})});ai.displayName=si;var qt="SelectItem",[bv,ii]=ct(qt),ci=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...i}=e,c=Le(qt,n),l=$e(qt,n),u=c.value===o,[d,p]=a.useState(s??""),[v,m]=a.useState(!1),g=N(t,w=>l.itemRefCallback?.(w,o,r)),h=J(),x=a.useRef("touch"),C=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(bv,{scope:n,value:o,disabled:r,textId:h,isSelected:u,onItemTextChange:a.useCallback(w=>{p(b=>b||(w?.textContent??"").trim())},[]),children:f.jsx(Rn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:f.jsx(_.div,{role:"option","aria-labelledby":h,"data-highlighted":v?"":void 0,"aria-selected":u&&v,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:g,onFocus:S(i.onFocus,()=>m(!0)),onBlur:S(i.onBlur,()=>m(!1)),onClick:S(i.onClick,()=>{x.current!=="mouse"&&C()}),onPointerUp:S(i.onPointerUp,()=>{x.current==="mouse"&&C()}),onPointerDown:S(i.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:S(i.onPointerMove,w=>{x.current=w.pointerType,r?l.onItemLeave?.():x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:S(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:S(i.onKeyDown,w=>{l.searchRef?.current!==""&&w.key===" "||(iv.includes(w.key)&&C(),w.key===" "&&w.preventDefault())})})})})});ci.displayName=qt;var lt="SelectItemText",li=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,i=Le(lt,n),c=$e(lt,n),l=ii(lt,n),u=dv(lt,n),[d,p]=a.useState(null),v=N(t,C=>p(C),l.onItemTextChange,C=>c.itemTextRefCallback?.(C,l.value,l.disabled)),m=d?.textContent,g=a.useMemo(()=>f.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=u;return q(()=>(h(g),()=>x(g)),[h,x,g]),f.jsxs(f.Fragment,{children:[f.jsx(_.span,{id:l.textId,...s,ref:v}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?tn.createPortal(s.children,i.valueNode):null]})});li.displayName=lt;var ui="SelectItemIndicator",di=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return ii(ui,n).isSelected?f.jsx(_.span,{"aria-hidden":!0,...o,ref:t}):null});di.displayName=ui;var so="SelectScrollUpButton",fi=a.forwardRef((e,t)=>{const n=$e(so,e.__scopeSelect),o=Ho(so,e.__scopeSelect),[r,s]=a.useState(!1),i=N(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?f.jsx(vi,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});fi.displayName=so;var ao="SelectScrollDownButton",pi=a.forwardRef((e,t)=>{const n=$e(ao,e.__scopeSelect),o=Ho(ao,e.__scopeSelect),[r,s]=a.useState(!1),i=N(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?f.jsx(vi,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});pi.displayName=ao;var vi=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=$e("SelectScrollButton",n),i=a.useRef(null),c=En(n),l=a.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>l(),[l]),q(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),f.jsx(_.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:S(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:S(r.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:S(r.onPointerLeave,()=>{l()})})}),yv="SelectSeparator",Sv=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return f.jsx(_.div,{"aria-hidden":!0,...o,ref:t})});Sv.displayName=yv;var io="SelectArrow",Rv=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Pn(n),s=Le(io,n),i=$e(io,n);return s.open&&i.position==="popper"?f.jsx(bt,{...r,...o,ref:t}):null});Rv.displayName=io;var Ev="SelectBubbleInput",hi=a.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=a.useRef(null),s=N(o,r),i=mn(t);return a.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const p=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(p)}},[i,t]),f.jsx(_.select,{...n,style:{...Rs,...n.style},ref:s,defaultValue:t})});hi.displayName=Ev;function mi(e){return e===""||e===void 0}function gi(e){const t=Q(e),n=a.useRef(""),o=a.useRef(0),r=a.useCallback(i=>{const c=n.current+i;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=a.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function xi(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Pv(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Pv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var wg=Ua,Cg=za,bg=Xa,yg=Za,Sg=qa,Rg=Qa,Eg=ni,Pg=ri,Ag=ai,_g=ci,Tg=li,Mg=di,Ig=fi,Ng=pi,Av=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_v=Av.reduce((e,t)=>{const n=vo(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Tv="Label",wi=a.forwardRef((e,t)=>f.jsx(_v.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));wi.displayName=Tv;var Og=wi,An="Switch",[Mv,Dg]=z(An),[Iv,Nv]=Mv(An),Ci=a.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:i,disabled:c,value:l="on",onCheckedChange:u,form:d,...p}=e,[v,m]=a.useState(null),g=N(t,b=>m(b)),h=a.useRef(!1),x=v?d||!!v.closest("form"):!0,[C,w]=Z({prop:r,defaultProp:s??!1,onChange:u,caller:An});return f.jsxs(Iv,{scope:n,checked:C,disabled:c,children:[f.jsx(_.button,{type:"button",role:"switch","aria-checked":C,"aria-required":i,"data-state":Ri(C),"data-disabled":c?"":void 0,disabled:c,value:l,...p,ref:g,onClick:S(e.onClick,b=>{w(y=>!y),x&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),x&&f.jsx(Si,{control:v,bubbles:!h.current,name:o,value:l,checked:C,required:i,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});Ci.displayName=An;var bi="SwitchThumb",yi=a.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Nv(bi,n);return f.jsx(_.span,{"data-state":Ri(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});yi.displayName=bi;var Ov="SwitchBubbleInput",Si=a.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const i=a.useRef(null),c=N(i,s),l=mn(n),u=un(t);return a.useEffect(()=>{const d=i.current;if(!d)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const g=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(g)}},[l,n,o]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Si.displayName=Ov;function Ri(e){return e?"checked":"unchecked"}var jg=Ci,kg=yi;function Dv(e){const t=jv(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Lv);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function jv(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Fv(r),c=$v(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kv=Symbol("radix.slottable");function Lv(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kv}function $v(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Fv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var co=["Enter"," "],Vv=["ArrowDown","PageUp","Home"],Ei=["ArrowUp","PageDown","End"],Bv=[...Vv,...Ei],Hv={ltr:[...co,"ArrowRight"],rtl:[...co,"ArrowLeft"]},Wv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_t="Menu",[vt,Gv,Uv]=St(_t),[Ke,Wo]=z(_t,[Uv,ye,Se]),_n=ye(),Pi=Se(),[Kv,ze]=Ke(_t),[zv,Tt]=Ke(_t),Ai=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,c=_n(t),[l,u]=a.useState(null),d=a.useRef(!1),p=Q(s),v=Te(r);return a.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),f.jsx(wt,{...c,children:f.jsx(Kv,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u,children:f.jsx(zv,{scope:t,onClose:a.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:v,modal:i,children:o})})})};Ai.displayName=_t;var Yv="MenuAnchor",Go=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=_n(n);return f.jsx(it,{...r,...o,ref:t})});Go.displayName=Yv;var Uo="MenuPortal",[Xv,_i]=Ke(Uo,{forceMount:void 0}),Ti=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=ze(Uo,t);return f.jsx(Xv,{scope:t,forceMount:n,children:f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:o})})})};Ti.displayName=Uo;var le="MenuContent",[Zv,Ko]=Ke(le),Mi=a.forwardRef((e,t)=>{const n=_i(le,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ze(le,e.__scopeMenu),i=Tt(le,e.__scopeMenu);return f.jsx(vt.Provider,{scope:e.__scopeMenu,children:f.jsx(Y,{present:o||s.open,children:f.jsx(vt.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(qv,{...r,ref:t}):f.jsx(Qv,{...r,ref:t})})})})}),qv=a.forwardRef((e,t)=>{const n=ze(le,e.__scopeMenu),o=a.useRef(null),r=N(t,o);return a.useEffect(()=>{const s=o.current;if(s)return rn(s)},[]),f.jsx(zo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Qv=a.forwardRef((e,t)=>{const n=ze(le,e.__scopeMenu);return f.jsx(zo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Jv=Dv("MenuContent.ScrollLock"),zo=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:v,onDismiss:m,disableOutsideScroll:g,...h}=e,x=ze(le,n),C=Tt(le,n),w=_n(n),b=Pi(n),y=Gv(n),[R,P]=a.useState(null),E=a.useRef(null),T=N(t,E,x.onContentChange),I=a.useRef(0),O=a.useRef(""),k=a.useRef(0),F=a.useRef(null),$=a.useRef("right"),L=a.useRef(0),H=g?gt:a.Fragment,j=g?{as:Jv,allowPinchZoom:!0}:void 0,V=A=>{const K=O.current+A,ee=y().filter(M=>!M.disabled),de=document.activeElement,Ee=ee.find(M=>M.ref.current===de)?.textValue,ie=ee.map(M=>M.textValue),Pe=dh(ie,K,Ee),re=ee.find(M=>M.textValue===Pe)?.ref.current;(function M(W){O.current=W,window.clearTimeout(I.current),W!==""&&(I.current=window.setTimeout(()=>M(""),1e3))})(K),re&&setTimeout(()=>re.focus())};a.useEffect(()=>()=>window.clearTimeout(I.current),[]),nn();const D=a.useCallback(A=>$.current===F.current?.side&&ph(A,F.current?.area),[]);return f.jsx(Zv,{scope:n,searchRef:O,onItemEnter:a.useCallback(A=>{D(A)&&A.preventDefault()},[D]),onItemLeave:a.useCallback(A=>{D(A)||(E.current?.focus(),P(null))},[D]),onTriggerLeave:a.useCallback(A=>{D(A)&&A.preventDefault()},[D]),pointerGraceTimerRef:k,onPointerGraceIntentChange:a.useCallback(A=>{F.current=A},[]),children:f.jsx(H,{...j,children:f.jsx(mt,{asChild:!0,trapped:r,onMountAutoFocus:S(s,A=>{A.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:v,onDismiss:m,children:f.jsx(Et,{asChild:!0,...b,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:P,onEntryFocus:S(l,A=>{C.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(Ct,{role:"menu","aria-orientation":"vertical","data-state":Ki(x.open),"data-radix-menu-content":"",dir:C.dir,...w,...h,ref:T,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,A=>{const ee=A.target.closest("[data-radix-menu-content]")===A.currentTarget,de=A.ctrlKey||A.altKey||A.metaKey,Ee=A.key.length===1;ee&&(A.key==="Tab"&&A.preventDefault(),!de&&Ee&&V(A.key));const ie=E.current;if(A.target!==ie||!Bv.includes(A.key))return;A.preventDefault();const re=y().filter(M=>!M.disabled).map(M=>M.ref.current);Ei.includes(A.key)&&re.reverse(),lh(re)}),onBlur:S(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:S(e.onPointerMove,ht(A=>{const K=A.target,ee=L.current!==A.clientX;if(A.currentTarget.contains(K)&&ee){const de=A.clientX>L.current?"right":"left";$.current=de,L.current=A.clientX}}))})})})})})})});Mi.displayName=le;var eh="MenuGroup",Yo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(_.div,{role:"group",...o,ref:t})});Yo.displayName=eh;var th="MenuLabel",Ii=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(_.div,{...o,ref:t})});Ii.displayName=th;var Qt="MenuItem",Er="menu.itemSelect",Tn=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=a.useRef(null),i=Tt(Qt,e.__scopeMenu),c=Ko(Qt,e.__scopeMenu),l=N(t,s),u=a.useRef(!1),d=()=>{const p=s.current;if(!n&&p){const v=new CustomEvent(Er,{bubbles:!0,cancelable:!0});p.addEventListener(Er,m=>o?.(m),{once:!0}),Tr(p,v),v.defaultPrevented?u.current=!1:i.onClose()}};return f.jsx(Ni,{...r,ref:l,disabled:n,onClick:S(e.onClick,d),onPointerDown:p=>{e.onPointerDown?.(p),u.current=!0},onPointerUp:S(e.onPointerUp,p=>{u.current||p.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,p=>{const v=c.searchRef.current!=="";n||v&&p.key===" "||co.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Tn.displayName=Qt;var Ni=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=Ko(Qt,n),c=Pi(n),l=a.useRef(null),u=N(t,l),[d,p]=a.useState(!1),[v,m]=a.useState("");return a.useEffect(()=>{const g=l.current;g&&m((g.textContent??"").trim())},[s.children]),f.jsx(vt.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:f.jsx(Pt,{asChild:!0,...c,focusable:!o,children:f.jsx(_.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:S(e.onPointerMove,ht(g=>{o?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,ht(g=>i.onItemLeave(g))),onFocus:S(e.onFocus,()=>p(!0)),onBlur:S(e.onBlur,()=>p(!1))})})})}),nh="MenuCheckboxItem",Oi=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return f.jsx($i,{scope:e.__scopeMenu,checked:n,children:f.jsx(Tn,{role:"menuitemcheckbox","aria-checked":Jt(n)?"mixed":n,...r,ref:t,"data-state":Zo(n),onSelect:S(r.onSelect,()=>o?.(Jt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Oi.displayName=nh;var Di="MenuRadioGroup",[oh,rh]=Ke(Di,{value:void 0,onValueChange:()=>{}}),ji=a.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Q(o);return f.jsx(oh,{scope:e.__scopeMenu,value:n,onValueChange:s,children:f.jsx(Yo,{...r,ref:t})})});ji.displayName=Di;var ki="MenuRadioItem",Li=a.forwardRef((e,t)=>{const{value:n,...o}=e,r=rh(ki,e.__scopeMenu),s=n===r.value;return f.jsx($i,{scope:e.__scopeMenu,checked:s,children:f.jsx(Tn,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Zo(s),onSelect:S(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Li.displayName=ki;var Xo="MenuItemIndicator",[$i,sh]=Ke(Xo,{checked:!1}),Fi=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=sh(Xo,n);return f.jsx(Y,{present:o||Jt(s.checked)||s.checked===!0,children:f.jsx(_.span,{...r,ref:t,"data-state":Zo(s.checked)})})});Fi.displayName=Xo;var ah="MenuSeparator",Vi=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(_.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Vi.displayName=ah;var ih="MenuArrow",Bi=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=_n(n);return f.jsx(bt,{...r,...o,ref:t})});Bi.displayName=ih;var ch="MenuSub",[Lg,Hi]=Ke(ch),ut="MenuSubTrigger",Wi=a.forwardRef((e,t)=>{const n=ze(ut,e.__scopeMenu),o=Tt(ut,e.__scopeMenu),r=Hi(ut,e.__scopeMenu),s=Ko(ut,e.__scopeMenu),i=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),l(null)}},[c,l]),f.jsx(Go,{asChild:!0,...u,children:f.jsx(Ni,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Ki(n.open),...e,ref:Ce(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,ht(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:S(e.onPointerLeave,ht(p=>{d();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,g=m==="right",h=g?-5:5,x=v[g?"left":"right"],C=v[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+h,y:p.clientY},{x,y:v.top},{x:C,y:v.top},{x:C,y:v.bottom},{x,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,p=>{const v=s.searchRef.current!=="";e.disabled||v&&p.key===" "||Hv[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});Wi.displayName=ut;var Gi="MenuSubContent",Ui=a.forwardRef((e,t)=>{const n=_i(le,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ze(le,e.__scopeMenu),i=Tt(le,e.__scopeMenu),c=Hi(Gi,e.__scopeMenu),l=a.useRef(null),u=N(t,l);return f.jsx(vt.Provider,{scope:e.__scopeMenu,children:f.jsx(Y,{present:o||s.open,children:f.jsx(vt.Slot,{scope:e.__scopeMenu,children:f.jsx(zo,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:S(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:S(e.onKeyDown,d=>{const p=d.currentTarget.contains(d.target),v=Wv[i.dir].includes(d.key);p&&v&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});Ui.displayName=Gi;function Ki(e){return e?"open":"closed"}function Jt(e){return e==="indeterminate"}function Zo(e){return Jt(e)?"indeterminate":e?"checked":"unchecked"}function lh(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function dh(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=uh(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function fh(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],l=t[i],u=c.x,d=c.y,p=l.x,v=l.y;d>o!=v>o&&n<(p-u)*(o-d)/(v-d)+u&&(r=!r)}return r}function ph(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fh(n,t)}function ht(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zi=Ai,Yi=Go,Xi=Ti,Zi=Mi,qi=Yo,Qi=Ii,Ji=Tn,ec=Oi,tc=ji,nc=Li,oc=Fi,rc=Vi,sc=Bi,ac=Wi,ic=Ui,Mn="DropdownMenu",[vh,$g]=z(Mn,[Wo]),ne=Wo(),[hh,cc]=vh(Mn),lc=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,l=ne(t),u=a.useRef(null),[d,p]=Z({prop:r,defaultProp:s??!1,onChange:i,caller:Mn});return f.jsx(hh,{scope:t,triggerId:J(),triggerRef:u,contentId:J(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(v=>!v),[p]),modal:c,children:f.jsx(zi,{...l,open:d,onOpenChange:p,dir:o,modal:c,children:n})})};lc.displayName=Mn;var uc="DropdownMenuTrigger",dc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=cc(uc,n),i=ne(n);return f.jsx(Yi,{asChild:!0,...i,children:f.jsx(_.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ce(t,s.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});dc.displayName=uc;var mh="DropdownMenuPortal",fc=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ne(t);return f.jsx(Xi,{...o,...n})};fc.displayName=mh;var pc="DropdownMenuContent",vc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=cc(pc,n),s=ne(n),i=a.useRef(!1);return f.jsx(Zi,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vc.displayName=pc;var gh="DropdownMenuGroup",hc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(qi,{...r,...o,ref:t})});hc.displayName=gh;var xh="DropdownMenuLabel",mc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(Qi,{...r,...o,ref:t})});mc.displayName=xh;var wh="DropdownMenuItem",gc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(Ji,{...r,...o,ref:t})});gc.displayName=wh;var Ch="DropdownMenuCheckboxItem",bh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(ec,{...r,...o,ref:t})});bh.displayName=Ch;var yh="DropdownMenuRadioGroup",Sh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(tc,{...r,...o,ref:t})});Sh.displayName=yh;var Rh="DropdownMenuRadioItem",Eh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(nc,{...r,...o,ref:t})});Eh.displayName=Rh;var Ph="DropdownMenuItemIndicator",Ah=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(oc,{...r,...o,ref:t})});Ah.displayName=Ph;var _h="DropdownMenuSeparator",xc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(rc,{...r,...o,ref:t})});xc.displayName=_h;var Th="DropdownMenuArrow",Mh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(sc,{...r,...o,ref:t})});Mh.displayName=Th;var Ih="DropdownMenuSubTrigger",Nh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(ac,{...r,...o,ref:t})});Nh.displayName=Ih;var Oh="DropdownMenuSubContent",Dh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(ic,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dh.displayName=Oh;var Fg=lc,Vg=dc,Bg=fc,Hg=vc,Wg=hc,Gg=mc,Ug=gc,Kg=xc,jh=Symbol("radix.slottable");function kh(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jh,t}var wc="AlertDialog",[Lh,zg]=z(wc,[Hr]),Me=Hr(),Cc=e=>{const{__scopeAlertDialog:t,...n}=e,o=Me(t);return f.jsx(Ju,{...o,...n,modal:!0})};Cc.displayName=wc;var $h="AlertDialogTrigger",Fh=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(ed,{...r,...o,ref:t})});Fh.displayName=$h;var Vh="AlertDialogPortal",bc=e=>{const{__scopeAlertDialog:t,...n}=e,o=Me(t);return f.jsx(td,{...o,...n})};bc.displayName=Vh;var Bh="AlertDialogOverlay",yc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(nd,{...r,...o,ref:t})});yc.displayName=Bh;var Je="AlertDialogContent",[Hh,Wh]=Lh(Je),Gh=kh("AlertDialogContent"),Sc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Me(n),i=a.useRef(null),c=N(t,i),l=a.useRef(null);return f.jsx(Xu,{contentName:Je,titleName:Rc,docsSlug:"alert-dialog",children:f.jsx(Hh,{scope:n,cancelRef:l,children:f.jsxs(od,{role:"alertdialog",...s,...r,ref:c,onOpenAutoFocus:S(r.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[f.jsx(Gh,{children:o}),f.jsx(Kh,{contentRef:i})]})})})});Sc.displayName=Je;var Rc="AlertDialogTitle",Ec=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(rd,{...r,...o,ref:t})});Ec.displayName=Rc;var Pc="AlertDialogDescription",Ac=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(sd,{...r,...o,ref:t})});Ac.displayName=Pc;var Uh="AlertDialogAction",_c=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(rs,{...r,...o,ref:t})});_c.displayName=Uh;var Tc="AlertDialogCancel",Mc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=Wh(Tc,n),s=Me(n),i=N(t,r);return f.jsx(rs,{...s,...o,ref:i})});Mc.displayName=Tc;var Kh=({contentRef:e})=>{const t=`\`${Je}\` requires a description for the component to be accessible for screen reader users.
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Qu="DialogDescriptionWarning",Ju=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${os(Qu).contentName}}.`;return a.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},ed=Wr,td=Ur,nd=zr,od=Yr,rd=Xr,sd=qr,ad=Jr,rs=ts;const id=["top","right","bottom","left"],Oe=Math.min,se=Math.max,Ht=Math.round,kt=Math.floor,xe=e=>({x:e,y:e}),cd={left:"right",right:"left",bottom:"top",top:"bottom"},ld={start:"end",end:"start"};function Xn(e,t,n){return se(e,Oe(t,n))}function Ae(e,t){return typeof e=="function"?e(t):e}function _e(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function xo(e){return e==="x"?"y":"x"}function wo(e){return e==="y"?"height":"width"}function De(e){return["top","bottom"].includes(_e(e))?"y":"x"}function Co(e){return xo(De(e))}function ud(e,t,n){n===void 0&&(n=!1);const o=st(e),r=Co(e),s=wo(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Wt(i)),[i,Wt(i)]}function dd(e){const t=Wt(e);return[Zn(e),t,Zn(t)]}function Zn(e){return e.replace(/start|end/g,t=>ld[t])}function fd(e,t,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?s:i;default:return[]}}function pd(e,t,n,o){const r=st(e);let s=fd(_e(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(Zn)))),s}function Wt(e){return e.replace(/left|right|bottom|top/g,t=>cd[t])}function vd(e){return{top:0,right:0,bottom:0,left:0,...e}}function ss(e){return typeof e!="number"?vd(e):{top:e,right:e,bottom:e,left:e}}function Gt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function hr(e,t,n){let{reference:o,floating:r}=e;const s=De(t),i=Co(t),c=wo(i),l=_e(t),u=s==="y",d=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,v=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:d,y:o.y-r.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:p};break;case"left":m={x:o.x-r.width,y:p};break;default:m={x:o.x,y:o.y}}switch(st(t)){case"start":m[i]-=v*(n&&u?-1:1);break;case"end":m[i]+=v*(n&&u?-1:1);break}return m}const hd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=hr(u,o,l),v=o,m={},g=0;for(let h=0;h<c.length;h++){const{name:x,fn:C}=c[h],{x:w,y:b,data:y,reset:R}=await C({x:d,y:p,initialPlacement:o,placement:v,strategy:r,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});d=w??d,p=b??p,m={...m,[x]:{...m[x],...y}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:d,y:p}=hr(u,v,l)),h=-1)}return{x:d,y:p,placement:v,strategy:r,middlewareData:m}};async function dt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=Ae(t,e),g=ss(m),x=c[v?p==="floating"?"reference":"floating":p],C=Gt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},R=Gt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return{top:(C.top-R.top+g.top)/y.y,bottom:(R.bottom-C.bottom+g.bottom)/y.y,left:(C.left-R.left+g.left)/y.x,right:(R.right-C.right+g.right)/y.x}}const md=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Ae(e,t)||{};if(u==null)return{};const p=ss(d),v={x:n,y:o},m=Co(r),g=wo(m),h=await i.getDimensions(u),x=m==="y",C=x?"top":"left",w=x?"bottom":"right",b=x?"clientHeight":"clientWidth",y=s.reference[g]+s.reference[m]-v[m]-s.floating[g],R=v[m]-s.reference[m],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=P?P[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(P)))&&(E=c.floating[b]||s.floating[g]);const T=y/2-R/2,I=E/2-h[g]/2-1,O=Oe(p[C],I),k=Oe(p[w],I),F=O,$=E-h[g]-k,L=E/2-h[g]/2+T,H=Xn(F,L,$),j=!l.arrow&&st(r)!=null&&L!==H&&s.reference[g]/2-(L<F?O:k)-h[g]/2<0,V=j?L<F?L-F:L-$:0;return{[m]:v[m]+V,data:{[m]:H,centerOffset:L-H-V,...j&&{alignmentOffset:V}},reset:j}}}),gd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=Ae(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=_e(r),w=De(c),b=_e(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=v||(b||!h?[Wt(c)]:dd(c)),P=g!=="none";!v&&P&&R.push(...pd(c,h,g,y));const E=[c,...R],T=await dt(t,x),I=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&I.push(T[C]),p){const L=ud(r,i,y);I.push(T[L[0]],T[L[1]])}if(O=[...O,{placement:r,overflows:I}],!I.every(L=>L<=0)){var k,F;const L=(((k=s.flip)==null?void 0:k.index)||0)+1,H=E[L];if(H)return{data:{index:L,overflows:O},reset:{placement:H}};let j=(F=O.filter(V=>V.overflows[0]<=0).sort((V,D)=>V.overflows[1]-D.overflows[1])[0])==null?void 0:F.placement;if(!j)switch(m){case"bestFit":{var $;const V=($=O.filter(D=>{if(P){const A=De(D.placement);return A===w||A==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(A=>A>0).reduce((A,K)=>A+K,0)]).sort((D,A)=>D[1]-A[1])[0])==null?void 0:$[0];V&&(j=V);break}case"initialPlacement":j=c;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function mr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gr(e){return id.some(t=>e[t]>=0)}const xd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ae(e,t);switch(o){case"referenceHidden":{const s=await dt(t,{...r,elementContext:"reference"}),i=mr(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:gr(i)}}}case"escaped":{const s=await dt(t,{...r,altBoundary:!0}),i=mr(s,n.floating);return{data:{escapedOffsets:i,escaped:gr(i)}}}default:return{}}}}};async function wd(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=_e(n),c=st(n),l=De(n)==="y",u=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,p=Ae(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof g=="number"&&(m=c==="end"?g*-1:g),l?{x:m*d,y:v*u}:{x:v*u,y:m*d}}const Cd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await wd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},bd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:C,y:w}=x;return{x:C,y:w}}},...l}=Ae(e,t),u={x:n,y:o},d=await dt(t,l),p=De(_e(r)),v=xo(p);let m=u[v],g=u[p];if(s){const x=v==="y"?"top":"left",C=v==="y"?"bottom":"right",w=m+d[x],b=m-d[C];m=Xn(w,m,b)}if(i){const x=p==="y"?"top":"left",C=p==="y"?"bottom":"right",w=g+d[x],b=g-d[C];g=Xn(w,g,b)}const h=c.fn({...t,[v]:m,[p]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[v]:s,[p]:i}}}}}},yd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Ae(e,t),d={x:n,y:o},p=De(r),v=xo(p);let m=d[v],g=d[p];const h=Ae(c,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=v==="y"?"height":"width",y=s.reference[v]-s.floating[b]+x.mainAxis,R=s.reference[v]+s.reference[b]-x.mainAxis;m<y?m=y:m>R&&(m=R)}if(u){var C,w;const b=v==="y"?"width":"height",y=["top","left"].includes(_e(r)),R=s.reference[p]-s.floating[b]+(y&&((C=i.offset)==null?void 0:C[p])||0)+(y?0:x.crossAxis),P=s.reference[p]+s.reference[b]+(y?0:((w=i.offset)==null?void 0:w[p])||0)-(y?x.crossAxis:0);g<R?g=R:g>P&&(g=P)}return{[v]:m,[p]:g}}}},Sd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:c}=t,{apply:l=()=>{},...u}=Ae(e,t),d=await dt(t,u),p=_e(r),v=st(r),m=De(r)==="y",{width:g,height:h}=s.floating;let x,C;p==="top"||p==="bottom"?(x=p,C=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(C=p,x=v==="end"?"top":"bottom");const w=h-d.top-d.bottom,b=g-d.left-d.right,y=Oe(h-d[x],w),R=Oe(g-d[C],b),P=!t.middlewareData.shift;let E=y,T=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=w),P&&!v){const O=se(d.left,0),k=se(d.right,0),F=se(d.top,0),$=se(d.bottom,0);m?T=g-2*(O!==0||k!==0?O+k:se(d.left,d.right)):E=h-2*(F!==0||$!==0?F+$:se(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:E});const I=await i.getDimensions(c.floating);return g!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function an(){return typeof window<"u"}function at(e){return as(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){var t;return(t=(as(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function as(e){return an()?e instanceof Node||e instanceof ae(e).Node:!1}function pe(e){return an()?e instanceof Element||e instanceof ae(e).Element:!1}function we(e){return an()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function xr(e){return!an()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function xt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Rd(e){return["table","td","th"].includes(at(e))}function cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function bo(e){const t=yo(),n=pe(e)?ve(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ed(e){let t=je(e);for(;we(t)&&!et(t);){if(bo(t))return t;if(cn(t))return null;t=je(t)}return null}function yo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(e){return["html","body","#document"].includes(at(e))}function ve(e){return ae(e).getComputedStyle(e)}function ln(e){return pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(at(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xr(e)&&e.host||be(e);return xr(t)?t.host:t}function is(e){const t=je(e);return et(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&xt(t)?t:is(t)}function ft(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=is(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=ae(r);if(s){const c=qn(i);return t.concat(i,i.visualViewport||[],xt(r)?r:[],c&&n?ft(c):[])}return t.concat(r,ft(r,[],n))}function qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=ve(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=we(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Ht(n)!==s||Ht(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function So(e){return pe(e)?e:e.contextElement}function Qe(e){const t=So(e);if(!we(t))return xe(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=cs(t);let i=(s?Ht(n.width):n.width)/o,c=(s?Ht(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Pd=xe(0);function ls(e){const t=ae(e);return!yo()||!t.visualViewport?Pd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ad(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function He(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=So(e);let i=xe(1);t&&(o?pe(o)&&(i=Qe(o)):i=Qe(e));const c=Ad(s,n,o)?ls(s):xe(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,d=r.width/i.x,p=r.height/i.y;if(s){const v=ae(s),m=o&&pe(o)?ae(o):o;let g=v,h=qn(g);for(;h&&o&&m!==g;){const x=Qe(h),C=h.getBoundingClientRect(),w=ve(h),b=C.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,y=C.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,p*=x.y,l+=b,u+=y,g=ae(h),h=qn(g)}}return Gt({width:d,height:p,x:l,y:u})}function Ro(e,t){const n=ln(e).scrollLeft;return t?t.left+n:He(be(e)).left+n}function us(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:Ro(e,o)),s=o.top+t.scrollTop;return{x:r,y:s}}function _d(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=be(o),c=t?cn(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=xe(1);const d=xe(0),p=we(o);if((p||!p&&!s)&&((at(o)!=="body"||xt(i))&&(l=ln(o)),we(o))){const m=He(o);u=Qe(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const v=i&&!p&&!s?us(i,l,!0):xe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+v.x,y:n.y*u.y-l.scrollTop*u.y+d.y+v.y}}function Td(e){return Array.from(e.getClientRects())}function Md(e){const t=be(e),n=ln(e),o=e.ownerDocument.body,r=se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Ro(e);const c=-n.scrollTop;return ve(o).direction==="rtl"&&(i+=se(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}function Id(e,t){const n=ae(e),o=be(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(r){s=r.width,i=r.height;const u=yo();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:c,y:l}}function Nd(e,t){const n=He(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=we(e)?Qe(e):xe(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:c,x:l,y:u}}function wr(e,t,n){let o;if(t==="viewport")o=Id(e,n);else if(t==="document")o=Md(be(e));else if(pe(t))o=Nd(t,n);else{const r=ls(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Gt(o)}function ds(e,t){const n=je(e);return n===t||!pe(n)||et(n)?!1:ve(n).position==="fixed"||ds(n,t)}function Od(e,t){const n=t.get(e);if(n)return n;let o=ft(e,[],!1).filter(c=>pe(c)&&at(c)!=="body"),r=null;const s=ve(e).position==="fixed";let i=s?je(e):e;for(;pe(i)&&!et(i);){const c=ve(i),l=bo(i);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||xt(i)&&!l&&ds(e,i))?o=o.filter(d=>d!==i):r=c,i=je(i)}return t.set(e,o),o}function Dd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?cn(t)?[]:Od(t,this._c):[].concat(n),o],c=i[0],l=i.reduce((u,d)=>{const p=wr(t,d,r);return u.top=se(p.top,u.top),u.right=Oe(p.right,u.right),u.bottom=Oe(p.bottom,u.bottom),u.left=se(p.left,u.left),u},wr(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function jd(e){const{width:t,height:n}=cs(e);return{width:t,height:n}}function kd(e,t,n){const o=we(t),r=be(t),s=n==="fixed",i=He(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=xe(0);if(o||!o&&!s)if((at(t)!=="body"||xt(r))&&(c=ln(t)),o){const v=He(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else r&&(l.x=Ro(r));const u=r&&!o&&!s?us(r,c):xe(0),d=i.left+c.scrollLeft-l.x-u.x,p=i.top+c.scrollTop-l.y-u.y;return{x:d,y:p,width:i.width,height:i.height}}function Hn(e){return ve(e).position==="static"}function Cr(e,t){if(!we(e)||ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function fs(e,t){const n=ae(e);if(cn(e))return n;if(!we(e)){let r=je(e);for(;r&&!et(r);){if(pe(r)&&!Hn(r))return r;r=je(r)}return n}let o=Cr(e,t);for(;o&&Rd(o)&&Hn(o);)o=Cr(o,t);return o&&et(o)&&Hn(o)&&!bo(o)?n:o||Ed(e)||n}const Ld=async function(e){const t=this.getOffsetParent||fs,n=this.getDimensions,o=await n(e.floating);return{reference:kd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $d(e){return ve(e).direction==="rtl"}const Fd={convertOffsetParentRelativeRectToViewportRelativeRect:_d,getDocumentElement:be,getClippingRect:Dd,getOffsetParent:fs,getElementRects:Ld,getClientRects:Td,getDimensions:jd,getScale:Qe,isElement:pe,isRTL:$d};function Vd(e,t){let n=null,o;const r=be(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:d,width:p,height:v}=e.getBoundingClientRect();if(c||t(),!p||!v)return;const m=kt(d),g=kt(r.clientWidth-(u+p)),h=kt(r.clientHeight-(d+v)),x=kt(u),w={rootMargin:-m+"px "+-g+"px "+-h+"px "+-x+"px",threshold:se(0,Oe(1,l))||1};let b=!0;function y(R){const P=R[0].intersectionRatio;if(P!==l){if(!b)return i();P?i(!1,P):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(y,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,w)}n.observe(e)}return i(!0),s}function Bd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=So(e),d=r||s?[...u?ft(u):[],...ft(t)]:[];d.forEach(C=>{r&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const p=u&&c?Vd(u,n):null;let v=-1,m=null;i&&(m=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let g,h=l?He(e):null;l&&x();function x(){const C=He(e);h&&(C.x!==h.x||C.y!==h.y||C.width!==h.width||C.height!==h.height)&&n(),h=C,g=requestAnimationFrame(x)}return n(),()=>{var C;d.forEach(w=>{r&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),p?.(),(C=m)==null||C.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const Hd=Cd,Wd=bd,Gd=gd,Ud=Sd,Kd=xd,br=md,zd=yd,Yd=(e,t,n)=>{const o=new Map,r={platform:Fd,...n},s={...r.platform,_c:o};return hd(e,t,{...r,platform:s})};var Ft=typeof document<"u"?a.useLayoutEffect:a.useEffect;function Ut(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Ut(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Ut(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ps(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yr(e,t){const n=ps(e);return Math.round(t*n)/n}function Wn(e){const t=a.useRef(e);return Ft(()=>{t.current=e}),t}function Xd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=a.useState(o);Ut(v,o)||m(o);const[g,h]=a.useState(null),[x,C]=a.useState(null),w=a.useCallback(D=>{D!==P.current&&(P.current=D,h(D))},[]),b=a.useCallback(D=>{D!==E.current&&(E.current=D,C(D))},[]),y=s||g,R=i||x,P=a.useRef(null),E=a.useRef(null),T=a.useRef(d),I=l!=null,O=Wn(l),k=Wn(r),F=Wn(u),$=a.useCallback(()=>{if(!P.current||!E.current)return;const D={placement:t,strategy:n,middleware:v};k.current&&(D.platform=k.current),Yd(P.current,E.current,D).then(A=>{const K={...A,isPositioned:F.current!==!1};L.current&&!Ut(T.current,K)&&(T.current=K,tn.flushSync(()=>{p(K)}))})},[v,t,n,k,F]);Ft(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[u]);const L=a.useRef(!1);Ft(()=>(L.current=!0,()=>{L.current=!1}),[]),Ft(()=>{if(y&&(P.current=y),R&&(E.current=R),y&&R){if(O.current)return O.current(y,R,$);$()}},[y,R,$,O,I]);const H=a.useMemo(()=>({reference:P,floating:E,setReference:w,setFloating:b}),[w,b]),j=a.useMemo(()=>({reference:y,floating:R}),[y,R]),V=a.useMemo(()=>{const D={position:n,left:0,top:0};if(!j.floating)return D;const A=yr(j.floating,d.x),K=yr(j.floating,d.y);return c?{...D,transform:"translate("+A+"px, "+K+"px)",...ps(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:K}},[n,c,j.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:$,refs:H,elements:j,floatingStyles:V}),[d,$,H,j,V])}const Zd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?br({element:o.current,padding:r}).fn(n):{}:o?br({element:o,padding:r}).fn(n):{}}}},qd=(e,t)=>({...Hd(e),options:[e,t]}),Qd=(e,t)=>({...Wd(e),options:[e,t]}),Jd=(e,t)=>({...zd(e),options:[e,t]}),ef=(e,t)=>({...Gd(e),options:[e,t]}),tf=(e,t)=>({...Ud(e),options:[e,t]}),nf=(e,t)=>({...Kd(e),options:[e,t]}),of=(e,t)=>({...Zd(e),options:[e,t]});var rf="Arrow",vs=a.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return f.jsx(_.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});vs.displayName=rf;var sf=vs;function un(e){const[t,n]=a.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,c=u.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Eo="Popper",[hs,ye]=z(Eo),[af,ms]=hs(Eo),gs=e=>{const{__scopePopper:t,children:n}=e,[o,r]=a.useState(null);return f.jsx(af,{scope:t,anchor:o,onAnchorChange:r,children:n})};gs.displayName=Eo;var xs="PopperAnchor",ws=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=ms(xs,n),i=a.useRef(null),c=N(t,i),l=a.useRef(null);return a.useEffect(()=>{const u=l.current;l.current=o?.current||i.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:f.jsx(_.div,{...r,ref:c})});ws.displayName=xs;var Po="PopperContent",[cf,lf]=hs(Po),Cs=a.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:g,...h}=e,x=ms(Po,n),[C,w]=a.useState(null),b=N(t,M=>w(M)),[y,R]=a.useState(null),P=un(y),E=P?.width??0,T=P?.height??0,I=o+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},k=Array.isArray(u)?u:[u],F=k.length>0,$={padding:O,boundary:k.filter(df),altBoundary:F},{refs:L,floatingStyles:H,placement:j,isPositioned:V,middlewareData:D}=Xd({strategy:"fixed",placement:I,whileElementsMounted:(...M)=>Bd(...M,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[qd({mainAxis:r+T,alignmentAxis:i}),l&&Qd({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Jd():void 0,...$}),l&&ef({...$}),tf({...$,apply:({elements:M,rects:W,availableWidth:te,availableHeight:G})=>{const{width:U,height:X}=W.reference,ce=M.floating.style;ce.setProperty("--radix-popper-available-width",`${te}px`),ce.setProperty("--radix-popper-available-height",`${G}px`),ce.setProperty("--radix-popper-anchor-width",`${U}px`),ce.setProperty("--radix-popper-anchor-height",`${X}px`)}}),y&&of({element:y,padding:c}),ff({arrowWidth:E,arrowHeight:T}),v&&nf({strategy:"referenceHidden",...$})]}),[A,K]=Ss(j),ee=Q(g);q(()=>{V&&ee?.()},[V,ee]);const de=D.arrow?.x,Ee=D.arrow?.y,ie=D.arrow?.centerOffset!==0,[Pe,re]=a.useState();return q(()=>{C&&re(window.getComputedStyle(C).zIndex)},[C]),f.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:V?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(cf,{scope:n,placedSide:A,onArrowChange:R,arrowX:de,arrowY:Ee,shouldHideArrow:ie,children:f.jsx(_.div,{"data-side":A,"data-align":K,...h,ref:b,style:{...h.style,animation:V?void 0:"none"}})})})});Cs.displayName=Po;var bs="PopperArrow",uf={top:"bottom",right:"left",bottom:"top",left:"right"},ys=a.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=lf(bs,o),i=uf[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(sf,{...r,ref:n,style:{...r.style,display:"block"}})})});ys.displayName=bs;function df(e){return e!==null}var ff=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=Ss(n),p={start:"0%",center:"50%",end:"100%"}[d],v=(r.arrow?.x??0)+c/2,m=(r.arrow?.y??0)+l/2;let g="",h="";return u==="bottom"?(g=i?p:`${v}px`,h=`${-l}px`):u==="top"?(g=i?p:`${v}px`,h=`${o.floating.height+l}px`):u==="right"?(g=`${-l}px`,h=i?p:`${m}px`):u==="left"&&(g=`${o.floating.width+l}px`,h=i?p:`${m}px`),{data:{x:g,y:h}}}});function Ss(e){const[t,n="center"]=e.split("-");return[t,n]}var wt=gs,it=ws,Ct=Cs,bt=ys,pf=Symbol("radix.slottable");function vf(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=pf,t}var Rs=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),hf="VisuallyHidden",Es=a.forwardRef((e,t)=>f.jsx(_.span,{...e,ref:t,style:{...Rs,...e.style}}));Es.displayName=hf;var mf=Es,[dn,Lm]=z("Tooltip",[ye]),fn=ye(),Ps="TooltipProvider",gf=700,Qn="tooltip.open",[xf,Ao]=dn(Ps),As=e=>{const{__scopeTooltip:t,delayDuration:n=gf,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,i=a.useRef(!0),c=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),f.jsx(xf,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};As.displayName=Ps;var pt="Tooltip",[wf,yt]=dn(pt),_s=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,l=Ao(pt,e.__scopeTooltip),u=fn(t),[d,p]=a.useState(null),v=J(),m=a.useRef(0),g=i??l.disableHoverableContent,h=c??l.delayDuration,x=a.useRef(!1),[C,w]=Z({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qn))):l.onClose(),s?.(E)},caller:pt}),b=a.useMemo(()=>C?x.current?"delayed-open":"instant-open":"closed",[C]),y=a.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,w(!0)},[w]),R=a.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),P=a.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,w(!0),m.current=0},h)},[h,w]);return a.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),f.jsx(wt,{...u,children:f.jsx(wf,{scope:t,contentId:v,open:C,stateAttribute:b,trigger:d,onTriggerChange:p,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?P():y()},[l.isOpenDelayedRef,P,y]),onTriggerLeave:a.useCallback(()=>{g?R():(window.clearTimeout(m.current),m.current=0)},[R,g]),onOpen:y,onClose:R,disableHoverableContent:g,children:n})})};_s.displayName=pt;var Jn="TooltipTrigger",Ts=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=yt(Jn,n),s=Ao(Jn,n),i=fn(n),c=a.useRef(null),l=N(t,c,r.onTriggerChange),u=a.useRef(!1),d=a.useRef(!1),p=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(it,{asChild:!0,...i,children:f.jsx(_.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:S(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:S(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:S(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:S(e.onBlur,r.onClose),onClick:S(e.onClick,r.onClose)})})});Ts.displayName=Jn;var _o="TooltipPortal",[Cf,bf]=dn(_o,{forceMount:void 0}),Ms=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=yt(_o,t);return f.jsx(Cf,{scope:t,forceMount:n,children:f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:o})})})};Ms.displayName=_o;var tt="TooltipContent",Is=a.forwardRef((e,t)=>{const n=bf(tt,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,i=yt(tt,e.__scopeTooltip);return f.jsx(Y,{present:o||i.open,children:i.disableHoverableContent?f.jsx(Ns,{side:r,...s,ref:t}):f.jsx(yf,{side:r,...s,ref:t})})}),yf=a.forwardRef((e,t)=>{const n=yt(tt,e.__scopeTooltip),o=Ao(tt,e.__scopeTooltip),r=a.useRef(null),s=N(t,r),[i,c]=a.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:p}=o,v=a.useCallback(()=>{c(null),p(!1)},[p]),m=a.useCallback((g,h)=>{const x=g.currentTarget,C={x:g.clientX,y:g.clientY},w=Pf(C,x.getBoundingClientRect()),b=Af(C,w),y=_f(h.getBoundingClientRect()),R=Mf([...b,...y]);c(R),p(!0)},[p]);return a.useEffect(()=>()=>v(),[v]),a.useEffect(()=>{if(l&&d){const g=x=>m(x,d),h=x=>m(x,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[l,d,m,v]),a.useEffect(()=>{if(i){const g=h=>{const x=h.target,C={x:h.clientX,y:h.clientY},w=l?.contains(x)||d?.contains(x),b=!Tf(C,i);w?v():b&&(v(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,i,u,v]),f.jsx(Ns,{...e,ref:s})}),[Sf,Rf]=dn(pt,{isInside:!1}),Ef=vf("TooltipContent"),Ns=a.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,l=yt(tt,n),u=fn(n),{onClose:d}=l;return a.useEffect(()=>(document.addEventListener(Qn,d),()=>document.removeEventListener(Qn,d)),[d]),a.useEffect(()=>{if(l.trigger){const p=v=>{v.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:f.jsxs(Ct,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(Ef,{children:o}),f.jsx(Sf,{scope:n,isInside:!0,children:f.jsx(mf,{id:l.contentId,role:"tooltip",children:r||o})})]})})});Is.displayName=tt;var Os="TooltipArrow",Ds=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=fn(n);return Rf(Os,n).isInside?null:f.jsx(bt,{...r,...o,ref:t})});Ds.displayName=Os;function Pf(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Af(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function _f(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Tf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],l=t[i],u=c.x,d=c.y,p=l.x,v=l.y;d>o!=v>o&&n<(p-u)*(o-d)/(v-d)+u&&(r=!r)}return r}function Mf(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),If(t)}function If(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $m=As,Fm=_s,Vm=Ts,Bm=Ms,Hm=Is,Wm=Ds;function Sr(e){const t=Nf(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Df);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Nf(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=kf(r),c=jf(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Of=Symbol("radix.slottable");function Df(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Of}function jf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function kf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function St(e){const t=e+"CollectionProvider",[n,o]=z(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:C}=h,w=B.useRef(null),b=B.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:b,collectionRef:w,children:C})};i.displayName=t;const c=e+"CollectionSlot",l=Sr(c),u=B.forwardRef((h,x)=>{const{scope:C,children:w}=h,b=s(c,C),y=N(x,b.collectionRef);return f.jsx(l,{ref:y,children:w})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",v=Sr(d),m=B.forwardRef((h,x)=>{const{scope:C,children:w,...b}=h,y=B.useRef(null),R=N(x,y),P=s(d,C);return B.useEffect(()=>(P.itemMap.set(y,{ref:y,...b}),()=>{P.itemMap.delete(y)})),f.jsx(v,{[p]:"",ref:R,children:w})});m.displayName=d;function g(h){const x=s(e+"CollectionConsumer",h);return B.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((P,E)=>b.indexOf(P.ref.current)-b.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},g,o]}var pn="Collapsible",[Lf,js]=z(pn),[$f,To]=Lf(pn),ks=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:i,...c}=e,[l,u]=Z({prop:o,defaultProp:r??!1,onChange:i,caller:pn});return f.jsx($f,{scope:n,disabled:s,contentId:J(),open:l,onOpenToggle:a.useCallback(()=>u(d=>!d),[u]),children:f.jsx(_.div,{"data-state":Io(l),"data-disabled":s?"":void 0,...c,ref:t})})});ks.displayName=pn;var Ls="CollapsibleTrigger",$s=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=To(Ls,n);return f.jsx(_.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":Io(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:S(e.onClick,r.onOpenToggle)})});$s.displayName=Ls;var Mo="CollapsibleContent",Fs=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=To(Mo,e.__scopeCollapsible);return f.jsx(Y,{present:n||r.open,children:({present:s})=>f.jsx(Ff,{...o,ref:t,present:s})})});Fs.displayName=Mo;var Ff=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,i=To(Mo,n),[c,l]=a.useState(o),u=a.useRef(null),d=N(t,u),p=a.useRef(0),v=p.current,m=a.useRef(0),g=m.current,h=i.open||c,x=a.useRef(h),C=a.useRef(void 0);return a.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),q(()=>{const w=u.current;if(w){C.current=C.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const b=w.getBoundingClientRect();p.current=b.height,m.current=b.width,x.current||(w.style.transitionDuration=C.current.transitionDuration,w.style.animationName=C.current.animationName),l(o)}},[i.open,o]),f.jsx(_.div,{"data-state":Io(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:h&&r})});function Io(e){return e?"open":"closed"}var Vf=ks,Bf=$s,Hf=Fs,Wf=a.createContext(void 0);function Te(e){const t=a.useContext(Wf);return e||t||"ltr"}var me="Accordion",Gf=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[No,Uf,Kf]=St(me),[vn,Gm]=z(me,[Kf,js]),Oo=js(),Vs=B.forwardRef((e,t)=>{const{type:n,...o}=e,r=o,s=o;return f.jsx(No.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(Zf,{...s,ref:t}):f.jsx(Xf,{...r,ref:t})})});Vs.displayName=me;var[Bs,zf]=vn(me),[Hs,Yf]=vn(me,{collapsible:!1}),Xf=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},collapsible:s=!1,...i}=e,[c,l]=Z({prop:n,defaultProp:o??"",onChange:r,caller:me});return f.jsx(Bs,{scope:e.__scopeAccordion,value:B.useMemo(()=>c?[c]:[],[c]),onItemOpen:l,onItemClose:B.useCallback(()=>s&&l(""),[s,l]),children:f.jsx(Hs,{scope:e.__scopeAccordion,collapsible:s,children:f.jsx(Ws,{...i,ref:t})})})}),Zf=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,c]=Z({prop:n,defaultProp:o??[],onChange:r,caller:me}),l=B.useCallback(d=>c((p=[])=>[...p,d]),[c]),u=B.useCallback(d=>c((p=[])=>p.filter(v=>v!==d)),[c]);return f.jsx(Bs,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:f.jsx(Hs,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(Ws,{...s,ref:t})})})}),[qf,hn]=vn(me),Ws=B.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:o,dir:r,orientation:s="vertical",...i}=e,c=B.useRef(null),l=N(c,t),u=Uf(n),p=Te(r)==="ltr",v=S(e.onKeyDown,m=>{if(!Gf.includes(m.key))return;const g=m.target,h=u().filter(T=>!T.ref.current?.disabled),x=h.findIndex(T=>T.ref.current===g),C=h.length;if(x===-1)return;m.preventDefault();let w=x;const b=0,y=C-1,R=()=>{w=x+1,w>y&&(w=b)},P=()=>{w=x-1,w<b&&(w=y)};switch(m.key){case"Home":w=b;break;case"End":w=y;break;case"ArrowRight":s==="horizontal"&&(p?R():P());break;case"ArrowDown":s==="vertical"&&R();break;case"ArrowLeft":s==="horizontal"&&(p?P():R());break;case"ArrowUp":s==="vertical"&&P();break}const E=w%C;h[E].ref.current?.focus()});return f.jsx(qf,{scope:n,disabled:o,direction:r,orientation:s,children:f.jsx(No.Slot,{scope:n,children:f.jsx(_.div,{...i,"data-orientation":s,ref:l,onKeyDown:o?void 0:v})})})}),Kt="AccordionItem",[Qf,Do]=vn(Kt),Gs=B.forwardRef((e,t)=>{const{__scopeAccordion:n,value:o,...r}=e,s=hn(Kt,n),i=zf(Kt,n),c=Oo(n),l=J(),u=o&&i.value.includes(o)||!1,d=s.disabled||e.disabled;return f.jsx(Qf,{scope:n,open:u,disabled:d,triggerId:l,children:f.jsx(Vf,{"data-orientation":s.orientation,"data-state":Zs(u),...c,...r,ref:t,disabled:d,open:u,onOpenChange:p=>{p?i.onItemOpen(o):i.onItemClose(o)}})})});Gs.displayName=Kt;var Us="AccordionHeader",Ks=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=hn(me,n),s=Do(Us,n);return f.jsx(_.h3,{"data-orientation":r.orientation,"data-state":Zs(s.open),"data-disabled":s.disabled?"":void 0,...o,ref:t})});Ks.displayName=Us;var eo="AccordionTrigger",zs=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=hn(me,n),s=Do(eo,n),i=Yf(eo,n),c=Oo(n);return f.jsx(No.ItemSlot,{scope:n,children:f.jsx(Bf,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...c,...o,ref:t})})});zs.displayName=eo;var Ys="AccordionContent",Xs=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=hn(me,n),s=Do(Ys,n),i=Oo(n);return f.jsx(Hf,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Xs.displayName=Ys;function Zs(e){return e?"open":"closed"}var Um=Vs,Km=Gs,zm=Ks,Ym=zs,Xm=Xs;function mn(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gn="Checkbox",[Jf,Zm]=z(gn),[ep,jo]=Jf(gn);function tp(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:i,name:c,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:p}=e,[v,m]=Z({prop:n,defaultProp:r??!1,onChange:l,caller:gn}),[g,h]=a.useState(null),[x,C]=a.useState(null),w=a.useRef(!1),b=g?!!i||!!g.closest("form"):!0,y={checked:v,disabled:s,setChecked:m,control:g,setControl:h,name:c,form:i,value:d,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Ne(r)?!1:r,isFormControl:b,bubbleInput:x,setBubbleInput:C};return f.jsx(ep,{scope:t,...y,children:rp(p)?p(y):o})}var qs="CheckboxTrigger",Qs=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:i,disabled:c,checked:l,required:u,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:g}=jo(qs,e),h=N(r,d),x=a.useRef(l);return a.useEffect(()=>{const C=s?.form;if(C){const w=()=>p(x.current);return C.addEventListener("reset",w),()=>C.removeEventListener("reset",w)}},[s,p]),f.jsx(_.button,{type:"button",role:"checkbox","aria-checked":Ne(l)?"mixed":l,"aria-required":u,"data-state":na(l),"data-disabled":c?"":void 0,disabled:c,value:i,...o,ref:h,onKeyDown:S(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:S(n,C=>{p(w=>Ne(w)?!0:!w),g&&m&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})})});Qs.displayName=qs;var np=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:i,disabled:c,value:l,onCheckedChange:u,form:d,...p}=e;return f.jsx(tp,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:c,required:i,onCheckedChange:u,name:o,form:d,value:l,internal_do_not_use_render:({isFormControl:v})=>f.jsxs(f.Fragment,{children:[f.jsx(Qs,{...p,ref:t,__scopeCheckbox:n}),v&&f.jsx(ta,{__scopeCheckbox:n})]})})});np.displayName=gn;var Js="CheckboxIndicator",op=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=jo(Js,n);return f.jsx(Y,{present:o||Ne(s.checked)||s.checked===!0,children:f.jsx(_.span,{"data-state":na(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});op.displayName=Js;var ea="CheckboxBubbleInput",ta=a.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:i,required:c,disabled:l,name:u,value:d,form:p,bubbleInput:v,setBubbleInput:m}=jo(ea,e),g=N(n,m),h=mn(s),x=un(o);a.useEffect(()=>{const w=v;if(!w)return;const b=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(b,"checked").set,P=!r.current;if(h!==s&&R){const E=new Event("click",{bubbles:P});w.indeterminate=Ne(s),R.call(w,Ne(s)?!1:s),w.dispatchEvent(E)}},[v,h,s,r]);const C=a.useRef(Ne(s)?!1:s);return f.jsx(_.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??C.current,required:c,disabled:l,name:u,value:d,form:p,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ta.displayName=ea;function rp(e){return typeof e=="function"}function Ne(e){return e==="indeterminate"}function na(e){return Ne(e)?"indeterminate":e?"checked":"unchecked"}var Gn,xn="HoverCard",[oa,qm]=z(xn,[ye]),wn=ye(),[sp,ko]=oa(xn),ra=e=>{const{__scopeHoverCard:t,children:n,open:o,defaultOpen:r,onOpenChange:s,openDelay:i=700,closeDelay:c=300}=e,l=wn(t),u=a.useRef(0),d=a.useRef(0),p=a.useRef(!1),v=a.useRef(!1),[m,g]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:xn}),h=a.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),x=a.useCallback(()=>{clearTimeout(u.current),!p.current&&!v.current&&(d.current=window.setTimeout(()=>g(!1),c))},[c,g]),C=a.useCallback(()=>g(!1),[g]);return a.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),f.jsx(sp,{scope:t,open:m,onOpenChange:g,onOpen:h,onClose:x,onDismiss:C,hasSelectionRef:p,isPointerDownOnContentRef:v,children:f.jsx(wt,{...l,children:n})})};ra.displayName=xn;var sa="HoverCardTrigger",aa=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...o}=e,r=ko(sa,n),s=wn(n);return f.jsx(it,{asChild:!0,...s,children:f.jsx(_.a,{"data-state":r.open?"open":"closed",...o,ref:t,onPointerEnter:S(e.onPointerEnter,Yt(r.onOpen)),onPointerLeave:S(e.onPointerLeave,Yt(r.onClose)),onFocus:S(e.onFocus,r.onOpen),onBlur:S(e.onBlur,r.onClose),onTouchStart:S(e.onTouchStart,i=>i.preventDefault())})})});aa.displayName=sa;var ap="HoverCardPortal",[Qm,ip]=oa(ap,{forceMount:void 0}),zt="HoverCardContent",ia=a.forwardRef((e,t)=>{const n=ip(zt,e.__scopeHoverCard),{forceMount:o=n.forceMount,...r}=e,s=ko(zt,e.__scopeHoverCard);return f.jsx(Y,{present:o||s.open,children:f.jsx(cp,{"data-state":s.open?"open":"closed",...r,onPointerEnter:S(e.onPointerEnter,Yt(s.onOpen)),onPointerLeave:S(e.onPointerLeave,Yt(s.onClose)),ref:t})})});ia.displayName=zt;var cp=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,...c}=e,l=ko(zt,n),u=wn(n),d=a.useRef(null),p=N(t,d),[v,m]=a.useState(!1);return a.useEffect(()=>{if(v){const g=document.body;return Gn=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Gn,g.style.webkitUserSelect=Gn}}},[v]),a.useEffect(()=>{if(d.current){const g=()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),a.useEffect(()=>{d.current&&dp(d.current).forEach(h=>h.setAttribute("tabindex","-1"))}),f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:S(s,g=>{g.preventDefault()}),onDismiss:l.onDismiss,children:f.jsx(Ct,{...u,...c,onPointerDown:S(c.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:v?"text":void 0,WebkitUserSelect:v?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),lp="HoverCardArrow",up=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...o}=e,r=wn(n);return f.jsx(bt,{...r,...o,ref:t})});up.displayName=lp;function Yt(e){return t=>t.pointerType==="touch"?void 0:e()}function dp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var Jm=ra,eg=aa,tg=ia;function ca(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,s;for(s=0;s<o.length;s++)r=o[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var fp=["color"],ng=a.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=ca(e,fp);return a.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),a.createElement("path",{d:"M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),pp=["color"],og=a.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=ca(e,pp);return a.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),a.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Un="rovingFocusGroup.onEntryFocus",vp={bubbles:!1,cancelable:!0},Rt="RovingFocusGroup",[to,la,hp]=St(Rt),[mp,Se]=z(Rt,[hp]),[gp,xp]=mp(Rt),ua=a.forwardRef((e,t)=>f.jsx(to.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(to.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(wp,{...e,ref:t})})}));ua.displayName=Rt;var wp=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...p}=e,v=a.useRef(null),m=N(t,v),g=Te(s),[h,x]=Z({prop:i,defaultProp:c??null,onChange:l,caller:Rt}),[C,w]=a.useState(!1),b=Q(u),y=la(n),R=a.useRef(!1),[P,E]=a.useState(0);return a.useEffect(()=>{const T=v.current;if(T)return T.addEventListener(Un,b),()=>T.removeEventListener(Un,b)},[b]),f.jsx(gp,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:h,onItemFocus:a.useCallback(T=>x(T),[x]),onItemShiftTab:a.useCallback(()=>w(!0),[]),onFocusableItemAdd:a.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:a.useCallback(()=>E(T=>T-1),[]),children:f.jsx(_.div,{tabIndex:C||P===0?-1:0,"data-orientation":o,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{R.current=!0}),onFocus:S(e.onFocus,T=>{const I=!R.current;if(T.target===T.currentTarget&&I&&!C){const O=new CustomEvent(Un,vp);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const k=y().filter(j=>j.focusable),F=k.find(j=>j.active),$=k.find(j=>j.id===h),H=[F,$,...k].filter(Boolean).map(j=>j.ref.current);pa(H,d)}}R.current=!1}),onBlur:S(e.onBlur,()=>w(!1))})})}),da="RovingFocusGroupItem",fa=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:i,...c}=e,l=J(),u=s||l,d=xp(da,n),p=d.currentTabStopId===u,v=la(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:h}=d;return a.useEffect(()=>{if(o)return m(),()=>g()},[o,m,g]),f.jsx(to.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:f.jsx(_.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,x=>{o?d.onItemFocus(u):x.preventDefault()}),onFocus:S(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:S(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const C=yp(x,d.orientation,d.dir);if(C!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=v().filter(y=>y.focusable).map(y=>y.ref.current);if(C==="last")b.reverse();else if(C==="prev"||C==="next"){C==="prev"&&b.reverse();const y=b.indexOf(x.currentTarget);b=d.loop?Sp(b,y+1):b.slice(y+1)}setTimeout(()=>pa(b))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:h!=null}):i})})});fa.displayName=da;var Cp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yp(e,t,n){const o=bp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Cp[o]}function pa(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Sp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Et=ua,Pt=fa,Cn="Tabs",[Rp,rg]=z(Cn,[Se]),va=Se(),[Ep,Lo]=Rp(Cn),ha=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:i="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=Te(c),[p,v]=Z({prop:o,onChange:r,defaultProp:s??"",caller:Cn});return f.jsx(Ep,{scope:n,baseId:J(),value:p,onValueChange:v,orientation:i,dir:d,activationMode:l,children:f.jsx(_.div,{dir:d,"data-orientation":i,...u,ref:t})})});ha.displayName=Cn;var ma="TabsList",ga=a.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=Lo(ma,n),i=va(n);return f.jsx(Et,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:o,children:f.jsx(_.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});ga.displayName=ma;var xa="TabsTrigger",wa=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,i=Lo(xa,n),c=va(n),l=ya(i.baseId,o),u=Sa(i.baseId,o),d=o===i.value;return f.jsx(Pt,{asChild:!0,...c,focusable:!r,active:d,children:f.jsx(_.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:S(e.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?i.onValueChange(o):p.preventDefault()}),onKeyDown:S(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(o)}),onFocus:S(e.onFocus,()=>{const p=i.activationMode!=="manual";!d&&!r&&p&&i.onValueChange(o)})})})});wa.displayName=xa;var Ca="TabsContent",ba=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...i}=e,c=Lo(Ca,n),l=ya(c.baseId,o),u=Sa(c.baseId,o),d=o===c.value,p=a.useRef(d);return a.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),f.jsx(Y,{present:r||d,children:({present:v})=>f.jsx(_.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!v,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:v&&s})})});ba.displayName=Ca;function ya(e,t){return`${e}-trigger-${t}`}function Sa(e,t){return`${e}-content-${t}`}var sg=ha,ag=ga,ig=wa,cg=ba;function Pp(e){const t=Ap(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Tp);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ap(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Ip(r),c=Mp(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _p=Symbol("radix.slottable");function Tp(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_p}function Mp(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ip(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bn="Popover",[Ra,lg]=z(bn,[ye]),At=ye(),[Np,ke]=Ra(bn),Ea=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!1}=e,c=At(t),l=a.useRef(null),[u,d]=a.useState(!1),[p,v]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:bn});return f.jsx(wt,{...c,children:f.jsx(Np,{scope:t,contentId:J(),triggerRef:l,open:p,onOpenChange:v,onOpenToggle:a.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>d(!0),[]),onCustomAnchorRemove:a.useCallback(()=>d(!1),[]),modal:i,children:n})})};Ea.displayName=bn;var Pa="PopoverAnchor",Aa=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ke(Pa,n),s=At(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return a.useEffect(()=>(i(),()=>c()),[i,c]),f.jsx(it,{...s,...o,ref:t})});Aa.displayName=Pa;var _a="PopoverTrigger",Ta=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ke(_a,n),s=At(n),i=N(t,r.triggerRef),c=f.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Da(r.open),...o,ref:i,onClick:S(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:f.jsx(it,{asChild:!0,...s,children:c})});Ta.displayName=_a;var $o="PopoverPortal",[Op,Dp]=Ra($o,{forceMount:void 0}),Ma=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=ke($o,t);return f.jsx(Op,{scope:t,forceMount:n,children:f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:o})})})};Ma.displayName=$o;var nt="PopoverContent",Ia=a.forwardRef((e,t)=>{const n=Dp(nt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=ke(nt,e.__scopePopover);return f.jsx(Y,{present:o||s.open,children:s.modal?f.jsx(kp,{...r,ref:t}):f.jsx(Lp,{...r,ref:t})})});Ia.displayName=nt;var jp=Pp("PopoverContent.RemoveScroll"),kp=a.forwardRef((e,t)=>{const n=ke(nt,e.__scopePopover),o=a.useRef(null),r=N(t,o),s=a.useRef(!1);return a.useEffect(()=>{const i=o.current;if(i)return rn(i)},[]),f.jsx(gt,{as:jp,allowPinchZoom:!0,children:f.jsx(Na,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Lp=a.forwardRef((e,t)=>{const n=ke(nt,e.__scopePopover),o=a.useRef(!1),r=a.useRef(!1);return f.jsx(Na,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Na=a.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...p}=e,v=ke(nt,n),m=At(n);return nn(),f.jsx(mt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:f.jsx(Ct,{"data-state":Da(v.open),role:"dialog",id:v.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Oa="PopoverClose",$p=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ke(Oa,n);return f.jsx(_.button,{type:"button",...o,ref:t,onClick:S(e.onClick,()=>r.onOpenChange(!1))})});$p.displayName=Oa;var Fp="PopoverArrow",Vp=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=At(n);return f.jsx(bt,{...r,...o,ref:t})});Vp.displayName=Fp;function Da(e){return e?"open":"closed"}var ug=Ea,dg=Aa,fg=Ta,pg=Ma,vg=Ia;function no(e,[t,n]){return Math.min(n,Math.max(t,e))}function Bp(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Fo="ScrollArea",[ja,hg]=z(Fo),[Hp,ue]=ja(Fo),ka=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...i}=e,[c,l]=a.useState(null),[u,d]=a.useState(null),[p,v]=a.useState(null),[m,g]=a.useState(null),[h,x]=a.useState(null),[C,w]=a.useState(0),[b,y]=a.useState(0),[R,P]=a.useState(!1),[E,T]=a.useState(!1),I=N(t,k=>l(k)),O=Te(r);return f.jsx(Hp,{scope:n,type:o,dir:O,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:p,onContentChange:v,scrollbarX:m,onScrollbarXChange:g,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:E,onScrollbarYEnabledChange:T,onCornerWidthChange:w,onCornerHeightChange:y,children:f.jsx(_.div,{dir:O,...i,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});ka.displayName=Fo;var La="ScrollAreaViewport",$a=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,i=ue(La,n),c=a.useRef(null),l=N(t,c,i.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(_.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:f.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});$a.displayName=La;var Re="ScrollAreaScrollbar",Wp=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ue(Re,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=r,c=e.orientation==="horizontal";return a.useEffect(()=>(c?s(!0):i(!0),()=>{c?s(!1):i(!1)}),[c,s,i]),r.type==="hover"?f.jsx(Gp,{...o,ref:t,forceMount:n}):r.type==="scroll"?f.jsx(Up,{...o,ref:t,forceMount:n}):r.type==="auto"?f.jsx(Fa,{...o,ref:t,forceMount:n}):r.type==="always"?f.jsx(Vo,{...o,ref:t}):null});Wp.displayName=Re;var Gp=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ue(Re,e.__scopeScrollArea),[s,i]=a.useState(!1);return a.useEffect(()=>{const c=r.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),i(!0)},d=()=>{l=window.setTimeout(()=>i(!1),r.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),f.jsx(Y,{present:n||s,children:f.jsx(Fa,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Up=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ue(Re,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Sn(()=>l("SCROLL_END"),100),[c,l]=Bp("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,r.scrollHideDelay,l]),a.useEffect(()=>{const u=r.viewport,d=s?"scrollLeft":"scrollTop";if(u){let p=u[d];const v=()=>{const m=u[d];p!==m&&(l("SCROLL"),i()),p=m};return u.addEventListener("scroll",v),()=>u.removeEventListener("scroll",v)}},[r.viewport,s,l,i]),f.jsx(Y,{present:n||c!=="hidden",children:f.jsx(Vo,{"data-state":c==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:S(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:S(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Fa=a.forwardRef((e,t)=>{const n=ue(Re,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,i]=a.useState(!1),c=e.orientation==="horizontal",l=Sn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?u:d)}},10);return ot(n.viewport,l),ot(n.content,l),f.jsx(Y,{present:o||s,children:f.jsx(Vo,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Vo=a.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ue(Re,e.__scopeScrollArea),s=a.useRef(null),i=a.useRef(0),[c,l]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Wa(c.viewport,c.content),d={...o,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:v=>i.current=v};function p(v,m){return Qp(v,i.current,c,m)}return n==="horizontal"?f.jsx(Kp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const v=r.viewport.scrollLeft,m=Rr(v,c,r.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{r.viewport&&(r.viewport.scrollLeft=v)},onDragScroll:v=>{r.viewport&&(r.viewport.scrollLeft=p(v,r.dir))}}):n==="vertical"?f.jsx(zp,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const v=r.viewport.scrollTop,m=Rr(v,c);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{r.viewport&&(r.viewport.scrollTop=v)},onDragScroll:v=>{r.viewport&&(r.viewport.scrollTop=p(v))}}):null}),Kp=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ue(Re,e.__scopeScrollArea),[i,c]=a.useState(),l=a.useRef(null),u=N(t,l,s.onScrollbarXChange);return a.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),f.jsx(Ba,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":yn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(s.viewport){const v=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),Ua(v,p)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Zt(i.paddingLeft),paddingEnd:Zt(i.paddingRight)}})}})}),zp=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ue(Re,e.__scopeScrollArea),[i,c]=a.useState(),l=a.useRef(null),u=N(t,l,s.onScrollbarYChange);return a.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),f.jsx(Ba,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":yn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(s.viewport){const v=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),Ua(v,p)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Zt(i.paddingTop),paddingEnd:Zt(i.paddingBottom)}})}})}),[Yp,Va]=ja(Re),Ba=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:p,...v}=e,m=ue(Re,n),[g,h]=a.useState(null),x=N(t,I=>h(I)),C=a.useRef(null),w=a.useRef(""),b=m.viewport,y=o.content-o.viewport,R=Q(d),P=Q(l),E=Sn(p,10);function T(I){if(C.current){const O=I.clientX-C.current.left,k=I.clientY-C.current.top;u({x:O,y:k})}}return a.useEffect(()=>{const I=O=>{const k=O.target;g?.contains(k)&&R(O,y)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,g,y,R]),a.useEffect(P,[o,P]),ot(g,E),ot(m.content,E),f.jsx(Yp,{scope:n,scrollbar:g,hasThumb:r,onThumbChange:Q(s),onThumbPointerUp:Q(i),onThumbPositionChange:P,onThumbPointerDown:Q(c),children:f.jsx(_.div,{...v,ref:x,style:{position:"absolute",...v.style},onPointerDown:S(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),C.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),T(I))}),onPointerMove:S(e.onPointerMove,T),onPointerUp:S(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),C.current=null})})})}),Xt="ScrollAreaThumb",Xp=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Va(Xt,e.__scopeScrollArea);return f.jsx(Y,{present:n||r.hasThumb,children:f.jsx(Zp,{ref:t,...o})})}),Zp=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ue(Xt,n),i=Va(Xt,n),{onThumbPositionChange:c}=i,l=N(t,p=>i.onThumbChange(p)),u=a.useRef(void 0),d=Sn(()=>{u.current&&(u.current(),u.current=void 0)},100);return a.useEffect(()=>{const p=s.viewport;if(p){const v=()=>{if(d(),!u.current){const m=Jp(p,c);u.current=m,c()}};return c(),p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[s.viewport,d,c]),f.jsx(_.div,{"data-state":i.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:S(e.onPointerDownCapture,p=>{const m=p.target.getBoundingClientRect(),g=p.clientX-m.left,h=p.clientY-m.top;i.onThumbPointerDown({x:g,y:h})}),onPointerUp:S(e.onPointerUp,i.onThumbPointerUp)})});Xp.displayName=Xt;var Bo="ScrollAreaCorner",Ha=a.forwardRef((e,t)=>{const n=ue(Bo,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?f.jsx(qp,{...e,ref:t}):null});Ha.displayName=Bo;var qp=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ue(Bo,n),[s,i]=a.useState(0),[c,l]=a.useState(0),u=!!(s&&c);return ot(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),ot(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),i(d)}),u?f.jsx(_.div,{...o,ref:t,style:{width:s,height:c,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Zt(e){return e?parseInt(e,10):0}function Wa(e,t){const n=e/t;return isNaN(n)?0:n}function yn(e){const t=Wa(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Qp(e,t,n,o="ltr"){const r=yn(n),s=r/2,i=t||s,c=r-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,p=o==="ltr"?[0,d]:[d*-1,0];return Ga([l,u],p)(e)}function Rr(e,t,n="ltr"){const o=yn(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,i=t.content-t.viewport,c=s-o,l=n==="ltr"?[0,i]:[i*-1,0],u=no(e,l);return Ga([0,i],[0,c])(u)}function Ga(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Ua(e,t){return e>0&&e<t}var Jp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,c=n.top!==s.top;(i||c)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function Sn(e,t){const n=Q(e),o=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),a.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function ot(e,t){const n=Q(t);q(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var mg=ka,gg=$a,xg=Ha;function ev(e){const t=tv(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(ov);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function tv(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=sv(r),c=rv(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nv=Symbol("radix.slottable");function ov(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nv}function rv(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function sv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var av=[" ","Enter","ArrowUp","ArrowDown"],iv=[" ","Enter"],We="Select",[Rn,En,cv]=St(We),[ct,wg]=z(We,[cv,ye]),Pn=ye(),[lv,Le]=ct(We),[uv,dv]=ct(We),Ka=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:i,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:p,disabled:v,required:m,form:g}=e,h=Pn(t),[x,C]=a.useState(null),[w,b]=a.useState(null),[y,R]=a.useState(!1),P=Te(u),[E,T]=Z({prop:o,defaultProp:r??!1,onChange:s,caller:We}),[I,O]=Z({prop:i,defaultProp:c,onChange:l,caller:We}),k=a.useRef(null),F=x?g||!!x.closest("form"):!0,[$,L]=a.useState(new Set),H=Array.from($).map(j=>j.props.value).join(";");return f.jsx(wt,{...h,children:f.jsxs(lv,{required:m,scope:t,trigger:x,onTriggerChange:C,valueNode:w,onValueNodeChange:b,valueNodeHasChildren:y,onValueNodeHasChildrenChange:R,contentId:J(),value:I,onValueChange:O,open:E,onOpenChange:T,dir:P,triggerPointerDownPosRef:k,disabled:v,children:[f.jsx(Rn.Provider,{scope:t,children:f.jsx(uv,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(j=>{L(V=>new Set(V).add(j))},[]),onNativeOptionRemove:a.useCallback(j=>{L(V=>{const D=new Set(V);return D.delete(j),D})},[]),children:n})}),F?f.jsxs(mi,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:p,value:I,onChange:j=>O(j.target.value),disabled:v,form:g,children:[I===void 0?f.jsx("option",{value:""}):null,Array.from($)]},H):null]})})};Ka.displayName=We;var za="SelectTrigger",Ya=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=Pn(n),i=Le(za,n),c=i.disabled||o,l=N(t,i.onTriggerChange),u=En(n),d=a.useRef("touch"),[p,v,m]=xi(h=>{const x=u().filter(b=>!b.disabled),C=x.find(b=>b.value===i.value),w=wi(x,h,C);w!==void 0&&i.onValueChange(w.value)}),g=h=>{c||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return f.jsx(it,{asChild:!0,...s,children:f.jsx(_.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":gi(i.value)?"":void 0,...r,ref:l,onClick:S(r.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&g(h)}),onPointerDown:S(r.onPointerDown,h=>{d.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(g(h),h.preventDefault())}),onKeyDown:S(r.onKeyDown,h=>{const x=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&v(h.key),!(x&&h.key===" ")&&av.includes(h.key)&&(g(),h.preventDefault())})})})});Ya.displayName=za;var Xa="SelectValue",Za=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:i="",...c}=e,l=Le(Xa,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,p=N(t,l.onValueNodeChange);return q(()=>{u(d)},[u,d]),f.jsx(_.span,{...c,ref:p,style:{pointerEvents:"none"},children:gi(l.value)?f.jsx(f.Fragment,{children:i}):s})});Za.displayName=Xa;var fv="SelectIcon",qa=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return f.jsx(_.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});qa.displayName=fv;var pv="SelectPortal",Qa=e=>f.jsx(rt,{asChild:!0,...e});Qa.displayName=pv;var Ge="SelectContent",Ja=a.forwardRef((e,t)=>{const n=Le(Ge,e.__scopeSelect),[o,r]=a.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?tn.createPortal(f.jsx(ei,{scope:e.__scopeSelect,children:f.jsx(Rn.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(ti,{...e,ref:t})});Ja.displayName=Ge;var fe=10,[ei,$e]=ct(Ge),vv="SelectContentImpl",hv=ev("SelectContent.RemoveScroll"),ti=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:g,hideWhenDetached:h,avoidCollisions:x,...C}=e,w=Le(Ge,n),[b,y]=a.useState(null),[R,P]=a.useState(null),E=N(t,M=>y(M)),[T,I]=a.useState(null),[O,k]=a.useState(null),F=En(n),[$,L]=a.useState(!1),H=a.useRef(!1);a.useEffect(()=>{if(b)return rn(b)},[b]),nn();const j=a.useCallback(M=>{const[W,...te]=F().map(X=>X.ref.current),[G]=te.slice(-1),U=document.activeElement;for(const X of M)if(X===U||(X?.scrollIntoView({block:"nearest"}),X===W&&R&&(R.scrollTop=0),X===G&&R&&(R.scrollTop=R.scrollHeight),X?.focus(),document.activeElement!==U))return},[F,R]),V=a.useCallback(()=>j([T,b]),[j,T,b]);a.useEffect(()=>{$&&V()},[$,V]);const{onOpenChange:D,triggerPointerDownPosRef:A}=w;a.useEffect(()=>{if(b){let M={x:0,y:0};const W=G=>{M={x:Math.abs(Math.round(G.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(G.pageY)-(A.current?.y??0))}},te=G=>{M.x<=10&&M.y<=10?G.preventDefault():b.contains(G.target)||D(!1),document.removeEventListener("pointermove",W),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",te,{capture:!0})}}},[b,D,A]),a.useEffect(()=>{const M=()=>D(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[D]);const[K,ee]=xi(M=>{const W=F().filter(U=>!U.disabled),te=W.find(U=>U.ref.current===document.activeElement),G=wi(W,M,te);G&&setTimeout(()=>G.ref.current.focus())}),de=a.useCallback((M,W,te)=>{const G=!H.current&&!te;(w.value!==void 0&&w.value===W||G)&&(I(M),G&&(H.current=!0))},[w.value]),Ee=a.useCallback(()=>b?.focus(),[b]),ie=a.useCallback((M,W,te)=>{const G=!H.current&&!te;(w.value!==void 0&&w.value===W||G)&&k(M)},[w.value]),Pe=o==="popper"?oo:ni,re=Pe===oo?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:g,hideWhenDetached:h,avoidCollisions:x}:{};return f.jsx(ei,{scope:n,content:b,viewport:R,onViewportChange:P,itemRefCallback:de,selectedItem:T,onItemLeave:Ee,itemTextRefCallback:ie,focusSelectedItem:V,selectedItemText:O,position:o,isPositioned:$,searchRef:K,children:f.jsx(gt,{as:hv,allowPinchZoom:!0,children:f.jsx(mt,{asChild:!0,trapped:w.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:S(r,M=>{w.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:f.jsx(Pe,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:M=>M.preventDefault(),...C,...re,onPlaced:()=>L(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:S(C.onKeyDown,M=>{const W=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!W&&M.key.length===1&&ee(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let G=F().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(M.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const U=M.target,X=G.indexOf(U);G=G.slice(X+1)}setTimeout(()=>j(G)),M.preventDefault()}})})})})})})});ti.displayName=vv;var mv="SelectItemAlignedPosition",ni=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Le(Ge,n),i=$e(Ge,n),[c,l]=a.useState(null),[u,d]=a.useState(null),p=N(t,E=>d(E)),v=En(n),m=a.useRef(!1),g=a.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:C,focusSelectedItem:w}=i,b=a.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&h&&x&&C){const E=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),O=C.getBoundingClientRect();if(s.dir!=="rtl"){const U=O.left-T.left,X=I.left-U,ce=E.left-X,Ve=E.width+ce,Nn=Math.max(Ve,T.width),On=window.innerWidth-fe,Dn=no(X,[fe,Math.max(fe,On-Nn)]);c.style.minWidth=Ve+"px",c.style.left=Dn+"px"}else{const U=T.right-O.right,X=window.innerWidth-I.right-U,ce=window.innerWidth-E.right-X,Ve=E.width+ce,Nn=Math.max(Ve,T.width),On=window.innerWidth-fe,Dn=no(X,[fe,Math.max(fe,On-Nn)]);c.style.minWidth=Ve+"px",c.style.right=Dn+"px"}const k=v(),F=window.innerHeight-fe*2,$=h.scrollHeight,L=window.getComputedStyle(u),H=parseInt(L.borderTopWidth,10),j=parseInt(L.paddingTop,10),V=parseInt(L.borderBottomWidth,10),D=parseInt(L.paddingBottom,10),A=H+j+$+D+V,K=Math.min(x.offsetHeight*5,A),ee=window.getComputedStyle(h),de=parseInt(ee.paddingTop,10),Ee=parseInt(ee.paddingBottom,10),ie=E.top+E.height/2-fe,Pe=F-ie,re=x.offsetHeight/2,M=x.offsetTop+re,W=H+j+M,te=A-W;if(W<=ie){const U=k.length>0&&x===k[k.length-1].ref.current;c.style.bottom="0px";const X=u.clientHeight-h.offsetTop-h.offsetHeight,ce=Math.max(Pe,re+(U?Ee:0)+X+V),Ve=W+ce;c.style.height=Ve+"px"}else{const U=k.length>0&&x===k[0].ref.current;c.style.top="0px";const ce=Math.max(ie,H+h.offsetTop+(U?de:0)+re)+te;c.style.height=ce+"px",h.scrollTop=W-ie+h.offsetTop}c.style.margin=`${fe}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=F+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[v,s.trigger,s.valueNode,c,u,h,x,C,s.dir,o]);q(()=>b(),[b]);const[y,R]=a.useState();q(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const P=a.useCallback(E=>{E&&g.current===!0&&(b(),w?.(),g.current=!1)},[b,w]);return f.jsx(xv,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:P,children:f.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:f.jsx(_.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ni.displayName=mv;var gv="SelectPopperPosition",oo=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=fe,...s}=e,i=Pn(n);return f.jsx(Ct,{...i,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oo.displayName=gv;var[xv,Ho]=ct(Ge,{}),ro="SelectViewport",oi=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=$e(ro,n),i=Ho(ro,n),c=N(t,s.onViewportChange),l=a.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),f.jsx(Rn.Slot,{scope:n,children:f.jsx(_.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:S(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=i;if(v?.current&&p){const m=Math.abs(l.current-d.scrollTop);if(m>0){const g=window.innerHeight-fe*2,h=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),C=Math.max(h,x);if(C<g){const w=C+m,b=Math.min(g,w),y=w-b;p.style.height=b+"px",p.style.bottom==="0px"&&(d.scrollTop=y>0?y:0,p.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});oi.displayName=ro;var ri="SelectGroup",[wv,Cv]=ct(ri),si=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=J();return f.jsx(wv,{scope:n,id:r,children:f.jsx(_.div,{role:"group","aria-labelledby":r,...o,ref:t})})});si.displayName=ri;var ai="SelectLabel",ii=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Cv(ai,n);return f.jsx(_.div,{id:r.id,...o,ref:t})});ii.displayName=ai;var qt="SelectItem",[bv,ci]=ct(qt),li=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...i}=e,c=Le(qt,n),l=$e(qt,n),u=c.value===o,[d,p]=a.useState(s??""),[v,m]=a.useState(!1),g=N(t,w=>l.itemRefCallback?.(w,o,r)),h=J(),x=a.useRef("touch"),C=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(bv,{scope:n,value:o,disabled:r,textId:h,isSelected:u,onItemTextChange:a.useCallback(w=>{p(b=>b||(w?.textContent??"").trim())},[]),children:f.jsx(Rn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:f.jsx(_.div,{role:"option","aria-labelledby":h,"data-highlighted":v?"":void 0,"aria-selected":u&&v,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:g,onFocus:S(i.onFocus,()=>m(!0)),onBlur:S(i.onBlur,()=>m(!1)),onClick:S(i.onClick,()=>{x.current!=="mouse"&&C()}),onPointerUp:S(i.onPointerUp,()=>{x.current==="mouse"&&C()}),onPointerDown:S(i.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:S(i.onPointerMove,w=>{x.current=w.pointerType,r?l.onItemLeave?.():x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:S(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:S(i.onKeyDown,w=>{l.searchRef?.current!==""&&w.key===" "||(iv.includes(w.key)&&C(),w.key===" "&&w.preventDefault())})})})})});li.displayName=qt;var lt="SelectItemText",ui=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,i=Le(lt,n),c=$e(lt,n),l=ci(lt,n),u=dv(lt,n),[d,p]=a.useState(null),v=N(t,C=>p(C),l.onItemTextChange,C=>c.itemTextRefCallback?.(C,l.value,l.disabled)),m=d?.textContent,g=a.useMemo(()=>f.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=u;return q(()=>(h(g),()=>x(g)),[h,x,g]),f.jsxs(f.Fragment,{children:[f.jsx(_.span,{id:l.textId,...s,ref:v}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?tn.createPortal(s.children,i.valueNode):null]})});ui.displayName=lt;var di="SelectItemIndicator",fi=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return ci(di,n).isSelected?f.jsx(_.span,{"aria-hidden":!0,...o,ref:t}):null});fi.displayName=di;var so="SelectScrollUpButton",pi=a.forwardRef((e,t)=>{const n=$e(so,e.__scopeSelect),o=Ho(so,e.__scopeSelect),[r,s]=a.useState(!1),i=N(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?f.jsx(hi,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});pi.displayName=so;var ao="SelectScrollDownButton",vi=a.forwardRef((e,t)=>{const n=$e(ao,e.__scopeSelect),o=Ho(ao,e.__scopeSelect),[r,s]=a.useState(!1),i=N(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?f.jsx(hi,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});vi.displayName=ao;var hi=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=$e("SelectScrollButton",n),i=a.useRef(null),c=En(n),l=a.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>l(),[l]),q(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),f.jsx(_.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:S(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:S(r.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:S(r.onPointerLeave,()=>{l()})})}),yv="SelectSeparator",Sv=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return f.jsx(_.div,{"aria-hidden":!0,...o,ref:t})});Sv.displayName=yv;var io="SelectArrow",Rv=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Pn(n),s=Le(io,n),i=$e(io,n);return s.open&&i.position==="popper"?f.jsx(bt,{...r,...o,ref:t}):null});Rv.displayName=io;var Ev="SelectBubbleInput",mi=a.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=a.useRef(null),s=N(o,r),i=mn(t);return a.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const p=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(p)}},[i,t]),f.jsx(_.select,{...n,style:{...Rs,...n.style},ref:s,defaultValue:t})});mi.displayName=Ev;function gi(e){return e===""||e===void 0}function xi(e){const t=Q(e),n=a.useRef(""),o=a.useRef(0),r=a.useCallback(i=>{const c=n.current+i;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=a.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function wi(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Pv(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Pv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Cg=Ka,bg=Ya,yg=Za,Sg=qa,Rg=Qa,Eg=Ja,Pg=oi,Ag=si,_g=ii,Tg=li,Mg=ui,Ig=fi,Ng=pi,Og=vi,Av=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_v=Av.reduce((e,t)=>{const n=vo(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Tv="Label",Ci=a.forwardRef((e,t)=>f.jsx(_v.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ci.displayName=Tv;var Dg=Ci,An="Switch",[Mv,jg]=z(An),[Iv,Nv]=Mv(An),bi=a.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:i,disabled:c,value:l="on",onCheckedChange:u,form:d,...p}=e,[v,m]=a.useState(null),g=N(t,b=>m(b)),h=a.useRef(!1),x=v?d||!!v.closest("form"):!0,[C,w]=Z({prop:r,defaultProp:s??!1,onChange:u,caller:An});return f.jsxs(Iv,{scope:n,checked:C,disabled:c,children:[f.jsx(_.button,{type:"button",role:"switch","aria-checked":C,"aria-required":i,"data-state":Ei(C),"data-disabled":c?"":void 0,disabled:c,value:l,...p,ref:g,onClick:S(e.onClick,b=>{w(y=>!y),x&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),x&&f.jsx(Ri,{control:v,bubbles:!h.current,name:o,value:l,checked:C,required:i,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});bi.displayName=An;var yi="SwitchThumb",Si=a.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Nv(yi,n);return f.jsx(_.span,{"data-state":Ei(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});Si.displayName=yi;var Ov="SwitchBubbleInput",Ri=a.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const i=a.useRef(null),c=N(i,s),l=mn(n),u=un(t);return a.useEffect(()=>{const d=i.current;if(!d)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const g=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(g)}},[l,n,o]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ri.displayName=Ov;function Ei(e){return e?"checked":"unchecked"}var kg=bi,Lg=Si;function Dv(e){const t=jv(e),n=a.forwardRef((o,r)=>{const{children:s,...i}=o,c=a.Children.toArray(s),l=c.find(Lv);if(l){const u=l.props.children,d=c.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...i,ref:r,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function jv(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const i=Fv(r),c=$v(s,r.props);return r.type!==a.Fragment&&(c.ref=o?Ce(o,i):i),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kv=Symbol("radix.slottable");function Lv(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kv}function $v(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Fv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var co=["Enter"," "],Vv=["ArrowDown","PageUp","Home"],Pi=["ArrowUp","PageDown","End"],Bv=[...Vv,...Pi],Hv={ltr:[...co,"ArrowRight"],rtl:[...co,"ArrowLeft"]},Wv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_t="Menu",[vt,Gv,Uv]=St(_t),[Ke,Wo]=z(_t,[Uv,ye,Se]),_n=ye(),Ai=Se(),[Kv,ze]=Ke(_t),[zv,Tt]=Ke(_t),_i=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,c=_n(t),[l,u]=a.useState(null),d=a.useRef(!1),p=Q(s),v=Te(r);return a.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),f.jsx(wt,{...c,children:f.jsx(Kv,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u,children:f.jsx(zv,{scope:t,onClose:a.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:v,modal:i,children:o})})})};_i.displayName=_t;var Yv="MenuAnchor",Go=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=_n(n);return f.jsx(it,{...r,...o,ref:t})});Go.displayName=Yv;var Uo="MenuPortal",[Xv,Ti]=Ke(Uo,{forceMount:void 0}),Mi=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=ze(Uo,t);return f.jsx(Xv,{scope:t,forceMount:n,children:f.jsx(Y,{present:n||s.open,children:f.jsx(rt,{asChild:!0,container:r,children:o})})})};Mi.displayName=Uo;var le="MenuContent",[Zv,Ko]=Ke(le),Ii=a.forwardRef((e,t)=>{const n=Ti(le,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ze(le,e.__scopeMenu),i=Tt(le,e.__scopeMenu);return f.jsx(vt.Provider,{scope:e.__scopeMenu,children:f.jsx(Y,{present:o||s.open,children:f.jsx(vt.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(qv,{...r,ref:t}):f.jsx(Qv,{...r,ref:t})})})})}),qv=a.forwardRef((e,t)=>{const n=ze(le,e.__scopeMenu),o=a.useRef(null),r=N(t,o);return a.useEffect(()=>{const s=o.current;if(s)return rn(s)},[]),f.jsx(zo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Qv=a.forwardRef((e,t)=>{const n=ze(le,e.__scopeMenu);return f.jsx(zo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Jv=Dv("MenuContent.ScrollLock"),zo=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:v,onDismiss:m,disableOutsideScroll:g,...h}=e,x=ze(le,n),C=Tt(le,n),w=_n(n),b=Ai(n),y=Gv(n),[R,P]=a.useState(null),E=a.useRef(null),T=N(t,E,x.onContentChange),I=a.useRef(0),O=a.useRef(""),k=a.useRef(0),F=a.useRef(null),$=a.useRef("right"),L=a.useRef(0),H=g?gt:a.Fragment,j=g?{as:Jv,allowPinchZoom:!0}:void 0,V=A=>{const K=O.current+A,ee=y().filter(M=>!M.disabled),de=document.activeElement,Ee=ee.find(M=>M.ref.current===de)?.textValue,ie=ee.map(M=>M.textValue),Pe=dh(ie,K,Ee),re=ee.find(M=>M.textValue===Pe)?.ref.current;(function M(W){O.current=W,window.clearTimeout(I.current),W!==""&&(I.current=window.setTimeout(()=>M(""),1e3))})(K),re&&setTimeout(()=>re.focus())};a.useEffect(()=>()=>window.clearTimeout(I.current),[]),nn();const D=a.useCallback(A=>$.current===F.current?.side&&ph(A,F.current?.area),[]);return f.jsx(Zv,{scope:n,searchRef:O,onItemEnter:a.useCallback(A=>{D(A)&&A.preventDefault()},[D]),onItemLeave:a.useCallback(A=>{D(A)||(E.current?.focus(),P(null))},[D]),onTriggerLeave:a.useCallback(A=>{D(A)&&A.preventDefault()},[D]),pointerGraceTimerRef:k,onPointerGraceIntentChange:a.useCallback(A=>{F.current=A},[]),children:f.jsx(H,{...j,children:f.jsx(mt,{asChild:!0,trapped:r,onMountAutoFocus:S(s,A=>{A.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Ue,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:v,onDismiss:m,children:f.jsx(Et,{asChild:!0,...b,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:P,onEntryFocus:S(l,A=>{C.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(Ct,{role:"menu","aria-orientation":"vertical","data-state":zi(x.open),"data-radix-menu-content":"",dir:C.dir,...w,...h,ref:T,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,A=>{const ee=A.target.closest("[data-radix-menu-content]")===A.currentTarget,de=A.ctrlKey||A.altKey||A.metaKey,Ee=A.key.length===1;ee&&(A.key==="Tab"&&A.preventDefault(),!de&&Ee&&V(A.key));const ie=E.current;if(A.target!==ie||!Bv.includes(A.key))return;A.preventDefault();const re=y().filter(M=>!M.disabled).map(M=>M.ref.current);Pi.includes(A.key)&&re.reverse(),lh(re)}),onBlur:S(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:S(e.onPointerMove,ht(A=>{const K=A.target,ee=L.current!==A.clientX;if(A.currentTarget.contains(K)&&ee){const de=A.clientX>L.current?"right":"left";$.current=de,L.current=A.clientX}}))})})})})})})});Ii.displayName=le;var eh="MenuGroup",Yo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(_.div,{role:"group",...o,ref:t})});Yo.displayName=eh;var th="MenuLabel",Ni=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(_.div,{...o,ref:t})});Ni.displayName=th;var Qt="MenuItem",Er="menu.itemSelect",Tn=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=a.useRef(null),i=Tt(Qt,e.__scopeMenu),c=Ko(Qt,e.__scopeMenu),l=N(t,s),u=a.useRef(!1),d=()=>{const p=s.current;if(!n&&p){const v=new CustomEvent(Er,{bubbles:!0,cancelable:!0});p.addEventListener(Er,m=>o?.(m),{once:!0}),Tr(p,v),v.defaultPrevented?u.current=!1:i.onClose()}};return f.jsx(Oi,{...r,ref:l,disabled:n,onClick:S(e.onClick,d),onPointerDown:p=>{e.onPointerDown?.(p),u.current=!0},onPointerUp:S(e.onPointerUp,p=>{u.current||p.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,p=>{const v=c.searchRef.current!=="";n||v&&p.key===" "||co.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Tn.displayName=Qt;var Oi=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=Ko(Qt,n),c=Ai(n),l=a.useRef(null),u=N(t,l),[d,p]=a.useState(!1),[v,m]=a.useState("");return a.useEffect(()=>{const g=l.current;g&&m((g.textContent??"").trim())},[s.children]),f.jsx(vt.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:f.jsx(Pt,{asChild:!0,...c,focusable:!o,children:f.jsx(_.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:S(e.onPointerMove,ht(g=>{o?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,ht(g=>i.onItemLeave(g))),onFocus:S(e.onFocus,()=>p(!0)),onBlur:S(e.onBlur,()=>p(!1))})})})}),nh="MenuCheckboxItem",Di=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return f.jsx(Fi,{scope:e.__scopeMenu,checked:n,children:f.jsx(Tn,{role:"menuitemcheckbox","aria-checked":Jt(n)?"mixed":n,...r,ref:t,"data-state":Zo(n),onSelect:S(r.onSelect,()=>o?.(Jt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Di.displayName=nh;var ji="MenuRadioGroup",[oh,rh]=Ke(ji,{value:void 0,onValueChange:()=>{}}),ki=a.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Q(o);return f.jsx(oh,{scope:e.__scopeMenu,value:n,onValueChange:s,children:f.jsx(Yo,{...r,ref:t})})});ki.displayName=ji;var Li="MenuRadioItem",$i=a.forwardRef((e,t)=>{const{value:n,...o}=e,r=rh(Li,e.__scopeMenu),s=n===r.value;return f.jsx(Fi,{scope:e.__scopeMenu,checked:s,children:f.jsx(Tn,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Zo(s),onSelect:S(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});$i.displayName=Li;var Xo="MenuItemIndicator",[Fi,sh]=Ke(Xo,{checked:!1}),Vi=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=sh(Xo,n);return f.jsx(Y,{present:o||Jt(s.checked)||s.checked===!0,children:f.jsx(_.span,{...r,ref:t,"data-state":Zo(s.checked)})})});Vi.displayName=Xo;var ah="MenuSeparator",Bi=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return f.jsx(_.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Bi.displayName=ah;var ih="MenuArrow",Hi=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=_n(n);return f.jsx(bt,{...r,...o,ref:t})});Hi.displayName=ih;var ch="MenuSub",[$g,Wi]=Ke(ch),ut="MenuSubTrigger",Gi=a.forwardRef((e,t)=>{const n=ze(ut,e.__scopeMenu),o=Tt(ut,e.__scopeMenu),r=Wi(ut,e.__scopeMenu),s=Ko(ut,e.__scopeMenu),i=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),l(null)}},[c,l]),f.jsx(Go,{asChild:!0,...u,children:f.jsx(Oi,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":zi(n.open),...e,ref:Ce(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,ht(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:S(e.onPointerLeave,ht(p=>{d();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,g=m==="right",h=g?-5:5,x=v[g?"left":"right"],C=v[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+h,y:p.clientY},{x,y:v.top},{x:C,y:v.top},{x:C,y:v.bottom},{x,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,p=>{const v=s.searchRef.current!=="";e.disabled||v&&p.key===" "||Hv[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});Gi.displayName=ut;var Ui="MenuSubContent",Ki=a.forwardRef((e,t)=>{const n=Ti(le,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ze(le,e.__scopeMenu),i=Tt(le,e.__scopeMenu),c=Wi(Ui,e.__scopeMenu),l=a.useRef(null),u=N(t,l);return f.jsx(vt.Provider,{scope:e.__scopeMenu,children:f.jsx(Y,{present:o||s.open,children:f.jsx(vt.Slot,{scope:e.__scopeMenu,children:f.jsx(zo,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:S(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:S(e.onKeyDown,d=>{const p=d.currentTarget.contains(d.target),v=Wv[i.dir].includes(d.key);p&&v&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});Ki.displayName=Ui;function zi(e){return e?"open":"closed"}function Jt(e){return e==="indeterminate"}function Zo(e){return Jt(e)?"indeterminate":e?"checked":"unchecked"}function lh(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function dh(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=uh(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function fh(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],l=t[i],u=c.x,d=c.y,p=l.x,v=l.y;d>o!=v>o&&n<(p-u)*(o-d)/(v-d)+u&&(r=!r)}return r}function ph(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fh(n,t)}function ht(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Yi=_i,Xi=Go,Zi=Mi,qi=Ii,Qi=Yo,Ji=Ni,ec=Tn,tc=Di,nc=ki,oc=$i,rc=Vi,sc=Bi,ac=Hi,ic=Gi,cc=Ki,Mn="DropdownMenu",[vh,Fg]=z(Mn,[Wo]),ne=Wo(),[hh,lc]=vh(Mn),uc=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,l=ne(t),u=a.useRef(null),[d,p]=Z({prop:r,defaultProp:s??!1,onChange:i,caller:Mn});return f.jsx(hh,{scope:t,triggerId:J(),triggerRef:u,contentId:J(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(v=>!v),[p]),modal:c,children:f.jsx(Yi,{...l,open:d,onOpenChange:p,dir:o,modal:c,children:n})})};uc.displayName=Mn;var dc="DropdownMenuTrigger",fc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=lc(dc,n),i=ne(n);return f.jsx(Xi,{asChild:!0,...i,children:f.jsx(_.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ce(t,s.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});fc.displayName=dc;var mh="DropdownMenuPortal",pc=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ne(t);return f.jsx(Zi,{...o,...n})};pc.displayName=mh;var vc="DropdownMenuContent",hc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=lc(vc,n),s=ne(n),i=a.useRef(!1);return f.jsx(qi,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hc.displayName=vc;var gh="DropdownMenuGroup",mc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(Qi,{...r,...o,ref:t})});mc.displayName=gh;var xh="DropdownMenuLabel",gc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(Ji,{...r,...o,ref:t})});gc.displayName=xh;var wh="DropdownMenuItem",xc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(ec,{...r,...o,ref:t})});xc.displayName=wh;var Ch="DropdownMenuCheckboxItem",bh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(tc,{...r,...o,ref:t})});bh.displayName=Ch;var yh="DropdownMenuRadioGroup",Sh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(nc,{...r,...o,ref:t})});Sh.displayName=yh;var Rh="DropdownMenuRadioItem",Eh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(oc,{...r,...o,ref:t})});Eh.displayName=Rh;var Ph="DropdownMenuItemIndicator",Ah=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(rc,{...r,...o,ref:t})});Ah.displayName=Ph;var _h="DropdownMenuSeparator",wc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(sc,{...r,...o,ref:t})});wc.displayName=_h;var Th="DropdownMenuArrow",Mh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(ac,{...r,...o,ref:t})});Mh.displayName=Th;var Ih="DropdownMenuSubTrigger",Nh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(ic,{...r,...o,ref:t})});Nh.displayName=Ih;var Oh="DropdownMenuSubContent",Dh=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ne(n);return f.jsx(cc,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dh.displayName=Oh;var Vg=uc,Bg=fc,Hg=pc,Wg=hc,Gg=mc,Ug=gc,Kg=xc,zg=wc,jh=Symbol("radix.slottable");function kh(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jh,t}var Cc="AlertDialog",[Lh,Yg]=z(Cc,[Hr]),Me=Hr(),bc=e=>{const{__scopeAlertDialog:t,...n}=e,o=Me(t);return f.jsx(ed,{...o,...n,modal:!0})};bc.displayName=Cc;var $h="AlertDialogTrigger",Fh=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(td,{...r,...o,ref:t})});Fh.displayName=$h;var Vh="AlertDialogPortal",yc=e=>{const{__scopeAlertDialog:t,...n}=e,o=Me(t);return f.jsx(nd,{...o,...n})};yc.displayName=Vh;var Bh="AlertDialogOverlay",Sc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(od,{...r,...o,ref:t})});Sc.displayName=Bh;var Je="AlertDialogContent",[Hh,Wh]=Lh(Je),Gh=kh("AlertDialogContent"),Rc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Me(n),i=a.useRef(null),c=N(t,i),l=a.useRef(null);return f.jsx(Zu,{contentName:Je,titleName:Ec,docsSlug:"alert-dialog",children:f.jsx(Hh,{scope:n,cancelRef:l,children:f.jsxs(rd,{role:"alertdialog",...s,...r,ref:c,onOpenAutoFocus:S(r.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[f.jsx(Gh,{children:o}),f.jsx(Kh,{contentRef:i})]})})})});Rc.displayName=Je;var Ec="AlertDialogTitle",Pc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(sd,{...r,...o,ref:t})});Pc.displayName=Ec;var Ac="AlertDialogDescription",_c=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(ad,{...r,...o,ref:t})});_c.displayName=Ac;var Uh="AlertDialogAction",Tc=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Me(n);return f.jsx(rs,{...r,...o,ref:t})});Tc.displayName=Uh;var Mc="AlertDialogCancel",Ic=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=Wh(Mc,n),s=Me(n),i=N(t,r);return f.jsx(rs,{...s,...o,ref:i})});Ic.displayName=Mc;var Kh=({contentRef:e})=>{const t=`\`${Je}\` requires a description for the component to be accessible for screen reader users.
|
|
46
46
|
|
|
47
|
-
You can add a description to the \`${Je}\` by passing a \`${
|
|
47
|
+
You can add a description to the \`${Je}\` by passing a \`${Ac}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
48
48
|
|
|
49
49
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Je}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
50
|
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Yg=Cc,Xg=bc,Zg=yc,qg=Sc,Qg=_c,Jg=Mc,ex=Ec,tx=Ac,qo="Radio",[zh,Ic]=z(qo),[Yh,Xh]=zh(qo),Nc=a.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:s,disabled:i,value:c="on",onCheck:l,form:u,...d}=e,[p,v]=a.useState(null),m=N(t,x=>v(x)),g=a.useRef(!1),h=p?u||!!p.closest("form"):!0;return f.jsxs(Yh,{scope:n,checked:r,disabled:i,children:[f.jsx(_.button,{type:"button",role:"radio","aria-checked":r,"data-state":kc(r),"data-disabled":i?"":void 0,disabled:i,value:c,...d,ref:m,onClick:S(e.onClick,x=>{r||l?.(),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&f.jsx(jc,{control:p,bubbles:!g.current,name:o,value:c,checked:r,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Nc.displayName=qo;var Oc="RadioIndicator",Dc=a.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,s=Xh(Oc,n);return f.jsx(Y,{present:o||s.checked,children:f.jsx(_.span,{"data-state":kc(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});Dc.displayName=Oc;var Zh="RadioBubbleInput",jc=a.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const i=a.useRef(null),c=N(i,s),l=mn(n),u=un(t);return a.useEffect(()=>{const d=i.current;if(!d)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const g=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(g)}},[l,n,o]),f.jsx(_.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jc.displayName=Zh;function kc(e){return e?"checked":"unchecked"}var qh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],In="RadioGroup",[Qh,nx]=z(In,[Se,Ic]),Lc=Se(),$c=Ic(),[Jh,em]=Qh(In),Fc=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:s,required:i=!1,disabled:c=!1,orientation:l,dir:u,loop:d=!0,onValueChange:p,...v}=e,m=Lc(n),g=Te(u),[h,x]=Z({prop:s,defaultProp:r??null,onChange:p,caller:In});return f.jsx(Jh,{scope:n,name:o,required:i,disabled:c,value:h,onValueChange:x,children:f.jsx(Et,{asChild:!0,...m,orientation:l,dir:g,loop:d,children:f.jsx(_.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":c?"":void 0,dir:g,...v,ref:t})})})});Fc.displayName=In;var Vc="RadioGroupItem",Bc=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,s=em(Vc,n),i=s.disabled||o,c=Lc(n),l=$c(n),u=a.useRef(null),d=N(t,u),p=s.value===r.value,v=a.useRef(!1);return a.useEffect(()=>{const m=h=>{qh.includes(h.key)&&(v.current=!0)},g=()=>v.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",g)}},[]),f.jsx(Pt,{asChild:!0,...c,focusable:!i,active:p,children:f.jsx(Nc,{disabled:i,required:s.required,checked:p,...l,...r,name:s.name,ref:d,onCheck:()=>s.onValueChange(r.value),onKeyDown:S(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:S(r.onFocus,()=>{v.current&&u.current?.click()})})})});Bc.displayName=Vc;var tm="RadioGroupIndicator",Hc=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=$c(n);return f.jsx(Dc,{...r,...o,ref:t})});Hc.displayName=tm;var ox=Fc,rx=Bc,sx=Hc,Wc="Toggle",Gc=a.forwardRef((e,t)=>{const{pressed:n,defaultPressed:o,onPressedChange:r,...s}=e,[i,c]=Z({prop:n,onChange:r,defaultProp:o??!1,caller:Wc});return f.jsx(_.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:S(e.onClick,()=>{e.disabled||c(!i)})})});Gc.displayName=Wc;var Fe="ToggleGroup",[Uc,ax]=z(Fe,[Se]),Kc=Se(),Qo=B.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return f.jsx(nm,{...r,ref:t})}if(n==="multiple"){const r=o;return f.jsx(om,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Fe}\``)});Qo.displayName=Fe;var[zc,Yc]=Uc(Fe),nm=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,c]=Z({prop:n,defaultProp:o??"",onChange:r,caller:Fe});return f.jsx(zc,{scope:e.__scopeToggleGroup,type:"single",value:B.useMemo(()=>i?[i]:[],[i]),onItemActivate:c,onItemDeactivate:B.useCallback(()=>c(""),[c]),children:f.jsx(Xc,{...s,ref:t})})}),om=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,c]=Z({prop:n,defaultProp:o??[],onChange:r,caller:Fe}),l=B.useCallback(d=>c((p=[])=>[...p,d]),[c]),u=B.useCallback(d=>c((p=[])=>p.filter(v=>v!==d)),[c]);return f.jsx(zc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:l,onItemDeactivate:u,children:f.jsx(Xc,{...s,ref:t})})});Qo.displayName=Fe;var[rm,sm]=Uc(Fe),Xc=B.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:s,dir:i,loop:c=!0,...l}=e,u=Kc(n),d=Te(i),p={role:"group",dir:d,...l};return f.jsx(rm,{scope:n,rovingFocus:r,disabled:o,children:r?f.jsx(Et,{asChild:!0,...u,orientation:s,dir:d,loop:c,children:f.jsx(_.div,{...p,ref:t})}):f.jsx(_.div,{...p,ref:t})})}),en="ToggleGroupItem",Zc=B.forwardRef((e,t)=>{const n=Yc(en,e.__scopeToggleGroup),o=sm(en,e.__scopeToggleGroup),r=Kc(e.__scopeToggleGroup),s=n.value.includes(e.value),i=o.disabled||e.disabled,c={...e,pressed:s,disabled:i},l=B.useRef(null);return o.rovingFocus?f.jsx(Pt,{asChild:!0,...r,focusable:!i,active:s,ref:l,children:f.jsx(Pr,{...c,ref:t})}):f.jsx(Pr,{...c,ref:t})});Zc.displayName=en;var Pr=B.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,s=Yc(en,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=s.type==="single"?i:void 0;return f.jsx(Gc,{...c,...r,ref:t,onPressedChange:l=>{l?s.onItemActivate(o):s.onItemDeactivate(o)}})}),ix=Qo,cx=Zc,Mt="Menubar",[lo,am,im]=St(Mt),[qc,lx]=z(Mt,[im,Se]),oe=Wo(),Qc=Se(),[cm,Jo]=qc(Mt),Jc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,value:o,onValueChange:r,defaultValue:s,loop:i=!0,dir:c,...l}=e,u=Te(c),d=Qc(n),[p,v]=Z({prop:o,onChange:r,defaultProp:s??"",caller:Mt}),[m,g]=a.useState(null);return f.jsx(cm,{scope:n,value:p,onMenuOpen:a.useCallback(h=>{v(h),g(h)},[v]),onMenuClose:a.useCallback(()=>v(""),[v]),onMenuToggle:a.useCallback(h=>{v(x=>x?"":h),g(h)},[v]),dir:u,loop:i,children:f.jsx(lo.Provider,{scope:n,children:f.jsx(lo.Slot,{scope:n,children:f.jsx(Et,{asChild:!0,...d,orientation:"horizontal",loop:i,dir:u,currentTabStopId:m,onCurrentTabStopIdChange:g,children:f.jsx(_.div,{role:"menubar",...l,ref:t})})})})})});Jc.displayName=Mt;var er="MenubarMenu",[lm,el]=qc(er),tl=e=>{const{__scopeMenubar:t,value:n,...o}=e,r=J(),s=n||r||"LEGACY_REACT_AUTO_VALUE",i=Jo(er,t),c=oe(t),l=a.useRef(null),u=a.useRef(!1),d=i.value===s;return a.useEffect(()=>{d||(u.current=!1)},[d]),f.jsx(lm,{scope:t,value:s,triggerId:J(),triggerRef:l,contentId:J(),wasKeyboardTriggerOpenRef:u,children:f.jsx(zi,{...c,open:d,onOpenChange:p=>{p||i.onMenuClose()},modal:!1,dir:i.dir,...o})})};tl.displayName=er;var uo="MenubarTrigger",nl=a.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:o=!1,...r}=e,s=Qc(n),i=oe(n),c=Jo(uo,n),l=el(uo,n),u=a.useRef(null),d=N(t,u,l.triggerRef),[p,v]=a.useState(!1),m=c.value===l.value;return f.jsx(lo.ItemSlot,{scope:n,value:l.value,disabled:o,children:f.jsx(Pt,{asChild:!0,...s,focusable:!o,tabStopId:l.value,children:f.jsx(Yi,{asChild:!0,...i,children:f.jsx(_.button,{type:"button",role:"menuitem",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?l.contentId:void 0,"data-highlighted":p?"":void 0,"data-state":m?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:d,onPointerDown:S(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(c.onMenuOpen(l.value),m||g.preventDefault())}),onPointerEnter:S(e.onPointerEnter,()=>{c.value&&!m&&(c.onMenuOpen(l.value),u.current?.focus())}),onKeyDown:S(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&c.onMenuToggle(l.value),g.key==="ArrowDown"&&c.onMenuOpen(l.value),["Enter"," ","ArrowDown"].includes(g.key)&&(l.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:S(e.onFocus,()=>v(!0)),onBlur:S(e.onBlur,()=>v(!1))})})})})});nl.displayName=uo;var um="MenubarPortal",ol=e=>{const{__scopeMenubar:t,...n}=e,o=oe(t);return f.jsx(Xi,{...o,...n})};ol.displayName=um;var fo="MenubarContent",rl=a.forwardRef((e,t)=>{const{__scopeMenubar:n,align:o="start",...r}=e,s=oe(n),i=Jo(fo,n),c=el(fo,n),l=am(n),u=a.useRef(!1);return f.jsx(Zi,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...r,ref:t,align:o,onCloseAutoFocus:S(e.onCloseAutoFocus,d=>{!i.value&&!u.current&&c.triggerRef.current?.focus(),u.current=!1,d.preventDefault()}),onFocusOutside:S(e.onFocusOutside,d=>{const p=d.target;l().some(m=>m.ref.current?.contains(p))&&d.preventDefault()}),onInteractOutside:S(e.onInteractOutside,()=>{u.current=!0}),onEntryFocus:d=>{c.wasKeyboardTriggerOpenRef.current||d.preventDefault()},onKeyDown:S(e.onKeyDown,d=>{if(["ArrowRight","ArrowLeft"].includes(d.key)){const p=d.target,v=p.hasAttribute("data-radix-menubar-subtrigger"),m=p.closest("[data-radix-menubar-content]")!==d.currentTarget,h=(i.dir==="rtl"?"ArrowRight":"ArrowLeft")===d.key;if(!h&&v||m&&h)return;let w=l().filter(R=>!R.disabled).map(R=>R.value);h&&w.reverse();const b=w.indexOf(c.value);w=i.loop?Nm(w,b+1):w.slice(b+1);const[y]=w;y&&i.onMenuOpen(y)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});rl.displayName=fo;var dm="MenubarGroup",fm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(qi,{...r,...o,ref:t})});fm.displayName=dm;var pm="MenubarLabel",vm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(Qi,{...r,...o,ref:t})});vm.displayName=pm;var hm="MenubarItem",sl=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(Ji,{...r,...o,ref:t})});sl.displayName=hm;var mm="MenubarCheckboxItem",gm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(ec,{...r,...o,ref:t})});gm.displayName=mm;var xm="MenubarRadioGroup",wm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(tc,{...r,...o,ref:t})});wm.displayName=xm;var Cm="MenubarRadioItem",bm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(nc,{...r,...o,ref:t})});bm.displayName=Cm;var ym="MenubarItemIndicator",Sm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(oc,{...r,...o,ref:t})});Sm.displayName=ym;var Rm="MenubarSeparator",Em=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(rc,{...r,...o,ref:t})});Em.displayName=Rm;var Pm="MenubarArrow",Am=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(sc,{...r,...o,ref:t})});Am.displayName=Pm;var _m="MenubarSubTrigger",Tm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(ac,{"data-radix-menubar-subtrigger":"",...r,...o,ref:t})});Tm.displayName=_m;var Mm="MenubarSubContent",Im=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(ic,{...r,"data-radix-menubar-content":"",...o,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});Im.displayName=Mm;function Nm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ux=Jc,dx=tl,fx=nl,px=ol,vx=rl,hx=sl;export{Eg as $,Wm as A,dg as B,od as C,sd as D,fg as E,pg as F,hg as G,zm as H,Km as I,gg as J,Wp as K,ag as L,Xp as M,ng as N,nd as O,td as P,wg as Q,jm as R,Dm as S,Vm as T,Cg as U,mg as V,yg as W,bg as X,Sg as Y,Rg as Z,km as _,ge as a,_g as a0,Mg as a1,Tg as a2,Ig as a3,Ng as a4,Pg as a5,Ag as a6,Og as a7,jg as a8,kg as a9,dx as aA,fx as aB,vx as aC,hx as aD,px as aE,Qg as aa,Yg as ab,qg as ac,ex as ad,tx as ae,Jg as af,Xg as ag,Zg as ah,Ur as ai,ox as aj,rx as ak,sx as al,Fg as am,Vg as an,Bg as ao,Hg as ap,Gg as aq,Ug as ar,Kg as as,Wg as at,Ff as au,Vf as av,Bf as aw,ix as ax,cx as ay,ux as az,Ql as b,Ju as c,rs as d,$m as e,Fm as f,Bm as g,Hm as h,Um as i,Ym as j,Xm as k,tp as l,np as m,Jm as n,eg as o,tg as p,og as q,ed as r,rd as s,sg as t,ig as u,cg as v,J as w,_ as x,Ce as y,ug as z};
|
|
52
|
-
//# sourceMappingURL=vendor-radix-
|
|
51
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Xg=bc,Zg=yc,qg=Sc,Qg=Rc,Jg=Tc,ex=Ic,tx=Pc,nx=_c,qo="Radio",[zh,Nc]=z(qo),[Yh,Xh]=zh(qo),Oc=a.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:s,disabled:i,value:c="on",onCheck:l,form:u,...d}=e,[p,v]=a.useState(null),m=N(t,x=>v(x)),g=a.useRef(!1),h=p?u||!!p.closest("form"):!0;return f.jsxs(Yh,{scope:n,checked:r,disabled:i,children:[f.jsx(_.button,{type:"button",role:"radio","aria-checked":r,"data-state":Lc(r),"data-disabled":i?"":void 0,disabled:i,value:c,...d,ref:m,onClick:S(e.onClick,x=>{r||l?.(),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&f.jsx(kc,{control:p,bubbles:!g.current,name:o,value:c,checked:r,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Oc.displayName=qo;var Dc="RadioIndicator",jc=a.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,s=Xh(Dc,n);return f.jsx(Y,{present:o||s.checked,children:f.jsx(_.span,{"data-state":Lc(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});jc.displayName=Dc;var Zh="RadioBubbleInput",kc=a.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const i=a.useRef(null),c=N(i,s),l=mn(n),u=un(t);return a.useEffect(()=>{const d=i.current;if(!d)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const g=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(g)}},[l,n,o]),f.jsx(_.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});kc.displayName=Zh;function Lc(e){return e?"checked":"unchecked"}var qh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],In="RadioGroup",[Qh,ox]=z(In,[Se,Nc]),$c=Se(),Fc=Nc(),[Jh,em]=Qh(In),Vc=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:s,required:i=!1,disabled:c=!1,orientation:l,dir:u,loop:d=!0,onValueChange:p,...v}=e,m=$c(n),g=Te(u),[h,x]=Z({prop:s,defaultProp:r??null,onChange:p,caller:In});return f.jsx(Jh,{scope:n,name:o,required:i,disabled:c,value:h,onValueChange:x,children:f.jsx(Et,{asChild:!0,...m,orientation:l,dir:g,loop:d,children:f.jsx(_.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":c?"":void 0,dir:g,...v,ref:t})})})});Vc.displayName=In;var Bc="RadioGroupItem",Hc=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,s=em(Bc,n),i=s.disabled||o,c=$c(n),l=Fc(n),u=a.useRef(null),d=N(t,u),p=s.value===r.value,v=a.useRef(!1);return a.useEffect(()=>{const m=h=>{qh.includes(h.key)&&(v.current=!0)},g=()=>v.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",g)}},[]),f.jsx(Pt,{asChild:!0,...c,focusable:!i,active:p,children:f.jsx(Oc,{disabled:i,required:s.required,checked:p,...l,...r,name:s.name,ref:d,onCheck:()=>s.onValueChange(r.value),onKeyDown:S(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:S(r.onFocus,()=>{v.current&&u.current?.click()})})})});Hc.displayName=Bc;var tm="RadioGroupIndicator",Wc=a.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=Fc(n);return f.jsx(jc,{...r,...o,ref:t})});Wc.displayName=tm;var rx=Vc,sx=Hc,ax=Wc,Gc="Toggle",Uc=a.forwardRef((e,t)=>{const{pressed:n,defaultPressed:o,onPressedChange:r,...s}=e,[i,c]=Z({prop:n,onChange:r,defaultProp:o??!1,caller:Gc});return f.jsx(_.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:S(e.onClick,()=>{e.disabled||c(!i)})})});Uc.displayName=Gc;var Fe="ToggleGroup",[Kc,ix]=z(Fe,[Se]),zc=Se(),Qo=B.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return f.jsx(nm,{...r,ref:t})}if(n==="multiple"){const r=o;return f.jsx(om,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Fe}\``)});Qo.displayName=Fe;var[Yc,Xc]=Kc(Fe),nm=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,c]=Z({prop:n,defaultProp:o??"",onChange:r,caller:Fe});return f.jsx(Yc,{scope:e.__scopeToggleGroup,type:"single",value:B.useMemo(()=>i?[i]:[],[i]),onItemActivate:c,onItemDeactivate:B.useCallback(()=>c(""),[c]),children:f.jsx(Zc,{...s,ref:t})})}),om=B.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i,c]=Z({prop:n,defaultProp:o??[],onChange:r,caller:Fe}),l=B.useCallback(d=>c((p=[])=>[...p,d]),[c]),u=B.useCallback(d=>c((p=[])=>p.filter(v=>v!==d)),[c]);return f.jsx(Yc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:l,onItemDeactivate:u,children:f.jsx(Zc,{...s,ref:t})})});Qo.displayName=Fe;var[rm,sm]=Kc(Fe),Zc=B.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:s,dir:i,loop:c=!0,...l}=e,u=zc(n),d=Te(i),p={role:"group",dir:d,...l};return f.jsx(rm,{scope:n,rovingFocus:r,disabled:o,children:r?f.jsx(Et,{asChild:!0,...u,orientation:s,dir:d,loop:c,children:f.jsx(_.div,{...p,ref:t})}):f.jsx(_.div,{...p,ref:t})})}),en="ToggleGroupItem",qc=B.forwardRef((e,t)=>{const n=Xc(en,e.__scopeToggleGroup),o=sm(en,e.__scopeToggleGroup),r=zc(e.__scopeToggleGroup),s=n.value.includes(e.value),i=o.disabled||e.disabled,c={...e,pressed:s,disabled:i},l=B.useRef(null);return o.rovingFocus?f.jsx(Pt,{asChild:!0,...r,focusable:!i,active:s,ref:l,children:f.jsx(Pr,{...c,ref:t})}):f.jsx(Pr,{...c,ref:t})});qc.displayName=en;var Pr=B.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,s=Xc(en,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=s.type==="single"?i:void 0;return f.jsx(Uc,{...c,...r,ref:t,onPressedChange:l=>{l?s.onItemActivate(o):s.onItemDeactivate(o)}})}),cx=Qo,lx=qc,Mt="Menubar",[lo,am,im]=St(Mt),[Qc,ux]=z(Mt,[im,Se]),oe=Wo(),Jc=Se(),[cm,Jo]=Qc(Mt),el=a.forwardRef((e,t)=>{const{__scopeMenubar:n,value:o,onValueChange:r,defaultValue:s,loop:i=!0,dir:c,...l}=e,u=Te(c),d=Jc(n),[p,v]=Z({prop:o,onChange:r,defaultProp:s??"",caller:Mt}),[m,g]=a.useState(null);return f.jsx(cm,{scope:n,value:p,onMenuOpen:a.useCallback(h=>{v(h),g(h)},[v]),onMenuClose:a.useCallback(()=>v(""),[v]),onMenuToggle:a.useCallback(h=>{v(x=>x?"":h),g(h)},[v]),dir:u,loop:i,children:f.jsx(lo.Provider,{scope:n,children:f.jsx(lo.Slot,{scope:n,children:f.jsx(Et,{asChild:!0,...d,orientation:"horizontal",loop:i,dir:u,currentTabStopId:m,onCurrentTabStopIdChange:g,children:f.jsx(_.div,{role:"menubar",...l,ref:t})})})})})});el.displayName=Mt;var er="MenubarMenu",[lm,tl]=Qc(er),nl=e=>{const{__scopeMenubar:t,value:n,...o}=e,r=J(),s=n||r||"LEGACY_REACT_AUTO_VALUE",i=Jo(er,t),c=oe(t),l=a.useRef(null),u=a.useRef(!1),d=i.value===s;return a.useEffect(()=>{d||(u.current=!1)},[d]),f.jsx(lm,{scope:t,value:s,triggerId:J(),triggerRef:l,contentId:J(),wasKeyboardTriggerOpenRef:u,children:f.jsx(Yi,{...c,open:d,onOpenChange:p=>{p||i.onMenuClose()},modal:!1,dir:i.dir,...o})})};nl.displayName=er;var uo="MenubarTrigger",ol=a.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:o=!1,...r}=e,s=Jc(n),i=oe(n),c=Jo(uo,n),l=tl(uo,n),u=a.useRef(null),d=N(t,u,l.triggerRef),[p,v]=a.useState(!1),m=c.value===l.value;return f.jsx(lo.ItemSlot,{scope:n,value:l.value,disabled:o,children:f.jsx(Pt,{asChild:!0,...s,focusable:!o,tabStopId:l.value,children:f.jsx(Xi,{asChild:!0,...i,children:f.jsx(_.button,{type:"button",role:"menuitem",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?l.contentId:void 0,"data-highlighted":p?"":void 0,"data-state":m?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:d,onPointerDown:S(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(c.onMenuOpen(l.value),m||g.preventDefault())}),onPointerEnter:S(e.onPointerEnter,()=>{c.value&&!m&&(c.onMenuOpen(l.value),u.current?.focus())}),onKeyDown:S(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&c.onMenuToggle(l.value),g.key==="ArrowDown"&&c.onMenuOpen(l.value),["Enter"," ","ArrowDown"].includes(g.key)&&(l.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:S(e.onFocus,()=>v(!0)),onBlur:S(e.onBlur,()=>v(!1))})})})})});ol.displayName=uo;var um="MenubarPortal",rl=e=>{const{__scopeMenubar:t,...n}=e,o=oe(t);return f.jsx(Zi,{...o,...n})};rl.displayName=um;var fo="MenubarContent",sl=a.forwardRef((e,t)=>{const{__scopeMenubar:n,align:o="start",...r}=e,s=oe(n),i=Jo(fo,n),c=tl(fo,n),l=am(n),u=a.useRef(!1);return f.jsx(qi,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...r,ref:t,align:o,onCloseAutoFocus:S(e.onCloseAutoFocus,d=>{!i.value&&!u.current&&c.triggerRef.current?.focus(),u.current=!1,d.preventDefault()}),onFocusOutside:S(e.onFocusOutside,d=>{const p=d.target;l().some(m=>m.ref.current?.contains(p))&&d.preventDefault()}),onInteractOutside:S(e.onInteractOutside,()=>{u.current=!0}),onEntryFocus:d=>{c.wasKeyboardTriggerOpenRef.current||d.preventDefault()},onKeyDown:S(e.onKeyDown,d=>{if(["ArrowRight","ArrowLeft"].includes(d.key)){const p=d.target,v=p.hasAttribute("data-radix-menubar-subtrigger"),m=p.closest("[data-radix-menubar-content]")!==d.currentTarget,h=(i.dir==="rtl"?"ArrowRight":"ArrowLeft")===d.key;if(!h&&v||m&&h)return;let w=l().filter(R=>!R.disabled).map(R=>R.value);h&&w.reverse();const b=w.indexOf(c.value);w=i.loop?Nm(w,b+1):w.slice(b+1);const[y]=w;y&&i.onMenuOpen(y)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});sl.displayName=fo;var dm="MenubarGroup",fm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(Qi,{...r,...o,ref:t})});fm.displayName=dm;var pm="MenubarLabel",vm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(Ji,{...r,...o,ref:t})});vm.displayName=pm;var hm="MenubarItem",al=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(ec,{...r,...o,ref:t})});al.displayName=hm;var mm="MenubarCheckboxItem",gm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(tc,{...r,...o,ref:t})});gm.displayName=mm;var xm="MenubarRadioGroup",wm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(nc,{...r,...o,ref:t})});wm.displayName=xm;var Cm="MenubarRadioItem",bm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(oc,{...r,...o,ref:t})});bm.displayName=Cm;var ym="MenubarItemIndicator",Sm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(rc,{...r,...o,ref:t})});Sm.displayName=ym;var Rm="MenubarSeparator",Em=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(sc,{...r,...o,ref:t})});Em.displayName=Rm;var Pm="MenubarArrow",Am=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(ac,{...r,...o,ref:t})});Am.displayName=Pm;var _m="MenubarSubTrigger",Tm=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(ic,{"data-radix-menubar-subtrigger":"",...r,...o,ref:t})});Tm.displayName=_m;var Mm="MenubarSubContent",Im=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...o}=e,r=oe(n);return f.jsx(cc,{...r,"data-radix-menubar-content":"",...o,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});Im.displayName=Mm;function Nm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var dx=el,fx=nl,px=ol,vx=rl,hx=sl,mx=al;export{Eg as $,Wm as A,fg as B,rd as C,ad as D,pg as E,vg as F,dg as G,zm as H,Km as I,mg as J,xg as K,ag as L,Wp as M,Xp as N,od as O,nd as P,ng as Q,jm as R,Dm as S,sd as T,Cg as U,gg as V,bg as W,Sg as X,yg as Y,Rg as Z,km as _,ge as a,Pg as a0,Tg as a1,Ig as a2,Mg as a3,Ng as a4,Og as a5,Ag as a6,_g as a7,Dg as a8,kg as a9,dx as aA,fx as aB,px as aC,hx as aD,mx as aE,vx as aF,Lg as aa,Jg as ab,Xg as ac,Qg as ad,tx as ae,nx as af,ex as ag,Zg as ah,qg as ai,Ur as aj,rx as ak,sx as al,ax as am,Vg as an,Bg as ao,Hg as ap,Wg as aq,Ug as ar,Kg as as,zg as at,Gg as au,Vf as av,Bf as aw,Hf as ax,cx as ay,lx as az,Jl as b,ed as c,rs as d,$m as e,Fm as f,Vm as g,Bm as h,Hm as i,Um as j,Ym as k,Xm as l,np as m,op as n,Jm as o,eg as p,tg as q,og as r,td as s,sg as t,ig as u,cg as v,J as w,_ as x,Ce as y,ug as z};
|
|
52
|
+
//# sourceMappingURL=vendor-radix-BZJHvSaq.js.map
|