@ai-development-environment/server 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/package.json +1 -1
  2. package/standalone/.next/BUILD_ID +1 -1
  3. package/standalone/.next/build-manifest.json +3 -3
  4. package/standalone/.next/prerender-manifest.json +3 -3
  5. package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
  6. package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
  7. package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
  8. package/standalone/.next/server/app/[locale]/analytics-events/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
  10. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
  11. package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
  12. package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
  13. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  14. package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  16. package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/console-logs/page_client-reference-manifest.js +1 -1
  18. package/standalone/.next/server/app/[locale]/devices/[id]/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/devices/enroll/page_client-reference-manifest.js +1 -1
  20. package/standalone/.next/server/app/[locale]/devices/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
  22. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  24. package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
  25. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  26. package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
  28. package/standalone/.next/server/app/[locale]/provisioning-profiles/page_client-reference-manifest.js +1 -1
  29. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  30. package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
  31. package/standalone/.next/server/app/[locale]/push-notifications/page_client-reference-manifest.js +1 -1
  32. package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
  34. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  35. package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
  36. package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
  37. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  38. package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/unified-events/page_client-reference-manifest.js +1 -1
  40. package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  42. package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
  43. package/standalone/.next/server/app/_global-error.html +1 -1
  44. package/standalone/.next/server/app/_global-error.rsc +1 -1
  45. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  46. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  47. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  48. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  49. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  50. package/standalone/.next/server/app/_not-found.html +1 -1
  51. package/standalone/.next/server/app/_not-found.rsc +1 -1
  52. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  53. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  54. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  55. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  56. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  57. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  58. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v12ijp._.js +1 -1
  59. package/standalone/.next/server/chunks/ssr/_012q7w6._.js +1 -1
  60. package/standalone/.next/server/chunks/ssr/_07qmjrj._.js +1 -1
  61. package/standalone/.next/server/chunks/ssr/_0dquba3._.js +1 -1
  62. package/standalone/.next/server/chunks/ssr/_0t2jwg3._.js +1 -1
  63. package/standalone/.next/server/chunks/ssr/_1bzibio._.js +1 -1
  64. package/standalone/.next/server/chunks/ssr/_1h1k5ja._.js +1 -1
  65. package/standalone/.next/server/chunks/ssr/_1kle1nm._.js +1 -1
  66. package/standalone/.next/server/chunks/ssr/_1m50niy._.js +1 -1
  67. package/standalone/.next/server/chunks/ssr/_1pja493._.js +1 -1
  68. package/standalone/.next/server/chunks/ssr/_1y98hs-._.js +1 -1
  69. package/standalone/.next/server/chunks/ssr/_1z02bsk._.js +1 -1
  70. package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
  71. package/standalone/.next/server/chunks/ssr/src_components_build-data_build-data-page_tsx_1t2rrh0._.js +2 -2
  72. package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +1 -1
  73. package/standalone/.next/server/chunks/ssr/src_components_builds_coverage-report-page_tsx_1nhwba1._.js +1 -1
  74. package/standalone/.next/server/chunks/ssr/src_components_devices_device-detail-page_tsx_1mut_l4._.js +1 -1
  75. package/standalone/.next/server/chunks/ssr/src_components_devices_devices-page_tsx_1y45lv2._.js +1 -1
  76. package/standalone/.next/server/chunks/ssr/src_components_github_pull-request-detail-page_tsx_1etlamp._.js +1 -1
  77. package/standalone/.next/server/chunks/ssr/src_components_jira_cache-page_tsx_1znt1yl._.js +1 -1
  78. package/standalone/.next/server/chunks/ssr/src_components_jira_ticket-detail-page_tsx_0vmf8nk._.js +2 -2
  79. package/standalone/.next/server/chunks/ssr/src_components_jira_tickets-page_tsx_0_ocldp._.js +1 -1
  80. package/standalone/.next/server/chunks/ssr/src_components_push-notifications_push-notifications-page_tsx_1c_b-t4._.js +1 -1
  81. package/standalone/.next/server/chunks/ssr/src_components_signing-assets_provisioning-profiles-page_tsx_1zr20o7._.js +1 -1
  82. package/standalone/.next/server/chunks/ssr/src_components_skills_skill-sync-page_tsx_15sidhb._.js +1 -1
  83. package/standalone/.next/server/chunks/ssr/src_components_skills_skills-page_tsx_0o1nlbg._.js +1 -1
  84. package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +1 -1
  85. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  86. package/standalone/.next/server/pages/404.html +1 -1
  87. package/standalone/.next/server/pages/500.html +1 -1
  88. package/standalone/.next/server/server-reference-manifest.js +1 -1
  89. package/standalone/.next/server/server-reference-manifest.json +1 -1
  90. package/standalone/.next/static/chunks/{0rrwapb85e3vs.js → 0a8bo5bqge171.js} +1 -1
  91. package/standalone/.next/static/chunks/0bx-vj8k3jlsz.js +35 -0
  92. package/standalone/.next/static/chunks/{1z2n-kfxw0xxf.js → 0s_vkk_t0i4mg.js} +1 -1
  93. package/standalone/.next/static/chunks/12msdp4rhv6ti.js +7 -0
  94. package/standalone/.next/static/chunks/{1rvz2z_cov6ug.js → 15rske_fphtgw.js} +2 -2
  95. package/standalone/.next/static/chunks/19l74y4_uc81t.js +33 -0
  96. package/standalone/.next/static/chunks/{0elijgx6pfo7w.js → 1a5_4cpwnx9uu.js} +1 -1
  97. package/standalone/.next/static/chunks/1a9j-qydwrg8m.js +7 -0
  98. package/standalone/.next/static/chunks/1e-vykrs41myl.js +41 -0
  99. package/standalone/.next/static/chunks/1jwc4nasae27c.js +1 -0
  100. package/standalone/.next/static/chunks/1llwo8aslhpdp.js +1 -0
  101. package/standalone/.next/static/chunks/{2-k0gnjfr6ayw.js → 1nkkb5gu3-rhf.js} +1 -1
  102. package/standalone/.next/static/chunks/1oh9kzyxfy5ih.js +1 -0
  103. package/standalone/.next/static/chunks/1q87ulu5dp43f.js +1 -0
  104. package/standalone/.next/static/chunks/{2i8eu37_ggvr8.js → 1smbfkd1cb015.js} +10 -10
  105. package/standalone/.next/static/chunks/1ynnv9u7cfr4c.js +1 -0
  106. package/standalone/.next/static/chunks/1yx2no0f8qqs5.js +7 -0
  107. package/standalone/.next/static/chunks/{3kswwcsm5y95r.js → 1zw6r-idmbfgl.js} +1 -1
  108. package/standalone/.next/static/chunks/224rpxiffot1u.js +9 -0
  109. package/standalone/.next/static/chunks/24tqnzr1nzhom.js +1 -0
  110. package/standalone/.next/static/chunks/292r4qzwbnzg7.js +45 -0
  111. package/standalone/.next/static/chunks/{3zmi_6t6n2zhl.js → 29bdsmo8ketwt.js} +2 -2
  112. package/standalone/.next/static/chunks/{08n97leuqvfec.js → 29pirjk9q8gfx.js} +1 -1
  113. package/standalone/.next/static/chunks/{0gduhhe5i5fyj.js → 2bdfoatg4qo7w.js} +1 -1
  114. package/standalone/.next/static/chunks/{1mdi8gmbt3v4y.js → 2mzx47_wqfqf6.js} +1 -1
  115. package/standalone/.next/static/chunks/2rplo_7t3zrb9.js +1 -0
  116. package/standalone/.next/static/chunks/{0txd8z6bbq8sd.js → 2rv5r0dwu0nv6.js} +1 -1
  117. package/standalone/.next/static/chunks/2u51t_6-1w566.js +1 -0
  118. package/standalone/.next/static/chunks/{3fdxq7wzqx26o.js → 2xgehciyxxmdl.js} +1 -1
  119. package/standalone/.next/static/chunks/34pq01spesbci.js +1 -0
  120. package/standalone/.next/static/chunks/34pqiakzvfxgg.js +1 -0
  121. package/standalone/.next/static/chunks/{3g004cn7om3tw.js → 35hg231a8ig1t.js} +1 -1
  122. package/standalone/.next/static/chunks/36r84wnfwt4kn.css +1 -0
  123. package/standalone/.next/static/chunks/{11x96hq8bk827.js → 37dd1jthysw7j.js} +1 -1
  124. package/standalone/.next/static/chunks/{2cohukhgw3x39.js → 384f6qhpff4pn.js} +3 -3
  125. package/standalone/.next/static/chunks/3_xim7hqyyfr0.js +1 -0
  126. package/standalone/.next/static/chunks/3eumqpi7f1fek.js +30 -0
  127. package/standalone/.next/static/chunks/{1209uyjs06prv.js → 3hq055db_1oe4.js} +1 -1
  128. package/standalone/.next/static/chunks/3ns362pjxzs4s.js +3 -0
  129. package/standalone/.next/static/chunks/3ojl4tmmy52v4.js +29 -0
  130. package/standalone/.next/static/chunks/3sxc882-vifa-.js +10 -0
  131. package/standalone/.next/static/chunks/40k5mbsz_tzvi.js +1 -0
  132. package/standalone/.next/static/chunks/43pkxbd7uiq6-.js +33 -0
  133. package/standalone/.next/static/chunks/00vmfj3b0p_9v.js +0 -1
  134. package/standalone/.next/static/chunks/05qk7dn22ctyw.js +0 -33
  135. package/standalone/.next/static/chunks/08b5rziqjcmmv.js +0 -9
  136. package/standalone/.next/static/chunks/0hcrlyp4czqm4.js +0 -33
  137. package/standalone/.next/static/chunks/0kkylz4dfb-6-.css +0 -1
  138. package/standalone/.next/static/chunks/0ouxq2tjuuo5p.js +0 -1
  139. package/standalone/.next/static/chunks/0qslkhjg4g4wo.js +0 -1
  140. package/standalone/.next/static/chunks/0sgv58x3pi1lt.js +0 -1
  141. package/standalone/.next/static/chunks/1-uwntvgs-8hy.js +0 -7
  142. package/standalone/.next/static/chunks/175wjcrz57-r8.js +0 -3
  143. package/standalone/.next/static/chunks/1aymjnttvjkz8.js +0 -35
  144. package/standalone/.next/static/chunks/1p0jamt--jvn2.js +0 -1
  145. package/standalone/.next/static/chunks/1wm2l6ainzpua.js +0 -30
  146. package/standalone/.next/static/chunks/2aaudeflwvhrw.js +0 -1
  147. package/standalone/.next/static/chunks/2jj9hlwqhy5pr.js +0 -41
  148. package/standalone/.next/static/chunks/2ldet81o6fvx9.js +0 -7
  149. package/standalone/.next/static/chunks/2nnls3_0a15ot.js +0 -1
  150. package/standalone/.next/static/chunks/32ynps2o_ve-q.js +0 -10
  151. package/standalone/.next/static/chunks/3812zpxehpne1.js +0 -1
  152. package/standalone/.next/static/chunks/398-3q0cwr6rj.js +0 -29
  153. package/standalone/.next/static/chunks/3f0s63l_3ts3k.js +0 -1
  154. package/standalone/.next/static/chunks/3ognjxt-gne6-.js +0 -1
  155. package/standalone/.next/static/chunks/3q82abj2-3h1-.js +0 -1
  156. package/standalone/.next/static/chunks/3zux6x75u6-5-.js +0 -1
  157. package/standalone/.next/static/chunks/4260c5fq33ytz.js +0 -7
  158. package/standalone/.next/static/chunks/448r-ornlfrsf.js +0 -45
  159. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_buildManifest.js +0 -0
  160. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_clientMiddlewareManifest.js +0 -0
  161. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let n=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...a}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,o.cn)(n({variant:r}),e),...a})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,o.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:o="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":o,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...o})},"CardContent",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...o})},"CardDescription",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...o})},"CardFooter",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...o})},"CardHeader",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...o})},"CardTitle",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...o})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),o=e.i(758379),o=o;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(o.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,r,o=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function a(e){return"object"===n(e)}function i(e,t){return e.length<124?e:t}var l=((t=l||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),s=((r=s||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!a(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!a(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!a(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return a(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),o=await r.json();if(!r.ok||o.errors?.length||!o.data)throw Error(o.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return o.data}let g=null;function h(){return function(e,t,r){let o=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return o;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return o}catch{}return e}(o.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return g??=function(t){let r,o,n,a,{url:f,connectionParams:g,lazy:h=!0,onNonLazyError:m=console.error,lazyCloseTimeout:y=0,keepAlive:x=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:w=5,retryWait:j=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:k=p,on:C,webSocketImpl:E,generateID:S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:R,jsonMessageReviver:N}=t;if(E){var A;if(!("function"==typeof(A=E)&&"constructor"in A&&"CLOSED"in A&&"CLOSING"in A&&"CONNECTING"in A&&"OPEN"in A))throw Error("Invalid WebSocket implementation provided");r=E}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let D=r,T=(o={},n={on:(e,t)=>(o[e]=t,()=>{delete o[e]}),emit(e){"id"in e&&o[e.id]?.(e)}},a={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[n.emit,C.message]:[n.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:n.on,on(e,t){let r=a[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...a[e]])r(...t)}});function $(e){let t=[T.on("error",r=>{t.forEach(e=>e()),e(r)}),T.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let z,O=0,P,_=!1,I=0,M=!1;async function B(){clearTimeout(P);let[e,t]=await (z??(z=new Promise((e,t)=>(async()=>{let r,o;if(_){if(await j(I),!O)return z=void 0,t({code:1e3,reason:"All Subscriptions Gone"});I++}T.emit("connecting",_);let n=new D("function"==typeof f?await f():f,"graphql-transport-ws");function a(){isFinite(x)&&x>0&&(clearTimeout(o),o=setTimeout(()=>{n.readyState===D.OPEN&&(n.send(c({type:s.Ping})),T.emit("ping",!1,void 0))},x))}$(e=>{z=void 0,clearTimeout(r),clearTimeout(o),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>T.emit("error",e),n.onclose=e=>T.emit("closed",e),n.onopen=async()=>{try{T.emit("opened",n);let e="function"==typeof g?await g():g;if(n.readyState!==D.OPEN)return;n.send(c(e?{type:s.ConnectionInit,payload:e}:{type:s.ConnectionInit},R)),isFinite(b)&&b>0&&(r=setTimeout(()=>{n.close(l.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),a()}catch(e){T.emit("error",e),n.close(l.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let o=d("string"==typeof t?JSON.parse(t,N):t);if(T.emit("message",o),"ping"===o.type||"pong"===o.type){T.emit(o.type,!0,o.payload),"pong"===o.type?a():v||(n.send(c(o.payload?{type:s.Pong,payload:o.payload}:{type:s.Pong})),T.emit("pong",!1,o.payload));return}if(p)return;if(o.type!==s.ConnectionAck)throw Error(`First message cannot be of type ${o.type}`);clearTimeout(r),p=!0,T.emit("connected",n,o.payload,_),_=!1,I=0,e([n,new Promise((e,t)=>$(t))])}catch(e){n.onmessage=null,T.emit("error",e),n.close(l.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===D.CLOSING&&await t;let r=()=>{},o=new Promise(e=>r=e);return[e,r,Promise.race([o.then(()=>{O||(isFinite(y)&&y>0?P=setTimeout(()=>{e.readyState===D.OPEN&&e.close(1e3,"Normal Closure")},y):e.close(1e3,"Normal Closure"))}),t])]}function W(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[l.InternalServerError,l.InternalClientError,l.BadRequest,l.BadResponse,l.Unauthorized,l.SubprotocolNotAcceptable,l.SubscriberAlreadyExists,l.TooManyInitialisationRequests].includes(e.code)))throw e;if(M)return!1;if(p(e)&&1e3===e.code)return O>0;if(!w||I>=w||!k(e))throw e;return _=!0}function q(e,t){let r=S(e),o=!1,n=!1,a=()=>{O--,o=!0};return(async()=>{for(O++;;)try{let[i,l,d]=await B();if(o)return l();let u=T.onMessage(r,e=>{switch(e.type){case s.Next:return void t.next(e.payload);case s.Error:n=!0,o=!0,t.error(e.payload),a();return;case s.Complete:o=!0,a();return}});i.send(c({id:r,type:s.Subscribe,payload:e},R)),a=()=>{o||i.readyState!==D.OPEN||i.send(c({id:r,type:s.Complete},R)),O--,o=!0,l()},await d.finally(u);return}catch(e){if(!W(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{o||a()}}return h||(async()=>{for(O++;;)try{let[,,e]=await B();await e}catch(e){try{if(!W(e))return}catch(e){return m?.(e)}}})(),{on:T.on,subscribe:q,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},o=q(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return n.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),n.return=async()=>(o(),{done:!0,value:void 0}),n},async dispose(){if(M=!0,z){let[e]=await z;e.close(1e3,"Normal Closure")}},terminate(){z&&T.emit("closed",new u)}}}({url:h,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(709840),n=e.i(975157);let a=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:i=!1,...l}){let s=i?o.Slot.Root:"span";return(0,t.jsx)(s,{className:(0,n.cn)(a({variant:r}),e),"data-slot":"badge","data-variant":r,...l})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:o,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",o),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...o}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...o})},"TableCell",0,function({className:e,...o}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...o})},"TableFooter",0,function({className:e,...o}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...o})},"TableHead",0,function({className:e,...o}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...o})},"TableHeader",0,function({className:e,...o}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...o})},"TableRow",0,function({className:e,...o}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...o})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return r.useCallback(function(...e){return t=>{let r=!1,o=e.map(e=>{let o=n(e,t);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let t=0;t<o.length;t++){let r=o[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var i=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[s,d]=(0,o.createContextScope)(l,[i.createDialogScope]),c=(0,i.createDialogScope)(),u=e=>{let{__scopeAlertDialog:r,...o}=e,n=c(r);return(0,t.jsx)(i.Root,{...n,...o,modal:!0})};u.displayName=l;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:o,...n}=e,a=c(o);return(0,t.jsx)(i.Trigger,{...a,...n,ref:r})});p.displayName="AlertDialogTrigger";var f=e=>{let{__scopeAlertDialog:r,...o}=e,n=c(r);return(0,t.jsx)(i.Portal,{...n,...o})};f.displayName="AlertDialogPortal";var g=r.forwardRef((e,r)=>{let{__scopeAlertDialog:o,...n}=e,a=c(o);return(0,t.jsx)(i.Overlay,{...a,...n,ref:r})});g.displayName="AlertDialogOverlay";var h="AlertDialogContent",[m,y]=s(h),x=r.forwardRef((e,o)=>{let{__scopeAlertDialog:n,children:l,...s}=e,d=c(n),u=a(o,r.useRef(null)),p=r.useRef(null);return(0,t.jsx)(m,{scope:n,cancelRef:p,children:(0,t.jsx)(i.Content,{role:"alertdialog",...d,...s,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),!1===r||!o||!o.defaultPrevented)return t?.(o)}}(s.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});x.displayName=h;var v=r.forwardRef((e,r)=>{let{__scopeAlertDialog:o,...n}=e,a=c(o);return(0,t.jsx)(i.Title,{...a,...n,ref:r})});v.displayName="AlertDialogTitle";var b=r.forwardRef((e,r)=>{let{__scopeAlertDialog:o,...n}=e,a=c(o);return(0,t.jsx)(i.Description,{...a,...n,ref:r})});b.displayName="AlertDialogDescription";var w=r.forwardRef((e,r)=>{let{__scopeAlertDialog:o,...n}=e,a=c(o);return(0,t.jsx)(i.Close,{...a,...n,ref:r})});w.displayName="AlertDialogAction";var j="AlertDialogCancel",k=r.forwardRef((e,r)=>{let{__scopeAlertDialog:o,...n}=e,{cancelRef:l}=y(j,o),s=c(o),d=a(r,l);return(0,t.jsx)(i.Close,{...s,...n,ref:d})});k.displayName=j,e.s(["Action",0,w,"AlertDialog",0,u,"AlertDialogAction",0,w,"AlertDialogCancel",0,k,"AlertDialogContent",0,x,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,g,"AlertDialogPortal",0,f,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,p,"Cancel",0,k,"Content",0,x,"Description",0,b,"Overlay",0,g,"Portal",0,f,"Root",0,u,"Title",0,v,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var C=e.i(691162),C=C,E=e.i(975157),S=e.i(519455);function R({...e}){return(0,t.jsx)(C.Root,{"data-slot":"alert-dialog",...e})}function N({...e}){return(0,t.jsx)(C.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function A({...e}){return(0,t.jsx)(C.Portal,{"data-slot":"alert-dialog-portal",...e})}function D({className:e,...r}){return(0,t.jsx)(C.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,E.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...r})}function T({className:e,size:r="default",...o}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(D,{}),(0,t.jsx)(C.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,E.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})]})}function $({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,E.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function z({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,E.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function O({className:e,...r}){return(0,t.jsx)(C.Title,{"data-slot":"alert-dialog-title",className:(0,E.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function P({className:e,...r}){return(0,t.jsx)(C.Description,{"data-slot":"alert-dialog-description",className:(0,E.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})}function _({className:e,variant:r="default",size:o="default",...n}){return(0,t.jsx)(S.Button,{variant:r,size:o,asChild:!0,children:(0,t.jsx)(C.Action,{"data-slot":"alert-dialog-action",className:(0,E.cn)(e),...n})})}function I({className:e,variant:r="outline",size:o="default",...n}){return(0,t.jsx)(S.Button,{variant:r,size:o,asChild:!0,children:(0,t.jsx)(C.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,E.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:r,description:o,onConfirm:n,onOpenChange:a,open:i,title:l,trigger:s}){return(0,t.jsxs)(R,{onOpenChange:a,open:i,children:[s&&(0,t.jsx)(N,{asChild:!0,children:s}),(0,t.jsxs)(T,{children:[(0,t.jsxs)($,{children:[(0,t.jsx)(O,{children:l}),(0,t.jsx)(P,{children:o})]}),(0,t.jsxs)(z,{children:[(0,t.jsx)(I,{children:r}),(0,t.jsx)(_,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},59497,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=o(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():o(e[t],null)}}}}(...e),e)}var a=e.i(30030);function i(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),!1===r||!o||!o.defaultPrevented)return t?.(o)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var s=r[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),f=Symbol.for("react.lazy");function g(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===f&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var h=r[" use ".trim().toString()],m=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,o)=>{var a;let i,l=(a=`Primitive.${o}`,(i=r.forwardRef((e,t)=>{var o;let i,l,{children:s,...d}=e,c=null,u=!1,f=[];g(s)&&"function"==typeof h&&(s=h(s._payload)),r.Children.forEach(s,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;g(t)&&"function"==typeof h&&(t=h(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),f.push(c?.props?.children)}else f.push(e)}),c?c=r.cloneElement(c,void 0,f):!u&&1===r.Children.count(s)&&r.isValidElement(s)&&(c=s);let m=c?(o=c,(l=(i=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning)?o.ref:(l=(i=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning)?o.props.ref:o.props.ref||o.ref):void 0,y=n(t,m);if(!c){if(s||0===s){let e,t;throw Error(u?(e=a,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=a,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return s}let x=function(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...e)=>{let t=a(...e);return n(...e),t}:n&&(r[o]=n):"style"===o?r[o]={...n,...a}:"className"===o&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}(d,c.props??{});return c.type!==r.Fragment&&(x.ref=t?y:m),r.cloneElement(c,x)})).displayName=`${a}.Slot`,i),s=r.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?l:o,{...a,ref:r})});return s.displayName=`Primitive.${o}`,{...e,[o]:s}},{}),y="Checkbox",[x,v]=(0,a.createContextScope)(y),[b,w]=x(y);function j(e){let{__scopeCheckbox:o,checked:n,children:a,defaultChecked:i,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:f="on",internal_do_not_use_render:g}=e,[h,m]=function({prop:e,defaultProp:t,onChange:o=()=>{},caller:n}){let[a,i,l]=function({defaultProp:e,onChange:t}){let[o,n]=r.useState(e),a=r.useRef(o),i=r.useRef(t);return s(()=>{i.current=t},[t]),r.useEffect(()=>{a.current!==o&&(i.current?.(o),a.current=o)},[o,a]),[o,n,i]}({defaultProp:t,onChange:o}),d=void 0!==e,c=d?e:a;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,n])}return[c,r.useCallback(t=>{if(d){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else i(t)},[d,e,i,l])]}({prop:n,defaultProp:i??!1,onChange:u,caller:y}),[x,v]=r.useState(null),[w,j]=r.useState(null),k=r.useRef(!1),C=!x||!!d||!!x.closest("form"),E={checked:h,disabled:l,setChecked:m,control:x,setControl:v,name:c,form:d,value:f,hasConsumerStoppedPropagationRef:k,required:p,defaultChecked:!D(i)&&i,isFormControl:C,bubbleInput:w,setBubbleInput:j};return(0,t.jsx)(b,{scope:o,...E,children:"function"==typeof g?g(E):a})}var k="CheckboxTrigger",C=r.forwardRef(({__scopeCheckbox:e,onKeyDown:o,onClick:a,...l},s)=>{let{control:d,value:c,disabled:u,checked:p,required:f,setControl:g,setChecked:h,hasConsumerStoppedPropagationRef:y,isFormControl:x,bubbleInput:v}=w(k,e),b=n(s,g),j=r.useRef(p);return r.useEffect(()=>{let e=d?.form;if(e){let t=()=>h(j.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,h]),(0,t.jsx)(m.button,{type:"button",role:"checkbox","aria-checked":D(p)?"mixed":p,"aria-required":f,"data-state":T(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:b,onKeyDown:i(o,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:i(a,e=>{h(e=>!!D(e)||!e),v&&x&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})});C.displayName=k;var E=r.forwardRef((e,r)=>{let{__scopeCheckbox:o,name:n,checked:a,defaultChecked:i,required:l,disabled:s,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(j,{__scopeCheckbox:o,checked:a,defaultChecked:i,disabled:s,required:l,onCheckedChange:c,name:n,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{...p,ref:r,__scopeCheckbox:o}),e&&(0,t.jsx)(A,{__scopeCheckbox:o})]})})});E.displayName=y;var S="CheckboxIndicator",R=r.forwardRef((e,r)=>{let{__scopeCheckbox:o,forceMount:n,...a}=e,i=w(S,o);return(0,t.jsx)(u.Presence,{present:n||D(i.checked)||!0===i.checked,children:(0,t.jsx)(m.span,{"data-state":T(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})});R.displayName=S;var N="CheckboxBubbleInput",A=r.forwardRef(({__scopeCheckbox:e,...o},a)=>{let{control:i,hasConsumerStoppedPropagationRef:l,checked:s,defaultChecked:u,required:p,disabled:f,name:g,value:h,form:y,bubbleInput:x,setBubbleInput:v}=w(N,e),b=n(a,v),j=(0,d.usePrevious)(s),k=(0,c.useSize)(i);r.useEffect(()=>{if(!x)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(j!==s&&e){let r=new Event("click",{bubbles:t});x.indeterminate=D(s),e.call(x,!D(s)&&s),x.dispatchEvent(r)}},[x,j,s,l]);let C=r.useRef(!D(s)&&s);return(0,t.jsx)(m.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??C.current,required:p,disabled:f,name:g,value:h,form:y,...o,tabIndex:-1,ref:b,style:{...o.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function D(e){return"indeterminate"===e}function T(e){return D(e)?"indeterminate":e?"checked":"unchecked"}A.displayName=N,e.s(["Checkbox",0,E,"CheckboxIndicator",0,R,"Indicator",0,R,"Root",0,E,"createCheckboxScope",0,v,"unstable_BubbleInput",0,A,"unstable_CheckboxBubbleInput",0,A,"unstable_CheckboxProvider",0,j,"unstable_CheckboxTrigger",0,C,"unstable_Provider",0,j,"unstable_Trigger",0,C],388474);var $=e.i(388474),$=$,z=e.i(975157),O=e.i(593698);e.s(["Checkbox",0,function({className:e,...r}){return(0,t.jsx)($.Root,{"data-slot":"checkbox",className:(0,z.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...r,children:(0,t.jsx)($.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(O.CheckIcon,{})})})}],59497)},630299,e=>{"use strict";let t=(0,e.i(456420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t])},856522,e=>{"use strict";let t=(0,e.i(456420).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],856522)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var n=Symbol.for("radix.slottable"),a=Symbol.for("react.lazy");function i(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var l=r[" use ".trim().toString()],s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,a)=>{var s;let d,c=(s=`Primitive.${a}`,(d=r.forwardRef((e,t)=>{var a;let d,c,{children:u,...p}=e,f=null,g=!1,h=[];i(u)&&"function"==typeof l&&(u=l(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===n){g=!0;let t="child"in e.props?e.props.child:e.props.children;i(t)&&"function"==typeof l&&(t=l(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),h.push(f?.props?.children)}else h.push(e)}),f?f=r.cloneElement(f,void 0,h):!g&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let m=f?(a=f,(c=(d=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?a.ref:(c=(d=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,y=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=o(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():o(e[t],null)}}}}(...e),e)}(t,m);if(!f){if(u||0===u){let e,t;throw Error(g?(e=s,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=s,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let x=function(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...e)=>{let t=a(...e);return n(...e),t}:n&&(r[o]=n):"style"===o?r[o]={...n,...a}:"className"===o&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(x.ref=t?y:m),r.cloneElement(f,x)})).displayName=`${s}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:o,...n}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(o?c:a,{...n,ref:r})});return u.displayName=`Primitive.${a}`,{...e,[a]:u}},{}),d=r.forwardRef((e,r)=>(0,t.jsx)(s.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));d.displayName="Label",e.s(["Label",0,d,"Root",0,d],973741);var c=e.i(973741),c=c,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(c.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=o(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():o(e[t],null)}}}}(...e),e)}function a(e){let r=t.forwardRef((r,o)=>{var a;let s,f,{children:g,...h}=r,m=null,y=!1,x=[];d(g)&&"function"==typeof p&&(g=p(g._payload)),t.Children.forEach(g,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===i){y=!0;let t="child"in e.props?e.props.child:e.props.children;d(t)&&"function"==typeof p&&(t=p(t._payload)),m=l(e,t),x.push(m?.props?.children)}else x.push(e)}),m?m=t.cloneElement(m,void 0,x):!y&&1===t.Children.count(g)&&t.isValidElement(g)&&(m=g);let v=m?(a=m,(f=(s=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?a.ref:(f=(s=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,b=n(o,v);if(!m){if(g||0===g)throw Error(y?u(e):c(e));return g}let w=function(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...e)=>{let t=a(...e);return n(...e),t}:n&&(r[o]=n):"style"===o?r[o]={...n,...a}:"className"===o&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}(h,m.props??{});return m.type!==t.Fragment&&(w.ref=o?b:v),t.cloneElement(m,w)});return r.displayName=`${e}.Slot`,r}var i=Symbol.for("radix.slottable"),l=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},s=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var c=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),g=new WeakMap;function h(e,t){var r,o;let n,a,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,o=t,n=r.length,(i=(a=m(o))>=0?a:n+a)<0||i>=n?-1:i);return -1===l?void 0:e[l]}function m(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],g.set(this,!0)}set(e,t){return g.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 o,n=this.has(t),a=this.#e.length,i=m(e),l=i>=0?i:a+i,s=l<0||l>=a?-1:l;if(s===this.size||n&&s===this.size-1||-1===s)return this.set(t,r),this;let d=this.size+ +!n;i<0&&l++;let c=[...this.#e],u=!1;for(let e=l;e<d;e++)if(l===e){let a=c[e];c[e]===t&&(a=c[e+1]),n&&this.delete(t),o=this.get(a),this.set(t,r)}else{u||c[e-1]!==t||(u=!0);let r=c[u?e:e-1],n=o;o=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,o){let n=new e(this);return n.insert(t,r,o),n}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let o=this.#e.indexOf(e);return -1===o?this:this.insert(o,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 o=this.#e.indexOf(e);return -1===o?this:this.insert(o+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=h(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=h(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return h(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let o=r+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.at(o)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let o=r+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(e,t){let r=0;for(let o of this){if(Reflect.apply(e,t,[o,r,this]))return o;r++}}findIndex(e,t){let r=0;for(let o of this){if(Reflect.apply(e,t,[o,r,this]))return r;r++}return -1}filter(t,r){let o=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&o.push(e),n++;return new e(o)}map(t,r){let o=[],n=0;for(let e of this)o.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(o)}reduce(...e){let[t,r]=e,o=0,n=r??this.at(0);for(let r of this)n=0===o&&1===e.length?r:Reflect.apply(t,this,[n,r,o,this]),o++;return n}reduceRight(...e){let[t,r]=e,o=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let n=this.at(r);o=r===this.size-1&&1===e.length?n:Reflect.apply(t,this,[o,n,r,this])}return o}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),o=this.get(r);t.set(r,o)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let o=new e,n=this.size-1;if(void 0===t)return o;t<0&&(t+=this.size),void 0!==r&&r>0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);o.set(t,r)}return o}every(e,t){let r=0;for(let o of this){if(!Reflect.apply(e,t,[o,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let o of this){if(Reflect.apply(e,t,[o,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let o=e+"CollectionProvider",[i,l]=(0,r.createContextScope)(o),[s,d]=i(o,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:o}=e,n=t.useRef(null),a=t.useRef(new Map).current;return(0,f.jsx)(s,{scope:r,itemMap:a,collectionRef:n,children:o})};c.displayName=o;let u=e+"CollectionSlot",p=a(u),g=t.forwardRef((e,t)=>{let{scope:r,children:o}=e,a=n(t,d(u,r).collectionRef);return(0,f.jsx)(p,{ref:a,children:o})});g.displayName=u;let h=e+"CollectionItemSlot",m="data-radix-collection-item",y=a(h),x=t.forwardRef((e,r)=>{let{scope:o,children:a,...i}=e,l=t.useRef(null),s=n(r,l),c=d(h,o);return t.useEffect(()=>(c.itemMap.set(l,{ref:l,...i}),()=>void c.itemMap.delete(l))),(0,f.jsx)(y,{...{[m]:""},ref:s,children:a})});return x.displayName=h,[{Provider:c,Slot:g,ItemSlot:x},function(r){let o=d(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=o.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(o.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[o.collectionRef,o.itemMap])},l]}],75830);var y=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(y);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),o=e.i(964053),n=e.i(519455),a=e.i(975157);function i({...e}){return(0,t.jsx)(o.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...r}){return(0,t.jsx)(o.Dialog.Overlay,{className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(o.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:s,showCloseButton:d=!0,...c}){return(0,t.jsxs)(i,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(o.Dialog.Content,{className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[s,d&&(0,t.jsx)(o.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(n.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(o.Dialog.Description,{className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:i,...l}){return(0,t.jsxs)("div",{className:(0,a.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...l,children:[i,r&&(0,t.jsx)(o.Dialog.Close,{asChild:!0,children:(0,t.jsx)(n.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(o.Dialog.Title,{className:(0,a.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(o.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Textarea",0,function({className:e,...o}){return(0,t.jsx)("textarea",{className:(0,r.cn)("min-h-24 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",e),...o})}])},730274,e=>{"use strict";let t=(0,e.i(456420).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",0,t],730274)},994004,e=>{"use strict";let t=(0,e.i(456420).default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,t],994004)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var o=Symbol.for("radix.slottable"),i=Symbol.for("react.lazy");function a(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var s=r[" use ".trim().toString()],l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{var l;let c,d=(l=`Primitive.${i}`,(c=r.forwardRef((e,t)=>{var i;let c,d,{children:u,...p}=e,f=null,y=!1,h=[];a(u)&&"function"==typeof s&&(u=s(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===o){y=!0;let t="child"in e.props?e.props.child:e.props.children;a(t)&&"function"==typeof s&&(t=s(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),h.push(f?.props?.children)}else h.push(e)}),f?f=r.cloneElement(f,void 0,h):!y&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let g=f?(i=f,(d=(c=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in c&&c.isReactWarning)?i.ref:(d=(c=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in c&&c.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,m=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,o=e.map(e=>{let o=n(e,t);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let t=0;t<o.length;t++){let r=o[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}(t,g);if(!f){if(u||0===u){let e,t;throw Error(y?(e=l,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=l,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let b=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(b.ref=t?m:g),r.cloneElement(f,b)})).displayName=`${l}.Slot`,c),u=r.forwardRef((e,r)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?d:i,{...o,ref:r})});return u.displayName=`Primitive.${i}`,{...e,[i]:u}},{}),c=r.forwardRef((e,r)=>(0,t.jsx)(l.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));c.displayName="Label",e.s(["Label",0,c,"Root",0,c],973741);var d=e.i(973741),d=d,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(d.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let o=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(o({variant:r}),e),...i})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...o}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...o}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...o})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function o(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===o(e)}function a(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function c(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${o(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${o(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${o(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${o(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${o(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==o(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${o(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${o(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${o(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let y=null;function h(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return y??=function(t){let r,n,o,i,{url:f,connectionParams:y,lazy:h=!0,onNonLazyError:g=console.error,lazyCloseTimeout:m=0,keepAlive:b=0,disablePong:v,connectionAckWaitTimeout:x=0,retryAttempts:w=5,retryWait:E=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:k=p,on:S,webSocketImpl:C,generateID:R=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:$,jsonMessageReviver:N}=t;if(C){var j;if(!("function"==typeof(j=C)&&"constructor"in j&&"CLOSED"in j&&"CLOSING"in j&&"CONNECTING"in j&&"OPEN"in j))throw Error("Invalid WebSocket implementation provided");r=C}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let A=r,O=(n={},o={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},i={connecting:S?.connecting?[S.connecting]:[],opened:S?.opened?[S.opened]:[],connected:S?.connected?[S.connected]:[],ping:S?.ping?[S.ping]:[],pong:S?.pong?[S.pong]:[],message:S?.message?[o.emit,S.message]:[o.emit],closed:S?.closed?[S.closed]:[],error:S?.error?[S.error]:[]},{onMessage:o.on,on(e,t){let r=i[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...i[e]])r(...t)}});function P(e){let t=[O.on("error",r=>{t.forEach(e=>e()),e(r)}),O.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let T,z=0,I,_=!1,M=0,q=!1;async function W(){clearTimeout(I);let[e,t]=await (T??(T=new Promise((e,t)=>(async()=>{let r,n;if(_){if(await E(M),!z)return T=void 0,t({code:1e3,reason:"All Subscriptions Gone"});M++}O.emit("connecting",_);let o=new A("function"==typeof f?await f():f,"graphql-transport-ws");function i(){isFinite(b)&&b>0&&(clearTimeout(n),n=setTimeout(()=>{o.readyState===A.OPEN&&(o.send(d({type:l.Ping})),O.emit("ping",!1,void 0))},b))}P(e=>{T=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(o.close(4499,"Terminated"),o.onerror=null,o.onclose=null)}),o.onerror=e=>O.emit("error",e),o.onclose=e=>O.emit("closed",e),o.onopen=async()=>{try{O.emit("opened",o);let e="function"==typeof y?await y():y;if(o.readyState!==A.OPEN)return;o.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},$)),isFinite(x)&&x>0&&(r=setTimeout(()=>{o.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},x)),i()}catch(e){O.emit("error",e),o.close(s.InternalClientError,a(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;o.onmessage=({data:t})=>{try{let n=c("string"==typeof t?JSON.parse(t,N):t);if(O.emit("message",n),"ping"===n.type||"pong"===n.type){O.emit(n.type,!0,n.payload),"pong"===n.type?i():v||(o.send(d(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),O.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,O.emit("connected",o,n.payload,_),_=!1,M=0,e([o,new Promise((e,t)=>P(t))])}catch(e){o.onmessage=null,O.emit("error",e),o.close(s.BadResponse,a(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===A.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{z||(isFinite(m)&&m>0?I=setTimeout(()=>{e.readyState===A.OPEN&&e.close(1e3,"Normal Closure")},m):e.close(1e3,"Normal Closure"))}),t])]}function B(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(q)return!1;if(p(e)&&1e3===e.code)return z>0;if(!w||M>=w||!k(e))throw e;return _=!0}function D(e,t){let r=R(e),n=!1,o=!1,i=()=>{z--,n=!0};return(async()=>{for(z++;;)try{let[a,s,c]=await W();if(n)return s();let u=O.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:o=!0,n=!0,t.error(e.payload),i();return;case l.Complete:n=!0,i();return}});a.send(d({id:r,type:l.Subscribe,payload:e},$)),i=()=>{n||a.readyState!==A.OPEN||a.send(d({id:r,type:l.Complete},$)),z--,n=!0,s()},await c.finally(u);return}catch(e){if(!B(e))return}})().then(()=>{o||t.complete()}).catch(e=>{t.error(e)}),()=>{n||i()}}return h||(async()=>{for(z++;;)try{let[,,e]=await W();await e}catch(e){try{if(!B(e))return}catch(e){return g?.(e)}}})(),{on:O.on,subscribe:D,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=D(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),o=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return o.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),o.return=async()=>(n(),{done:!0,value:void 0}),o},async dispose(){if(q=!0,T){let[e]=await T;e.close(1e3,"Normal Closure")}},terminate(){T&&O.emit("closed",new u)}}}({url:h,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),o=e.i(975157);let i=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:a=!1,...s}){let l=a?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,o.cn)(i({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function o(...e){return t.useCallback(function(...e){return t=>{let r=!1,o=e.map(e=>{let o=n(e,t);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let t=0;t<o.length;t++){let r=o[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function i(e){let r=t.forwardRef((r,n)=>{var i;let l,f,{children:y,...h}=r,g=null,m=!1,b=[];c(y)&&"function"==typeof p&&(y=p(y._payload)),t.Children.forEach(y,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===a){m=!0;let t="child"in e.props?e.props.child:e.props.children;c(t)&&"function"==typeof p&&(t=p(t._payload)),g=s(e,t),b.push(g?.props?.children)}else b.push(e)}),g?g=t.cloneElement(g,void 0,b):!m&&1===t.Children.count(y)&&t.isValidElement(y)&&(g=y);let v=g?(i=g,(f=(l=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.ref:(f=(l=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,x=o(n,v);if(!g){if(y||0===y)throw Error(m?u(e):d(e));return y}let w=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(h,g.props??{});return g.type!==t.Fragment&&(w.ref=n?x:v),t.cloneElement(g,w)});return r.displayName=`${e}.Slot`,r}var a=Symbol.for("radix.slottable"),s=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},l=Symbol.for("react.lazy");function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===l&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),y=new WeakMap;function h(e,t){var r,n;let o,i,a;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,o=r.length,(a=(i=g(n))>=0?i:o+i)<0||a>=o?-1:a);return -1===s?void 0:e[s]}function g(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],y.set(this,!0)}set(e,t){return y.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 n,o=this.has(t),i=this.#e.length,a=g(e),s=a>=0?a:i+a,l=s<0||s>=i?-1:s;if(l===this.size||o&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!o;a<0&&s++;let d=[...this.#e],u=!1;for(let e=s;e<c;e++)if(s===e){let i=d[e];d[e]===t&&(i=d[e+1]),o&&this.delete(t),n=this.get(i),this.set(t,r)}else{u||d[e-1]!==t||(u=!0);let r=d[u?e:e-1],o=n;n=this.get(r),this.delete(r),this.set(r,o)}return this}with(t,r,n){let o=new e(this);return o.insert(t,r,n),o}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,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 n=this.#e.indexOf(e);return -1===n?this:this.insert(n+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=h(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=h(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return h(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],o=0;for(let e of this)Reflect.apply(t,r,[e,o,this])&&n.push(e),o++;return new e(n)}map(t,r){let n=[],o=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,o,this])]),o++;return new e(n)}reduce(...e){let[t,r]=e,n=0,o=r??this.at(0);for(let r of this)o=0===n&&1===e.length?r:Reflect.apply(t,this,[o,r,n,this]),n++;return o}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let o=this.at(r);n=r===this.size-1&&1===e.length?o:Reflect.apply(t,this,[n,o,r,this])}return n}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),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,o=this.size-1;if(void 0===t)return n;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);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[a,s]=(0,r.createContextScope)(n),[l,c]=a(n,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,o=t.useRef(null),i=t.useRef(new Map).current;return(0,f.jsx)(l,{scope:r,itemMap:i,collectionRef:o,children:n})};d.displayName=n;let u=e+"CollectionSlot",p=i(u),y=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=o(t,c(u,r).collectionRef);return(0,f.jsx)(p,{ref:i,children:n})});y.displayName=u;let h=e+"CollectionItemSlot",g="data-radix-collection-item",m=i(h),b=t.forwardRef((e,r)=>{let{scope:n,children:i,...a}=e,s=t.useRef(null),l=o(r,s),d=c(h,n);return t.useEffect(()=>(d.itemMap.set(s,{ref:s,...a}),()=>void d.itemMap.delete(s))),(0,f.jsx)(m,{...{[g]:""},ref:l,children:i})});return b.displayName=h,[{Provider:d,Slot:y,ItemSlot:b},function(r){let n=c(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}],75830);var m=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(m);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])}]);
@@ -1,28 +1,28 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var o="AlertDialog",[l,c]=(0,r.createContextScope)(o,[s.createDialogScope]),d=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Root,{...n,...r,modal:!0})};u.displayName=o;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Trigger,{...i,...n,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Portal,{...n,...r})};h.displayName="AlertDialogPortal";var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Overlay,{...i,...n,ref:a})});m.displayName="AlertDialogOverlay";var f="AlertDialogContent",[x,g]=l(f),y=a.forwardRef((e,r)=>{let{__scopeAlertDialog:n,children:o,...l}=e,c=d(n),u=i(r,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(x,{scope:n,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...c,...l,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),!1===a||!r||!r.defaultPrevented)return t?.(r)}}(l.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})});y.displayName=f;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Title,{...i,...n,ref:a})});b.displayName="AlertDialogTitle";var v=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Description,{...i,...n,ref:a})});v.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Close,{...i,...n,ref:a})});j.displayName="AlertDialogAction";var C="AlertDialogCancel",w=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=g(C,r),l=d(r),c=i(a,o);return(0,t.jsx)(s.Close,{...l,...n,ref:c})});w.displayName=C,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,w,"AlertDialogContent",0,y,"AlertDialogDescription",0,v,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,w,"Content",0,y,"Description",0,v,"Overlay",0,m,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,c],691162);var E=e.i(691162),E=E,N=e.i(975157),S=e.i(519455);function D({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(E.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function A({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,...a}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function k({className:e,size:a="default",...r}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function B({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function _({className:e,...a}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function $({className:e,...a}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function R({className:e,variant:a="default",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...n})})}function L({className:e,variant:a="outline",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:n,onOpenChange:i,open:s,title:o,trigger:l}){return(0,t.jsxs)(D,{onOpenChange:i,open:s,children:[l&&(0,t.jsx)(T,{asChild:!0,children:l}),(0,t.jsxs)(k,{children:[(0,t.jsxs)(B,{children:[(0,t.jsx)(_,{children:o}),(0,t.jsx)($,{children:r})]}),(0,t.jsxs)(O,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(R,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["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"}]]);e.s(["Copy",0,t],508734)},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},929592,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:a,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,r.cn)(n({variant:a}),e),...i})},"AlertDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,r.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...a})}])},515288,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Card",0,function({className:e,size:r="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"CardFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),a=e.i(975157),r=e.i(758379),r=r;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(r.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,a.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,a,r=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===n(e)}function s(e,t){return e.length<124?e:t}var o=((t=o||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((a=l||{}).ConnectionInit="connection_init",a.ConnectionAck="connection_ack",a.Ping="ping",a.Pong="pong",a.Subscribe="subscribe",a.Next="next",a.Error="error",a.Complete="complete",a);function c(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function h(e,t){let a=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),r=await a.json();if(!a.ok||r.errors?.length||!r.data)throw Error(r.errors?.map(e=>e.message).join("; ")||`HTTP ${a.status}`);return r.data}let m=null;function f(){return function(e,t,a){let r=`${"https:"===t?"wss":"ws"}://${a}/graphql`;if(!e)return r;try{let a=new URL(e);if("https:"===t&&"wss:"!==a.protocol)return r}catch{}return e}(r.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,h,"controlPlaneSubscriptions",0,function(){return m??=function(t){let a,r,n,i,{url:h,connectionParams:m,lazy:f=!0,onNonLazyError:x=console.error,lazyCloseTimeout:g=0,keepAlive:y=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:j=5,retryWait:C=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:w=p,on:E,webSocketImpl:N,generateID:S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:D,jsonMessageReviver:T}=t;if(N){var A;if(!("function"==typeof(A=N)&&"constructor"in A&&"CLOSED"in A&&"CLOSING"in A&&"CONNECTING"in A&&"OPEN"in A))throw Error("Invalid WebSocket implementation provided");a=N}else a="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!a)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let I=a,k=(r={},n={on:(e,t)=>(r[e]=t,()=>{delete r[e]}),emit(e){"id"in e&&r[e.id]?.(e)}},i={connecting:E?.connecting?[E.connecting]:[],opened:E?.opened?[E.opened]:[],connected:E?.connected?[E.connected]:[],ping:E?.ping?[E.ping]:[],pong:E?.pong?[E.pong]:[],message:E?.message?[n.emit,E.message]:[n.emit],closed:E?.closed?[E.closed]:[],error:E?.error?[E.error]:[]},{onMessage:n.on,on(e,t){let a=i[e];return a.push(t),()=>{a.splice(a.indexOf(t),1)}},emit(e,...t){for(let a of[...i[e]])a(...t)}});function B(e){let t=[k.on("error",a=>{t.forEach(e=>e()),e(a)}),k.on("closed",a=>{t.forEach(e=>e()),e(a)})]}let O,_=0,$,R=!1,L=0,P=!1;async function z(){clearTimeout($);let[e,t]=await (O??(O=new Promise((e,t)=>(async()=>{let a,r;if(R){if(await C(L),!_)return O=void 0,t({code:1e3,reason:"All Subscriptions Gone"});L++}k.emit("connecting",R);let n=new I("function"==typeof h?await h():h,"graphql-transport-ws");function i(){isFinite(y)&&y>0&&(clearTimeout(r),r=setTimeout(()=>{n.readyState===I.OPEN&&(n.send(d({type:l.Ping})),k.emit("ping",!1,void 0))},y))}B(e=>{O=void 0,clearTimeout(a),clearTimeout(r),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>k.emit("error",e),n.onclose=e=>k.emit("closed",e),n.onopen=async()=>{try{k.emit("opened",n);let e="function"==typeof m?await m():m;if(n.readyState!==I.OPEN)return;n.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},D)),isFinite(v)&&v>0&&(a=setTimeout(()=>{n.close(o.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),i()}catch(e){k.emit("error",e),n.close(o.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let r=c("string"==typeof t?JSON.parse(t,T):t);if(k.emit("message",r),"ping"===r.type||"pong"===r.type){k.emit(r.type,!0,r.payload),"pong"===r.type?i():b||(n.send(d(r.payload?{type:l.Pong,payload:r.payload}:{type:l.Pong})),k.emit("pong",!1,r.payload));return}if(p)return;if(r.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${r.type}`);clearTimeout(a),p=!0,k.emit("connected",n,r.payload,R),R=!1,L=0,e([n,new Promise((e,t)=>B(t))])}catch(e){n.onmessage=null,k.emit("error",e),n.close(o.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===I.CLOSING&&await t;let a=()=>{},r=new Promise(e=>a=e);return[e,a,Promise.race([r.then(()=>{_||(isFinite(g)&&g>0?$=setTimeout(()=>{e.readyState===I.OPEN&&e.close(1e3,"Normal Closure")},g):e.close(1e3,"Normal Closure"))}),t])]}function M(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[o.InternalServerError,o.InternalClientError,o.BadRequest,o.BadResponse,o.Unauthorized,o.SubprotocolNotAcceptable,o.SubscriberAlreadyExists,o.TooManyInitialisationRequests].includes(e.code)))throw e;if(P)return!1;if(p(e)&&1e3===e.code)return _>0;if(!j||L>=j||!w(e))throw e;return R=!0}function F(e,t){let a=S(e),r=!1,n=!1,i=()=>{_--,r=!0};return(async()=>{for(_++;;)try{let[s,o,c]=await z();if(r)return o();let u=k.onMessage(a,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:n=!0,r=!0,t.error(e.payload),i();return;case l.Complete:r=!0,i();return}});s.send(d({id:a,type:l.Subscribe,payload:e},D)),i=()=>{r||s.readyState!==I.OPEN||s.send(d({id:a,type:l.Complete},D)),_--,r=!0,o()},await c.finally(u);return}catch(e){if(!M(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{r||i()}}return f||(async()=>{for(_++;;)try{let[,,e]=await z();await e}catch(e){try{if(!M(e))return}catch(e){return x?.(e)}}})(),{on:k.on,subscribe:F,iterate(e){let t=[],a={done:!1,error:null,resolve:()=>{}},r=F(e,{next(e){t.push(e),a.resolve()},error(e){a.done=!0,a.error=e,a.resolve()},complete(){a.done=!0,a.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>a.resolve=e);t.length;)yield t.shift();if(a.error)throw a.error;if(a.done)return}}();return n.throw=async e=>(a.done||(a.done=!0,a.error=e,a.resolve()),{done:!0,value:void 0}),n.return=async()=>(r(),{done:!0,value:void 0}),n},async dispose(){if(P=!0,O){let[e]=await O;e.close(1e3,"Normal Closure")}},terminate(){O&&k.emit("closed",new u)}}}({url:f,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(709840),n=e.i(975157);let i=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",asChild:s=!1,...o}){let l=s?r.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,n.cn)(i({variant:a}),e),"data-slot":"badge","data-variant":a,...o})}])},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},784774,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:r,...n}){return(0,t.jsx)("div",{className:(0,a.cn)("w-full overflow-x-auto",r),children:(0,t.jsx)("table",{className:(0,a.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{className:(0,a.cn)("divide-y",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{className:(0,a.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...r})},"TableFooter",0,function({className:e,...r}){return(0,t.jsx)("tfoot",{className:(0,a.cn)("border-t bg-muted/50 font-medium",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{className:(0,a.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{className:(0,a.cn)("border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{className:(0,a.cn)("transition-colors hover:bg-muted/40",e),...r})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(n({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},899101,e=>{"use strict";var t=e.i(843476),a=e.i(421645);let r=(0,e.i(456420).default)("archive-restore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);var n=e.i(711241),i=e.i(689664),s=e.i(716327),o=e.i(144716),o=o,l=e.i(508734),c=e.i(762368),d=e.i(269846),u=e.i(741120),p=e.i(250832),h=e.i(573474),m=e.i(861745),f=e.i(948148),x=e.i(271645),g=e.i(778434),y=e.i(340953),b=e.i(929592),v=e.i(487486),j=e.i(519455),C=e.i(515288),w=e.i(82612),E=e.i(987968),N=e.i(784774),S=e.i(677572),D=e.i(520133),T=e.i(462777),A=e.i(637611);let I=`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var o="AlertDialog",[l,c]=(0,r.createContextScope)(o,[s.createDialogScope]),d=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Root,{...n,...r,modal:!0})};u.displayName=o;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Trigger,{...i,...n,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Portal,{...n,...r})};h.displayName="AlertDialogPortal";var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Overlay,{...i,...n,ref:a})});m.displayName="AlertDialogOverlay";var f="AlertDialogContent",[g,x]=l(f),y=a.forwardRef((e,r)=>{let{__scopeAlertDialog:n,children:o,...l}=e,c=d(n),u=i(r,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(g,{scope:n,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...c,...l,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),!1===a||!r||!r.defaultPrevented)return t?.(r)}}(l.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})});y.displayName=f;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Title,{...i,...n,ref:a})});b.displayName="AlertDialogTitle";var v=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Description,{...i,...n,ref:a})});v.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Close,{...i,...n,ref:a})});j.displayName="AlertDialogAction";var C="AlertDialogCancel",w=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=x(C,r),l=d(r),c=i(a,o);return(0,t.jsx)(s.Close,{...l,...n,ref:c})});w.displayName=C,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,w,"AlertDialogContent",0,y,"AlertDialogDescription",0,v,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,w,"Content",0,y,"Description",0,v,"Overlay",0,m,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,c],691162);var E=e.i(691162),E=E,N=e.i(975157),S=e.i(519455);function D({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(E.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function A({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,...a}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function k({className:e,size:a="default",...r}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function B({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function _({className:e,...a}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function $({className:e,...a}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function R({className:e,variant:a="default",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...n})})}function L({className:e,variant:a="outline",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:n,onOpenChange:i,open:s,title:o,trigger:l}){return(0,t.jsxs)(D,{onOpenChange:i,open:s,children:[l&&(0,t.jsx)(T,{asChild:!0,children:l}),(0,t.jsxs)(k,{children:[(0,t.jsxs)(B,{children:[(0,t.jsx)(_,{children:o}),(0,t.jsx)($,{children:r})]}),(0,t.jsxs)(O,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(R,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["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"}]]);e.s(["Copy",0,t],508734)},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},929592,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:a,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,r.cn)(n({variant:a}),e),...i})},"AlertDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,r.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...a})}])},515288,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Card",0,function({className:e,size:r="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"CardFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),a=e.i(975157),r=e.i(758379),r=r;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(r.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,a.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,a,r=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===n(e)}function s(e,t){return e.length<124?e:t}var o=((t=o||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((a=l||{}).ConnectionInit="connection_init",a.ConnectionAck="connection_ack",a.Ping="ping",a.Pong="pong",a.Subscribe="subscribe",a.Next="next",a.Error="error",a.Complete="complete",a);function c(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function h(e,t){let a=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),r=await a.json();if(!a.ok||r.errors?.length||!r.data)throw Error(r.errors?.map(e=>e.message).join("; ")||`HTTP ${a.status}`);return r.data}let m=null;function f(){return function(e,t,a){let r=`${"https:"===t?"wss":"ws"}://${a}/graphql`;if(!e)return r;try{let a=new URL(e);if("https:"===t&&"wss:"!==a.protocol)return r}catch{}return e}(r.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,h,"controlPlaneSubscriptions",0,function(){return m??=function(t){let a,r,n,i,{url:h,connectionParams:m,lazy:f=!0,onNonLazyError:g=console.error,lazyCloseTimeout:x=0,keepAlive:y=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:j=5,retryWait:C=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:w=p,on:E,webSocketImpl:N,generateID:S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:D,jsonMessageReviver:T}=t;if(N){var A;if(!("function"==typeof(A=N)&&"constructor"in A&&"CLOSED"in A&&"CLOSING"in A&&"CONNECTING"in A&&"OPEN"in A))throw Error("Invalid WebSocket implementation provided");a=N}else a="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!a)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let I=a,k=(r={},n={on:(e,t)=>(r[e]=t,()=>{delete r[e]}),emit(e){"id"in e&&r[e.id]?.(e)}},i={connecting:E?.connecting?[E.connecting]:[],opened:E?.opened?[E.opened]:[],connected:E?.connected?[E.connected]:[],ping:E?.ping?[E.ping]:[],pong:E?.pong?[E.pong]:[],message:E?.message?[n.emit,E.message]:[n.emit],closed:E?.closed?[E.closed]:[],error:E?.error?[E.error]:[]},{onMessage:n.on,on(e,t){let a=i[e];return a.push(t),()=>{a.splice(a.indexOf(t),1)}},emit(e,...t){for(let a of[...i[e]])a(...t)}});function B(e){let t=[k.on("error",a=>{t.forEach(e=>e()),e(a)}),k.on("closed",a=>{t.forEach(e=>e()),e(a)})]}let O,_=0,$,R=!1,L=0,P=!1;async function z(){clearTimeout($);let[e,t]=await (O??(O=new Promise((e,t)=>(async()=>{let a,r;if(R){if(await C(L),!_)return O=void 0,t({code:1e3,reason:"All Subscriptions Gone"});L++}k.emit("connecting",R);let n=new I("function"==typeof h?await h():h,"graphql-transport-ws");function i(){isFinite(y)&&y>0&&(clearTimeout(r),r=setTimeout(()=>{n.readyState===I.OPEN&&(n.send(d({type:l.Ping})),k.emit("ping",!1,void 0))},y))}B(e=>{O=void 0,clearTimeout(a),clearTimeout(r),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>k.emit("error",e),n.onclose=e=>k.emit("closed",e),n.onopen=async()=>{try{k.emit("opened",n);let e="function"==typeof m?await m():m;if(n.readyState!==I.OPEN)return;n.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},D)),isFinite(v)&&v>0&&(a=setTimeout(()=>{n.close(o.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),i()}catch(e){k.emit("error",e),n.close(o.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let r=c("string"==typeof t?JSON.parse(t,T):t);if(k.emit("message",r),"ping"===r.type||"pong"===r.type){k.emit(r.type,!0,r.payload),"pong"===r.type?i():b||(n.send(d(r.payload?{type:l.Pong,payload:r.payload}:{type:l.Pong})),k.emit("pong",!1,r.payload));return}if(p)return;if(r.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${r.type}`);clearTimeout(a),p=!0,k.emit("connected",n,r.payload,R),R=!1,L=0,e([n,new Promise((e,t)=>B(t))])}catch(e){n.onmessage=null,k.emit("error",e),n.close(o.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===I.CLOSING&&await t;let a=()=>{},r=new Promise(e=>a=e);return[e,a,Promise.race([r.then(()=>{_||(isFinite(x)&&x>0?$=setTimeout(()=>{e.readyState===I.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function M(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[o.InternalServerError,o.InternalClientError,o.BadRequest,o.BadResponse,o.Unauthorized,o.SubprotocolNotAcceptable,o.SubscriberAlreadyExists,o.TooManyInitialisationRequests].includes(e.code)))throw e;if(P)return!1;if(p(e)&&1e3===e.code)return _>0;if(!j||L>=j||!w(e))throw e;return R=!0}function F(e,t){let a=S(e),r=!1,n=!1,i=()=>{_--,r=!0};return(async()=>{for(_++;;)try{let[s,o,c]=await z();if(r)return o();let u=k.onMessage(a,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:n=!0,r=!0,t.error(e.payload),i();return;case l.Complete:r=!0,i();return}});s.send(d({id:a,type:l.Subscribe,payload:e},D)),i=()=>{r||s.readyState!==I.OPEN||s.send(d({id:a,type:l.Complete},D)),_--,r=!0,o()},await c.finally(u);return}catch(e){if(!M(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{r||i()}}return f||(async()=>{for(_++;;)try{let[,,e]=await z();await e}catch(e){try{if(!M(e))return}catch(e){return g?.(e)}}})(),{on:k.on,subscribe:F,iterate(e){let t=[],a={done:!1,error:null,resolve:()=>{}},r=F(e,{next(e){t.push(e),a.resolve()},error(e){a.done=!0,a.error=e,a.resolve()},complete(){a.done=!0,a.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>a.resolve=e);t.length;)yield t.shift();if(a.error)throw a.error;if(a.done)return}}();return n.throw=async e=>(a.done||(a.done=!0,a.error=e,a.resolve()),{done:!0,value:void 0}),n.return=async()=>(r(),{done:!0,value:void 0}),n},async dispose(){if(P=!0,O){let[e]=await O;e.close(1e3,"Normal Closure")}},terminate(){O&&k.emit("closed",new u)}}}({url:f,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(709840),n=e.i(975157);let i=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",asChild:s=!1,...o}){let l=s?r.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,n.cn)(i({variant:a}),e),"data-slot":"badge","data-variant":a,...o})}])},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},784774,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:r,...n}){return(0,t.jsx)("div",{className:(0,a.cn)("w-full overflow-x-auto",r),children:(0,t.jsx)("table",{className:(0,a.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{className:(0,a.cn)("divide-y",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{className:(0,a.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...r})},"TableFooter",0,function({className:e,...r}){return(0,t.jsx)("tfoot",{className:(0,a.cn)("border-t bg-muted/50 font-medium",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{className:(0,a.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{className:(0,a.cn)("border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{className:(0,a.cn)("transition-colors hover:bg-muted/40",e),...r})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(n({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},899101,e=>{"use strict";var t=e.i(843476),a=e.i(421645);let r=(0,e.i(456420).default)("archive-restore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);var n=e.i(711241),i=e.i(689664),s=e.i(716327),o=e.i(144716),o=o,l=e.i(508734),c=e.i(762368),d=e.i(269846),u=e.i(741120),p=e.i(250832),h=e.i(573474),m=e.i(861745),f=e.i(948148),g=e.i(271645),x=e.i(778434),y=e.i(340953),b=e.i(929592),v=e.i(487486),j=e.i(519455),C=e.i(515288),w=e.i(82612),E=e.i(987968),N=e.i(784774),S=e.i(677572),D=e.i(520133),T=e.i(462777),A=e.i(637611);let I=`
2
2
  id folder observedOrigin branch headSha upstream ahead behind syncState availability
3
3
  statusError defaultBranch localBranches remoteBranches lastCheckedAt lastFetchedAt lastFetchAttemptAt lastFetchError
4
- agent { ${g.AGENT_FIELDS} }
4
+ agent { ${x.AGENT_FIELDS} }
5
5
  repository { id canonicalOrigin displayOrigin name description jiraBranchRegex keepBaseBranchUpToDate createdAt updatedAt }
6
- activeJob { ${g.JOB_FIELDS} }
7
- `,k=new Set(["SUCCEEDED","FAILED","CANCELLED","TIMED_OUT"]);function B(e){return"ONLINE"===e.agent.connectionStatus&&"AVAILABLE"===e.availability&&e.agent.capabilities.includes(a.CODEBASE_GIT_INSPECT_JOB_KIND)}function O(e){let t=new Set(e.localBranches),a=new Set(e.remoteBranches);return e.branch&&t.add(e.branch),{dirty:!1,branches:[...new Set([...t,...a])].sort((e,t)=>e.localeCompare(t)).map(r=>({name:r,local:t.has(r),remote:a.has(r),current:r===e.branch,checkedOutPath:r===e.branch?e.folder:null})),branchesTruncated:!1,stashes:[],stashesTruncated:!1}}function _({branches:e,kind:a,busy:r,canOperate:n,defaultBranch:i,dirty:s,onOperation:o}){let l=(0,f.useTranslations)("codebaseDetail"),u="local"===a?l("localBranches"):l("remoteBranches");return(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsx)("h2",{className:"font-medium",children:u}),0===e.length?(0,t.jsx)(w.Empty,{className:"border py-8",children:(0,t.jsxs)(w.EmptyHeader,{children:[(0,t.jsx)(w.EmptyMedia,{variant:"icon",children:(0,t.jsx)(d.GitBranch,{})}),(0,t.jsx)(w.EmptyDescription,{children:"local"===a?l("noLocalBranches"):l("noRemoteBranches")})]})}):(0,t.jsx)("div",{className:"overflow-hidden rounded-xl border",children:(0,t.jsxs)(N.Table,{"aria-label":u,children:[(0,t.jsx)(N.TableHeader,{children:(0,t.jsxs)(N.TableRow,{children:[(0,t.jsx)(N.TableHead,{children:l("branchName")}),(0,t.jsx)(N.TableHead,{children:l("branchStatus")}),(0,t.jsx)(N.TableHead,{className:"text-right",children:l("actions")})]})}),(0,t.jsx)(N.TableBody,{children:e.map(e=>{let u=!!(e.checkedOutPath&&!e.current),p=e.name===i,m="remote"===a&&"main"===e.name;return(0,t.jsxs)(N.TableRow,{children:[(0,t.jsx)(N.TableCell,{className:"font-mono text-xs",children:e.name}),(0,t.jsx)(N.TableCell,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[e.current&&(0,t.jsx)(v.Badge,{children:l("current")}),p&&(0,t.jsx)(v.Badge,{variant:"outline",children:l("default")}),m&&!p&&(0,t.jsx)(v.Badge,{variant:"outline",children:l("protected")}),u&&(0,t.jsx)(v.Badge,{title:e.checkedOutPath??void 0,variant:"outline",children:l("otherWorktree")}),"remote"===a&&e.local&&(0,t.jsx)(v.Badge,{variant:"outline",children:l("localAvailable")})]})}),(0,t.jsx)(N.TableCell,{children:(0,t.jsx)("div",{className:"flex justify-end gap-2",children:"local"===a?(0,t.jsxs)(t.Fragment,{children:[s&&!e.current?(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("stashAndSwitch"),cancelLabel:l("cancel"),description:l("confirmDirtySwitchDescription",{branch:e.name}),onConfirm:()=>o("SWITCH_BRANCH",{branch:e.name,stashChanges:!0}),title:l("confirmDirtySwitchTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("switch")} ${e.name}`,disabled:r||!n||e.current||u,size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("switch")]})}):(0,t.jsxs)(j.Button,{"aria-label":`${l("switch")} ${e.name}`,disabled:r||!n||e.current||u,onClick:()=>void o("SWITCH_BRANCH",{branch:e.name,stashChanges:!1}),size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("switch")]}),(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("delete"),cancelLabel:l("cancel"),description:l("confirmDeleteBranchDescription",{branch:e.name}),onConfirm:()=>o("DELETE_BRANCH",{branch:e.name}),title:l("confirmDeleteBranchTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("delete")} ${e.name}`,disabled:r||!n||e.current||p||u,size:"sm",variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",l("delete")]})})]}):(0,t.jsxs)(t.Fragment,{children:[s&&!e.current?(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("stashAndCheckout"),cancelLabel:l("cancel"),description:l("confirmDirtyCheckoutDescription",{branch:e.name}),onConfirm:()=>o("SWITCH_BRANCH",{branch:e.name,stashChanges:!0}),title:l("confirmDirtyCheckoutTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("checkout")} ${e.name}`,disabled:r||!n||e.current||u,size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("checkout")]})}):(0,t.jsxs)(j.Button,{"aria-label":`${l("checkout")} ${e.name}`,disabled:r||!n||e.current||u,onClick:()=>void o("SWITCH_BRANCH",{branch:e.name,stashChanges:!1}),size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("checkout")]}),(0,t.jsxs)(j.Button,{"aria-label":`${l("pull")} ${e.name}`,disabled:r||!n||!e.local||u||e.current&&s,onClick:()=>void o("PULL_BRANCH",{branch:e.name}),size:"sm",variant:"outline",children:[(0,t.jsx)(c.Download,{})," ",l("pull")]}),(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("deleteRemote"),cancelLabel:l("cancel"),description:l("confirmDeleteRemoteBranchDescription",{branch:e.name}),onConfirm:()=>o("DELETE_REMOTE_BRANCH",{branch:e.name}),title:l("confirmDeleteRemoteBranchTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("deleteRemote")} ${e.name}`,disabled:r||!n||p||m,size:"sm",variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",l("deleteRemote")]})})]})})})]},e.name)})})]})})]})}function $({stashes:e,truncated:a,busy:n,canOperate:c,diffs:d,onToggleDiff:u,onOperation:p}){let g=(0,f.useTranslations)("codebaseDetail"),v=(0,m.useLocale)(),[N,S]=(0,x.useState)({}),D=async(e,t)=>{try{await (0,T.copyText)(t),S(t=>({...t,[e]:"COPIED"}))}catch{S(t=>({...t,[e]:"FAILED"}))}};return 0===e.length?(0,t.jsx)(w.Empty,{className:"border py-12",children:(0,t.jsxs)(w.EmptyHeader,{children:[(0,t.jsx)(w.EmptyMedia,{variant:"icon",children:(0,t.jsx)(r,{})}),(0,t.jsx)(w.EmptyTitle,{children:g("noStashes")}),(0,t.jsx)(w.EmptyDescription,{children:g("noStashesDescription")})]})}):(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(e=>{let a=d[e.oid],m=N[e.oid]??"IDLE";return(0,t.jsx)(C.Card,{children:(0,t.jsxs)(C.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-[1_1_24rem]",children:[(0,t.jsx)("p",{className:"break-words font-medium",children:e.message}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.selector," · ",e.oid.slice(0,10)," ·"," ",new Date(e.createdAt).toLocaleString(v)]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,t.jsxs)(j.Button,{"aria-label":`${g("preview")} ${e.selector}`,disabled:n,onClick:()=>void u(e),size:"sm",variant:"outline",children:[a?.loading?(0,t.jsx)(E.Spinner,{}):a?.open?(0,t.jsx)(o.default,{}):(0,t.jsx)(s.ChevronDown,{}),a?.open?g("hidePreview"):g("preview")]}),(0,t.jsxs)(j.Button,{"aria-label":`${g("apply")} ${e.selector}`,disabled:n||!c,onClick:()=>void p("APPLY_STASH",{stashOid:e.oid}),size:"sm",variant:"outline",children:[(0,t.jsx)(r,{})," ",g("apply")]}),(0,t.jsx)(y.ConfirmationDialog,{actionLabel:g("delete"),cancelLabel:g("cancel"),description:g("confirmDeleteStashDescription",{stash:e.selector}),onConfirm:()=>p("DELETE_STASH",{stashOid:e.oid}),title:g("confirmDeleteStashTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${g("delete")} ${e.selector}`,disabled:n||!c,size:"sm",variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",g("delete")]})})]})]}),a?.open&&(0,t.jsx)("div",{className:"space-y-2",children:a.error?(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:a.error})}):a.loading?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(E.Spinner,{})," ",g("loadingPreview")]}):(0,t.jsxs)(t.Fragment,{children:[a.diff?.patch&&(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(j.Button,{"aria-label":`${"COPIED"===m?g("patchCopied"):g("copyPatch")} ${e.selector}`,onClick:()=>void D(e.oid,a.diff?.patch??""),size:"sm",type:"button",variant:"outline",children:["COPIED"===m?(0,t.jsx)(i.Check,{}):(0,t.jsx)(l.Copy,{}),"COPIED"===m?g("patchCopied"):g("copyPatch")]})}),"FAILED"===m&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:g("copyPatchFailed")}),(0,t.jsx)("pre",{className:"max-h-[32rem] overflow-auto rounded-lg bg-muted p-4 text-xs whitespace-pre",children:a.diff?.patch||g("emptyPatch")}),a.diff?.truncated&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("patchTruncated")})]})})]})},e.oid)}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("stashesTruncated")})]})}function R({label:e,value:a,mono:r=!1}){return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:r?"truncate font-mono text-xs":"truncate",title:a,children:a})]})}e.s(["CodebaseDetailPage",0,function({codebaseId:e}){let r,i=(0,f.useTranslations)("codebaseDetail"),s=(0,f.useTranslations)("codebases"),o=(0,m.useLocale)(),[l,d]=(0,x.useState)(null),[h,y]=(0,x.useState)(null),[N,L]=(0,x.useState)(!0),[P,z]=(0,x.useState)(!1),[M,F]=(0,x.useState)(null),[q,H]=(0,x.useState)(null),[J,G]=(0,x.useState)(null),[U,V]=(0,x.useState)({}),W=(0,x.useCallback)(async()=>{z(!0);try{let t=await (0,A.controlPlaneRequest)(`mutation InspectCodebaseGitState($input: InspectCodebaseGitStateInput!) {
6
+ activeJob { ${x.JOB_FIELDS} }
7
+ `,k=new Set(["SUCCEEDED","FAILED","CANCELLED","TIMED_OUT"]);function B(e){return"ONLINE"===e.agent.connectionStatus&&"AVAILABLE"===e.availability&&e.agent.capabilities.includes(a.CODEBASE_GIT_INSPECT_JOB_KIND)}function O(e){let t=new Set(e.localBranches),a=new Set(e.remoteBranches);return e.branch&&t.add(e.branch),{dirty:!1,branches:[...new Set([...t,...a])].sort((e,t)=>e.localeCompare(t)).map(r=>({name:r,local:t.has(r),remote:a.has(r),current:r===e.branch,checkedOutPath:r===e.branch?e.folder:null})),branchesTruncated:!1,stashes:[],stashesTruncated:!1}}function _({branches:e,kind:a,busy:r,canOperate:n,defaultBranch:i,dirty:s,onOperation:o}){let l=(0,f.useTranslations)("codebaseDetail"),u="local"===a?l("localBranches"):l("remoteBranches");return(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsx)("h2",{className:"font-medium",children:u}),0===e.length?(0,t.jsx)(w.Empty,{className:"border py-8",children:(0,t.jsxs)(w.EmptyHeader,{children:[(0,t.jsx)(w.EmptyMedia,{variant:"icon",children:(0,t.jsx)(d.GitBranch,{})}),(0,t.jsx)(w.EmptyDescription,{children:"local"===a?l("noLocalBranches"):l("noRemoteBranches")})]})}):(0,t.jsx)("div",{className:"overflow-hidden rounded-xl border",children:(0,t.jsxs)(N.Table,{"aria-label":u,children:[(0,t.jsx)(N.TableHeader,{children:(0,t.jsxs)(N.TableRow,{children:[(0,t.jsx)(N.TableHead,{children:l("branchName")}),(0,t.jsx)(N.TableHead,{children:l("branchStatus")}),(0,t.jsx)(N.TableHead,{className:"text-right",children:l("actions")})]})}),(0,t.jsx)(N.TableBody,{children:e.map(e=>{let u=!!(e.checkedOutPath&&!e.current),p=e.name===i,m="remote"===a&&"main"===e.name;return(0,t.jsxs)(N.TableRow,{children:[(0,t.jsx)(N.TableCell,{className:"font-mono text-xs",children:e.name}),(0,t.jsx)(N.TableCell,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[e.current&&(0,t.jsx)(v.Badge,{children:l("current")}),p&&(0,t.jsx)(v.Badge,{variant:"outline",children:l("default")}),m&&!p&&(0,t.jsx)(v.Badge,{variant:"outline",children:l("protected")}),u&&(0,t.jsx)(v.Badge,{title:e.checkedOutPath??void 0,variant:"outline",children:l("otherWorktree")}),"remote"===a&&e.local&&(0,t.jsx)(v.Badge,{variant:"outline",children:l("localAvailable")})]})}),(0,t.jsx)(N.TableCell,{children:(0,t.jsx)("div",{className:"flex justify-end gap-2",children:"local"===a?(0,t.jsxs)(t.Fragment,{children:[s&&!e.current?(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("stashAndSwitch"),cancelLabel:l("cancel"),description:l("confirmDirtySwitchDescription",{branch:e.name}),onConfirm:()=>o("SWITCH_BRANCH",{branch:e.name,stashChanges:!0}),title:l("confirmDirtySwitchTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("switch")} ${e.name}`,disabled:r||!n||e.current||u,size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("switch")]})}):(0,t.jsxs)(j.Button,{"aria-label":`${l("switch")} ${e.name}`,disabled:r||!n||e.current||u,onClick:()=>void o("SWITCH_BRANCH",{branch:e.name,stashChanges:!1}),size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("switch")]}),(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("delete"),cancelLabel:l("cancel"),description:l("confirmDeleteBranchDescription",{branch:e.name}),onConfirm:()=>o("DELETE_BRANCH",{branch:e.name}),title:l("confirmDeleteBranchTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("delete")} ${e.name}`,disabled:r||!n||e.current||p||u,size:"sm",variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",l("delete")]})})]}):(0,t.jsxs)(t.Fragment,{children:[s&&!e.current?(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("stashAndCheckout"),cancelLabel:l("cancel"),description:l("confirmDirtyCheckoutDescription",{branch:e.name}),onConfirm:()=>o("SWITCH_BRANCH",{branch:e.name,stashChanges:!0}),title:l("confirmDirtyCheckoutTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("checkout")} ${e.name}`,disabled:r||!n||e.current||u,size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("checkout")]})}):(0,t.jsxs)(j.Button,{"aria-label":`${l("checkout")} ${e.name}`,disabled:r||!n||e.current||u,onClick:()=>void o("SWITCH_BRANCH",{branch:e.name,stashChanges:!1}),size:"sm",variant:"outline",children:[(0,t.jsx)(d.GitBranch,{})," ",l("checkout")]}),(0,t.jsxs)(j.Button,{"aria-label":`${l("pull")} ${e.name}`,disabled:r||!n||!e.local||u||e.current&&s,onClick:()=>void o("PULL_BRANCH",{branch:e.name}),size:"sm",variant:"outline",children:[(0,t.jsx)(c.Download,{})," ",l("pull")]}),(0,t.jsx)(y.ConfirmationDialog,{actionLabel:l("deleteRemote"),cancelLabel:l("cancel"),description:l("confirmDeleteRemoteBranchDescription",{branch:e.name}),onConfirm:()=>o("DELETE_REMOTE_BRANCH",{branch:e.name}),title:l("confirmDeleteRemoteBranchTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${l("deleteRemote")} ${e.name}`,disabled:r||!n||p||m,size:"sm",variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",l("deleteRemote")]})})]})})})]},e.name)})})]})})]})}function $({stashes:e,truncated:a,busy:n,canOperate:c,diffs:d,onToggleDiff:u,onOperation:p}){let x=(0,f.useTranslations)("codebaseDetail"),v=(0,m.useLocale)(),[N,S]=(0,g.useState)({}),D=async(e,t)=>{try{await (0,T.copyText)(t),S(t=>({...t,[e]:"COPIED"}))}catch{S(t=>({...t,[e]:"FAILED"}))}};return 0===e.length?(0,t.jsx)(w.Empty,{className:"border py-12",children:(0,t.jsxs)(w.EmptyHeader,{children:[(0,t.jsx)(w.EmptyMedia,{variant:"icon",children:(0,t.jsx)(r,{})}),(0,t.jsx)(w.EmptyTitle,{children:x("noStashes")}),(0,t.jsx)(w.EmptyDescription,{children:x("noStashesDescription")})]})}):(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(e=>{let a=d[e.oid],m=N[e.oid]??"IDLE";return(0,t.jsx)(C.Card,{children:(0,t.jsxs)(C.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-[1_1_24rem]",children:[(0,t.jsx)("p",{className:"break-words font-medium",children:e.message}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.selector," · ",e.oid.slice(0,10)," ·"," ",new Date(e.createdAt).toLocaleString(v)]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,t.jsxs)(j.Button,{"aria-label":`${x("preview")} ${e.selector}`,disabled:n,onClick:()=>void u(e),size:"sm",variant:"outline",children:[a?.loading?(0,t.jsx)(E.Spinner,{}):a?.open?(0,t.jsx)(o.default,{}):(0,t.jsx)(s.ChevronDown,{}),a?.open?x("hidePreview"):x("preview")]}),(0,t.jsxs)(j.Button,{"aria-label":`${x("apply")} ${e.selector}`,disabled:n||!c,onClick:()=>void p("APPLY_STASH",{stashOid:e.oid}),size:"sm",variant:"outline",children:[(0,t.jsx)(r,{})," ",x("apply")]}),(0,t.jsx)(y.ConfirmationDialog,{actionLabel:x("delete"),cancelLabel:x("cancel"),description:x("confirmDeleteStashDescription",{stash:e.selector}),onConfirm:()=>p("DELETE_STASH",{stashOid:e.oid}),title:x("confirmDeleteStashTitle"),trigger:(0,t.jsxs)(j.Button,{"aria-label":`${x("delete")} ${e.selector}`,disabled:n||!c,size:"sm",variant:"destructive",children:[(0,t.jsx)(h.Trash2,{})," ",x("delete")]})})]})]}),a?.open&&(0,t.jsx)("div",{className:"space-y-2",children:a.error?(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:a.error})}):a.loading?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(E.Spinner,{})," ",x("loadingPreview")]}):(0,t.jsxs)(t.Fragment,{children:[a.diff?.patch&&(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(j.Button,{"aria-label":`${"COPIED"===m?x("patchCopied"):x("copyPatch")} ${e.selector}`,onClick:()=>void D(e.oid,a.diff?.patch??""),size:"sm",type:"button",variant:"outline",children:["COPIED"===m?(0,t.jsx)(i.Check,{}):(0,t.jsx)(l.Copy,{}),"COPIED"===m?x("patchCopied"):x("copyPatch")]})}),"FAILED"===m&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:x("copyPatchFailed")}),(0,t.jsx)("pre",{className:"max-h-[32rem] overflow-auto rounded-lg bg-muted p-4 text-xs whitespace-pre",children:a.diff?.patch||x("emptyPatch")}),a.diff?.truncated&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("patchTruncated")})]})})]})},e.oid)}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("stashesTruncated")})]})}function R({label:e,value:a,mono:r=!1}){return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:r?"truncate font-mono text-xs":"truncate",title:a,children:a})]})}e.s(["CodebaseDetailPage",0,function({codebaseId:e}){let r,i=(0,f.useTranslations)("codebaseDetail"),s=(0,f.useTranslations)("codebases"),o=(0,m.useLocale)(),[l,d]=(0,g.useState)(null),[h,y]=(0,g.useState)(null),[N,L]=(0,g.useState)(!0),[P,z]=(0,g.useState)(!1),[M,F]=(0,g.useState)(null),[q,H]=(0,g.useState)(null),[J,G]=(0,g.useState)(null),[U,V]=(0,g.useState)({}),W=(0,g.useCallback)(async()=>{z(!0);try{let t=await (0,A.controlPlaneRequest)(`mutation InspectCodebaseGitState($input: InspectCodebaseGitStateInput!) {
8
8
  inspectCodebaseGitState(input: $input) {
9
9
  dirty branchesTruncated stashesTruncated
10
10
  branches { name local remote current checkedOutPath }
11
11
  stashes { oid selector message createdAt }
12
12
  }
13
- }`,{input:{codebaseId:e,requestId:(0,T.createClientId)()}});return y(t.inspectCodebaseGitState),V({}),F(null),!0}catch(e){return F(e instanceof Error?e.message:String(e)),!1}finally{z(!1)}},[e]),K=(0,x.useCallback)(async(t=!0)=>{try{let a=(await (0,A.controlPlaneRequest)(`query CodebaseDetail($id: ID!) {
13
+ }`,{input:{codebaseId:e,requestId:(0,T.createClientId)()}});return y(t.inspectCodebaseGitState),V({}),F(null),!0}catch(e){return F(e instanceof Error?e.message:String(e)),!1}finally{z(!1)}},[e]),K=(0,g.useCallback)(async(t=!0)=>{try{let a=(await (0,A.controlPlaneRequest)(`query CodebaseDetail($id: ID!) {
14
14
  codebase(id: $id) { ${I} }
15
- }`,{id:e})).codebase;d(a),F(null),a?t&&!a.activeJob&&B(a)?await W()||y(O(a)):B(a)?y(e=>e??O(a)):y(O(a)):y(null)}catch(e){F(e instanceof Error?e.message:String(e))}finally{L(!1)}},[e,W]);(0,x.useEffect)(()=>{let t=window.setTimeout(()=>void K(),0),a=window.setInterval(()=>void K(!1),3e4),r=(0,A.controlPlaneSubscriptions)().subscribe({query:`subscription CodebaseDetailChanged {
15
+ }`,{id:e})).codebase;d(a),F(null),a?t&&!a.activeJob&&B(a)?await W()||y(O(a)):B(a)?y(e=>e??O(a)):y(O(a)):y(null)}catch(e){F(e instanceof Error?e.message:String(e))}finally{L(!1)}},[e,W]);(0,g.useEffect)(()=>{let t=window.setTimeout(()=>void K(),0),a=window.setInterval(()=>void K(!1),3e4),r=(0,A.controlPlaneSubscriptions)().subscribe({query:`subscription CodebaseDetailChanged {
16
16
  codebaseOverviewChanged { codebaseId repositoryId }
17
- }`},{next:t=>{let a=t.data?.codebaseOverviewChanged;a&&null!==a.codebaseId&&a.codebaseId!==e||K()},error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(t),window.clearInterval(a),r()}},[e,K]);let Q=l?.activeJob??null;(0,x.useEffect)(()=>{if(Q)return(0,A.controlPlaneSubscriptions)().subscribe({query:`subscription CodebaseJobChanged($jobId: ID!) {
18
- agentJobChanged(jobId: $jobId) { ${g.JOB_FIELDS} }
17
+ }`},{next:t=>{let a=t.data?.codebaseOverviewChanged;a&&null!==a.codebaseId&&a.codebaseId!==e||K()},error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(t),window.clearInterval(a),r()}},[e,K]);let Q=l?.activeJob??null;(0,g.useEffect)(()=>{if(Q)return(0,A.controlPlaneSubscriptions)().subscribe({query:`subscription CodebaseJobChanged($jobId: ID!) {
18
+ agentJobChanged(jobId: $jobId) { ${x.JOB_FIELDS} }
19
19
  }`,variables:{jobId:Q.id}},{next:e=>{let t=e.data?.agentJobChanged;t&&(k.has(t.status)?("SUCCEEDED"===t.status?(G(i("operationSucceeded")),H(null)):(H(t.error||i("operationFailed")),G(null)),d(e=>e?{...e,activeJob:null}:e),K()):d(e=>e?{...e,activeJob:t}:e))},error:()=>void 0,complete:()=>void 0})},[Q,K,i]);let X=async t=>{H(null),G(null);try{let a=(await (0,A.controlPlaneRequest)(`mutation RunCodebaseDetailOperation($input: RunCodebaseOperationInput!) {
20
20
  ${t}(input: $input) {
21
- jobs { ${g.JOB_FIELDS} }
21
+ jobs { ${x.JOB_FIELDS} }
22
22
  skipped { codebaseId reason }
23
23
  }
24
24
  }`,{input:{codebaseIds:[e],requestId:(0,T.createClientId)()}}))[t],r=a?.jobs[0];if(!r)throw Error(a?.skipped[0]?.reason||i("operationFailed"));d(e=>e?{...e,activeJob:r}:e),G(i("operationQueued"))}catch(e){H(e instanceof Error?e.message:String(e))}},Y=async(t,a)=>{H(null),G(null);try{let r=await (0,A.controlPlaneRequest)(`mutation RunCodebaseGitOperation($input: RunCodebaseGitOperationInput!) {
25
- runCodebaseGitOperation(input: $input) { ${g.JOB_FIELDS} }
25
+ runCodebaseGitOperation(input: $input) { ${x.JOB_FIELDS} }
26
26
  }`,{input:{codebaseId:e,operation:t,...a,requestId:(0,T.createClientId)()}});d(e=>e?{...e,activeJob:r.runCodebaseGitOperation}:e),G(i("operationQueued"))}catch(e){H(e instanceof Error?e.message:String(e))}},Z=async t=>{let a=U[t.oid];if(a?.open)return void V(e=>({...e,[t.oid]:{...a,open:!1}}));if(a?.diff)return void V(e=>({...e,[t.oid]:{...a,open:!0}}));V(e=>({...e,[t.oid]:{open:!0,loading:!0}})),z(!0);try{let a=await (0,A.controlPlaneRequest)(`mutation InspectCodebaseStash($input: InspectCodebaseStashInput!) {
27
27
  inspectCodebaseStash(input: $input) { oid patch truncated }
28
28
  }`,{input:{codebaseId:e,stashOid:t.oid,requestId:(0,T.createClientId)()}});V(e=>({...e,[t.oid]:{open:!0,loading:!1,diff:a.inspectCodebaseStash}}))}catch(e){V(a=>({...a,[t.oid]:{open:!0,loading:!1,error:e instanceof Error?e.message:String(e)}}))}finally{z(!1)}};if(N)return(0,t.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(E.Spinner,{})," ",i("loading")]});if(!l)return(0,t.jsxs)(w.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,t.jsxs)(w.EmptyHeader,{children:[(0,t.jsx)(w.EmptyTitle,{children:i("notFound")}),(0,t.jsx)(w.EmptyDescription,{children:i("notFoundDescription")})]}),(0,t.jsx)(j.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(D.Link,{href:"/codebases",children:[(0,t.jsx)(n.ArrowLeft,{})," ",i("back")]})})]});let ee=B(l),et=ee&&l.agent.capabilities.includes(a.CODEBASE_GIT_OPERATION_JOB_KIND),ea=!!Q||P,er=h?.branches.filter(e=>e.local)??[],en=h?.branches.filter(e=>e.remote)??[];return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6",children:[(0,t.jsx)("div",{children:(0,t.jsx)(j.Button,{asChild:!0,size:"sm",variant:"ghost",children:(0,t.jsxs)(D.Link,{href:"/codebases",children:[(0,t.jsx)(n.ArrowLeft,{})," ",i("back")]})})}),M&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:M})}),q&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:q})}),J&&(0,t.jsx)(b.Alert,{children:(0,t.jsx)(b.AlertDescription,{children:J})}),(!ee||!et)&&(0,t.jsx)(b.Alert,{children:(0,t.jsx)(b.AlertDescription,{children:"OFFLINE"===l.agent.connectionStatus?i("offlineReadOnly"):"AVAILABLE"!==l.availability?l.statusError||s(`availability.${l.availability}`):i("unsupportedReadOnly")})}),(0,t.jsx)(C.Card,{children:(0,t.jsxs)(C.CardContent,{className:"space-y-5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:l.repository.name}),(0,t.jsx)(v.Badge,{children:s(`sync.${l.syncState}`)}),h?.dirty&&(0,t.jsx)(v.Badge,{variant:"destructive",children:i("dirty")})]}),(0,t.jsx)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:l.folder}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:[l.agent.name," · ",l.agent.hostname]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(j.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(D.Link,{href:`/codebases/repositories/${l.repository.id}`,children:[(0,t.jsx)(p.Settings2,{})," ",i("repositorySettings")]})}),(0,t.jsxs)(j.Button,{disabled:ea||"ONLINE"!==l.agent.connectionStatus||!l.agent.capabilities.includes(a.CODEBASE_REFRESH_JOB_KIND),onClick:()=>void X("refreshCodebases"),variant:"outline",children:[ea?(0,t.jsx)(E.Spinner,{}):(0,t.jsx)(u.RefreshCw,{})," ",i("refresh")]}),(0,t.jsxs)(j.Button,{disabled:ea||"ONLINE"!==l.agent.connectionStatus||"AVAILABLE"!==l.availability||!l.agent.capabilities.includes(a.CODEBASE_FETCH_JOB_KIND),onClick:()=>void X("fetchCodebases"),variant:"outline",children:[Q?.kind===a.CODEBASE_FETCH_JOB_KIND?(0,t.jsx)(E.Spinner,{}):(0,t.jsx)(c.Download,{})," ",i("fetch")]})]})]}),(0,t.jsxs)("dl",{className:"grid gap-3 text-sm sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(R,{label:i("origin"),value:l.observedOrigin,mono:!0}),(0,t.jsx)(R,{label:i("currentBranch"),value:l.branch??s("detached"),mono:!0}),(0,t.jsx)(R,{label:i("upstream"),value:l.upstream??s("none"),mono:!0}),(0,t.jsx)(R,{label:i("lastFetched"),value:(r=l.lastFetchedAt)?new Date(r).toLocaleString(o):s("never")})]}),Q&&(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(E.Spinner,{})," ",i("activeOperation",{kind:Q.kind})]})]})}),(0,t.jsxs)(S.Tabs,{defaultValue:"branches",children:[(0,t.jsxs)(S.TabsList,{children:[(0,t.jsx)(S.TabsTrigger,{value:"branches",children:i("branches",{count:h?.branches.length??0})}),(0,t.jsx)(S.TabsTrigger,{value:"stashes",children:i("stashes",{count:h?.stashes.length??0})})]}),(0,t.jsxs)(S.TabsContent,{className:"space-y-6",value:"branches",children:[(0,t.jsx)(_,{branches:er,busy:ea,canOperate:et,defaultBranch:l.defaultBranch,dirty:!!h?.dirty,kind:"local",onOperation:Y}),(0,t.jsx)(_,{branches:en,busy:ea,canOperate:et,defaultBranch:l.defaultBranch,dirty:!!h?.dirty,kind:"remote",onOperation:Y}),h?.branchesTruncated&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("branchesTruncated")})]}),(0,t.jsx)(S.TabsContent,{value:"stashes",children:(0,t.jsx)($,{busy:ea,canOperate:et,diffs:U,onOperation:Y,onToggleDiff:Z,stashes:h?.stashes??[],truncated:!!h?.stashesTruncated})})]})]})}],899101)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let i=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,n.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,n.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,n.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...s}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,n.cn)(i({variant:r,className:e})),...s})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,n.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["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"}]]);e.s(["Copy",0,t],508734)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let i=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...s}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(i({variant:r}),e),...s})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...i}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...i}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...i})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function i(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function s(e){return"object"===i(e)}function o(e,t){return e.length<124?e:t}var a=((t=a||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function c(e){if(!s(e))throw Error(`Message is expected to be an object, but got ${i(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${i(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!s(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!s(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${i(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${i(e.payload.query)}`);if(null!=e.payload.variables&&!s(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${i(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==i(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${i(e.payload.operationName)}`);if(null!=e.payload.extensions&&!s(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${i(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!s(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${i(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return s(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let h=null;function m(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return h??=function(t){let r,n,i,s,{url:f,connectionParams:h,lazy:m=!0,onNonLazyError:y=console.error,lazyCloseTimeout:g=0,keepAlive:x=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:w=5,retryWait:j=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:E=p,on:k,webSocketImpl:S,generateID:N=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:C,jsonMessageReviver:A}=t;if(S){var T;if(!("function"==typeof(T=S)&&"constructor"in T&&"CLOSED"in T&&"CLOSING"in T&&"CONNECTING"in T&&"OPEN"in T))throw Error("Invalid WebSocket implementation provided");r=S}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let R=r,$=(n={},i={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},s={connecting:k?.connecting?[k.connecting]:[],opened:k?.opened?[k.opened]:[],connected:k?.connected?[k.connected]:[],ping:k?.ping?[k.ping]:[],pong:k?.pong?[k.pong]:[],message:k?.message?[i.emit,k.message]:[i.emit],closed:k?.closed?[k.closed]:[],error:k?.error?[k.error]:[]},{onMessage:i.on,on(e,t){let r=s[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...s[e]])r(...t)}});function I(e){let t=[$.on("error",r=>{t.forEach(e=>e()),e(r)}),$.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let M,O=0,z,P=!1,_=0,D=!1;async function B(){clearTimeout(z);let[e,t]=await (M??(M=new Promise((e,t)=>(async()=>{let r,n;if(P){if(await j(_),!O)return M=void 0,t({code:1e3,reason:"All Subscriptions Gone"});_++}$.emit("connecting",P);let i=new R("function"==typeof f?await f():f,"graphql-transport-ws");function s(){isFinite(x)&&x>0&&(clearTimeout(n),n=setTimeout(()=>{i.readyState===R.OPEN&&(i.send(d({type:l.Ping})),$.emit("ping",!1,void 0))},x))}I(e=>{M=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=e=>$.emit("error",e),i.onclose=e=>$.emit("closed",e),i.onopen=async()=>{try{$.emit("opened",i);let e="function"==typeof h?await h():h;if(i.readyState!==R.OPEN)return;i.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},C)),isFinite(b)&&b>0&&(r=setTimeout(()=>{i.close(a.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),s()}catch(e){$.emit("error",e),i.close(a.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;i.onmessage=({data:t})=>{try{let n=c("string"==typeof t?JSON.parse(t,A):t);if($.emit("message",n),"ping"===n.type||"pong"===n.type){$.emit(n.type,!0,n.payload),"pong"===n.type?s():v||(i.send(d(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),$.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,$.emit("connected",i,n.payload,P),P=!1,_=0,e([i,new Promise((e,t)=>I(t))])}catch(e){i.onmessage=null,$.emit("error",e),i.close(a.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===R.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{O||(isFinite(g)&&g>0?z=setTimeout(()=>{e.readyState===R.OPEN&&e.close(1e3,"Normal Closure")},g):e.close(1e3,"Normal Closure"))}),t])]}function q(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[a.InternalServerError,a.InternalClientError,a.BadRequest,a.BadResponse,a.Unauthorized,a.SubprotocolNotAcceptable,a.SubscriberAlreadyExists,a.TooManyInitialisationRequests].includes(e.code)))throw e;if(D)return!1;if(p(e)&&1e3===e.code)return O>0;if(!w||_>=w||!E(e))throw e;return P=!0}function L(e,t){let r=N(e),n=!1,i=!1,s=()=>{O--,n=!0};return(async()=>{for(O++;;)try{let[o,a,c]=await B();if(n)return a();let u=$.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:i=!0,n=!0,t.error(e.payload),s();return;case l.Complete:n=!0,s();return}});o.send(d({id:r,type:l.Subscribe,payload:e},C)),s=()=>{n||o.readyState!==R.OPEN||o.send(d({id:r,type:l.Complete},C)),O--,n=!0,a()},await c.finally(u);return}catch(e){if(!q(e))return}})().then(()=>{i||t.complete()}).catch(e=>{t.error(e)}),()=>{n||s()}}return m||(async()=>{for(O++;;)try{let[,,e]=await B();await e}catch(e){try{if(!q(e))return}catch(e){return y?.(e)}}})(),{on:$.on,subscribe:L,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=L(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),i=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return i.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),i.return=async()=>(n(),{done:!0,value:void 0}),i},async dispose(){if(D=!0,M){let[e]=await M;e.close(1e3,"Normal Closure")}},terminate(){M&&$.emit("closed",new u)}}}({url:m,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),i=e.i(975157);let s=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...a}){let l=o?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,i.cn)(s({variant:r}),e),"data-slot":"badge","data-variant":r,...a})}])},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return t.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function s(e){let r=t.forwardRef((r,n)=>{var s;let l,f,{children:h,...m}=r,y=null,g=!1,x=[];c(h)&&"function"==typeof p&&(h=p(h._payload)),t.Children.forEach(h,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===o){g=!0;let t="child"in e.props?e.props.child:e.props.children;c(t)&&"function"==typeof p&&(t=p(t._payload)),y=a(e,t),x.push(y?.props?.children)}else x.push(e)}),y?y=t.cloneElement(y,void 0,x):!g&&1===t.Children.count(h)&&t.isValidElement(h)&&(y=h);let v=y?(s=y,(f=(l=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?s.ref:(f=(l=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?s.props.ref:s.props.ref||s.ref):void 0,b=i(n,v);if(!y){if(h||0===h)throw Error(g?u(e):d(e));return h}let w=function(e,t){let r={...t};for(let n in t){let i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...e)=>{let t=s(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...s}:"className"===n&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}(m,y.props??{});return y.type!==t.Fragment&&(w.ref=n?b:v),t.cloneElement(y,w)});return r.displayName=`${e}.Slot`,r}var o=Symbol.for("radix.slottable"),a=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},l=Symbol.for("react.lazy");function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===l&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),h=new WeakMap;function m(e,t){var r,n;let i,s,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,n=t,i=r.length,(o=(s=y(n))>=0?s:i+s)<0||o>=i?-1:o);return -1===a?void 0:e[a]}function y(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],h.set(this,!0)}set(e,t){return h.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 n,i=this.has(t),s=this.#e.length,o=y(e),a=o>=0?o:s+o,l=a<0||a>=s?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!i;o<0&&a++;let d=[...this.#e],u=!1;for(let e=a;e<c;e++)if(a===e){let s=d[e];d[e]===t&&(s=d[e+1]),i&&this.delete(t),n=this.get(s),this.set(t,r)}else{u||d[e-1]!==t||(u=!0);let r=d[u?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,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 n=this.#e.indexOf(e);return -1===n?this:this.insert(n+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=m(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=m(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return m(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}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),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[o,a]=(0,r.createContextScope)(n),[l,c]=o(n,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,i=t.useRef(null),s=t.useRef(new Map).current;return(0,f.jsx)(l,{scope:r,itemMap:s,collectionRef:i,children:n})};d.displayName=n;let u=e+"CollectionSlot",p=s(u),h=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,s=i(t,c(u,r).collectionRef);return(0,f.jsx)(p,{ref:s,children:n})});h.displayName=u;let m=e+"CollectionItemSlot",y="data-radix-collection-item",g=s(m),x=t.forwardRef((e,r)=>{let{scope:n,children:s,...o}=e,a=t.useRef(null),l=i(r,a),d=c(m,n);return t.useEffect(()=>(d.itemMap.set(a,{ref:a,...o}),()=>void d.itemMap.delete(a))),(0,f.jsx)(g,{...{[y]:""},ref:l,children:s})});return x.displayName=m,[{Provider:d,Slot:h,ItemSlot:x},function(r){let n=c(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${y}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},a]}],75830);var g=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(g);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},675926,e=>{"use strict";var t=e.i(843476),r=e.i(948148),n=e.i(487486),i=e.i(975157);e.s(["StatusBadge",0,function({status:e}){let s=(0,r.useTranslations)("status"),o="ONLINE"===e||"RUNNING"===e||"SUCCEEDED"===e,a="FAILED"===e||"TIMED_OUT"===e;return(0,t.jsx)(n.Badge,{className:(0,i.cn)(o&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",a&&"border-destructive/30 bg-destructive/10 text-destructive"),variant:o||a?"outline":"secondary",children:s(e.toLowerCase())})}])},697270,e=>{"use strict";var t=e.i(843476),r=e.i(508734);let n=(0,e.i(456420).default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);var i=e.i(77071),s=e.i(741120),o=e.i(948148),a=e.i(271645),l=e.i(929592),c=e.i(519455),d=e.i(515288),u=e.i(82612),p=e.i(987968),f=e.i(967489),h=e.i(520133),m=e.i(462777),y=e.i(637611),g=e.i(675926),x=e.i(778434);let v=`query Agents { agents { ${x.AGENT_FIELDS} } }`;e.s(["AgentsList",0,function({localServerOrigins:e=[]}){let b=(0,o.useTranslations)("agents"),[w,j]=(0,a.useState)([]),[E,k]=(0,a.useState)(!0),[S,N]=(0,a.useState)(null),[C,A]=(0,a.useState)(null),[T,R]=(0,a.useState)(null),$=(0,a.useCallback)(async()=>{try{let e=await (0,y.controlPlaneRequest)(v);j(e.agents),N(null)}catch(e){N(e instanceof Error?e.message:String(e))}finally{k(!1)}},[]);(0,a.useEffect)(()=>{let e=window.setTimeout(()=>void $(),0),t=(0,y.controlPlaneSubscriptions)().subscribe({query:`subscription { agentChanged { ${x.AGENT_FIELDS} } }`},{next:e=>{let t=e.data?.agentChanged;t&&j(e=>{let r=e.findIndex(e=>e.id===t.id);return -1===r?[t,...e]:e.map((e,n)=>n===r?t:e)})},error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(e),t()}},[$]);let I=async()=>{try{let e=await (0,y.controlPlaneRequest)("mutation { createAgentEnrollmentToken { token expiresAt } }");A(e.createAgentEnrollmentToken)}catch(e){N(e instanceof Error?e.message:String(e))}},M=async()=>{try{await (0,m.copyText)(z)}catch{N(b("copyFailed"))}},O=window.location.origin,z=C?`control-agent enroll --server ${T??O??"http://127.0.0.1:3090"} --enrollment-token ${C.token}`:"",P=[...new Set([O,...e].filter(e=>!!e))];return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:b("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:b("description")})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(c.Button,{onClick:()=>void $(),variant:"outline",children:[(0,t.jsx)(s.RefreshCw,{}),b("refresh")]}),(0,t.jsxs)(c.Button,{onClick:()=>void I(),children:[(0,t.jsx)(i.Plus,{}),b("enroll")]})]})]}),C&&(0,t.jsx)(d.Card,{children:(0,t.jsxs)(d.CardContent,{children:[(0,t.jsx)("h2",{className:"font-medium",children:b("enrollmentTitle")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:b("enrollmentDescription")}),(0,t.jsxs)(f.Select,{onValueChange:R,value:T??O??void 0,children:[(0,t.jsx)(f.SelectTrigger,{"aria-label":b("serverAddress"),className:"mt-3 w-full sm:w-auto sm:min-w-72",children:(0,t.jsx)(f.SelectValue,{placeholder:b("serverAddress")})}),(0,t.jsx)(f.SelectContent,{align:"start",children:P.map(e=>(0,t.jsx)(f.SelectItem,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-muted p-3",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 break-all text-xs",children:z}),(0,t.jsx)(c.Button,{"aria-label":b("copy"),onClick:()=>void M(),size:"icon-sm",variant:"ghost",children:(0,t.jsx)(r.Copy,{})})]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:b("expires",{date:new Date(C.expiresAt).toLocaleString()})})]})}),S&&(0,t.jsx)(l.Alert,{variant:"destructive",children:(0,t.jsx)(l.AlertDescription,{children:S})}),E?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(p.Spinner,{}),b("loading")]}):0===w.length?(0,t.jsx)(u.Empty,{className:"border py-10",children:(0,t.jsxs)(u.EmptyHeader,{children:[(0,t.jsx)(u.EmptyMedia,{variant:"icon",children:(0,t.jsx)(n,{})}),(0,t.jsx)(u.EmptyTitle,{children:b("emptyTitle")}),(0,t.jsx)(u.EmptyDescription,{children:b("emptyDescription")})]})}):(0,t.jsx)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:w.map(e=>(0,t.jsx)(h.Link,{href:`/agents/${e.id}`,className:"rounded-xl outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(d.Card,{className:"h-full transition-colors hover:bg-muted/50",children:(0,t.jsxs)(d.CardContent,{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"truncate font-medium",children:e.name}),(0,t.jsx)("p",{className:"truncate text-sm text-muted-foreground",children:e.hostname})]}),(0,t.jsx)(g.StatusBadge,{status:e.connectionStatus})]}),(0,t.jsxs)("dl",{className:"mt-4 grid grid-cols-2 gap-2 text-xs text-muted-foreground",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:b("version")}),(0,t.jsx)("dd",{className:"text-foreground",children:e.version})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:b("platform")}),(0,t.jsx)("dd",{className:"text-foreground",children:e.cpuModel??e.architecture})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)("dt",{children:b("lastSeen")}),(0,t.jsx)("dd",{className:"text-foreground",children:e.lastSeenAt?new Date(e.lastSeenAt).toLocaleString():b("never")})]})]})]})})},e.id))})]})}],697270)}]);