@shepai/cli 1.65.1 → 1.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts +62 -0
- package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.js +12 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +4 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +3 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +25 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +5 -2
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +23 -2
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +11 -7
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +11 -7
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +11 -7
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts +57 -0
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +192 -0
- package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.js +59 -0
- package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts +15 -0
- package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/deployment/parse-port.js +52 -0
- package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/_serve.command.js +2 -0
- package/dist/src/presentation/web/app/actions/deploy-feature.d.ts +7 -0
- package/dist/src/presentation/web/app/actions/deploy-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/deploy-feature.js +28 -0
- package/dist/src/presentation/web/app/actions/deploy-repository.d.ts +7 -0
- package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/deploy-repository.js +21 -0
- package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts +3 -0
- package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-deployment-status.js +9 -0
- package/dist/src/presentation/web/app/actions/stop-deployment.d.ts +5 -0
- package/dist/src/presentation/web/app/actions/stop-deployment.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/stop-deployment.js +16 -0
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts +20 -0
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -0
- package/dist/src/presentation/web/app/build-graph-nodes.js +142 -0
- package/dist/src/presentation/web/app/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/page.js +2 -112
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts +3 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +13 -3
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.js +9 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts +7 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +14 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.js +27 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts +2 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/index.js +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.js +8 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +7 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +13 -2
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.js +12 -2
- package/dist/src/presentation/web/hooks/use-deploy-action.d.ts +18 -0
- package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/use-deploy-action.js +130 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts +1 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/feature-flags.js +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +7 -6
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/.tsbuildinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
- package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
- package/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
- package/web/.next/server/app/page/build-manifest.json +5 -4
- package/web/.next/server/app/page/server-reference-manifest.json +88 -28
- package/web/.next/server/app/page.js +2 -2
- package/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/build-manifest.json +5 -4
- package/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
- package/web/.next/server/app/skills/page.js +2 -2
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/build-manifest.json +5 -4
- package/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/build-manifest.json +5 -4
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page.js +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js.map → [root-of-the-server]__09413611._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js.map → [root-of-the-server]__248ee887._.js.map} +1 -1
- package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__fbc89707._.js → server/chunks/ssr/[root-of-the-server]__249c74f6._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js.map +1 -0
- package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js → server/chunks/ssr/[root-of-the-server]__f5830fa9._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_28993370._.js +3 -0
- package/web/.next/server/chunks/ssr/_28993370._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
- package/web/.next/server/chunks/ssr/_380c6567._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_45715073._.js +3 -0
- package/web/.next/server/chunks/ssr/{_d81184e2._.js.map → _45715073._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
- package/web/.next/server/chunks/ssr/_6978d868._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_85965278._.js +6 -0
- package/web/.next/server/chunks/ssr/_85965278._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
- package/web/.next/server/chunks/ssr/_c52cace8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
- package/web/.next/server/chunks/ssr/_ed9132c9._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
- package/web/.next/server/chunks/ssr/node_modules__pnpm_febcbea6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +5 -4
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +118 -30
- package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +7 -6
- package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/page/build-manifest.json +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +88 -28
- package/web/.next/standalone/src/presentation/web/.next/server/app/page.js +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/build-manifest.json +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/build-manifest.json +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/build-manifest.json +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
- package/web/.next/{server/chunks/ssr/[root-of-the-server]__fbc89707._.js → standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js} +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
- package/web/.next/{server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js → standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js} +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_28993370._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_45715073._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_85965278._.js +6 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/middleware-build-manifest.js +5 -4
- package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +118 -30
- package/web/.next/standalone/src/presentation/web/app/actions/deploy-feature.ts +39 -0
- package/web/.next/standalone/src/presentation/web/app/actions/deploy-repository.ts +28 -0
- package/web/.next/standalone/src/presentation/web/app/actions/get-deployment-status.ts +16 -0
- package/web/.next/standalone/src/presentation/web/app/actions/stop-deployment.ts +22 -0
- package/web/.next/standalone/src/presentation/web/app/build-graph-nodes.ts +180 -0
- package/web/.next/standalone/src/presentation/web/app/page.tsx +2 -129
- package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.stories.tsx +26 -0
- package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.tsx +45 -1
- package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.tsx +35 -0
- package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.tsx +42 -0
- package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/index.ts +1 -0
- package/web/.next/standalone/src/presentation/web/components/common/feature-drawer/feature-drawer.tsx +10 -0
- package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-drawer.tsx +9 -0
- package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-node.tsx +43 -2
- package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.tsx +79 -44
- package/web/.next/standalone/src/presentation/web/hooks/use-deploy-action.ts +161 -0
- package/web/.next/standalone/src/presentation/web/lib/feature-flags.ts +1 -0
- package/web/.next/standalone/src/presentation/web/server.js +1 -1
- package/web/.next/static/chunks/0b99eb9664d47ca7.js +1 -0
- package/web/.next/static/chunks/2ec0c24b265971c3.js +1 -0
- package/web/.next/static/chunks/41a2adc09edfffaf.js +1 -0
- package/web/.next/static/chunks/5054c72b1c8f5912.js +1 -0
- package/web/.next/static/chunks/7ad36bef63f15bc6.js +1 -0
- package/web/.next/static/chunks/{15f4f62844c3ea0e.js → 86a68ddb0ac40c02.js} +7 -7
- package/web/.next/static/chunks/{3b941e59ac013e12.js → 87421ab1062a39b7.js} +2 -2
- package/web/.next/static/chunks/{21541b346dd4dd28.js → 8c60d1bd87239066.js} +1 -1
- package/web/.next/static/chunks/96f49affaceab206.css +2 -0
- package/web/.next/static/chunks/a6d1d774260fc927.js +2 -0
- package/web/.next/static/chunks/c7e793951b20a67f.js +1 -0
- package/web/.next/static/chunks/f5fb2f182ae9b015.js +1 -0
- package/web/.next/static/chunks/faf6eb7311aa7529.js +1 -0
- package/web/.next/static/chunks/fffaa0530ef1686d.js +1 -0
- package/web/.next/static/chunks/turbopack-b6b5b4f015327a9a.js +4 -0
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
- package/web/.next/server/chunks/ssr/_73d14b70._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
- package/web/.next/server/chunks/ssr/_7f386377._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
- package/web/.next/server/chunks/ssr/_d3711354._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_87f920e7._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js.map +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
- package/web/.next/static/chunks/0c6654ec27f11c7e.js +0 -1
- package/web/.next/static/chunks/12c70bfd5951cf9b.js +0 -1
- package/web/.next/static/chunks/1887af4ad3781531.js +0 -2
- package/web/.next/static/chunks/78919481e7c5ad4f.js +0 -1
- package/web/.next/static/chunks/a5b6a22de303e877.css +0 -2
- package/web/.next/static/chunks/aa33d2874dacee4a.js +0 -1
- package/web/.next/static/chunks/acdb8af5a21f1ae9.js +0 -1
- package/web/.next/static/chunks/af7a5bcb7c49e46e.js +0 -1
- package/web/.next/static/chunks/be784143669bb992.js +0 -1
- package/web/.next/static/chunks/turbopack-eb24b869babb34b4.js +0 -4
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__fbc89707._.js.map → [root-of-the-server]__249c74f6._.js.map} +0 -0
- /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → VQhryfJCxF8IeQiBJFQyJ}/_buildManifest.js +0 -0
- /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → VQhryfJCxF8IeQiBJFQyJ}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → VQhryfJCxF8IeQiBJFQyJ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[38702,16223,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({icon:a,title:d,description:e,action:f,className:g,...h}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",g),...h,children:[a?(0,b.jsx)("div",{className:"text-muted-foreground",children:a}):null,(0,b.jsx)("h3",{className:"text-lg font-semibold",children:d}),e?(0,b.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:e}):null,f?(0,b.jsx)("div",{className:"mt-2",children:f}):null]})}a.s(["EmptyState",()=>d],16223),a.s([],38702)},3195,50490,5698,5623,69029,85080,49235,a=>{"use strict";var b=a.i(25700);let c=(0,b.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);a.s(["FolderOpen",()=>c],3195);let d=(0,b.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);a.s(["Play",()=>d],50490);let e=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",()=>e],5698);var f=a.i(10973),g=a.i(88064),h=a.i(82697),i=a.i(85536),j=a.i(18948),k=a.i(19884);function l({label:a,onClick:b,loading:c,error:d,icon:e,iconOnly:l=!1,variant:m="outline",size:n="sm"}){let o=(0,k.useSoundAction)("click");return(0,f.jsxs)(j.Button,{variant:m,size:n,"aria-label":a,disabled:c,onClick:()=>{o.play(),b()},className:(0,i.cn)("gap-1.5",d&&"text-destructive hover:text-destructive",!d&&l&&"ghost"===m&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[c?(0,f.jsx)(g.Loader2,{className:"size-4 animate-spin"}):d?(0,f.jsx)(h.CircleAlert,{className:"size-4"}):(0,f.jsx)(e,{className:"size-4"}),l?null:a]})}a.s(["ActionButton",()=>l],5623),a.s([],69029);var m=a.i(71238),n=a.i(46847),o=a.i(58339);function p({status:a,url:b}){switch(a){case n.DeploymentState.Booting:return(0,f.jsxs)(o.Badge,{className:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",children:[(0,f.jsx)(g.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Starting..."]});case n.DeploymentState.Ready:return(0,f.jsxs)(o.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,f.jsx)("span",{className:"mr-1 inline-block h-2 w-2 rounded-full bg-green-500"}),b?(0,f.jsxs)("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:underline",onClick:a=>a.stopPropagation(),children:[b,(0,f.jsx)(m.ExternalLink,{className:"h-3 w-3"})]}):"Ready"]});default:return null}}a.s(["DeploymentStatusBadge",()=>p],85080),a.s([],49235)},18662,a=>{"use strict";var b=a.i(96960),c=a.i(25674);let d=(0,c.createServerReference)("40b7b90414ae236c8fc508faeaef4b5a9ed1fd702b",c.callServer,void 0,c.findSourceMapURL,"deployFeature"),e=(0,c.createServerReference)("40015ffe022cac8955ed69d533655ee9e714863d11",c.callServer,void 0,c.findSourceMapURL,"deployRepository"),f=(0,c.createServerReference)("40d37277be3479f63d377b3ac59ac7439f54d4c821",c.callServer,void 0,c.findSourceMapURL,"stopDeployment"),g=(0,c.createServerReference)("40212277f184eee3f9ca0a97f9e213df08697ceada",c.callServer,void 0,c.findSourceMapURL,"getDeploymentStatus");function h(a){let[c,h]=(0,b.useState)(!1),[i,j]=(0,b.useState)(!1),[k,l]=(0,b.useState)(null),[m,n]=(0,b.useState)(null),[o,p]=(0,b.useState)(null),q=(0,b.useRef)(null),r=(0,b.useRef)(null),s=(0,b.useRef)(!0);(0,b.useEffect)(()=>(s.current=!0,()=>{s.current=!1}),[]),(0,b.useEffect)(()=>()=>{q.current&&clearTimeout(q.current),r.current&&clearInterval(r.current)},[]);let t=(0,b.useCallback)(()=>{r.current&&(clearInterval(r.current),r.current=null)},[]),u=(0,b.useCallback)(a=>{t(),r.current=setInterval(async()=>{if(!s.current)return void t();let b=await g(a);s.current&&(b&&"Stopped"!==b.state?(n(b.state),p(b.url)):(n(null),p(null),t()))},3e3)},[t]);return{deploy:(0,b.useCallback)(async()=>{if(a&&!c){q.current&&clearTimeout(q.current),h(!0),l(null);try{let b="feature"===a.targetType?await d(a.targetId):await e(a.repositoryPath);if(!s.current)return;if(b.success)n(b.state??null),p(null),u(a.targetId);else{let a=b.error??"An unexpected error occurred";l(a),q.current=setTimeout(()=>l(null),5e3)}}catch(a){if(!s.current)return;l(a instanceof Error?a.message:"An unexpected error occurred"),q.current=setTimeout(()=>l(null),5e3)}finally{s.current&&h(!1)}}},[a,c,u]),stop:(0,b.useCallback)(async()=>{if(a&&!i){j(!0);try{let b=await f(a.targetId);if(!s.current)return;b.success&&(t(),n(null),p(null))}catch{}finally{s.current&&j(!1)}}},[a,i,t]),deployLoading:c,stopLoading:i,deployError:k,status:m,url:o}}a.s(["useDeployAction",()=>h],18662)},2824,a=>{"use strict";let b;var c=a.i(10973),d=a.i(10568),e=a.i(40093),f=a.i(96960);let g=f.default.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),h=()=>{let a=f.default.useContext(g);if(!a)throw Error("useDrawerContext must be used within a Drawer.Root");return a};function i(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function j(){return k(/^iPhone/)||k(/^iPad/)||k(/^Mac/)&&navigator.maxTouchPoints>1}function k(a){}!function(a){if(!a||"u"<typeof document)return;let b=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",b.appendChild(c),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");let l=f.useEffect;"u">typeof document&&window.visualViewport;let m=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),n=0;function o(...a){return f.useCallback(function(...a){return b=>a.forEach(a=>{"function"==typeof a?a(b):null!=a&&(a.current=b)})}(...a),a)}let p=new WeakMap;function q(a,b,c=!1){if(!a||!(a instanceof HTMLElement))return;let d={};Object.entries(b).forEach(([b,c])=>{b.startsWith("--")?a.style.setProperty(b,c):(d[b]=a.style[b],a.style[b]=c)}),c||p.set(a,d)}let r=a=>{switch(a){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return a}};function s(a,b){if(!a)return null;let c=window.getComputedStyle(a),d=c.transform||c.webkitTransform||c.mozTransform,e=d.match(/^matrix3d\((.+)\)$/);return e?parseFloat(e[1].split(", ")[r(b)?13:12]):(e=d.match(/^matrix\((.+)\)$/))?parseFloat(e[1].split(", ")[r(b)?5:4]):null}function t(a,b){if(!a)return()=>{};let c=a.style.cssText;return Object.assign(a.style,b),()=>{a.style.cssText=c}}let u=[.32,.72,0,1],v="vaul-dragging";function w(a){let b=f.default.useRef(a);return f.default.useEffect(()=>{b.current=a}),f.default.useMemo(()=>(...a)=>null==b.current?void 0:b.current.call(b,...a),[])}function x({prop:a,defaultProp:b,onChange:c=()=>{}}){let[d,e]=function({defaultProp:a,onChange:b}){let c=f.default.useState(a),[d]=c,e=f.default.useRef(d),g=w(b);return f.default.useEffect(()=>{e.current!==d&&(g(d),e.current=d)},[d,e,g]),c}({defaultProp:b,onChange:c}),g=void 0!==a,h=g?a:d,i=w(c);return[h,f.default.useCallback(b=>{if(g){let c="function"==typeof b?b(a):b;c!==a&&i(c)}else e(b)},[g,a,e,i])]}let y=()=>()=>{},z=null;function A({open:a,onOpenChange:c,children:d,onDrag:h,onRelease:k,snapPoints:o,shouldScaleBackground:t=!1,setBackgroundColorOnScale:w=!0,closeThreshold:y=.25,scrollLockTimeout:A=100,dismissible:B=!0,handleOnly:C=!1,fadeFromIndex:D=o&&o.length-1,activeSnapPoint:E,setActiveSnapPoint:F,fixed:G,modal:H=!0,onClose:I,nested:J,noBodyStyles:K=!1,direction:L="bottom",defaultOpen:M=!1,disablePreventScroll:N=!0,snapToSequentialPoint:O=!1,preventScrollRestoration:P=!1,repositionInputs:Q=!0,onAnimationEnd:R,container:S,autoFocus:T=!1}){var U,V;let[W=!1,X]=x({defaultProp:M,prop:a,onChange:a=>{null==c||c(a),a||J||aA(),setTimeout(()=>{null==R||R(a)},500),a||(document.body.style.pointerEvents="auto")}}),[Y,Z]=f.default.useState(!1),[$,_]=f.default.useState(!1),[aa,ab]=f.default.useState(!1),ac=f.default.useRef(null),ad=f.default.useRef(null),ae=f.default.useRef(null),af=f.default.useRef(null),ag=f.default.useRef(null),ah=f.default.useRef(!1),ai=f.default.useRef(null),aj=f.default.useRef(0),ak=f.default.useRef(!1),al=f.default.useRef(!M),am=f.default.useRef(0),an=f.default.useRef(null),ao=f.default.useRef((null==(U=an.current)?void 0:U.getBoundingClientRect().height)||0),ap=f.default.useRef((null==(V=an.current)?void 0:V.getBoundingClientRect().width)||0),aq=f.default.useRef(0),ar=f.default.useCallback(a=>{o&&a===aw.length-1&&(ad.current=new Date)},[]),{activeSnapPoint:as,activeSnapPointIndex:at,setActiveSnapPoint:au,onRelease:av,snapPointsOffset:aw,onDrag:ax,shouldFade:ay,getPercentageDragged:az}=function({activeSnapPointProp:a,setActiveSnapPointProp:b,snapPoints:c,drawerRef:d,overlayRef:e,fadeFromIndex:g,onSnapPointChange:h,direction:i="bottom",container:j,snapToSequentialPoint:k}){let[l,m]=x({prop:a,defaultProp:null==c?void 0:c[0],onChange:b}),[n,o]=f.default.useState(void 0);f.default.useEffect(()=>{function a(){o({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);let p=f.default.useMemo(()=>l===(null==c?void 0:c[c.length-1])||null,[c,l]),s=f.default.useMemo(()=>{var a;return null!=(a=null==c?void 0:c.findIndex(a=>a===l))?a:null},[c,l]),t=c&&c.length>0&&(g||0===g)&&!Number.isNaN(g)&&c[g]===l||!c,v=f.default.useMemo(()=>{var a;let b=j?{width:j.getBoundingClientRect().width,height:j.getBoundingClientRect().height}:{width:0,height:0};return null!=(a=null==c?void 0:c.map(a=>{let c="string"==typeof a,d=0;if(c&&(d=parseInt(a,10)),r(i)){let e=c?d:n?a*b.height:0;return n?"bottom"===i?b.height-e:-b.height+e:e}let e=c?d:n?a*b.width:0;return n?"right"===i?b.width-e:-b.width+e:e}))?a:[]},[c,n,j]),w=f.default.useMemo(()=>null!==s?null==v?void 0:v[s]:null,[v,s]),y=f.default.useCallback(a=>{var b;let f=null!=(b=null==v?void 0:v.findIndex(b=>b===a))?b:null;h(f),q(d.current,{transition:`transform 0.5s cubic-bezier(${u.join(",")})`,transform:r(i)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`}),v&&f!==v.length-1&&void 0!==g&&f!==g&&f<g?q(e.current,{transition:`opacity 0.5s cubic-bezier(${u.join(",")})`,opacity:"0"}):q(e.current,{transition:`opacity 0.5s cubic-bezier(${u.join(",")})`,opacity:"1"}),m(null==c?void 0:c[Math.max(f,0)])},[d.current,c,v,g,e,m]);return f.default.useEffect(()=>{if(l||a){var b;let d=null!=(b=null==c?void 0:c.findIndex(b=>b===a||b===l))?b:-1;v&&-1!==d&&"number"==typeof v[d]&&y(v[d])}},[l,a,c,v,y]),{isLastSnapPoint:p,activeSnapPoint:l,shouldFade:t,getPercentageDragged:function(a,b){if(!c||"number"!=typeof s||!v||void 0===g)return null;let d=s===g-1;if(s>=g&&b)return 0;if(d&&!b)return 1;if(!t&&!d)return null;let e=d?s+1:s-1,f=a/Math.abs(d?v[e]-v[e-1]:v[e+1]-v[e]);return d?1-f:f},setActiveSnapPoint:m,activeSnapPointIndex:s,onRelease:function({draggedDistance:a,closeDrawer:b,velocity:d,dismissible:f}){if(void 0===g)return;let h="bottom"===i||"right"===i?(null!=w?w:0)-a:(null!=w?w:0)+a,j=s===g-1,l=0===s,m=a>0;if(j&&q(e.current,{transition:`opacity 0.5s cubic-bezier(${u.join(",")})`}),!k&&d>2&&!m)return void(f?b():y(v[0]));if(!k&&d>2&&m&&v&&c)return void y(v[c.length-1]);let n=null==v?void 0:v.reduce((a,b)=>"number"!=typeof a||"number"!=typeof b?a:Math.abs(b-h)<Math.abs(a-h)?b:a),o=r(i)?window.innerHeight:window.innerWidth;if(d>.4&&Math.abs(a)<.4*o){let a=m?1:-1;return a>0&&p&&c?void y(v[c.length-1]):void(l&&a<0&&f&&b(),null===s||y(v[s+a]))}y(n)},onDrag:function({draggedDistance:a}){if(null===w)return;let b="bottom"===i||"right"===i?w-a:w+a;("bottom"===i||"right"===i)&&b<v[v.length-1]||("top"===i||"left"===i)&&b>v[v.length-1]||q(d.current,{transform:r(i)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`})},snapPointsOffset:v}}({snapPoints:o,activeSnapPointProp:E,setActiveSnapPointProp:F,drawerRef:an,fadeFromIndex:D,overlayRef:ac,onSnapPointChange:ar,direction:L,container:S,snapToSequentialPoint:O});!function(a={}){let{isDisabled:c}=a;l(()=>{if(!c)return 1==++n&&j(),()=>{0==--n&&(null==b||b())}},[c])}({isDisabled:!W||$||!H||aa||!Y||!Q||!N});let{restorePositionSetting:aA}=function({isOpen:a,modal:b,nested:c,hasBeenOpened:d,preventScrollRestoration:e,noBodyStyles:g}){let[h,j]=f.default.useState(()=>""),k=f.default.useRef(0),l=f.default.useCallback(()=>{if(i()&&null===z&&a&&!g){z={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:a,innerHeight:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-k.current}px`,left:`${-a}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let a=b-window.innerHeight;a&&k.current>=b&&(document.body.style.top=`${-(k.current+a)}px`)}),300)}},[a]),m=f.default.useCallback(()=>{if(i()&&null!==z&&!g){let a=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,z),window.requestAnimationFrame(()=>{e&&h!==window.location.href?j(window.location.href):window.scrollTo(b,a)}),z=null}},[h]);return f.default.useEffect(()=>{function a(){k.current=window.scrollY}return a(),window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a)}},[]),f.default.useEffect(()=>{if(b)return()=>{"u"<typeof document||document.querySelector("[data-vaul-drawer]")||m()}},[b,m]),f.default.useEffect(()=>{!c&&d&&(a?(window.matchMedia("(display-mode: standalone)").matches||l(),b||window.setTimeout(()=>{m()},500)):m())},[a,d,h,b,c,l,m]),{restorePositionSetting:m}}({isOpen:W,modal:H,nested:null!=J&&J,hasBeenOpened:Y,preventScrollRestoration:P,noBodyStyles:K});function aB(){return(window.innerWidth-26)/window.innerWidth}function aC(a,b){var c;let d=a,e=null==(c=window.getSelection())?void 0:c.toString(),f=an.current?s(an.current,L):null,g=new Date;if("SELECT"===d.tagName||d.hasAttribute("data-vaul-no-drag")||d.closest("[data-vaul-no-drag]"))return!1;if("right"===L||"left"===L)return!0;if(ad.current&&g.getTime()-ad.current.getTime()<500)return!1;if(null!==f&&("bottom"===L?f>0:f<0))return!0;if(e&&e.length>0)return!1;if(ag.current&&g.getTime()-ag.current.getTime()<A&&0===f||b)return ag.current=g,!1;for(;d;){if(d.scrollHeight>d.clientHeight){if(0!==d.scrollTop)return ag.current=new Date,!1;if("dialog"===d.getAttribute("role"))break}d=d.parentNode}return!0}function aD(a){$&&an.current&&(an.current.classList.remove(v),ah.current=!1,_(!1),af.current=new Date),null==I||I(),a||X(!1),setTimeout(()=>{o&&au(o[0])},500)}function aE(){if(!an.current)return;let a=document.querySelector("[data-vaul-drawer-wrapper]"),b=s(an.current,L);q(an.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${u.join(",")})`}),q(ac.current,{transition:`opacity 0.5s cubic-bezier(${u.join(",")})`,opacity:"1"}),t&&b&&b>0&&W&&q(a,{borderRadius:"8px",overflow:"hidden",...r(L)?{transform:`scale(${aB()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${aB()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${u.join(",")})`},!0)}return f.default.useEffect(()=>{window.requestAnimationFrame(()=>{al.current=!0})},[]),f.default.useEffect(()=>{var a;function b(){var a,b;if(an.current&&Q&&((a=document.activeElement)instanceof HTMLInputElement&&!m.has(a.type)||a instanceof HTMLTextAreaElement||a instanceof HTMLElement&&a.isContentEditable||ak.current)){let a=(null==(b=window.visualViewport)?void 0:b.height)||0,c=window.innerHeight,d=c-a,e=an.current.getBoundingClientRect().height||0;aq.current||(aq.current=e);let f=an.current.getBoundingClientRect().top;if(Math.abs(am.current-d)>60&&(ak.current=!ak.current),o&&o.length>0&&aw&&at&&(d+=aw[at]||0),am.current=d,e>a||ak.current){let b=an.current.getBoundingClientRect().height,g=b;b>a&&(g=a-(e>.8*c?f:26)),G?an.current.style.height=`${b-Math.max(d,0)}px`:an.current.style.height=`${Math.max(g,a-f)}px`}else navigator.userAgent,an.current.style.height=`${aq.current}px`;o&&o.length>0&&!ak.current?an.current.style.bottom="0px":an.current.style.bottom=`${Math.max(d,0)}px`}}return null==(a=window.visualViewport)||a.addEventListener("resize",b),()=>{var a;return null==(a=window.visualViewport)?void 0:a.removeEventListener("resize",b)}},[at,o,aw]),f.default.useEffect(()=>(W&&(q(document.documentElement,{scrollBehavior:"auto"}),ad.current=new Date),()=>{!function(a,b){if(!a||!(a instanceof HTMLElement))return;let c=p.get(a);c&&(a.style[b]=c[b])}(document.documentElement,"scrollBehavior")}),[W]),f.default.useEffect(()=>{H||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[H]),f.default.createElement(e.Root,{defaultOpen:M,onOpenChange:a=>{(B||a)&&(a?Z(!0):aD(!0),X(a))},open:W},f.default.createElement(g.Provider,{value:{activeSnapPoint:as,snapPoints:o,setActiveSnapPoint:au,drawerRef:an,overlayRef:ac,onOpenChange:c,onPress:function(a){var b,c;!B&&!o||(!an.current||an.current.contains(a.target))&&(ao.current=(null==(b=an.current)?void 0:b.getBoundingClientRect().height)||0,ap.current=(null==(c=an.current)?void 0:c.getBoundingClientRect().width)||0,_(!0),ae.current=new Date,j(),a.target.setPointerCapture(a.pointerId),aj.current=r(L)?a.pageY:a.pageX)},onRelease:function(a){var b,c;if(!$||!an.current)return;an.current.classList.remove(v),ah.current=!1,_(!1),af.current=new Date;let d=s(an.current,L);if(!a||!aC(a.target,!1)||!d||Number.isNaN(d)||null===ae.current)return;let e=af.current.getTime()-ae.current.getTime(),f=aj.current-(r(L)?a.pageY:a.pageX),g=Math.abs(f)/e;if(g>.05&&(ab(!0),setTimeout(()=>{ab(!1)},200)),o){av({draggedDistance:f*("bottom"===L||"right"===L?1:-1),closeDrawer:aD,velocity:g,dismissible:B}),null==k||k(a,!0);return}if("bottom"===L||"right"===L?f>0:f<0){aE(),null==k||k(a,!0);return}if(g>.4){aD(),null==k||k(a,!1);return}let h=Math.min(null!=(b=an.current.getBoundingClientRect().height)?b:0,window.innerHeight),i=Math.min(null!=(c=an.current.getBoundingClientRect().width)?c:0,window.innerWidth);if(Math.abs(d)>=("left"===L||"right"===L?i:h)*y){aD(),null==k||k(a,!1);return}null==k||k(a,!0),aE()},onDrag:function(a){if(an.current&&$){let b="bottom"===L||"right"===L?1:-1,c=(aj.current-(r(L)?a.pageY:a.pageX))*b,d=c>0,e=o&&!B&&!d;if(e&&0===at)return;let f=Math.abs(c),g=document.querySelector("[data-vaul-drawer-wrapper]"),i=f/("bottom"===L||"top"===L?ao.current:ap.current),j=az(f,d);if(null!==j&&(i=j),e&&i>=1||!ah.current&&!aC(a.target,d))return;if(an.current.classList.add(v),ah.current=!0,q(an.current,{transition:"none"}),q(ac.current,{transition:"none"}),o&&ax({draggedDistance:c}),d&&!o){let a=Math.min(-(8*(Math.log(c+1)-2)*1),0)*b;q(an.current,{transform:r(L)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`});return}let k=1-i;if((ay||D&&at===D-1)&&(null==h||h(a,i),q(ac.current,{opacity:`${k}`,transition:"none"},!0)),g&&ac.current&&t){let a=Math.min(aB()+i*(1-aB()),1),b=8-8*i,c=Math.max(0,14-14*i);q(g,{borderRadius:`${b}px`,transform:r(L)?`scale(${a}) translate3d(0, ${c}px, 0)`:`scale(${a}) translate3d(${c}px, 0, 0)`,transition:"none"},!0)}if(!o){let a=f*b;q(an.current,{transform:r(L)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`})}}},dismissible:B,shouldAnimate:al,handleOnly:C,isOpen:W,isDragging:$,shouldFade:ay,closeDrawer:aD,onNestedDrag:function(a,b){if(b<0)return;let c=(window.innerWidth-16)/window.innerWidth,d=c+b*(1-c),e=-16+16*b;q(an.current,{transform:r(L)?`scale(${d}) translate3d(0, ${e}px, 0)`:`scale(${d}) translate3d(${e}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(a){let b=a?(window.innerWidth-16)/window.innerWidth:1,c=a?-16:0;ai.current&&window.clearTimeout(ai.current),q(an.current,{transition:`transform 0.5s cubic-bezier(${u.join(",")})`,transform:r(L)?`scale(${b}) translate3d(0, ${c}px, 0)`:`scale(${b}) translate3d(${c}px, 0, 0)`}),!a&&an.current&&(ai.current=setTimeout(()=>{let a=s(an.current,L);q(an.current,{transition:"none",transform:r(L)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`})},500))},onNestedRelease:function(a,b){let c=r(L)?window.innerHeight:window.innerWidth,d=b?(c-16)/c:1,e=b?-16:0;b&&q(an.current,{transition:`transform 0.5s cubic-bezier(${u.join(",")})`,transform:r(L)?`scale(${d}) translate3d(0, ${e}px, 0)`:`scale(${d}) translate3d(${e}px, 0, 0)`})},keyboardIsOpen:ak,modal:H,snapPointsOffset:aw,activeSnapPointIndex:at,direction:L,shouldScaleBackground:t,setBackgroundColorOnScale:w,noBodyStyles:K,container:S,autoFocus:T}},d))}let B=f.default.forwardRef(function({...a},b){let{overlayRef:c,snapPoints:d,onRelease:g,shouldFade:i,isOpen:j,modal:k,shouldAnimate:l}=h(),m=o(b,c),n=d&&d.length>0;if(!k)return null;let p=f.default.useCallback(a=>g(a),[g]);return f.default.createElement(e.Overlay,{onMouseUp:p,ref:m,"data-vaul-overlay":"","data-vaul-snap-points":j&&n?"true":"false","data-vaul-snap-points-overlay":j&&i?"true":"false","data-vaul-animate":(null==l?void 0:l.current)?"true":"false",...a})});B.displayName="Drawer.Overlay";let C=f.default.forwardRef(function({onPointerDownOutside:a,style:b,onOpenAutoFocus:c,...d},g){let{drawerRef:i,onPress:j,onRelease:k,onDrag:l,keyboardIsOpen:m,snapPointsOffset:n,activeSnapPointIndex:p,modal:q,isOpen:s,direction:v,snapPoints:w,container:x,handleOnly:z,shouldAnimate:A,autoFocus:B}=h(),[C,D]=f.default.useState(!1),E=o(g,i),F=f.default.useRef(null),G=f.default.useRef(null),H=f.default.useRef(!1),I=w&&w.length>0;function J(a){F.current=null,H.current=!1,k(a)}return!function(){let{direction:a,isOpen:b,shouldScaleBackground:c,setBackgroundColorOnScale:d,noBodyStyles:e}=h(),g=f.default.useRef(null),i=(0,f.useMemo)(()=>document.body.style.backgroundColor,[]);function j(){return(window.innerWidth-26)/window.innerWidth}f.default.useEffect(()=>{if(b&&c){g.current&&clearTimeout(g.current);let b=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!b)return;!function(...a){}(d&&!e?t(document.body,{background:"black"}):y,t(b,{transformOrigin:r(a)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${u.join(",")})`}));let c=t(b,{borderRadius:"8px",overflow:"hidden",...r(a)?{transform:`scale(${j()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${j()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),g.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},500)}}},[b,c,i])}(),f.default.useEffect(()=>{I&&window.requestAnimationFrame(()=>{D(!0)})},[]),f.default.createElement(e.Content,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":s&&I?"true":"false","data-vaul-custom-container":x?"true":"false","data-vaul-animate":(null==A?void 0:A.current)?"true":"false",...d,ref:E,style:n&&n.length>0?{"--snap-point-height":`${n[null!=p?p:0]}px`,...b}:b,onPointerDown:a=>{z||(null==d.onPointerDown||d.onPointerDown.call(d,a),F.current={x:a.pageX,y:a.pageY},j(a))},onOpenAutoFocus:a=>{null==c||c(a),B||a.preventDefault()},onPointerDownOutside:b=>{(null==a||a(b),!q||b.defaultPrevented)?b.preventDefault():m.current&&(m.current=!1)},onFocusOutside:a=>{if(!q)return void a.preventDefault()},onPointerMove:a=>{if(G.current=a,z||(null==d.onPointerMove||d.onPointerMove.call(d,a),!F.current))return;let b=a.pageY-F.current.y,c=a.pageX-F.current.x,e="touch"===a.pointerType?10:2;((a,b,c=0)=>{if(H.current)return!0;let d=Math.abs(a.y),e=Math.abs(a.x),f=e>d,g=["bottom","right"].includes(b)?1:-1;if("left"===b||"right"===b){if(!(a.x*g<0)&&e>=0&&e<=c)return f}else if(!(a.y*g<0)&&d>=0&&d<=c)return!f;return H.current=!0,!0})({x:c,y:b},v,e)?l(a):(Math.abs(c)>e||Math.abs(b)>e)&&(F.current=null)},onPointerUp:a=>{null==d.onPointerUp||d.onPointerUp.call(d,a),F.current=null,H.current=!1,k(a)},onPointerOut:a=>{null==d.onPointerOut||d.onPointerOut.call(d,a),J(G.current)},onContextMenu:a=>{null==d.onContextMenu||d.onContextMenu.call(d,a),G.current&&J(G.current)}})});C.displayName="Drawer.Content";let D=f.default.forwardRef(function({preventCycle:a=!1,children:b,...c},d){let{closeDrawer:e,isDragging:g,snapPoints:i,activeSnapPoint:j,setActiveSnapPoint:k,dismissible:l,handleOnly:m,isOpen:n,onPress:o,onDrag:p}=h(),q=f.default.useRef(null),r=f.default.useRef(!1);function s(){q.current&&window.clearTimeout(q.current),r.current=!1}return f.default.createElement("div",{onClick:function(){r.current?s():window.setTimeout(()=>{!function(){if(g||a||r.current)return s();if(s(),!i||0===i.length){l||e();return}if(j===i[i.length-1]&&l)return e();let b=i.findIndex(a=>a===j);-1===b||k(i[b+1])}()},120)},onPointerCancel:s,onPointerDown:a=>{m&&o(a),q.current=window.setTimeout(()=>{r.current=!0},250)},onPointerMove:a=>{m&&p(a)},ref:d,"data-vaul-drawer-visible":n?"true":"false","data-vaul-handle":"","aria-hidden":"true",...c},f.default.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},b))});D.displayName="Drawer.Handle";let E={Root:A,NestedRoot:function({onDrag:a,onOpenChange:b,open:c,...d}){let{onNestedDrag:e,onNestedOpenChange:g,onNestedRelease:i}=h();if(!e)throw Error("Drawer.NestedRoot must be placed in another drawer");return f.default.createElement(A,{nested:!0,open:c,onClose:()=>{g(!1)},onDrag:(b,c)=>{e(b,c),null==a||a(b,c)},onOpenChange:a=>{a&&g(a),null==b||b(a)},onRelease:i,...d})},Content:C,Overlay:B,Trigger:e.Trigger,Portal:function(a){let b=h(),{container:c=b.container,...d}=a;return f.default.createElement(e.Portal,{container:c,...d})},Handle:D,Close:e.Close,Title:e.Title,Description:e.Description};var F=a.i(85536);function G({...a}){return(0,c.jsx)(E.Root,{"data-slot":"drawer",...a})}function H({...a}){return(0,c.jsx)(E.Portal,{"data-slot":"drawer-portal",...a})}function I({className:a,...b}){return(0,c.jsx)(E.Overlay,{"data-slot":"drawer-overlay",className:(0,F.cn)("fixed inset-0 z-50 bg-black/50",a),...b})}function J({className:a,children:b,direction:e="bottom",showCloseButton:f=!0,...g}){return(0,c.jsx)(H,{children:(0,c.jsxs)(E.Content,{"data-slot":"drawer-content",className:(0,F.cn)("bg-background fixed z-50 flex flex-col shadow-lg","bottom"===e&&"inset-x-0 bottom-0 mb-24 rounded-t-lg border-t","top"===e&&"inset-x-0 top-0 mt-24 rounded-b-lg border-b","right"===e&&"inset-y-0 right-0 h-full w-3/4 border-l","left"===e&&"inset-y-0 left-0 h-full w-3/4 border-r",a),style:{"--initial-transform":"right"===e?"calc(100% + 8px)":"left"===e||"top"===e?"calc(-100% - 8px)":"calc(100% + 8px)",userSelect:"text",...g.style??{}},...g,children:[b,f?(0,c.jsxs)(E.Close,{className:"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,c.jsx)(d.XIcon,{className:"size-4"}),(0,c.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})})}function K({className:a,...b}){return(0,c.jsx)("div",{"data-slot":"drawer-header",className:(0,F.cn)("flex flex-col gap-1.5 p-4",a),...b})}function L({className:a,...b}){return(0,c.jsx)("div",{"data-slot":"drawer-footer",className:(0,F.cn)("mt-auto flex flex-col gap-2 p-4",a),...b})}function M({className:a,...b}){return(0,c.jsx)(E.Title,{"data-slot":"drawer-title",className:(0,F.cn)("text-foreground font-semibold",a),...b})}function N({className:a,...b}){return(0,c.jsx)(E.Description,{"data-slot":"drawer-description",className:(0,F.cn)("text-muted-foreground text-sm",a),...b})}a.s(["Drawer",()=>G,"DrawerContent",()=>J,"DrawerDescription",()=>N,"DrawerFooter",()=>L,"DrawerHeader",()=>K,"DrawerOverlay",()=>I,"DrawerTitle",()=>M],2824)},78454,24255,a=>{"use strict";var b=a.i(10973),c=a.i(10568),d=a.i(50490),e=a.i(5698),f=a.i(42261),g=a.i(85536);a.i(69029);var h=a.i(5623);a.i(49235);var i=a.i(85080),j=a.i(2824),k=a.i(82934),l=a.i(18662),m=a.i(17227);let n=(0,f.cva)("",{variants:{size:{sm:"w-96",md:"w-xl"}},defaultVariants:{size:"sm"}});function o({open:a,onClose:d,modal:e=!1,size:f,header:h,children:i,footer:k,className:l,"data-testid":o,deployTarget:q}){return(0,b.jsxs)(j.Drawer,{direction:"right",modal:e,handleOnly:!0,open:a,onOpenChange:a=>{a||d()},children:[e?(0,b.jsx)(j.DrawerOverlay,{}):null,(0,b.jsxs)(j.DrawerContent,{direction:"right",showCloseButton:!1,className:(0,g.cn)(n({size:f}),l),"data-testid":o,children:[(0,b.jsxs)("button",{type:"button","aria-label":"Close",onClick:d,className:"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden","data-testid":o?`${o}-close-button`:void 0,children:[(0,b.jsx)(c.XIcon,{className:"size-4"}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]}),h?(0,b.jsx)(j.DrawerHeader,{children:h}):null,m.featureFlags.envDeploy&&q?(0,b.jsx)(p,{deployTarget:q}):null,(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,b.jsx)("div",{className:"flex flex-col",children:i})}),k?(0,b.jsx)(j.DrawerFooter,{children:k}):null]})]})}function p({deployTarget:a}){let c=(0,l.useDeployAction)(a),f="Booting"===c.status||"Ready"===c.status;return(0,b.jsxs)("div",{"data-testid":"base-drawer-deploy-bar",className:"flex items-center gap-2 px-4 pb-3",children:[(0,b.jsx)(k.TooltipProvider,{children:(0,b.jsxs)(k.Tooltip,{children:[(0,b.jsx)(k.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{children:(0,b.jsx)(h.ActionButton,{label:f?"Stop Dev Server":"Start Dev Server",onClick:f?c.stop:c.deploy,loading:c.deployLoading||c.stopLoading,error:!!c.deployError,icon:f?e.Square:d.Play,iconOnly:!0,variant:"outline",size:"icon-sm"})})}),(0,b.jsx)(k.TooltipContent,{children:f?"Stop Dev Server":"Start Dev Server"})]})}),f?(0,b.jsx)(i.DeploymentStatusBadge,{status:c.status,url:c.url}):null]})}a.s(["BaseDrawer",()=>o],24255),a.s([],78454)},55135,75550,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({title:a,description:d,children:e,className:f}){return(0,b.jsxs)("header",{className:(0,c.cn)("flex items-center justify-between gap-4",f),children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:a}),d?(0,b.jsx)("p",{className:"text-muted-foreground",children:d}):null]}),e?(0,b.jsx)("div",{"data-slot":"actions",children:e}):null]})}a.s(["PageHeader",()=>d],75550),a.s([],55135)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_c52cace8._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/presentation/web/components/common/empty-state/empty-state.tsx","../../../../../../../src/presentation/web/components/common/action-button/action-button.tsx","../../../../../../../src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/square.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/play.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/folder-open.ts","../../../../../../../src/presentation/web/hooks/use-deploy-action.ts","../../../../../../../src/presentation/web/app/actions/data%3Acd2835%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Ae6e109%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Af0ccc6%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Af61b8d%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/ui/drawer.tsx","../../../../../../../node_modules/.pnpm/vaul%401.1.2_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact%4019.2.10_react-dom_df19df48088b932e5faabe47f4659840/node_modules/vaul/dist/index.mjs","../../../../../../../src/presentation/web/components/common/base-drawer/base-drawer.tsx","../../../../../../../src/presentation/web/components/common/page-header/page-header.tsx"],"sourcesContent":["import type { ReactNode, HTMLAttributes } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n}\n\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n ...props\n}: EmptyStateProps) {\n return (\n <div\n className={cn('flex flex-col items-center gap-4 px-4 py-12 text-center', className)}\n {...props}\n >\n {icon ? <div className=\"text-muted-foreground\">{icon}</div> : null}\n <h3 className=\"text-lg font-semibold\">{title}</h3>\n {description ? <p className=\"text-muted-foreground max-w-md text-sm\">{description}</p> : null}\n {action ? <div className=\"mt-2\">{action}</div> : null}\n </div>\n );\n}\n","'use client';\n\nimport type { LucideIcon } from 'lucide-react';\nimport { Loader2, CircleAlert } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\nimport { useSoundAction } from '@/hooks/use-sound-action';\n\nexport interface ActionButtonProps {\n label: string;\n onClick: () => void;\n loading: boolean;\n error: boolean;\n icon: LucideIcon;\n /** When true, omits label text — label is still used as aria-label. */\n iconOnly?: boolean;\n /** Button variant. @default 'outline' */\n variant?: 'outline' | 'ghost' | 'default' | 'destructive' | 'secondary' | 'link';\n /** Button size. @default 'sm' */\n size?: 'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg';\n}\n\nexport function ActionButton({\n label,\n onClick,\n loading,\n error,\n icon: Icon,\n iconOnly = false,\n variant = 'outline',\n size = 'sm',\n}: ActionButtonProps) {\n const clickSound = useSoundAction('click');\n\n const handleClick = () => {\n clickSound.play();\n onClick();\n };\n\n return (\n <Button\n variant={variant}\n size={size}\n aria-label={label}\n disabled={loading}\n onClick={handleClick}\n className={cn(\n 'gap-1.5',\n error && 'text-destructive hover:text-destructive',\n !error &&\n iconOnly &&\n variant === 'ghost' &&\n 'text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500'\n )}\n >\n {loading ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : error ? (\n <CircleAlert className=\"size-4\" />\n ) : (\n <Icon className=\"size-4\" />\n )}\n {iconOnly ? null : label}\n </Button>\n );\n}\n","import { Loader2, ExternalLink } from 'lucide-react';\nimport { DeploymentState } from '@shepai/core/domain/generated/output';\nimport { Badge } from '@/components/ui/badge';\n\nexport interface DeploymentStatusBadgeProps {\n status: DeploymentState | null;\n url?: string | null;\n}\n\nexport function DeploymentStatusBadge({ status, url }: DeploymentStatusBadgeProps) {\n switch (status) {\n case DeploymentState.Booting:\n return (\n <Badge className=\"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50\">\n <Loader2 className=\"mr-1 h-3.5 w-3.5 animate-spin\" />\n Starting...\n </Badge>\n );\n case DeploymentState.Ready:\n return (\n <Badge className=\"border-transparent bg-green-50 text-green-700 hover:bg-green-50\">\n <span className=\"mr-1 inline-block h-2 w-2 rounded-full bg-green-500\" />\n {url ? (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 hover:underline\"\n onClick={(e) => e.stopPropagation()}\n >\n {url}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n ) : (\n 'Ready'\n )}\n </Badge>\n );\n default:\n return null;\n }\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n];\n\n/**\n * @component @name Square\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/square\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Square = createLucideIcon('square', __iconNode);\n\nexport default Square;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z',\n key: '10ikf1',\n },\n ],\n];\n\n/**\n * @component @name Play\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/play\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Play = createLucideIcon('play', __iconNode);\n\nexport default Play;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'm6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2',\n key: 'usdka0',\n },\n ],\n];\n\n/**\n * @component @name FolderOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderOpen = createLucideIcon('folder-open', __iconNode);\n\nexport default FolderOpen;\n","'use client';\n\nimport { useState, useCallback, useRef, useEffect } from 'react';\nimport type { DeploymentState } from '@shepai/core/domain/generated/output';\nimport { deployFeature } from '@/app/actions/deploy-feature';\nimport { deployRepository } from '@/app/actions/deploy-repository';\nimport { stopDeployment } from '@/app/actions/stop-deployment';\nimport { getDeploymentStatus } from '@/app/actions/get-deployment-status';\n\nexport interface DeployActionInput {\n targetId: string;\n targetType: 'feature' | 'repository';\n repositoryPath: string;\n branch?: string;\n}\n\nexport interface DeployActionState {\n deploy: () => Promise<void>;\n stop: () => Promise<void>;\n deployLoading: boolean;\n stopLoading: boolean;\n deployError: string | null;\n status: DeploymentState | null;\n url: string | null;\n}\n\nconst ERROR_CLEAR_DELAY = 5000;\nconst POLL_INTERVAL = 3000;\n\nexport function useDeployAction(input: DeployActionInput | null): DeployActionState {\n const [deployLoading, setDeployLoading] = useState(false);\n const [stopLoading, setStopLoading] = useState(false);\n const [deployError, setDeployError] = useState<string | null>(null);\n const [status, setStatus] = useState<DeploymentState | null>(null);\n const [url, setUrl] = useState<string | null>(null);\n\n const errorTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const pollIntervalRef = useRef<ReturnType<typeof setInterval> | null>(null);\n const mountedRef = useRef(true);\n\n // Track mounted state\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (errorTimerRef.current) clearTimeout(errorTimerRef.current);\n if (pollIntervalRef.current) clearInterval(pollIntervalRef.current);\n };\n }, []);\n\n const stopPolling = useCallback(() => {\n if (pollIntervalRef.current) {\n clearInterval(pollIntervalRef.current);\n pollIntervalRef.current = null;\n }\n }, []);\n\n const startPolling = useCallback(\n (targetId: string) => {\n stopPolling();\n\n pollIntervalRef.current = setInterval(async () => {\n if (!mountedRef.current) {\n stopPolling();\n return;\n }\n\n const result = await getDeploymentStatus(targetId);\n\n if (!mountedRef.current) return;\n\n if (!result || result.state === 'Stopped') {\n setStatus(null);\n setUrl(null);\n stopPolling();\n } else {\n setStatus(result.state as DeploymentState);\n setUrl(result.url);\n }\n }, POLL_INTERVAL);\n },\n [stopPolling]\n );\n\n const handleDeploy = useCallback(async () => {\n if (!input || deployLoading) return;\n\n if (errorTimerRef.current) clearTimeout(errorTimerRef.current);\n\n setDeployLoading(true);\n setDeployError(null);\n\n try {\n const result =\n input.targetType === 'feature'\n ? await deployFeature(input.targetId)\n : await deployRepository(input.repositoryPath);\n\n if (!mountedRef.current) return;\n\n if (!result.success) {\n const errorMessage = result.error ?? 'An unexpected error occurred';\n setDeployError(errorMessage);\n errorTimerRef.current = setTimeout(() => setDeployError(null), ERROR_CLEAR_DELAY);\n } else {\n setStatus(result.state ?? null);\n setUrl(null);\n startPolling(input.targetId);\n }\n } catch (err: unknown) {\n if (!mountedRef.current) return;\n const errorMessage = err instanceof Error ? err.message : 'An unexpected error occurred';\n setDeployError(errorMessage);\n errorTimerRef.current = setTimeout(() => setDeployError(null), ERROR_CLEAR_DELAY);\n } finally {\n if (mountedRef.current) {\n setDeployLoading(false);\n }\n }\n }, [input, deployLoading, startPolling]);\n\n const handleStop = useCallback(async () => {\n if (!input || stopLoading) return;\n\n setStopLoading(true);\n\n try {\n const result = await stopDeployment(input.targetId);\n\n if (!mountedRef.current) return;\n\n if (result.success) {\n stopPolling();\n setStatus(null);\n setUrl(null);\n }\n } catch {\n // Stop errors are non-critical; process may have already exited\n } finally {\n if (mountedRef.current) {\n setStopLoading(false);\n }\n }\n }, [input, stopLoading, stopPolling]);\n\n return {\n deploy: handleDeploy,\n stop: handleStop,\n deployLoading,\n stopLoading,\n deployError,\n status,\n url,\n };\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40b7b90414ae236c8fc508faeaef4b5a9ed1fd702b\":\"deployFeature\"},\"src/presentation/web/app/actions/deploy-feature.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40b7b90414ae236c8fc508faeaef4b5a9ed1fd702b\",callServer,void 0,findSourceMapURL,\"deployFeature\");export{$$RSC_SERVER_ACTION_0 as deployFeature};","/* __next_internal_action_entry_do_not_use__ [{\"40015ffe022cac8955ed69d533655ee9e714863d11\":\"deployRepository\"},\"src/presentation/web/app/actions/deploy-repository.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40015ffe022cac8955ed69d533655ee9e714863d11\",callServer,void 0,findSourceMapURL,\"deployRepository\");export{$$RSC_SERVER_ACTION_0 as deployRepository};","/* __next_internal_action_entry_do_not_use__ [{\"40d37277be3479f63d377b3ac59ac7439f54d4c821\":\"stopDeployment\"},\"src/presentation/web/app/actions/stop-deployment.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40d37277be3479f63d377b3ac59ac7439f54d4c821\",callServer,void 0,findSourceMapURL,\"stopDeployment\");export{$$RSC_SERVER_ACTION_0 as stopDeployment};","/* __next_internal_action_entry_do_not_use__ [{\"40212277f184eee3f9ca0a97f9e213df08697ceada\":\"getDeploymentStatus\"},\"src/presentation/web/app/actions/get-deployment-status.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40212277f184eee3f9ca0a97f9e213df08697ceada\",callServer,void 0,findSourceMapURL,\"getDeploymentStatus\");export{$$RSC_SERVER_ACTION_0 as getDeploymentStatus};","'use client';\n\nimport * as React from 'react';\nimport { XIcon } from 'lucide-react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { cn } from '@/lib/utils';\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn('fixed inset-0 z-50 bg-black/50', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({\n className,\n children,\n direction = 'bottom',\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content> & {\n direction?: 'top' | 'right' | 'bottom' | 'left';\n showCloseButton?: boolean;\n}) {\n return (\n <DrawerPortal>\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'bg-background fixed z-50 flex flex-col shadow-lg',\n direction === 'bottom' && 'inset-x-0 bottom-0 mb-24 rounded-t-lg border-t',\n direction === 'top' && 'inset-x-0 top-0 mt-24 rounded-b-lg border-b',\n direction === 'right' && 'inset-y-0 right-0 h-full w-3/4 border-l',\n direction === 'left' && 'inset-y-0 left-0 h-full w-3/4 border-r',\n className\n )}\n style={\n {\n '--initial-transform':\n direction === 'right'\n ? 'calc(100% + 8px)'\n : direction === 'left'\n ? 'calc(-100% - 8px)'\n : direction === 'top'\n ? 'calc(-100% - 8px)'\n : 'calc(100% + 8px)',\n // Override vaul's user-select:none on [data-vaul-drawer] so text is selectable\n userSelect: 'text',\n ...((props.style as React.CSSProperties) ?? {}),\n } as React.CSSProperties\n }\n {...props}\n >\n {children}\n {showCloseButton ? (\n <DrawerPrimitive.Close className=\"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DrawerPrimitive.Close>\n ) : null}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn('flex flex-col gap-1.5 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerClose,\n DrawerTrigger,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n","'use client';\nfunction __insertCSS(code) {\n if (!code || typeof document == 'undefined') return\n let head = document.head || document.getElementsByTagName('head')[0]\n let style = document.createElement('style')\n style.type = 'text/css'\n head.appendChild(style)\n ;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))\n}\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport * as React from 'react';\nimport React__default, { useLayoutEffect, useEffect, useMemo } from 'react';\n\nconst DrawerContext = React__default.createContext({\n drawerRef: {\n current: null\n },\n overlayRef: {\n current: null\n },\n onPress: ()=>{},\n onRelease: ()=>{},\n onDrag: ()=>{},\n onNestedDrag: ()=>{},\n onNestedOpenChange: ()=>{},\n onNestedRelease: ()=>{},\n openProp: undefined,\n dismissible: false,\n isOpen: false,\n isDragging: false,\n keyboardIsOpen: {\n current: false\n },\n snapPointsOffset: null,\n snapPoints: null,\n handleOnly: false,\n modal: false,\n shouldFade: false,\n activeSnapPoint: null,\n onOpenChange: ()=>{},\n setActiveSnapPoint: ()=>{},\n closeDrawer: ()=>{},\n direction: 'bottom',\n shouldAnimate: {\n current: true\n },\n shouldScaleBackground: false,\n setBackgroundColorOnScale: true,\n noBodyStyles: false,\n container: null,\n autoFocus: false\n});\nconst useDrawerContext = ()=>{\n const context = React__default.useContext(DrawerContext);\n if (!context) {\n throw new Error('useDrawerContext must be used within a Drawer.Root');\n }\n return context;\n};\n\n__insertCSS(\"[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\\n[data-state=closed]\\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}\");\n\nfunction isMobileFirefox() {\n const userAgent = navigator.userAgent;\n return typeof window !== 'undefined' && (/Firefox/.test(userAgent) && /Mobile/.test(userAgent) || // Android Firefox\n /FxiOS/.test(userAgent) // iOS Firefox\n );\n}\nfunction isMac() {\n return testPlatform(/^Mac/);\n}\nfunction isIPhone() {\n return testPlatform(/^iPhone/);\n}\nfunction isSafari() {\n return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n}\nfunction isIPad() {\n return testPlatform(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n isMac() && navigator.maxTouchPoints > 1;\n}\nfunction isIOS() {\n return isIPhone() || isIPad();\n}\nfunction testPlatform(re) {\n return typeof window !== 'undefined' && window.navigator != null ? re.test(window.navigator.platform) : undefined;\n}\n\n// This code comes from https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/overlays/src/usePreventScroll.ts\nconst KEYBOARD_BUFFER = 24;\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nfunction chain$1(...callbacks) {\n return (...args)=>{\n for (let callback of callbacks){\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n };\n}\n// @ts-ignore\nconst visualViewport = typeof document !== 'undefined' && window.visualViewport;\nfunction isScrollable(node) {\n let style = window.getComputedStyle(node);\n return /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n}\nfunction getScrollParent(node) {\n if (isScrollable(node)) {\n node = node.parentElement;\n }\n while(node && !isScrollable(node)){\n node = node.parentElement;\n }\n return node || document.scrollingElement || document.documentElement;\n}\n// HTML input types that do not cause the software keyboard to appear.\nconst nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet preventScrollCount = 0;\nlet restore;\n/**\n * Prevents scrolling on the document body on mount, and\n * restores it on unmount. Also ensures that content does not\n * shift due to the scrollbars disappearing.\n */ function usePreventScroll(options = {}) {\n let { isDisabled } = options;\n useIsomorphicLayoutEffect(()=>{\n if (isDisabled) {\n return;\n }\n preventScrollCount++;\n if (preventScrollCount === 1) {\n if (isIOS()) {\n restore = preventScrollMobileSafari();\n }\n }\n return ()=>{\n preventScrollCount--;\n if (preventScrollCount === 0) {\n restore == null ? void 0 : restore();\n }\n };\n }, [\n isDisabled\n ]);\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Prevent default on `touchmove` events inside a scrollable element when the scroll position is at the\n// top or bottom. This avoids the whole page scrolling instead, but does prevent overscrolling.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction preventScrollMobileSafari() {\n let scrollable;\n let lastY = 0;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = getScrollParent(e.target);\n if (scrollable === document.documentElement && scrollable === document.body) {\n return;\n }\n lastY = e.changedTouches[0].pageY;\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead. Unfortunately, this disables bounce scrolling when at\n // the top but it's the best we can do.\n let y = e.changedTouches[0].pageY;\n let scrollTop = scrollable.scrollTop;\n let bottom = scrollable.scrollHeight - scrollable.clientHeight;\n if (bottom === 0) {\n return;\n }\n if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) {\n e.preventDefault();\n }\n lastY = y;\n };\n let onTouchEnd = (e)=>{\n let target = e.target;\n // Apply this change if we're not already focused on the target element\n if (isInput(target) && target !== document.activeElement) {\n e.preventDefault();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view. When tapping on an input, this needs to\n // be done before the \"focus\" event, so we have to focus the element ourselves.\n target.style.transform = 'translateY(-2000px)';\n target.focus();\n requestAnimationFrame(()=>{\n target.style.transform = '';\n });\n }\n };\n let onFocus = (e)=>{\n let target = e.target;\n if (isInput(target)) {\n // Transform also needs to be applied in the focus event in cases where focus moves\n // other than tapping on an input directly, e.g. the next/previous buttons in the\n // software keyboard. In these cases, it seems applying the transform in the focus event\n // is good enough, whereas when tapping an input, it must be done before the focus event. 🤷♂️\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if (visualViewport) {\n if (visualViewport.height < window.innerHeight) {\n // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n scrollIntoView(target);\n });\n } else {\n // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n visualViewport.addEventListener('resize', ()=>scrollIntoView(target), {\n once: true\n });\n }\n }\n });\n }\n };\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n let restoreStyles = chain$1(setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`));\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n let removeEvents = chain$1(addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), addEvent(document, 'focus', onFocus, true), addEvent(window, 'scroll', onWindowScroll));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreStyles();\n removeEvents();\n window.scrollTo(scrollX, scrollY);\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction setStyle(element, style, value) {\n // https://github.com/microsoft/TypeScript/issues/17827#issuecomment-391663310\n // @ts-ignore\n let cur = element.style[style];\n // @ts-ignore\n element.style[style] = value;\n return ()=>{\n // @ts-ignore\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction addEvent(target, event, handler, options) {\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n while(target && target !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = getScrollParent(target);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== target) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = target.getBoundingClientRect().top;\n let targetBottom = target.getBoundingClientRect().bottom;\n // Buffer is needed for some edge cases\n const keyboardHeight = scrollable.getBoundingClientRect().bottom + KEYBOARD_BUFFER;\n if (targetBottom > keyboardHeight) {\n scrollable.scrollTop += targetTop - scrollableTop;\n }\n }\n // @ts-ignore\n target = scrollable.parentElement;\n }\n}\nfunction isInput(target) {\n return target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n// This code comes from https://github.com/radix-ui/primitives/tree/main/packages/react/compose-refs\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function composeRefs(...refs) {\n return (node)=>refs.forEach((ref)=>setRef(ref, node));\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function useComposedRefs(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nconst cache = new WeakMap();\nfunction set(el, styles, ignoreCache = false) {\n if (!el || !(el instanceof HTMLElement)) return;\n let originalStyles = {};\n Object.entries(styles).forEach(([key, value])=>{\n if (key.startsWith('--')) {\n el.style.setProperty(key, value);\n return;\n }\n originalStyles[key] = el.style[key];\n el.style[key] = value;\n });\n if (ignoreCache) return;\n cache.set(el, originalStyles);\n}\nfunction reset(el, prop) {\n if (!el || !(el instanceof HTMLElement)) return;\n let originalStyles = cache.get(el);\n if (!originalStyles) {\n return;\n }\n {\n el.style[prop] = originalStyles[prop];\n }\n}\nconst isVertical = (direction)=>{\n switch(direction){\n case 'top':\n case 'bottom':\n return true;\n case 'left':\n case 'right':\n return false;\n default:\n return direction;\n }\n};\nfunction getTranslate(element, direction) {\n if (!element) {\n return null;\n }\n const style = window.getComputedStyle(element);\n const transform = // @ts-ignore\n style.transform || style.webkitTransform || style.mozTransform;\n let mat = transform.match(/^matrix3d\\((.+)\\)$/);\n if (mat) {\n // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d\n return parseFloat(mat[1].split(', ')[isVertical(direction) ? 13 : 12]);\n }\n // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix\n mat = transform.match(/^matrix\\((.+)\\)$/);\n return mat ? parseFloat(mat[1].split(', ')[isVertical(direction) ? 5 : 4]) : null;\n}\nfunction dampenValue(v) {\n return 8 * (Math.log(v + 1) - 2);\n}\nfunction assignStyle(element, style) {\n if (!element) return ()=>{};\n const prevStyle = element.style.cssText;\n Object.assign(element.style, style);\n return ()=>{\n element.style.cssText = prevStyle;\n };\n}\n/**\n * Receives functions as arguments and returns a new function that calls all.\n */ function chain(...fns) {\n return (...args)=>{\n for (const fn of fns){\n if (typeof fn === 'function') {\n // @ts-ignore\n fn(...args);\n }\n }\n };\n}\n\nconst TRANSITIONS = {\n DURATION: 0.5,\n EASE: [\n 0.32,\n 0.72,\n 0,\n 1\n ]\n};\nconst VELOCITY_THRESHOLD = 0.4;\nconst CLOSE_THRESHOLD = 0.25;\nconst SCROLL_LOCK_TIMEOUT = 100;\nconst BORDER_RADIUS = 8;\nconst NESTED_DISPLACEMENT = 16;\nconst WINDOW_TOP_OFFSET = 26;\nconst DRAG_CLASS = 'vaul-dragging';\n\n// This code comes from https://github.com/radix-ui/primitives/blob/main/packages/react/use-controllable-state/src/useControllableState.tsx\nfunction useCallbackRef(callback) {\n const callbackRef = React__default.useRef(callback);\n React__default.useEffect(()=>{\n callbackRef.current = callback;\n });\n // https://github.com/facebook/react/issues/19240\n return React__default.useMemo(()=>(...args)=>callbackRef.current == null ? void 0 : callbackRef.current.call(callbackRef, ...args), []);\n}\nfunction useUncontrolledState({ defaultProp, onChange }) {\n const uncontrolledState = React__default.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React__default.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React__default.useEffect(()=>{\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [\n value,\n prevValueRef,\n handleChange\n ]);\n return uncontrolledState;\n}\nfunction useControllableState({ prop, defaultProp, onChange = ()=>{} }) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React__default.useCallback((nextValue)=>{\n if (isControlled) {\n const setter = nextValue;\n const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n if (value !== prop) handleChange(value);\n } else {\n setUncontrolledProp(nextValue);\n }\n }, [\n isControlled,\n prop,\n setUncontrolledProp,\n handleChange\n ]);\n return [\n value,\n setValue\n ];\n}\n\nfunction useSnapPoints({ activeSnapPointProp, setActiveSnapPointProp, snapPoints, drawerRef, overlayRef, fadeFromIndex, onSnapPointChange, direction = 'bottom', container, snapToSequentialPoint }) {\n const [activeSnapPoint, setActiveSnapPoint] = useControllableState({\n prop: activeSnapPointProp,\n defaultProp: snapPoints == null ? void 0 : snapPoints[0],\n onChange: setActiveSnapPointProp\n });\n const [windowDimensions, setWindowDimensions] = React__default.useState(typeof window !== 'undefined' ? {\n innerWidth: window.innerWidth,\n innerHeight: window.innerHeight\n } : undefined);\n React__default.useEffect(()=>{\n function onResize() {\n setWindowDimensions({\n innerWidth: window.innerWidth,\n innerHeight: window.innerHeight\n });\n }\n window.addEventListener('resize', onResize);\n return ()=>window.removeEventListener('resize', onResize);\n }, []);\n const isLastSnapPoint = React__default.useMemo(()=>activeSnapPoint === (snapPoints == null ? void 0 : snapPoints[snapPoints.length - 1]) || null, [\n snapPoints,\n activeSnapPoint\n ]);\n const activeSnapPointIndex = React__default.useMemo(()=>{\n var _snapPoints_findIndex;\n return (_snapPoints_findIndex = snapPoints == null ? void 0 : snapPoints.findIndex((snapPoint)=>snapPoint === activeSnapPoint)) != null ? _snapPoints_findIndex : null;\n }, [\n snapPoints,\n activeSnapPoint\n ]);\n const shouldFade = snapPoints && snapPoints.length > 0 && (fadeFromIndex || fadeFromIndex === 0) && !Number.isNaN(fadeFromIndex) && snapPoints[fadeFromIndex] === activeSnapPoint || !snapPoints;\n const snapPointsOffset = React__default.useMemo(()=>{\n const containerSize = container ? {\n width: container.getBoundingClientRect().width,\n height: container.getBoundingClientRect().height\n } : typeof window !== 'undefined' ? {\n width: window.innerWidth,\n height: window.innerHeight\n } : {\n width: 0,\n height: 0\n };\n var _snapPoints_map;\n return (_snapPoints_map = snapPoints == null ? void 0 : snapPoints.map((snapPoint)=>{\n const isPx = typeof snapPoint === 'string';\n let snapPointAsNumber = 0;\n if (isPx) {\n snapPointAsNumber = parseInt(snapPoint, 10);\n }\n if (isVertical(direction)) {\n const height = isPx ? snapPointAsNumber : windowDimensions ? snapPoint * containerSize.height : 0;\n if (windowDimensions) {\n return direction === 'bottom' ? containerSize.height - height : -containerSize.height + height;\n }\n return height;\n }\n const width = isPx ? snapPointAsNumber : windowDimensions ? snapPoint * containerSize.width : 0;\n if (windowDimensions) {\n return direction === 'right' ? containerSize.width - width : -containerSize.width + width;\n }\n return width;\n })) != null ? _snapPoints_map : [];\n }, [\n snapPoints,\n windowDimensions,\n container\n ]);\n const activeSnapPointOffset = React__default.useMemo(()=>activeSnapPointIndex !== null ? snapPointsOffset == null ? void 0 : snapPointsOffset[activeSnapPointIndex] : null, [\n snapPointsOffset,\n activeSnapPointIndex\n ]);\n const snapToPoint = React__default.useCallback((dimension)=>{\n var _snapPointsOffset_findIndex;\n const newSnapPointIndex = (_snapPointsOffset_findIndex = snapPointsOffset == null ? void 0 : snapPointsOffset.findIndex((snapPointDim)=>snapPointDim === dimension)) != null ? _snapPointsOffset_findIndex : null;\n onSnapPointChange(newSnapPointIndex);\n set(drawerRef.current, {\n transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,\n transform: isVertical(direction) ? `translate3d(0, ${dimension}px, 0)` : `translate3d(${dimension}px, 0, 0)`\n });\n if (snapPointsOffset && newSnapPointIndex !== snapPointsOffset.length - 1 && fadeFromIndex !== undefined && newSnapPointIndex !== fadeFromIndex && newSnapPointIndex < fadeFromIndex) {\n set(overlayRef.current, {\n transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,\n opacity: '0'\n });\n } else {\n set(overlayRef.current, {\n transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,\n opacity: '1'\n });\n }\n setActiveSnapPoint(snapPoints == null ? void 0 : snapPoints[Math.max(newSnapPointIndex, 0)]);\n }, [\n drawerRef.current,\n snapPoints,\n snapPointsOffset,\n fadeFromIndex,\n overlayRef,\n setActiveSnapPoint\n ]);\n React__default.useEffect(()=>{\n if (activeSnapPoint || activeSnapPointProp) {\n var _snapPoints_findIndex;\n const newIndex = (_snapPoints_findIndex = snapPoints == null ? void 0 : snapPoints.findIndex((snapPoint)=>snapPoint === activeSnapPointProp || snapPoint === activeSnapPoint)) != null ? _snapPoints_findIndex : -1;\n if (snapPointsOffset && newIndex !== -1 && typeof snapPointsOffset[newIndex] === 'number') {\n snapToPoint(snapPointsOffset[newIndex]);\n }\n }\n }, [\n activeSnapPoint,\n activeSnapPointProp,\n snapPoints,\n snapPointsOffset,\n snapToPoint\n ]);\n function onRelease({ draggedDistance, closeDrawer, velocity, dismissible }) {\n if (fadeFromIndex === undefined) return;\n const currentPosition = direction === 'bottom' || direction === 'right' ? (activeSnapPointOffset != null ? activeSnapPointOffset : 0) - draggedDistance : (activeSnapPointOffset != null ? activeSnapPointOffset : 0) + draggedDistance;\n const isOverlaySnapPoint = activeSnapPointIndex === fadeFromIndex - 1;\n const isFirst = activeSnapPointIndex === 0;\n const hasDraggedUp = draggedDistance > 0;\n if (isOverlaySnapPoint) {\n set(overlayRef.current, {\n transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`\n });\n }\n if (!snapToSequentialPoint && velocity > 2 && !hasDraggedUp) {\n if (dismissible) closeDrawer();\n else snapToPoint(snapPointsOffset[0]); // snap to initial point\n return;\n }\n if (!snapToSequentialPoint && velocity > 2 && hasDraggedUp && snapPointsOffset && snapPoints) {\n snapToPoint(snapPointsOffset[snapPoints.length - 1]);\n return;\n }\n // Find the closest snap point to the current position\n const closestSnapPoint = snapPointsOffset == null ? void 0 : snapPointsOffset.reduce((prev, curr)=>{\n if (typeof prev !== 'number' || typeof curr !== 'number') return prev;\n return Math.abs(curr - currentPosition) < Math.abs(prev - currentPosition) ? curr : prev;\n });\n const dim = isVertical(direction) ? window.innerHeight : window.innerWidth;\n if (velocity > VELOCITY_THRESHOLD && Math.abs(draggedDistance) < dim * 0.4) {\n const dragDirection = hasDraggedUp ? 1 : -1; // 1 = up, -1 = down\n // Don't do anything if we swipe upwards while being on the last snap point\n if (dragDirection > 0 && isLastSnapPoint && snapPoints) {\n snapToPoint(snapPointsOffset[snapPoints.length - 1]);\n return;\n }\n if (isFirst && dragDirection < 0 && dismissible) {\n closeDrawer();\n }\n if (activeSnapPointIndex === null) return;\n snapToPoint(snapPointsOffset[activeSnapPointIndex + dragDirection]);\n return;\n }\n snapToPoint(closestSnapPoint);\n }\n function onDrag({ draggedDistance }) {\n if (activeSnapPointOffset === null) return;\n const newValue = direction === 'bottom' || direction === 'right' ? activeSnapPointOffset - draggedDistance : activeSnapPointOffset + draggedDistance;\n // Don't do anything if we exceed the last(biggest) snap point\n if ((direction === 'bottom' || direction === 'right') && newValue < snapPointsOffset[snapPointsOffset.length - 1]) {\n return;\n }\n if ((direction === 'top' || direction === 'left') && newValue > snapPointsOffset[snapPointsOffset.length - 1]) {\n return;\n }\n set(drawerRef.current, {\n transform: isVertical(direction) ? `translate3d(0, ${newValue}px, 0)` : `translate3d(${newValue}px, 0, 0)`\n });\n }\n function getPercentageDragged(absDraggedDistance, isDraggingDown) {\n if (!snapPoints || typeof activeSnapPointIndex !== 'number' || !snapPointsOffset || fadeFromIndex === undefined) return null;\n // If this is true we are dragging to a snap point that is supposed to have an overlay\n const isOverlaySnapPoint = activeSnapPointIndex === fadeFromIndex - 1;\n const isOverlaySnapPointOrHigher = activeSnapPointIndex >= fadeFromIndex;\n if (isOverlaySnapPointOrHigher && isDraggingDown) {\n return 0;\n }\n // Don't animate, but still use this one if we are dragging away from the overlaySnapPoint\n if (isOverlaySnapPoint && !isDraggingDown) return 1;\n if (!shouldFade && !isOverlaySnapPoint) return null;\n // Either fadeFrom index or the one before\n const targetSnapPointIndex = isOverlaySnapPoint ? activeSnapPointIndex + 1 : activeSnapPointIndex - 1;\n // Get the distance from overlaySnapPoint to the one before or vice-versa to calculate the opacity percentage accordingly\n const snapPointDistance = isOverlaySnapPoint ? snapPointsOffset[targetSnapPointIndex] - snapPointsOffset[targetSnapPointIndex - 1] : snapPointsOffset[targetSnapPointIndex + 1] - snapPointsOffset[targetSnapPointIndex];\n const percentageDragged = absDraggedDistance / Math.abs(snapPointDistance);\n if (isOverlaySnapPoint) {\n return 1 - percentageDragged;\n } else {\n return percentageDragged;\n }\n }\n return {\n isLastSnapPoint,\n activeSnapPoint,\n shouldFade,\n getPercentageDragged,\n setActiveSnapPoint,\n activeSnapPointIndex,\n onRelease,\n onDrag,\n snapPointsOffset\n };\n}\n\nconst noop = ()=>()=>{};\nfunction useScaleBackground() {\n const { direction, isOpen, shouldScaleBackground, setBackgroundColorOnScale, noBodyStyles } = useDrawerContext();\n const timeoutIdRef = React__default.useRef(null);\n const initialBackgroundColor = useMemo(()=>document.body.style.backgroundColor, []);\n function getScale() {\n return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth;\n }\n React__default.useEffect(()=>{\n if (isOpen && shouldScaleBackground) {\n if (timeoutIdRef.current) clearTimeout(timeoutIdRef.current);\n const wrapper = document.querySelector('[data-vaul-drawer-wrapper]') || document.querySelector('[vaul-drawer-wrapper]');\n if (!wrapper) return;\n chain(setBackgroundColorOnScale && !noBodyStyles ? assignStyle(document.body, {\n background: 'black'\n }) : noop, assignStyle(wrapper, {\n transformOrigin: isVertical(direction) ? 'top' : 'left',\n transitionProperty: 'transform, border-radius',\n transitionDuration: `${TRANSITIONS.DURATION}s`,\n transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(',')})`\n }));\n const wrapperStylesCleanup = assignStyle(wrapper, {\n borderRadius: `${BORDER_RADIUS}px`,\n overflow: 'hidden',\n ...isVertical(direction) ? {\n transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`\n } : {\n transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`\n }\n });\n return ()=>{\n wrapperStylesCleanup();\n timeoutIdRef.current = window.setTimeout(()=>{\n if (initialBackgroundColor) {\n document.body.style.background = initialBackgroundColor;\n } else {\n document.body.style.removeProperty('background');\n }\n }, TRANSITIONS.DURATION * 1000);\n };\n }\n }, [\n isOpen,\n shouldScaleBackground,\n initialBackgroundColor\n ]);\n}\n\nlet previousBodyPosition = null;\n/**\n * This hook is necessary to prevent buggy behavior on iOS devices (need to test on Android).\n * I won't get into too much detail about what bugs it solves, but so far I've found that setting the body to `position: fixed` is the most reliable way to prevent those bugs.\n * Issues that this hook solves:\n * https://github.com/emilkowalski/vaul/issues/435\n * https://github.com/emilkowalski/vaul/issues/433\n * And more that I discovered, but were just not reported.\n */ function usePositionFixed({ isOpen, modal, nested, hasBeenOpened, preventScrollRestoration, noBodyStyles }) {\n const [activeUrl, setActiveUrl] = React__default.useState(()=>typeof window !== 'undefined' ? window.location.href : '');\n const scrollPos = React__default.useRef(0);\n const setPositionFixed = React__default.useCallback(()=>{\n // All browsers on iOS will return true here.\n if (!isSafari()) return;\n // If previousBodyPosition is already set, don't set it again.\n if (previousBodyPosition === null && isOpen && !noBodyStyles) {\n previousBodyPosition = {\n position: document.body.style.position,\n top: document.body.style.top,\n left: document.body.style.left,\n height: document.body.style.height,\n right: 'unset'\n };\n // Update the dom inside an animation frame\n const { scrollX, innerHeight } = window;\n document.body.style.setProperty('position', 'fixed', 'important');\n Object.assign(document.body.style, {\n top: `${-scrollPos.current}px`,\n left: `${-scrollX}px`,\n right: '0px',\n height: 'auto'\n });\n window.setTimeout(()=>window.requestAnimationFrame(()=>{\n // Attempt to check if the bottom bar appeared due to the position change\n const bottomBarHeight = innerHeight - window.innerHeight;\n if (bottomBarHeight && scrollPos.current >= innerHeight) {\n // Move the content further up so that the bottom bar doesn't hide it\n document.body.style.top = `${-(scrollPos.current + bottomBarHeight)}px`;\n }\n }), 300);\n }\n }, [\n isOpen\n ]);\n const restorePositionSetting = React__default.useCallback(()=>{\n // All browsers on iOS will return true here.\n if (!isSafari()) return;\n if (previousBodyPosition !== null && !noBodyStyles) {\n // Convert the position from \"px\" to Int\n const y = -parseInt(document.body.style.top, 10);\n const x = -parseInt(document.body.style.left, 10);\n // Restore styles\n Object.assign(document.body.style, previousBodyPosition);\n window.requestAnimationFrame(()=>{\n if (preventScrollRestoration && activeUrl !== window.location.href) {\n setActiveUrl(window.location.href);\n return;\n }\n window.scrollTo(x, y);\n });\n previousBodyPosition = null;\n }\n }, [\n activeUrl\n ]);\n React__default.useEffect(()=>{\n function onScroll() {\n scrollPos.current = window.scrollY;\n }\n onScroll();\n window.addEventListener('scroll', onScroll);\n return ()=>{\n window.removeEventListener('scroll', onScroll);\n };\n }, []);\n React__default.useEffect(()=>{\n if (!modal) return;\n return ()=>{\n if (typeof document === 'undefined') return;\n // Another drawer is opened, safe to ignore the execution\n const hasDrawerOpened = !!document.querySelector('[data-vaul-drawer]');\n if (hasDrawerOpened) return;\n restorePositionSetting();\n };\n }, [\n modal,\n restorePositionSetting\n ]);\n React__default.useEffect(()=>{\n if (nested || !hasBeenOpened) return;\n // This is needed to force Safari toolbar to show **before** the drawer starts animating to prevent a gnarly shift from happening\n if (isOpen) {\n // avoid for standalone mode (PWA)\n const isStandalone = window.matchMedia('(display-mode: standalone)').matches;\n !isStandalone && setPositionFixed();\n if (!modal) {\n window.setTimeout(()=>{\n restorePositionSetting();\n }, 500);\n }\n } else {\n restorePositionSetting();\n }\n }, [\n isOpen,\n hasBeenOpened,\n activeUrl,\n modal,\n nested,\n setPositionFixed,\n restorePositionSetting\n ]);\n return {\n restorePositionSetting\n };\n}\n\nfunction Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground = false, setBackgroundColorOnScale = true, closeThreshold = CLOSE_THRESHOLD, scrollLockTimeout = SCROLL_LOCK_TIMEOUT, dismissible = true, handleOnly = false, fadeFromIndex = snapPoints && snapPoints.length - 1, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal = true, onClose, nested, noBodyStyles = false, direction = 'bottom', defaultOpen = false, disablePreventScroll = true, snapToSequentialPoint = false, preventScrollRestoration = false, repositionInputs = true, onAnimationEnd, container, autoFocus = false }) {\n var _drawerRef_current, _drawerRef_current1;\n const [isOpen = false, setIsOpen] = useControllableState({\n defaultProp: defaultOpen,\n prop: openProp,\n onChange: (o)=>{\n onOpenChange == null ? void 0 : onOpenChange(o);\n if (!o && !nested) {\n restorePositionSetting();\n }\n setTimeout(()=>{\n onAnimationEnd == null ? void 0 : onAnimationEnd(o);\n }, TRANSITIONS.DURATION * 1000);\n if (o && !modal) {\n if (typeof window !== 'undefined') {\n window.requestAnimationFrame(()=>{\n document.body.style.pointerEvents = 'auto';\n });\n }\n }\n if (!o) {\n // This will be removed when the exit animation ends (`500ms`)\n document.body.style.pointerEvents = 'auto';\n }\n }\n });\n const [hasBeenOpened, setHasBeenOpened] = React__default.useState(false);\n const [isDragging, setIsDragging] = React__default.useState(false);\n const [justReleased, setJustReleased] = React__default.useState(false);\n const overlayRef = React__default.useRef(null);\n const openTime = React__default.useRef(null);\n const dragStartTime = React__default.useRef(null);\n const dragEndTime = React__default.useRef(null);\n const lastTimeDragPrevented = React__default.useRef(null);\n const isAllowedToDrag = React__default.useRef(false);\n const nestedOpenChangeTimer = React__default.useRef(null);\n const pointerStart = React__default.useRef(0);\n const keyboardIsOpen = React__default.useRef(false);\n const shouldAnimate = React__default.useRef(!defaultOpen);\n const previousDiffFromInitial = React__default.useRef(0);\n const drawerRef = React__default.useRef(null);\n const drawerHeightRef = React__default.useRef(((_drawerRef_current = drawerRef.current) == null ? void 0 : _drawerRef_current.getBoundingClientRect().height) || 0);\n const drawerWidthRef = React__default.useRef(((_drawerRef_current1 = drawerRef.current) == null ? void 0 : _drawerRef_current1.getBoundingClientRect().width) || 0);\n const initialDrawerHeight = React__default.useRef(0);\n const onSnapPointChange = React__default.useCallback((activeSnapPointIndex)=>{\n // Change openTime ref when we reach the last snap point to prevent dragging for 500ms incase it's scrollable.\n if (snapPoints && activeSnapPointIndex === snapPointsOffset.length - 1) openTime.current = new Date();\n }, []);\n const { activeSnapPoint, activeSnapPointIndex, setActiveSnapPoint, onRelease: onReleaseSnapPoints, snapPointsOffset, onDrag: onDragSnapPoints, shouldFade, getPercentageDragged: getSnapPointsPercentageDragged } = useSnapPoints({\n snapPoints,\n activeSnapPointProp,\n setActiveSnapPointProp,\n drawerRef,\n fadeFromIndex,\n overlayRef,\n onSnapPointChange,\n direction,\n container,\n snapToSequentialPoint\n });\n usePreventScroll({\n isDisabled: !isOpen || isDragging || !modal || justReleased || !hasBeenOpened || !repositionInputs || !disablePreventScroll\n });\n const { restorePositionSetting } = usePositionFixed({\n isOpen,\n modal,\n nested: nested != null ? nested : false,\n hasBeenOpened,\n preventScrollRestoration,\n noBodyStyles\n });\n function getScale() {\n return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth;\n }\n function onPress(event) {\n var _drawerRef_current, _drawerRef_current1;\n if (!dismissible && !snapPoints) return;\n if (drawerRef.current && !drawerRef.current.contains(event.target)) return;\n drawerHeightRef.current = ((_drawerRef_current = drawerRef.current) == null ? void 0 : _drawerRef_current.getBoundingClientRect().height) || 0;\n drawerWidthRef.current = ((_drawerRef_current1 = drawerRef.current) == null ? void 0 : _drawerRef_current1.getBoundingClientRect().width) || 0;\n setIsDragging(true);\n dragStartTime.current = new Date();\n // iOS doesn't trigger mouseUp after scrolling so we need to listen to touched in order to disallow dragging\n if (isIOS()) {\n window.addEventListener('touchend', ()=>isAllowedToDrag.current = false, {\n once: true\n });\n }\n // Ensure we maintain correct pointer capture even when going outside of the drawer\n event.target.setPointerCapture(event.pointerId);\n pointerStart.current = isVertical(direction) ? event.pageY : event.pageX;\n }\n function shouldDrag(el, isDraggingInDirection) {\n var _window_getSelection;\n let element = el;\n const highlightedText = (_window_getSelection = window.getSelection()) == null ? void 0 : _window_getSelection.toString();\n const swipeAmount = drawerRef.current ? getTranslate(drawerRef.current, direction) : null;\n const date = new Date();\n // Fixes https://github.com/emilkowalski/vaul/issues/483\n if (element.tagName === 'SELECT') {\n return false;\n }\n if (element.hasAttribute('data-vaul-no-drag') || element.closest('[data-vaul-no-drag]')) {\n return false;\n }\n if (direction === 'right' || direction === 'left') {\n return true;\n }\n // Allow scrolling when animating\n if (openTime.current && date.getTime() - openTime.current.getTime() < 500) {\n return false;\n }\n if (swipeAmount !== null) {\n if (direction === 'bottom' ? swipeAmount > 0 : swipeAmount < 0) {\n return true;\n }\n }\n // Don't drag if there's highlighted text\n if (highlightedText && highlightedText.length > 0) {\n return false;\n }\n // Disallow dragging if drawer was scrolled within `scrollLockTimeout`\n if (lastTimeDragPrevented.current && date.getTime() - lastTimeDragPrevented.current.getTime() < scrollLockTimeout && swipeAmount === 0) {\n lastTimeDragPrevented.current = date;\n return false;\n }\n if (isDraggingInDirection) {\n lastTimeDragPrevented.current = date;\n // We are dragging down so we should allow scrolling\n return false;\n }\n // Keep climbing up the DOM tree as long as there's a parent\n while(element){\n // Check if the element is scrollable\n if (element.scrollHeight > element.clientHeight) {\n if (element.scrollTop !== 0) {\n lastTimeDragPrevented.current = new Date();\n // The element is scrollable and not scrolled to the top, so don't drag\n return false;\n }\n if (element.getAttribute('role') === 'dialog') {\n return true;\n }\n }\n // Move up to the parent element\n element = element.parentNode;\n }\n // No scrollable parents not scrolled to the top found, so drag\n return true;\n }\n function onDrag(event) {\n if (!drawerRef.current) {\n return;\n }\n // We need to know how much of the drawer has been dragged in percentages so that we can transform background accordingly\n if (isDragging) {\n const directionMultiplier = direction === 'bottom' || direction === 'right' ? 1 : -1;\n const draggedDistance = (pointerStart.current - (isVertical(direction) ? event.pageY : event.pageX)) * directionMultiplier;\n const isDraggingInDirection = draggedDistance > 0;\n // Pre condition for disallowing dragging in the close direction.\n const noCloseSnapPointsPreCondition = snapPoints && !dismissible && !isDraggingInDirection;\n // Disallow dragging down to close when first snap point is the active one and dismissible prop is set to false.\n if (noCloseSnapPointsPreCondition && activeSnapPointIndex === 0) return;\n // We need to capture last time when drag with scroll was triggered and have a timeout between\n const absDraggedDistance = Math.abs(draggedDistance);\n const wrapper = document.querySelector('[data-vaul-drawer-wrapper]');\n const drawerDimension = direction === 'bottom' || direction === 'top' ? drawerHeightRef.current : drawerWidthRef.current;\n // Calculate the percentage dragged, where 1 is the closed position\n let percentageDragged = absDraggedDistance / drawerDimension;\n const snapPointPercentageDragged = getSnapPointsPercentageDragged(absDraggedDistance, isDraggingInDirection);\n if (snapPointPercentageDragged !== null) {\n percentageDragged = snapPointPercentageDragged;\n }\n // Disallow close dragging beyond the smallest snap point.\n if (noCloseSnapPointsPreCondition && percentageDragged >= 1) {\n return;\n }\n if (!isAllowedToDrag.current && !shouldDrag(event.target, isDraggingInDirection)) return;\n drawerRef.current.classList.add(DRAG_CLASS);\n // If shouldDrag gave true once after pressing down on the drawer, we set isAllowedToDrag to true and it will remain true until we let go, there's no reason to disable dragging mid way, ever, and that's the solution to it\n isAllowedToDrag.current = true;\n set(drawerRef.current, {\n transition: 'none'\n });\n set(overlayRef.current, {\n transition: 'none'\n });\n if (snapPoints) {\n onDragSnapPoints({\n draggedDistance\n });\n }\n // Run this only if snapPoints are not defined or if we are at the last snap point (highest one)\n if (isDraggingInDirection && !snapPoints) {\n const dampenedDraggedDistance = dampenValue(draggedDistance);\n const translateValue = Math.min(dampenedDraggedDistance * -1, 0) * directionMultiplier;\n set(drawerRef.current, {\n transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`\n });\n return;\n }\n const opacityValue = 1 - percentageDragged;\n if (shouldFade || fadeFromIndex && activeSnapPointIndex === fadeFromIndex - 1) {\n onDragProp == null ? void 0 : onDragProp(event, percentageDragged);\n set(overlayRef.current, {\n opacity: `${opacityValue}`,\n transition: 'none'\n }, true);\n }\n if (wrapper && overlayRef.current && shouldScaleBackground) {\n // Calculate percentageDragged as a fraction (0 to 1)\n const scaleValue = Math.min(getScale() + percentageDragged * (1 - getScale()), 1);\n const borderRadiusValue = 8 - percentageDragged * 8;\n const translateValue = Math.max(0, 14 - percentageDragged * 14);\n set(wrapper, {\n borderRadius: `${borderRadiusValue}px`,\n transform: isVertical(direction) ? `scale(${scaleValue}) translate3d(0, ${translateValue}px, 0)` : `scale(${scaleValue}) translate3d(${translateValue}px, 0, 0)`,\n transition: 'none'\n }, true);\n }\n if (!snapPoints) {\n const translateValue = absDraggedDistance * directionMultiplier;\n set(drawerRef.current, {\n transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`\n });\n }\n }\n }\n React__default.useEffect(()=>{\n window.requestAnimationFrame(()=>{\n shouldAnimate.current = true;\n });\n }, []);\n React__default.useEffect(()=>{\n var _window_visualViewport;\n function onVisualViewportChange() {\n if (!drawerRef.current || !repositionInputs) return;\n const focusedElement = document.activeElement;\n if (isInput(focusedElement) || keyboardIsOpen.current) {\n var _window_visualViewport;\n const visualViewportHeight = ((_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.height) || 0;\n const totalHeight = window.innerHeight;\n // This is the height of the keyboard\n let diffFromInitial = totalHeight - visualViewportHeight;\n const drawerHeight = drawerRef.current.getBoundingClientRect().height || 0;\n // Adjust drawer height only if it's tall enough\n const isTallEnough = drawerHeight > totalHeight * 0.8;\n if (!initialDrawerHeight.current) {\n initialDrawerHeight.current = drawerHeight;\n }\n const offsetFromTop = drawerRef.current.getBoundingClientRect().top;\n // visualViewport height may change due to somq e subtle changes to the keyboard. Checking if the height changed by 60 or more will make sure that they keyboard really changed its open state.\n if (Math.abs(previousDiffFromInitial.current - diffFromInitial) > 60) {\n keyboardIsOpen.current = !keyboardIsOpen.current;\n }\n if (snapPoints && snapPoints.length > 0 && snapPointsOffset && activeSnapPointIndex) {\n const activeSnapPointHeight = snapPointsOffset[activeSnapPointIndex] || 0;\n diffFromInitial += activeSnapPointHeight;\n }\n previousDiffFromInitial.current = diffFromInitial;\n // We don't have to change the height if the input is in view, when we are here we are in the opened keyboard state so we can correctly check if the input is in view\n if (drawerHeight > visualViewportHeight || keyboardIsOpen.current) {\n const height = drawerRef.current.getBoundingClientRect().height;\n let newDrawerHeight = height;\n if (height > visualViewportHeight) {\n newDrawerHeight = visualViewportHeight - (isTallEnough ? offsetFromTop : WINDOW_TOP_OFFSET);\n }\n // When fixed, don't move the drawer upwards if there's space, but rather only change it's height so it's fully scrollable when the keyboard is open\n if (fixed) {\n drawerRef.current.style.height = `${height - Math.max(diffFromInitial, 0)}px`;\n } else {\n drawerRef.current.style.height = `${Math.max(newDrawerHeight, visualViewportHeight - offsetFromTop)}px`;\n }\n } else if (!isMobileFirefox()) {\n drawerRef.current.style.height = `${initialDrawerHeight.current}px`;\n }\n if (snapPoints && snapPoints.length > 0 && !keyboardIsOpen.current) {\n drawerRef.current.style.bottom = `0px`;\n } else {\n // Negative bottom value would never make sense\n drawerRef.current.style.bottom = `${Math.max(diffFromInitial, 0)}px`;\n }\n }\n }\n (_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.addEventListener('resize', onVisualViewportChange);\n return ()=>{\n var _window_visualViewport;\n return (_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.removeEventListener('resize', onVisualViewportChange);\n };\n }, [\n activeSnapPointIndex,\n snapPoints,\n snapPointsOffset\n ]);\n function closeDrawer(fromWithin) {\n cancelDrag();\n onClose == null ? void 0 : onClose();\n if (!fromWithin) {\n setIsOpen(false);\n }\n setTimeout(()=>{\n if (snapPoints) {\n setActiveSnapPoint(snapPoints[0]);\n }\n }, TRANSITIONS.DURATION * 1000); // seconds to ms\n }\n function resetDrawer() {\n if (!drawerRef.current) return;\n const wrapper = document.querySelector('[data-vaul-drawer-wrapper]');\n const currentSwipeAmount = getTranslate(drawerRef.current, direction);\n set(drawerRef.current, {\n transform: 'translate3d(0, 0, 0)',\n transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`\n });\n set(overlayRef.current, {\n transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,\n opacity: '1'\n });\n // Don't reset background if swiped upwards\n if (shouldScaleBackground && currentSwipeAmount && currentSwipeAmount > 0 && isOpen) {\n set(wrapper, {\n borderRadius: `${BORDER_RADIUS}px`,\n overflow: 'hidden',\n ...isVertical(direction) ? {\n transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,\n transformOrigin: 'top'\n } : {\n transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,\n transformOrigin: 'left'\n },\n transitionProperty: 'transform, border-radius',\n transitionDuration: `${TRANSITIONS.DURATION}s`,\n transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(',')})`\n }, true);\n }\n }\n function cancelDrag() {\n if (!isDragging || !drawerRef.current) return;\n drawerRef.current.classList.remove(DRAG_CLASS);\n isAllowedToDrag.current = false;\n setIsDragging(false);\n dragEndTime.current = new Date();\n }\n function onRelease(event) {\n if (!isDragging || !drawerRef.current) return;\n drawerRef.current.classList.remove(DRAG_CLASS);\n isAllowedToDrag.current = false;\n setIsDragging(false);\n dragEndTime.current = new Date();\n const swipeAmount = getTranslate(drawerRef.current, direction);\n if (!event || !shouldDrag(event.target, false) || !swipeAmount || Number.isNaN(swipeAmount)) return;\n if (dragStartTime.current === null) return;\n const timeTaken = dragEndTime.current.getTime() - dragStartTime.current.getTime();\n const distMoved = pointerStart.current - (isVertical(direction) ? event.pageY : event.pageX);\n const velocity = Math.abs(distMoved) / timeTaken;\n if (velocity > 0.05) {\n // `justReleased` is needed to prevent the drawer from focusing on an input when the drag ends, as it's not the intent most of the time.\n setJustReleased(true);\n setTimeout(()=>{\n setJustReleased(false);\n }, 200);\n }\n if (snapPoints) {\n const directionMultiplier = direction === 'bottom' || direction === 'right' ? 1 : -1;\n onReleaseSnapPoints({\n draggedDistance: distMoved * directionMultiplier,\n closeDrawer,\n velocity,\n dismissible\n });\n onReleaseProp == null ? void 0 : onReleaseProp(event, true);\n return;\n }\n // Moved upwards, don't do anything\n if (direction === 'bottom' || direction === 'right' ? distMoved > 0 : distMoved < 0) {\n resetDrawer();\n onReleaseProp == null ? void 0 : onReleaseProp(event, true);\n return;\n }\n if (velocity > VELOCITY_THRESHOLD) {\n closeDrawer();\n onReleaseProp == null ? void 0 : onReleaseProp(event, false);\n return;\n }\n var _drawerRef_current_getBoundingClientRect_height;\n const visibleDrawerHeight = Math.min((_drawerRef_current_getBoundingClientRect_height = drawerRef.current.getBoundingClientRect().height) != null ? _drawerRef_current_getBoundingClientRect_height : 0, window.innerHeight);\n var _drawerRef_current_getBoundingClientRect_width;\n const visibleDrawerWidth = Math.min((_drawerRef_current_getBoundingClientRect_width = drawerRef.current.getBoundingClientRect().width) != null ? _drawerRef_current_getBoundingClientRect_width : 0, window.innerWidth);\n const isHorizontalSwipe = direction === 'left' || direction === 'right';\n if (Math.abs(swipeAmount) >= (isHorizontalSwipe ? visibleDrawerWidth : visibleDrawerHeight) * closeThreshold) {\n closeDrawer();\n onReleaseProp == null ? void 0 : onReleaseProp(event, false);\n return;\n }\n onReleaseProp == null ? void 0 : onReleaseProp(event, true);\n resetDrawer();\n }\n React__default.useEffect(()=>{\n // Trigger enter animation without using CSS animation\n if (isOpen) {\n set(document.documentElement, {\n scrollBehavior: 'auto'\n });\n openTime.current = new Date();\n }\n return ()=>{\n reset(document.documentElement, 'scrollBehavior');\n };\n }, [\n isOpen\n ]);\n function onNestedOpenChange(o) {\n const scale = o ? (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth : 1;\n const initialTranslate = o ? -NESTED_DISPLACEMENT : 0;\n if (nestedOpenChangeTimer.current) {\n window.clearTimeout(nestedOpenChangeTimer.current);\n }\n set(drawerRef.current, {\n transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,\n transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${initialTranslate}px, 0)` : `scale(${scale}) translate3d(${initialTranslate}px, 0, 0)`\n });\n if (!o && drawerRef.current) {\n nestedOpenChangeTimer.current = setTimeout(()=>{\n const translateValue = getTranslate(drawerRef.current, direction);\n set(drawerRef.current, {\n transition: 'none',\n transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`\n });\n }, 500);\n }\n }\n function onNestedDrag(_event, percentageDragged) {\n if (percentageDragged < 0) return;\n const initialScale = (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth;\n const newScale = initialScale + percentageDragged * (1 - initialScale);\n const newTranslate = -NESTED_DISPLACEMENT + percentageDragged * NESTED_DISPLACEMENT;\n set(drawerRef.current, {\n transform: isVertical(direction) ? `scale(${newScale}) translate3d(0, ${newTranslate}px, 0)` : `scale(${newScale}) translate3d(${newTranslate}px, 0, 0)`,\n transition: 'none'\n });\n }\n function onNestedRelease(_event, o) {\n const dim = isVertical(direction) ? window.innerHeight : window.innerWidth;\n const scale = o ? (dim - NESTED_DISPLACEMENT) / dim : 1;\n const translate = o ? -NESTED_DISPLACEMENT : 0;\n if (o) {\n set(drawerRef.current, {\n transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,\n transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${translate}px, 0)` : `scale(${scale}) translate3d(${translate}px, 0, 0)`\n });\n }\n }\n React__default.useEffect(()=>{\n if (!modal) {\n // Need to do this manually unfortunately\n window.requestAnimationFrame(()=>{\n document.body.style.pointerEvents = 'auto';\n });\n }\n }, [\n modal\n ]);\n return /*#__PURE__*/ React__default.createElement(DialogPrimitive.Root, {\n defaultOpen: defaultOpen,\n onOpenChange: (open)=>{\n if (!dismissible && !open) return;\n if (open) {\n setHasBeenOpened(true);\n } else {\n closeDrawer(true);\n }\n setIsOpen(open);\n },\n open: isOpen\n }, /*#__PURE__*/ React__default.createElement(DrawerContext.Provider, {\n value: {\n activeSnapPoint,\n snapPoints,\n setActiveSnapPoint,\n drawerRef,\n overlayRef,\n onOpenChange,\n onPress,\n onRelease,\n onDrag,\n dismissible,\n shouldAnimate,\n handleOnly,\n isOpen,\n isDragging,\n shouldFade,\n closeDrawer,\n onNestedDrag,\n onNestedOpenChange,\n onNestedRelease,\n keyboardIsOpen,\n modal,\n snapPointsOffset,\n activeSnapPointIndex,\n direction,\n shouldScaleBackground,\n setBackgroundColorOnScale,\n noBodyStyles,\n container,\n autoFocus\n }\n }, children));\n}\nconst Overlay = /*#__PURE__*/ React__default.forwardRef(function({ ...rest }, ref) {\n const { overlayRef, snapPoints, onRelease, shouldFade, isOpen, modal, shouldAnimate } = useDrawerContext();\n const composedRef = useComposedRefs(ref, overlayRef);\n const hasSnapPoints = snapPoints && snapPoints.length > 0;\n // Overlay is the component that is locking scroll, removing it will unlock the scroll without having to dig into Radix's Dialog library\n if (!modal) {\n return null;\n }\n const onMouseUp = React__default.useCallback((event)=>onRelease(event), [\n onRelease\n ]);\n return /*#__PURE__*/ React__default.createElement(DialogPrimitive.Overlay, {\n onMouseUp: onMouseUp,\n ref: composedRef,\n \"data-vaul-overlay\": \"\",\n \"data-vaul-snap-points\": isOpen && hasSnapPoints ? 'true' : 'false',\n \"data-vaul-snap-points-overlay\": isOpen && shouldFade ? 'true' : 'false',\n \"data-vaul-animate\": (shouldAnimate == null ? void 0 : shouldAnimate.current) ? 'true' : 'false',\n ...rest\n });\n});\nOverlay.displayName = 'Drawer.Overlay';\nconst Content = /*#__PURE__*/ React__default.forwardRef(function({ onPointerDownOutside, style, onOpenAutoFocus, ...rest }, ref) {\n const { drawerRef, onPress, onRelease, onDrag, keyboardIsOpen, snapPointsOffset, activeSnapPointIndex, modal, isOpen, direction, snapPoints, container, handleOnly, shouldAnimate, autoFocus } = useDrawerContext();\n // Needed to use transition instead of animations\n const [delayedSnapPoints, setDelayedSnapPoints] = React__default.useState(false);\n const composedRef = useComposedRefs(ref, drawerRef);\n const pointerStartRef = React__default.useRef(null);\n const lastKnownPointerEventRef = React__default.useRef(null);\n const wasBeyondThePointRef = React__default.useRef(false);\n const hasSnapPoints = snapPoints && snapPoints.length > 0;\n useScaleBackground();\n const isDeltaInDirection = (delta, direction, threshold = 0)=>{\n if (wasBeyondThePointRef.current) return true;\n const deltaY = Math.abs(delta.y);\n const deltaX = Math.abs(delta.x);\n const isDeltaX = deltaX > deltaY;\n const dFactor = [\n 'bottom',\n 'right'\n ].includes(direction) ? 1 : -1;\n if (direction === 'left' || direction === 'right') {\n const isReverseDirection = delta.x * dFactor < 0;\n if (!isReverseDirection && deltaX >= 0 && deltaX <= threshold) {\n return isDeltaX;\n }\n } else {\n const isReverseDirection = delta.y * dFactor < 0;\n if (!isReverseDirection && deltaY >= 0 && deltaY <= threshold) {\n return !isDeltaX;\n }\n }\n wasBeyondThePointRef.current = true;\n return true;\n };\n React__default.useEffect(()=>{\n if (hasSnapPoints) {\n window.requestAnimationFrame(()=>{\n setDelayedSnapPoints(true);\n });\n }\n }, []);\n function handleOnPointerUp(event) {\n pointerStartRef.current = null;\n wasBeyondThePointRef.current = false;\n onRelease(event);\n }\n return /*#__PURE__*/ React__default.createElement(DialogPrimitive.Content, {\n \"data-vaul-drawer-direction\": direction,\n \"data-vaul-drawer\": \"\",\n \"data-vaul-delayed-snap-points\": delayedSnapPoints ? 'true' : 'false',\n \"data-vaul-snap-points\": isOpen && hasSnapPoints ? 'true' : 'false',\n \"data-vaul-custom-container\": container ? 'true' : 'false',\n \"data-vaul-animate\": (shouldAnimate == null ? void 0 : shouldAnimate.current) ? 'true' : 'false',\n ...rest,\n ref: composedRef,\n style: snapPointsOffset && snapPointsOffset.length > 0 ? {\n '--snap-point-height': `${snapPointsOffset[activeSnapPointIndex != null ? activeSnapPointIndex : 0]}px`,\n ...style\n } : style,\n onPointerDown: (event)=>{\n if (handleOnly) return;\n rest.onPointerDown == null ? void 0 : rest.onPointerDown.call(rest, event);\n pointerStartRef.current = {\n x: event.pageX,\n y: event.pageY\n };\n onPress(event);\n },\n onOpenAutoFocus: (e)=>{\n onOpenAutoFocus == null ? void 0 : onOpenAutoFocus(e);\n if (!autoFocus) {\n e.preventDefault();\n }\n },\n onPointerDownOutside: (e)=>{\n onPointerDownOutside == null ? void 0 : onPointerDownOutside(e);\n if (!modal || e.defaultPrevented) {\n e.preventDefault();\n return;\n }\n if (keyboardIsOpen.current) {\n keyboardIsOpen.current = false;\n }\n },\n onFocusOutside: (e)=>{\n if (!modal) {\n e.preventDefault();\n return;\n }\n },\n onPointerMove: (event)=>{\n lastKnownPointerEventRef.current = event;\n if (handleOnly) return;\n rest.onPointerMove == null ? void 0 : rest.onPointerMove.call(rest, event);\n if (!pointerStartRef.current) return;\n const yPosition = event.pageY - pointerStartRef.current.y;\n const xPosition = event.pageX - pointerStartRef.current.x;\n const swipeStartThreshold = event.pointerType === 'touch' ? 10 : 2;\n const delta = {\n x: xPosition,\n y: yPosition\n };\n const isAllowedToSwipe = isDeltaInDirection(delta, direction, swipeStartThreshold);\n if (isAllowedToSwipe) onDrag(event);\n else if (Math.abs(xPosition) > swipeStartThreshold || Math.abs(yPosition) > swipeStartThreshold) {\n pointerStartRef.current = null;\n }\n },\n onPointerUp: (event)=>{\n rest.onPointerUp == null ? void 0 : rest.onPointerUp.call(rest, event);\n pointerStartRef.current = null;\n wasBeyondThePointRef.current = false;\n onRelease(event);\n },\n onPointerOut: (event)=>{\n rest.onPointerOut == null ? void 0 : rest.onPointerOut.call(rest, event);\n handleOnPointerUp(lastKnownPointerEventRef.current);\n },\n onContextMenu: (event)=>{\n rest.onContextMenu == null ? void 0 : rest.onContextMenu.call(rest, event);\n if (lastKnownPointerEventRef.current) {\n handleOnPointerUp(lastKnownPointerEventRef.current);\n }\n }\n });\n});\nContent.displayName = 'Drawer.Content';\nconst LONG_HANDLE_PRESS_TIMEOUT = 250;\nconst DOUBLE_TAP_TIMEOUT = 120;\nconst Handle = /*#__PURE__*/ React__default.forwardRef(function({ preventCycle = false, children, ...rest }, ref) {\n const { closeDrawer, isDragging, snapPoints, activeSnapPoint, setActiveSnapPoint, dismissible, handleOnly, isOpen, onPress, onDrag } = useDrawerContext();\n const closeTimeoutIdRef = React__default.useRef(null);\n const shouldCancelInteractionRef = React__default.useRef(false);\n function handleStartCycle() {\n // Stop if this is the second click of a double click\n if (shouldCancelInteractionRef.current) {\n handleCancelInteraction();\n return;\n }\n window.setTimeout(()=>{\n handleCycleSnapPoints();\n }, DOUBLE_TAP_TIMEOUT);\n }\n function handleCycleSnapPoints() {\n // Prevent accidental taps while resizing drawer\n if (isDragging || preventCycle || shouldCancelInteractionRef.current) {\n handleCancelInteraction();\n return;\n }\n // Make sure to clear the timeout id if the user releases the handle before the cancel timeout\n handleCancelInteraction();\n if (!snapPoints || snapPoints.length === 0) {\n if (!dismissible) {\n closeDrawer();\n }\n return;\n }\n const isLastSnapPoint = activeSnapPoint === snapPoints[snapPoints.length - 1];\n if (isLastSnapPoint && dismissible) {\n closeDrawer();\n return;\n }\n const currentSnapIndex = snapPoints.findIndex((point)=>point === activeSnapPoint);\n if (currentSnapIndex === -1) return; // activeSnapPoint not found in snapPoints\n const nextSnapPoint = snapPoints[currentSnapIndex + 1];\n setActiveSnapPoint(nextSnapPoint);\n }\n function handleStartInteraction() {\n closeTimeoutIdRef.current = window.setTimeout(()=>{\n // Cancel click interaction on a long press\n shouldCancelInteractionRef.current = true;\n }, LONG_HANDLE_PRESS_TIMEOUT);\n }\n function handleCancelInteraction() {\n if (closeTimeoutIdRef.current) {\n window.clearTimeout(closeTimeoutIdRef.current);\n }\n shouldCancelInteractionRef.current = false;\n }\n return /*#__PURE__*/ React__default.createElement(\"div\", {\n onClick: handleStartCycle,\n onPointerCancel: handleCancelInteraction,\n onPointerDown: (e)=>{\n if (handleOnly) onPress(e);\n handleStartInteraction();\n },\n onPointerMove: (e)=>{\n if (handleOnly) onDrag(e);\n },\n // onPointerUp is already handled by the content component\n ref: ref,\n \"data-vaul-drawer-visible\": isOpen ? 'true' : 'false',\n \"data-vaul-handle\": \"\",\n \"aria-hidden\": \"true\",\n ...rest\n }, /*#__PURE__*/ React__default.createElement(\"span\", {\n \"data-vaul-handle-hitarea\": \"\",\n \"aria-hidden\": \"true\"\n }, children));\n});\nHandle.displayName = 'Drawer.Handle';\nfunction NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }) {\n const { onNestedDrag, onNestedOpenChange, onNestedRelease } = useDrawerContext();\n if (!onNestedDrag) {\n throw new Error('Drawer.NestedRoot must be placed in another drawer');\n }\n return /*#__PURE__*/ React__default.createElement(Root, {\n nested: true,\n open: nestedIsOpen,\n onClose: ()=>{\n onNestedOpenChange(false);\n },\n onDrag: (e, p)=>{\n onNestedDrag(e, p);\n onDrag == null ? void 0 : onDrag(e, p);\n },\n onOpenChange: (o)=>{\n if (o) {\n onNestedOpenChange(o);\n }\n onOpenChange == null ? void 0 : onOpenChange(o);\n },\n onRelease: onNestedRelease,\n ...rest\n });\n}\nfunction Portal(props) {\n const context = useDrawerContext();\n const { container = context.container, ...portalProps } = props;\n return /*#__PURE__*/ React__default.createElement(DialogPrimitive.Portal, {\n container: container,\n ...portalProps\n });\n}\nconst Drawer = {\n Root,\n NestedRoot,\n Content,\n Overlay,\n Trigger: DialogPrimitive.Trigger,\n Portal,\n Handle,\n Close: DialogPrimitive.Close,\n Title: DialogPrimitive.Title,\n Description: DialogPrimitive.Description\n};\n\nexport { Content, Drawer, Handle, NestedRoot, Overlay, Portal, Root };\n","'use client';\n\nimport { XIcon, Play, Square } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\nimport { ActionButton } from '@/components/common/action-button';\nimport { DeploymentStatusBadge } from '@/components/common/deployment-status-badge';\nimport {\n Drawer,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerOverlay,\n} from '@/components/ui/drawer';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { useDeployAction, type DeployActionInput } from '@/hooks/use-deploy-action';\nimport { featureFlags } from '@/lib/feature-flags';\n\nconst drawerVariants = cva('', {\n variants: {\n size: {\n sm: 'w-96',\n md: 'w-xl',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n});\n\nexport interface BaseDrawerProps extends VariantProps<typeof drawerVariants> {\n open: boolean;\n onClose: () => void;\n modal?: boolean;\n header?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n 'data-testid'?: string;\n deployTarget?: DeployActionInput;\n}\n\nexport function BaseDrawer({\n open,\n onClose,\n modal = false,\n size,\n header,\n children,\n footer,\n className,\n 'data-testid': testId,\n deployTarget,\n}: BaseDrawerProps) {\n return (\n <Drawer\n direction=\"right\"\n modal={modal}\n handleOnly\n open={open}\n onOpenChange={(isOpen) => {\n if (!isOpen) onClose();\n }}\n >\n {modal ? <DrawerOverlay /> : null}\n <DrawerContent\n direction=\"right\"\n showCloseButton={false}\n className={cn(drawerVariants({ size }), className)}\n data-testid={testId}\n >\n {/* Close button */}\n <button\n type=\"button\"\n aria-label=\"Close\"\n onClick={onClose}\n className=\"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden\"\n data-testid={testId ? `${testId}-close-button` : undefined}\n >\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </button>\n\n {/* Header slot */}\n {header ? <DrawerHeader>{header}</DrawerHeader> : null}\n\n {/* Dev server bar — rendered when deployTarget is provided and env deploy is enabled */}\n {featureFlags.envDeploy && deployTarget ? <DeployBar deployTarget={deployTarget} /> : null}\n\n {/* Scrollable content area */}\n <div className=\"flex-1 overflow-y-auto\">\n <div className=\"flex flex-col\">{children}</div>\n </div>\n\n {/* Footer slot */}\n {footer ? <DrawerFooter>{footer}</DrawerFooter> : null}\n </DrawerContent>\n </Drawer>\n );\n}\n\nfunction DeployBar({ deployTarget }: { deployTarget: DeployActionInput }) {\n const deployAction = useDeployAction(deployTarget);\n const isDeploymentActive = deployAction.status === 'Booting' || deployAction.status === 'Ready';\n\n return (\n <div data-testid=\"base-drawer-deploy-bar\" className=\"flex items-center gap-2 px-4 pb-3\">\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span>\n <ActionButton\n label={isDeploymentActive ? 'Stop Dev Server' : 'Start Dev Server'}\n onClick={isDeploymentActive ? deployAction.stop : deployAction.deploy}\n loading={deployAction.deployLoading || deployAction.stopLoading}\n error={!!deployAction.deployError}\n icon={isDeploymentActive ? Square : Play}\n iconOnly\n variant=\"outline\"\n size=\"icon-sm\"\n />\n </span>\n </TooltipTrigger>\n <TooltipContent>\n {isDeploymentActive ? 'Stop Dev Server' : 'Start Dev Server'}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n {isDeploymentActive ? (\n <DeploymentStatusBadge status={deployAction.status} url={deployAction.url} />\n ) : null}\n </div>\n );\n}\n","import { cn } from '@/lib/utils';\n\nexport interface PageHeaderProps {\n title: string;\n description?: string;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function PageHeader({ title, description, children, className }: PageHeaderProps) {\n return (\n <header className={cn('flex items-center justify-between gap-4', className)}>\n <div className=\"space-y-1\">\n <h1 className=\"text-2xl font-bold tracking-tight\">{title}</h1>\n {description ? <p className=\"text-muted-foreground\">{description}</p> : null}\n </div>\n {children ? <div data-slot=\"actions\">{children}</div> : null}\n </header>\n );\n}\n"],"names":[],"mappings":"8DACA,EAAA,EAAA,CAAA,CAAA,OASO,SAAS,EAAW,MACzB,CAAI,OACJ,CAAK,aACL,CAAW,CACX,QAAM,WACN,CAAS,CACT,GAAG,EACa,EAChB,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CACC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G9D","ignoreList":[3,4,5,12]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[90920,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({className:a,type:d,...e}){return(0,b.jsx)("input",{type:d,"data-slot":"input",className:(0,c.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...e})}a.s(["Input",()=>d])},13126,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(66873),e="horizontal",f=["horizontal","vertical"],g=c.forwardRef((a,c)=>{var g;let{decorative:h,orientation:i=e,...j}=a,k=(g=i,f.includes(g))?i:e;return(0,b.jsx)(d.Primitive.div,{"data-orientation":k,...h?{role:"none"}:{"aria-orientation":"vertical"===k?k:void 0,role:"separator"},...j,ref:c})});g.displayName="Separator",a.s(["Root",()=>g,"Separator",()=>g],1443);var h=a.i(1443),h=h,i=a.i(85536);function j({className:a,orientation:c="horizontal",decorative:d=!0,...e}){return(0,b.jsx)(h.Root,{"data-slot":"separator",decorative:d,orientation:c,className:(0,i.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...e})}a.s(["Separator",()=>j],13126)},10568,a=>{"use strict";var b=a.i(89868);a.s(["XIcon",()=>b.default])},82934,74432,75988,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(58761),h=a.i(5472);let i=["top","right","bottom","left"],j=Math.min,k=Math.max,l=Math.round,m=Math.floor,n=a=>({x:a,y:a}),o={left:"right",right:"left",bottom:"top",top:"bottom"},p={start:"end",end:"start"};function q(a,b){return"function"==typeof a?a(b):a}function r(a){return a.split("-")[0]}function s(a){return a.split("-")[1]}function t(a){return"x"===a?"y":"x"}function u(a){return"y"===a?"height":"width"}let v=new Set(["top","bottom"]);function w(a){return v.has(r(a))?"y":"x"}function x(a){return a.replace(/start|end/g,a=>p[a])}let y=["left","right"],z=["right","left"],A=["top","bottom"],B=["bottom","top"];function C(a){return a.replace(/left|right|bottom|top/g,a=>o[a])}function D(a){return"number"!=typeof a?{top:0,right:0,bottom:0,left:0,...a}:{top:a,right:a,bottom:a,left:a}}function E(a){let{x:b,y:c,width:d,height:e}=a;return{width:d,height:e,top:c,left:b,right:b+d,bottom:c+e,x:b,y:c}}function F(a,b,c){let d,{reference:e,floating:f}=a,g=w(b),h=t(w(b)),i=u(h),j=r(b),k="y"===g,l=e.x+e.width/2-f.width/2,m=e.y+e.height/2-f.height/2,n=e[i]/2-f[i]/2;switch(j){case"top":d={x:l,y:e.y-f.height};break;case"bottom":d={x:l,y:e.y+e.height};break;case"right":d={x:e.x+e.width,y:m};break;case"left":d={x:e.x-f.width,y:m};break;default:d={x:e.x,y:e.y}}switch(s(b)){case"start":d[h]-=n*(c&&k?-1:1);break;case"end":d[h]+=n*(c&&k?-1:1)}return d}async function G(a,b){var c;void 0===b&&(b={});let{x:d,y:e,platform:f,rects:g,elements:h,strategy:i}=a,{boundary:j="clippingAncestors",rootBoundary:k="viewport",elementContext:l="floating",altBoundary:m=!1,padding:n=0}=q(b,a),o=D(n),p=h[m?"floating"===l?"reference":"floating":l],r=E(await f.getClippingRect({element:null==(c=await (null==f.isElement?void 0:f.isElement(p)))||c?p:p.contextElement||await (null==f.getDocumentElement?void 0:f.getDocumentElement(h.floating)),boundary:j,rootBoundary:k,strategy:i})),s="floating"===l?{x:d,y:e,width:g.floating.width,height:g.floating.height}:g.reference,t=await (null==f.getOffsetParent?void 0:f.getOffsetParent(h.floating)),u=await (null==f.isElement?void 0:f.isElement(t))&&await (null==f.getScale?void 0:f.getScale(t))||{x:1,y:1},v=E(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:s,offsetParent:t,strategy:i}):s);return{top:(r.top-v.top+o.top)/u.y,bottom:(v.bottom-r.bottom+o.bottom)/u.y,left:(r.left-v.left+o.left)/u.x,right:(v.right-r.right+o.right)/u.x}}let H=async(a,b,c)=>{let{placement:d="bottom",strategy:e="absolute",middleware:f=[],platform:g}=c,h=f.filter(Boolean),i=await (null==g.isRTL?void 0:g.isRTL(b)),j=await g.getElementRects({reference:a,floating:b,strategy:e}),{x:k,y:l}=F(j,d,i),m=d,n={},o=0;for(let c=0;c<h.length;c++){var p;let{name:f,fn:q}=h[c],{x:r,y:s,data:t,reset:u}=await q({x:k,y:l,initialPlacement:d,placement:m,strategy:e,middlewareData:n,rects:j,platform:{...g,detectOverflow:null!=(p=g.detectOverflow)?p:G},elements:{reference:a,floating:b}});k=null!=r?r:k,l=null!=s?s:l,n={...n,[f]:{...n[f],...t}},u&&o<=50&&(o++,"object"==typeof u&&(u.placement&&(m=u.placement),u.rects&&(j=!0===u.rects?await g.getElementRects({reference:a,floating:b,strategy:e}):u.rects),{x:k,y:l}=F(j,m,i)),c=-1)}return{x:k,y:l,placement:m,strategy:e,middlewareData:n}};function I(a,b){return{top:a.top-b.height,right:a.right-b.width,bottom:a.bottom-b.height,left:a.left-b.width}}function J(a){return i.some(b=>a[b]>=0)}let K=new Set(["left","top"]);async function L(a,b){let{placement:c,platform:d,elements:e}=a,f=await (null==d.isRTL?void 0:d.isRTL(e.floating)),g=r(c),h=s(c),i="y"===w(c),j=K.has(g)?-1:1,k=f&&i?-1:1,l=q(b,a),{mainAxis:m,crossAxis:n,alignmentAxis:o}="number"==typeof l?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return h&&"number"==typeof o&&(n="end"===h?-1*o:o),i?{x:n*k,y:m*j}:{x:m*j,y:n*k}}function M(a){return function(a){return!1}(a)?(a.nodeName||"").toLowerCase():"#document"}function N(a){var b;return(null==a||null==(b=a.ownerDocument)?void 0:b.defaultView)||window}function O(a){var b;return null==(b=(function(a){return!1}(a)?a.ownerDocument:a.document)||window.document)?void 0:b.documentElement}function P(a){return!1}let Q=new Set(["inline","contents"]);function R(a){let{overflow:b,overflowX:c,overflowY:d,display:e}=aa(a);return/auto|scroll|overlay|hidden|clip/.test(b+d+c)&&!Q.has(e)}let S=new Set(["table","td","th"]),T=[":popover-open",":modal"];function U(a){return T.some(b=>{try{return a.matches(b)}catch(a){return!1}})}let V=["transform","translate","scale","rotate","perspective"],W=["transform","translate","scale","rotate","perspective","filter"],X=["paint","layout","strict","content"];function Y(a){let b=Z(),c=a;return V.some(a=>!!c[a]&&"none"!==c[a])||!!c.containerType&&"normal"!==c.containerType||!b&&!!c.backdropFilter&&"none"!==c.backdropFilter||!b&&!!c.filter&&"none"!==c.filter||W.some(a=>(c.willChange||"").includes(a))||X.some(a=>(c.contain||"").includes(a))}function Z(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let $=new Set(["html","body","#document"]);function _(a){return $.has(M(a))}function aa(a){return N(a).getComputedStyle(a)}function ab(a){return{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function ac(a){if("html"===M(a))return a;let b=a.assignedSlot||a.parentNode||!1||O(a);return b}function ad(a,b,c){var d;void 0===b&&(b=[]),void 0===c&&(c=!0);let e=function a(b){let c=ac(b);return _(c)?b.ownerDocument?b.ownerDocument.body:b.body:a(c)}(a),f=e===(null==(d=a.ownerDocument)?void 0:d.body),g=N(e);if(f){let a=ae(g);return b.concat(g,g.visualViewport||[],R(e)?e:[],a&&c?ad(a):[])}return b.concat(e,ad(e,[],c))}function ae(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function af(a){let b=aa(a),c=parseFloat(b.width)||0,d=parseFloat(b.height)||0,e=!1,f=e?a.offsetWidth:c,g=e?a.offsetHeight:d,h=l(c)!==f||l(d)!==g;return h&&(c=f,d=g),{width:c,height:d,$:h}}function ag(a){return 0,a.contextElement}function ah(a){let b=ag(a);1;return n(1)}let ai=n(0);function aj(a){let b=N(a);return Z()&&b.visualViewport?{x:b.visualViewport.offsetLeft,y:b.visualViewport.offsetTop}:ai}function ak(a,b,c,d){var e;void 0===b&&(b=!1),void 0===c&&(c=!1);let f=a.getBoundingClientRect(),g=ag(a),h=n(1);b&&(d||(h=ah(a)));let i=(void 0===(e=c)&&(e=!1),d&&(!e||d===N(g))&&e)?aj(g):n(0),j=(f.left+i.x)/h.x,k=(f.top+i.y)/h.y,l=f.width/h.x,m=f.height/h.y;if(g){let a=N(g),b=d,c=a,e=ae(c);for(;e&&d&&b!==c;){let a=ah(e),b=e.getBoundingClientRect(),d=aa(e),f=b.left+(e.clientLeft+parseFloat(d.paddingLeft))*a.x,g=b.top+(e.clientTop+parseFloat(d.paddingTop))*a.y;j*=a.x,k*=a.y,l*=a.x,m*=a.y,j+=f,k+=g,e=ae(c=N(e))}}return E({width:l,height:m,x:j,y:k})}function al(a,b){let c=ab(a).scrollLeft;return b?b.left+c:ak(O(a)).left+c}function am(a,b){let c=a.getBoundingClientRect();return{x:c.left+b.scrollLeft-al(a,c),y:c.top+b.scrollTop}}function an(a,b,c){var d;let e;if("viewport"===b)e=function(a,b){let c=N(a),d=O(a),e=c.visualViewport,f=d.clientWidth,g=d.clientHeight,h=0,i=0;if(e){f=e.width,g=e.height;let a=Z();(!a||a&&"fixed"===b)&&(h=e.offsetLeft,i=e.offsetTop)}let j=al(d);if(j<=0){let a=d.ownerDocument,b=a.body,c=getComputedStyle(b),e="CSS1Compat"===a.compatMode&&parseFloat(c.marginLeft)+parseFloat(c.marginRight)||0,g=Math.abs(d.clientWidth-b.clientWidth-e);g<=25&&(f-=g)}else j<=25&&(f+=j);return{width:f,height:g,x:h,y:i}}(a,c);else if("document"===b){let b,c,f,g,h,i,j;d=O(a),b=O(d),c=ab(d),f=d.ownerDocument.body,g=k(b.scrollWidth,b.clientWidth,f.scrollWidth,f.clientWidth),h=k(b.scrollHeight,b.clientHeight,f.scrollHeight,f.clientHeight),i=-c.scrollLeft+al(d),j=-c.scrollTop,"rtl"===aa(f).direction&&(i+=k(b.clientWidth,f.clientWidth)-g),e={width:g,height:h,x:i,y:j}}else{1;{let c=aj(a);e={x:b.x-c.x,y:b.y-c.y,width:b.width,height:b.height}}}return E(e)}function ao(a){return"static"===aa(a).position}function ap(a,b){1;return null}function aq(a,b){var c;let d=N(a);if(U(a))return d;1;{let b=ac(a);for(;b&&!_(b);){0;b=ac(b)}return d}}let ar=async function(a){let b=this.getOffsetParent||aq,c=this.getDimensions,d=await c(a.floating);return{reference:function(a,b,c){var d;let e=(d=0,!1),f=O(b),g="fixed"===c,h=ak(a,!0,g,b),i={scrollLeft:0,scrollTop:0},j=n(0);if(e||!e&&!g)if(("body"!==M(b)||R(f))&&(i=ab(b)),e){let a=ak(b,!0,g,b);j.x=a.x+b.clientLeft,j.y=a.y+b.clientTop}else f&&(j.x=al(f));g&&!e&&f&&(j.x=al(f));let k=!f||e||g?n(0):am(f,i);return{x:h.left+i.scrollLeft-j.x-k.x,y:h.top+i.scrollTop-j.y-k.y,width:h.width,height:h.height}}(a.reference,await b(a.floating),a.strategy),floating:{x:0,y:0,width:d.width,height:d.height}}},as={convertOffsetParentRelativeRectToViewportRelativeRect:function(a){var b,c;let{elements:d,rect:e,offsetParent:f,strategy:g}=a,h="fixed"===g,i=O(f),j=!!d&&U(d.floating);if(f===i||j&&h)return e;let k={scrollLeft:0,scrollTop:0},l=n(1),m=n(0),o=(b=0,!1);(o||!o&&!h)&&(("body"!==M(f)||R(i))&&(k=ab(f)),c=0,0);let p=!i||o||h?n(0):am(i,k);return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-k.scrollLeft*l.x+m.x+p.x,y:e.y*l.y-k.scrollTop*l.y+m.y+p.y}},getDocumentElement:O,getClippingRect:function(a){let{element:b,boundary:c,rootBoundary:d,strategy:e}=a,f=[..."clippingAncestors"===c?U(b)?[]:function(a,b){var c;let d=b.get(a);if(d)return d;let e=ad(a,[],!1).filter(a=>{var b;return b=0,!1}),f="fixed"===aa(a).position,g=f?ac(a):a;return c=0,b.set(a,e),e}(b,this._c):[].concat(c),d],g=f[0],h=f.reduce((a,c)=>{let d=an(b,c,e);return a.top=k(d.top,a.top),a.right=j(d.right,a.right),a.bottom=j(d.bottom,a.bottom),a.left=k(d.left,a.left),a},an(b,g,e));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}},getOffsetParent:aq,getElementRects:ar,getClientRects:function(a){return Array.from(a.getClientRects())},getDimensions:function(a){let{width:b,height:c}=af(a);return{width:b,height:c}},getScale:ah,isElement:P,isRTL:function(a){return"rtl"===aa(a).direction}};function at(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}let au=a=>({name:"arrow",options:a,async fn(b){let{x:c,y:d,placement:e,rects:f,platform:g,elements:h,middlewareData:i}=b,{element:l,padding:m=0}=q(a,b)||{};if(null==l)return{};let n=D(m),o={x:c,y:d},p=t(w(e)),r=u(p),v=await g.getDimensions(l),x="y"===p,y=x?"clientHeight":"clientWidth",z=f.reference[r]+f.reference[p]-o[p]-f.floating[r],A=o[p]-f.reference[p],B=await (null==g.getOffsetParent?void 0:g.getOffsetParent(l)),C=B?B[y]:0;C&&await (null==g.isElement?void 0:g.isElement(B))||(C=h.floating[y]||f.floating[r]);let E=C/2-v[r]/2-1,F=j(n[x?"top":"left"],E),G=j(n[x?"bottom":"right"],E),H=C-v[r]-G,I=C/2-v[r]/2+(z/2-A/2),J=k(F,j(I,H)),K=!i.arrow&&null!=s(e)&&I!==J&&f.reference[r]/2-(I<F?F:G)-v[r]/2<0,L=K?I<F?I-F:I-H:0;return{[p]:o[p]+L,data:{[p]:J,centerOffset:I-J-L,...K&&{alignmentOffset:L}},reset:K}}});var av=a.i(55690),aw="u">typeof document?c.useLayoutEffect:function(){};function ax(a,b){let c,d,e;if(a===b)return!0;if(typeof a!=typeof b)return!1;if("function"==typeof a&&a.toString()===b.toString())return!0;if(a&&b&&"object"==typeof a){if(Array.isArray(a)){if((c=a.length)!==b.length)return!1;for(d=c;0!=d--;)if(!ax(a[d],b[d]))return!1;return!0}if((c=(e=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(d=c;0!=d--;)if(!({}).hasOwnProperty.call(b,e[d]))return!1;for(d=c;0!=d--;){let c=e[d];if(("_owner"!==c||!a.$$typeof)&&!ax(a[c],b[c]))return!1}return!0}return a!=a&&b!=b}function ay(a,b){let c=1;return Math.round(b*c)/c}function az(a){let b=c.useRef(a);return aw(()=>{b.current=a}),b}var aA=a.i(66873),aB=c.forwardRef((a,c)=>{let{children:d,width:e=10,height:f=5,...g}=a;return(0,b.jsx)(aA.Primitive.svg,{...g,ref:c,width:e,height:f,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?d:(0,b.jsx)("polygon",{points:"0,0 30,0 15,10"})})});aB.displayName="Arrow";var aC=a.i(79406),aD=a.i(61476);function aE(a){let[b,d]=c.useState(void 0);return(0,aD.useLayoutEffect)(()=>{if(a){d({width:a.offsetWidth,height:a.offsetHeight});let b=new ResizeObserver(b=>{let c,e;if(!Array.isArray(b)||!b.length)return;let f=b[0];if("borderBoxSize"in f){let a=f.borderBoxSize,b=Array.isArray(a)?a[0]:a;c=b.inlineSize,e=b.blockSize}else c=a.offsetWidth,e=a.offsetHeight;d({width:c,height:e})});return b.observe(a,{box:"border-box"}),()=>b.unobserve(a)}d(void 0)},[a]),b}a.s(["useSize",()=>aE],74432);var aF="Popper",[aG,aH]=(0,f.createContextScope)(aF),[aI,aJ]=aG(aF),aK=a=>{let{__scopePopper:d,children:e}=a,[f,g]=c.useState(null);return(0,b.jsx)(aI,{scope:d,anchor:f,onAnchorChange:g,children:e})};aK.displayName=aF;var aL="PopperAnchor",aM=c.forwardRef((a,d)=>{let{__scopePopper:f,virtualRef:g,...h}=a,i=aJ(aL,f),j=c.useRef(null),k=(0,e.useComposedRefs)(d,j),l=c.useRef(null);return c.useEffect(()=>{let a=l.current;l.current=g?.current||j.current,a!==l.current&&i.onAnchorChange(l.current)}),g?null:(0,b.jsx)(aA.Primitive.div,{...h,ref:k})});aM.displayName=aL;var aN="PopperContent",[aO,aP]=aG(aN),aQ=c.forwardRef((a,d)=>{var f,g,h,i,l,n,o,p,v,D,E,F,G;let{__scopePopper:M,side:N="bottom",sideOffset:P=0,align:Q="center",alignOffset:R=0,arrowPadding:S=0,avoidCollisions:T=!0,collisionBoundary:U=[],collisionPadding:V=0,sticky:W="partial",hideWhenDetached:X=!1,updatePositionStrategy:Y="optimized",onPlaced:Z,...$}=a,_=aJ(aN,M),[aa,ab]=c.useState(null),ac=(0,e.useComposedRefs)(d,a=>ab(a)),[ae,af]=c.useState(null),ah=aE(ae),ai=ah?.width??0,aj=ah?.height??0,al="number"==typeof V?V:{top:0,right:0,bottom:0,left:0,...V},am=Array.isArray(U)?U:[U],an=am.length>0,ao={padding:al,boundary:am.filter(aU),altBoundary:an},{refs:ap,floatingStyles:aq,placement:ar,isPositioned:aB,middlewareData:aF}=function(a){void 0===a&&(a={});let{placement:b="bottom",strategy:d="absolute",middleware:e=[],platform:f,elements:{reference:g,floating:h}={},transform:i=!0,whileElementsMounted:j,open:k}=a,[l,m]=c.useState({x:0,y:0,strategy:d,placement:b,middlewareData:{},isPositioned:!1}),[n,o]=c.useState(e);ax(n,e)||o(e);let[p,q]=c.useState(null),[r,s]=c.useState(null),t=c.useCallback(a=>{a!==x.current&&(x.current=a,q(a))},[]),u=c.useCallback(a=>{a!==y.current&&(y.current=a,s(a))},[]),v=g||p,w=h||r,x=c.useRef(null),y=c.useRef(null),z=c.useRef(l),A=null!=j,B=az(j),C=az(f),D=az(k),E=c.useCallback(()=>{var a,c;let e,f,g;if(!x.current||!y.current)return;let h={placement:b,strategy:d,middleware:n};C.current&&(h.platform=C.current),(a=x.current,c=y.current,e=new Map,g={...(f={platform:as,...h}).platform,_c:e},H(a,c,{...f,platform:g})).then(a=>{let b={...a,isPositioned:!1!==D.current};F.current&&!ax(z.current,b)&&(z.current=b,av.flushSync(()=>{m(b)}))})},[n,b,d,C,D]);aw(()=>{!1===k&&z.current.isPositioned&&(z.current.isPositioned=!1,m(a=>({...a,isPositioned:!1})))},[k]);let F=c.useRef(!1);aw(()=>(F.current=!0,()=>{F.current=!1}),[]),aw(()=>{if(v&&(x.current=v),w&&(y.current=w),v&&w){if(B.current)return B.current(v,w,E);E()}},[v,w,E,B,A]);let G=c.useMemo(()=>({reference:x,floating:y,setReference:t,setFloating:u}),[t,u]),I=c.useMemo(()=>({reference:v,floating:w}),[v,w]),J=c.useMemo(()=>{let a={position:d,left:0,top:0};if(!I.floating)return a;let b=ay(I.floating,l.x),c=ay(I.floating,l.y);if(i)return{...a,transform:"translate("+b+"px, "+c+"px)",...(I.floating,false)};return{position:d,left:b,top:c}},[d,i,I.floating,l.x,l.y]);return c.useMemo(()=>({...l,update:E,refs:G,elements:I,floatingStyles:J}),[l,E,G,I,J])}({strategy:"fixed",placement:N+("center"!==Q?"-"+Q:""),whileElementsMounted:(...a)=>(function(a,b,c,d){let e;void 0===d&&(d={});let{ancestorScroll:f=!0,ancestorResize:g=!0,elementResize:h="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:l=!1}=d,n=ag(a),o=f||g?[...n?ad(n):[],...ad(b)]:[];o.forEach(a=>{f&&a.addEventListener("scroll",c,{passive:!0}),g&&a.addEventListener("resize",c)});let p=n&&i?function(a,b){let c,d=null,e=O(a);function f(){var a;clearTimeout(c),null==(a=d)||a.disconnect(),d=null}return!function g(h,i){void 0===h&&(h=!1),void 0===i&&(i=1),f();let l=a.getBoundingClientRect(),{left:n,top:o,width:p,height:q}=l;if(h||b(),!p||!q)return;let r={rootMargin:-m(o)+"px "+-m(e.clientWidth-(n+p))+"px "+-m(e.clientHeight-(o+q))+"px "+-m(n)+"px",threshold:k(0,j(1,i))||1},s=!0;function t(b){let d=b[0].intersectionRatio;if(d!==i){if(!s)return g();d?g(!1,d):c=setTimeout(()=>{g(!1,1e-7)},1e3)}1!==d||at(l,a.getBoundingClientRect())||g(),s=!1}try{d=new IntersectionObserver(t,{...r,root:e.ownerDocument})}catch(a){d=new IntersectionObserver(t,r)}d.observe(a)}(!0),f}(n,c):null,q=-1,r=null;h&&(r=new ResizeObserver(a=>{let[d]=a;d&&d.target===n&&r&&(r.unobserve(b),cancelAnimationFrame(q),q=requestAnimationFrame(()=>{var a;null==(a=r)||a.observe(b)})),c()}),n&&!l&&r.observe(n),r.observe(b));let s=l?ak(a):null;return l&&function b(){let d=ak(a);s&&!at(s,d)&&c(),s=d,e=requestAnimationFrame(b)}(),c(),()=>{var a;o.forEach(a=>{f&&a.removeEventListener("scroll",c),g&&a.removeEventListener("resize",c)}),null==p||p(),null==(a=r)||a.disconnect(),r=null,l&&cancelAnimationFrame(e)}})(...a,{animationFrame:"always"===Y}),elements:{reference:_.anchor},middleware:[{...{name:"offset",options:g=f={mainAxis:P+aj,alignmentAxis:R},async fn(a){var b,c;let{x:d,y:e,placement:f,middlewareData:h}=a,i=await L(a,g);return f===(null==(b=h.offset)?void 0:b.placement)&&null!=(c=h.arrow)&&c.alignmentOffset?{}:{x:d+i.x,y:e+i.y,data:{...i,placement:f}}}},options:[f,void 0]},T&&{...{name:"shift",options:l=i={mainAxis:!0,crossAxis:!1,limiter:"partial"===W?{...(h=void 0,{options:h={},fn(a){let{x:b,y:c,placement:d,rects:e,middlewareData:f}=a,{offset:g=0,mainAxis:i=!0,crossAxis:j=!0}=q(h,a),k={x:b,y:c},l=w(d),m=t(l),n=k[m],o=k[l],p=q(g,a),s="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(i){let a="y"===m?"height":"width",b=e.reference[m]-e.floating[a]+s.mainAxis,c=e.reference[m]+e.reference[a]-s.mainAxis;n<b?n=b:n>c&&(n=c)}if(j){var u,v;let a="y"===m?"width":"height",b=K.has(r(d)),c=e.reference[l]-e.floating[a]+(b&&(null==(u=f.offset)?void 0:u[l])||0)+(b?0:s.crossAxis),g=e.reference[l]+e.reference[a]+(b?0:(null==(v=f.offset)?void 0:v[l])||0)-(b?s.crossAxis:0);o<c?o=c:o>g&&(o=g)}return{[m]:n,[l]:o}}}),options:[void 0,void 0]}:void 0,...ao},async fn(a){let{x:b,y:c,placement:d,platform:e}=a,{mainAxis:f=!0,crossAxis:g=!1,limiter:h={fn:a=>{let{x:b,y:c}=a;return{x:b,y:c}}},...i}=q(l,a),m={x:b,y:c},n=await e.detectOverflow(a,i),o=w(r(d)),p=t(o),s=m[p],u=m[o];if(f){let a="y"===p?"top":"left",b="y"===p?"bottom":"right",c=s+n[a],d=s-n[b];s=k(c,j(s,d))}if(g){let a="y"===o?"top":"left",b="y"===o?"bottom":"right",c=u+n[a],d=u-n[b];u=k(c,j(u,d))}let v=h.fn({...a,[p]:s,[o]:u});return{...v,data:{x:v.x-b,y:v.y-c,enabled:{[p]:f,[o]:g}}}}},options:[i,void 0]},T&&{...{name:"flip",options:o=n={...ao},async fn(a){var b,c,d,e,f,g,h,i;let j,k,l,{placement:m,middlewareData:n,rects:p,initialPlacement:v,platform:D,elements:E}=a,{mainAxis:F=!0,crossAxis:G=!0,fallbackPlacements:H,fallbackStrategy:I="bestFit",fallbackAxisSideDirection:J="none",flipAlignment:K=!0,...L}=q(o,a);if(null!=(b=n.arrow)&&b.alignmentOffset)return{};let M=r(m),N=w(v),O=r(v)===v,P=await (null==D.isRTL?void 0:D.isRTL(E.floating)),Q=H||(O||!K?[C(v)]:(j=C(v),[x(v),j,x(j)])),R="none"!==J;!H&&R&&Q.push(...(k=s(v),l=function(a,b,c){switch(a){case"top":case"bottom":if(c)return b?z:y;return b?y:z;case"left":case"right":return b?A:B;default:return[]}}(r(v),"start"===J,P),k&&(l=l.map(a=>a+"-"+k),K&&(l=l.concat(l.map(x)))),l));let S=[v,...Q],T=await D.detectOverflow(a,L),U=[],V=(null==(c=n.flip)?void 0:c.overflows)||[];if(F&&U.push(T[M]),G){let a,b,c,d,e=(g=m,h=p,void 0===(i=P)&&(i=!1),a=s(g),c=u(b=t(w(g))),d="x"===b?a===(i?"end":"start")?"right":"left":"start"===a?"bottom":"top",h.reference[c]>h.floating[c]&&(d=C(d)),[d,C(d)]);U.push(T[e[0]],T[e[1]])}if(V=[...V,{placement:m,overflows:U}],!U.every(a=>a<=0)){let a=((null==(d=n.flip)?void 0:d.index)||0)+1,b=S[a];if(b&&("alignment"!==G||N===w(b)||V.every(a=>w(a.placement)!==N||a.overflows[0]>0)))return{data:{index:a,overflows:V},reset:{placement:b}};let c=null==(e=V.filter(a=>a.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])?void 0:e.placement;if(!c)switch(I){case"bestFit":{let a=null==(f=V.filter(a=>{if(R){let b=w(a.placement);return b===N||"y"===b}return!0}).map(a=>[a.placement,a.overflows.filter(a=>a>0).reduce((a,b)=>a+b,0)]).sort((a,b)=>a[1]-b[1])[0])?void 0:f[0];a&&(c=a);break}case"initialPlacement":c=v}if(m!==c)return{reset:{placement:c}}}return{}}},options:[n,void 0]},{...{name:"size",options:v=p={...ao,apply:({elements:a,rects:b,availableWidth:c,availableHeight:d})=>{let{width:e,height:f}=b.reference,g=a.floating.style;g.setProperty("--radix-popper-available-width",`${c}px`),g.setProperty("--radix-popper-available-height",`${d}px`),g.setProperty("--radix-popper-anchor-width",`${e}px`),g.setProperty("--radix-popper-anchor-height",`${f}px`)}},async fn(a){var b,c;let d,e,{placement:f,rects:g,platform:h,elements:i}=a,{apply:l=()=>{},...m}=q(v,a),n=await h.detectOverflow(a,m),o=r(f),p=s(f),t="y"===w(f),{width:u,height:x}=g.floating;"top"===o||"bottom"===o?(d=o,e=p===(await (null==h.isRTL?void 0:h.isRTL(i.floating))?"start":"end")?"left":"right"):(e=o,d="end"===p?"top":"bottom");let y=x-n.top-n.bottom,z=u-n.left-n.right,A=j(x-n[d],y),B=j(u-n[e],z),C=!a.middlewareData.shift,D=A,E=B;if(null!=(b=a.middlewareData.shift)&&b.enabled.x&&(E=z),null!=(c=a.middlewareData.shift)&&c.enabled.y&&(D=y),C&&!p){let a=k(n.left,0),b=k(n.right,0),c=k(n.top,0),d=k(n.bottom,0);t?E=u-2*(0!==a||0!==b?a+b:k(n.left,n.right)):D=x-2*(0!==c||0!==d?c+d:k(n.top,n.bottom))}await l({...a,availableWidth:E,availableHeight:D});let F=await h.getDimensions(i.floating);return u!==F.width||x!==F.height?{reset:{rects:!0}}:{}}},options:[p,void 0]},ae&&{...{name:"arrow",options:E=D={element:ae,padding:S},fn(a){let{element:b,padding:c}="function"==typeof E?E(a):E;return b&&({}).hasOwnProperty.call(b,"current")?null!=b.current?au({element:b.current,padding:c}).fn(a):{}:b?au({element:b,padding:c}).fn(a):{}}},options:[D,void 0]},aV({arrowWidth:ai,arrowHeight:aj}),X&&{...{name:"hide",options:G=F={strategy:"referenceHidden",...ao},async fn(a){let{rects:b,platform:c}=a,{strategy:d="referenceHidden",...e}=q(G,a);switch(d){case"referenceHidden":{let d=I(await c.detectOverflow(a,{...e,elementContext:"reference"}),b.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:J(d)}}}case"escaped":{let d=I(await c.detectOverflow(a,{...e,altBoundary:!0}),b.floating);return{data:{escapedOffsets:d,escaped:J(d)}}}default:return{}}}},options:[F,void 0]}]}),[aG,aH]=aW(ar),aI=(0,aC.useCallbackRef)(Z);(0,aD.useLayoutEffect)(()=>{aB&&aI?.()},[aB,aI]);let aK=aF.arrow?.x,aL=aF.arrow?.y,aM=aF.arrow?.centerOffset!==0,[aP,aQ]=c.useState();return(0,aD.useLayoutEffect)(()=>{aa&&aQ(window.getComputedStyle(aa).zIndex)},[aa]),(0,b.jsx)("div",{ref:ap.setFloating,"data-radix-popper-content-wrapper":"",style:{...aq,transform:aB?aq.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:aP,"--radix-popper-transform-origin":[aF.transformOrigin?.x,aF.transformOrigin?.y].join(" "),...aF.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:(0,b.jsx)(aO,{scope:M,placedSide:aG,onArrowChange:af,arrowX:aK,arrowY:aL,shouldHideArrow:aM,children:(0,b.jsx)(aA.Primitive.div,{"data-side":aG,"data-align":aH,...$,ref:ac,style:{...$.style,animation:aB?void 0:"none"}})})})});aQ.displayName=aN;var aR="PopperArrow",aS={top:"bottom",right:"left",bottom:"top",left:"right"},aT=c.forwardRef(function(a,c){let{__scopePopper:d,...e}=a,f=aP(aR,d),g=aS[f.placedSide];return(0,b.jsx)("span",{ref:f.onArrowChange,style:{position:"absolute",left:f.arrowX,top:f.arrowY,[g]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f.placedSide],visibility:f.shouldHideArrow?"hidden":void 0},children:(0,b.jsx)(aB,{...e,ref:c,style:{...e.style,display:"block"}})})});function aU(a){return null!==a}aT.displayName=aR;var aV=a=>({name:"transformOrigin",options:a,fn(b){let{placement:c,rects:d,middlewareData:e}=b,f=e.arrow?.centerOffset!==0,g=f?0:a.arrowWidth,h=f?0:a.arrowHeight,[i,j]=aW(c),k={start:"0%",center:"50%",end:"100%"}[j],l=(e.arrow?.x??0)+g/2,m=(e.arrow?.y??0)+h/2,n="",o="";return"bottom"===i?(n=f?k:`${l}px`,o=`${-h}px`):"top"===i?(n=f?k:`${l}px`,o=`${d.floating.height+h}px`):"right"===i?(n=`${-h}px`,o=f?k:`${m}px`):"left"===i&&(n=`${d.floating.width+h}px`,o=f?k:`${m}px`),{data:{x:n,y:o}}}});function aW(a){let[b,c="center"]=a.split("-");return[b,c]}a.s(["Anchor",()=>aM,"Arrow",()=>aT,"Content",()=>aQ,"Root",()=>aK,"createPopperScope",()=>aH],75988);var aX=a.i(80930),aY=a.i(14272),aZ=a.i(90986),a$=a.i(17329),a_=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"}),a0=c.forwardRef((a,c)=>(0,b.jsx)(aA.Primitive.span,{...a,ref:c,style:{...a_,...a.style}}));a0.displayName="VisuallyHidden";var[a1,a2]=(0,f.createContextScope)("Tooltip",[aH]),a3=aH(),a4="TooltipProvider",a5="tooltip.open",[a6,a7]=a1(a4),a8=a=>{let{__scopeTooltip:d,delayDuration:e=700,skipDelayDuration:f=300,disableHoverableContent:g=!1,children:h}=a,i=c.useRef(!0),j=c.useRef(!1),k=c.useRef(0);return c.useEffect(()=>{let a=k.current;return()=>window.clearTimeout(a)},[]),(0,b.jsx)(a6,{scope:d,isOpenDelayedRef:i,delayDuration:e,onOpen:c.useCallback(()=>{window.clearTimeout(k.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>i.current=!0,f)},[f]),isPointerInTransitRef:j,onPointerInTransitChange:c.useCallback(a=>{j.current=a},[]),disableHoverableContent:g,children:h})};a8.displayName=a4;var a9="Tooltip",[ba,bb]=a1(a9),bc=a=>{let{__scopeTooltip:d,children:e,open:f,defaultOpen:g,onOpenChange:i,disableHoverableContent:j,delayDuration:k}=a,l=a7(a9,a.__scopeTooltip),m=a3(d),[n,o]=c.useState(null),p=(0,h.useId)(),q=c.useRef(0),r=j??l.disableHoverableContent,s=k??l.delayDuration,t=c.useRef(!1),[u,v]=(0,a$.useControllableState)({prop:f,defaultProp:g??!1,onChange:a=>{a?(l.onOpen(),document.dispatchEvent(new CustomEvent(a5))):l.onClose(),i?.(a)},caller:a9}),w=c.useMemo(()=>u?t.current?"delayed-open":"instant-open":"closed",[u]),x=c.useCallback(()=>{window.clearTimeout(q.current),q.current=0,t.current=!1,v(!0)},[v]),y=c.useCallback(()=>{window.clearTimeout(q.current),q.current=0,v(!1)},[v]),z=c.useCallback(()=>{window.clearTimeout(q.current),q.current=window.setTimeout(()=>{t.current=!0,v(!0),q.current=0},s)},[s,v]);return c.useEffect(()=>()=>{q.current&&(window.clearTimeout(q.current),q.current=0)},[]),(0,b.jsx)(aK,{...m,children:(0,b.jsx)(ba,{scope:d,contentId:p,open:u,stateAttribute:w,trigger:n,onTriggerChange:o,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?z():x()},[l.isOpenDelayedRef,z,x]),onTriggerLeave:c.useCallback(()=>{r?y():(window.clearTimeout(q.current),q.current=0)},[y,r]),onOpen:x,onClose:y,disableHoverableContent:r,children:e})})};bc.displayName=a9;var bd="TooltipTrigger",be=c.forwardRef((a,f)=>{let{__scopeTooltip:g,...h}=a,i=bb(bd,g),j=a7(bd,g),k=a3(g),l=c.useRef(null),m=(0,e.useComposedRefs)(f,l,i.onTriggerChange),n=c.useRef(!1),o=c.useRef(!1),p=c.useCallback(()=>n.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),(0,b.jsx)(aM,{asChild:!0,...k,children:(0,b.jsx)(aA.Primitive.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...h,ref:m,onPointerMove:(0,d.composeEventHandlers)(a.onPointerMove,a=>{"touch"!==a.pointerType&&(o.current||j.isPointerInTransitRef.current||(i.onTriggerEnter(),o.current=!0))}),onPointerLeave:(0,d.composeEventHandlers)(a.onPointerLeave,()=>{i.onTriggerLeave(),o.current=!1}),onPointerDown:(0,d.composeEventHandlers)(a.onPointerDown,()=>{i.open&&i.onClose(),n.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:(0,d.composeEventHandlers)(a.onFocus,()=>{n.current||i.onOpen()}),onBlur:(0,d.composeEventHandlers)(a.onBlur,i.onClose),onClick:(0,d.composeEventHandlers)(a.onClick,i.onClose)})})});be.displayName=bd;var bf="TooltipPortal",[bg,bh]=a1(bf,{forceMount:void 0}),bi=a=>{let{__scopeTooltip:c,forceMount:d,children:e,container:f}=a,g=bb(bf,c);return(0,b.jsx)(bg,{scope:c,forceMount:d,children:(0,b.jsx)(aY.Presence,{present:d||g.open,children:(0,b.jsx)(aX.Portal,{asChild:!0,container:f,children:e})})})};bi.displayName=bf;var bj="TooltipContent",bk=c.forwardRef((a,c)=>{let d=bh(bj,a.__scopeTooltip),{forceMount:e=d.forceMount,side:f="top",...g}=a,h=bb(bj,a.__scopeTooltip);return(0,b.jsx)(aY.Presence,{present:e||h.open,children:h.disableHoverableContent?(0,b.jsx)(bp,{side:f,...g,ref:c}):(0,b.jsx)(bl,{side:f,...g,ref:c})})}),bl=c.forwardRef((a,d)=>{let f=bb(bj,a.__scopeTooltip),g=a7(bj,a.__scopeTooltip),h=c.useRef(null),i=(0,e.useComposedRefs)(d,h),[j,k]=c.useState(null),{trigger:l,onClose:m}=f,n=h.current,{onPointerInTransitChange:o}=g,p=c.useCallback(()=>{k(null),o(!1)},[o]),q=c.useCallback((a,b)=>{let c,d=a.currentTarget,e={x:a.clientX,y:a.clientY},f=function(a,b){let c=Math.abs(b.top-a.y),d=Math.abs(b.bottom-a.y),e=Math.abs(b.right-a.x),f=Math.abs(b.left-a.x);switch(Math.min(c,d,e,f)){case f:return"left";case e:return"right";case c:return"top";case d:return"bottom";default:throw Error("unreachable")}}(e,d.getBoundingClientRect());k(((c=[...function(a,b,c=5){let d=[];switch(b){case"top":d.push({x:a.x-c,y:a.y+c},{x:a.x+c,y:a.y+c});break;case"bottom":d.push({x:a.x-c,y:a.y-c},{x:a.x+c,y:a.y-c});break;case"left":d.push({x:a.x+c,y:a.y-c},{x:a.x+c,y:a.y+c});break;case"right":d.push({x:a.x-c,y:a.y-c},{x:a.x-c,y:a.y+c})}return d}(e,f),...function(a){let{top:b,right:c,bottom:d,left:e}=a;return[{x:e,y:b},{x:c,y:b},{x:c,y:d},{x:e,y:d}]}(b.getBoundingClientRect())].slice()).sort((a,b)=>a.x<b.x?-1:a.x>b.x?1:a.y<b.y?-1:1*!!(a.y>b.y)),function(a){if(a.length<=1)return a.slice();let b=[];for(let c=0;c<a.length;c++){let d=a[c];for(;b.length>=2;){let a=b[b.length-1],c=b[b.length-2];if((a.x-c.x)*(d.y-c.y)>=(a.y-c.y)*(d.x-c.x))b.pop();else break}b.push(d)}b.pop();let c=[];for(let b=a.length-1;b>=0;b--){let d=a[b];for(;c.length>=2;){let a=c[c.length-1],b=c[c.length-2];if((a.x-b.x)*(d.y-b.y)>=(a.y-b.y)*(d.x-b.x))c.pop();else break}c.push(d)}return(c.pop(),1===b.length&&1===c.length&&b[0].x===c[0].x&&b[0].y===c[0].y)?b:b.concat(c)}(c))),o(!0)},[o]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&n){let a=a=>q(a,n),b=a=>q(a,l);return l.addEventListener("pointerleave",a),n.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",a),n.removeEventListener("pointerleave",b)}}},[l,n,q,p]),c.useEffect(()=>{if(j){let a=a=>{let b=a.target,c={x:a.clientX,y:a.clientY},d=l?.contains(b)||n?.contains(b),e=!function(a,b){let{x:c,y:d}=a,e=!1;for(let a=0,f=b.length-1;a<b.length;f=a++){let g=b[a],h=b[f],i=g.x,j=g.y,k=h.x,l=h.y;j>d!=l>d&&c<(k-i)*(d-j)/(l-j)+i&&(e=!e)}return e}(c,j);d?p():e&&(p(),m())};return document.addEventListener("pointermove",a),()=>document.removeEventListener("pointermove",a)}},[l,n,j,m,p]),(0,b.jsx)(bp,{...a,ref:i})}),[bm,bn]=a1(a9,{isInside:!1}),bo=(0,aZ.createSlottable)("TooltipContent"),bp=c.forwardRef((a,d)=>{let{__scopeTooltip:e,children:f,"aria-label":h,onEscapeKeyDown:i,onPointerDownOutside:j,...k}=a,l=bb(bj,e),m=a3(e),{onClose:n}=l;return c.useEffect(()=>(document.addEventListener(a5,n),()=>document.removeEventListener(a5,n)),[n]),c.useEffect(()=>{if(l.trigger){let a=a=>{let b=a.target;b?.contains(l.trigger)&&n()};return window.addEventListener("scroll",a,{capture:!0}),()=>window.removeEventListener("scroll",a,{capture:!0})}},[l.trigger,n]),(0,b.jsx)(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:j,onFocusOutside:a=>a.preventDefault(),onDismiss:n,children:(0,b.jsxs)(aQ,{"data-state":l.stateAttribute,...m,...k,ref:d,style:{...k.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:[(0,b.jsx)(bo,{children:f}),(0,b.jsx)(bm,{scope:e,isInside:!0,children:(0,b.jsx)(a0,{id:l.contentId,role:"tooltip",children:h||f})})]})})});bk.displayName=bj;var bq="TooltipArrow",br=c.forwardRef((a,c)=>{let{__scopeTooltip:d,...e}=a,f=a3(d);return bn(bq,d).isInside?null:(0,b.jsx)(aT,{...f,...e,ref:c})});br.displayName=bq,a.s(["Arrow",()=>br,"Content",()=>bk,"Portal",()=>bi,"Provider",()=>a8,"Root",()=>bc,"Tooltip",()=>bc,"TooltipArrow",()=>br,"TooltipContent",()=>bk,"TooltipPortal",()=>bi,"TooltipProvider",()=>a8,"TooltipTrigger",()=>be,"Trigger",()=>be,"createTooltipScope",()=>a2],17151);var bs=a.i(17151),bs=bs,bt=a.i(85536);function bu({delayDuration:a=0,...c}){return(0,b.jsx)(bs.Provider,{"data-slot":"tooltip-provider",delayDuration:a,...c})}function bv({...a}){return(0,b.jsx)(bs.Root,{"data-slot":"tooltip",...a})}function bw({...a}){return(0,b.jsx)(bs.Trigger,{"data-slot":"tooltip-trigger",...a})}function bx({className:a,sideOffset:c=0,children:d,...e}){return(0,b.jsx)(bs.Portal,{children:(0,b.jsxs)(bs.Content,{"data-slot":"tooltip-content",sideOffset:c,className:(0,bt.cn)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",a),...e,children:[d,(0,b.jsx)(bs.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}a.s(["Tooltip",()=>bv,"TooltipContent",()=>bx,"TooltipProvider",()=>bu,"TooltipTrigger",()=>bw],82934)},82697,a=>{"use strict";let b=(0,a.i(25700).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);a.s(["CircleAlert",()=>b],82697)},17227,a=>{"use strict";function b(a){return"true"===a||"1"===a}let c={skills:b(process.env.NEXT_PUBLIC_FLAG_SKILLS),envDeploy:b(process.env.NEXT_PUBLIC_FLAG_ENV_DEPLOY)};a.s(["featureFlags",0,c])},25674,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={callServer:function(){return f.callServer},createServerReference:function(){return h.createServerReference},findSourceMapURL:function(){return g.findSourceMapURL}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(45390),g=a.r(36452),h=a.r(21032)},19884,2103,46847,a=>{"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z=a.i(96960);let A="shep-sound-enabled",B="shep:sound-toggle";function C(){let[a,b]=(0,z.useState)(!0);(0,z.useEffect)(()=>{"false"===localStorage.getItem(A)&&b(!1);let a=a=>{b(a.detail)};return window.addEventListener(B,a),()=>window.removeEventListener(B,a)},[]);let c=(0,z.useCallback)(()=>{let c=!a;localStorage.setItem(A,String(c)),b(c),window.dispatchEvent(new CustomEvent(B,{detail:c}))},[a]);return{enabled:a,toggle:c}}a.s(["useSoundEnabled",()=>C],2103);let D={navigate:{sound:"tap_01",volume:.2},"menu-item":{sound:"tap_01",volume:.2},select:{sound:"select",volume:.3},"toggle-on":{sound:"toggle_on",volume:.3},"toggle-off":{sound:"toggle_off",volume:.3},click:{sound:"tap_01",volume:.3},cancel:{sound:"transition_down",volume:.3},expand:{sound:"swipe",volume:.3},collapse:{sound:"swipe",volume:.3},"menu-open":{sound:"select",volume:.3},copy:{sound:"select",volume:.3},"drawer-open":{sound:"transition_up",volume:.4},"drawer-close":{sound:"transition_down",volume:.4},submit:{sound:"button",volume:.4},approve:{sound:"celebration",volume:.5},reject:{sound:"caution",volume:.5},create:{sound:"transition_up",volume:.5},delete:{sound:"transition_down",volume:.5},"notification-success":{sound:"celebration",volume:.5},"notification-error":{sound:"caution",volume:.5},"notification-warning":{sound:"notification",volume:.5},"notification-info":{sound:"button",volume:.5}};function E(a){let{sound:b,volume:c}=D[a];return function(a,b={}){let{volume:c=1,loop:d=!1}=b,{enabled:e}=C(),f=(0,z.useRef)(null),g=(0,z.useRef)(!1);return(0,z.useEffect)(()=>{},[a,d,c]),{play:(0,z.useCallback)(()=>{if(!e)return;let a=f.current;a&&(a.currentTime=0,a.play()?.catch(a=>{}),g.current=!0)},[e,a]),stop:(0,z.useCallback)(()=>{let a=f.current;a&&(a.pause(),a.currentTime=0,g.current=!1)},[]),isPlaying:g.current}}(b,{volume:c})}a.s(["useSoundAction",()=>E],19884),(b={}).PRD="PRD",b.API="API",b.Design="Design",b.Other="Other",(c={}).Markdown="md",c.Text="txt",c.Yaml="yaml",c.Other="Other",(d={}).Todo="Todo",d.Elaborating="Elaborating",d.Done="Done",(e={}).Assistant="assistant",e.User="user",(f={}).Functional="Functional",f.NonFunctional="NonFunctional",(g={}).NotStarted="NotStarted",g.Running="Running",g.Finished="Finished",(h={}).VsCode="vscode",h.Cursor="cursor",h.Windsurf="windsurf",h.Zed="zed",h.Antigravity="antigravity",(i={}).ClaudeCode="claude-code",i.GeminiCli="gemini-cli",i.Aider="aider",i.Continue="continue",i.Cursor="cursor",i.Dev="dev",(j={}).Session="session",j.Token="token",(k={}).Todo="Todo",k.WIP="Work in Progress",k.Done="Done",k.Review="Review",(l={}).Requirements="Requirements",l.ClarificationRequired="ClarificationRequired",l.Ready="Ready",(m={}).Started="Started",m.Analyze="Analyze",m.Requirements="Requirements",m.Research="Research",m.Planning="Planning",m.Implementation="Implementation",m.Review="Review",m.Maintain="Maintain",m.Blocked="Blocked";var F=((n={}).Open="Open",n.Merged="Merged",n.Closed="Closed",n),G=((o={}).Pending="Pending",o.Success="Success",o.Failure="Failure",o);(p={}).VsCode="vscode",p.Cursor="cursor",p.Windsurf="windsurf",p.Zed="zed",p.Antigravity="antigravity",p.CursorCli="cursor-cli",p.ClaudeCode="claude-code";var H=((q={}).AgentStarted="agent_started",q.PhaseCompleted="phase_completed",q.WaitingApproval="waiting_approval",q.AgentCompleted="agent_completed",q.AgentFailed="agent_failed",q.PrMerged="pr_merged",q.PrClosed="pr_closed",q.PrChecksPassed="pr_checks_passed",q.PrChecksFailed="pr_checks_failed",q),I=((r={}).Info="info",r.Warning="warning",r.Success="success",r.Error="error",r);(s={}).Idle="Idle",s.Running="Running",s.Paused="Paused",s.Stopped="Stopped",(t={}).GatheringRequirements="GatheringRequirements",t.ClarificationsRequired="ClarificationsRequired",t.DoingResearch="DoingResearch",t.AwaitingReview="AwaitingReview",t.ExecutingWorkPlan="ExecutingWorkPlan",t.Ready="Ready",(u={}).TCP="TCP",u.UDP="UDP",(v={}).DockerCompose="DockerCompose",v.Docker="Docker",v.Kubernetes="Kubernetes",v.Script="Script",v.Manual="Manual";var J=((w={}).Booting="Booting",w.Ready="Ready",w.Stopped="Stopped",w);(x={}).pending="pending",x.running="running",x.completed="completed",x.failed="failed",x.interrupted="interrupted",x.cancelled="cancelled",x.waitingApproval="waiting_approval",(y={}).sessionResume="session-resume",y.streaming="streaming",y.toolScoping="tool-scoping",y.structuredOutput="structured-output",y.systemPrompt="system-prompt",y.sessionListing="session-listing",a.s(["CiStatus",()=>G,"DeploymentState",()=>J,"NotificationEventType",()=>H,"NotificationSeverity",()=>I,"PrStatus",()=>F],46847)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_ed9132c9._.js.map
|