@shepai/cli 1.80.0 → 1.82.0-pr253.d84c11e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +3 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +1 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +4 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +4 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +11 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +3 -0
- package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-feature-node-data.js +1 -0
- package/dist/src/presentation/web/app/build-graph-nodes.js +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +10 -3
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.js +65 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.js +28 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +3 -3
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +24 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +7 -7
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +29 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3c963c6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3c963c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_645e9a63._.js → _2af33c97._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_645e9a63._.js.map → _2af33c97._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6e08ce21._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_bc129147._.js +3 -0
- package/web/.next/server/chunks/ssr/{_c29db9b3._.js.map → _bc129147._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_5d4e7151._.js → _c3a8bcb1._.js} +2 -2
- package/web/.next/server/chunks/ssr/_c3a8bcb1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_50b7100e._.js → _fc85e365._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_50b7100e._.js.map → _fc85e365._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7efa14ca._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7efa14ca._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_get-graph-data_ts_b018483e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_get-graph-data_ts_b018483e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b59d79db._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b59d79db._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +28 -28
- package/web/.next/static/chunks/049436e97055bd8c.js +1 -0
- package/web/.next/static/chunks/{fae8e157d874ab74.js → 1e24e87dd229b97d.js} +1 -1
- package/web/.next/static/chunks/{5c11c4f4042077dd.js → 38637037fdd130ab.js} +1 -1
- package/web/.next/static/chunks/6147644d1d9a6b08.js +1 -0
- package/web/.next/static/chunks/{594c694d9e749bf6.js → 732d344a548497d8.js} +1 -1
- package/web/.next/static/chunks/{158f8113bf93c2ee.js → 898f535e5b503bae.js} +1 -1
- package/web/.next/static/chunks/{1d1da60d2d4f5f64.js → a6dd2052e3ad0877.js} +1 -1
- package/web/.next/static/chunks/ae01d2be1d0bad47.css +2 -0
- package/web/.next/static/chunks/ae695d21bbb6470d.js +1 -0
- package/web/.next/static/chunks/{a996823ce96362aa.js → c235cfe3cb8df204.js} +1 -1
- package/web/.next/static/chunks/{4f5b21c7dfd3c5bb.js → dd0c73ffd3693e82.js} +1 -1
- package/web/.next/server/chunks/ssr/_5d4e7151._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_c29db9b3._.js +0 -3
- package/web/.next/static/chunks/0263c85901a20cec.js +0 -1
- package/web/.next/static/chunks/62b3642ac8337a1d.js +0 -1
- package/web/.next/static/chunks/96bab6d3820504f3.css +0 -2
- package/web/.next/static/chunks/a23c696600afe26c.js +0 -1
- /package/web/.next/static/{TpbhEjRZP-asaxlR5yaGh → CgOQiYlMFzJ5jP0zO9cYh}/_buildManifest.js +0 -0
- /package/web/.next/static/{TpbhEjRZP-asaxlR5yaGh → CgOQiYlMFzJ5jP0zO9cYh}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{TpbhEjRZP-asaxlR5yaGh → CgOQiYlMFzJ5jP0zO9cYh}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2287,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(90033),a=e.i(90537),a=a,o=e.i(31777);let l=r.Dialog.Root;r.Dialog.Trigger;let i=r.Dialog.Portal,s=r.Dialog.Close,u=n.forwardRef(({className:e,onClick:n,...a},l)=>(0,t.jsx)(r.Dialog.Overlay,{ref:l,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80",e),onClick:e=>{e.stopPropagation(),n?.(e)},...a}));u.displayName=r.Dialog.Overlay.displayName;let d=n.forwardRef(({className:e,children:n,...l},s)=>(0,t.jsxs)(i,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(r.Dialog.Content,{ref:s,className:(0,o.cn)("bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg",e),...l,children:[n,(0,t.jsxs)(r.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(a.default,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));d.displayName=r.Dialog.Content.displayName;let c=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});c.displayName="DialogHeader";let f=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});f.displayName="DialogFooter";let p=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Title,{ref:a,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...n}));p.displayName=r.Dialog.Title.displayName;let m=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Description,{ref:a,className:(0,o.cn)("text-muted-foreground text-sm",e),...n}));m.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>s,"DialogContent",()=>d,"DialogDescription",()=>m,"DialogFooter",()=>f,"DialogHeader",()=>c,"DialogTitle",()=>p],2287)},24042,64970,e=>{"use strict";var t=e.i(3645);let n=(0,t.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>n],24042);let r=(0,t.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>r],64970)},81803,72714,e=>{"use strict";var t=e.i(20314),n=e.i(83428),r=e.i(51251),a=e.i(31777),o=e.i(35364),l=e.i(8361);function i({label:e,onClick:i,loading:s,error:u,icon:d,iconOnly:c=!1,variant:f="outline",size:p="sm"}){let m=(0,l.useSoundAction)("click");return(0,t.jsxs)(o.Button,{variant:f,size:p,"aria-label":e,disabled:s,onClick:()=>{m.play(),i()},className:(0,a.cn)("gap-1.5",u&&"text-destructive hover:text-destructive",!u&&c&&"ghost"===f&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[s?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):u?(0,t.jsx)(r.CircleAlert,{className:"size-4"}):(0,t.jsx)(d,{className:"size-4"}),c?null:e]})}e.s(["ActionButton",()=>i],72714),e.s([],81803)},99348,17466,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(83428),a=e.i(30702),o=e.i(38573),l=e.i(17406),i=e.i(81846),s=e.i(2287),u=e.i(21023);let d=(0,u.createServerReference)("40a8b730cbfe3d55165e62254c488ebdae9ed5d4c5",u.callServer,void 0,u.findSourceMapURL,"getDeploymentLogs");function c({open:e,onOpenChange:r,targetId:a}){let{logs:o,isConnected:l}=function(e){let[t,r]=(0,n.useState)([]),[a,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),i=(0,n.useCallback)(()=>{l.current&&(l.current.close(),l.current=null),o(!1)},[]);return(0,n.useEffect)(()=>{if(!e){r([]),o(!1);return}d(e).then(e=>{e&&r(e)}).catch(()=>{});let t=new EventSource(`/api/deployment-logs?targetId=${e}`);return l.current=t,t.onopen=()=>{o(!0)},t.addEventListener("log",e=>{let t=JSON.parse(e.data);r(e=>[...e,t])}),t.onerror=()=>{o(!1)},()=>{t.close(),l.current=null}},[e,i]),{logs:t,isConnected:a}}(e?a:null);return(0,t.jsx)(f,{open:e,onOpenChange:r,logs:o,isConnected:l})}function f({open:e,onOpenChange:r,logs:a,isConnected:l}){let i=(0,n.useRef)(null),u=(0,n.useRef)(!0),d=(0,n.useCallback)(()=>{let e=i.current;e&&(u.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);return(0,n.useEffect)(()=>{u.current&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[a]),(0,t.jsx)(s.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(s.DialogContent,{className:"flex h-[calc(100vh-48px)] max-h-[calc(100vh-48px)] w-full max-w-[calc(100vw-48px)] flex-col gap-0 bg-zinc-950 p-0 text-zinc-100 sm:rounded-lg","aria-describedby":void 0,children:[(0,t.jsxs)(s.DialogHeader,{className:"flex flex-row items-center justify-between border-b border-zinc-800 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Terminal,{className:"h-4 w-4 text-zinc-400"}),(0,t.jsx)(s.DialogTitle,{className:"text-sm font-medium text-zinc-100",children:"Server Logs"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pr-8",children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${l?"bg-green-500":"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-xs text-zinc-400",children:l?"Connected":"Disconnected"})]})]}),(0,t.jsxs)("div",{ref:i,onScroll:d,className:"flex-1 overflow-auto p-4 font-mono text-sm leading-relaxed",children:[0===a.length?(0,t.jsx)("p",{className:"text-zinc-500",children:"Waiting for log output..."}):a.map(e=>(0,t.jsx)(p,{entry:e},`${e.timestamp}-${e.stream}-${e.line}`)),!l&&a.length>0&&(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-800 pt-2 text-zinc-500",children:"[Server stopped]"})]})]})})}function p({entry:e}){return(0,t.jsx)("div",{"data-stream":e.stream,className:"stderr"===e.stream?"text-red-400":"text-zinc-200",children:(0,t.jsx)("span",{className:"break-all whitespace-pre-wrap",children:e.line})})}function m({status:e,url:s,targetId:u}){let[d,f]=(0,n.useState)(!1),p=u&&(e===l.DeploymentState.Booting||e===l.DeploymentState.Ready);switch(e){case l.DeploymentState.Booting:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Badge,{className:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",children:[(0,t.jsx)(r.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Starting...",p?(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:"ml-1.5 inline-flex items-center rounded-sm p-0.5 hover:bg-blue-100",onClick:e=>{e.stopPropagation(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});case l.DeploymentState.Ready:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,t.jsx)("span",{className:"mr-1 inline-block h-2 w-2 rounded-full bg-green-500"}),s?(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:underline",onClick:e=>e.stopPropagation(),children:[s,(0,t.jsx)(a.ExternalLink,{className:"h-3 w-3"})]}):"Ready",p?(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:"ml-1.5 inline-flex items-center rounded-sm p-0.5 hover:bg-green-100",onClick:e=>{e.stopPropagation(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});default:return null}}e.s(["DeploymentStatusBadge",()=>m],17466),e.s([],99348)},8537,e=>{"use strict";var t=e.i(79054),n=e.i(18354),r=e.i(21023);let a=(0,r.createServerReference)("401cf6bbb747c1446fb3ee5f161b1ab590a858f553",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),o=(0,r.createServerReference)("4018902d96dfe6ec4c029bc41d5e042d6dcbbc1fd6",r.callServer,void 0,r.findSourceMapURL,"deployRepository"),l=(0,r.createServerReference)("402652b09e6262088f40b9571b7df270008f563e16",r.callServer,void 0,r.findSourceMapURL,"stopDeployment"),i=(0,r.createServerReference)("40ed39947dbf9ba3a01e72a4c178439f16e7839315",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus"),s=(0,n.createLogger)("[useDeployAction]");function u(e){let[n,r]=(0,t.useState)(!1),[u,d]=(0,t.useState)(!1),[c,f]=(0,t.useState)(null),[p,m]=(0,t.useState)(null),[g,h]=(0,t.useState)(null),v=(0,t.useRef)(null),w=(0,t.useRef)(null),y=(0,t.useRef)(!0),b=(0,t.useRef)(p);(0,t.useEffect)(()=>{b.current=p},[p]),(0,t.useEffect)(()=>(y.current=!0,()=>{y.current=!1}),[]),(0,t.useEffect)(()=>()=>{v.current&&clearTimeout(v.current),w.current&&clearInterval(w.current)},[]);let x=(0,t.useCallback)(()=>{w.current&&(s.debug("stopping polling"),clearInterval(w.current),w.current=null)},[]),D=(0,t.useCallback)(e=>{x(),s.debug(`starting polling for "${e}" every 3000ms`),w.current=setInterval(async()=>{if(!y.current)return void x();let t=await i(e);y.current&&(t&&"Stopped"!==t.state?(t.state!==b.current&&s.info(`poll state changed: ${b.current} → ${t.state}, url=${t.url}`),m(t.state),h(t.url)):(s.info(`poll result: ${t?`state=${t.state}`:"null (deployment gone)"} — stopping poll`),m(null),h(null),x()))},3e3)},[x]),j=(0,t.useCallback)(async()=>{if(!e)return void s.warn("deploy() called but input is null — no-op");if(n)return void s.warn("deploy() called but already loading — no-op");s.info(`deploy() — targetType="${e.targetType}", targetId="${e.targetId}", repositoryPath="${e.repositoryPath}"`),v.current&&clearTimeout(v.current),r(!0),f(null);try{let t="feature"===e.targetType?await a(e.targetId):await o(e.repositoryPath);if(s.info("server action result:",t),!y.current)return void s.warn("component unmounted after deploy — discarding result");if(t.success)s.info(`deploy succeeded — initial state=${t.state}, starting polling`),m(t.state??null),h(null),D(e.targetId);else{let e=t.error??"An unexpected error occurred";s.error(`deploy failed: ${e}`),f(e),v.current=setTimeout(()=>f(null),5e3)}}catch(t){if(!y.current)return;let e=t instanceof Error?t.message:"An unexpected error occurred";s.error(`deploy threw exception: ${e}`,t),f(e),v.current=setTimeout(()=>f(null),5e3)}finally{y.current&&r(!1)}},[e,n,D]),R=(0,t.useCallback)(async()=>{if(e&&!u){s.info(`stop() — targetId="${e.targetId}"`),d(!0);try{let t=await l(e.targetId);if(s.info("stop result:",t),!y.current)return;t.success&&(x(),m(null),h(null))}catch(e){s.warn("stop error (non-critical):",e)}finally{y.current&&d(!1)}}},[e,u,x]);return{deploy:j,stop:R,deployLoading:n,stopLoading:u,deployError:c,status:p,url:g}}e.s(["useDeployAction",()=>u],8537)},45811,e=>{"use strict";let t;var n=e.i(20314),r=e.i(48249),a=e.i(567),o=e.i(79054);let l=o.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}),i=()=>{let e=o.default.useContext(l);if(!e)throw Error("useDrawerContext must be used within a Drawer.Root");return e};function s(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function u(){return d(/^iPhone/)||d(/^iPad/)||d(/^Mac/)&&navigator.maxTouchPoints>1}function d(e){return"u">typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if(!e||"u"<typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[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 c="u">typeof window?o.useLayoutEffect:o.useEffect;function f(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let p="u">typeof document&&window.visualViewport;function m(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function g(e){for(m(e)&&(e=e.parentElement);e&&!m(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}let h=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),v=0;function w(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function y(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=g(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function b(e){return e instanceof HTMLInputElement&&!h.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function x(...e){return o.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}let D=new WeakMap;function j(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)}),n||D.set(e,r)}let R=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function C(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[R(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/))?parseFloat(a[1].split(", ")[R(t)?5:4]):null}function T(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}let N=[.32,.72,0,1],E="vaul-dragging";function S(e){let t=o.default.useRef(e);return o.default.useEffect(()=>{t.current=e}),o.default.useMemo(()=>(...e)=>null==t.current?void 0:t.current.call(t,...e),[])}function $({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,a]=function({defaultProp:e,onChange:t}){let n=o.default.useState(e),[r]=n,a=o.default.useRef(r),l=S(t);return o.default.useEffect(()=>{a.current!==r&&(l(r),a.current=r)},[r,a,l]),n}({defaultProp:t,onChange:n}),l=void 0!==e,i=l?e:r,s=S(n);return[i,o.default.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)},[l,e,a,s])]}let k=()=>()=>{},P=null;function M({open:e,onOpenChange:n,children:r,onDrag:i,onRelease:d,snapPoints:m,shouldScaleBackground:h=!1,setBackgroundColorOnScale:x=!0,closeThreshold:T=.25,scrollLockTimeout:S=100,dismissible:k=!0,handleOnly:M=!1,fadeFromIndex:O=m&&m.length-1,activeSnapPoint:z,setActiveSnapPoint:L,fixed:B,modal:F=!0,onClose:A,nested:I,noBodyStyles:H=!1,direction:W="bottom",defaultOpen:q=!1,disablePreventScroll:Y=!0,snapToSequentialPoint:U=!1,preventScrollRestoration:X=!1,repositionInputs:V=!0,onAnimationEnd:K,container:J,autoFocus:_=!1}){var G,Q;let[Z=!1,ee]=$({defaultProp:q,prop:e,onChange:e=>{null==n||n(e),e||I||ek(),setTimeout(()=>{null==K||K(e)},500),e&&!F&&"u">typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[et,en]=o.default.useState(!1),[er,ea]=o.default.useState(!1),[eo,el]=o.default.useState(!1),ei=o.default.useRef(null),es=o.default.useRef(null),eu=o.default.useRef(null),ed=o.default.useRef(null),ec=o.default.useRef(null),ef=o.default.useRef(!1),ep=o.default.useRef(null),em=o.default.useRef(0),eg=o.default.useRef(!1),eh=o.default.useRef(!q),ev=o.default.useRef(0),ew=o.default.useRef(null),ey=o.default.useRef((null==(G=ew.current)?void 0:G.getBoundingClientRect().height)||0),eb=o.default.useRef((null==(Q=ew.current)?void 0:Q.getBoundingClientRect().width)||0),ex=o.default.useRef(0),eD=o.default.useCallback(e=>{m&&e===eN.length-1&&(es.current=new Date)},[]),{activeSnapPoint:ej,activeSnapPointIndex:eR,setActiveSnapPoint:eC,onRelease:eT,snapPointsOffset:eN,onDrag:eE,shouldFade:eS,getPercentageDragged:e$}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:l,onSnapPointChange:i,direction:s="bottom",container:u,snapToSequentialPoint:d}){let[c,f]=$({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[p,m]=o.default.useState("u">typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);o.default.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let g=o.default.useMemo(()=>c===(null==n?void 0:n[n.length-1])||null,[n,c]),h=o.default.useMemo(()=>{var e;return null!=(e=null==n?void 0:n.findIndex(e=>e===c))?e:null},[n,c]),v=n&&n.length>0&&(l||0===l)&&!Number.isNaN(l)&&n[l]===c||!n,w=o.default.useMemo(()=>{var e;let t=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:"u">typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return null!=(e=null==n?void 0:n.map(e=>{let n="string"==typeof e,r=0;if(n&&(r=parseInt(e,10)),R(s)){let a=n?r:p?e*t.height:0;return p?"bottom"===s?t.height-a:-t.height+a:a}let a=n?r:p?e*t.width:0;return p?"right"===s?t.width-a:-t.width+a:a}))?e:[]},[n,p,u]),y=o.default.useMemo(()=>null!==h?null==w?void 0:w[h]:null,[w,h]),b=o.default.useCallback(e=>{var t;let o=null!=(t=null==w?void 0:w.findIndex(t=>t===e))?t:null;i(o),j(r.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),w&&o!==w.length-1&&void 0!==l&&o!==l&&o<l?j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"0"}):j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(o,0)])},[r.current,n,w,l,a,f]);return o.default.useEffect(()=>{if(c||e){var t;let r=null!=(t=null==n?void 0:n.findIndex(t=>t===e||t===c))?t:-1;w&&-1!==r&&"number"==typeof w[r]&&b(w[r])}},[c,e,n,w,b]),{isLastSnapPoint:g,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!w||void 0===l)return null;let r=h===l-1;if(h>=l&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;let a=r?h+1:h-1,o=e/Math.abs(r?w[a]-w[a-1]:w[a+1]-w[a]);return r?1-o:o},setActiveSnapPoint:f,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===l)return;let i="bottom"===s||"right"===s?(null!=y?y:0)-e:(null!=y?y:0)+e,u=h===l-1,c=0===h,f=e>0;if(u&&j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`}),!d&&r>2&&!f)return void(o?t():b(w[0]));if(!d&&r>2&&f&&w&&n)return void b(w[n.length-1]);let p=null==w?void 0:w.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-i)<Math.abs(e-i)?t:e),m=R(s)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*m){let e=f?1:-1;return e>0&&g&&n?void b(w[n.length-1]):void(c&&e<0&&o&&t(),null===h||b(w[h+e]))}b(p)},onDrag:function({draggedDistance:e}){if(null===y)return;let t="bottom"===s||"right"===s?y-e:y+e;("bottom"===s||"right"===s)&&t<w[w.length-1]||("top"===s||"left"===s)&&t>w[w.length-1]||j(r.current,{transform:R(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:w}}({snapPoints:m,activeSnapPointProp:z,setActiveSnapPointProp:L,drawerRef:ew,fadeFromIndex:O,overlayRef:ei,onSnapPointChange:eD,direction:W,container:J,snapToSequentialPoint:U});!function(e={}){let{isDisabled:n}=e;c(()=>{if(!n){var e,r,a;let n,o,l,i,s,d,c;return 1==++v&&u()&&(l=0,i=window.pageXOffset,s=window.pageYOffset,d=f((e=document.documentElement,r="paddingRight",a=`${window.innerWidth-document.documentElement.clientWidth}px`,n=e.style[r],e.style[r]=a,()=>{e.style[r]=n})),window.scrollTo(0,0),c=f(w(document,"touchstart",e=>{((o=g(e.target))!==document.documentElement||o!==document.body)&&(l=e.changedTouches[0].pageY)},{passive:!1,capture:!0}),w(document,"touchmove",e=>{if(!o||o===document.documentElement||o===document.body)return void e.preventDefault();let t=e.changedTouches[0].pageY,n=o.scrollTop,r=o.scrollHeight-o.clientHeight;0!==r&&((n<=0&&t>l||n>=r&&t<l)&&e.preventDefault(),l=t)},{passive:!1,capture:!0}),w(document,"touchend",e=>{let t=e.target;b(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},{passive:!1,capture:!0}),w(document,"focus",e=>{let t=e.target;b(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",p&&(p.height<window.innerHeight?requestAnimationFrame(()=>{y(t)}):p.addEventListener("resize",()=>y(t),{once:!0}))}))},!0),w(window,"scroll",()=>{window.scrollTo(0,0)})),t=()=>{d(),c(),window.scrollTo(i,s)}),()=>{0==--v&&(null==t||t())}}},[n])}({isDisabled:!Z||er||!F||eo||!et||!V||!Y});let{restorePositionSetting:ek}=function({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:l}){let[i,u]=o.default.useState(()=>"u">typeof window?window.location.href:""),d=o.default.useRef(0),c=o.default.useCallback(()=>{if(s()&&null===P&&e&&!l){P={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-e}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&d.current>=t&&(document.body.style.top=`${-(d.current+e)}px`)}),300)}},[e]),f=o.default.useCallback(()=>{if(s()&&null!==P&&!l){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,P),window.requestAnimationFrame(()=>{a&&i!==window.location.href?u(window.location.href):window.scrollTo(t,e)}),P=null}},[i]);return o.default.useEffect(()=>{function e(){d.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),o.default.useEffect(()=>{if(t)return()=>{"u"<typeof document||document.querySelector("[data-vaul-drawer]")||f()}},[t,f]),o.default.useEffect(()=>{!n&&r&&(e?(window.matchMedia("(display-mode: standalone)").matches||c(),t||window.setTimeout(()=>{f()},500)):f())},[e,r,i,t,n,c,f]),{restorePositionSetting:f}}({isOpen:Z,modal:F,nested:null!=I&&I,hasBeenOpened:et,preventScrollRestoration:X,noBodyStyles:H});function eP(){return(window.innerWidth-26)/window.innerWidth}function eM(e,t){var n;let r=e,a=null==(n=window.getSelection())?void 0:n.toString(),o=ew.current?C(ew.current,W):null,l=new Date;if("SELECT"===r.tagName||r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===W||"left"===W)return!0;if(es.current&&l.getTime()-es.current.getTime()<500)return!1;if(null!==o&&("bottom"===W?o>0:o<0))return!0;if(a&&a.length>0)return!1;if(ec.current&&l.getTime()-ec.current.getTime()<S&&0===o||t)return ec.current=l,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return ec.current=new Date,!1;if("dialog"===r.getAttribute("role"))break}r=r.parentNode}return!0}function eO(e){er&&ew.current&&(ew.current.classList.remove(E),ef.current=!1,ea(!1),ed.current=new Date),null==A||A(),e||ee(!1),setTimeout(()=>{m&&eC(m[0])},500)}function ez(){if(!ew.current)return;let e=document.querySelector("[data-vaul-drawer-wrapper]"),t=C(ew.current,W);j(ew.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${N.join(",")})`}),j(ei.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"1"}),h&&t&&t>0&&Z&&j(e,{borderRadius:"8px",overflow:"hidden",...R(W)?{transform:`scale(${eP()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${eP()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${N.join(",")})`},!0)}return o.default.useEffect(()=>{window.requestAnimationFrame(()=>{eh.current=!0})},[]),o.default.useEffect(()=>{var e;function t(){if(ew.current&&V&&(b(document.activeElement)||eg.current)){var e;let t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight,r=n-t,a=ew.current.getBoundingClientRect().height||0;ex.current||(ex.current=a);let o=ew.current.getBoundingClientRect().top;if(Math.abs(ev.current-r)>60&&(eg.current=!eg.current),m&&m.length>0&&eN&&eR&&(r+=eN[eR]||0),ev.current=r,a>t||eg.current){let e=ew.current.getBoundingClientRect().height,l=e;e>t&&(l=t-(a>.8*n?o:26)),B?ew.current.style.height=`${e-Math.max(r,0)}px`:ew.current.style.height=`${Math.max(l,t-o)}px`}else{let e;e=navigator.userAgent,"u">typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))||(ew.current.style.height=`${ex.current}px`)}m&&m.length>0&&!eg.current?ew.current.style.bottom="0px":ew.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[eR,m,eN]),o.default.useEffect(()=>(Z&&(j(document.documentElement,{scrollBehavior:"auto"}),es.current=new Date),()=>{!function(e,t){if(!e||!(e instanceof HTMLElement))return;let n=D.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[Z]),o.default.useEffect(()=>{F||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[F]),o.default.createElement(a.Root,{defaultOpen:q,onOpenChange:e=>{(k||e)&&(e?en(!0):eO(!0),ee(e))},open:Z},o.default.createElement(l.Provider,{value:{activeSnapPoint:ej,snapPoints:m,setActiveSnapPoint:eC,drawerRef:ew,overlayRef:ei,onOpenChange:n,onPress:function(e){var t,n;!k&&!m||(!ew.current||ew.current.contains(e.target))&&(ey.current=(null==(t=ew.current)?void 0:t.getBoundingClientRect().height)||0,eb.current=(null==(n=ew.current)?void 0:n.getBoundingClientRect().width)||0,ea(!0),eu.current=new Date,u()&&window.addEventListener("touchend",()=>ef.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),em.current=R(W)?e.pageY:e.pageX)},onRelease:function(e){var t,n;if(!er||!ew.current)return;ew.current.classList.remove(E),ef.current=!1,ea(!1),ed.current=new Date;let r=C(ew.current,W);if(!e||!eM(e.target,!1)||!r||Number.isNaN(r)||null===eu.current)return;let a=ed.current.getTime()-eu.current.getTime(),o=em.current-(R(W)?e.pageY:e.pageX),l=Math.abs(o)/a;if(l>.05&&(el(!0),setTimeout(()=>{el(!1)},200)),m){eT({draggedDistance:o*("bottom"===W||"right"===W?1:-1),closeDrawer:eO,velocity:l,dismissible:k}),null==d||d(e,!0);return}if("bottom"===W||"right"===W?o>0:o<0){ez(),null==d||d(e,!0);return}if(l>.4){eO(),null==d||d(e,!1);return}let i=Math.min(null!=(t=ew.current.getBoundingClientRect().height)?t:0,window.innerHeight),s=Math.min(null!=(n=ew.current.getBoundingClientRect().width)?n:0,window.innerWidth);if(Math.abs(r)>=("left"===W||"right"===W?s:i)*T){eO(),null==d||d(e,!1);return}null==d||d(e,!0),ez()},onDrag:function(e){if(ew.current&&er){let t="bottom"===W||"right"===W?1:-1,n=(em.current-(R(W)?e.pageY:e.pageX))*t,r=n>0,a=m&&!k&&!r;if(a&&0===eR)return;let o=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]"),s=o/("bottom"===W||"top"===W?ey.current:eb.current),u=e$(o,r);if(null!==u&&(s=u),a&&s>=1||!ef.current&&!eM(e.target,r))return;if(ew.current.classList.add(E),ef.current=!0,j(ew.current,{transition:"none"}),j(ei.current,{transition:"none"}),m&&eE({draggedDistance:n}),r&&!m){let e=Math.min(-(8*(Math.log(n+1)-2)*1),0)*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`});return}let d=1-s;if((eS||O&&eR===O-1)&&(null==i||i(e,s),j(ei.current,{opacity:`${d}`,transition:"none"},!0)),l&&ei.current&&h){let e=Math.min(eP()+s*(1-eP()),1),t=8-8*s,n=Math.max(0,14-14*s);j(l,{borderRadius:`${t}px`,transform:R(W)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!m){let e=o*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:k,shouldAnimate:eh,handleOnly:M,isOpen:Z,isDragging:er,shouldFade:eS,closeDrawer:eO,onNestedDrag:function(e,t){if(t<0)return;let n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),a=-16+16*t;j(ew.current,{transform:R(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){let t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;ep.current&&window.clearTimeout(ep.current),j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&ew.current&&(ep.current=setTimeout(()=>{let e=C(ew.current,W);j(ew.current,{transition:"none",transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){let n=R(W)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:eg,modal:F,snapPointsOffset:eN,activeSnapPointIndex:eR,direction:W,shouldScaleBackground:h,setBackgroundColorOnScale:x,noBodyStyles:H,container:J,autoFocus:_}},r))}let O=o.default.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:l,shouldFade:s,isOpen:u,modal:d,shouldAnimate:c}=i(),f=x(t,n),p=r&&r.length>0;if(!d)return null;let m=o.default.useCallback(e=>l(e),[l]);return o.default.createElement(a.Overlay,{onMouseUp:m,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":u&&p?"true":"false","data-vaul-snap-points-overlay":u&&s?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});O.displayName="Drawer.Overlay";let z=o.default.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},l){let{drawerRef:s,onPress:u,onRelease:d,onDrag:c,keyboardIsOpen:f,snapPointsOffset:p,activeSnapPointIndex:m,modal:g,isOpen:h,direction:v,snapPoints:w,container:y,handleOnly:b,shouldAnimate:D,autoFocus:j}=i(),[C,E]=o.default.useState(!1),S=x(l,s),$=o.default.useRef(null),P=o.default.useRef(null),M=o.default.useRef(!1),O=w&&w.length>0;function z(e){$.current=null,M.current=!1,d(e)}return!function(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=i(),l=o.default.useRef(null),s=(0,o.useMemo)(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-26)/window.innerWidth}o.default.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);let t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;!function(...e){}(r&&!a?T(document.body,{background:"black"}):k,T(t,{transformOrigin:R(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${N.join(",")})`}));let n=T(t,{borderRadius:"8px",overflow:"hidden",...R(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),l.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},500)}}},[t,n,s])}(),o.default.useEffect(()=>{O&&window.requestAnimationFrame(()=>{E(!0)})},[]),o.default.createElement(a.Content,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":h&&O?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":(null==D?void 0:D.current)?"true":"false",...r,ref:S,style:p&&p.length>0?{"--snap-point-height":`${p[null!=m?m:0]}px`,...t}:t,onPointerDown:e=>{b||(null==r.onPointerDown||r.onPointerDown.call(r,e),$.current={x:e.pageX,y:e.pageY},u(e))},onOpenAutoFocus:e=>{null==n||n(e),j||e.preventDefault()},onPointerDownOutside:t=>{(null==e||e(t),!g||t.defaultPrevented)?t.preventDefault():f.current&&(f.current=!1)},onFocusOutside:e=>{if(!g)return void e.preventDefault()},onPointerMove:e=>{if(P.current=e,b||(null==r.onPointerMove||r.onPointerMove.call(r,e),!$.current))return;let t=e.pageY-$.current.y,n=e.pageX-$.current.x,a="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(M.current)return!0;let r=Math.abs(e.y),a=Math.abs(e.x),o=a>r,l=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*l<0)&&a>=0&&a<=n)return o}else if(!(e.y*l<0)&&r>=0&&r<=n)return!o;return M.current=!0,!0})({x:n,y:t},v,a)?c(e):(Math.abs(n)>a||Math.abs(t)>a)&&($.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),$.current=null,M.current=!1,d(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),z(P.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),P.current&&z(P.current)}})});z.displayName="Drawer.Content";let L=o.default.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:a,isDragging:l,snapPoints:s,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:c,handleOnly:f,isOpen:p,onPress:m,onDrag:g}=i(),h=o.default.useRef(null),v=o.default.useRef(!1);function w(){h.current&&window.clearTimeout(h.current),v.current=!1}return o.default.createElement("div",{onClick:function(){v.current?w():window.setTimeout(()=>{!function(){if(l||e||v.current)return w();if(w(),!s||0===s.length){c||a();return}if(u===s[s.length-1]&&c)return a();let t=s.findIndex(e=>e===u);-1===t||d(s[t+1])}()},120)},onPointerCancel:w,onPointerDown:e=>{f&&m(e),h.current=window.setTimeout(()=>{v.current=!0},250)},onPointerMove:e=>{f&&g(e)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},o.default.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});L.displayName="Drawer.Handle";let B={Root:M,NestedRoot:function({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:a,onNestedOpenChange:l,onNestedRelease:s}=i();if(!a)throw Error("Drawer.NestedRoot must be placed in another drawer");return o.default.createElement(M,{nested:!0,open:n,onClose:()=>{l(!1)},onDrag:(t,n)=>{a(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&l(e),null==t||t(e)},onRelease:s,...r})},Content:z,Overlay:O,Trigger:a.Trigger,Portal:function(e){let t=i(),{container:n=t.container,...r}=e;return o.default.createElement(a.Portal,{container:n,...r})},Handle:L,Close:a.Close,Title:a.Title,Description:a.Description};var F=e.i(31777);function A({...e}){return(0,n.jsx)(B.Root,{"data-slot":"drawer",...e})}function I({...e}){return(0,n.jsx)(B.Portal,{"data-slot":"drawer-portal",...e})}function H({className:e,...t}){return(0,n.jsx)(B.Overlay,{"data-slot":"drawer-overlay",className:(0,F.cn)("fixed inset-0 z-50 bg-black/50",e),...t})}function W({className:e,children:t,direction:a="bottom",showCloseButton:o=!0,...l}){return(0,n.jsx)(I,{children:(0,n.jsxs)(B.Content,{"data-slot":"drawer-content",className:(0,F.cn)("bg-background fixed z-50 flex flex-col shadow-lg","bottom"===a&&"inset-x-0 bottom-0 mb-24 rounded-t-lg border-t","top"===a&&"inset-x-0 top-0 mt-24 rounded-b-lg border-b","right"===a&&"inset-y-0 right-0 h-full w-3/4 border-l","left"===a&&"inset-y-0 left-0 h-full w-3/4 border-r",e),style:{"--initial-transform":"right"===a?"calc(100% + 8px)":"left"===a||"top"===a?"calc(-100% - 8px)":"calc(100% + 8px)",userSelect:"text",...l.style??{}},...l,children:[t,o?(0,n.jsxs)(B.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,n.jsx)(r.XIcon,{className:"size-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})})}function q({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-header",className:(0,F.cn)("flex flex-col gap-1.5 p-4",e),...t})}function Y({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-footer",className:(0,F.cn)("mt-auto flex flex-col gap-2 p-4",e),...t})}function U({className:e,...t}){return(0,n.jsx)(B.Title,{"data-slot":"drawer-title",className:(0,F.cn)("text-foreground font-semibold",e),...t})}function X({className:e,...t}){return(0,n.jsx)(B.Description,{"data-slot":"drawer-description",className:(0,F.cn)("text-muted-foreground text-sm",e),...t})}e.s(["Drawer",()=>A,"DrawerContent",()=>W,"DrawerDescription",()=>X,"DrawerFooter",()=>Y,"DrawerHeader",()=>q,"DrawerOverlay",()=>H,"DrawerTitle",()=>U],45811)},11495,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(48249),a=e.i(24042),o=e.i(64970),l=e.i(94237),i=e.i(31777);e.i(81803);var s=e.i(72714);e.i(99348);var u=e.i(17466),d=e.i(45811),c=e.i(25235),f=e.i(2828),p=e.i(8537),m=e.i(75921);let g=(0,l.cva)("",{variants:{size:{sm:"w-96",md:"w-xl"}},defaultVariants:{size:"sm"}});function h({open:e,onClose:a,modal:o=!1,dismissOnOutsideClick:l=!1,title:s="Drawer",size:u,header:f,children:p,footer:h,className:w,"data-testid":y,deployTarget:b}){let x=(0,m.useFeatureFlags)(),D=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e||o)return;let t=e=>{let t=e.target;!document.body.contains(t)||D.current?.contains(t)||t.closest(l?'[role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]':'[data-no-drawer-close], [role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]')||a()};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[e,o,a,l]),(0,t.jsxs)(d.Drawer,{direction:"right",modal:o,handleOnly:!0,open:e,onOpenChange:e=>{e||a()},children:[o?(0,t.jsx)(d.DrawerOverlay,{}):null,(0,t.jsxs)(d.DrawerContent,{ref:D,direction:"right",showCloseButton:!1,className:(0,i.cn)(g({size:u}),w),"data-testid":y,onInteractOutside:o?void 0:e=>e.preventDefault(),children:[(0,t.jsx)(d.DrawerTitle,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:s})}),(0,t.jsx)(d.DrawerDescription,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:s})}),(0,t.jsxs)("button",{type:"button","aria-label":"Close",onClick:a,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":y?`${y}-close-button`:void 0,children:[(0,t.jsx)(r.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}),f?(0,t.jsx)(d.DrawerHeader,{className:"shrink-0",children:f}):null,f?(0,t.jsx)(c.Separator,{}):null,x.envDeploy&&b?(0,t.jsx)(v,{deployTarget:b}):null,(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:p}),h?(0,t.jsx)(d.DrawerFooter,{className:"shrink-0",children:h}):null]})]})}function v({deployTarget:e}){let n=(0,p.useDeployAction)(e),r="Booting"===n.status||"Ready"===n.status;return(0,t.jsxs)("div",{"data-testid":"base-drawer-deploy-bar",className:"flex items-center gap-2 px-4 pb-3",children:[(0,t.jsx)(f.TooltipProvider,{children:(0,t.jsxs)(f.Tooltip,{children:[(0,t.jsx)(f.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsx)(s.ActionButton,{label:r?"Stop Dev Server":"Start Dev Server",onClick:r?n.stop:n.deploy,loading:n.deployLoading||n.stopLoading,error:!!n.deployError,icon:r?o.Square:a.Play,iconOnly:!0,variant:"outline",size:"icon-sm"})})}),(0,t.jsx)(f.TooltipContent,{children:r?"Stop Dev Server":"Start Dev Server"})]})}),r?(0,t.jsx)(u.DeploymentStatusBadge,{status:n.status,url:n.url,targetId:e.targetId}):null]})}e.s(["BaseDrawer",()=>h])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2287,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(90033),a=e.i(90537),a=a,o=e.i(31777);let l=r.Dialog.Root;r.Dialog.Trigger;let i=r.Dialog.Portal,s=r.Dialog.Close,u=n.forwardRef(({className:e,onClick:n,...a},l)=>(0,t.jsx)(r.Dialog.Overlay,{ref:l,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80",e),onClick:e=>{e.stopPropagation(),n?.(e)},...a}));u.displayName=r.Dialog.Overlay.displayName;let d=n.forwardRef(({className:e,children:n,...l},s)=>(0,t.jsxs)(i,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(r.Dialog.Content,{ref:s,className:(0,o.cn)("bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg",e),...l,children:[n,(0,t.jsxs)(r.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(a.default,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));d.displayName=r.Dialog.Content.displayName;let c=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});c.displayName="DialogHeader";let f=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});f.displayName="DialogFooter";let p=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Title,{ref:a,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...n}));p.displayName=r.Dialog.Title.displayName;let m=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Description,{ref:a,className:(0,o.cn)("text-muted-foreground text-sm",e),...n}));m.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>s,"DialogContent",()=>d,"DialogDescription",()=>m,"DialogFooter",()=>f,"DialogHeader",()=>c,"DialogTitle",()=>p],2287)},24042,64970,e=>{"use strict";var t=e.i(3645);let n=(0,t.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>n],24042);let r=(0,t.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>r],64970)},81803,72714,e=>{"use strict";var t=e.i(20314),n=e.i(83428),r=e.i(51251),a=e.i(31777),o=e.i(35364),l=e.i(8361);function i({label:e,onClick:i,loading:s,error:u,icon:d,iconOnly:c=!1,variant:f="outline",size:p="sm"}){let m=(0,l.useSoundAction)("click");return(0,t.jsxs)(o.Button,{variant:f,size:p,"aria-label":e,disabled:s,onClick:()=>{m.play(),i()},className:(0,a.cn)("gap-1.5",u&&"text-destructive hover:text-destructive",!u&&c&&"ghost"===f&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[s?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):u?(0,t.jsx)(r.CircleAlert,{className:"size-4"}):(0,t.jsx)(d,{className:"size-4"}),c?null:e]})}e.s(["ActionButton",()=>i],72714),e.s([],81803)},99348,17466,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(83428),a=e.i(30702),o=e.i(38573),l=e.i(17406),i=e.i(81846),s=e.i(2287),u=e.i(21023);let d=(0,u.createServerReference)("40ab3bbe81297c950fa8190b9568a7079b41967778",u.callServer,void 0,u.findSourceMapURL,"getDeploymentLogs");function c({open:e,onOpenChange:r,targetId:a}){let{logs:o,isConnected:l}=function(e){let[t,r]=(0,n.useState)([]),[a,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),i=(0,n.useCallback)(()=>{l.current&&(l.current.close(),l.current=null),o(!1)},[]);return(0,n.useEffect)(()=>{if(!e){r([]),o(!1);return}d(e).then(e=>{e&&r(e)}).catch(()=>{});let t=new EventSource(`/api/deployment-logs?targetId=${e}`);return l.current=t,t.onopen=()=>{o(!0)},t.addEventListener("log",e=>{let t=JSON.parse(e.data);r(e=>[...e,t])}),t.onerror=()=>{o(!1)},()=>{t.close(),l.current=null}},[e,i]),{logs:t,isConnected:a}}(e?a:null);return(0,t.jsx)(f,{open:e,onOpenChange:r,logs:o,isConnected:l})}function f({open:e,onOpenChange:r,logs:a,isConnected:l}){let i=(0,n.useRef)(null),u=(0,n.useRef)(!0),d=(0,n.useCallback)(()=>{let e=i.current;e&&(u.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);return(0,n.useEffect)(()=>{u.current&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[a]),(0,t.jsx)(s.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(s.DialogContent,{className:"flex h-[calc(100vh-48px)] max-h-[calc(100vh-48px)] w-full max-w-[calc(100vw-48px)] flex-col gap-0 bg-zinc-950 p-0 text-zinc-100 sm:rounded-lg","aria-describedby":void 0,children:[(0,t.jsxs)(s.DialogHeader,{className:"flex flex-row items-center justify-between border-b border-zinc-800 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Terminal,{className:"h-4 w-4 text-zinc-400"}),(0,t.jsx)(s.DialogTitle,{className:"text-sm font-medium text-zinc-100",children:"Server Logs"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pr-8",children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${l?"bg-green-500":"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-xs text-zinc-400",children:l?"Connected":"Disconnected"})]})]}),(0,t.jsxs)("div",{ref:i,onScroll:d,className:"flex-1 overflow-auto p-4 font-mono text-sm leading-relaxed",children:[0===a.length?(0,t.jsx)("p",{className:"text-zinc-500",children:"Waiting for log output..."}):a.map(e=>(0,t.jsx)(p,{entry:e},`${e.timestamp}-${e.stream}-${e.line}`)),!l&&a.length>0&&(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-800 pt-2 text-zinc-500",children:"[Server stopped]"})]})]})})}function p({entry:e}){return(0,t.jsx)("div",{"data-stream":e.stream,className:"stderr"===e.stream?"text-red-400":"text-zinc-200",children:(0,t.jsx)("span",{className:"break-all whitespace-pre-wrap",children:e.line})})}function m({status:e,url:s,targetId:u}){let[d,f]=(0,n.useState)(!1),p=u&&(e===l.DeploymentState.Booting||e===l.DeploymentState.Ready);switch(e){case l.DeploymentState.Booting:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Badge,{className:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",children:[(0,t.jsx)(r.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Starting...",p?(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:"ml-1.5 inline-flex items-center rounded-sm p-0.5 hover:bg-blue-100",onClick:e=>{e.stopPropagation(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});case l.DeploymentState.Ready:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,t.jsx)("span",{className:"mr-1 inline-block h-2 w-2 rounded-full bg-green-500"}),s?(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:underline",onClick:e=>e.stopPropagation(),children:[s,(0,t.jsx)(a.ExternalLink,{className:"h-3 w-3"})]}):"Ready",p?(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:"ml-1.5 inline-flex items-center rounded-sm p-0.5 hover:bg-green-100",onClick:e=>{e.stopPropagation(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});default:return null}}e.s(["DeploymentStatusBadge",()=>m],17466),e.s([],99348)},8537,e=>{"use strict";var t=e.i(79054),n=e.i(18354),r=e.i(21023);let a=(0,r.createServerReference)("4058fd250ea82bc0c595e6dc73ecf8f69a2501b42b",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),o=(0,r.createServerReference)("4018335a61b78592322d3d61279d8b8268ed685fea",r.callServer,void 0,r.findSourceMapURL,"deployRepository"),l=(0,r.createServerReference)("40c2d751d8ad1b219e51de50117ca33f8013ae86c7",r.callServer,void 0,r.findSourceMapURL,"stopDeployment"),i=(0,r.createServerReference)("40af61b4bb40b0b49062fcee214609f740c3596b63",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus"),s=(0,n.createLogger)("[useDeployAction]");function u(e){let[n,r]=(0,t.useState)(!1),[u,d]=(0,t.useState)(!1),[c,f]=(0,t.useState)(null),[p,m]=(0,t.useState)(null),[g,h]=(0,t.useState)(null),v=(0,t.useRef)(null),w=(0,t.useRef)(null),y=(0,t.useRef)(!0),b=(0,t.useRef)(p);(0,t.useEffect)(()=>{b.current=p},[p]),(0,t.useEffect)(()=>(y.current=!0,()=>{y.current=!1}),[]),(0,t.useEffect)(()=>()=>{v.current&&clearTimeout(v.current),w.current&&clearInterval(w.current)},[]);let x=(0,t.useCallback)(()=>{w.current&&(s.debug("stopping polling"),clearInterval(w.current),w.current=null)},[]),D=(0,t.useCallback)(e=>{x(),s.debug(`starting polling for "${e}" every 3000ms`),w.current=setInterval(async()=>{if(!y.current)return void x();let t=await i(e);y.current&&(t&&"Stopped"!==t.state?(t.state!==b.current&&s.info(`poll state changed: ${b.current} → ${t.state}, url=${t.url}`),m(t.state),h(t.url)):(s.info(`poll result: ${t?`state=${t.state}`:"null (deployment gone)"} — stopping poll`),m(null),h(null),x()))},3e3)},[x]),j=(0,t.useCallback)(async()=>{if(!e)return void s.warn("deploy() called but input is null — no-op");if(n)return void s.warn("deploy() called but already loading — no-op");s.info(`deploy() — targetType="${e.targetType}", targetId="${e.targetId}", repositoryPath="${e.repositoryPath}"`),v.current&&clearTimeout(v.current),r(!0),f(null);try{let t="feature"===e.targetType?await a(e.targetId):await o(e.repositoryPath);if(s.info("server action result:",t),!y.current)return void s.warn("component unmounted after deploy — discarding result");if(t.success)s.info(`deploy succeeded — initial state=${t.state}, starting polling`),m(t.state??null),h(null),D(e.targetId);else{let e=t.error??"An unexpected error occurred";s.error(`deploy failed: ${e}`),f(e),v.current=setTimeout(()=>f(null),5e3)}}catch(t){if(!y.current)return;let e=t instanceof Error?t.message:"An unexpected error occurred";s.error(`deploy threw exception: ${e}`,t),f(e),v.current=setTimeout(()=>f(null),5e3)}finally{y.current&&r(!1)}},[e,n,D]),R=(0,t.useCallback)(async()=>{if(e&&!u){s.info(`stop() — targetId="${e.targetId}"`),d(!0);try{let t=await l(e.targetId);if(s.info("stop result:",t),!y.current)return;t.success&&(x(),m(null),h(null))}catch(e){s.warn("stop error (non-critical):",e)}finally{y.current&&d(!1)}}},[e,u,x]);return{deploy:j,stop:R,deployLoading:n,stopLoading:u,deployError:c,status:p,url:g}}e.s(["useDeployAction",()=>u],8537)},45811,e=>{"use strict";let t;var n=e.i(20314),r=e.i(48249),a=e.i(567),o=e.i(79054);let l=o.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}),i=()=>{let e=o.default.useContext(l);if(!e)throw Error("useDrawerContext must be used within a Drawer.Root");return e};function s(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function u(){return d(/^iPhone/)||d(/^iPad/)||d(/^Mac/)&&navigator.maxTouchPoints>1}function d(e){return"u">typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if(!e||"u"<typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[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 c="u">typeof window?o.useLayoutEffect:o.useEffect;function f(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let p="u">typeof document&&window.visualViewport;function m(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function g(e){for(m(e)&&(e=e.parentElement);e&&!m(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}let h=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),v=0;function w(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function y(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=g(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function b(e){return e instanceof HTMLInputElement&&!h.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function x(...e){return o.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}let D=new WeakMap;function j(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)}),n||D.set(e,r)}let R=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function C(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[R(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/))?parseFloat(a[1].split(", ")[R(t)?5:4]):null}function T(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}let N=[.32,.72,0,1],E="vaul-dragging";function S(e){let t=o.default.useRef(e);return o.default.useEffect(()=>{t.current=e}),o.default.useMemo(()=>(...e)=>null==t.current?void 0:t.current.call(t,...e),[])}function $({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,a]=function({defaultProp:e,onChange:t}){let n=o.default.useState(e),[r]=n,a=o.default.useRef(r),l=S(t);return o.default.useEffect(()=>{a.current!==r&&(l(r),a.current=r)},[r,a,l]),n}({defaultProp:t,onChange:n}),l=void 0!==e,i=l?e:r,s=S(n);return[i,o.default.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)},[l,e,a,s])]}let k=()=>()=>{},P=null;function M({open:e,onOpenChange:n,children:r,onDrag:i,onRelease:d,snapPoints:m,shouldScaleBackground:h=!1,setBackgroundColorOnScale:x=!0,closeThreshold:T=.25,scrollLockTimeout:S=100,dismissible:k=!0,handleOnly:M=!1,fadeFromIndex:O=m&&m.length-1,activeSnapPoint:z,setActiveSnapPoint:L,fixed:B,modal:F=!0,onClose:A,nested:I,noBodyStyles:H=!1,direction:W="bottom",defaultOpen:q=!1,disablePreventScroll:Y=!0,snapToSequentialPoint:U=!1,preventScrollRestoration:X=!1,repositionInputs:V=!0,onAnimationEnd:K,container:J,autoFocus:_=!1}){var G,Q;let[Z=!1,ee]=$({defaultProp:q,prop:e,onChange:e=>{null==n||n(e),e||I||ek(),setTimeout(()=>{null==K||K(e)},500),e&&!F&&"u">typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[et,en]=o.default.useState(!1),[er,ea]=o.default.useState(!1),[eo,el]=o.default.useState(!1),ei=o.default.useRef(null),es=o.default.useRef(null),eu=o.default.useRef(null),ed=o.default.useRef(null),ec=o.default.useRef(null),ef=o.default.useRef(!1),ep=o.default.useRef(null),em=o.default.useRef(0),eg=o.default.useRef(!1),eh=o.default.useRef(!q),ev=o.default.useRef(0),ew=o.default.useRef(null),ey=o.default.useRef((null==(G=ew.current)?void 0:G.getBoundingClientRect().height)||0),eb=o.default.useRef((null==(Q=ew.current)?void 0:Q.getBoundingClientRect().width)||0),ex=o.default.useRef(0),eD=o.default.useCallback(e=>{m&&e===eN.length-1&&(es.current=new Date)},[]),{activeSnapPoint:ej,activeSnapPointIndex:eR,setActiveSnapPoint:eC,onRelease:eT,snapPointsOffset:eN,onDrag:eE,shouldFade:eS,getPercentageDragged:e$}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:l,onSnapPointChange:i,direction:s="bottom",container:u,snapToSequentialPoint:d}){let[c,f]=$({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[p,m]=o.default.useState("u">typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);o.default.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let g=o.default.useMemo(()=>c===(null==n?void 0:n[n.length-1])||null,[n,c]),h=o.default.useMemo(()=>{var e;return null!=(e=null==n?void 0:n.findIndex(e=>e===c))?e:null},[n,c]),v=n&&n.length>0&&(l||0===l)&&!Number.isNaN(l)&&n[l]===c||!n,w=o.default.useMemo(()=>{var e;let t=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:"u">typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return null!=(e=null==n?void 0:n.map(e=>{let n="string"==typeof e,r=0;if(n&&(r=parseInt(e,10)),R(s)){let a=n?r:p?e*t.height:0;return p?"bottom"===s?t.height-a:-t.height+a:a}let a=n?r:p?e*t.width:0;return p?"right"===s?t.width-a:-t.width+a:a}))?e:[]},[n,p,u]),y=o.default.useMemo(()=>null!==h?null==w?void 0:w[h]:null,[w,h]),b=o.default.useCallback(e=>{var t;let o=null!=(t=null==w?void 0:w.findIndex(t=>t===e))?t:null;i(o),j(r.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),w&&o!==w.length-1&&void 0!==l&&o!==l&&o<l?j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"0"}):j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(o,0)])},[r.current,n,w,l,a,f]);return o.default.useEffect(()=>{if(c||e){var t;let r=null!=(t=null==n?void 0:n.findIndex(t=>t===e||t===c))?t:-1;w&&-1!==r&&"number"==typeof w[r]&&b(w[r])}},[c,e,n,w,b]),{isLastSnapPoint:g,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!w||void 0===l)return null;let r=h===l-1;if(h>=l&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;let a=r?h+1:h-1,o=e/Math.abs(r?w[a]-w[a-1]:w[a+1]-w[a]);return r?1-o:o},setActiveSnapPoint:f,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===l)return;let i="bottom"===s||"right"===s?(null!=y?y:0)-e:(null!=y?y:0)+e,u=h===l-1,c=0===h,f=e>0;if(u&&j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`}),!d&&r>2&&!f)return void(o?t():b(w[0]));if(!d&&r>2&&f&&w&&n)return void b(w[n.length-1]);let p=null==w?void 0:w.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-i)<Math.abs(e-i)?t:e),m=R(s)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*m){let e=f?1:-1;return e>0&&g&&n?void b(w[n.length-1]):void(c&&e<0&&o&&t(),null===h||b(w[h+e]))}b(p)},onDrag:function({draggedDistance:e}){if(null===y)return;let t="bottom"===s||"right"===s?y-e:y+e;("bottom"===s||"right"===s)&&t<w[w.length-1]||("top"===s||"left"===s)&&t>w[w.length-1]||j(r.current,{transform:R(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:w}}({snapPoints:m,activeSnapPointProp:z,setActiveSnapPointProp:L,drawerRef:ew,fadeFromIndex:O,overlayRef:ei,onSnapPointChange:eD,direction:W,container:J,snapToSequentialPoint:U});!function(e={}){let{isDisabled:n}=e;c(()=>{if(!n){var e,r,a;let n,o,l,i,s,d,c;return 1==++v&&u()&&(l=0,i=window.pageXOffset,s=window.pageYOffset,d=f((e=document.documentElement,r="paddingRight",a=`${window.innerWidth-document.documentElement.clientWidth}px`,n=e.style[r],e.style[r]=a,()=>{e.style[r]=n})),window.scrollTo(0,0),c=f(w(document,"touchstart",e=>{((o=g(e.target))!==document.documentElement||o!==document.body)&&(l=e.changedTouches[0].pageY)},{passive:!1,capture:!0}),w(document,"touchmove",e=>{if(!o||o===document.documentElement||o===document.body)return void e.preventDefault();let t=e.changedTouches[0].pageY,n=o.scrollTop,r=o.scrollHeight-o.clientHeight;0!==r&&((n<=0&&t>l||n>=r&&t<l)&&e.preventDefault(),l=t)},{passive:!1,capture:!0}),w(document,"touchend",e=>{let t=e.target;b(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},{passive:!1,capture:!0}),w(document,"focus",e=>{let t=e.target;b(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",p&&(p.height<window.innerHeight?requestAnimationFrame(()=>{y(t)}):p.addEventListener("resize",()=>y(t),{once:!0}))}))},!0),w(window,"scroll",()=>{window.scrollTo(0,0)})),t=()=>{d(),c(),window.scrollTo(i,s)}),()=>{0==--v&&(null==t||t())}}},[n])}({isDisabled:!Z||er||!F||eo||!et||!V||!Y});let{restorePositionSetting:ek}=function({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:l}){let[i,u]=o.default.useState(()=>"u">typeof window?window.location.href:""),d=o.default.useRef(0),c=o.default.useCallback(()=>{if(s()&&null===P&&e&&!l){P={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-e}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&d.current>=t&&(document.body.style.top=`${-(d.current+e)}px`)}),300)}},[e]),f=o.default.useCallback(()=>{if(s()&&null!==P&&!l){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,P),window.requestAnimationFrame(()=>{a&&i!==window.location.href?u(window.location.href):window.scrollTo(t,e)}),P=null}},[i]);return o.default.useEffect(()=>{function e(){d.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),o.default.useEffect(()=>{if(t)return()=>{"u"<typeof document||document.querySelector("[data-vaul-drawer]")||f()}},[t,f]),o.default.useEffect(()=>{!n&&r&&(e?(window.matchMedia("(display-mode: standalone)").matches||c(),t||window.setTimeout(()=>{f()},500)):f())},[e,r,i,t,n,c,f]),{restorePositionSetting:f}}({isOpen:Z,modal:F,nested:null!=I&&I,hasBeenOpened:et,preventScrollRestoration:X,noBodyStyles:H});function eP(){return(window.innerWidth-26)/window.innerWidth}function eM(e,t){var n;let r=e,a=null==(n=window.getSelection())?void 0:n.toString(),o=ew.current?C(ew.current,W):null,l=new Date;if("SELECT"===r.tagName||r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===W||"left"===W)return!0;if(es.current&&l.getTime()-es.current.getTime()<500)return!1;if(null!==o&&("bottom"===W?o>0:o<0))return!0;if(a&&a.length>0)return!1;if(ec.current&&l.getTime()-ec.current.getTime()<S&&0===o||t)return ec.current=l,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return ec.current=new Date,!1;if("dialog"===r.getAttribute("role"))break}r=r.parentNode}return!0}function eO(e){er&&ew.current&&(ew.current.classList.remove(E),ef.current=!1,ea(!1),ed.current=new Date),null==A||A(),e||ee(!1),setTimeout(()=>{m&&eC(m[0])},500)}function ez(){if(!ew.current)return;let e=document.querySelector("[data-vaul-drawer-wrapper]"),t=C(ew.current,W);j(ew.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${N.join(",")})`}),j(ei.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"1"}),h&&t&&t>0&&Z&&j(e,{borderRadius:"8px",overflow:"hidden",...R(W)?{transform:`scale(${eP()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${eP()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${N.join(",")})`},!0)}return o.default.useEffect(()=>{window.requestAnimationFrame(()=>{eh.current=!0})},[]),o.default.useEffect(()=>{var e;function t(){if(ew.current&&V&&(b(document.activeElement)||eg.current)){var e;let t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight,r=n-t,a=ew.current.getBoundingClientRect().height||0;ex.current||(ex.current=a);let o=ew.current.getBoundingClientRect().top;if(Math.abs(ev.current-r)>60&&(eg.current=!eg.current),m&&m.length>0&&eN&&eR&&(r+=eN[eR]||0),ev.current=r,a>t||eg.current){let e=ew.current.getBoundingClientRect().height,l=e;e>t&&(l=t-(a>.8*n?o:26)),B?ew.current.style.height=`${e-Math.max(r,0)}px`:ew.current.style.height=`${Math.max(l,t-o)}px`}else{let e;e=navigator.userAgent,"u">typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))||(ew.current.style.height=`${ex.current}px`)}m&&m.length>0&&!eg.current?ew.current.style.bottom="0px":ew.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[eR,m,eN]),o.default.useEffect(()=>(Z&&(j(document.documentElement,{scrollBehavior:"auto"}),es.current=new Date),()=>{!function(e,t){if(!e||!(e instanceof HTMLElement))return;let n=D.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[Z]),o.default.useEffect(()=>{F||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[F]),o.default.createElement(a.Root,{defaultOpen:q,onOpenChange:e=>{(k||e)&&(e?en(!0):eO(!0),ee(e))},open:Z},o.default.createElement(l.Provider,{value:{activeSnapPoint:ej,snapPoints:m,setActiveSnapPoint:eC,drawerRef:ew,overlayRef:ei,onOpenChange:n,onPress:function(e){var t,n;!k&&!m||(!ew.current||ew.current.contains(e.target))&&(ey.current=(null==(t=ew.current)?void 0:t.getBoundingClientRect().height)||0,eb.current=(null==(n=ew.current)?void 0:n.getBoundingClientRect().width)||0,ea(!0),eu.current=new Date,u()&&window.addEventListener("touchend",()=>ef.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),em.current=R(W)?e.pageY:e.pageX)},onRelease:function(e){var t,n;if(!er||!ew.current)return;ew.current.classList.remove(E),ef.current=!1,ea(!1),ed.current=new Date;let r=C(ew.current,W);if(!e||!eM(e.target,!1)||!r||Number.isNaN(r)||null===eu.current)return;let a=ed.current.getTime()-eu.current.getTime(),o=em.current-(R(W)?e.pageY:e.pageX),l=Math.abs(o)/a;if(l>.05&&(el(!0),setTimeout(()=>{el(!1)},200)),m){eT({draggedDistance:o*("bottom"===W||"right"===W?1:-1),closeDrawer:eO,velocity:l,dismissible:k}),null==d||d(e,!0);return}if("bottom"===W||"right"===W?o>0:o<0){ez(),null==d||d(e,!0);return}if(l>.4){eO(),null==d||d(e,!1);return}let i=Math.min(null!=(t=ew.current.getBoundingClientRect().height)?t:0,window.innerHeight),s=Math.min(null!=(n=ew.current.getBoundingClientRect().width)?n:0,window.innerWidth);if(Math.abs(r)>=("left"===W||"right"===W?s:i)*T){eO(),null==d||d(e,!1);return}null==d||d(e,!0),ez()},onDrag:function(e){if(ew.current&&er){let t="bottom"===W||"right"===W?1:-1,n=(em.current-(R(W)?e.pageY:e.pageX))*t,r=n>0,a=m&&!k&&!r;if(a&&0===eR)return;let o=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]"),s=o/("bottom"===W||"top"===W?ey.current:eb.current),u=e$(o,r);if(null!==u&&(s=u),a&&s>=1||!ef.current&&!eM(e.target,r))return;if(ew.current.classList.add(E),ef.current=!0,j(ew.current,{transition:"none"}),j(ei.current,{transition:"none"}),m&&eE({draggedDistance:n}),r&&!m){let e=Math.min(-(8*(Math.log(n+1)-2)*1),0)*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`});return}let d=1-s;if((eS||O&&eR===O-1)&&(null==i||i(e,s),j(ei.current,{opacity:`${d}`,transition:"none"},!0)),l&&ei.current&&h){let e=Math.min(eP()+s*(1-eP()),1),t=8-8*s,n=Math.max(0,14-14*s);j(l,{borderRadius:`${t}px`,transform:R(W)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!m){let e=o*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:k,shouldAnimate:eh,handleOnly:M,isOpen:Z,isDragging:er,shouldFade:eS,closeDrawer:eO,onNestedDrag:function(e,t){if(t<0)return;let n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),a=-16+16*t;j(ew.current,{transform:R(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){let t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;ep.current&&window.clearTimeout(ep.current),j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&ew.current&&(ep.current=setTimeout(()=>{let e=C(ew.current,W);j(ew.current,{transition:"none",transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){let n=R(W)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:eg,modal:F,snapPointsOffset:eN,activeSnapPointIndex:eR,direction:W,shouldScaleBackground:h,setBackgroundColorOnScale:x,noBodyStyles:H,container:J,autoFocus:_}},r))}let O=o.default.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:l,shouldFade:s,isOpen:u,modal:d,shouldAnimate:c}=i(),f=x(t,n),p=r&&r.length>0;if(!d)return null;let m=o.default.useCallback(e=>l(e),[l]);return o.default.createElement(a.Overlay,{onMouseUp:m,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":u&&p?"true":"false","data-vaul-snap-points-overlay":u&&s?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});O.displayName="Drawer.Overlay";let z=o.default.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},l){let{drawerRef:s,onPress:u,onRelease:d,onDrag:c,keyboardIsOpen:f,snapPointsOffset:p,activeSnapPointIndex:m,modal:g,isOpen:h,direction:v,snapPoints:w,container:y,handleOnly:b,shouldAnimate:D,autoFocus:j}=i(),[C,E]=o.default.useState(!1),S=x(l,s),$=o.default.useRef(null),P=o.default.useRef(null),M=o.default.useRef(!1),O=w&&w.length>0;function z(e){$.current=null,M.current=!1,d(e)}return!function(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=i(),l=o.default.useRef(null),s=(0,o.useMemo)(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-26)/window.innerWidth}o.default.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);let t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;!function(...e){}(r&&!a?T(document.body,{background:"black"}):k,T(t,{transformOrigin:R(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${N.join(",")})`}));let n=T(t,{borderRadius:"8px",overflow:"hidden",...R(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),l.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},500)}}},[t,n,s])}(),o.default.useEffect(()=>{O&&window.requestAnimationFrame(()=>{E(!0)})},[]),o.default.createElement(a.Content,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":h&&O?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":(null==D?void 0:D.current)?"true":"false",...r,ref:S,style:p&&p.length>0?{"--snap-point-height":`${p[null!=m?m:0]}px`,...t}:t,onPointerDown:e=>{b||(null==r.onPointerDown||r.onPointerDown.call(r,e),$.current={x:e.pageX,y:e.pageY},u(e))},onOpenAutoFocus:e=>{null==n||n(e),j||e.preventDefault()},onPointerDownOutside:t=>{(null==e||e(t),!g||t.defaultPrevented)?t.preventDefault():f.current&&(f.current=!1)},onFocusOutside:e=>{if(!g)return void e.preventDefault()},onPointerMove:e=>{if(P.current=e,b||(null==r.onPointerMove||r.onPointerMove.call(r,e),!$.current))return;let t=e.pageY-$.current.y,n=e.pageX-$.current.x,a="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(M.current)return!0;let r=Math.abs(e.y),a=Math.abs(e.x),o=a>r,l=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*l<0)&&a>=0&&a<=n)return o}else if(!(e.y*l<0)&&r>=0&&r<=n)return!o;return M.current=!0,!0})({x:n,y:t},v,a)?c(e):(Math.abs(n)>a||Math.abs(t)>a)&&($.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),$.current=null,M.current=!1,d(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),z(P.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),P.current&&z(P.current)}})});z.displayName="Drawer.Content";let L=o.default.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:a,isDragging:l,snapPoints:s,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:c,handleOnly:f,isOpen:p,onPress:m,onDrag:g}=i(),h=o.default.useRef(null),v=o.default.useRef(!1);function w(){h.current&&window.clearTimeout(h.current),v.current=!1}return o.default.createElement("div",{onClick:function(){v.current?w():window.setTimeout(()=>{!function(){if(l||e||v.current)return w();if(w(),!s||0===s.length){c||a();return}if(u===s[s.length-1]&&c)return a();let t=s.findIndex(e=>e===u);-1===t||d(s[t+1])}()},120)},onPointerCancel:w,onPointerDown:e=>{f&&m(e),h.current=window.setTimeout(()=>{v.current=!0},250)},onPointerMove:e=>{f&&g(e)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},o.default.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});L.displayName="Drawer.Handle";let B={Root:M,NestedRoot:function({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:a,onNestedOpenChange:l,onNestedRelease:s}=i();if(!a)throw Error("Drawer.NestedRoot must be placed in another drawer");return o.default.createElement(M,{nested:!0,open:n,onClose:()=>{l(!1)},onDrag:(t,n)=>{a(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&l(e),null==t||t(e)},onRelease:s,...r})},Content:z,Overlay:O,Trigger:a.Trigger,Portal:function(e){let t=i(),{container:n=t.container,...r}=e;return o.default.createElement(a.Portal,{container:n,...r})},Handle:L,Close:a.Close,Title:a.Title,Description:a.Description};var F=e.i(31777);function A({...e}){return(0,n.jsx)(B.Root,{"data-slot":"drawer",...e})}function I({...e}){return(0,n.jsx)(B.Portal,{"data-slot":"drawer-portal",...e})}function H({className:e,...t}){return(0,n.jsx)(B.Overlay,{"data-slot":"drawer-overlay",className:(0,F.cn)("fixed inset-0 z-50 bg-black/50",e),...t})}function W({className:e,children:t,direction:a="bottom",showCloseButton:o=!0,...l}){return(0,n.jsx)(I,{children:(0,n.jsxs)(B.Content,{"data-slot":"drawer-content",className:(0,F.cn)("bg-background fixed z-50 flex flex-col shadow-lg","bottom"===a&&"inset-x-0 bottom-0 mb-24 rounded-t-lg border-t","top"===a&&"inset-x-0 top-0 mt-24 rounded-b-lg border-b","right"===a&&"inset-y-0 right-0 h-full w-3/4 border-l","left"===a&&"inset-y-0 left-0 h-full w-3/4 border-r",e),style:{"--initial-transform":"right"===a?"calc(100% + 8px)":"left"===a||"top"===a?"calc(-100% - 8px)":"calc(100% + 8px)",userSelect:"text",...l.style??{}},...l,children:[t,o?(0,n.jsxs)(B.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,n.jsx)(r.XIcon,{className:"size-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})})}function q({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-header",className:(0,F.cn)("flex flex-col gap-1.5 p-4",e),...t})}function Y({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-footer",className:(0,F.cn)("mt-auto flex flex-col gap-2 p-4",e),...t})}function U({className:e,...t}){return(0,n.jsx)(B.Title,{"data-slot":"drawer-title",className:(0,F.cn)("text-foreground font-semibold",e),...t})}function X({className:e,...t}){return(0,n.jsx)(B.Description,{"data-slot":"drawer-description",className:(0,F.cn)("text-muted-foreground text-sm",e),...t})}e.s(["Drawer",()=>A,"DrawerContent",()=>W,"DrawerDescription",()=>X,"DrawerFooter",()=>Y,"DrawerHeader",()=>q,"DrawerOverlay",()=>H,"DrawerTitle",()=>U],45811)},11495,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(48249),a=e.i(24042),o=e.i(64970),l=e.i(94237),i=e.i(31777);e.i(81803);var s=e.i(72714);e.i(99348);var u=e.i(17466),d=e.i(45811),c=e.i(25235),f=e.i(2828),p=e.i(8537),m=e.i(75921);let g=(0,l.cva)("",{variants:{size:{sm:"w-96",md:"w-xl"}},defaultVariants:{size:"sm"}});function h({open:e,onClose:a,modal:o=!1,dismissOnOutsideClick:l=!1,title:s="Drawer",size:u,header:f,children:p,footer:h,className:w,"data-testid":y,deployTarget:b}){let x=(0,m.useFeatureFlags)(),D=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e||o)return;let t=e=>{let t=e.target;!document.body.contains(t)||D.current?.contains(t)||t.closest(l?'[role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]':'[data-no-drawer-close], [role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]')||a()};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[e,o,a,l]),(0,t.jsxs)(d.Drawer,{direction:"right",modal:o,handleOnly:!0,open:e,onOpenChange:e=>{e||a()},children:[o?(0,t.jsx)(d.DrawerOverlay,{}):null,(0,t.jsxs)(d.DrawerContent,{ref:D,direction:"right",showCloseButton:!1,className:(0,i.cn)(g({size:u}),w),"data-testid":y,onInteractOutside:o?void 0:e=>e.preventDefault(),children:[(0,t.jsx)(d.DrawerTitle,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:s})}),(0,t.jsx)(d.DrawerDescription,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:s})}),(0,t.jsxs)("button",{type:"button","aria-label":"Close",onClick:a,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":y?`${y}-close-button`:void 0,children:[(0,t.jsx)(r.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}),f?(0,t.jsx)(d.DrawerHeader,{className:"shrink-0",children:f}):null,f?(0,t.jsx)(c.Separator,{}):null,x.envDeploy&&b?(0,t.jsx)(v,{deployTarget:b}):null,(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:p}),h?(0,t.jsx)(d.DrawerFooter,{className:"shrink-0",children:h}):null]})]})}function v({deployTarget:e}){let n=(0,p.useDeployAction)(e),r="Booting"===n.status||"Ready"===n.status;return(0,t.jsxs)("div",{"data-testid":"base-drawer-deploy-bar",className:"flex items-center gap-2 px-4 pb-3",children:[(0,t.jsx)(f.TooltipProvider,{children:(0,t.jsxs)(f.Tooltip,{children:[(0,t.jsx)(f.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsx)(s.ActionButton,{label:r?"Stop Dev Server":"Start Dev Server",onClick:r?n.stop:n.deploy,loading:n.deployLoading||n.stopLoading,error:!!n.deployError,icon:r?o.Square:a.Play,iconOnly:!0,variant:"outline",size:"icon-sm"})})}),(0,t.jsx)(f.TooltipContent,{children:r?"Stop Dev Server":"Start Dev Server"})]})}),r?(0,t.jsx)(u.DeploymentStatusBadge,{status:n.status,url:n.url,targetId:e.targetId}):null]})}e.s(["BaseDrawer",()=>h])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},87889,e=>{"use strict";let t=(0,e.i(3645).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],87889)},99105,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],99105)},87342,e=>{"use strict";var t=e.i(79054),r=e.i(22528),s=e.i(5978),o=e.i(86874),n=e.i(20314);function i(e){let i=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(i),[c,d]=a(i,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:s}=e,o=t.default.useRef(null),i=t.default.useRef(new Map).current;return(0,n.jsx)(c,{scope:r,itemMap:i,collectionRef:o,children:s})};u.displayName=i;let p=e+"CollectionSlot",f=(0,o.createSlot)(p),h=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,i=d(p,r),a=(0,s.useComposedRefs)(t,i.collectionRef);return(0,n.jsx)(f,{ref:a,children:o})});h.displayName=p;let m=e+"CollectionItemSlot",v="data-radix-collection-item",x=(0,o.createSlot)(m),g=t.default.forwardRef((e,r)=>{let{scope:o,children:i,...a}=e,l=t.default.useRef(null),c=(0,s.useComposedRefs)(r,l),u=d(m,o);return t.default.useEffect(()=>(u.itemMap.set(l,{ref:l,...a}),()=>void u.itemMap.delete(l))),(0,n.jsx)(x,{...{[v]:""},ref:c,children:i})});return g.displayName=m,[{Provider:u,Slot:h,ItemSlot:g},function(r){let s=d(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(s.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[s.collectionRef,s.itemMap])},l]}var a=new WeakMap;function l(e,t){var r,s;let o,n,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,s=t,o=r.length,(i=(n=c(s))>=0?n:o+n)<0||i>=o?-1:i);return -1===a?void 0:e[a]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],a.set(this,!0)}set(e,t){return a.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let s,o=this.has(t),n=this.#e.length,i=c(e),a=i>=0?i:n+i,l=a<0||a>=n?-1:a;if(l===this.size||o&&l===this.size-1||-1===l)return this.set(t,r),this;let d=this.size+ +!o;i<0&&a++;let u=[...this.#e],p=!1;for(let e=a;e<d;e++)if(a===e){let n=u[e];u[e]===t&&(n=u[e+1]),o&&this.delete(t),s=this.get(n),this.set(t,r)}else{p||u[e-1]!==t||(p=!0);let r=u[p?e:e-1],o=s;s=this.get(r),this.delete(r),this.set(r,o)}return this}with(t,r,s){let o=new e(this);return o.insert(t,r,s),o}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=l(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=l(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return l(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return s;r++}}findIndex(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return r;r++}return -1}filter(t,r){let s=[],o=0;for(let e of this)Reflect.apply(t,r,[e,o,this])&&s.push(e),o++;return new e(s)}map(t,r){let s=[],o=0;for(let e of this)s.push([e[0],Reflect.apply(t,r,[e,o,this])]),o++;return new e(s)}reduce(...e){let[t,r]=e,s=0,o=r??this.at(0);for(let r of this)o=0===s&&1===e.length?r:Reflect.apply(t,this,[o,r,s,this]),s++;return o}reduceRight(...e){let[t,r]=e,s=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let o=this.at(r);s=r===this.size-1&&1===e.length?o:Reflect.apply(t,this,[s,o,r,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),s=this.get(r);t.set(r,s)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let s=new e,o=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==r&&r>0&&(o=r-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),r=this.get(t);s.set(t,r)}return s}every(e,t){let r=0;for(let s of this){if(!Reflect.apply(e,t,[s,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>i])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},41957,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(87620),o=r.forwardRef((e,r)=>(0,t.jsx)(s.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));o.displayName="Label",e.s(["Label",()=>o,"Root",()=>o],27572);var n=e.i(27572),n=n,i=e.i(94237),a=e.i(31777);let l=(0,i.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(n.Root,{ref:s,className:(0,a.cn)(l(),e),...r}));c.displayName=n.Root.displayName,e.s(["Label",()=>c],41957)},51911,23405,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(91967),o=e.i(5978),n=e.i(22528),i=e.i(36589);function a(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}e.s(["usePrevious",()=>a],23405);var l=e.i(77624),c=e.i(87620),d="Switch",[u,p]=(0,n.createContextScope)(d),[f,h]=u(d),m=r.forwardRef((e,n)=>{let{__scopeSwitch:a,name:l,checked:u,defaultChecked:p,required:h,disabled:m,value:v="on",onCheckedChange:x,form:k,...b}=e,[w,R]=r.useState(null),C=(0,o.useComposedRefs)(n,e=>R(e)),j=r.useRef(!1),P=!w||k||!!w.closest("form"),[A,N]=(0,i.useControllableState)({prop:u,defaultProp:p??!1,onChange:x,caller:d});return(0,t.jsxs)(f,{scope:a,checked:A,disabled:m,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":A,"aria-required":h,"data-state":y(A),"data-disabled":m?"":void 0,disabled:m,value:v,...b,ref:C,onClick:(0,s.composeEventHandlers)(e.onClick,e=>{N(e=>!e),P&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())})}),P&&(0,t.jsx)(g,{control:w,bubbles:!j.current,name:l,value:v,checked:A,required:h,disabled:m,form:k,style:{transform:"translateX(-100%)"}})]})});m.displayName=d;var v="SwitchThumb",x=r.forwardRef((e,r)=>{let{__scopeSwitch:s,...o}=e,n=h(v,s);return(0,t.jsx)(c.Primitive.span,{"data-state":y(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:r})});x.displayName=v;var g=r.forwardRef(({__scopeSwitch:e,control:s,checked:n,bubbles:i=!0,...c},d)=>{let u=r.useRef(null),p=(0,o.useComposedRefs)(u,d),f=a(n),h=(0,l.useSize)(s);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==n&&t){let r=new Event("click",{bubbles:i});t.call(e,n),e.dispatchEvent(r)}},[f,n,i]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...c,tabIndex:-1,ref:p,style:{...c.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function y(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>x,"Thumb",()=>x,"createSwitchScope",()=>p],95291);var k=e.i(95291),k=k,b=e.i(31777);function w({className:e,size:r="default",...s}){return(0,t.jsx)(k.Root,{"data-slot":"switch","data-size":r,className:(0,b.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...s,children:(0,t.jsx)(k.Thumb,{"data-slot":"switch-thumb",className:(0,b.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>w],51911)},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},56769,26417,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("00b8200afc8ffef5a56917b02cf3c98e3dd754f710",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],56769);let s=(0,t.createServerReference)("603f24c2fb766e4b719ecf3e237ce7a8a5d67ec4b5",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>s],26417)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(91967),o=e.i(5978),n=e.i(22528),i=e.i(53532),a=e.i(41687),l=e.i(56720),c=e.i(13123),d=e.i(52740),u=e.i(39979),p=e.i(85995),f=e.i(87620),h=e.i(86874),m=e.i(36589),v=e.i(73772),x=e.i(13044),g="Popover",[y,k]=(0,n.createContextScope)(g,[d.createPopperScope]),b=(0,d.createPopperScope)(),[w,R]=y(g),C=e=>{let{__scopePopover:s,children:o,open:n,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,u=b(s),p=r.useRef(null),[f,h]=r.useState(!1),[v,x]=(0,m.useControllableState)({prop:n,defaultProp:i??!1,onChange:a,caller:g});return(0,t.jsx)(d.Root,{...u,children:(0,t.jsx)(w,{scope:s,contentId:(0,c.useId)(),triggerRef:p,open:v,onOpenChange:x,onOpenToggle:r.useCallback(()=>x(e=>!e),[x]),hasCustomAnchor:f,onCustomAnchorAdd:r.useCallback(()=>h(!0),[]),onCustomAnchorRemove:r.useCallback(()=>h(!1),[]),modal:l,children:o})})};C.displayName=g;var j="PopoverAnchor",P=r.forwardRef((e,s)=>{let{__scopePopover:o,...n}=e,i=R(j,o),a=b(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=i;return r.useEffect(()=>(l(),()=>c()),[l,c]),(0,t.jsx)(d.Anchor,{...a,...n,ref:s})});P.displayName=j;var A="PopoverTrigger",N=r.forwardRef((e,r)=>{let{__scopePopover:n,...i}=e,a=R(A,n),l=b(n),c=(0,o.useComposedRefs)(r,a.triggerRef),u=(0,t.jsx)(f.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":B(a.open),...i,ref:c,onClick:(0,s.composeEventHandlers)(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:(0,t.jsx)(d.Anchor,{asChild:!0,...l,children:u})});N.displayName=A;var S="PopoverPortal",[M,O]=y(S,{forceMount:void 0}),T=e=>{let{__scopePopover:r,forceMount:s,children:o,container:n}=e,i=R(S,r);return(0,t.jsx)(M,{scope:r,forceMount:s,children:(0,t.jsx)(p.Presence,{present:s||i.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:n,children:o})})})};T.displayName=S;var z="PopoverContent",E=r.forwardRef((e,r)=>{let s=O(z,e.__scopePopover),{forceMount:o=s.forceMount,...n}=e,i=R(z,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:o||i.open,children:i.modal?(0,t.jsx)(D,{...n,ref:r}):(0,t.jsx)(I,{...n,ref:r})})});E.displayName=z;var F=(0,h.createSlot)("PopoverContent.RemoveScroll"),D=r.forwardRef((e,n)=>{let i=R(z,e.__scopePopover),a=r.useRef(null),l=(0,o.useComposedRefs)(n,a),c=r.useRef(!1);return r.useEffect(()=>{let e=a.current;if(e)return(0,v.hideOthers)(e)},[]),(0,t.jsx)(x.RemoveScroll,{as:F,allowPinchZoom:!0,children:(0,t.jsx)(q,{...e,ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,s.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),c.current||i.triggerRef.current?.focus()}),onPointerDownOutside:(0,s.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;c.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,s.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),I=r.forwardRef((e,s)=>{let o=R(z,e.__scopePopover),n=r.useRef(!1),i=r.useRef(!1);return(0,t.jsx)(q,{...e,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||o.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let r=t.target;o.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),q=r.forwardRef((e,r)=>{let{__scopePopover:s,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,...v}=e,x=R(z,s),g=b(s);return(0,a.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:c,children:(0,t.jsx)(i.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),children:(0,t.jsx)(d.Content,{"data-state":B(x.open),role:"dialog",id:x.contentId,...g,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),L="PopoverClose",H=r.forwardRef((e,r)=>{let{__scopePopover:o,...n}=e,i=R(L,o);return(0,t.jsx)(f.Primitive.button,{type:"button",...n,ref:r,onClick:(0,s.composeEventHandlers)(e.onClick,()=>i.onOpenChange(!1))})});H.displayName=L;var _=r.forwardRef((e,r)=>{let{__scopePopover:s,...o}=e,n=b(s);return(0,t.jsx)(d.Arrow,{...n,...o,ref:r})});function B(e){return e?"open":"closed"}_.displayName="PopoverArrow",e.s(["Anchor",()=>P,"Arrow",()=>_,"Close",()=>H,"Content",()=>E,"Popover",()=>C,"PopoverAnchor",()=>P,"PopoverArrow",()=>_,"PopoverClose",()=>H,"PopoverContent",()=>E,"PopoverPortal",()=>T,"PopoverTrigger",()=>N,"Portal",()=>T,"Root",()=>C,"Trigger",()=>N,"createPopoverScope",()=>k],89920);var U=e.i(89920),U=U,K=e.i(31777);let G=U.Root,X=U.Trigger;U.Anchor;let $=r.forwardRef(({className:e,align:r="center",sideOffset:s=4,...o},n)=>(0,t.jsx)(U.Portal,{children:(0,t.jsx)(U.Content,{ref:n,align:r,sideOffset:s,className:(0,K.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...o})}));$.displayName=U.Content.displayName,e.s(["Popover",()=>G,"PopoverContent",()=>$,"PopoverTrigger",()=>X],90382)},41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(23925),o=e.i(11345),n=e.i(76016),i=e.i(56769),a=e.i(26417),l=e.i(86782),c=e.i(29847),d=e.i(35364),u=e.i(90382),p=e.i(31777);function f({initialAgentType:e,initialModel:f,onAgentModelChange:h,disabled:m,className:v,mode:x}){let[g,y]=r.useState(!1),[k,b]=r.useState([]),[w,R]=r.useState(!0),[C,j]=r.useState(e),[P,A]=r.useState(f),[N,S]=r.useState(null),[M,O]=r.useState(0),[T,z]=r.useState(null);r.useEffect(()=>{(0,i.getAllAgentModels)().then(b).finally(()=>R(!1))},[]),r.useEffect(()=>{if(!g){let e=setTimeout(()=>{O(0),z(null)},150);return()=>clearTimeout(e)}},[g]);let E=async(e,t)=>{if(y(!1),e!==C||t!==P){if("override"===x){j(e),A(t),h?.(e,t);return}j(e),A(t),h?.(e,t),S(null);try{let r=await (0,a.updateAgentAndModel)(e,t||null);r.ok||(j(C),A(P),h?.(C,P),S(r.error??"Failed to save"))}catch{j(C),A(P),h?.(C,P),S("Failed to save")}}},F=(0,l.getAgentTypeIcon)(C),D=k.find(e=>e.agentType===C)?.label??C,I=P?(0,c.getModelMeta)(P).displayName||P:null,q=T?k.find(e=>e.agentType===T):null;return(0,t.jsxs)("div",{className:(0,p.cn)("flex flex-col gap-1",v),children:[(0,t.jsxs)(u.Popover,{open:g,onOpenChange:y,children:[(0,t.jsx)(u.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(d.Button,{variant:"outline",role:"combobox","aria-expanded":g,disabled:(m??!1)||w,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(F,{className:"h-4 w-4 shrink-0"}),w?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:D}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:I})]}):null]})]})})}),(0,t.jsx)(u.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===M?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),k.map(e=>{let r=(0,l.getAgentTypeIcon)(e.agentType),o=C===e.agentType,i=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,p.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",o&&"bg-accent/50"),onClick:()=>{i?(z(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>O(1))})):E(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),o&&!i?(0,t.jsx)(s.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,i?(0,t.jsx)(n.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{O(0),setTimeout(()=>z(null),220)},children:[(0,t.jsx)(o.ChevronLeft,{className:"h-3.5 w-3.5"}),q.label]}),q.models.map(e=>{let r=C===q.agentType&&P===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>E(q.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(s.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!N&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:N})]})}e.s(["AgentModelPicker",()=>f])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},87889,e=>{"use strict";let t=(0,e.i(3645).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],87889)},99105,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],99105)},87342,e=>{"use strict";var t=e.i(79054),r=e.i(22528),s=e.i(5978),o=e.i(86874),n=e.i(20314);function i(e){let i=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(i),[c,d]=a(i,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:s}=e,o=t.default.useRef(null),i=t.default.useRef(new Map).current;return(0,n.jsx)(c,{scope:r,itemMap:i,collectionRef:o,children:s})};u.displayName=i;let p=e+"CollectionSlot",f=(0,o.createSlot)(p),h=t.default.forwardRef((e,t)=>{let{scope:r,children:o}=e,i=d(p,r),a=(0,s.useComposedRefs)(t,i.collectionRef);return(0,n.jsx)(f,{ref:a,children:o})});h.displayName=p;let m=e+"CollectionItemSlot",v="data-radix-collection-item",x=(0,o.createSlot)(m),g=t.default.forwardRef((e,r)=>{let{scope:o,children:i,...a}=e,l=t.default.useRef(null),c=(0,s.useComposedRefs)(r,l),u=d(m,o);return t.default.useEffect(()=>(u.itemMap.set(l,{ref:l,...a}),()=>void u.itemMap.delete(l))),(0,n.jsx)(x,{...{[v]:""},ref:c,children:i})});return g.displayName=m,[{Provider:u,Slot:h,ItemSlot:g},function(r){let s=d(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(s.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[s.collectionRef,s.itemMap])},l]}var a=new WeakMap;function l(e,t){var r,s;let o,n,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,s=t,o=r.length,(i=(n=c(s))>=0?n:o+n)<0||i>=o?-1:i);return -1===a?void 0:e[a]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],a.set(this,!0)}set(e,t){return a.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let s,o=this.has(t),n=this.#e.length,i=c(e),a=i>=0?i:n+i,l=a<0||a>=n?-1:a;if(l===this.size||o&&l===this.size-1||-1===l)return this.set(t,r),this;let d=this.size+ +!o;i<0&&a++;let u=[...this.#e],p=!1;for(let e=a;e<d;e++)if(a===e){let n=u[e];u[e]===t&&(n=u[e+1]),o&&this.delete(t),s=this.get(n),this.set(t,r)}else{p||u[e-1]!==t||(p=!0);let r=u[p?e:e-1],o=s;s=this.get(r),this.delete(r),this.set(r,o)}return this}with(t,r,s){let o=new e(this);return o.insert(t,r,s),o}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=l(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=l(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return l(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return s;r++}}findIndex(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return r;r++}return -1}filter(t,r){let s=[],o=0;for(let e of this)Reflect.apply(t,r,[e,o,this])&&s.push(e),o++;return new e(s)}map(t,r){let s=[],o=0;for(let e of this)s.push([e[0],Reflect.apply(t,r,[e,o,this])]),o++;return new e(s)}reduce(...e){let[t,r]=e,s=0,o=r??this.at(0);for(let r of this)o=0===s&&1===e.length?r:Reflect.apply(t,this,[o,r,s,this]),s++;return o}reduceRight(...e){let[t,r]=e,s=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let o=this.at(r);s=r===this.size-1&&1===e.length?o:Reflect.apply(t,this,[s,o,r,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),s=this.get(r);t.set(r,s)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let s=new e,o=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==r&&r>0&&(o=r-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),r=this.get(t);s.set(t,r)}return s}every(e,t){let r=0;for(let s of this){if(!Reflect.apply(e,t,[s,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>i])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},41957,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(87620),o=r.forwardRef((e,r)=>(0,t.jsx)(s.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));o.displayName="Label",e.s(["Label",()=>o,"Root",()=>o],27572);var n=e.i(27572),n=n,i=e.i(94237),a=e.i(31777);let l=(0,i.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(n.Root,{ref:s,className:(0,a.cn)(l(),e),...r}));c.displayName=n.Root.displayName,e.s(["Label",()=>c],41957)},51911,23405,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(91967),o=e.i(5978),n=e.i(22528),i=e.i(36589);function a(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}e.s(["usePrevious",()=>a],23405);var l=e.i(77624),c=e.i(87620),d="Switch",[u,p]=(0,n.createContextScope)(d),[f,h]=u(d),m=r.forwardRef((e,n)=>{let{__scopeSwitch:a,name:l,checked:u,defaultChecked:p,required:h,disabled:m,value:v="on",onCheckedChange:x,form:k,...b}=e,[w,R]=r.useState(null),C=(0,o.useComposedRefs)(n,e=>R(e)),j=r.useRef(!1),P=!w||k||!!w.closest("form"),[A,N]=(0,i.useControllableState)({prop:u,defaultProp:p??!1,onChange:x,caller:d});return(0,t.jsxs)(f,{scope:a,checked:A,disabled:m,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":A,"aria-required":h,"data-state":y(A),"data-disabled":m?"":void 0,disabled:m,value:v,...b,ref:C,onClick:(0,s.composeEventHandlers)(e.onClick,e=>{N(e=>!e),P&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())})}),P&&(0,t.jsx)(g,{control:w,bubbles:!j.current,name:l,value:v,checked:A,required:h,disabled:m,form:k,style:{transform:"translateX(-100%)"}})]})});m.displayName=d;var v="SwitchThumb",x=r.forwardRef((e,r)=>{let{__scopeSwitch:s,...o}=e,n=h(v,s);return(0,t.jsx)(c.Primitive.span,{"data-state":y(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:r})});x.displayName=v;var g=r.forwardRef(({__scopeSwitch:e,control:s,checked:n,bubbles:i=!0,...c},d)=>{let u=r.useRef(null),p=(0,o.useComposedRefs)(u,d),f=a(n),h=(0,l.useSize)(s);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==n&&t){let r=new Event("click",{bubbles:i});t.call(e,n),e.dispatchEvent(r)}},[f,n,i]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...c,tabIndex:-1,ref:p,style:{...c.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function y(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>x,"Thumb",()=>x,"createSwitchScope",()=>p],95291);var k=e.i(95291),k=k,b=e.i(31777);function w({className:e,size:r="default",...s}){return(0,t.jsx)(k.Root,{"data-slot":"switch","data-size":r,className:(0,b.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...s,children:(0,t.jsx)(k.Thumb,{"data-slot":"switch-thumb",className:(0,b.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>w],51911)},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},83333,82465,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("00038d028e4b292352d7b97ea9215b70e518b5437f",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],83333);let s=(0,t.createServerReference)("608e92e2b7c9a604159525aef85cd478bacfd33c2b",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>s],82465)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(91967),o=e.i(5978),n=e.i(22528),i=e.i(53532),a=e.i(41687),l=e.i(56720),c=e.i(13123),d=e.i(52740),u=e.i(39979),p=e.i(85995),f=e.i(87620),h=e.i(86874),m=e.i(36589),v=e.i(73772),x=e.i(13044),g="Popover",[y,k]=(0,n.createContextScope)(g,[d.createPopperScope]),b=(0,d.createPopperScope)(),[w,R]=y(g),C=e=>{let{__scopePopover:s,children:o,open:n,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,u=b(s),p=r.useRef(null),[f,h]=r.useState(!1),[v,x]=(0,m.useControllableState)({prop:n,defaultProp:i??!1,onChange:a,caller:g});return(0,t.jsx)(d.Root,{...u,children:(0,t.jsx)(w,{scope:s,contentId:(0,c.useId)(),triggerRef:p,open:v,onOpenChange:x,onOpenToggle:r.useCallback(()=>x(e=>!e),[x]),hasCustomAnchor:f,onCustomAnchorAdd:r.useCallback(()=>h(!0),[]),onCustomAnchorRemove:r.useCallback(()=>h(!1),[]),modal:l,children:o})})};C.displayName=g;var j="PopoverAnchor",P=r.forwardRef((e,s)=>{let{__scopePopover:o,...n}=e,i=R(j,o),a=b(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=i;return r.useEffect(()=>(l(),()=>c()),[l,c]),(0,t.jsx)(d.Anchor,{...a,...n,ref:s})});P.displayName=j;var A="PopoverTrigger",N=r.forwardRef((e,r)=>{let{__scopePopover:n,...i}=e,a=R(A,n),l=b(n),c=(0,o.useComposedRefs)(r,a.triggerRef),u=(0,t.jsx)(f.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":B(a.open),...i,ref:c,onClick:(0,s.composeEventHandlers)(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:(0,t.jsx)(d.Anchor,{asChild:!0,...l,children:u})});N.displayName=A;var S="PopoverPortal",[M,O]=y(S,{forceMount:void 0}),T=e=>{let{__scopePopover:r,forceMount:s,children:o,container:n}=e,i=R(S,r);return(0,t.jsx)(M,{scope:r,forceMount:s,children:(0,t.jsx)(p.Presence,{present:s||i.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:n,children:o})})})};T.displayName=S;var z="PopoverContent",E=r.forwardRef((e,r)=>{let s=O(z,e.__scopePopover),{forceMount:o=s.forceMount,...n}=e,i=R(z,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:o||i.open,children:i.modal?(0,t.jsx)(D,{...n,ref:r}):(0,t.jsx)(I,{...n,ref:r})})});E.displayName=z;var F=(0,h.createSlot)("PopoverContent.RemoveScroll"),D=r.forwardRef((e,n)=>{let i=R(z,e.__scopePopover),a=r.useRef(null),l=(0,o.useComposedRefs)(n,a),c=r.useRef(!1);return r.useEffect(()=>{let e=a.current;if(e)return(0,v.hideOthers)(e)},[]),(0,t.jsx)(x.RemoveScroll,{as:F,allowPinchZoom:!0,children:(0,t.jsx)(q,{...e,ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,s.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),c.current||i.triggerRef.current?.focus()}),onPointerDownOutside:(0,s.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;c.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,s.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),I=r.forwardRef((e,s)=>{let o=R(z,e.__scopePopover),n=r.useRef(!1),i=r.useRef(!1);return(0,t.jsx)(q,{...e,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||o.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let r=t.target;o.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),q=r.forwardRef((e,r)=>{let{__scopePopover:s,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,...v}=e,x=R(z,s),g=b(s);return(0,a.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:c,children:(0,t.jsx)(i.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),children:(0,t.jsx)(d.Content,{"data-state":B(x.open),role:"dialog",id:x.contentId,...g,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),L="PopoverClose",H=r.forwardRef((e,r)=>{let{__scopePopover:o,...n}=e,i=R(L,o);return(0,t.jsx)(f.Primitive.button,{type:"button",...n,ref:r,onClick:(0,s.composeEventHandlers)(e.onClick,()=>i.onOpenChange(!1))})});H.displayName=L;var _=r.forwardRef((e,r)=>{let{__scopePopover:s,...o}=e,n=b(s);return(0,t.jsx)(d.Arrow,{...n,...o,ref:r})});function B(e){return e?"open":"closed"}_.displayName="PopoverArrow",e.s(["Anchor",()=>P,"Arrow",()=>_,"Close",()=>H,"Content",()=>E,"Popover",()=>C,"PopoverAnchor",()=>P,"PopoverArrow",()=>_,"PopoverClose",()=>H,"PopoverContent",()=>E,"PopoverPortal",()=>T,"PopoverTrigger",()=>N,"Portal",()=>T,"Root",()=>C,"Trigger",()=>N,"createPopoverScope",()=>k],89920);var U=e.i(89920),U=U,K=e.i(31777);let G=U.Root,X=U.Trigger;U.Anchor;let $=r.forwardRef(({className:e,align:r="center",sideOffset:s=4,...o},n)=>(0,t.jsx)(U.Portal,{children:(0,t.jsx)(U.Content,{ref:n,align:r,sideOffset:s,className:(0,K.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...o})}));$.displayName=U.Content.displayName,e.s(["Popover",()=>G,"PopoverContent",()=>$,"PopoverTrigger",()=>X],90382)},41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(23925),o=e.i(11345),n=e.i(76016),i=e.i(83333),a=e.i(82465),l=e.i(86782),c=e.i(29847),d=e.i(35364),u=e.i(90382),p=e.i(31777);function f({initialAgentType:e,initialModel:f,onAgentModelChange:h,disabled:m,className:v,mode:x}){let[g,y]=r.useState(!1),[k,b]=r.useState([]),[w,R]=r.useState(!0),[C,j]=r.useState(e),[P,A]=r.useState(f),[N,S]=r.useState(null),[M,O]=r.useState(0),[T,z]=r.useState(null);r.useEffect(()=>{(0,i.getAllAgentModels)().then(b).finally(()=>R(!1))},[]),r.useEffect(()=>{if(!g){let e=setTimeout(()=>{O(0),z(null)},150);return()=>clearTimeout(e)}},[g]);let E=async(e,t)=>{if(y(!1),e!==C||t!==P){if("override"===x){j(e),A(t),h?.(e,t);return}j(e),A(t),h?.(e,t),S(null);try{let r=await (0,a.updateAgentAndModel)(e,t||null);r.ok||(j(C),A(P),h?.(C,P),S(r.error??"Failed to save"))}catch{j(C),A(P),h?.(C,P),S("Failed to save")}}},F=(0,l.getAgentTypeIcon)(C),D=k.find(e=>e.agentType===C)?.label??C,I=P?(0,c.getModelMeta)(P).displayName||P:null,q=T?k.find(e=>e.agentType===T):null;return(0,t.jsxs)("div",{className:(0,p.cn)("flex flex-col gap-1",v),children:[(0,t.jsxs)(u.Popover,{open:g,onOpenChange:y,children:[(0,t.jsx)(u.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(d.Button,{variant:"outline",role:"combobox","aria-expanded":g,disabled:(m??!1)||w,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(F,{className:"h-4 w-4 shrink-0"}),w?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:D}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:I})]}):null]})]})})}),(0,t.jsx)(u.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===M?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),k.map(e=>{let r=(0,l.getAgentTypeIcon)(e.agentType),o=C===e.agentType,i=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,p.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",o&&"bg-accent/50"),onClick:()=>{i?(z(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>O(1))})):E(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),o&&!i?(0,t.jsx)(s.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,i?(0,t.jsx)(n.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{O(0),setTimeout(()=>z(null),220)},children:[(0,t.jsx)(o.ChevronLeft,{className:"h-3.5 w-3.5"}),q.label]}),q.models.map(e=>{let r=C===q.agentType&&P===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>E(q.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(s.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!N&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:N})]})}e.s(["AgentModelPicker",()=>f])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file-text.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/trash-2.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/circle-x.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/copy.ts","../../../../../../../src/presentation/web/components/common/empty-state/empty-state.tsx","../../../../../../../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/external-link.ts","../../../../../../../src/presentation/web/components/ui/badge.tsx","../../../../../../../src/presentation/web/components/common/base-drawer/index.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/folder-open.ts","../../../../../../../src/presentation/web/app/actions/data%3Aa7edcd%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Afbc0e4%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Ae345ff%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/code-xml.ts","../../../../../../../src/presentation/web/components/common/repository-node/use-repository-actions.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M10 9H8', key: 'b1mrlr' }],\n ['path', { d: 'M16 13H8', key: 't4e002' }],\n ['path', { d: 'M16 17H8', key: 'z1uh3a' }],\n];\n\n/**\n * @component @name FileText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-text\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 FileText = createLucideIcon('file-text', __iconNode);\n\nexport default FileText;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M10 11v6', key: 'nco0om' }],\n ['path', { d: 'M14 11v6', key: 'outv1u' }],\n ['path', { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6', key: 'miytrc' }],\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2', key: 'e791ji' }],\n];\n\n/**\n * @component @name Trash2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/trash-2\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 Trash2 = createLucideIcon('trash-2', __iconNode);\n\nexport default Trash2;\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  - 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 ['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  - 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 ['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  - 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 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","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  - 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 = [\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  - 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 * 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","export { BaseDrawer, type BaseDrawerProps } from './base-drawer';\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'm6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2',\n key: 'usdka0',\n },\n ],\n];\n\n/**\n * @component @name FolderOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderOpen = createLucideIcon('folder-open', __iconNode);\n\nexport default FolderOpen;\n","/* __next_internal_action_entry_do_not_use__ [{\"40d975d869d467b85eec11ff2240ca8fdf65e2bd0e\":\"openIde\"},\"src/presentation/web/app/actions/open-ide.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40d975d869d467b85eec11ff2240ca8fdf65e2bd0e\",callServer,void 0,findSourceMapURL,\"openIde\");export{$$RSC_SERVER_ACTION_0 as openIde};","/* __next_internal_action_entry_do_not_use__ [{\"4092118d166e72dcccac48942435fa9191ff46c4df\":\"openShell\"},\"src/presentation/web/app/actions/open-shell.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"4092118d166e72dcccac48942435fa9191ff46c4df\",callServer,void 0,findSourceMapURL,\"openShell\");export{$$RSC_SERVER_ACTION_0 as openShell};","/* __next_internal_action_entry_do_not_use__ [{\"40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4\":\"openFolder\"},\"src/presentation/web/app/actions/open-folder.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40dc5f96743f909f22fc8d2e92fd1ed51d4cbfb7f4\",callServer,void 0,findSourceMapURL,\"openFolder\");export{$$RSC_SERVER_ACTION_0 as openFolder};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm18 16 4-4-4-4', key: '1inbqp' }],\n ['path', { d: 'm6 8-4 4 4 4', key: '15zrgr' }],\n ['path', { d: 'm14.5 4-5 16', key: 'e7oirm' }],\n];\n\n/**\n * @component @name CodeXml\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/code-xml\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 CodeXml = createLucideIcon('code-xml', __iconNode);\n\nexport default CodeXml;\n","'use client';\n\nimport { useState, useCallback, useRef, useEffect } from 'react';\nimport { openIde } from '@/app/actions/open-ide';\nimport { openShell } from '@/app/actions/open-shell';\nimport { openFolder } from '@/app/actions/open-folder';\n\nexport interface RepositoryActionsInput {\n repositoryPath: string;\n}\n\nexport interface RepositoryActionsState {\n openInIde: () => Promise<void>;\n openInShell: () => Promise<void>;\n openFolder: () => Promise<void>;\n ideLoading: boolean;\n shellLoading: boolean;\n folderLoading: boolean;\n ideError: string | null;\n shellError: string | null;\n folderError: string | null;\n}\n\nconst ERROR_CLEAR_DELAY = 5000;\n\nexport function useRepositoryActions(input: RepositoryActionsInput | null): RepositoryActionsState {\n const [ideLoading, setIdeLoading] = useState(false);\n const [shellLoading, setShellLoading] = useState(false);\n const [folderLoading, setFolderLoading] = useState(false);\n const [ideError, setIdeError] = useState<string | null>(null);\n const [shellError, setShellError] = useState<string | null>(null);\n const [folderError, setFolderError] = useState<string | null>(null);\n\n const ideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const shellTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const folderTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Clear timers on unmount\n useEffect(() => {\n const ideRef = ideTimerRef;\n const shellRef = shellTimerRef;\n const folderRef = folderTimerRef;\n return () => {\n if (ideRef.current) clearTimeout(ideRef.current);\n if (shellRef.current) clearTimeout(shellRef.current);\n if (folderRef.current) clearTimeout(folderRef.current);\n };\n }, []);\n\n const performAction = useCallback(\n async (\n action: () => Promise<{ success: boolean; error?: string }>,\n setLoading: (v: boolean) => void,\n setError: (v: string | null) => void,\n timerRef: React.RefObject<ReturnType<typeof setTimeout> | null>,\n isLoading: boolean\n ) => {\n if (!input || isLoading) return;\n\n if (timerRef.current) clearTimeout(timerRef.current);\n\n setLoading(true);\n setError(null);\n\n try {\n const result = await action();\n\n if (!result.success) {\n const errorMessage = result.error ?? 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n }\n } catch (err: unknown) {\n const errorMessage = err instanceof Error ? err.message : 'An unexpected error occurred';\n setError(errorMessage);\n timerRef.current = setTimeout(() => setError(null), ERROR_CLEAR_DELAY);\n } finally {\n setLoading(false);\n }\n },\n [input]\n );\n\n const handleOpenIde = useCallback(\n () =>\n performAction(\n () => openIde({ repositoryPath: input!.repositoryPath }),\n setIdeLoading,\n setIdeError,\n ideTimerRef,\n ideLoading\n ),\n [performAction, ideLoading, input]\n );\n\n const handleOpenShell = useCallback(\n () =>\n performAction(\n () => openShell({ repositoryPath: input!.repositoryPath }),\n setShellLoading,\n setShellError,\n shellTimerRef,\n shellLoading\n ),\n [performAction, shellLoading, input]\n );\n\n const handleOpenFolder = useCallback(\n () =>\n performAction(\n () => openFolder(input!.repositoryPath),\n setFolderLoading,\n setFolderError,\n folderTimerRef,\n folderLoading\n ),\n [performAction, folderLoading, input]\n );\n\n return {\n openInIde: handleOpenIde,\n openInShell: handleOpenShell,\n openFolder: handleOpenFolder,\n ideLoading,\n shellLoading,\n folderLoading,\n ideError,\n shellError,\n folderError,\n };\n}\n"],"names":[],"mappings":"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","ignoreList":[2,3,4,6,7,10,14]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[58860,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(66873),e=c.forwardRef((a,c)=>(0,b.jsx)(d.Primitive.label,{...a,ref:c,onMouseDown:b=>{b.target.closest("button, input, select, textarea")||(a.onMouseDown?.(b),!b.defaultPrevented&&b.detail>1&&b.preventDefault())}}));e.displayName="Label",a.s(["Label",()=>e,"Root",()=>e],59967);var f=a.i(59967),f=f,g=a.i(42261),h=a.i(85536);let i=(0,g.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),j=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(f.Root,{ref:d,className:(0,h.cn)(i(),a),...c}));j.displayName=f.Root.displayName,a.s(["Label",()=>j],58860)},96867,64005,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(17329);function h(a){let b=c.useRef({value:a,previous:a});return c.useMemo(()=>(b.current.value!==a&&(b.current.previous=b.current.value,b.current.value=a),b.current.previous),[a])}a.s(["usePrevious",()=>h],64005);var i=a.i(74432),j=a.i(66873),k="Switch",[l,m]=(0,f.createContextScope)(k),[n,o]=l(k),p=c.forwardRef((a,f)=>{let{__scopeSwitch:h,name:i,checked:l,defaultChecked:m,required:o,disabled:p,value:q="on",onCheckedChange:r,form:u,...v}=a,[w,x]=c.useState(null),y=(0,e.useComposedRefs)(f,a=>x(a)),z=c.useRef(!1),A=!w||u||!!w.closest("form"),[B,C]=(0,g.useControllableState)({prop:l,defaultProp:m??!1,onChange:r,caller:k});return(0,b.jsxs)(n,{scope:h,checked:B,disabled:p,children:[(0,b.jsx)(j.Primitive.button,{type:"button",role:"switch","aria-checked":B,"aria-required":o,"data-state":t(B),"data-disabled":p?"":void 0,disabled:p,value:q,...v,ref:y,onClick:(0,d.composeEventHandlers)(a.onClick,a=>{C(a=>!a),A&&(z.current=a.isPropagationStopped(),z.current||a.stopPropagation())})}),A&&(0,b.jsx)(s,{control:w,bubbles:!z.current,name:i,value:q,checked:B,required:o,disabled:p,form:u,style:{transform:"translateX(-100%)"}})]})});p.displayName=k;var q="SwitchThumb",r=c.forwardRef((a,c)=>{let{__scopeSwitch:d,...e}=a,f=o(q,d);return(0,b.jsx)(j.Primitive.span,{"data-state":t(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:c})});r.displayName=q;var s=c.forwardRef(({__scopeSwitch:a,control:d,checked:f,bubbles:g=!0,...j},k)=>{let l=c.useRef(null),m=(0,e.useComposedRefs)(l,k),n=h(f),o=(0,i.useSize)(d);return c.useEffect(()=>{let a=l.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==f&&b){let c=new Event("click",{bubbles:g});b.call(a,f),a.dispatchEvent(c)}},[n,f,g]),(0,b.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:f,...j,tabIndex:-1,ref:m,style:{...j.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function t(a){return a?"checked":"unchecked"}s.displayName="SwitchBubbleInput",a.s(["Root",()=>p,"Switch",()=>p,"SwitchThumb",()=>r,"Thumb",()=>r,"createSwitchScope",()=>m],91918);var u=a.i(91918),u=u,v=a.i(85536);function w({className:a,size:c="default",...d}){return(0,b.jsx)(u.Root,{"data-slot":"switch","data-size":c,className:(0,v.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",a),...d,children:(0,b.jsx)(u.Thumb,{"data-slot":"switch-thumb",className:(0,v.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}a.s(["Switch",()=>w],96867)},40617,a=>{"use strict";let b=(0,a.i(25700).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["default",()=>b])},96156,74936,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("00b8200afc8ffef5a56917b02cf3c98e3dd754f710",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],96156);let d=(0,b.createServerReference)("603f24c2fb766e4b719ecf3e237ce7a8a5d67ec4b5",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],74936)},80646,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(58761),h=a.i(51473),i=a.i(59675),j=a.i(5472),k=a.i(75988),l=a.i(80930),m=a.i(14272),n=a.i(66873),o=a.i(90986),p=a.i(17329),q=a.i(16164),r=a.i(45291),s="Popover",[t,u]=(0,f.createContextScope)(s,[k.createPopperScope]),v=(0,k.createPopperScope)(),[w,x]=t(s),y=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,l=v(d),m=c.useRef(null),[n,o]=c.useState(!1),[q,r]=(0,p.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:s});return(0,b.jsx)(k.Root,{...l,children:(0,b.jsx)(w,{scope:d,contentId:(0,j.useId)(),triggerRef:m,open:q,onOpenChange:r,onOpenToggle:c.useCallback(()=>r(a=>!a),[r]),hasCustomAnchor:n,onCustomAnchorAdd:c.useCallback(()=>o(!0),[]),onCustomAnchorRemove:c.useCallback(()=>o(!1),[]),modal:i,children:e})})};y.displayName=s;var z="PopoverAnchor",A=c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=x(z,e),h=v(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(k.Anchor,{...h,...f,ref:d})});A.displayName=z;var B="PopoverTrigger",C=c.forwardRef((a,c)=>{let{__scopePopover:f,...g}=a,h=x(B,f),i=v(f),j=(0,e.useComposedRefs)(c,h.triggerRef),l=(0,b.jsx)(n.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":h.open,"aria-controls":h.contentId,"data-state":Q(h.open),...g,ref:j,onClick:(0,d.composeEventHandlers)(a.onClick,h.onOpenToggle)});return h.hasCustomAnchor?l:(0,b.jsx)(k.Anchor,{asChild:!0,...i,children:l})});C.displayName=B;var D="PopoverPortal",[E,F]=t(D,{forceMount:void 0}),G=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=x(D,c);return(0,b.jsx)(E,{scope:c,forceMount:d,children:(0,b.jsx)(m.Presence,{present:d||g.open,children:(0,b.jsx)(l.Portal,{asChild:!0,container:f,children:e})})})};G.displayName=D;var H="PopoverContent",I=c.forwardRef((a,c)=>{let d=F(H,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=x(H,a.__scopePopover);return(0,b.jsx)(m.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(K,{...f,ref:c}):(0,b.jsx)(L,{...f,ref:c})})});I.displayName=H;var J=(0,o.createSlot)("PopoverContent.RemoveScroll"),K=c.forwardRef((a,f)=>{let g=x(H,a.__scopePopover),h=c.useRef(null),i=(0,e.useComposedRefs)(f,h),j=c.useRef(!1);return c.useEffect(()=>{let a=h.current;if(a)return(0,q.hideOthers)(a)},[]),(0,b.jsx)(r.RemoveScroll,{as:J,allowPinchZoom:!0,children:(0,b.jsx)(M,{...a,ref:i,trapFocus:g.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,d.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),j.current||g.triggerRef.current?.focus()}),onPointerDownOutside:(0,d.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;j.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,d.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=c.forwardRef((a,d)=>{let e=x(H,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(M,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),M=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:j,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:p,...q}=a,r=x(H,d),s=v(d);return(0,h.useFocusGuards)(),(0,b.jsx)(i.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:j,children:(0,b.jsx)(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onDismiss:()=>r.onOpenChange(!1),children:(0,b.jsx)(k.Content,{"data-state":Q(r.open),role:"dialog",id:r.contentId,...s,...q,ref:c,style:{...q.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N="PopoverClose",O=c.forwardRef((a,c)=>{let{__scopePopover:e,...f}=a,g=x(N,e);return(0,b.jsx)(n.Primitive.button,{type:"button",...f,ref:c,onClick:(0,d.composeEventHandlers)(a.onClick,()=>g.onOpenChange(!1))})});O.displayName=N;var P=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=v(d);return(0,b.jsx)(k.Arrow,{...f,...e,ref:c})});function Q(a){return a?"open":"closed"}P.displayName="PopoverArrow",a.s(["Anchor",()=>A,"Arrow",()=>P,"Close",()=>O,"Content",()=>I,"Popover",()=>y,"PopoverAnchor",()=>A,"PopoverArrow",()=>P,"PopoverClose",()=>O,"PopoverContent",()=>I,"PopoverPortal",()=>G,"PopoverTrigger",()=>C,"Portal",()=>G,"Root",()=>y,"Trigger",()=>C,"createPopoverScope",()=>u],61452);var R=a.i(61452),R=R,S=a.i(85536);let T=R.Root,U=R.Trigger;R.Anchor;let V=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(R.Portal,{children:(0,b.jsx)(R.Content,{ref:f,align:c,sideOffset:d,className:(0,S.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",a),...e})}));V.displayName=R.Content.displayName,a.s(["Popover",()=>T,"PopoverContent",()=>V,"PopoverTrigger",()=>U],80646)},61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(72016),e=a.i(94132),f=a.i(3410),g=a.i(96156),h=a.i(74936),i=a.i(17606),j=a.i(83852),k=a.i(18948),l=a.i(80646),m=a.i(85536);function n({initialAgentType:a,initialModel:n,onAgentModelChange:o,disabled:p,className:q,mode:r}){let[s,t]=c.useState(!1),[u,v]=c.useState([]),[w,x]=c.useState(!0),[y,z]=c.useState(a),[A,B]=c.useState(n),[C,D]=c.useState(null),[E,F]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,g.getAllAgentModels)().then(v).finally(()=>x(!1))},[]),c.useEffect(()=>{if(!s){let a=setTimeout(()=>{F(0),H(null)},150);return()=>clearTimeout(a)}},[s]);let I=async(a,b)=>{if(t(!1),a!==y||b!==A){if("override"===r){z(a),B(b),o?.(a,b);return}z(a),B(b),o?.(a,b),D(null);try{let c=await (0,h.updateAgentAndModel)(a,b||null);c.ok||(z(y),B(A),o?.(y,A),D(c.error??"Failed to save"))}catch{z(y),B(A),o?.(y,A),D("Failed to save")}}},J=(0,i.getAgentTypeIcon)(y),K=u.find(a=>a.agentType===y)?.label??y,L=A?(0,j.getModelMeta)(A).displayName||A:null,M=G?u.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,m.cn)("flex flex-col gap-1",q),children:[(0,b.jsxs)(l.Popover,{open:s,onOpenChange:t,children:[(0,b.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(k.Button,{variant:"outline",role:"combobox","aria-expanded":s,disabled:(p??!1)||w,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,b.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,b.jsx)(J,{className:"h-4 w-4 shrink-0"}),w?"Loading…":(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K}),L?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,b.jsx)(l.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,b.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===E?"-50%":"0%"})`,width:"200%"},children:[(0,b.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,b.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),u.map(a=>{let c=(0,i.getAgentTypeIcon)(a.agentType),e=y===a.agentType,g=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,m.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",e&&"bg-accent/50"),onClick:()=>{g?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>F(1))})):I(a.agentType,"")},children:[(0,b.jsx)(c,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"flex-1 text-left",children:a.label}),e&&!g?(0,b.jsx)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,g?(0,b.jsx)(f.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},a.agentType)})]}),(0,b.jsx)("div",{className:"w-1/2 shrink-0",children:M?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{F(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(e.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=y===M.agentType&&A===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,m.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",c&&"bg-accent/50"),onClick:()=>I(M.agentType,a.id),children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.displayName}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description})]}),c?(0,b.jsx)(d.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!C&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:C})]})}a.s(["AgentModelPicker",()=>n])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_c29db9b3._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},41957,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(87620),s=r.forwardRef((e,r)=>(0,t.jsx)(a.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));s.displayName="Label",e.s(["Label",()=>s,"Root",()=>s],27572);var o=e.i(27572),o=o,n=e.i(94237),i=e.i(31777);let l=(0,n.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(o.Root,{ref:a,className:(0,i.cn)(l(),e),...r}));d.displayName=o.Root.displayName,e.s(["Label",()=>d],41957)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(91967),s=e.i(5978),o=e.i(22528),n=e.i(53532),i=e.i(41687),l=e.i(56720),d=e.i(13123),c=e.i(52740),u=e.i(39979),p=e.i(85995),h=e.i(87620),f=e.i(86874),m=e.i(36589),x=e.i(73772),g=e.i(13044),v="Popover",[b,j]=(0,o.createContextScope)(v,[c.createPopperScope]),w=(0,c.createPopperScope)(),[y,C]=b(v),N=e=>{let{__scopePopover:a,children:s,open:o,defaultOpen:n,onOpenChange:i,modal:l=!1}=e,u=w(a),p=r.useRef(null),[h,f]=r.useState(!1),[x,g]=(0,m.useControllableState)({prop:o,defaultProp:n??!1,onChange:i,caller:v});return(0,t.jsx)(c.Root,{...u,children:(0,t.jsx)(y,{scope:a,contentId:(0,d.useId)(),triggerRef:p,open:x,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:h,onCustomAnchorAdd:r.useCallback(()=>f(!0),[]),onCustomAnchorRemove:r.useCallback(()=>f(!1),[]),modal:l,children:s})})};N.displayName=v;var k="PopoverAnchor",P=r.forwardRef((e,a)=>{let{__scopePopover:s,...o}=e,n=C(k,s),i=w(s),{onCustomAnchorAdd:l,onCustomAnchorRemove:d}=n;return r.useEffect(()=>(l(),()=>d()),[l,d]),(0,t.jsx)(c.Anchor,{...i,...o,ref:a})});P.displayName=k;var S="PopoverTrigger",T=r.forwardRef((e,r)=>{let{__scopePopover:o,...n}=e,i=C(S,o),l=w(o),d=(0,s.useComposedRefs)(r,i.triggerRef),u=(0,t.jsx)(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$(i.open),...n,ref:d,onClick:(0,a.composeEventHandlers)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,t.jsx)(c.Anchor,{asChild:!0,...l,children:u})});T.displayName=S;var R="PopoverPortal",[A,F]=b(R,{forceMount:void 0}),E=e=>{let{__scopePopover:r,forceMount:a,children:s,container:o}=e,n=C(R,r);return(0,t.jsx)(A,{scope:r,forceMount:a,children:(0,t.jsx)(p.Presence,{present:a||n.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:o,children:s})})})};E.displayName=R;var M="PopoverContent",O=r.forwardRef((e,r)=>{let a=F(M,e.__scopePopover),{forceMount:s=a.forceMount,...o}=e,n=C(M,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:s||n.open,children:n.modal?(0,t.jsx)(z,{...o,ref:r}):(0,t.jsx)(L,{...o,ref:r})})});O.displayName=M;var D=(0,f.createSlot)("PopoverContent.RemoveScroll"),z=r.forwardRef((e,o)=>{let n=C(M,e.__scopePopover),i=r.useRef(null),l=(0,s.useComposedRefs)(o,i),d=r.useRef(!1);return r.useEffect(()=>{let e=i.current;if(e)return(0,x.hideOthers)(e)},[]),(0,t.jsx)(g.RemoveScroll,{as:D,allowPinchZoom:!0,children:(0,t.jsx)(I,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,a.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),d.current||n.triggerRef.current?.focus()}),onPointerDownOutside:(0,a.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;d.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,a.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=r.forwardRef((e,a)=>{let s=C(M,e.__scopePopover),o=r.useRef(!1),n=r.useRef(!1);return(0,t.jsx)(I,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||s.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let r=t.target;s.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})}),I=r.forwardRef((e,r)=>{let{__scopePopover:a,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,...x}=e,g=C(M,a),v=w(a);return(0,i.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:d,children:(0,t.jsx)(n.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),children:(0,t.jsx)(c.Content,{"data-state":$(g.open),role:"dialog",id:g.contentId,...v,...x,ref:r,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),B="PopoverClose",U=r.forwardRef((e,r)=>{let{__scopePopover:s,...o}=e,n=C(B,s);return(0,t.jsx)(h.Primitive.button,{type:"button",...o,ref:r,onClick:(0,a.composeEventHandlers)(e.onClick,()=>n.onOpenChange(!1))})});U.displayName=B;var H=r.forwardRef((e,r)=>{let{__scopePopover:a,...s}=e,o=w(a);return(0,t.jsx)(c.Arrow,{...o,...s,ref:r})});function $(e){return e?"open":"closed"}H.displayName="PopoverArrow",e.s(["Anchor",()=>P,"Arrow",()=>H,"Close",()=>U,"Content",()=>O,"Popover",()=>N,"PopoverAnchor",()=>P,"PopoverArrow",()=>H,"PopoverClose",()=>U,"PopoverContent",()=>O,"PopoverPortal",()=>E,"PopoverTrigger",()=>T,"Portal",()=>E,"Root",()=>N,"Trigger",()=>T,"createPopoverScope",()=>j],89920);var G=e.i(89920),G=G,_=e.i(31777);let q=G.Root,K=G.Trigger;G.Anchor;let V=r.forwardRef(({className:e,align:r="center",sideOffset:a=4,...s},o)=>(0,t.jsx)(G.Portal,{children:(0,t.jsx)(G.Content,{ref:o,align:r,sideOffset:a,className:(0,_.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...s})}));V.displayName=G.Content.displayName,e.s(["Popover",()=>q,"PopoverContent",()=>V,"PopoverTrigger",()=>K],90382)},51911,23405,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(91967),s=e.i(5978),o=e.i(22528),n=e.i(36589);function i(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}e.s(["usePrevious",()=>i],23405);var l=e.i(77624),d=e.i(87620),c="Switch",[u,p]=(0,o.createContextScope)(c),[h,f]=u(c),m=r.forwardRef((e,o)=>{let{__scopeSwitch:i,name:l,checked:u,defaultChecked:p,required:f,disabled:m,value:x="on",onCheckedChange:g,form:j,...w}=e,[y,C]=r.useState(null),N=(0,s.useComposedRefs)(o,e=>C(e)),k=r.useRef(!1),P=!y||j||!!y.closest("form"),[S,T]=(0,n.useControllableState)({prop:u,defaultProp:p??!1,onChange:g,caller:c});return(0,t.jsxs)(h,{scope:i,checked:S,disabled:m,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":S,"aria-required":f,"data-state":b(S),"data-disabled":m?"":void 0,disabled:m,value:x,...w,ref:N,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{T(e=>!e),P&&(k.current=e.isPropagationStopped(),k.current||e.stopPropagation())})}),P&&(0,t.jsx)(v,{control:y,bubbles:!k.current,name:l,value:x,checked:S,required:f,disabled:m,form:j,style:{transform:"translateX(-100%)"}})]})});m.displayName=c;var x="SwitchThumb",g=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...s}=e,o=f(x,a);return(0,t.jsx)(d.Primitive.span,{"data-state":b(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:r})});g.displayName=x;var v=r.forwardRef(({__scopeSwitch:e,control:a,checked:o,bubbles:n=!0,...d},c)=>{let u=r.useRef(null),p=(0,s.useComposedRefs)(u,c),h=i(o),f=(0,l.useSize)(a);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==o&&t){let r=new Event("click",{bubbles:n});t.call(e,o),e.dispatchEvent(r)}},[h,o,n]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...d,tabIndex:-1,ref:p,style:{...d.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}v.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>p],95291);var j=e.i(95291),j=j,w=e.i(31777);function y({className:e,size:r="default",...a}){return(0,t.jsx)(j.Root,{"data-slot":"switch","data-size":r,className:(0,w.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...a,children:(0,t.jsx)(j.Thumb,{"data-slot":"switch-thumb",className:(0,w.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>y],51911)},56769,26417,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("00b8200afc8ffef5a56917b02cf3c98e3dd754f710",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],56769);let a=(0,t.createServerReference)("603f24c2fb766e4b719ecf3e237ce7a8a5d67ec4b5",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>a],26417)},41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(23925),s=e.i(11345),o=e.i(76016),n=e.i(56769),i=e.i(26417),l=e.i(86782),d=e.i(29847),c=e.i(35364),u=e.i(90382),p=e.i(31777);function h({initialAgentType:e,initialModel:h,onAgentModelChange:f,disabled:m,className:x,mode:g}){let[v,b]=r.useState(!1),[j,w]=r.useState([]),[y,C]=r.useState(!0),[N,k]=r.useState(e),[P,S]=r.useState(h),[T,R]=r.useState(null),[A,F]=r.useState(0),[E,M]=r.useState(null);r.useEffect(()=>{(0,n.getAllAgentModels)().then(w).finally(()=>C(!1))},[]),r.useEffect(()=>{if(!v){let e=setTimeout(()=>{F(0),M(null)},150);return()=>clearTimeout(e)}},[v]);let O=async(e,t)=>{if(b(!1),e!==N||t!==P){if("override"===g){k(e),S(t),f?.(e,t);return}k(e),S(t),f?.(e,t),R(null);try{let r=await (0,i.updateAgentAndModel)(e,t||null);r.ok||(k(N),S(P),f?.(N,P),R(r.error??"Failed to save"))}catch{k(N),S(P),f?.(N,P),R("Failed to save")}}},D=(0,l.getAgentTypeIcon)(N),z=j.find(e=>e.agentType===N)?.label??N,L=P?(0,d.getModelMeta)(P).displayName||P:null,I=E?j.find(e=>e.agentType===E):null;return(0,t.jsxs)("div",{className:(0,p.cn)("flex flex-col gap-1",x),children:[(0,t.jsxs)(u.Popover,{open:v,onOpenChange:b,children:[(0,t.jsx)(u.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(c.Button,{variant:"outline",role:"combobox","aria-expanded":v,disabled:(m??!1)||y,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(D,{className:"h-4 w-4 shrink-0"}),y?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:z}),L?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,t.jsx)(u.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===A?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),j.map(e=>{let r=(0,l.getAgentTypeIcon)(e.agentType),s=N===e.agentType,n=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,p.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",s&&"bg-accent/50"),onClick:()=>{n?(M(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>F(1))})):O(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),s&&!n?(0,t.jsx)(a.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,n?(0,t.jsx)(o.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{F(0),setTimeout(()=>M(null),220)},children:[(0,t.jsx)(s.ChevronLeft,{className:"h-3.5 w-3.5"}),I.label]}),I.models.map(e=>{let r=N===I.agentType&&P===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>O(I.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(a.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!T&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:T})]})}e.s(["AgentModelPicker",()=>h])},15203,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(31406),s=e.i(60112),o=e.i(21023);let n=(0,o.createServerReference)("4058ec3bb0e0fae7d36e173b4242c7cc27f53f3d16",o.callServer,void 0,o.findSourceMapURL,"createFeature");var i=e.i(91891),i=i,l=e.i(3645);let d=(0,l.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);var c=e.i(16298),c=c;let u=(0,l.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var p=e.i(93752),p=p,h=e.i(69512),h=h;let f=(0,l.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var m=e.i(1012),m=m,x=e.i(31777),g=e.i(8361);e.i(1650);var v=e.i(11495),b=e.i(45811),j=e.i(35364),w=e.i(98127);function y({className:e,...r}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,x.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var C=e.i(41957),N=e.i(81846),k=e.i(90382),P=e.i(51911),S=e.i(2828),T=e.i(30153),R=e.i(41413);async function A(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}let F=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],E={allowPrd:!1,allowPlan:!1,allowMerge:!1};function M({open:e,onClose:a,onSubmit:s,repositoryPath:o,isSubmitting:n=!1,workflowDefaults:l,features:d,initialParentId:c,currentAgentType:u,currentModel:p}){let h=(0,g.useSoundAction)("create"),f=l?.approvalGates??E,m=l?.push??!1,w=l?.openPr??!1,[k,M]=(0,r.useState)(""),[z,L]=(0,r.useState)([]),[I,B]=(0,r.useState)({...f}),[U,H]=(0,r.useState)(m),[$,G]=(0,r.useState)(w),[_,q]=(0,r.useState)(void 0),[K,V]=(0,r.useState)(!1),[W,X]=(0,r.useState)(void 0),[Y,Z]=(0,r.useState)(void 0);(0,r.useEffect)(()=>{l&&(B({...l.approvalGates}),H(l.push),G(l.openPr))},[l]),(0,r.useEffect)(()=>{e&&c&&q(c)},[e,c]);let J=(0,r.useCallback)(()=>{M(""),L([]),B({...f}),H(m),G(w),q(void 0),V(!1),X(void 0),Z(void 0)},[f,m,w]),Q=""!==k.trim()||z.length>0,{attemptClose:ee}=(0,T.useGuardedDrawerClose)({open:e,isDirty:Q,onClose:a,onReset:J}),et=(0,r.useCallback)(e=>{e.preventDefault(),k.trim()&&(h.play(),s({description:k.trim(),attachments:z,repositoryPath:o,approvalGates:{allowPrd:I.allowPrd??!1,allowPlan:I.allowPlan??!1,allowMerge:I.allowMerge??!1},push:U||$,openPr:$,fast:K,...W?{agentType:W}:{},...Y?{model:Y}:{},..._?{parentId:_}:{}}),J())},[k,z,I,o,s,U,$,K,W,Y,_,h,J]),er=(0,r.useCallback)(async()=>{try{let e=await A();e&&L(t=>[...t,...e])}catch{}},[]),ea=(0,r.useCallback)(e=>{L(t=>t.filter(t=>t.path!==e))},[]),es=d&&d.length>0;return(0,t.jsx)(v.BaseDrawer,{open:e,onClose:ee,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(b.DrawerTitle,{children:"NEW FEATURE"})]}),n?(0,t.jsx)(b.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(N.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(j.Button,{variant:"outline",onClick:ee,disabled:n,children:"Cancel"}),(0,t.jsx)(j.Button,{type:"submit",form:"create-feature-form",disabled:!k.trim()||n,children:n?"Creating...":"+ Create Feature"})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(S.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{id:"create-feature-form",onSubmit:et,className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(C.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,t.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,t.jsx)(y,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:k,onChange:e=>M(e.target.value),rows:7,required:!0,disabled:n,className:"field-sizing-fixed min-h-42! resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(R.AgentModelPicker,{initialAgentType:W??u??"claude-code",initialModel:Y??p??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{X(e),Z(t)},disabled:n,className:"w-55"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(P.Switch,{id:"fast-mode",checked:K,onCheckedChange:V,disabled:n}),(0,t.jsx)(C.Label,{htmlFor:"fast-mode",className:"cursor-pointer text-sm font-medium",children:"Fast Mode"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]})]})]})]}),es&&void 0!==c?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(C.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,t.jsx)(O,{features:d,value:_,onChange:q,disabled:n})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:F.map(e=>(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:`approve-${e.id}`,size:"sm",checked:I[e.id]??!1,onCheckedChange:t=>B(r=>({...r,[e.id]:t})),disabled:n||K&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(C.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:K&&("allowPrd"===e.id||"allowPlan"===e.id)?"Skipped in Fast Mode":e.description})]},e.id))}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=F.every(e=>I[e.id]),t={};for(let r of F)t[r.id]=!e;B(t)},disabled:n,className:(0,x.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",F.every(e=>I[e.id])&&"text-primary"),children:"All"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider",children:"GIT"}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"push",size:"sm",checked:U||$,onCheckedChange:e=>{H(e),!e&&$&&G(!1)},disabled:n}),(0,t.jsx)(C.Label,{htmlFor:"push",className:"cursor-pointer text-xs font-medium",children:"Push"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Push branch to remote after implementation."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"open-pr",size:"sm",checked:$,onCheckedChange:G,disabled:n}),(0,t.jsx)(C.Label,{htmlFor:"open-pr",className:"cursor-pointer text-xs font-medium",children:"PR"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Open a pull request after pushing."})]})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(C.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:["ATTACHMENTS",z.length>0&&(0,t.jsxs)("span",{className:"text-muted-foreground/60 ml-1.5",children:["(",z.length,")"]})]}),(0,t.jsxs)(j.Button,{type:"button",variant:"outline",size:"xs",onClick:er,disabled:n,children:[(0,t.jsx)(i.default,{className:"size-3"}),"Add Files"]})]}),z.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:z.map(e=>(0,t.jsx)(D,{file:e,onRemove:()=>ea(e.path),disabled:n},e.path))})]})]})})})})}function O({features:e,value:a,onChange:s,disabled:o}){let[n,i]=(0,r.useState)(!1),[l,d]=(0,r.useState)(""),c=(0,r.useRef)(null),u=e.find(e=>e.id===a),p=l.trim()?e.filter(e=>e.name.toLowerCase().includes(l.toLowerCase())||e.id.toLowerCase().includes(l.toLowerCase())):e,h=(0,r.useCallback)(e=>{s(e),i(!1),d("")},[s]);return(0,r.useEffect)(()=>{n?setTimeout(()=>c.current?.focus(),0):d("")},[n]),(0,t.jsxs)(k.Popover,{open:n,onOpenChange:i,children:[(0,t.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":n,"aria-label":"Parent Feature",disabled:o,"data-testid":"parent-feature-combobox",className:(0,x.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!u&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:u?`${u.name} (${u.id.slice(0,8)})`:"Select parent feature..."}),(0,t.jsx)(f,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(k.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(w.Input,{ref:c,placeholder:"Search features...",value:l,onChange:e=>d(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===a,onClick:()=>h(void 0),className:(0,x.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===a&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(m.default,{className:(0,x.cn)("h-4 w-4 shrink-0",void 0!==a&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===p.length&&l?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):p.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.id,onClick:()=>h(e.id),className:(0,x.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(m.default,{className:(0,x.cn)("h-4 w-4 shrink-0",a!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}function D({file:e,onRemove:r,disabled:a}){var s,o,n;let i,l=(i=(s=e.name).lastIndexOf("."))>=0?s.slice(i).toLowerCase():"",f=(o=l,z.has(o)?u:".pdf"===o?c.default:L.has(o)?p.default:d),m=".pdf"===(n=l)?"bg-red-50 text-red-600":z.has(n)?"bg-blue-50 text-blue-600":L.has(n)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600";return(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border p-2",children:[(0,t.jsx)("div",{className:(0,x.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded",m),children:(0,t.jsx)(f,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(+(0!==t))} ${["B","KB","MB","GB"][t]}`}(e.size)})]}),(0,t.jsx)(j.Button,{type:"button",variant:"ghost",size:"icon-xs",onClick:r,disabled:a,"aria-label":`Remove ${e.name}`,children:(0,t.jsx)(h.default,{className:"h-3 w-3"})})]})}let z=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),L=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function I({repositoryPath:e,initialParentId:o,features:i,workflowDefaults:l,currentAgentType:d,currentModel:c}){let u=(0,a.useRouter)(),[p,h]=(0,r.useState)(!1),f=(0,a.usePathname)().startsWith("/create"),m=!p&&f;(0,r.useEffect)(()=>{!f&&p&&h(!1)},[f,p]);let x=(0,r.useCallback)(()=>{u.push("/")},[u]),g=(0,r.useCallback)(e=>{h(!0),u.push("/"),n(e).then(t=>{t.error?s.toast.error(t.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{s.toast.error("Failed to create feature"),h(!1)})},[u]);return(0,t.jsx)(M,{open:m,onClose:x,onSubmit:g,repositoryPath:e,features:i,workflowDefaults:l,initialParentId:o,isSubmitting:p,currentAgentType:d,currentModel:c})}e.s(["CreateDrawerClient",()=>I],15203)}]);
|