@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.
Files changed (326) hide show
  1. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +1 -1
  2. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts +62 -0
  4. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts.map +1 -0
  5. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.js +12 -0
  6. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  7. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  9. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +4 -1
  10. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/di/container.js +3 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +25 -0
  14. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +1 -1
  15. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +5 -2
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +23 -2
  19. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
  20. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +11 -7
  21. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +11 -7
  23. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +11 -7
  25. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts +57 -0
  26. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -0
  27. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +192 -0
  28. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts +26 -0
  29. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts.map +1 -0
  30. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.js +59 -0
  31. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts +15 -0
  32. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts.map +1 -0
  33. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.js +52 -0
  34. package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
  35. package/dist/src/presentation/cli/commands/_serve.command.js +2 -0
  36. package/dist/src/presentation/web/app/actions/deploy-feature.d.ts +7 -0
  37. package/dist/src/presentation/web/app/actions/deploy-feature.d.ts.map +1 -0
  38. package/dist/src/presentation/web/app/actions/deploy-feature.js +28 -0
  39. package/dist/src/presentation/web/app/actions/deploy-repository.d.ts +7 -0
  40. package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -0
  41. package/dist/src/presentation/web/app/actions/deploy-repository.js +21 -0
  42. package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts +3 -0
  43. package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts.map +1 -0
  44. package/dist/src/presentation/web/app/actions/get-deployment-status.js +9 -0
  45. package/dist/src/presentation/web/app/actions/stop-deployment.d.ts +5 -0
  46. package/dist/src/presentation/web/app/actions/stop-deployment.d.ts.map +1 -0
  47. package/dist/src/presentation/web/app/actions/stop-deployment.js +16 -0
  48. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +20 -0
  49. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -0
  50. package/dist/src/presentation/web/app/build-graph-nodes.js +142 -0
  51. package/dist/src/presentation/web/app/page.d.ts.map +1 -1
  52. package/dist/src/presentation/web/app/page.js +2 -112
  53. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts +3 -1
  54. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
  55. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +13 -3
  56. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts +2 -0
  57. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts.map +1 -1
  58. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.js +9 -0
  59. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts +7 -0
  60. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts.map +1 -0
  61. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +14 -0
  62. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts +14 -0
  63. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts.map +1 -0
  64. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.js +27 -0
  65. package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts +2 -0
  66. package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts.map +1 -0
  67. package/dist/src/presentation/web/components/common/deployment-status-badge/index.js +1 -0
  68. package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts.map +1 -1
  69. package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.js +8 -1
  70. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  71. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +7 -1
  72. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  73. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +13 -2
  74. package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.js +12 -2
  76. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts +18 -0
  77. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -0
  78. package/dist/src/presentation/web/hooks/use-deploy-action.js +130 -0
  79. package/dist/src/presentation/web/lib/feature-flags.d.ts +1 -0
  80. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  81. package/dist/src/presentation/web/lib/feature-flags.js +1 -0
  82. package/dist/tsconfig.build.tsbuildinfo +1 -1
  83. package/package.json +1 -1
  84. package/web/.next/BUILD_ID +1 -1
  85. package/web/.next/build-manifest.json +7 -6
  86. package/web/.next/cache/.previewinfo +1 -1
  87. package/web/.next/cache/.rscinfo +1 -1
  88. package/web/.next/cache/.tsbuildinfo +1 -1
  89. package/web/.next/cache/config.json +3 -3
  90. package/web/.next/fallback-build-manifest.json +2 -2
  91. package/web/.next/prerender-manifest.json +3 -3
  92. package/web/.next/required-server-files.js +1 -1
  93. package/web/.next/required-server-files.json +1 -1
  94. package/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  95. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  96. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/_global-error.html +2 -2
  98. package/web/.next/server/app/_global-error.rsc +1 -1
  99. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  100. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  101. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  105. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  106. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  107. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
  109. package/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
  110. package/web/.next/server/app/page/build-manifest.json +5 -4
  111. package/web/.next/server/app/page/server-reference-manifest.json +88 -28
  112. package/web/.next/server/app/page.js +2 -2
  113. package/web/.next/server/app/page.js.nft.json +1 -1
  114. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/skills/page/build-manifest.json +5 -4
  116. package/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
  117. package/web/.next/server/app/skills/page.js +2 -2
  118. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  119. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/tools/page/build-manifest.json +5 -4
  121. package/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  122. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  123. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/version/page/build-manifest.json +5 -4
  125. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  126. package/web/.next/server/app/version/page.js +1 -1
  127. package/web/.next/server/app/version/page.js.nft.json +1 -1
  128. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  129. package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
  130. package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js.map → [root-of-the-server]__09413611._.js.map} +1 -1
  131. package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
  132. package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js.map +1 -0
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js.map → [root-of-the-server]__248ee887._.js.map} +1 -1
  137. 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
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js.map +1 -0
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js.map +1 -0
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js.map +1 -0
  150. 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
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js.map +1 -0
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js.map +1 -0
  154. package/web/.next/server/chunks/ssr/_28993370._.js +3 -0
  155. package/web/.next/server/chunks/ssr/_28993370._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
  157. package/web/.next/server/chunks/ssr/_380c6567._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/_45715073._.js +3 -0
  159. package/web/.next/server/chunks/ssr/{_d81184e2._.js.map → _45715073._.js.map} +1 -1
  160. package/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
  161. package/web/.next/server/chunks/ssr/_6978d868._.js.map +1 -0
  162. package/web/.next/server/chunks/ssr/_85965278._.js +6 -0
  163. package/web/.next/server/chunks/ssr/_85965278._.js.map +1 -0
  164. package/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
  165. package/web/.next/server/chunks/ssr/_c52cace8._.js.map +1 -0
  166. package/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
  167. package/web/.next/server/chunks/ssr/_ed9132c9._.js.map +1 -0
  168. package/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
  169. package/web/.next/server/chunks/ssr/node_modules__pnpm_febcbea6._.js.map +1 -0
  170. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  171. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  173. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
  174. package/web/.next/server/middleware-build-manifest.js +5 -4
  175. package/web/.next/server/pages/500.html +2 -2
  176. package/web/.next/server/server-reference-manifest.js +1 -1
  177. package/web/.next/server/server-reference-manifest.json +118 -30
  178. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  179. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +7 -6
  180. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  181. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  182. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  183. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  184. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  185. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  186. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  187. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  188. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  189. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  190. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  191. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  192. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  193. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  194. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  195. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  196. package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
  197. package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
  198. package/web/.next/standalone/src/presentation/web/.next/server/app/page/build-manifest.json +5 -4
  199. package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +88 -28
  200. package/web/.next/standalone/src/presentation/web/.next/server/app/page.js +2 -2
  201. package/web/.next/standalone/src/presentation/web/.next/server/app/page.js.nft.json +1 -1
  202. package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
  203. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/build-manifest.json +5 -4
  204. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
  205. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js +2 -2
  206. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js.nft.json +1 -1
  207. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  208. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/build-manifest.json +5 -4
  209. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  210. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page.js.nft.json +1 -1
  211. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  212. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/build-manifest.json +5 -4
  213. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  214. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js +1 -1
  215. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js.nft.json +1 -1
  216. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  217. package/web/.next/standalone/src/presentation/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
  218. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
  219. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  220. 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
  221. 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
  222. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
  223. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  224. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
  225. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  226. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
  227. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
  228. 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
  229. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
  230. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_28993370._.js +3 -0
  231. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
  232. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_45715073._.js +3 -0
  233. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
  234. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_85965278._.js +6 -0
  235. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
  236. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
  237. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
  238. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  239. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  240. package/web/.next/standalone/src/presentation/web/.next/server/middleware-build-manifest.js +5 -4
  241. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  242. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  243. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +118 -30
  244. package/web/.next/standalone/src/presentation/web/app/actions/deploy-feature.ts +39 -0
  245. package/web/.next/standalone/src/presentation/web/app/actions/deploy-repository.ts +28 -0
  246. package/web/.next/standalone/src/presentation/web/app/actions/get-deployment-status.ts +16 -0
  247. package/web/.next/standalone/src/presentation/web/app/actions/stop-deployment.ts +22 -0
  248. package/web/.next/standalone/src/presentation/web/app/build-graph-nodes.ts +180 -0
  249. package/web/.next/standalone/src/presentation/web/app/page.tsx +2 -129
  250. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.stories.tsx +26 -0
  251. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.tsx +45 -1
  252. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.tsx +35 -0
  253. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.tsx +42 -0
  254. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/index.ts +1 -0
  255. package/web/.next/standalone/src/presentation/web/components/common/feature-drawer/feature-drawer.tsx +10 -0
  256. package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-drawer.tsx +9 -0
  257. package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-node.tsx +43 -2
  258. package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.tsx +79 -44
  259. package/web/.next/standalone/src/presentation/web/hooks/use-deploy-action.ts +161 -0
  260. package/web/.next/standalone/src/presentation/web/lib/feature-flags.ts +1 -0
  261. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  262. package/web/.next/static/chunks/0b99eb9664d47ca7.js +1 -0
  263. package/web/.next/static/chunks/2ec0c24b265971c3.js +1 -0
  264. package/web/.next/static/chunks/41a2adc09edfffaf.js +1 -0
  265. package/web/.next/static/chunks/5054c72b1c8f5912.js +1 -0
  266. package/web/.next/static/chunks/7ad36bef63f15bc6.js +1 -0
  267. package/web/.next/static/chunks/{15f4f62844c3ea0e.js → 86a68ddb0ac40c02.js} +7 -7
  268. package/web/.next/static/chunks/{3b941e59ac013e12.js → 87421ab1062a39b7.js} +2 -2
  269. package/web/.next/static/chunks/{21541b346dd4dd28.js → 8c60d1bd87239066.js} +1 -1
  270. package/web/.next/static/chunks/96f49affaceab206.css +2 -0
  271. package/web/.next/static/chunks/a6d1d774260fc927.js +2 -0
  272. package/web/.next/static/chunks/c7e793951b20a67f.js +1 -0
  273. package/web/.next/static/chunks/f5fb2f182ae9b015.js +1 -0
  274. package/web/.next/static/chunks/faf6eb7311aa7529.js +1 -0
  275. package/web/.next/static/chunks/fffaa0530ef1686d.js +1 -0
  276. package/web/.next/static/chunks/turbopack-b6b5b4f015327a9a.js +4 -0
  277. package/web/.next/trace +1 -1
  278. package/web/.next/trace-build +1 -1
  279. package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
  280. package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js.map +0 -1
  281. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
  282. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js.map +0 -1
  283. package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
  284. package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js.map +0 -1
  285. package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
  286. package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js.map +0 -1
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js.map +0 -1
  288. package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
  289. package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js.map +0 -1
  290. package/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
  291. package/web/.next/server/chunks/ssr/_73d14b70._.js.map +0 -1
  292. package/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
  293. package/web/.next/server/chunks/ssr/_7f386377._.js.map +0 -1
  294. package/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
  295. package/web/.next/server/chunks/ssr/_d3711354._.js.map +0 -1
  296. package/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
  297. package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
  298. package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/node_modules__pnpm_87f920e7._.js.map +0 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
  301. package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js.map +0 -1
  302. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
  303. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
  304. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
  305. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
  306. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
  307. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
  308. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
  309. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
  310. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
  311. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
  312. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
  313. package/web/.next/static/chunks/0c6654ec27f11c7e.js +0 -1
  314. package/web/.next/static/chunks/12c70bfd5951cf9b.js +0 -1
  315. package/web/.next/static/chunks/1887af4ad3781531.js +0 -2
  316. package/web/.next/static/chunks/78919481e7c5ad4f.js +0 -1
  317. package/web/.next/static/chunks/a5b6a22de303e877.css +0 -2
  318. package/web/.next/static/chunks/aa33d2874dacee4a.js +0 -1
  319. package/web/.next/static/chunks/acdb8af5a21f1ae9.js +0 -1
  320. package/web/.next/static/chunks/af7a5bcb7c49e46e.js +0 -1
  321. package/web/.next/static/chunks/be784143669bb992.js +0 -1
  322. package/web/.next/static/chunks/turbopack-eb24b869babb34b4.js +0 -4
  323. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__fbc89707._.js.map → [root-of-the-server]__249c74f6._.js.map} +0 -0
  324. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → VQhryfJCxF8IeQiBJFQyJ}/_buildManifest.js +0 -0
  325. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → VQhryfJCxF8IeQiBJFQyJ}/_clientMiddlewareManifest.json +0 -0
  326. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → VQhryfJCxF8IeQiBJFQyJ}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../../src/presentation/web/.next-internal/server/app/page/actions.js%20%28server%20actions%20loader%29","../../../../../../../src/presentation/web/app/actions/approve-feature.ts","../../../../../../../src/presentation/web/app/actions/reject-feature.ts","../../../../../../../src/presentation/web/app/actions/get-feature-artifact.ts","../../../../../../../src/presentation/web/app/actions/get-research-artifact.ts","../../../../../../../packages/core/src/infrastructure/services/settings.service.ts","../../../../../../../src/presentation/web/app/actions/get-workflow-defaults.ts","../../../../../../../src/presentation/web/app/actions/get-merge-review-data.ts","../../../../../../../src/presentation/web/app/actions/open-ide.ts","../../../../../../../src/presentation/web/app/actions/open-shell.ts","../../../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.ts","../../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.ts","../../../../../../../src/presentation/web/app/actions/open-folder.ts","../../../../../../../src/presentation/web/app/actions/create-feature.ts","../../../../../../../src/presentation/web/app/actions/delete-feature.ts","../../../../../../../src/presentation/web/app/actions/add-repository.ts","../../../../../../../src/presentation/web/app/actions/delete-repository.ts"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","export {pickFolder as '00a359398edb367a523a72d4b891a73da9edcf06c4'} from 'ACTIONS_MODULE0'\nexport {approveFeature as '60c9525251d028bce732fea7299dee05ea8de7e0bb'} from 'ACTIONS_MODULE1'\nexport {rejectFeature as '602b442e41faa5aa260bbe5384ab82a79d752e6c34'} from 'ACTIONS_MODULE2'\nexport {getFeatureArtifact as '40bde38ff657f740c207f4202a40e20bbf7a94ee41'} from 'ACTIONS_MODULE3'\nexport {getResearchArtifact as '4083a2fb7dd36fa3732166159da8e823ebbf4fe9ed'} from 'ACTIONS_MODULE4'\nexport {getWorkflowDefaults as '007e2a25fa70e0a9e71587c6de37fcbc6a7d4c5c97'} from 'ACTIONS_MODULE5'\nexport {getMergeReviewData as '40ef89aa99539c5573ed7a22160ce3c7763206bb78'} from 'ACTIONS_MODULE6'\nexport {openIde as '40cc00c1ac8c2e305bb03aebea80e1e77fe54596a0'} from 'ACTIONS_MODULE7'\nexport {openShell as '40cd70e6dc9ab5cb424fe22b935fb7dd508ab72ad6'} from 'ACTIONS_MODULE8'\nexport {openFolder as '408fe7cdc71037a0922c9ca2c067c66a93d799ecfb'} from 'ACTIONS_MODULE9'\nexport {createFeature as '40317195b99a3c9c1c083963f3141a66c1a6d89ce9'} from 'ACTIONS_MODULE10'\nexport {deleteFeature as '409e290e843f104c745ec12484572be7abeebd72b8'} from 'ACTIONS_MODULE11'\nexport {addRepository as '40fc7289a81343009e8b04dd4caa0bdf7974453341'} from 'ACTIONS_MODULE12'\nexport {deleteRepository as '403119fcc47c50d87666d1132793a84ecf17abddad'} from 'ACTIONS_MODULE13'\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ApproveAgentRunUseCase } from '@shepai/core/application/use-cases/agents/approve-agent-run.use-case';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { PrdApprovalPayload } from '@shepai/core/domain/generated/output';\n\nexport async function approveFeature(\n featureId: string,\n payload?: PrdApprovalPayload\n): Promise<{ approved: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { approved: false, error: 'Feature id is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { approved: false, error: 'Feature not found' };\n }\n\n if (!feature.agentRunId) {\n return { approved: false, error: 'Feature has no agent run' };\n }\n\n const approveUseCase = resolve<ApproveAgentRunUseCase>('ApproveAgentRunUseCase');\n const result = await approveUseCase.execute(feature.agentRunId, payload);\n\n if (!result.approved) {\n return { approved: false, error: result.reason };\n }\n\n return { approved: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to approve feature';\n return { approved: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { RejectAgentRunUseCase } from '@shepai/core/application/use-cases/agents/reject-agent-run.use-case';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\nexport async function rejectFeature(\n featureId: string,\n feedback: string\n): Promise<{\n rejected: boolean;\n iteration?: number;\n iterationWarning?: boolean;\n error?: string;\n}> {\n if (!featureId.trim()) {\n return { rejected: false, error: 'Feature id is required' };\n }\n\n if (!feedback.trim()) {\n return { rejected: false, error: 'Feedback is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { rejected: false, error: 'Feature not found' };\n }\n\n if (!feature.agentRunId) {\n return { rejected: false, error: 'Feature has no agent run' };\n }\n\n const rejectUseCase = resolve<RejectAgentRunUseCase>('RejectAgentRunUseCase');\n const result = await rejectUseCase.execute(feature.agentRunId, feedback);\n\n if (!result.rejected) {\n return { rejected: false, error: result.reason };\n }\n\n return {\n rejected: true,\n iteration: result.iteration,\n iterationWarning: result.iterationWarning,\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to reject feature';\n return { rejected: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetFeatureArtifactUseCase } from '@shepai/core/application/use-cases/features/get-feature-artifact.use-case';\nimport type { FeatureArtifact } from '@shepai/core/domain/generated/output';\nimport type { PrdQuestionnaireData } from '@shepai/core/domain/generated/output';\n\ninterface GetFeatureArtifactResult {\n questionnaire?: PrdQuestionnaireData;\n artifact?: FeatureArtifact;\n error?: string;\n}\n\n/**\n * Map FeatureArtifact openQuestions into the PrdQuestionnaireData shape\n * expected by the PrdQuestionnaireDrawer component.\n */\nfunction toQuestionnaireData(artifact: FeatureArtifact): PrdQuestionnaireData {\n return {\n question: 'Goal',\n context: artifact.oneLiner,\n questions: artifact.openQuestions.map((oq, idx) => ({\n id: `q-${idx}`,\n question: oq.question,\n type: 'select' as const,\n options: (oq.options ?? []).map((opt, optIdx) => ({\n id: `q-${idx}-opt-${optIdx}`,\n label: opt.option,\n rationale: opt.description,\n ...(opt.selected ? { recommended: true } : {}),\n })),\n })),\n finalAction: {\n id: 'approve-reqs',\n label: 'Approve Requirements',\n description: 'Finalize and lock the requirements for implementation',\n },\n };\n}\n\nexport async function getFeatureArtifact(featureId: string): Promise<GetFeatureArtifactResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetFeatureArtifactUseCase>('GetFeatureArtifactUseCase');\n const artifact = await useCase.execute(featureId);\n const questionnaire = toQuestionnaireData(artifact);\n return { questionnaire, artifact };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load feature artifact';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { GetResearchArtifactUseCase } from '@shepai/core/application/use-cases/features/get-research-artifact.use-case';\nimport type { ResearchArtifact, TechDecision } from '@shepai/core/domain/generated/output';\n\nexport interface TechDecisionsReviewData {\n name: string;\n summary: string;\n decisions: TechDecision[];\n technologies: string[];\n}\n\ninterface GetResearchArtifactResult {\n techDecisions?: TechDecisionsReviewData;\n error?: string;\n}\n\nfunction toTechDecisionsData(artifact: ResearchArtifact): TechDecisionsReviewData {\n return {\n name: artifact.name,\n summary: artifact.summary,\n decisions: artifact.decisions,\n technologies: artifact.technologies,\n };\n}\n\nexport async function getResearchArtifact(featureId: string): Promise<GetResearchArtifactResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<GetResearchArtifactUseCase>('GetResearchArtifactUseCase');\n const artifact = await useCase.execute(featureId);\n const techDecisions = toTechDecisionsData(artifact);\n return { techDecisions };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load research artifact';\n return { error: message };\n }\n}\n","/**\n * Settings Service\n *\n * Provides global access to application settings within the CLI.\n * Uses globalThis/process storage so the singleton survives Turbopack\n * module re-evaluations in Next.js API routes.\n *\n * Usage:\n * ```typescript\n * import { getSettings } from './infrastructure/services/settings.service.js';\n *\n * const settings = getSettings();\n * console.log(settings.models.analyze); // 'claude-opus-4'\n * ```\n */\n\nimport type { Settings } from '../../domain/generated/output.js';\n\n/** The globalThis / process key for the settings singleton. */\nconst SHEP_SETTINGS_KEY = '__shepSettings';\n\n/** Read the settings instance from globalThis, falling back to process. */\nfunction readSettings(): Settings | null {\n const fromGlobal = (globalThis as Record<string, unknown>)[SHEP_SETTINGS_KEY];\n if (fromGlobal != null) return fromGlobal as Settings;\n\n const fromProcess = (process as unknown as Record<string, unknown>)[SHEP_SETTINGS_KEY];\n if (fromProcess != null) return fromProcess as Settings;\n\n return null;\n}\n\n/** Write the settings instance to both globalThis and process. */\nfunction writeSettings(value: Settings | null): void {\n (globalThis as Record<string, unknown>)[SHEP_SETTINGS_KEY] = value;\n (process as unknown as Record<string, unknown>)[SHEP_SETTINGS_KEY] = value;\n}\n\n/**\n * Initialize the settings service with loaded settings.\n * Must be called once during CLI bootstrap.\n *\n * @param settings - The initialized settings\n * @throws Error if settings are already initialized\n */\nexport function initializeSettings(settings: Settings): void {\n if (readSettings() !== null) {\n throw new Error('Settings already initialized. Cannot re-initialize.');\n }\n\n writeSettings(settings);\n}\n\n/**\n * Get the current application settings.\n *\n * @returns Current settings instance\n * @throws Error if settings haven't been initialized yet\n *\n * @example\n * ```typescript\n * const settings = getSettings();\n * console.log(settings.system.logLevel); // 'info'\n * ```\n */\nexport function getSettings(): Settings {\n const instance = readSettings();\n if (instance === null) {\n throw new Error('Settings not initialized. Call initializeSettings() during CLI bootstrap.');\n }\n\n return instance;\n}\n\n/**\n * Check if settings have been initialized.\n *\n * @returns True if settings are initialized, false otherwise\n */\nexport function hasSettings(): boolean {\n return readSettings() !== null;\n}\n\n/**\n * Reset settings instance (for testing purposes only).\n * DO NOT use in production code.\n *\n * @internal\n */\nexport function resetSettings(): void {\n writeSettings(null);\n}\n","'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\nexport interface WorkflowDefaults {\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n}\n\nexport async function getWorkflowDefaults(): Promise<WorkflowDefaults> {\n const settings = getSettings();\n const { workflow } = settings;\n\n return {\n approvalGates: {\n allowPrd: workflow.approvalGateDefaults.allowPrd,\n allowPlan: workflow.approvalGateDefaults.allowPlan,\n allowMerge: workflow.approvalGateDefaults.allowMerge,\n },\n push: workflow.approvalGateDefaults.pushOnImplementationComplete,\n openPr: workflow.openPrOnImplementationComplete,\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IGitPrService } from '@shepai/core/application/ports/output/services/git-pr-service.interface';\nimport type { GetPlanArtifactUseCase } from '@shepai/core/application/use-cases/features/get-plan-artifact.use-case';\nimport type {\n MergeReviewData,\n MergeReviewPhase,\n} from '@/components/common/merge-review/merge-review-config';\n\ntype GetMergeReviewDataResult = MergeReviewData | { error: string };\n\nexport async function getMergeReviewData(featureId: string): Promise<GetMergeReviewDataResult> {\n if (!featureId.trim()) {\n return { error: 'Feature id is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return { error: 'Feature not found' };\n }\n\n const pr = feature.pr\n ? {\n url: feature.pr.url,\n number: feature.pr.number,\n status: feature.pr.status,\n commitHash: feature.pr.commitHash,\n ciStatus: feature.pr.ciStatus,\n }\n : undefined;\n\n const branch = feature.branch ? { source: feature.branch, target: 'main' } : undefined;\n\n // Load plan phases (best-effort)\n let phases: MergeReviewPhase[] | undefined;\n try {\n const planUseCase = resolve<GetPlanArtifactUseCase>('GetPlanArtifactUseCase');\n const plan = await planUseCase.execute(featureId);\n phases = plan.phases.map(({ id, name, description }) => ({ id, name, description }));\n } catch {\n // Plan unavailable — not critical\n }\n\n if (!feature.worktreePath) {\n return { pr, branch, phases, warning: pr ? undefined : 'No PR or diff data available' };\n }\n\n try {\n const gitPrService = resolve<IGitPrService>('IGitPrService');\n const diffSummary = await gitPrService.getPrDiffSummary(feature.worktreePath, 'main');\n return { pr, branch, phases, diffSummary };\n } catch {\n return { pr, branch, phases, warning: 'Diff statistics unavailable' };\n }\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load merge review data';\n return { error: message };\n }\n}\n","'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport type { LaunchIdeUseCase } from '@shepai/core/application/use-cases/ide/launch-ide.use-case';\nimport { resolve } from '@/lib/server-container';\n\ninterface OpenIdeInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openIde(\n input: OpenIdeInput\n): Promise<{ success: boolean; error?: string; editor?: string; path?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath?.startsWith('/')) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n const settings = getSettings();\n const editor = settings.environment.defaultEditor;\n\n const useCase = resolve<LaunchIdeUseCase>('LaunchIdeUseCase');\n const result = await useCase.execute({\n editorId: editor,\n repositoryPath,\n branch,\n checkAvailability: true,\n });\n\n if (!result.ok) {\n return { success: false, error: result.message };\n }\n\n return { success: true, editor: result.editorName, path: result.worktreePath };\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { spawn } from 'node:child_process';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\n\n// Use a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst SHELL_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> = {\n darwin: { cmd: 'open', args: (p) => ['-a', 'Terminal', p] },\n linux: { cmd: 'x-terminal-emulator', args: (p) => [`--working-directory=${p}`] },\n};\n\ninterface OpenShellInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openShell(\n input: OpenShellInput\n): Promise<{ success: boolean; error?: string; path?: string; shell?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath?.startsWith('/')) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n const settings = getSettings();\n const shell = settings.environment.shellPreference;\n const targetPath = branch ? computeWorktreePath(repositoryPath, branch) : repositoryPath;\n\n if (!existsSync(targetPath)) {\n return { success: false, error: `Path does not exist: ${targetPath}` };\n }\n\n const entry = SHELL_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}. Shell launch is supported on macOS and Linux only.`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(targetPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: targetPath, shell };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open shell';\n return { success: false, error: message };\n }\n}\n","/**\n * Compute Worktree Path\n *\n * Pure utility that computes the filesystem path for a feature's git worktree\n * given a repository path and branch name.\n *\n * Path format: ~/.shep/repos/<sha256-hash-prefix>/wt/<branch-slug>\n */\n\nimport { createHash } from 'node:crypto';\nimport { join } from 'node:path';\nimport { getShepHomeDir } from '../filesystem/shep-directory.service';\n\n/**\n * Compute the worktree path for a given repository and branch.\n *\n * @param repoPath - Absolute path to the repository\n * @param branch - Git branch name (slashes are replaced with hyphens)\n * @returns Absolute path to the worktree directory under ~/.shep/repos/\n */\nexport function computeWorktreePath(repoPath: string, branch: string): string {\n const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);\n const slug = branch.replace(/\\//g, '-');\n return join(getShepHomeDir(), 'repos', repoHash, 'wt', slug);\n}\n","/**\n * Shep Directory Service\n *\n * Manages the ~/.shep/ directory for global settings and data storage.\n * Ensures directory exists with correct permissions before database operations.\n *\n * Supports SHEP_HOME env var for test isolation (overrides default ~/.shep/).\n */\n\nimport { mkdir } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\n\n/**\n * Resolves the Shep home directory.\n * Respects SHEP_HOME env var for test isolation, falls back to ~/.shep/\n */\nfunction resolveShepHomeDir(): string {\n return process.env.SHEP_HOME ?? join(homedir(), '.shep');\n}\n\n/**\n * Gets the path to the Shep home directory.\n * Uses SHEP_HOME env var if set, otherwise ~/.shep/\n *\n * @returns Path to shep home directory\n */\nexport function getShepHomeDir(): string {\n return resolveShepHomeDir();\n}\n\n/**\n * Gets the path to the SQLite database file.\n *\n * @returns Path to the database file\n */\nexport function getShepDbPath(): string {\n return join(resolveShepHomeDir(), 'data');\n}\n\n/**\n * Gets the path to the daemon state file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.json\n *\n * @returns Path to daemon.json\n */\nexport function getDaemonStatePath(): string {\n return join(resolveShepHomeDir(), 'daemon.json');\n}\n\n/**\n * Gets the path to the daemon log file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.log\n *\n * @returns Path to daemon.log\n */\nexport function getDaemonLogPath(): string {\n return join(resolveShepHomeDir(), 'daemon.log');\n}\n\n/**\n * Ensures the shep home directory exists with correct permissions.\n * Creates the directory if it doesn't exist.\n * Safe to call multiple times (idempotent).\n *\n * Permissions: 700 (rwx------) - only owner can read/write/execute\n *\n * @throws Error if directory cannot be created (permissions, disk space, etc.)\n */\nexport async function ensureShepDirectory(): Promise<void> {\n const shepDir = resolveShepHomeDir();\n\n if (existsSync(shepDir)) {\n return;\n }\n\n try {\n await mkdir(shepDir, {\n recursive: true,\n mode: 0o700,\n });\n } catch (error) {\n throw new Error(\n `Failed to create Shep directory at ${shepDir}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { spawn } from 'node:child_process';\n\n// Use a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst FOLDER_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> = {\n darwin: { cmd: 'open', args: (p) => [p] },\n linux: { cmd: 'xdg-open', args: (p) => [p] },\n};\n\nexport async function openFolder(\n repositoryPath: string\n): Promise<{ success: boolean; error?: string; path?: string }> {\n if (!repositoryPath?.startsWith('/')) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n if (!existsSync(repositoryPath)) {\n return { success: false, error: 'Directory not found' };\n }\n\n const entry = FOLDER_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}. Folder open is supported on macOS and Linux only.`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(repositoryPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: repositoryPath };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { CreateFeatureUseCase } from '@shepai/core/application/use-cases/features/create/create-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\ninterface Attachment {\n path: string;\n name: string;\n}\n\ninterface ApprovalGates {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n}\n\ninterface CreateFeatureInput {\n name: string;\n description?: string;\n repositoryPath: string;\n attachments?: Attachment[];\n approvalGates?: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge?: boolean;\n };\n push?: boolean;\n openPr?: boolean;\n parentId?: string;\n}\n\nfunction composeUserInput(\n name: string,\n description: string | undefined,\n attachments: Attachment[] | undefined\n): string {\n let userInput = `Feature: ${name}`;\n\n if (description) {\n userInput += `\\n\\n${description}`;\n }\n\n if (attachments && attachments.length > 0) {\n const paths = attachments.map((a) => `- ${a.path}`).join('\\n');\n userInput += `\\n\\nAttached files:\\n${paths}`;\n }\n\n return userInput;\n}\n\nexport async function createFeature(\n input: CreateFeatureInput\n): Promise<{ feature?: Feature; error?: string }> {\n const { name, description, repositoryPath, attachments, approvalGates, push, openPr, parentId } =\n input;\n\n if (!name?.trim()) {\n return { error: 'name is required' };\n }\n\n if (!repositoryPath?.trim()) {\n return { error: 'repositoryPath is required' };\n }\n\n const userInput = composeUserInput(name, description, attachments);\n const gates: ApprovalGates = {\n allowPrd: approvalGates?.allowPrd ?? false,\n allowPlan: approvalGates?.allowPlan ?? false,\n allowMerge: approvalGates?.allowMerge ?? false,\n };\n\n try {\n const createFeatureUseCase = resolve<CreateFeatureUseCase>('CreateFeatureUseCase');\n const result = await createFeatureUseCase.execute({\n userInput,\n repositoryPath,\n approvalGates: gates,\n push: push ?? false,\n openPr: openPr ?? false,\n ...(parentId ? { parentId } : {}),\n });\n return { feature: result.feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to create feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteFeatureUseCase } from '@shepai/core/application/use-cases/features/delete-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function deleteFeature(\n featureId: string\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const deleteFeatureUseCase = resolve<DeleteFeatureUseCase>('DeleteFeatureUseCase');\n const feature = await deleteFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { AddRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/add-repository.use-case';\nimport type { Repository } from '@shepai/core/domain/generated/output';\n\ninterface AddRepositoryInput {\n path: string;\n name?: string;\n}\n\nexport async function addRepository(\n input: AddRepositoryInput\n): Promise<{ repository?: Repository; error?: string }> {\n const { path, name } = input;\n\n if (!path?.trim()) {\n return { error: 'path is required' };\n }\n\n try {\n const addRepoUseCase = resolve<AddRepositoryUseCase>('AddRepositoryUseCase');\n const repository = await addRepoUseCase.execute({ path, name });\n return { repository };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to add repository';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/delete-repository.use-case';\n\nexport async function deleteRepository(\n repositoryId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!repositoryId?.trim()) {\n return { success: false, error: 'id is required' };\n }\n\n try {\n const useCase = resolve<DeleteRepositoryUseCase>('DeleteRepositoryUseCase');\n await useCase.execute(repositoryId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete repository';\n return { success: false, error: message };\n }\n}\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"oIAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAI,AAAkB,YAAY,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAA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,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,sCCKA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,sCCNA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA","ignoreList":[0,1]}
@@ -1,4 +0,0 @@
1
- module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},12513,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}async function g(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,a.i(12581).ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"00a359398edb367a523a72d4b891a73da9edcf06c4",null),a.s(["pickFolder",()=>g],12513)},41115,a=>{"use strict";var b=a.i(12513);a.s([],55047),a.i(55047),a.s(["00a359398edb367a523a72d4b891a73da9edcf06c4",()=>b.pickFolder],41115)}];
3
-
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__da0ade1f._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/.next-internal/server/app/skills/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","export {pickFolder as '00a359398edb367a523a72d4b891a73da9edcf06c4'} from 'ACTIONS_MODULE0'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"oIAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAI,AAAkB,YAAY,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,8CCHhB,EAAA,EAAA,CAAA,CAAA,OAOA,IAAM,EAAgC,CACpC,SAAU,QAAQ,QAAQ,CAC1B,KAAM,CAAC,EAAK,IAAS,CAAA,EAAA,EAAA,QAAQ,AAAR,EAAS,EAAK,EACrC,EAMM,EAA4C,CAChD,OAAQ,CAAC,qFAAqF,CAAC,GAC/F,MAAO,CAAC,oFAAoF,CAAC,CAC7F,MAAO,CAAC,wPAAwP,CAAC,EACnQ,CAEO,OAAM,EACH,IAAuB,AAE/B,aAAY,EAAkC,CAAC,CAAC,CAAE,CAChD,IAAI,CAAC,IAAI,CAAG,CAAE,GAAG,CAAW,CAAE,GAAG,CAAI,AAAC,CACxC,CAGA,YAA4B,CAC1B,OAAO,CAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAI,IAClD,CAOA,YAA4B,CAC1B,IAAM,EAAU,IAAI,CAAC,UAAU,GAC/B,GAAI,CAAC,EACH,MAAM,AAAI,CADE,KACI,CAAC,sBAAsB,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA,CAAE,EAG/D,GAAI,CAEF,IAAM,EADS,AACC,IADG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAS,CAAE,SAAU,QAAS,QAAS,GAAO,GACrD,IAAI,GAC3B,OAAO,EAAQ,MAAM,CAAG,EAAI,EAAU,IACxC,CAAE,MAAO,EAAgB,OAEvB,GAAI,AASgB,UAAjB,OADY,AACL,EATM,GAQa,CACa,OAAV,GAAkB,WAAY,GATnB,GAAG,CAApB,EAAM,MAAM,CACpC,OAAO,IAET,OAAM,CACR,CACF,CACF,CCrDO,eAAe,IACpB,IAAM,EAAU,IAAI,EAEpB,GAAI,CAEF,MAAO,CAAE,KADI,EAAQ,UAAU,EACjB,CAChB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,KAAM,KAAM,MADL,CACY,YADK,MAAQ,EAAM,OAAO,CAAG,8BACrB,CACtC,CACF,0CAVsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,8DCJtB,IAAA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/components/ui/badge.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/circle-x.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/terminal.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/check.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/external-link.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/copy.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/git-branch.ts"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none',\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',\n outline: 'text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />;\n}\n\nexport { Badge, badgeVariants };\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm15 9-6 6', key: '1uzhvr' }],\n ['path', { d: 'm9 9 6 6', key: 'z0biqf' }],\n];\n\n/**\n * @component @name CircleX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtMTUgOS02IDYiIC8+CiAgPHBhdGggZD0ibTkgOSA2IDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/circle-x\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 CircleX = createLucideIcon('circle-x', __iconNode);\n\nexport default CircleX;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 19h8', key: 'baeox8' }],\n ['path', { d: 'm4 17 6-6-6-6', key: '1yngyt' }],\n];\n\n/**\n * @component @name Terminal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTloOCIgLz4KICA8cGF0aCBkPSJtNCAxNyA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/terminal\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 Terminal = createLucideIcon('terminal', __iconNode);\n\nexport default Terminal;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M20 6 9 17l-5-5', key: '1gmf2c' }]];\n\n/**\n * @component @name Check\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgNiA5IDE3bC01LTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/check\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 Check = createLucideIcon('check', __iconNode);\n\nexport default Check;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M15 3h6v6', key: '1q9fwt' }],\n ['path', { d: 'M10 14 21 3', key: 'gplh6r' }],\n ['path', { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6', key: 'a6xqqp' }],\n];\n\n/**\n * @component @name ExternalLink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgM2g2djYiIC8+CiAgPHBhdGggZD0iTTEwIDE0IDIxIDMiIC8+CiAgPHBhdGggZD0iTTE4IDEzdjZhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWOGEyIDIgMCAwIDEgMi0yaDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/external-link\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 ExternalLink = createLucideIcon('external-link', __iconNode);\n\nexport default ExternalLink;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n];\n\n/**\n * @component @name Copy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHg9IjgiIHk9IjgiIHJ4PSIyIiByeT0iMiIgLz4KICA8cGF0aCBkPSJNNCAxNmMtMS4xIDAtMi0uOS0yLTJWNGMwLTEuMS45LTIgMi0yaDEwYzEuMSAwIDIgLjkgMiAyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/copy\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 Copy = createLucideIcon('copy', __iconNode);\n\nexport default Copy;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['line', { x1: '6', x2: '6', y1: '3', y2: '15', key: '17qcm7' }],\n ['circle', { cx: '18', cy: '6', r: '3', key: '1h7g24' }],\n ['circle', { cx: '6', cy: '18', r: '3', key: 'fqmcym' }],\n ['path', { d: 'M18 9a9 9 0 0 1-9 9', key: 'n2h4wq' }],\n];\n\n/**\n * @component @name GitBranch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iNiIgeDI9IjYiIHkxPSIzIiB5Mj0iMTUiIC8+CiAgPGNpcmNsZSBjeD0iMTgiIGN5PSI2IiByPSIzIiAvPgogIDxjaXJjbGUgY3g9IjYiIGN5PSIxOCIgcj0iMyIgLz4KICA8cGF0aCBkPSJNMTggOWE5IDkgMCAwIDEtOSA5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/git-branch\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 GitBranch = createLucideIcon('git-branch', __iconNode);\n\nexport default GitBranch;\n"],"names":[],"mappings":"6HACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAM,EAAgB,CAAA,EAAA,EAAA,GAAA,AAAG,EACvB,uKACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,mFACT,UACE,kFACF,YACE,+FACF,QAAS,iBACX,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,GAOF,SAAS,EAAM,CAAE,WAAS,SAAE,CAAO,CAAE,GAAG,EAAmB,EACzD,MAAO,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EAAC,EAAc,SAAE,CAAQ,GAAI,GAAa,GAAG,CAAK,EAC7E,uHCVA,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,EAAU,CAAA,CAAV,AAAU,CAAV,AAAU,CAAV,AAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAjBG,CAClC,AAgB2C,CAhB1C,AAgB0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAhB1C,AAgB0C,CAhB1C,AAAU,AAgB0C,CAAA,AAhB1C,AAAE,EAAA,CAAI,AAAJ,CAAI,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,AAAI,IAAA,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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,AAAvB,CAAuB,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CACtD","ignoreList":[1,2,4,5,6]}
@@ -1,3 +0,0 @@
1
- module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},59975,a=>{a.n(a.i(72884))},63754,a=>{a.n(a.i(39838))},27075,a=>{a.n(a.i(26048))},37458,a=>{a.n(a.i(72330))},22672,a=>{a.n(a.i(41208))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__edca9510._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- module.exports=[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)},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,2824,24255,78454,a=>{"use strict";let b,c=(0,a.i(25700).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);var d=a.i(10973),e=a.i(10568),f=a.i(42261),g=a.i(85536),h=a.i(40093),i=a.i(96960);let j=i.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}),k=()=>{let a=i.default.useContext(j);if(!a)throw Error("useDrawerContext must be used within a Drawer.Root");return a};function l(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function m(){return n(/^iPhone/)||n(/^iPad/)||n(/^Mac/)&&navigator.maxTouchPoints>1}function n(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 o=i.useEffect;"u">typeof document&&window.visualViewport;let p=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),q=0;function r(...a){return i.useCallback(function(...a){return b=>a.forEach(a=>{"function"==typeof a?a(b):null!=a&&(a.current=b)})}(...a),a)}let s=new WeakMap;function t(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||s.set(a,d)}let u=a=>{switch(a){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return a}};function v(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(", ")[u(b)?13:12]):(e=d.match(/^matrix\((.+)\)$/))?parseFloat(e[1].split(", ")[u(b)?5:4]):null}function w(a,b){if(!a)return()=>{};let c=a.style.cssText;return Object.assign(a.style,b),()=>{a.style.cssText=c}}let x=[.32,.72,0,1],y="vaul-dragging";function z(a){let b=i.default.useRef(a);return i.default.useEffect(()=>{b.current=a}),i.default.useMemo(()=>(...a)=>null==b.current?void 0:b.current.call(b,...a),[])}function A({prop:a,defaultProp:b,onChange:c=()=>{}}){let[d,e]=function({defaultProp:a,onChange:b}){let c=i.default.useState(a),[d]=c,e=i.default.useRef(d),f=z(b);return i.default.useEffect(()=>{e.current!==d&&(f(d),e.current=d)},[d,e,f]),c}({defaultProp:b,onChange:c}),f=void 0!==a,g=f?a:d,h=z(c);return[g,i.default.useCallback(b=>{if(f){let c="function"==typeof b?b(a):b;c!==a&&h(c)}else e(b)},[f,a,e,h])]}let B=()=>()=>{},C=null;function D({open:a,onOpenChange:c,children:d,onDrag:e,onRelease:f,snapPoints:g,shouldScaleBackground:k=!1,setBackgroundColorOnScale:n=!0,closeThreshold:r=.25,scrollLockTimeout:w=100,dismissible:z=!0,handleOnly:B=!1,fadeFromIndex:D=g&&g.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]=A({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]=i.default.useState(!1),[$,_]=i.default.useState(!1),[aa,ab]=i.default.useState(!1),ac=i.default.useRef(null),ad=i.default.useRef(null),ae=i.default.useRef(null),af=i.default.useRef(null),ag=i.default.useRef(null),ah=i.default.useRef(!1),ai=i.default.useRef(null),aj=i.default.useRef(0),ak=i.default.useRef(!1),al=i.default.useRef(!M),am=i.default.useRef(0),an=i.default.useRef(null),ao=i.default.useRef((null==(U=an.current)?void 0:U.getBoundingClientRect().height)||0),ap=i.default.useRef((null==(V=an.current)?void 0:V.getBoundingClientRect().width)||0),aq=i.default.useRef(0),ar=i.default.useCallback(a=>{g&&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:f,onSnapPointChange:g,direction:h="bottom",container:j,snapToSequentialPoint:k}){let[l,m]=A({prop:a,defaultProp:null==c?void 0:c[0],onChange:b}),[n,o]=i.default.useState(void 0);i.default.useEffect(()=>{function a(){o({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);let p=i.default.useMemo(()=>l===(null==c?void 0:c[c.length-1])||null,[c,l]),q=i.default.useMemo(()=>{var a;return null!=(a=null==c?void 0:c.findIndex(a=>a===l))?a:null},[c,l]),r=c&&c.length>0&&(f||0===f)&&!Number.isNaN(f)&&c[f]===l||!c,s=i.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)),u(h)){let e=c?d:n?a*b.height:0;return n?"bottom"===h?b.height-e:-b.height+e:e}let e=c?d:n?a*b.width:0;return n?"right"===h?b.width-e:-b.width+e:e}))?a:[]},[c,n,j]),v=i.default.useMemo(()=>null!==q?null==s?void 0:s[q]:null,[s,q]),w=i.default.useCallback(a=>{var b;let i=null!=(b=null==s?void 0:s.findIndex(b=>b===a))?b:null;g(i),t(d.current,{transition:`transform 0.5s cubic-bezier(${x.join(",")})`,transform:u(h)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`}),s&&i!==s.length-1&&void 0!==f&&i!==f&&i<f?t(e.current,{transition:`opacity 0.5s cubic-bezier(${x.join(",")})`,opacity:"0"}):t(e.current,{transition:`opacity 0.5s cubic-bezier(${x.join(",")})`,opacity:"1"}),m(null==c?void 0:c[Math.max(i,0)])},[d.current,c,s,f,e,m]);return i.default.useEffect(()=>{if(l||a){var b;let d=null!=(b=null==c?void 0:c.findIndex(b=>b===a||b===l))?b:-1;s&&-1!==d&&"number"==typeof s[d]&&w(s[d])}},[l,a,c,s,w]),{isLastSnapPoint:p,activeSnapPoint:l,shouldFade:r,getPercentageDragged:function(a,b){if(!c||"number"!=typeof q||!s||void 0===f)return null;let d=q===f-1;if(q>=f&&b)return 0;if(d&&!b)return 1;if(!r&&!d)return null;let e=d?q+1:q-1,g=a/Math.abs(d?s[e]-s[e-1]:s[e+1]-s[e]);return d?1-g:g},setActiveSnapPoint:m,activeSnapPointIndex:q,onRelease:function({draggedDistance:a,closeDrawer:b,velocity:d,dismissible:g}){if(void 0===f)return;let i="bottom"===h||"right"===h?(null!=v?v:0)-a:(null!=v?v:0)+a,j=q===f-1,l=0===q,m=a>0;if(j&&t(e.current,{transition:`opacity 0.5s cubic-bezier(${x.join(",")})`}),!k&&d>2&&!m)return void(g?b():w(s[0]));if(!k&&d>2&&m&&s&&c)return void w(s[c.length-1]);let n=null==s?void 0:s.reduce((a,b)=>"number"!=typeof a||"number"!=typeof b?a:Math.abs(b-i)<Math.abs(a-i)?b:a),o=u(h)?window.innerHeight:window.innerWidth;if(d>.4&&Math.abs(a)<.4*o){let a=m?1:-1;return a>0&&p&&c?void w(s[c.length-1]):void(l&&a<0&&g&&b(),null===q||w(s[q+a]))}w(n)},onDrag:function({draggedDistance:a}){if(null===v)return;let b="bottom"===h||"right"===h?v-a:v+a;("bottom"===h||"right"===h)&&b<s[s.length-1]||("top"===h||"left"===h)&&b>s[s.length-1]||t(d.current,{transform:u(h)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`})},snapPointsOffset:s}}({snapPoints:g,activeSnapPointProp:E,setActiveSnapPointProp:F,drawerRef:an,fadeFromIndex:D,overlayRef:ac,onSnapPointChange:ar,direction:L,container:S,snapToSequentialPoint:O});!function(a={}){let{isDisabled:c}=a;o(()=>{if(!c)return 1==++q&&m(),()=>{0==--q&&(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:f}){let[g,h]=i.default.useState(()=>""),j=i.default.useRef(0),k=i.default.useCallback(()=>{if(l()&&null===C&&a&&!f){C={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:`${-j.current}px`,left:`${-a}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let a=b-window.innerHeight;a&&j.current>=b&&(document.body.style.top=`${-(j.current+a)}px`)}),300)}},[a]),m=i.default.useCallback(()=>{if(l()&&null!==C&&!f){let a=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,C),window.requestAnimationFrame(()=>{e&&g!==window.location.href?h(window.location.href):window.scrollTo(b,a)}),C=null}},[g]);return i.default.useEffect(()=>{function a(){j.current=window.scrollY}return a(),window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a)}},[]),i.default.useEffect(()=>{if(b)return()=>{"u"<typeof document||document.querySelector("[data-vaul-drawer]")||m()}},[b,m]),i.default.useEffect(()=>{!c&&d&&(a?(window.matchMedia("(display-mode: standalone)").matches||k(),b||window.setTimeout(()=>{m()},500)):m())},[a,d,g,b,c,k,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?v(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()<w&&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(y),ah.current=!1,_(!1),af.current=new Date),null==I||I(),a||X(!1),setTimeout(()=>{g&&au(g[0])},500)}function aE(){if(!an.current)return;let a=document.querySelector("[data-vaul-drawer-wrapper]"),b=v(an.current,L);t(an.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${x.join(",")})`}),t(ac.current,{transition:`opacity 0.5s cubic-bezier(${x.join(",")})`,opacity:"1"}),k&&b&&b>0&&W&&t(a,{borderRadius:"8px",overflow:"hidden",...u(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(${x.join(",")})`},!0)}return i.default.useEffect(()=>{window.requestAnimationFrame(()=>{al.current=!0})},[]),i.default.useEffect(()=>{var a;function b(){var a,b;if(an.current&&Q&&((a=document.activeElement)instanceof HTMLInputElement&&!p.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),g&&g.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`;g&&g.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,g,aw]),i.default.useEffect(()=>(W&&(t(document.documentElement,{scrollBehavior:"auto"}),ad.current=new Date),()=>{!function(a,b){if(!a||!(a instanceof HTMLElement))return;let c=s.get(a);c&&(a.style[b]=c[b])}(document.documentElement,"scrollBehavior")}),[W]),i.default.useEffect(()=>{H||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[H]),i.default.createElement(h.Root,{defaultOpen:M,onOpenChange:a=>{(z||a)&&(a?Z(!0):aD(!0),X(a))},open:W},i.default.createElement(j.Provider,{value:{activeSnapPoint:as,snapPoints:g,setActiveSnapPoint:au,drawerRef:an,overlayRef:ac,onOpenChange:c,onPress:function(a){var b,c;!z&&!g||(!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,m(),a.target.setPointerCapture(a.pointerId),aj.current=u(L)?a.pageY:a.pageX)},onRelease:function(a){var b,c;if(!$||!an.current)return;an.current.classList.remove(y),ah.current=!1,_(!1),af.current=new Date;let d=v(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(),h=aj.current-(u(L)?a.pageY:a.pageX),i=Math.abs(h)/e;if(i>.05&&(ab(!0),setTimeout(()=>{ab(!1)},200)),g){av({draggedDistance:h*("bottom"===L||"right"===L?1:-1),closeDrawer:aD,velocity:i,dismissible:z}),null==f||f(a,!0);return}if("bottom"===L||"right"===L?h>0:h<0){aE(),null==f||f(a,!0);return}if(i>.4){aD(),null==f||f(a,!1);return}let j=Math.min(null!=(b=an.current.getBoundingClientRect().height)?b:0,window.innerHeight),k=Math.min(null!=(c=an.current.getBoundingClientRect().width)?c:0,window.innerWidth);if(Math.abs(d)>=("left"===L||"right"===L?k:j)*r){aD(),null==f||f(a,!1);return}null==f||f(a,!0),aE()},onDrag:function(a){if(an.current&&$){let b="bottom"===L||"right"===L?1:-1,c=(aj.current-(u(L)?a.pageY:a.pageX))*b,d=c>0,f=g&&!z&&!d;if(f&&0===at)return;let h=Math.abs(c),i=document.querySelector("[data-vaul-drawer-wrapper]"),j=h/("bottom"===L||"top"===L?ao.current:ap.current),l=az(h,d);if(null!==l&&(j=l),f&&j>=1||!ah.current&&!aC(a.target,d))return;if(an.current.classList.add(y),ah.current=!0,t(an.current,{transition:"none"}),t(ac.current,{transition:"none"}),g&&ax({draggedDistance:c}),d&&!g){let a=Math.min(-(8*(Math.log(c+1)-2)*1),0)*b;t(an.current,{transform:u(L)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`});return}let m=1-j;if((ay||D&&at===D-1)&&(null==e||e(a,j),t(ac.current,{opacity:`${m}`,transition:"none"},!0)),i&&ac.current&&k){let a=Math.min(aB()+j*(1-aB()),1),b=8-8*j,c=Math.max(0,14-14*j);t(i,{borderRadius:`${b}px`,transform:u(L)?`scale(${a}) translate3d(0, ${c}px, 0)`:`scale(${a}) translate3d(${c}px, 0, 0)`,transition:"none"},!0)}if(!g){let a=h*b;t(an.current,{transform:u(L)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`})}}},dismissible:z,shouldAnimate:al,handleOnly:B,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;t(an.current,{transform:u(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),t(an.current,{transition:`transform 0.5s cubic-bezier(${x.join(",")})`,transform:u(L)?`scale(${b}) translate3d(0, ${c}px, 0)`:`scale(${b}) translate3d(${c}px, 0, 0)`}),!a&&an.current&&(ai.current=setTimeout(()=>{let a=v(an.current,L);t(an.current,{transition:"none",transform:u(L)?`translate3d(0, ${a}px, 0)`:`translate3d(${a}px, 0, 0)`})},500))},onNestedRelease:function(a,b){let c=u(L)?window.innerHeight:window.innerWidth,d=b?(c-16)/c:1,e=b?-16:0;b&&t(an.current,{transition:`transform 0.5s cubic-bezier(${x.join(",")})`,transform:u(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:k,setBackgroundColorOnScale:n,noBodyStyles:K,container:S,autoFocus:T}},d))}let E=i.default.forwardRef(function({...a},b){let{overlayRef:c,snapPoints:d,onRelease:e,shouldFade:f,isOpen:g,modal:j,shouldAnimate:l}=k(),m=r(b,c),n=d&&d.length>0;if(!j)return null;let o=i.default.useCallback(a=>e(a),[e]);return i.default.createElement(h.Overlay,{onMouseUp:o,ref:m,"data-vaul-overlay":"","data-vaul-snap-points":g&&n?"true":"false","data-vaul-snap-points-overlay":g&&f?"true":"false","data-vaul-animate":(null==l?void 0:l.current)?"true":"false",...a})});E.displayName="Drawer.Overlay";let F=i.default.forwardRef(function({onPointerDownOutside:a,style:b,onOpenAutoFocus:c,...d},e){let{drawerRef:f,onPress:g,onRelease:j,onDrag:l,keyboardIsOpen:m,snapPointsOffset:n,activeSnapPointIndex:o,modal:p,isOpen:q,direction:s,snapPoints:t,container:v,handleOnly:y,shouldAnimate:z,autoFocus:A}=k(),[C,D]=i.default.useState(!1),E=r(e,f),F=i.default.useRef(null),G=i.default.useRef(null),H=i.default.useRef(!1),I=t&&t.length>0;function J(a){F.current=null,H.current=!1,j(a)}return!function(){let{direction:a,isOpen:b,shouldScaleBackground:c,setBackgroundColorOnScale:d,noBodyStyles:e}=k(),f=i.default.useRef(null),g=(0,i.useMemo)(()=>document.body.style.backgroundColor,[]);function h(){return(window.innerWidth-26)/window.innerWidth}i.default.useEffect(()=>{if(b&&c){f.current&&clearTimeout(f.current);let b=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!b)return;!function(...a){}(d&&!e?w(document.body,{background:"black"}):B,w(b,{transformOrigin:u(a)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${x.join(",")})`}));let c=w(b,{borderRadius:"8px",overflow:"hidden",...u(a)?{transform:`scale(${h()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${h()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),f.current=window.setTimeout(()=>{g?document.body.style.background=g:document.body.style.removeProperty("background")},500)}}},[b,c,g])}(),i.default.useEffect(()=>{I&&window.requestAnimationFrame(()=>{D(!0)})},[]),i.default.createElement(h.Content,{"data-vaul-drawer-direction":s,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":q&&I?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":(null==z?void 0:z.current)?"true":"false",...d,ref:E,style:n&&n.length>0?{"--snap-point-height":`${n[null!=o?o:0]}px`,...b}:b,onPointerDown:a=>{y||(null==d.onPointerDown||d.onPointerDown.call(d,a),F.current={x:a.pageX,y:a.pageY},g(a))},onOpenAutoFocus:a=>{null==c||c(a),A||a.preventDefault()},onPointerDownOutside:b=>{(null==a||a(b),!p||b.defaultPrevented)?b.preventDefault():m.current&&(m.current=!1)},onFocusOutside:a=>{if(!p)return void a.preventDefault()},onPointerMove:a=>{if(G.current=a,y||(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},s,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,j(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)}})});F.displayName="Drawer.Content";let G=i.default.forwardRef(function({preventCycle:a=!1,children:b,...c},d){let{closeDrawer:e,isDragging:f,snapPoints:g,activeSnapPoint:h,setActiveSnapPoint:j,dismissible:l,handleOnly:m,isOpen:n,onPress:o,onDrag:p}=k(),q=i.default.useRef(null),r=i.default.useRef(!1);function s(){q.current&&window.clearTimeout(q.current),r.current=!1}return i.default.createElement("div",{onClick:function(){r.current?s():window.setTimeout(()=>{!function(){if(f||a||r.current)return s();if(s(),!g||0===g.length){l||e();return}if(h===g[g.length-1]&&l)return e();let b=g.findIndex(a=>a===h);-1===b||j(g[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},i.default.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},b))});G.displayName="Drawer.Handle";let H={Root:D,NestedRoot:function({onDrag:a,onOpenChange:b,open:c,...d}){let{onNestedDrag:e,onNestedOpenChange:f,onNestedRelease:g}=k();if(!e)throw Error("Drawer.NestedRoot must be placed in another drawer");return i.default.createElement(D,{nested:!0,open:c,onClose:()=>{f(!1)},onDrag:(b,c)=>{e(b,c),null==a||a(b,c)},onOpenChange:a=>{a&&f(a),null==b||b(a)},onRelease:g,...d})},Content:F,Overlay:E,Trigger:h.Trigger,Portal:function(a){let b=k(),{container:c=b.container,...d}=a;return i.default.createElement(h.Portal,{container:c,...d})},Handle:G,Close:h.Close,Title:h.Title,Description:h.Description};function I({...a}){return(0,d.jsx)(H.Root,{"data-slot":"drawer",...a})}function J({...a}){return(0,d.jsx)(H.Portal,{"data-slot":"drawer-portal",...a})}function K({className:a,...b}){return(0,d.jsx)(H.Overlay,{"data-slot":"drawer-overlay",className:(0,g.cn)("fixed inset-0 z-50 bg-black/50",a),...b})}function L({className:a,children:b,direction:c="bottom",showCloseButton:f=!0,...h}){return(0,d.jsx)(J,{children:(0,d.jsxs)(H.Content,{"data-slot":"drawer-content",className:(0,g.cn)("bg-background fixed z-50 flex flex-col shadow-lg","bottom"===c&&"inset-x-0 bottom-0 mb-24 rounded-t-lg border-t","top"===c&&"inset-x-0 top-0 mt-24 rounded-b-lg border-b","right"===c&&"inset-y-0 right-0 h-full w-3/4 border-l","left"===c&&"inset-y-0 left-0 h-full w-3/4 border-r",a),style:{"--initial-transform":"right"===c?"calc(100% + 8px)":"left"===c||"top"===c?"calc(-100% - 8px)":"calc(100% + 8px)",userSelect:"text",...h.style??{}},...h,children:[b,f?(0,d.jsxs)(H.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,d.jsx)(e.XIcon,{className:"size-4"}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})})}function M({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"drawer-header",className:(0,g.cn)("flex flex-col gap-1.5 p-4",a),...b})}function N({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"drawer-footer",className:(0,g.cn)("mt-auto flex flex-col gap-2 p-4",a),...b})}function O({className:a,...b}){return(0,d.jsx)(H.Title,{"data-slot":"drawer-title",className:(0,g.cn)("text-foreground font-semibold",a),...b})}function P({className:a,...b}){return(0,d.jsx)(H.Description,{"data-slot":"drawer-description",className:(0,g.cn)("text-muted-foreground text-sm",a),...b})}a.s(["Drawer",()=>I,"DrawerContent",()=>L,"DrawerDescription",()=>P,"DrawerFooter",()=>N,"DrawerHeader",()=>M,"DrawerOverlay",()=>K,"DrawerTitle",()=>O],2824);let Q=(0,f.cva)("",{variants:{size:{sm:"w-96",md:"w-xl"}},defaultVariants:{size:"sm"}});function R({open:a,onClose:b,modal:c=!1,size:f,header:h,children:i,footer:j,className:k,"data-testid":l}){return(0,d.jsxs)(I,{direction:"right",modal:c,handleOnly:!0,open:a,onOpenChange:a=>{a||b()},children:[c?(0,d.jsx)(K,{}):null,(0,d.jsxs)(L,{direction:"right",showCloseButton:!1,className:(0,g.cn)(Q({size:f}),k),"data-testid":l,children:[(0,d.jsxs)("button",{type:"button","aria-label":"Close",onClick:b,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":l?`${l}-close-button`:void 0,children:[(0,d.jsx)(e.XIcon,{className:"size-4"}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]}),h?(0,d.jsx)(M,{children:h}):null,(0,d.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,d.jsx)("div",{className:"flex flex-col",children:i})}),j?(0,d.jsx)(N,{children:j}):null]})]})}a.s(["BaseDrawer",()=>R],24255),a.s([],78454)}];
2
-
3
- //# sourceMappingURL=_73d14b70._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/components/common/page-header/page-header.tsx","../../../../../../../src/presentation/web/components/common/empty-state/empty-state.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/ui/drawer.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/folder-open.ts"],"sourcesContent":["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","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';\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 } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\nimport {\n Drawer,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerOverlay,\n} from '@/components/ui/drawer';\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}\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}: 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 {/* 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","'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","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 ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNiAxNCAxLjUtMi45QTIgMiAwIDAgMSA5LjI0IDEwSDIwYTIgMiAwIDAgMSAxLjk0IDIuNWwtMS41NCA2YTIgMiAwIDAgMS0xLjk1IDEuNUg0YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDMuOWEyIDIgMCAwIDEgMS42OS45bC44MSAxLjJhMiAyIDAgMCAwIDEuNjcuOUgxOGEyIDIgMCAwIDEgMiAydjIiIC8+Cjwvc3ZnPgo=) - 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"],"names":[],"mappings":"8DAAA,EAAA,EAAA,CAAA,CAAA,OASO,SAAS,EAAW,OAAE,CAAK,aAAE,CAAW,UAAE,CAAQ,WAAE,CAAS,CAAmB,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