@shepai/cli 1.78.0-pr247.58f85f0 → 1.78.0-pr247.d196fda
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.js +3 -3
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +103 -227
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b3a4cef4._.js → [root-of-the-server]__bff2deea._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b3a4cef4._.js.map → [root-of-the-server]__bff2deea._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d076a90b._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d076a90b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_a68d7e1c._.js → _0bd0fafb._.js} +2 -2
- package/web/.next/server/chunks/ssr/_0bd0fafb._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0e9d6bf7._.js +3 -0
- package/web/.next/server/chunks/ssr/_0e9d6bf7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_14fa79b2._.js +3 -0
- package/web/.next/server/chunks/ssr/_14fa79b2._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_61351ed3._.js +3 -0
- package/web/.next/server/chunks/ssr/_61351ed3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_fe901bb8._.js → _758603c5._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_fe901bb8._.js.map → _758603c5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_8400c8bb._.js +3 -0
- package/web/.next/server/chunks/ssr/_8400c8bb._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_9ac70f88._.js +5 -0
- package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_34fbed18._.js → _9d11d025._.js} +2 -2
- package/web/.next/server/chunks/ssr/_9d11d025._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a29296f0._.js +3 -0
- package/web/.next/server/chunks/ssr/_a29296f0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_c763badc._.js → _a66cde20._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_c763badc._.js.map → _a66cde20._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_2dfa2f07._.js → _b3692240._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_2dfa2f07._.js.map → _b3692240._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_1bb131c4._.js → _d4b20e29._.js} +2 -2
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ed356507._.js +3 -0
- package/web/.next/server/chunks/ssr/_ed356507._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{node_modules__pnpm_c931457d._.js → node_modules__pnpm_1fcecd3a._.js} +2 -2
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1fcecd3a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_30d7eeda._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_30d7eeda._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_565a14f8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_565a14f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +26 -26
- package/web/.next/static/chunks/100bf43ee3be227d.js +1 -0
- package/web/.next/static/chunks/{cbcbfe23acaa4dc4.js → 2cde9c085a88faa2.js} +1 -1
- package/web/.next/static/chunks/37491dd00b50c048.js +1 -0
- package/web/.next/static/chunks/37701ed5abefa856.js +1 -0
- package/web/.next/static/chunks/42bd17823c7f41a1.css +2 -0
- package/web/.next/static/chunks/4570b60e2b206821.js +1 -0
- package/web/.next/static/chunks/4d5a5c3d8373423e.js +1 -0
- package/web/.next/static/chunks/51454a23ce051ec9.js +1 -0
- package/web/.next/static/chunks/52b56677c842e45f.js +3 -0
- package/web/.next/static/chunks/5f627cfc35ca21bc.js +1 -0
- package/web/.next/static/chunks/{b75777503f1b2966.js → 726928a3ba2ec53b.js} +1 -1
- package/web/.next/static/chunks/837e3099cbc581a3.js +1 -0
- package/web/.next/static/chunks/876edf7bbd901942.js +1 -0
- package/web/.next/static/chunks/883ee29df0f75f24.js +1 -0
- package/web/.next/static/chunks/8f122c3ac2102300.js +11 -0
- package/web/.next/static/chunks/bd539e609555e2b7.js +1 -0
- package/web/.next/static/chunks/c8b2868ae430a586.js +1 -0
- package/web/.next/static/chunks/edbd674102e897b4.js +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a337ca5c._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a337ca5c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_06db7efd._.js +0 -3
- package/web/.next/server/chunks/ssr/_06db7efd._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js +0 -3
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_34fbed18._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_4031d614._.js +0 -3
- package/web/.next/server/chunks/ssr/_4031d614._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5c4ce700._.js +0 -3
- package/web/.next/server/chunks/ssr/_5c4ce700._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_63868199._.js +0 -3
- package/web/.next/server/chunks/ssr/_63868199._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_6d26a08f._.js +0 -3
- package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a68d7e1c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js +0 -5
- package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_5412e589._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_5412e589._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js.map +0 -1
- package/web/.next/static/chunks/0fb7745c30469b39.js +0 -1
- package/web/.next/static/chunks/1f57d0c949dbb44d.js +0 -1
- package/web/.next/static/chunks/29e2d20301cc0228.js +0 -1
- package/web/.next/static/chunks/3019bd1ba5b6dbd7.js +0 -1
- package/web/.next/static/chunks/303a1217006489b9.js +0 -1
- package/web/.next/static/chunks/368086b5cb9990cf.css +0 -2
- package/web/.next/static/chunks/43914dc116d274e5.js +0 -1
- package/web/.next/static/chunks/6a3e8ea6e1fd2113.js +0 -1
- package/web/.next/static/chunks/a170e5077f411792.js +0 -1
- package/web/.next/static/chunks/a2a64131db68e043.js +0 -1
- package/web/.next/static/chunks/b0c40d4968fc3f39.js +0 -11
- package/web/.next/static/chunks/ca60853bf54ad0e6.js +0 -1
- package/web/.next/static/chunks/e405f0502431ea60.js +0 -3
- package/web/.next/static/chunks/e51ca3823c36ce3d.js +0 -1
- /package/web/.next/static/{ol4LBWGA7YIGGHfJPTk1X → _p0UmHUYkX-o1pGYlVer1}/_buildManifest.js +0 -0
- /package/web/.next/static/{ol4LBWGA7YIGGHfJPTk1X → _p0UmHUYkX-o1pGYlVer1}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{ol4LBWGA7YIGGHfJPTk1X → _p0UmHUYkX-o1pGYlVer1}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17840,e=>{"use strict";var t=e.i(79054),r=e.i(31406),n=e.i(60112),o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),a=o((e,t)=>{var r=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),o=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?r(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n},a=n((e,t)=>{function r(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function a(e,t,r,n){var o=""+t,a=""+r;if(!e&&o>a){var i=o;o=a,a=i}return o+"\x01"+a+"\x01"+(void 0===n?"\0":n)}function i(e,t){return a(e,t.v,t.w,t.name)}t.exports=class{constructor(e){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(o){var a=r.parent(o);return void 0===a||t.hasNode(a)?(n[o]=a,a):a in n?n[a]:e(a)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o}),this}setEdge(){var e,t,n,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2==arguments.length&&(o=arguments[1],i=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var d=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,d))return i&&(this._edgeLabels[d]=o),this;if(void 0!==n&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=i?o:this._defaultEdgeLabelFn(e,t,n);var l=function(e,t,r,n){var o=""+t,a=""+r;if(!e&&o>a){var i=o;o=a,a=i}var s={v:o,w:a};return n&&(s.name=n),s}(this._isDirected,e,t,n);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var o=1==arguments.length?i(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),s=this._edgeObjs[o];return s&&(e=s.v,t=s.w,delete this._edgeLabels[o],delete this._edgeObjs[o],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][o],delete this._out[e][o],this._edgeCount--),this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}filterEdges(e,t,r){if(e){var n=Object.values(e);return r?n.filter(function(e){return e.v===t&&e.w===r||e.v===r&&e.w===t}):n}}}}),i=n((e,t)=>{t.exports="3.0.2"}),s=n((e,t)=>{t.exports={Graph:a(),version:i()}}),d=n((e,t)=>{var r=a();t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),o={v:e};return void 0!==r&&(o.value=r),void 0!==n&&(o.parent=n),o}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}}),l=n((e,t)=>{t.exports=function(e,t,n,o){return function(e,t,r,n){var o={},a=!0,i=0,s=e.nodes(),d=function(e){var t=r(e);o[e.v].distance+t<o[e.w].distance&&(o[e.w]={distance:o[e.v].distance+t,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){n(e).forEach(function(t){var r=t.v===e?t.v:t.w,n=r===t.v?t.w:t.v;d({v:r,w:n})})})};s.forEach(function(e){o[e]={distance:e===t?0:1/0}});for(var c=s.length,u=1;u<c&&(a=!1,i++,l(),a);u++);if(i===c-1&&(a=!1,l(),a))throw Error("The graph contains a negative weight cycle");return o}(e,String(t),n||r,o||function(t){return e.outEdges(t)})};var r=()=>1}),c=n((e,t)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(o){t=[],function n(o){Object.hasOwn(r,o)||(r[o]=!0,t.push(o),e.successors(o).forEach(n),e.predecessors(o).forEach(n))}(o),t.length&&n.push(t)}),n}}),u=n((e,t)=>{t.exports=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,o=r[e],a=r[t];r[e]=a,r[t]=o,n[a.key]=e,n[o.key]=t}}}),h=n((e,t)=>{var r=u();t.exports=function(e,t,o,a){return function(e,t,n,o){var a,i,s={},d=new r,l=function(e){var t=e.v!==a?e.v:e.w,r=s[t],o=n(e),l=i.distance+o;if(o<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);l<r.distance&&(r.distance=l,r.predecessor=a,d.decrease(t,l))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;s[e]={distance:r},d.add(e,r)});d.size()>0&&(i=s[a=d.removeMin()]).distance!==1/0;)o(a).forEach(l);return s}(e,String(t),o||n,a||function(t){return e.outEdges(t)})};var n=()=>1}),p=n((e,t)=>{var r=h();t.exports=function(e,t,n){return e.nodes().reduce(function(o,a){return o[a]=r(e,a,t,n),o},{})}}),f=n((e,t)=>{t.exports=function(e,t,r){if(void 0!==e[t].predecessor)throw Error("Invalid source vertex");if(void 0===e[r].predecessor&&r!==t)throw Error("Invalid destination vertex");return{weight:e[r].distance,path:function(e,t,r){for(var n=[],o=r;o!==t;)n.push(o),o=e[o].predecessor;return n.push(t),n.reverse()}(e,t,r)}}}),g=n((e,t)=>{t.exports=function(e){var t=0,r=[],n={},o=[];return e.nodes().forEach(function(a){Object.hasOwn(n,a)||function a(i){var s=n[i]={onStack:!0,lowlink:t,index:t++};if(r.push(i),e.successors(i).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))}),s.lowlink===s.index){var d,l=[];do n[d=r.pop()].onStack=!1,l.push(d);while(i!==d)o.push(l)}}(a)}),o}}),v=n((e,t)=>{var r=g();t.exports=function(e){return r(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}}),m=n((e,t)=>{t.exports=function(e,t,n){var o,a,i,s,d;return o=e,a=t||r,i=n||function(t){return e.outEdges(t)},s={},(d=o.nodes()).forEach(function(e){s[e]={},s[e][e]={distance:0},d.forEach(function(t){e!==t&&(s[e][t]={distance:1/0})}),i(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=a(t);s[e][r]={distance:n,predecessor:e}})}),d.forEach(function(e){var t=s[e];d.forEach(function(r){var n=s[r];d.forEach(function(r){var o=n[e],a=t[r],i=n[r],s=o.distance+a.distance;s<i.distance&&(i.distance=s,i.predecessor=a.predecessor)})})}),s};var r=()=>1}),y=n((e,t)=>{function r(e){var t={},r={},o=[];if(e.sinks().forEach(function a(i){if(Object.hasOwn(r,i))throw new n;Object.hasOwn(t,i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(a),delete r[i],o.push(i))}),Object.keys(t).length!==e.nodeCount())throw new n;return o}var n=class extends Error{constructor(){super(...arguments)}};t.exports=r,r.CycleException=n}),w=n((e,t)=>{var r=y();t.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}}),b=n((e,t)=>{t.exports=function(e,t,r,n,o){Array.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),i={};return t.forEach(function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);o=function e(t,r,n,o,a,i,s){return Object.hasOwn(o,r)||(o[r]=!0,n||(s=i(s,r)),a(r).forEach(function(r){s=e(t,r,n,o,a,i,s)}),n&&(s=i(s,r))),s}(e,t,"post"===r,i,a,n,o)}),o}}),x=n((e,t)=>{var r=b();t.exports=function(e,t,n){return r(e,t,n,function(e,t){return e.push(t),e},[])}}),E=n((e,t)=>{var r=x();t.exports=function(e,t){return r(e,t,"post")}}),k=n((e,t)=>{var r=x();t.exports=function(e,t){return r(e,t,"pre")}}),j=n((e,t)=>{var r=a(),n=u();t.exports=function(e,t){var o,a=new r,i={},s=new n;function d(e){var r=e.v===o?e.w:e.v,n=s.priority(r);if(void 0!==n){var a=t(e);a<n&&(i[r]=o,s.decrease(r,a))}}if(0===e.nodeCount())return a;e.nodes().forEach(function(e){s.add(e,1/0),a.setNode(e)}),s.decrease(e.nodes()[0],0);for(var l=!1;s.size()>0;){if(Object.hasOwn(i,o=s.removeMin()))a.setEdge(o,i[o]);else{if(l)throw Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(o).forEach(d)}return a}}),_=n((e,t)=>{var r=h(),n=l();t.exports=function(e,t,o,a){return function(e,t,o,a){if(void 0===o)return r(e,t,o,a);for(var i=!1,s=e.nodes(),d=0;d<s.length;d++){for(var l=a(s[d]),c=0;c<l.length;c++){var u=l[c],h=u.v===s[d]?u.v:u.w,p=h===u.v?u.w:u.v;0>o({v:h,w:p})&&(i=!0)}if(i)return n(e,t,o,a)}return r(e,t,o,a)}(e,t,o,a||function(t){return e.outEdges(t)})}}),C=n((e,t)=>{t.exports={bellmanFord:l(),components:c(),dijkstra:h(),dijkstraAll:p(),extractPath:f(),findCycles:v(),floydWarshall:m(),isAcyclic:w(),postorder:E(),preorder:k(),prim:j(),shortestPaths:_(),reduce:b(),tarjan:g(),topsort:y()}}),N=s();t.exports={Graph:N.Graph,json:d(),alg:C(),version:N.version}}),i=o((e,t)=>{function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}}),s=o((e,t)=>{var r=a().Graph,n=i();t.exports=function(e,t){var a,i;let l,c,u,h,p;if(1>=e.nodeCount())return[];let f=(a=e,i=t||o,l=new r,c=0,u=0,a.nodes().forEach(e=>{l.setNode(e,{v:e,in:0,out:0})}),a.edges().forEach(e=>{let t=l.edge(e.v,e.w)||0,r=i(e);l.setEdge(e.v,e.w,t+r),u=Math.max(u,l.node(e.v).out+=r),c=Math.max(c,l.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(u+c+3).map(()=>new n),p=c+1,l.nodes().forEach(e=>{d(h,p,l.node(e))}),{graph:l,buckets:h,zeroIdx:p});return(function(e,t,r){let n=[],o=t[t.length-1],a=t[0],i;for(;e.nodeCount();){for(;i=a.dequeue();)s(e,t,r,i);for(;i=o.dequeue();)s(e,t,r,i);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(i=t[o].dequeue()){n=n.concat(s(e,t,r,i,!0));break}}}return n})(f.graph,f.buckets,f.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};var o=()=>1;function s(e,t,r,n,o){let a=o?[]:void 0;return e.inEdges(n.v).forEach(n=>{let i=e.edge(n),s=e.node(n.v);o&&a.push({v:n.v,w:n.w}),s.out-=i,d(t,r,s)}),e.outEdges(n.v).forEach(n=>{let o=e.edge(n),a=n.w,i=e.node(a);i.in-=o,d(t,r,i)}),e.removeNode(n.v),a}function d(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}}),d=o((e,t)=>{var r=a().Graph;function n(e,t,r,n){for(var o=n;e.hasNode(o);)o=d(n);return r.dummy=t,e.setNode(o,r),o}t.exports={addBorderNode:function(e,t,r,o){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=o),n(e,"border",a,t)},addDummyNode:n,applyWithChunking:o,asNonCompoundGraph:function(e){let t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=l(i(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),o=n.rank;void 0!==o&&(t[o][n.order]=r)}),t},intersectRect:function(e,t){let r,n,o=e.x,a=e.y,i=t.x-o,s=t.y-a,d=e.width/2,l=e.height/2;if(!i&&!s)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*d>Math.abs(i)*l?(s<0&&(l=-l),r=l*i/s,n=l):(i<0&&(d=-d),r=d,n=d*s/i),{x:o+r,y:a+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:i,normalizeRanks:function(e){let t=o(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},range:l,removeEmptyRanks:function(e){let t=o(Math.min,e.nodes().map(t=>e.node(t).rank).filter(e=>void 0!==e)),r=[];e.nodes().forEach(n=>{let o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)});let n=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%a!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new r().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:d,zipObject:c};function o(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function i(e){return o(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}var s=0;function d(e){return e+""+ ++s}function l(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let o=[];for(let t=e;n(t);t+=r)o.push(t);return o}function c(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}}),l=o((e,t)=>{var r=s(),n=d().uniqueId;t.exports={run:function(e){var t,o;let a,i,s;("greedy"===e.graph().acyclicer?r(e,(t=e,e=>t.edge(e).weight)):(a=[],i={},s={},(o=e).nodes().forEach(function e(t){Object.hasOwn(s,t)||(s[t]=!0,i[t]=!0,o.outEdges(t).forEach(t=>{Object.hasOwn(i,t.w)?a.push(t):e(t.w)}),delete i[t])}),a)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}}),c=o((e,t)=>{var r=d();t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let n,o,a,i=t.v,s=e.node(i).rank,d=t.w,l=e.node(d).rank,c=t.name,u=e.edge(t),h=u.labelRank;if(l!==s+1){for(e.removeEdge(t),a=0,++s;s<l;++a,++s)u.points=[],o={width:0,height:0,edgeLabel:u,edgeObj:t,rank:s},n=r.addDummyNode(e,"edge",o,"_d"),s===h&&(o.width=u.width,o.height=u.height,o.dummy="edge-label",o.labelpos=u.labelpos),e.setEdge(i,n,{weight:u.weight},c),0===a&&e.graph().dummyChains.push(n),i=n;e.setEdge(i,d,{weight:u.weight},c)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,o;for(e.setEdge(r.edgeObj,n);r.dummy;)o=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=o,r=e.node(t)})}}}),u=o((e,t)=>{var{applyWithChunking:r}=d();t.exports={longestPath:function(e){var t={};e.sources().forEach(function n(o){var a=e.node(o);if(Object.hasOwn(t,o))return a.rank;t[o]=!0;var i=r(Math.min,e.outEdges(o).map(t=>null==t?1/0:n(t.w)-e.edge(t).minlen));return i===1/0&&(i=0),a.rank=i})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}),h=o((e,t)=>{var r=a().Graph,n=u().slack;t.exports=function(e){var t,o,a,i,s=new r({directed:!1}),d=e.nodes()[0],l=e.nodeCount();for(s.setNode(d,{});t=s,o=e,t.nodes().forEach(function e(r){o.nodeEdges(r).forEach(a=>{var i=a.v,s=r===i?a.w:i;t.hasNode(s)||n(o,a)||(t.setNode(s,{}),t.setEdge(r,s,{}),e(s))})}),t.nodeCount()<l;)a=function(e,t){return t.edges().reduce((r,o)=>{let a=1/0;return e.hasNode(o.v)!==e.hasNode(o.w)&&(a=n(t,o)),a<r[0]?[a,o]:r},[1/0,null])[1]}(s,e),i=s.hasNode(a.v)?n(e,a):-n(e,a),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(s,e,i);return s}}),p=o((e,t)=>{var r=h(),n=u().slack,o=u().longestPath,i=a().alg.preorder,s=a().alg.postorder,l=d().simplify;function c(e){o(e=l(e));var t,n,a=r(e);for(g(a),p(a,e);t=v(a);)n=m(a,e,t),y(a,e,t,n)}function p(e,t){var r=s(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,o,a,i;return n=e,o=t,a=r,i=n.node(a).parent,void(n.edge(a,i).cutvalue=f(n,o,a))})}function f(e,t,r){var n=e.node(r).parent,o=!0,a=t.edge(r,n),i=0;return a||(o=!1,a=t.edge(n,r)),i=a.weight,t.nodeEdges(r).forEach(a=>{var s=a.v===r,d=s?a.w:a.v;if(d!==n){var l,c,u,h=s===o,p=t.edge(a).weight;if(i+=h?p:-p,l=e,c=r,u=d,l.hasEdge(c,u)){var f=e.edge(r,d).cutvalue;i+=h?-f:f}}}),i}function g(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,o,a){var i=n,s=t.node(o);return r[o]=!0,t.neighbors(o).forEach(a=>{Object.hasOwn(r,a)||(n=e(t,r,n,a,o))}),s.low=i,s.lim=n++,a?s.parent=a:delete s.parent,n}(e,{},1,t)}function v(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function m(e,t,r){var o=r.v,a=r.w;t.hasEdge(o,a)||(o=r.w,a=r.v);var i=e.node(o),s=e.node(a),d=i,l=!1;return i.lim>s.lim&&(d=s,l=!0),t.edges().filter(t=>l===w(e,e.node(t.v),d)&&l!==w(e,e.node(t.w),d)).reduce((e,r)=>n(t,r)<n(t,e)?r:e)}function y(e,t,r,n){var o,a,s,d,l=r.v,c=r.w;e.removeEdge(l,c),e.setEdge(n.v,n.w,{}),g(e),p(e,t),o=e,a=t,s=o.nodes().find(e=>!a.node(e).parent),(d=(d=i(o,s)).slice(1)).forEach(e=>{var t=o.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function w(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=c,c.initLowLimValues=g,c.initCutValues=p,c.calcCutValue=f,c.leaveEdge=v,c.enterEdge=m,c.exchangeEdges=y}),f=o((e,t)=>{var r=u().longestPath,n=h(),o=p();t.exports=function(e){var t,i=e.graph().ranker;if(i instanceof Function)return i(e);switch(e.graph().ranker){case"network-simplex":default:o(e);break;case"tight-tree":r(t=e),n(t);break;case"longest-path":a(e);case"none":}};var a=r}),g=o((e,t)=>{t.exports=function(e){var t;let r,n,o=(r={},n=0,(t=e).children().forEach(function e(o){let a=n;t.children(o).forEach(e),r[o]={low:a,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,a=function(e,t,r,n){let o=[],a=[],i=Math.min(t[r].low,t[n].low),s=Math.max(t[r].lim,t[n].lim),d,l;d=r;do o.push(d=e.parent(d));while(d&&(t[d].low>i||s>t[d].lim))for(l=d,d=n;(d=e.parent(d))!==l;)a.push(d);return{path:o.concat(a.reverse()),lca:l}}(e,o,n.v,n.w),i=a.path,s=a.lca,d=0,l=i[0],c=!0;for(;t!==n.w;){if(r=e.node(t),c){for(;(l=i[d])!==s&&e.node(l).maxRank<r.rank;)d++;l===s&&(c=!1)}if(!c){for(;d<i.length-1&&e.node(l=i[d+1]).minRank<=r.rank;)d++;l=i[d]}e.setParent(t,l),t=e.successors(t)[0]}})}}),v=o((e,t)=>{var r=d();t.exports={run:function(e){var t,n,o;let a=r.addDummyNode(e,"root",{},"_root"),i=(n={},(t=e).children().forEach(e=>(function e(r,o){var a=t.children(r);a&&a.length&&a.forEach(t=>e(t,o+1)),n[r]=o})(e,1)),n),s=Object.values(i),d=r.applyWithChunking(Math.max,s)-1,l=2*d+1;e.graph().nestingRoot=a,e.edges().forEach(t=>e.edge(t).minlen*=l);let c=(o=e).edges().reduce((e,t)=>e+o.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,n,o,a,i,s,d){let l=t.children(d);if(!l.length){d!==n&&t.setEdge(n,d,{weight:0,minlen:o});return}let c=r.addBorderNode(t,"_bt"),u=r.addBorderNode(t,"_bb"),h=t.node(d);t.setParent(c,d),h.borderTop=c,t.setParent(u,d),h.borderBottom=u,l.forEach(r=>{e(t,n,o,a,i,s,r);let l=t.node(r),h=l.borderTop?l.borderTop:r,p=l.borderBottom?l.borderBottom:r,f=l.borderTop?a:2*a,g=h!==p?1:i-s[d]+1;t.setEdge(c,h,{weight:f,minlen:g,nestingEdge:!0}),t.setEdge(p,u,{weight:f,minlen:g,nestingEdge:!0})}),t.parent(d)||t.setEdge(n,c,{weight:0,minlen:i+s[d]})})(e,a,l,c,d,i,t)),e.graph().nodeRankFactor=l},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}),m=o((e,t)=>{var r=d();function n(e,t,n,o,a,i){let s=a[t][i-1],d=r.addDummyNode(e,"border",{width:0,height:0,rank:i,borderType:t},n);a[t][i]=d,e.setParent(d,o),s&&e.setEdge(s,d,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let o=e.children(r),a=e.node(r);if(o.length&&o.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,o=a.maxRank+1;t<o;++t)n(e,"borderLeft","_bl",r,a,t),n(e,"borderRight","_br",r,a,t)}})}}),y=o((e,t)=>{function r(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>n(e.edge(t)))}function n(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.y=-e.y}function a(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&r(e)},undo:function(e){var t,n;let i=e.graph().rankdir.toLowerCase();("bt"===i||"rl"===i)&&((t=e).nodes().forEach(e=>o(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(o),Object.hasOwn(r,"y")&&o(r)})),("lr"===i||"rl"===i)&&((n=e).nodes().forEach(e=>a(n.node(e))),n.edges().forEach(e=>{let t=n.edge(e);t.points.forEach(a),Object.hasOwn(t,"x")&&a(t)}),r(e))}}}),w=o((e,t)=>{var r=d();t.exports=function(e){let t={},n=e.nodes().filter(t=>!e.children(t).length),o=n.map(t=>e.node(t).rank),a=r.applyWithChunking(Math.max,o),i=r.range(a+1).map(()=>[]);return n.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,i[e.node(n).rank].push(n),e.successors(n).forEach(r))}),i}}),b=o((e,t)=>{var r=d().zipObject;t.exports=function(e,t){let n=0;for(let o=1;o<t.length;++o)n+=function(e,t,n){let o=r(n,n.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:o[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),i=1;for(;i<n.length;)i<<=1;let s=2*i-1;i-=1;let d=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+i;d[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=d[t+1]),t=t-1>>1,d[t]+=e.weight;l+=e.weight*r}),l}(e,t[o-1],t[o]);return n}}),x=o((e,t)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}}),E=o((e,t)=>{var r=d();t.exports=function(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>r.pick(e,["vs","i","barycenter","weight"]))}(Object.values(n).filter(e=>!e.indegree))}}),k=o((e,t)=>{var r=d();function n(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var o;let a=r.partition(e,e=>Object.hasOwn(e,"barycenter")),i=a.lhs,s=a.rhs.sort((e,t)=>t.i-e.i),d=[],l=0,c=0,u=0;i.sort((o=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:o?t.i-e.i:e.i-t.i)),u=n(d,s,u),i.forEach(e=>{u+=e.vs.length,d.push(e.vs),l+=e.barycenter*e.weight,c+=e.weight,u=n(d,s,u)});let h={vs:d.flat(!0)};return c&&(h.barycenter=l/c,h.weight=c),h}}),j=o((e,t)=>{var r=x(),n=E(),o=k();t.exports=function e(t,a,i,s){var d,l;let c=t.children(a),u=t.node(a),h=u?u.borderLeft:void 0,p=u?u.borderRight:void 0,f={};h&&(c=c.filter(e=>e!==h&&e!==p));let g=r(t,c);g.forEach(r=>{if(t.children(r.v).length){var n,o;let a=e(t,r.v,i,s);f[r.v]=a,Object.hasOwn(a,"barycenter")&&(n=r,o=a,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+o.barycenter*o.weight)/(n.weight+o.weight),n.weight+=o.weight):(n.barycenter=o.barycenter,n.weight=o.weight))}});let v=n(g,i);d=v,l=f,d.forEach(e=>{e.vs=e.vs.flatMap(e=>l[e]?l[e].vs:e)});let m=o(v,s);if(h&&(m.vs=[h,m.vs,p].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(p)[0]);Object.hasOwn(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+e.order+r.order)/(m.weight+2),m.weight+=2}return m}}),_=o((e,t)=>{var r=a().Graph,n=d();t.exports=function(e,t,o,a){a||(a=e.nodes());let i=function(e){for(var t;e.hasNode(t=n.uniqueId("_root")););return t}(e),s=new r({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return a.forEach(r=>{let n=e.node(r),a=e.parent(r);(n.rank===t||n.minRank<=t&&t<=n.maxRank)&&(s.setNode(r),s.setParent(r,a||i),e[o](r).forEach(t=>{let n=t.v===r?t.w:t.v,o=s.edge(n,r),a=void 0!==o?o.weight:0;s.setEdge(n,r,{weight:e.edge(t).weight+a})}),Object.hasOwn(n,"minRank")&&s.setNode(r,{borderLeft:n.borderLeft[t],borderRight:n.borderRight[t]}))}),s}}),C=o((e,t)=>{t.exports=function(e,t,r){let n={},o;r.forEach(r=>{let a=e.parent(r),i,s;for(;a;){if((i=e.parent(a))?(s=n[i],n[i]=a):(s=o,o=a),s&&s!==a)return void t.setEdge(s,a);a=i}})}}),N=o((e,t)=>{var r=w(),n=b(),o=j(),i=_(),s=C(),l=a().Graph,c=d();function u(e,t,r){let n=new Map,o=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&o(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&o(e,t)}return t.map(function(t){return i(e,t,r,n.get(t)||[])})}function h(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,a={}){if("function"==typeof a.customOrder)return void a.customOrder(t,e);let i=c.maxRank(t),d=u(t,c.range(1,i+1),"inEdges"),p=u(t,c.range(i-1,-1,-1),"outEdges"),f=r(t);if(h(t,f),a.disableOptimalOrderHeuristic)return;let g=1/0,v,m=a.constraints||[];for(let e=0,r=0;r<4;++e,++r){(function(e,t,r){let n=new l;e.forEach(function(e){r.forEach(e=>n.setEdge(e.left,e.right));let a=e.graph().root,i=o(e,a,n,t);i.vs.forEach((t,r)=>e.node(t).order=r),s(e,n,i.vs)})})(e%2?d:p,e%4>=2,m),f=c.buildLayerMatrix(t);let a=n(t,f);a<g?(r=0,v=Object.assign({},f),g=a):a===g&&(v=structuredClone(f))}h(t,v)}}),O=o((e,t)=>{var r=a().Graph,n=d();function o(e,t){let r={};return t.length&&t.reduce(function(t,n){let o=0,a=0,i=t.length,d=n[n.length-1];return n.forEach((t,l)=>{let c=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),u=c?e.node(c).order:i;(c||t===d)&&(n.slice(a,l+1).forEach(t=>{e.predecessors(t).forEach(n=>{let a=e.node(n),i=a.order;(i<o||u<i)&&!(a.dummy&&e.node(t).dummy)&&s(r,n,t)})}),a=l+1,o=u)}),n}),r}function i(e,t){let r={};function o(t,o,a,i,d){let l;n.range(o,a).forEach(n=>{l=t[n],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<i||n.order>d)&&s(r,t,l)})})}return t.length&&t.reduce(function(t,r){let n=-1,a,i=0;return r.forEach((s,d)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,o(r,i,d,n,a),i=d,n=a)}o(r,i,r.length,a,t.length)}),r}),r}function s(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function l(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function c(e,t,r,n){let o={},a={},i={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,a[e]=e,i[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=n(e);if(s.length){let n=((s=s.sort((e,t)=>i[e]-i[t])).length-1)/2;for(let d=Math.floor(n),c=Math.ceil(n);d<=c;++d){let n=s[d];a[e]===e&&t<i[n]&&!l(r,e,n)&&(a[n]=e,a[e]=o[e]=o[n],t=i[n])}}})}),{root:o,align:a}}function u(e,t,n,o,a){var i,s,d,l,c,u,h;let p,f,g,v={},m=(i=e,s=t,d=n,l=a,p=new r,g=(c=(f=i.graph()).nodesep,u=f.edgesep,h=l,(e,t,r)=>{let n=e.node(t),o=e.node(r),a,i;if(a=0+n.width/2,Object.hasOwn(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":i=-n.width/2;break;case"r":i=n.width/2}if(i&&(a+=h?i:-i),i=0,a+=(n.dummy?u:c)/2,a+=(o.dummy?u:c)/2,a+=o.width/2,Object.hasOwn(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":i=o.width/2;break;case"r":i=-o.width/2}return i&&(a+=h?i:-i),i=0,a}),s.forEach(e=>{let t;e.forEach(e=>{let r=d[e];if(p.setNode(r),t){var n=d[t],o=p.edge(n,r);p.setEdge(n,r,Math.max(g(i,e,t),o||0))}t=e})}),p),y=a?"borderLeft":"borderRight";function w(e,t){let r=m.nodes().slice(),n={},o=r.pop();for(;o;){if(n[o])e(o);else for(let e of(n[o]=!0,r.push(o),t(o)))r.push(e);o=r.pop()}}return w(function(e){v[e]=m.inEdges(e).reduce((e,t)=>Math.max(e,v[t.v]+m.edge(t)),0)},m.predecessors.bind(m)),w(function(t){let r=m.outEdges(t).reduce((e,t)=>Math.min(e,v[t.w]-m.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==y&&(v[t]=Math.max(v[t],r))},m.successors.bind(m)),Object.keys(o).forEach(e=>v[e]=v[n[e]]),v}function h(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,o=1/0;Object.entries(r).forEach(([t,r])=>{var a,i;let s=(a=e,i=t,a.node(i).width/2);n=Math.max(r+s,n),o=Math.min(r-s,o)});let a=n-o;return a<t[0]&&(t=[a,r]),t},[1/0,null])[1]}function p(e,t){let r=Object.values(t),o=n.applyWithChunking(Math.min,r),a=n.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(i=>{let s=r+i,d=e[s];if(d===t)return;let l=Object.values(d),c=o-n.applyWithChunking(Math.min,l);"l"!==i&&(c=a-n.applyWithChunking(Math.max,l)),c&&(e[s]=n.mapValues(d,e=>e+c))})})}function f(e,t){return n.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t=n.buildLayerMatrix(e),r=Object.assign(o(e,t),i(e,t)),a={},s;["u","d"].forEach(o=>{s="u"===o?t:Object.values(t).reverse(),["l","r"].forEach(t=>{"r"===t&&(s=s.map(e=>Object.values(e).reverse()));let i=("u"===o?e.predecessors:e.successors).bind(e),d=c(e,s,r,i),l=u(e,s,d.root,d.align,"r"===t);"r"===t&&(l=n.mapValues(l,e=>-e)),a[o+t]=l})});let d=h(e,a);return p(a,d),f(a,e.graph().align)},findType1Conflicts:o,findType2Conflicts:i,addConflict:s,hasConflict:l,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:h,balance:f}}),M=o((e,t)=>{var r=d(),n=O().positionX;t.exports=function(e){var t;let o,a,i,s;t=e=r.asNonCompoundGraph(e),o=r.buildLayerMatrix(t),a=t.graph().ranksep,i=t.graph().rankalign,s=0,o.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>{let n=t.node(e);"top"===i?n.y=s+n.height/2:"bottom"===i?n.y=s+r-n.height/2:n.y=s+r/2}),s+=r+a}),Object.entries(n(e)).forEach(([t,r])=>e.node(t).x=r)}}),R=o((e,t)=>{var r=l(),n=c(),o=f(),i=d().normalizeRanks,s=g(),u=d().removeEmptyRanks,h=v(),p=m(),w=y(),b=N(),x=M(),E=d(),k=a().Graph;t.exports=function(e,t={}){let a=t.debugTiming?E.time:E.notime;return a("layout",()=>{let d=a(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new k({multigraph:!0,compound:!0}),n=D(t.graph()),r.setGraph(Object.assign({},_,T(n,j),E.pick(n,C))),t.nodes().forEach(e=>{let n=T(D(t.node(e)),O);Object.keys(R).forEach(e=>{void 0===n[e]&&(n[e]=R[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=D(t.edge(e));r.setEdge(e,Object.assign({},S,T(n,P),E.pick(n,L)))}),r});return a(" runLayout",()=>{var e,l,c;return e=d,l=a,c=t,void(l(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),l(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),l(" acyclic",()=>r.run(e)),l(" nestingGraph.run",()=>h.run(e)),l(" rank",()=>o(E.asNonCompoundGraph(e))),l(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};E.addDummyNode(t,"edge-proxy",n,"_ep")}})}),l(" removeEmptyRanks",()=>u(e)),l(" nestingGraph.cleanup",()=>h.cleanup(e)),l(" normalizeRanks",()=>i(e)),l(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),l(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),l(" normalize.run",()=>n.run(e)),l(" parentDummyChains",()=>s(e)),l(" addBorderSegments",()=>p(e)),l(" order",()=>b(e,c)),l(" insertSelfEdges",()=>{var t;return t=e,void E.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var o=t.node(e);o.order=n+r,(o.selfEdges||[]).forEach(e=>{E.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),l(" adjustCoordinateSystem",()=>w.adjust(e)),l(" position",()=>x(e)),l(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),o=n.x+n.width/2,a=n.y,i=r.x-o,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:o+2*i/3,y:a-s},{x:o+5*i/6,y:a-s},{x:o+i,y:a},{x:o+5*i/6,y:a+s},{x:o+2*i/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}),l(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),o=t.node(r.borderBottom),a=t.node(r.borderLeft[r.borderLeft.length-1]),i=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(i.x-a.x),r.height=Math.abs(o.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),l(" normalize.undo",()=>n.undo(e)),l(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),l(" undoCoordinateSystem",()=>w.undo(e)),l(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,o=0,a=e.graph(),i=a.marginx||0,s=a.marginy||0;function d(e){let a=e.x,i=e.y,s=e.width,d=e.height;t=Math.min(t,a-s/2),r=Math.max(r,a+s/2),n=Math.min(n,i-d/2),o=Math.max(o,i+d/2)}e.nodes().forEach(t=>d(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&d(r)}),t-=i,n-=s,e.nodes().forEach(r=>{let o=e.node(r);o.x-=t,o.y-=n}),e.edges().forEach(r=>{let o=e.edge(r);o.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=n)}),a.width=r-t+i,a.height=o-n+s})(e)),l(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e),n=t.node(e.v),o=t.node(e.w),a,i;r.points?(a=r.points[0],i=r.points[r.points.length-1]):(r.points=[],a=o,i=n),r.points.unshift(E.intersectRect(n,a)),r.points.push(E.intersectRect(o,i))})}),l(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),l(" acyclic.undo",()=>r.undo(e)))}),a(" updateInputGraph",()=>{var t,r;return t=e,r=d,void(t.nodes().forEach(e=>{let n=t.node(e),o=r.node(e);n&&(n.x=o.x,n.y=o.y,n.order=o.order,n.rank=o.rank,r.children(e).length&&(n.width=o.width,n.height=o.height))}),t.edges().forEach(e=>{let n=t.edge(e),o=r.edge(e);n.points=o.points,Object.hasOwn(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)}),d})};var j=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},C=["acyclicer","ranker","rankdir","align","rankalign"],O=["width","height","rank"],R={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],S={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function T(e,t){return E.mapValues(E.pick(e,t),Number)}function D(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}}),P=o((e,t)=>{var r=d(),n=a().Graph;t.exports={debugOrdering:function(e){let t=r.buildLayerMatrix(e),o=new n({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{o.setNode(t,{label:t}),o.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>o.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{o.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(o.setEdge(e,t,{style:"invis"}),t))}),o}}}),S=o((e,t)=>{t.exports="2.0.4"});let L=o((e,t)=>{t.exports={graphlib:a(),layout:R(),debug:P(),util:{time:d().time,notime:d().notime},version:S()}})(),T={direction:"LR",ranksep:200,nodesep:15},D={featureNode:{width:288,height:140},repositoryNode:{width:328,height:50}};function I(e,t){let r=e.data;return r&&"number"==typeof r.width&&"number"==typeof r.height?{width:r.width,height:r.height}:D[e.type??""]??t}function F(e,t,r={}){let{direction:n="TB",nodeSize:o={width:172,height:36},ranksep:a=80,nodesep:i=30}=r;if(0===e.length)return{nodes:[],edges:[]};let s=new L.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:n,ranksep:a,nodesep:i});let d=new Set;for(let e of t)d.add(e.source),d.add(e.target);let l=e.filter(e=>d.has(e.id)),c=e.filter(e=>!d.has(e.id));for(let e of l){let t=I(e,o);s.setNode(e.id,{width:t.width,height:t.height})}for(let e of t)s.hasNode(e.source)&&s.hasNode(e.target)&&s.setEdge(e.source,e.target,{},e.id);L.layout(s);let{targetPosition:u,sourcePosition:h}=function(e){switch(e){case"LR":return{targetPosition:"left",sourcePosition:"right"};case"RL":return{targetPosition:"right",sourcePosition:"left"};case"BT":return{targetPosition:"bottom",sourcePosition:"top"};default:return{targetPosition:"top",sourcePosition:"bottom"}}}(n),p="LR"===n||"RL"===n,f=new Map;for(let e of l){let t=s.node(e.id),r=I(e,o);f.set(e.id,{cx:t.x,cy:t.y,w:r.width,h:r.height})}let g=new Map;for(let e of t)f.has(e.source)&&f.has(e.target)&&(g.has(e.source)||g.set(e.source,[]),g.get(e.source).push(e.target));for(let[e,t]of g){if(t.length<=1)continue;let r=f.get(e),n=p?r.cy:r.cx,o=t.filter(e=>f.has(e)).sort((e,t)=>{let r=f.get(e),n=f.get(t);return p?r.cy-n.cy:r.cx-n.cx}),a=f.get(o[0]),i=f.get(o[o.length-1]),s=n-(p?(a.cy+i.cy)/2:(a.cx+i.cx)/2);if(Math.abs(s)>1)for(let e of o){let t=f.get(e);p?t.cy+=s:t.cx+=s}}let v=new Map;for(let e=0;e<l.length;e++)v.set(l[e].id,e);for(let[,e]of g){let t=e.filter(e=>f.has(e));if(t.length<=1)continue;let r=t.map(e=>p?f.get(e).cy:f.get(e).cx).sort((e,t)=>e-t),n=[...t].sort((e,t)=>(v.get(e)??0)-(v.get(t)??0));for(let e=0;e<n.length;e++){let t=f.get(n[e]);p?t.cy=r[e]:t.cx=r[e]}}let m=[];for(let e of l){let t=f.get(e.id);m.push({...e,targetPosition:u,sourcePosition:h,position:{x:t.cx-t.w/2,y:t.cy-t.h/2}})}if(c.length>0){let e=0,t=1/0;for(let r of m){let n=I(r,o);e=Math.max(e,r.position.y+n.height),t=Math.min(t,r.position.x)}t===1/0&&(t=0);for(let r=0;r<c.length;r++){let n=c[r],a=I(n,o);m.push({...n,targetPosition:u,sourcePosition:h,position:{x:t,y:e+30+r*(a.height+20)}})}}return{nodes:m,edges:[...t]}}var A=e.i(68228),$=e.i(21023);let z=(0,$.createServerReference)("40f0ecc334231cbf885c4897215a8a80af6e98a935",$.callServer,void 0,$.findSourceMapURL,"addRepository"),G=(0,$.createServerReference)("40211ef0c7ec302810a9676bd496aa327dd97ffefb",$.callServer,void 0,$.findSourceMapURL,"deleteRepository"),B=(0,$.createServerReference)("404dfc5c539f68a8fec627a60ac94e72df2f51ef6c",$.callServer,void 0,$.findSourceMapURL,"getFeatureMetadata"),q=(0,$.createServerReference)("004c8d15d864da4062549ecc28ae31749df6cce85b",$.callServer,void 0,$.findSourceMapURL,"fetchGraphData");var W=e.i(39443),V=e.i(8361),U=e.i(18354),H=e.i(99045);function X(e,t){let r=new Map;for(let e of t)"dependencyEdge"===e.type&&r.set(e.target,e.source);let n=new Map,o=new Map;for(let t of e)"featureNode"===t.type?n.set(t.id,{nodeId:t.id,data:t.data,parentNodeId:r.get(t.id)}):"repositoryNode"===t.type&&o.set(t.id,{nodeId:t.id,data:t.data});return{featureMap:n,repoMap:o}}function K(e,t){return(void 0===t.state||t.state===e.state)&&(void 0===t.lifecycle||t.lifecycle===e.lifecycle)&&(void 0===t.name||t.name===e.name)&&(void 0===t.description||t.description===e.description)}let Y=(0,U.createLogger)("[Polling]"),J=0,Q=0;function Z(e,o){let a=(0,r.useRouter)(),i=(0,V.useSoundAction)("delete"),s=(0,V.useSoundAction)("create"),{nodes:d,edges:l,reconcile:c,updateFeature:u,addPendingFeature:h,removeFeature:p,restoreFeature:f,addRepository:g,removeRepository:v,replaceRepository:m,getFeatureRepositoryPath:y,getRepositoryData:w,getRepoMapSize:b,setCallbacks:x}=function(e,r){let n=(0,t.useMemo)(()=>X(e,r),[]),[o,a]=(0,t.useState)(n.featureMap),[i,s]=(0,t.useState)(n.repoMap),[d,l]=(0,t.useState)(new Map),c=(0,t.useRef)(new Map),u=(0,t.useRef)({}),h=(0,t.useMemo)(()=>({onNodeAction:e=>u.current.onNodeAction?.(e),onNodeSettings:e=>u.current.onNodeSettings?.(e),onFeatureDelete:e=>u.current.onFeatureDelete?.(e),onRepositoryAdd:e=>u.current.onRepositoryAdd?.(e),onRepositoryClick:e=>u.current.onRepositoryClick?.(e),onRepositoryDelete:e=>u.current.onRepositoryDelete?.(e)}),[]),p=(0,t.useRef)(o);p.current=o;let f=(0,t.useRef)(i);f.current=i;let g=(0,t.useMemo)(()=>(function(e,t,r,n){let o=[],a=[],i=new Map;for(let[e,r]of t)r.data.repositoryPath&&i.set(r.data.repositoryPath,e);let s=new Map;for(let[e,r]of t){let t={...r.data,...n?.onRepositoryAdd&&{onAdd:()=>n.onRepositoryAdd(e)},...n?.onRepositoryClick&&{onClick:()=>n.onRepositoryClick(e)},...n?.onRepositoryDelete&&{onDelete:n.onRepositoryDelete}};o.push({id:e,type:"repositoryNode",position:{x:0,y:0},data:t})}for(let[t,d,l]of[...[...e.entries()].map(([e,t])=>[e,t,!1]),...[...r.entries()].filter(([t])=>!e.has(t)).map(([e,t])=>[e,t,!0])]){let e="creating"===d.data.state||l,r={...d.data,...!e&&n?.onNodeAction&&{onAction:()=>n.onNodeAction(t)},...!e&&n?.onNodeSettings&&{onSettings:()=>n.onNodeSettings(t)},...!e&&n?.onFeatureDelete&&{onDelete:n.onFeatureDelete}};if(o.push({id:t,type:"featureNode",position:{x:0,y:0},data:r}),d.parentNodeId)a.push({id:`dep-${d.parentNodeId}-${t}`,source:d.parentNodeId,target:t,type:"dependencyEdge"});else{let e=d.data.repositoryPath,r=i.get(e)??function(e){if(s.has(e))return s.get(e);let t=`virtual-repo-${e}`,r=e.split("/").filter(Boolean).at(-1)??e;return o.push({id:t,type:"repositoryNode",position:{x:0,y:0},data:{name:r,repositoryPath:e}}),s.set(e,t),t}(e);a.push({id:`edge-${r}-${t}`,source:r,target:t,style:{strokeDasharray:"5 5"}})}}let d=a.length>0;for(let e of o)e.data.showHandles=d;return{nodes:o,edges:a}})(o,i,d,h),[o,i,d,h]),v=(0,t.useRef)({key:"",positions:new Map}),{nodes:m,edges:y}=(0,t.useMemo)(()=>{let e=g.nodes.map(e=>e.id).sort().join(","),t=g.edges.map(e=>`${e.source}-${e.target}`).sort().join(","),r=`${e}|${t}`;if(r!==v.current.key){let e=F(g.nodes,g.edges,T),t=new Map;for(let r of e.nodes)t.set(r.id,{position:r.position,targetPosition:r.targetPosition,sourcePosition:r.sourcePosition});return v.current={key:r,positions:t},e}let{positions:n}=v.current;return{nodes:g.nodes.map(e=>{let t=n.get(e.id);return t?{...e,...t}:e}),edges:g.edges}},[g]),w=(0,t.useCallback)((e,t)=>{let{featureMap:r,repoMap:n}=X(e,t),o=new Set([...r.values()].map(e=>`${e.data.name}\0${e.data.repositoryPath}`));a(e=>{let t=[...e.entries()].filter(([,e])=>"creating"===e.data.state),n=new Map(r);for(let[e,r]of t){let t=`${r.data.name}\0${r.data.repositoryPath}`;o.has(t)||n.set(e,r)}for(let[e,t]of c.current){let r=n.get(e);r&&(n.set(e,{...r,data:{...r.data,...t}}),c.current.delete(e))}return n}),l(e=>{if(0===e.size)return e;let t=!1,r=new Map(e);for(let[n,a]of e){let e=`${a.data.name}\0${a.data.repositoryPath}`;o.has(e)&&(r.delete(n),t=!0)}return t?r:e}),s(n)},[]),b=(0,t.useCallback)((e,t)=>{a(r=>{let n=r.get(e);if(!n)return c.current.set(e,{...c.current.get(e),...t}),r;if(c.current.delete(e),K(n.data,t))return r;let o=new Map(r);return o.set(e,{...n,data:{...n.data,...t}}),o}),l(r=>{let n=r.get(e);if(!n||K(n.data,t))return r;let o=new Map(r);return o.set(e,{...n,data:{...n.data,...t}}),o})},[]),x=(0,t.useCallback)((e,t,r)=>{l(n=>{let o=new Map(n);return o.set(e,{nodeId:e,data:t,parentNodeId:r}),o})},[]),E=(0,t.useCallback)(e=>{l(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),k=(0,t.useCallback)(e=>{a(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),j=(0,t.useCallback)((e,t)=>{a(r=>{let n=new Map(r);return n.set(e,t),n})},[]),_=(0,t.useCallback)((e,t)=>{s(r=>{let n=new Map(r);return n.set(e,{nodeId:e,data:t}),n})},[]),C=(0,t.useCallback)(e=>{s(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),N=(0,t.useCallback)((e,t,r)=>{s(n=>{if(!n.has(e))return n;let o=new Map(n);return o.delete(e),o.set(t,{nodeId:t,data:r}),o})},[]),O=(0,t.useCallback)(e=>p.current.get(e)?.data.repositoryPath,[]),M=(0,t.useCallback)(e=>f.current.get(e)?.data,[]);return{nodes:m,edges:y,reconcile:w,updateFeature:b,addPendingFeature:x,removePendingFeature:E,removeFeature:k,restoreFeature:j,addRepository:_,removeRepository:C,replaceRepository:N,getFeatureRepositoryPath:O,getRepositoryData:M,getRepoMapSize:(0,t.useCallback)(()=>f.current.size,[]),setCallbacks:(0,t.useCallback)(e=>{u.current=e},[])}}(e,o),E=(0,t.useRef)(d),k=(0,t.useRef)(l);(0,t.useEffect)(()=>{E.current=d,k.current=l},[d,l]);let j=(0,t.useMemo)(()=>e.map(e=>e.id).sort().join(","),[e]),_=(0,t.useMemo)(()=>e.filter(e=>"featureNode"===e.type).map(e=>{let t=e.data;return`${e.id}:${t.state}:${t.lifecycle}`}).sort().join(","),[e]),C=(0,t.useRef)("");(0,t.useEffect)(()=>{let t=`${j}|${_}`;t!==C.current&&(C.current=t,c(e,o))},[j,_,e,o,c]);let N=(0,t.useRef)(new Map),{events:O}=(0,W.useAgentEventsContext)();(0,t.useEffect)(()=>{let t=N.current;for(let r of e){if("featureNode"!==r.type)continue;let e=r.data,o=t.get(r.id);void 0!==o&&o!==e.state&&(O.some(t=>t.featureId===e.featureId&&(0,H.mapEventTypeToState)(t.eventType)===e.state)||("done"===e.state?n.toast.success(e.name,{description:"Feature completed!"}):"action-required"===e.state?n.toast.warning(e.name,{description:"Waiting for your approval",action:{label:"Review",onClick:()=>a.push(`/feature/${e.featureId}`)}}):"error"===e.state&&n.toast.error(e.name,{description:e.errorMessage??"Agent failed"}))),t.set(r.id,e.state)}},[_,e,O,a]);let M=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(M.current>O.length&&(M.current=0),O.length<=M.current)return;let e=O.slice(M.current);for(let{featureId:t,state:r,lifecycle:n}of(M.current=O.length,(0,H.resolveSseEventUpdates)(e)))(void 0!==r||void 0!==n)&&u(`feat-${t}`,{...void 0!==r&&{state:r},...void 0!==n&&{lifecycle:n}})},[O,u]),(0,t.useEffect)(()=>{let e=e=>{let{featureId:t}=e.detail;u(`feat-${t}`,{state:"running"})};return window.addEventListener("shep:feature-approved",e),()=>window.removeEventListener("shep:feature-approved",e)},[u]);let R=(0,t.useRef)(new Set),P=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(P.current>O.length&&(P.current=0),O.length<=P.current)return;let e=O.slice(P.current);for(let t of(P.current=O.length,e)){if("Feature metadata updated"!==t.message||R.current.has(t.featureId))continue;R.current.add(t.featureId);let e=`feat-${t.featureId}`;B(t.featureId).then(t=>{t&&u(e,{name:t.name,description:t.description})}).catch(()=>{})}},[O,u]),(0,t.useEffect)(()=>{Y.debug("polling enabled (3000ms interval)");let e=setInterval(async()=>{try{let{nodes:e,edges:t}=await q();c(e,t)}catch{Y.warn("poll fetch failed — will retry next interval")}},3e3);return()=>{Y.debug("polling disabled"),clearInterval(e)}},[c]);let S=(0,t.useCallback)(e=>{},[]),L=(0,t.useCallback)(e=>{},[]),D=(0,t.useCallback)((e,t,r)=>{let n=t?.featureId?`feat-${t.featureId}`:`feature-${Date.now()}-${J++}`,o={name:t?.name??"New Feature",description:t?.description??"Describe what this feature does",featureId:t?.featureId??`#${n.slice(-4)}`,lifecycle:"requirements",state:t?.state??"running",progress:0,repositoryPath:t?.repositoryPath??"",branch:t?.branch??""};return h(n,o,"dependencyEdge"===r&&e?e:void 0),n},[h]),I=(0,t.useCallback)(e=>{let t=`feat-${e}`,r=E.current.filter(e=>e.id===t).map(e=>({nodeId:e.id,data:e.data}))[0];p(t),i.play(),n.toast.success("Feature deleted successfully"),a.push("/"),(0,A.deleteFeature)(e).then(e=>{e.error&&(r&&f(t,r),n.toast.error(e.error))}).catch(()=>{r&&f(t,r),n.toast.error("Failed to delete feature")})},[a,i,p,f]),$=(0,t.useCallback)(async e=>{let t=`repo-${e}`,r=new Set(k.current.filter(e=>e.source===t).map(e=>e.target)),o=w(t),a=new Map;for(let e of r){let t=E.current.find(t=>t.id===e);t&&a.set(e,{nodeId:e,data:t.data})}let s=()=>{for(let[e,r]of(o&&g(t,o),a))f(e,r)};for(let e of(v(t),r))p(e);try{let t=await G(e);if(!t.success){n.toast.error(t.error??"Failed to remove repository"),s();return}i.play(),n.toast.success("Repository removed")}catch{n.toast.error("Failed to remove repository"),s()}},[i,v,p,g,f,w]),U=(0,t.useCallback)(e=>{let t=F(E.current,k.current,{...T,direction:e});c(t.nodes,t.edges)},[c]);return{nodes:d,edges:l,onNodesChange:S,handleConnect:L,handleAddRepository:(0,t.useCallback)(e=>{let t=0===b(),r=`repo-temp-${++Q}`,o=e.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??e;return g(r,{name:o,repositoryPath:e,id:r}),z({path:e,name:o}).then(e=>{if(e.error){v(r),n.toast.error(e.error);return}let t=e.repository;m(r,`repo-${t.id}`,{name:t.name,repositoryPath:t.path,id:t.id}),s.play()}).catch(()=>{v(r),n.toast.error("Failed to add repository")}),{wasEmpty:t,repoPath:e}},[g,v,m,s,b]),handleLayout:U,handleDeleteFeature:I,handleDeleteRepository:$,createFeatureNode:D,getFeatureRepositoryPath:y,getRepositoryData:w,setCallbacks:x}}e.s(["useControlCenterState",()=>Z],17840)},48246,e=>{"use strict";var t=e.i(20314),r=e.i(53271),n=e.i(79054),o=e.i(31406),a=e.i(3214),i=e.i(3645);let s=(0,i.default)("rotate-ccw",[["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"}]]);var d=e.i(35364);e.i(54793);var l=e.i(7729);e.i(47506);var c=e.i(89313),u=e.i(92002);let h=(0,i.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var p=e.i(8986),f=e.i(38573),g=e.i(19933),v=e.i(67669),m=e.i(24042),y=e.i(64970),w=e.i(31777);e.i(81803);var b=e.i(72714),x=e.i(2287),E=e.i(2828);e.i(99348);var k=e.i(17466),j=e.i(8537),_=e.i(75921),C=e.i(76852);function N({data:e}){let o=(0,_.useFeatureFlags)(),[i,s]=(0,n.useState)(!1),l=(0,C.useRepositoryActions)(e.repositoryPath?{repositoryPath:e.repositoryPath}:null),c=(0,j.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),N="Booting"===c.status||"Ready"===c.status;return(0,t.jsxs)("div",{className:(0,w.cn)("group relative",e.onDelete&&e.id&&"pl-10"),children:[e.showHandles?(0,t.jsx)(r.Handle,{type:"target",position:u.Position.Left,isConnectable:!1,className:"opacity-0!"}):null,e.onDelete&&e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-0 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Remove repository","data-testid":"repository-node-delete-button",onClick:e=>{e.stopPropagation(),s(!0)},className:"bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors",children:(0,t.jsx)(v.Trash2,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(E.TooltipContent,{children:"Remove repository"})]})})}),(0,t.jsx)(x.Dialog,{open:i,onOpenChange:s,children:(0,t.jsxs)(x.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:"Remove repository?"}),(0,t.jsxs)(x.DialogDescription,{children:["This will remove ",(0,t.jsx)("strong",{children:e.name})," and all its features from your workspace. The repository files on disk won't be affected."]})]}),(0,t.jsxs)(x.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(x.DialogClose,{asChild:!0,children:(0,t.jsx)(d.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(d.Button,{variant:"destructive",onClick:()=>{s(!1),e.onDelete?.(e.id)},children:"Remove"})]})]})})]}):null,(0,t.jsxs)("div",{role:"button",tabIndex:0,"data-testid":"repository-node-card","data-repo-name":e.name,onClick:t=>{t.stopPropagation(),e.onClick?.()},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),t.stopPropagation(),e.onClick?.())},className:"nodrag bg-card flex min-w-[18rem] cursor-default items-center gap-3 rounded-full border px-4 py-3 shadow-sm",children:[(0,t.jsx)(h,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("span",{"data-testid":"repository-node-name",className:"min-w-0 truncate text-sm font-medium",children:e.name}),(0,t.jsxs)("div",{className:(0,w.cn)("flex shrink-0 items-center gap-2",(e.repositoryPath??e.onAdd)&&"ml-auto"),onClick:e=>e.stopPropagation(),children:[e.repositoryPath?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open in IDE",onClick:l.openInIde,loading:l.ideLoading,error:!!l.ideError,icon:p.Code2,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:"Open in IDE"})]})}),(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open in Shell",onClick:l.openInShell,loading:l.shellLoading,error:!!l.shellError,icon:f.Terminal,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:"Open in Shell"})]})}),(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open Folder",onClick:l.openFolder,loading:l.folderLoading,error:!!l.folderError,icon:g.FolderOpen,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:"Open Folder"})]})}),o.envDeploy?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:N?"Stop Dev Server":"Start Dev Server",onClick:N?c.stop:c.deploy,loading:c.deployLoading||c.stopLoading,error:!!c.deployError,icon:N?y.Square:m.Play,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:N?"Stop Dev Server":"Start Dev Server"})]})}),N?(0,t.jsx)(k.DeploymentStatusBadge,{status:c.status,url:c.url,targetId:e.repositoryPath}):null]}):null]}):null,e.onAdd?(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Add feature","data-testid":"repository-node-add-button",onClick:t=>{t.stopPropagation(),e.onAdd?.()},className:"text-muted-foreground hover:bg-accent dark:hover:bg-accent/50 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors hover:text-blue-500",children:(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(E.TooltipContent,{children:"Add feature"})]})}):null]})]}),e.onAdd||e.showHandles?(0,t.jsx)(r.Handle,{type:"source",position:u.Position.Right,isConnectable:!e.showHandles,className:"opacity-0!"}):null]})}function O(e){let[n]=(0,u.getBezierPath)({sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition});return(0,t.jsx)(r.BaseEdge,{id:e.id,path:n,style:{strokeDasharray:"5 5"}})}e.i(1650),e.i(45811),e.i(25235);let M={x:30,y:30,zoom:.85};function R({onResetViewport:e}){let{setViewport:o}=(0,r.useReactFlow)(),a=(0,n.useCallback)(()=>{o(e(),{duration:400})},[e,o]);return(0,t.jsx)(r.ControlButton,{onClick:a,title:"Reset view","aria-label":"Reset view",children:(0,t.jsx)(s,{style:{fill:"none"}})})}function P({nodes:e,edges:o,selectedFeatureId:i,defaultViewport:s,onNodesChange:u,onAddFeature:h,onConnect:p,onNodeClick:f,onPaneClick:g,onCanvasDrag:v,onMoveEnd:m,onResetViewport:y,toolbar:w,emptyState:b}){let x=(0,n.useMemo)(()=>({featureNode:c.FeatureNode,repositoryNode:N}),[]),E=(0,n.useMemo)(()=>({dependencyEdge:O}),[]),k=(0,n.useMemo)(()=>null==i?e:e.map(e=>"featureNode"===e.type&&e.data.featureId===i?{...e,selected:!0}:e),[e,i]);return 0===e.length?b?(0,t.jsx)("div",{"data-testid":"features-canvas-empty",className:"h-full w-full",children:b}):(0,t.jsx)("div",{"data-testid":"features-canvas-empty",children:(0,t.jsx)(l.EmptyState,{title:"No features yet",description:"Get started by creating your first feature.",action:(0,t.jsxs)(d.Button,{onClick:h,children:[(0,t.jsx)(a.Plus,{className:"mr-2 h-4 w-4"}),"New Feature"]})})}):(0,t.jsx)("div",{"data-testid":"features-canvas","data-no-drawer-close":!0,className:"pointer-events-auto h-full w-full",children:(0,t.jsxs)(r.ReactFlow,{nodes:k,edges:o,nodeTypes:x,edgeTypes:E,onConnect:p,onNodesChange:u,onNodeClick:f,onPaneClick:g,onMoveStart:v,onMoveEnd:m,defaultViewport:s??M,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,t.jsx)(r.Background,{}),(0,t.jsx)(r.Controls,{showInteractive:!1,children:y?(0,t.jsx)(R,{onResetViewport:y}):null}),w]})})}var S=e.i(5147),L=e.i(8361),T=e.i(30153);let D="shep-canvas-viewport",I={x:30,y:30,zoom:.85},F=(0,i.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);var A=e.i(33548),$=e.i(23925),z=e.i(83428),G=e.i(78521);let B=["cd ~/my-repo",'shep feat new "create modern, sleek dashboards"'];function q({onRepositorySelect:e,className:r}){let[o,i]=(0,n.useState)(!1),[s,d]=(0,n.useState)(!1);async function l(){if(!s){d(!0);try{let t=await (0,G.pickFolder)();t&&e?.(t)}finally{d(!1)}}}let c=(0,n.useCallback)(async()=>{await navigator.clipboard.writeText(B.join("\n")),i(!0),setTimeout(()=>i(!1),2e3)},[]);return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,w.cn)("relative h-full w-full",r),children:[(0,t.jsx)("div",{className:"absolute inset-0 [background-image:radial-gradient(circle,_var(--color-border)_1px,_transparent_1px)] [background-size:24px_24px]"}),(0,t.jsxs)("div",{className:"absolute top-8 left-8 z-10",children:[(0,t.jsx)("h1",{className:"text-4xl font-bold tracking-tight",children:"Features"}),(0,t.jsx)("p",{className:"text-muted-foreground text-3xl font-light",children:"Control Center"})]}),(0,t.jsx)("div",{className:"relative z-10 flex h-full items-center justify-center",children:(0,t.jsxs)("div",{className:"flex max-w-lg flex-col items-center gap-6",children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(h,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-widest uppercase",children:"Repositories"})]}),(0,t.jsxs)("button",{type:"button","data-testid":"empty-state-add-repository",onClick:l,disabled:s,className:"border-muted-foreground/30 hover:border-primary hover:text-primary flex cursor-pointer items-center gap-3 rounded-lg border-2 border-dashed px-8 py-4 transition-colors disabled:cursor-wait disabled:opacity-60",children:[s?(0,t.jsx)(z.Loader2,{className:"h-5 w-5 animate-spin"}):(0,t.jsx)(a.Plus,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:s?"Opening...":"Add Repository"})]}),(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-3",children:[(0,t.jsx)("div",{className:"bg-border h-px w-16"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(F,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-widest uppercase",children:"Or start from the command line"})]}),(0,t.jsx)("div",{className:"bg-border h-px w-16"})]}),(0,t.jsxs)("div",{"data-testid":"cli-code-block",className:"relative w-full rounded-lg bg-zinc-900 px-5 py-4 font-mono text-sm text-zinc-100",children:[(0,t.jsx)("button",{type:"button","data-testid":"cli-code-block-copy",onClick:c,className:"absolute top-3 right-3 cursor-pointer rounded p-1.5 text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-200","aria-label":"Copy commands",children:o?(0,t.jsx)($.Check,{className:"h-4 w-4"}):(0,t.jsx)(A.Copy,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"space-y-1",children:B.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-zinc-500 select-none",children:"$ "}),(0,t.jsx)("span",{children:e})]},e))})]}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Feature will appear on canvas once created"})]})})]})}var W=e.i(17840);let V={maxZoom:1,padding:.5,duration:500};function U({initialNodes:e,initialEdges:a}){let i,s,d,l=(0,o.useRouter)(),c=(0,o.usePathname)(),u=(i=(0,o.usePathname)().match(/^\/feature\/(.+)$/),i?.[1]??null),h=(0,L.useSoundAction)("click"),{guardedNavigate:p}=(0,T.useDrawerCloseGuard)(),{fitView:f}=(0,r.useReactFlow)(),g=(0,n.useRef)(null),{defaultViewport:v,onMoveEnd:m,resetViewport:y}=(s=(0,n.useRef)(function(){try{let e=localStorage.getItem(D);if(null==e)return I;let t=JSON.parse(e);return!(null==t||"object"!=typeof t||Array.isArray(t))&&"number"==typeof t.x&&"number"==typeof t.y&&"number"==typeof t.zoom&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.zoom)&&t.zoom>0?t:I}catch{return I}}()).current,d=(0,n.useRef)(null),(0,n.useEffect)(()=>()=>{null!=d.current&&clearTimeout(d.current)},[]),{defaultViewport:s,onMoveEnd:(0,n.useCallback)(e=>{null!=d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{try{localStorage.setItem(D,JSON.stringify(e))}catch{}},500)},[]),resetViewport:(0,n.useCallback)(()=>{try{localStorage.removeItem(D)}catch{}return I},[])}),{nodes:w,edges:b,onNodesChange:x,handleConnect:E,handleAddRepository:k,handleDeleteFeature:j,handleDeleteRepository:_,createFeatureNode:C,setCallbacks:N}=(0,W.useControlCenterState)(e,a),{setFeatures:O}=(0,S.useSidebarFeaturesContext)(),M=(0,n.useMemo)(()=>w.filter(e=>"featureNode"===e.type),[w]),R=(0,n.useMemo)(()=>M.map(e=>{let t=e.data;return`${t.featureId}:${t.state}:${t.name}`}).sort().join(","),[M]);(0,n.useEffect)(()=>{O(M.map(e=>{let t=e.data,r=(0,S.mapNodeStateToSidebarStatus)(t.state);return r?{featureId:t.featureId,name:t.name,status:r,...null!=t.startedAt&&{startedAt:t.startedAt},...null!=t.runtime&&{duration:t.runtime},...t.agentType&&{agentType:t.agentType},...t.modelId&&{modelId:t.modelId}}:null}).filter(Boolean))},[R,M,O]);let F=(0,n.useCallback)((e,t)=>{if("featureNode"===t.type){let e=t.data;"creating"!==e.state&&p(()=>{h.play(),l.push(`/feature/${e.featureId}`)})}},[l,h,p]),A=(0,n.useCallback)(()=>{h.play(),l.push("/create")},[l,h]),$=(0,n.useCallback)(e=>{h.play();let t=w.find(t=>t.id===e),r=t?.data?.repositoryPath;r?l.push(`/create?repo=${encodeURIComponent(r)}`):l.push("/create")},[w,l,h]),z=(0,n.useCallback)(e=>{let t=e.startsWith("feat-")?e.slice(5):e,r=b.find(t=>t.target===e),n=r?w.find(e=>e.id===r.source):null,o=n?.data?.repositoryPath;h.play();let a=new URLSearchParams;o&&a.set("repo",o),a.set("parent",t),l.push(`/create?${a.toString()}`)},[w,b,l,h]),G=(0,n.useCallback)(e=>{let t=w.find(t=>t.id===e);if(t?.type==="repositoryNode"){let e=t.data;e.id&&p(()=>l.push(`/repository/${e.id}`))}},[w,l,p]),B=(0,n.useCallback)(()=>{"/"!==c&&p(()=>l.push("/"))},[l,c,p]);(0,n.useEffect)(()=>{let e=e=>{let{wasEmpty:t,repoPath:r}=k(e.detail.path);t&&setTimeout(()=>{f(V),g.current=setTimeout(()=>{p(()=>l.push(`/create?repo=${encodeURIComponent(r)}`))},600)},0)};return window.addEventListener("shep:add-repository",e),()=>{window.removeEventListener("shep:add-repository",e),null!=g.current&&clearTimeout(g.current)}},[k,f,p,l]),(0,n.useEffect)(()=>{let e=e=>{let t=e.detail;if(t.parentId)return void C(`feat-${t.parentId}`,{state:"creating",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath},"dependencyEdge");let r=w.find(e=>"repositoryNode"===e.type&&e.data.repositoryPath===t.repositoryPath);C(r?.id??null,{state:"running",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath})};return window.addEventListener("shep:feature-created",e),()=>window.removeEventListener("shep:feature-created",e)},[w,C]),(0,n.useEffect)(()=>{N({onNodeAction:z,onFeatureDelete:j,onRepositoryAdd:$,onRepositoryClick:G,onRepositoryDelete:_})},[N,z,j,$,G,_]);let U=(0,n.useCallback)((e,t)=>{m(t)},[m]);return w.some(e=>"repositoryNode"===e.type)?(0,t.jsx)(P,{nodes:w,edges:b,selectedFeatureId:u,defaultViewport:v,onNodesChange:x,onConnect:E,onAddFeature:A,onNodeClick:F,onPaneClick:B,onMoveEnd:U,onResetViewport:y,emptyState:(0,t.jsx)(q,{onRepositorySelect:k})}):(0,t.jsx)(q,{onRepositorySelect:k})}function H({initialNodes:e,initialEdges:n,drawer:o}){return(0,t.jsxs)("div",{"data-testid":"control-center",className:"h-full w-full",children:[(0,t.jsx)(r.ReactFlowProvider,{children:(0,t.jsx)(U,{initialNodes:e,initialEdges:n})}),(0,t.jsx)("div",{children:o},"drawer")]})}e.s(["ControlCenter",()=>H],48246)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17840,e=>{"use strict";var t=e.i(79054),r=e.i(31406),n=e.i(60112),o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),a=o((e,t)=>{var r=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),o=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?r(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n},a=n((e,t)=>{function r(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function a(e,t,r,n){var o=""+t,a=""+r;if(!e&&o>a){var i=o;o=a,a=i}return o+"\x01"+a+"\x01"+(void 0===n?"\0":n)}function i(e,t){return a(e,t.v,t.w,t.name)}t.exports=class{constructor(e){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(o){var a=r.parent(o);return void 0===a||t.hasNode(a)?(n[o]=a,a):a in n?n[a]:e(a)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o}),this}setEdge(){var e,t,n,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2==arguments.length&&(o=arguments[1],i=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var d=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,d))return i&&(this._edgeLabels[d]=o),this;if(void 0!==n&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=i?o:this._defaultEdgeLabelFn(e,t,n);var l=function(e,t,r,n){var o=""+t,a=""+r;if(!e&&o>a){var i=o;o=a,a=i}var s={v:o,w:a};return n&&(s.name=n),s}(this._isDirected,e,t,n);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var o=1==arguments.length?i(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),s=this._edgeObjs[o];return s&&(e=s.v,t=s.w,delete this._edgeLabels[o],delete this._edgeObjs[o],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][o],delete this._out[e][o],this._edgeCount--),this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}filterEdges(e,t,r){if(e){var n=Object.values(e);return r?n.filter(function(e){return e.v===t&&e.w===r||e.v===r&&e.w===t}):n}}}}),i=n((e,t)=>{t.exports="3.0.2"}),s=n((e,t)=>{t.exports={Graph:a(),version:i()}}),d=n((e,t)=>{var r=a();t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),o={v:e};return void 0!==r&&(o.value=r),void 0!==n&&(o.parent=n),o}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}}),l=n((e,t)=>{t.exports=function(e,t,n,o){return function(e,t,r,n){var o={},a=!0,i=0,s=e.nodes(),d=function(e){var t=r(e);o[e.v].distance+t<o[e.w].distance&&(o[e.w]={distance:o[e.v].distance+t,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){n(e).forEach(function(t){var r=t.v===e?t.v:t.w,n=r===t.v?t.w:t.v;d({v:r,w:n})})})};s.forEach(function(e){o[e]={distance:e===t?0:1/0}});for(var c=s.length,u=1;u<c&&(a=!1,i++,l(),a);u++);if(i===c-1&&(a=!1,l(),a))throw Error("The graph contains a negative weight cycle");return o}(e,String(t),n||r,o||function(t){return e.outEdges(t)})};var r=()=>1}),c=n((e,t)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(o){t=[],function n(o){Object.hasOwn(r,o)||(r[o]=!0,t.push(o),e.successors(o).forEach(n),e.predecessors(o).forEach(n))}(o),t.length&&n.push(t)}),n}}),u=n((e,t)=>{t.exports=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,o=r[e],a=r[t];r[e]=a,r[t]=o,n[a.key]=e,n[o.key]=t}}}),h=n((e,t)=>{var r=u();t.exports=function(e,t,o,a){return function(e,t,n,o){var a,i,s={},d=new r,l=function(e){var t=e.v!==a?e.v:e.w,r=s[t],o=n(e),l=i.distance+o;if(o<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);l<r.distance&&(r.distance=l,r.predecessor=a,d.decrease(t,l))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;s[e]={distance:r},d.add(e,r)});d.size()>0&&(i=s[a=d.removeMin()]).distance!==1/0;)o(a).forEach(l);return s}(e,String(t),o||n,a||function(t){return e.outEdges(t)})};var n=()=>1}),p=n((e,t)=>{var r=h();t.exports=function(e,t,n){return e.nodes().reduce(function(o,a){return o[a]=r(e,a,t,n),o},{})}}),f=n((e,t)=>{t.exports=function(e,t,r){if(void 0!==e[t].predecessor)throw Error("Invalid source vertex");if(void 0===e[r].predecessor&&r!==t)throw Error("Invalid destination vertex");return{weight:e[r].distance,path:function(e,t,r){for(var n=[],o=r;o!==t;)n.push(o),o=e[o].predecessor;return n.push(t),n.reverse()}(e,t,r)}}}),g=n((e,t)=>{t.exports=function(e){var t=0,r=[],n={},o=[];return e.nodes().forEach(function(a){Object.hasOwn(n,a)||function a(i){var s=n[i]={onStack:!0,lowlink:t,index:t++};if(r.push(i),e.successors(i).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))}),s.lowlink===s.index){var d,l=[];do n[d=r.pop()].onStack=!1,l.push(d);while(i!==d)o.push(l)}}(a)}),o}}),v=n((e,t)=>{var r=g();t.exports=function(e){return r(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}}),m=n((e,t)=>{t.exports=function(e,t,n){var o,a,i,s,d;return o=e,a=t||r,i=n||function(t){return e.outEdges(t)},s={},(d=o.nodes()).forEach(function(e){s[e]={},s[e][e]={distance:0},d.forEach(function(t){e!==t&&(s[e][t]={distance:1/0})}),i(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=a(t);s[e][r]={distance:n,predecessor:e}})}),d.forEach(function(e){var t=s[e];d.forEach(function(r){var n=s[r];d.forEach(function(r){var o=n[e],a=t[r],i=n[r],s=o.distance+a.distance;s<i.distance&&(i.distance=s,i.predecessor=a.predecessor)})})}),s};var r=()=>1}),y=n((e,t)=>{function r(e){var t={},r={},o=[];if(e.sinks().forEach(function a(i){if(Object.hasOwn(r,i))throw new n;Object.hasOwn(t,i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(a),delete r[i],o.push(i))}),Object.keys(t).length!==e.nodeCount())throw new n;return o}var n=class extends Error{constructor(){super(...arguments)}};t.exports=r,r.CycleException=n}),w=n((e,t)=>{var r=y();t.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}}),b=n((e,t)=>{t.exports=function(e,t,r,n,o){Array.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),i={};return t.forEach(function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);o=function e(t,r,n,o,a,i,s){return Object.hasOwn(o,r)||(o[r]=!0,n||(s=i(s,r)),a(r).forEach(function(r){s=e(t,r,n,o,a,i,s)}),n&&(s=i(s,r))),s}(e,t,"post"===r,i,a,n,o)}),o}}),x=n((e,t)=>{var r=b();t.exports=function(e,t,n){return r(e,t,n,function(e,t){return e.push(t),e},[])}}),E=n((e,t)=>{var r=x();t.exports=function(e,t){return r(e,t,"post")}}),k=n((e,t)=>{var r=x();t.exports=function(e,t){return r(e,t,"pre")}}),j=n((e,t)=>{var r=a(),n=u();t.exports=function(e,t){var o,a=new r,i={},s=new n;function d(e){var r=e.v===o?e.w:e.v,n=s.priority(r);if(void 0!==n){var a=t(e);a<n&&(i[r]=o,s.decrease(r,a))}}if(0===e.nodeCount())return a;e.nodes().forEach(function(e){s.add(e,1/0),a.setNode(e)}),s.decrease(e.nodes()[0],0);for(var l=!1;s.size()>0;){if(Object.hasOwn(i,o=s.removeMin()))a.setEdge(o,i[o]);else{if(l)throw Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(o).forEach(d)}return a}}),_=n((e,t)=>{var r=h(),n=l();t.exports=function(e,t,o,a){return function(e,t,o,a){if(void 0===o)return r(e,t,o,a);for(var i=!1,s=e.nodes(),d=0;d<s.length;d++){for(var l=a(s[d]),c=0;c<l.length;c++){var u=l[c],h=u.v===s[d]?u.v:u.w,p=h===u.v?u.w:u.v;0>o({v:h,w:p})&&(i=!0)}if(i)return n(e,t,o,a)}return r(e,t,o,a)}(e,t,o,a||function(t){return e.outEdges(t)})}}),C=n((e,t)=>{t.exports={bellmanFord:l(),components:c(),dijkstra:h(),dijkstraAll:p(),extractPath:f(),findCycles:v(),floydWarshall:m(),isAcyclic:w(),postorder:E(),preorder:k(),prim:j(),shortestPaths:_(),reduce:b(),tarjan:g(),topsort:y()}}),N=s();t.exports={Graph:N.Graph,json:d(),alg:C(),version:N.version}}),i=o((e,t)=>{function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}}),s=o((e,t)=>{var r=a().Graph,n=i();t.exports=function(e,t){var a,i;let l,c,u,h,p;if(1>=e.nodeCount())return[];let f=(a=e,i=t||o,l=new r,c=0,u=0,a.nodes().forEach(e=>{l.setNode(e,{v:e,in:0,out:0})}),a.edges().forEach(e=>{let t=l.edge(e.v,e.w)||0,r=i(e);l.setEdge(e.v,e.w,t+r),u=Math.max(u,l.node(e.v).out+=r),c=Math.max(c,l.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(u+c+3).map(()=>new n),p=c+1,l.nodes().forEach(e=>{d(h,p,l.node(e))}),{graph:l,buckets:h,zeroIdx:p});return(function(e,t,r){let n=[],o=t[t.length-1],a=t[0],i;for(;e.nodeCount();){for(;i=a.dequeue();)s(e,t,r,i);for(;i=o.dequeue();)s(e,t,r,i);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(i=t[o].dequeue()){n=n.concat(s(e,t,r,i,!0));break}}}return n})(f.graph,f.buckets,f.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};var o=()=>1;function s(e,t,r,n,o){let a=o?[]:void 0;return e.inEdges(n.v).forEach(n=>{let i=e.edge(n),s=e.node(n.v);o&&a.push({v:n.v,w:n.w}),s.out-=i,d(t,r,s)}),e.outEdges(n.v).forEach(n=>{let o=e.edge(n),a=n.w,i=e.node(a);i.in-=o,d(t,r,i)}),e.removeNode(n.v),a}function d(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}}),d=o((e,t)=>{var r=a().Graph;function n(e,t,r,n){for(var o=n;e.hasNode(o);)o=d(n);return r.dummy=t,e.setNode(o,r),o}t.exports={addBorderNode:function(e,t,r,o){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=o),n(e,"border",a,t)},addDummyNode:n,applyWithChunking:o,asNonCompoundGraph:function(e){let t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=l(i(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),o=n.rank;void 0!==o&&(t[o][n.order]=r)}),t},intersectRect:function(e,t){let r,n,o=e.x,a=e.y,i=t.x-o,s=t.y-a,d=e.width/2,l=e.height/2;if(!i&&!s)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*d>Math.abs(i)*l?(s<0&&(l=-l),r=l*i/s,n=l):(i<0&&(d=-d),r=d,n=d*s/i),{x:o+r,y:a+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:i,normalizeRanks:function(e){let t=o(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},range:l,removeEmptyRanks:function(e){let t=o(Math.min,e.nodes().map(t=>e.node(t).rank).filter(e=>void 0!==e)),r=[];e.nodes().forEach(n=>{let o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)});let n=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%a!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new r().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:d,zipObject:c};function o(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function i(e){return o(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}var s=0;function d(e){return e+""+ ++s}function l(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let o=[];for(let t=e;n(t);t+=r)o.push(t);return o}function c(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}}),l=o((e,t)=>{var r=s(),n=d().uniqueId;t.exports={run:function(e){var t,o;let a,i,s;("greedy"===e.graph().acyclicer?r(e,(t=e,e=>t.edge(e).weight)):(a=[],i={},s={},(o=e).nodes().forEach(function e(t){Object.hasOwn(s,t)||(s[t]=!0,i[t]=!0,o.outEdges(t).forEach(t=>{Object.hasOwn(i,t.w)?a.push(t):e(t.w)}),delete i[t])}),a)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}}),c=o((e,t)=>{var r=d();t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let n,o,a,i=t.v,s=e.node(i).rank,d=t.w,l=e.node(d).rank,c=t.name,u=e.edge(t),h=u.labelRank;if(l!==s+1){for(e.removeEdge(t),a=0,++s;s<l;++a,++s)u.points=[],o={width:0,height:0,edgeLabel:u,edgeObj:t,rank:s},n=r.addDummyNode(e,"edge",o,"_d"),s===h&&(o.width=u.width,o.height=u.height,o.dummy="edge-label",o.labelpos=u.labelpos),e.setEdge(i,n,{weight:u.weight},c),0===a&&e.graph().dummyChains.push(n),i=n;e.setEdge(i,d,{weight:u.weight},c)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,o;for(e.setEdge(r.edgeObj,n);r.dummy;)o=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=o,r=e.node(t)})}}}),u=o((e,t)=>{var{applyWithChunking:r}=d();t.exports={longestPath:function(e){var t={};e.sources().forEach(function n(o){var a=e.node(o);if(Object.hasOwn(t,o))return a.rank;t[o]=!0;var i=r(Math.min,e.outEdges(o).map(t=>null==t?1/0:n(t.w)-e.edge(t).minlen));return i===1/0&&(i=0),a.rank=i})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}),h=o((e,t)=>{var r=a().Graph,n=u().slack;t.exports=function(e){var t,o,a,i,s=new r({directed:!1}),d=e.nodes()[0],l=e.nodeCount();for(s.setNode(d,{});t=s,o=e,t.nodes().forEach(function e(r){o.nodeEdges(r).forEach(a=>{var i=a.v,s=r===i?a.w:i;t.hasNode(s)||n(o,a)||(t.setNode(s,{}),t.setEdge(r,s,{}),e(s))})}),t.nodeCount()<l;)a=function(e,t){return t.edges().reduce((r,o)=>{let a=1/0;return e.hasNode(o.v)!==e.hasNode(o.w)&&(a=n(t,o)),a<r[0]?[a,o]:r},[1/0,null])[1]}(s,e),i=s.hasNode(a.v)?n(e,a):-n(e,a),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(s,e,i);return s}}),p=o((e,t)=>{var r=h(),n=u().slack,o=u().longestPath,i=a().alg.preorder,s=a().alg.postorder,l=d().simplify;function c(e){o(e=l(e));var t,n,a=r(e);for(g(a),p(a,e);t=v(a);)n=m(a,e,t),y(a,e,t,n)}function p(e,t){var r=s(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,o,a,i;return n=e,o=t,a=r,i=n.node(a).parent,void(n.edge(a,i).cutvalue=f(n,o,a))})}function f(e,t,r){var n=e.node(r).parent,o=!0,a=t.edge(r,n),i=0;return a||(o=!1,a=t.edge(n,r)),i=a.weight,t.nodeEdges(r).forEach(a=>{var s=a.v===r,d=s?a.w:a.v;if(d!==n){var l,c,u,h=s===o,p=t.edge(a).weight;if(i+=h?p:-p,l=e,c=r,u=d,l.hasEdge(c,u)){var f=e.edge(r,d).cutvalue;i+=h?-f:f}}}),i}function g(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,o,a){var i=n,s=t.node(o);return r[o]=!0,t.neighbors(o).forEach(a=>{Object.hasOwn(r,a)||(n=e(t,r,n,a,o))}),s.low=i,s.lim=n++,a?s.parent=a:delete s.parent,n}(e,{},1,t)}function v(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function m(e,t,r){var o=r.v,a=r.w;t.hasEdge(o,a)||(o=r.w,a=r.v);var i=e.node(o),s=e.node(a),d=i,l=!1;return i.lim>s.lim&&(d=s,l=!0),t.edges().filter(t=>l===w(e,e.node(t.v),d)&&l!==w(e,e.node(t.w),d)).reduce((e,r)=>n(t,r)<n(t,e)?r:e)}function y(e,t,r,n){var o,a,s,d,l=r.v,c=r.w;e.removeEdge(l,c),e.setEdge(n.v,n.w,{}),g(e),p(e,t),o=e,a=t,s=o.nodes().find(e=>!a.node(e).parent),(d=(d=i(o,s)).slice(1)).forEach(e=>{var t=o.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function w(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=c,c.initLowLimValues=g,c.initCutValues=p,c.calcCutValue=f,c.leaveEdge=v,c.enterEdge=m,c.exchangeEdges=y}),f=o((e,t)=>{var r=u().longestPath,n=h(),o=p();t.exports=function(e){var t,i=e.graph().ranker;if(i instanceof Function)return i(e);switch(e.graph().ranker){case"network-simplex":default:o(e);break;case"tight-tree":r(t=e),n(t);break;case"longest-path":a(e);case"none":}};var a=r}),g=o((e,t)=>{t.exports=function(e){var t;let r,n,o=(r={},n=0,(t=e).children().forEach(function e(o){let a=n;t.children(o).forEach(e),r[o]={low:a,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,a=function(e,t,r,n){let o=[],a=[],i=Math.min(t[r].low,t[n].low),s=Math.max(t[r].lim,t[n].lim),d,l;d=r;do o.push(d=e.parent(d));while(d&&(t[d].low>i||s>t[d].lim))for(l=d,d=n;(d=e.parent(d))!==l;)a.push(d);return{path:o.concat(a.reverse()),lca:l}}(e,o,n.v,n.w),i=a.path,s=a.lca,d=0,l=i[0],c=!0;for(;t!==n.w;){if(r=e.node(t),c){for(;(l=i[d])!==s&&e.node(l).maxRank<r.rank;)d++;l===s&&(c=!1)}if(!c){for(;d<i.length-1&&e.node(l=i[d+1]).minRank<=r.rank;)d++;l=i[d]}e.setParent(t,l),t=e.successors(t)[0]}})}}),v=o((e,t)=>{var r=d();t.exports={run:function(e){var t,n,o;let a=r.addDummyNode(e,"root",{},"_root"),i=(n={},(t=e).children().forEach(e=>(function e(r,o){var a=t.children(r);a&&a.length&&a.forEach(t=>e(t,o+1)),n[r]=o})(e,1)),n),s=Object.values(i),d=r.applyWithChunking(Math.max,s)-1,l=2*d+1;e.graph().nestingRoot=a,e.edges().forEach(t=>e.edge(t).minlen*=l);let c=(o=e).edges().reduce((e,t)=>e+o.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,n,o,a,i,s,d){let l=t.children(d);if(!l.length){d!==n&&t.setEdge(n,d,{weight:0,minlen:o});return}let c=r.addBorderNode(t,"_bt"),u=r.addBorderNode(t,"_bb"),h=t.node(d);t.setParent(c,d),h.borderTop=c,t.setParent(u,d),h.borderBottom=u,l.forEach(r=>{e(t,n,o,a,i,s,r);let l=t.node(r),h=l.borderTop?l.borderTop:r,p=l.borderBottom?l.borderBottom:r,f=l.borderTop?a:2*a,g=h!==p?1:i-s[d]+1;t.setEdge(c,h,{weight:f,minlen:g,nestingEdge:!0}),t.setEdge(p,u,{weight:f,minlen:g,nestingEdge:!0})}),t.parent(d)||t.setEdge(n,c,{weight:0,minlen:i+s[d]})})(e,a,l,c,d,i,t)),e.graph().nodeRankFactor=l},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}),m=o((e,t)=>{var r=d();function n(e,t,n,o,a,i){let s=a[t][i-1],d=r.addDummyNode(e,"border",{width:0,height:0,rank:i,borderType:t},n);a[t][i]=d,e.setParent(d,o),s&&e.setEdge(s,d,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let o=e.children(r),a=e.node(r);if(o.length&&o.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,o=a.maxRank+1;t<o;++t)n(e,"borderLeft","_bl",r,a,t),n(e,"borderRight","_br",r,a,t)}})}}),y=o((e,t)=>{function r(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>n(e.edge(t)))}function n(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.y=-e.y}function a(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&r(e)},undo:function(e){var t,n;let i=e.graph().rankdir.toLowerCase();("bt"===i||"rl"===i)&&((t=e).nodes().forEach(e=>o(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(o),Object.hasOwn(r,"y")&&o(r)})),("lr"===i||"rl"===i)&&((n=e).nodes().forEach(e=>a(n.node(e))),n.edges().forEach(e=>{let t=n.edge(e);t.points.forEach(a),Object.hasOwn(t,"x")&&a(t)}),r(e))}}}),w=o((e,t)=>{var r=d();t.exports=function(e){let t={},n=e.nodes().filter(t=>!e.children(t).length),o=n.map(t=>e.node(t).rank),a=r.applyWithChunking(Math.max,o),i=r.range(a+1).map(()=>[]);return n.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,i[e.node(n).rank].push(n),e.successors(n).forEach(r))}),i}}),b=o((e,t)=>{var r=d().zipObject;t.exports=function(e,t){let n=0;for(let o=1;o<t.length;++o)n+=function(e,t,n){let o=r(n,n.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:o[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),i=1;for(;i<n.length;)i<<=1;let s=2*i-1;i-=1;let d=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+i;d[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=d[t+1]),t=t-1>>1,d[t]+=e.weight;l+=e.weight*r}),l}(e,t[o-1],t[o]);return n}}),x=o((e,t)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}}),E=o((e,t)=>{var r=d();t.exports=function(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>r.pick(e,["vs","i","barycenter","weight"]))}(Object.values(n).filter(e=>!e.indegree))}}),k=o((e,t)=>{var r=d();function n(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var o;let a=r.partition(e,e=>Object.hasOwn(e,"barycenter")),i=a.lhs,s=a.rhs.sort((e,t)=>t.i-e.i),d=[],l=0,c=0,u=0;i.sort((o=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:o?t.i-e.i:e.i-t.i)),u=n(d,s,u),i.forEach(e=>{u+=e.vs.length,d.push(e.vs),l+=e.barycenter*e.weight,c+=e.weight,u=n(d,s,u)});let h={vs:d.flat(!0)};return c&&(h.barycenter=l/c,h.weight=c),h}}),j=o((e,t)=>{var r=x(),n=E(),o=k();t.exports=function e(t,a,i,s){var d,l;let c=t.children(a),u=t.node(a),h=u?u.borderLeft:void 0,p=u?u.borderRight:void 0,f={};h&&(c=c.filter(e=>e!==h&&e!==p));let g=r(t,c);g.forEach(r=>{if(t.children(r.v).length){var n,o;let a=e(t,r.v,i,s);f[r.v]=a,Object.hasOwn(a,"barycenter")&&(n=r,o=a,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+o.barycenter*o.weight)/(n.weight+o.weight),n.weight+=o.weight):(n.barycenter=o.barycenter,n.weight=o.weight))}});let v=n(g,i);d=v,l=f,d.forEach(e=>{e.vs=e.vs.flatMap(e=>l[e]?l[e].vs:e)});let m=o(v,s);if(h&&(m.vs=[h,m.vs,p].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(p)[0]);Object.hasOwn(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+e.order+r.order)/(m.weight+2),m.weight+=2}return m}}),_=o((e,t)=>{var r=a().Graph,n=d();t.exports=function(e,t,o,a){a||(a=e.nodes());let i=function(e){for(var t;e.hasNode(t=n.uniqueId("_root")););return t}(e),s=new r({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return a.forEach(r=>{let n=e.node(r),a=e.parent(r);(n.rank===t||n.minRank<=t&&t<=n.maxRank)&&(s.setNode(r),s.setParent(r,a||i),e[o](r).forEach(t=>{let n=t.v===r?t.w:t.v,o=s.edge(n,r),a=void 0!==o?o.weight:0;s.setEdge(n,r,{weight:e.edge(t).weight+a})}),Object.hasOwn(n,"minRank")&&s.setNode(r,{borderLeft:n.borderLeft[t],borderRight:n.borderRight[t]}))}),s}}),C=o((e,t)=>{t.exports=function(e,t,r){let n={},o;r.forEach(r=>{let a=e.parent(r),i,s;for(;a;){if((i=e.parent(a))?(s=n[i],n[i]=a):(s=o,o=a),s&&s!==a)return void t.setEdge(s,a);a=i}})}}),N=o((e,t)=>{var r=w(),n=b(),o=j(),i=_(),s=C(),l=a().Graph,c=d();function u(e,t,r){let n=new Map,o=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&o(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&o(e,t)}return t.map(function(t){return i(e,t,r,n.get(t)||[])})}function h(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,a={}){if("function"==typeof a.customOrder)return void a.customOrder(t,e);let i=c.maxRank(t),d=u(t,c.range(1,i+1),"inEdges"),p=u(t,c.range(i-1,-1,-1),"outEdges"),f=r(t);if(h(t,f),a.disableOptimalOrderHeuristic)return;let g=1/0,v,m=a.constraints||[];for(let e=0,r=0;r<4;++e,++r){(function(e,t,r){let n=new l;e.forEach(function(e){r.forEach(e=>n.setEdge(e.left,e.right));let a=e.graph().root,i=o(e,a,n,t);i.vs.forEach((t,r)=>e.node(t).order=r),s(e,n,i.vs)})})(e%2?d:p,e%4>=2,m),f=c.buildLayerMatrix(t);let a=n(t,f);a<g?(r=0,v=Object.assign({},f),g=a):a===g&&(v=structuredClone(f))}h(t,v)}}),O=o((e,t)=>{var r=a().Graph,n=d();function o(e,t){let r={};return t.length&&t.reduce(function(t,n){let o=0,a=0,i=t.length,d=n[n.length-1];return n.forEach((t,l)=>{let c=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),u=c?e.node(c).order:i;(c||t===d)&&(n.slice(a,l+1).forEach(t=>{e.predecessors(t).forEach(n=>{let a=e.node(n),i=a.order;(i<o||u<i)&&!(a.dummy&&e.node(t).dummy)&&s(r,n,t)})}),a=l+1,o=u)}),n}),r}function i(e,t){let r={};function o(t,o,a,i,d){let l;n.range(o,a).forEach(n=>{l=t[n],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<i||n.order>d)&&s(r,t,l)})})}return t.length&&t.reduce(function(t,r){let n=-1,a,i=0;return r.forEach((s,d)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,o(r,i,d,n,a),i=d,n=a)}o(r,i,r.length,a,t.length)}),r}),r}function s(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function l(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function c(e,t,r,n){let o={},a={},i={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,a[e]=e,i[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=n(e);if(s.length){let n=((s=s.sort((e,t)=>i[e]-i[t])).length-1)/2;for(let d=Math.floor(n),c=Math.ceil(n);d<=c;++d){let n=s[d];a[e]===e&&t<i[n]&&!l(r,e,n)&&(a[n]=e,a[e]=o[e]=o[n],t=i[n])}}})}),{root:o,align:a}}function u(e,t,n,o,a){var i,s,d,l,c,u,h;let p,f,g,v={},m=(i=e,s=t,d=n,l=a,p=new r,g=(c=(f=i.graph()).nodesep,u=f.edgesep,h=l,(e,t,r)=>{let n=e.node(t),o=e.node(r),a,i;if(a=0+n.width/2,Object.hasOwn(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":i=-n.width/2;break;case"r":i=n.width/2}if(i&&(a+=h?i:-i),i=0,a+=(n.dummy?u:c)/2,a+=(o.dummy?u:c)/2,a+=o.width/2,Object.hasOwn(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":i=o.width/2;break;case"r":i=-o.width/2}return i&&(a+=h?i:-i),i=0,a}),s.forEach(e=>{let t;e.forEach(e=>{let r=d[e];if(p.setNode(r),t){var n=d[t],o=p.edge(n,r);p.setEdge(n,r,Math.max(g(i,e,t),o||0))}t=e})}),p),y=a?"borderLeft":"borderRight";function w(e,t){let r=m.nodes().slice(),n={},o=r.pop();for(;o;){if(n[o])e(o);else for(let e of(n[o]=!0,r.push(o),t(o)))r.push(e);o=r.pop()}}return w(function(e){v[e]=m.inEdges(e).reduce((e,t)=>Math.max(e,v[t.v]+m.edge(t)),0)},m.predecessors.bind(m)),w(function(t){let r=m.outEdges(t).reduce((e,t)=>Math.min(e,v[t.w]-m.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==y&&(v[t]=Math.max(v[t],r))},m.successors.bind(m)),Object.keys(o).forEach(e=>v[e]=v[n[e]]),v}function h(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,o=1/0;Object.entries(r).forEach(([t,r])=>{var a,i;let s=(a=e,i=t,a.node(i).width/2);n=Math.max(r+s,n),o=Math.min(r-s,o)});let a=n-o;return a<t[0]&&(t=[a,r]),t},[1/0,null])[1]}function p(e,t){let r=Object.values(t),o=n.applyWithChunking(Math.min,r),a=n.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(i=>{let s=r+i,d=e[s];if(d===t)return;let l=Object.values(d),c=o-n.applyWithChunking(Math.min,l);"l"!==i&&(c=a-n.applyWithChunking(Math.max,l)),c&&(e[s]=n.mapValues(d,e=>e+c))})})}function f(e,t){return n.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t=n.buildLayerMatrix(e),r=Object.assign(o(e,t),i(e,t)),a={},s;["u","d"].forEach(o=>{s="u"===o?t:Object.values(t).reverse(),["l","r"].forEach(t=>{"r"===t&&(s=s.map(e=>Object.values(e).reverse()));let i=("u"===o?e.predecessors:e.successors).bind(e),d=c(e,s,r,i),l=u(e,s,d.root,d.align,"r"===t);"r"===t&&(l=n.mapValues(l,e=>-e)),a[o+t]=l})});let d=h(e,a);return p(a,d),f(a,e.graph().align)},findType1Conflicts:o,findType2Conflicts:i,addConflict:s,hasConflict:l,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:h,balance:f}}),M=o((e,t)=>{var r=d(),n=O().positionX;t.exports=function(e){var t;let o,a,i,s;t=e=r.asNonCompoundGraph(e),o=r.buildLayerMatrix(t),a=t.graph().ranksep,i=t.graph().rankalign,s=0,o.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>{let n=t.node(e);"top"===i?n.y=s+n.height/2:"bottom"===i?n.y=s+r-n.height/2:n.y=s+r/2}),s+=r+a}),Object.entries(n(e)).forEach(([t,r])=>e.node(t).x=r)}}),R=o((e,t)=>{var r=l(),n=c(),o=f(),i=d().normalizeRanks,s=g(),u=d().removeEmptyRanks,h=v(),p=m(),w=y(),b=N(),x=M(),E=d(),k=a().Graph;t.exports=function(e,t={}){let a=t.debugTiming?E.time:E.notime;return a("layout",()=>{let d=a(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new k({multigraph:!0,compound:!0}),n=D(t.graph()),r.setGraph(Object.assign({},_,T(n,j),E.pick(n,C))),t.nodes().forEach(e=>{let n=T(D(t.node(e)),O);Object.keys(R).forEach(e=>{void 0===n[e]&&(n[e]=R[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=D(t.edge(e));r.setEdge(e,Object.assign({},S,T(n,P),E.pick(n,L)))}),r});return a(" runLayout",()=>{var e,l,c;return e=d,l=a,c=t,void(l(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),l(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),l(" acyclic",()=>r.run(e)),l(" nestingGraph.run",()=>h.run(e)),l(" rank",()=>o(E.asNonCompoundGraph(e))),l(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};E.addDummyNode(t,"edge-proxy",n,"_ep")}})}),l(" removeEmptyRanks",()=>u(e)),l(" nestingGraph.cleanup",()=>h.cleanup(e)),l(" normalizeRanks",()=>i(e)),l(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),l(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),l(" normalize.run",()=>n.run(e)),l(" parentDummyChains",()=>s(e)),l(" addBorderSegments",()=>p(e)),l(" order",()=>b(e,c)),l(" insertSelfEdges",()=>{var t;return t=e,void E.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var o=t.node(e);o.order=n+r,(o.selfEdges||[]).forEach(e=>{E.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),l(" adjustCoordinateSystem",()=>w.adjust(e)),l(" position",()=>x(e)),l(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),o=n.x+n.width/2,a=n.y,i=r.x-o,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:o+2*i/3,y:a-s},{x:o+5*i/6,y:a-s},{x:o+i,y:a},{x:o+5*i/6,y:a+s},{x:o+2*i/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}),l(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),o=t.node(r.borderBottom),a=t.node(r.borderLeft[r.borderLeft.length-1]),i=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(i.x-a.x),r.height=Math.abs(o.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),l(" normalize.undo",()=>n.undo(e)),l(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),l(" undoCoordinateSystem",()=>w.undo(e)),l(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,o=0,a=e.graph(),i=a.marginx||0,s=a.marginy||0;function d(e){let a=e.x,i=e.y,s=e.width,d=e.height;t=Math.min(t,a-s/2),r=Math.max(r,a+s/2),n=Math.min(n,i-d/2),o=Math.max(o,i+d/2)}e.nodes().forEach(t=>d(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&d(r)}),t-=i,n-=s,e.nodes().forEach(r=>{let o=e.node(r);o.x-=t,o.y-=n}),e.edges().forEach(r=>{let o=e.edge(r);o.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=n)}),a.width=r-t+i,a.height=o-n+s})(e)),l(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e),n=t.node(e.v),o=t.node(e.w),a,i;r.points?(a=r.points[0],i=r.points[r.points.length-1]):(r.points=[],a=o,i=n),r.points.unshift(E.intersectRect(n,a)),r.points.push(E.intersectRect(o,i))})}),l(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),l(" acyclic.undo",()=>r.undo(e)))}),a(" updateInputGraph",()=>{var t,r;return t=e,r=d,void(t.nodes().forEach(e=>{let n=t.node(e),o=r.node(e);n&&(n.x=o.x,n.y=o.y,n.order=o.order,n.rank=o.rank,r.children(e).length&&(n.width=o.width,n.height=o.height))}),t.edges().forEach(e=>{let n=t.edge(e),o=r.edge(e);n.points=o.points,Object.hasOwn(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)}),d})};var j=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},C=["acyclicer","ranker","rankdir","align","rankalign"],O=["width","height","rank"],R={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],S={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function T(e,t){return E.mapValues(E.pick(e,t),Number)}function D(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}}),P=o((e,t)=>{var r=d(),n=a().Graph;t.exports={debugOrdering:function(e){let t=r.buildLayerMatrix(e),o=new n({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{o.setNode(t,{label:t}),o.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>o.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{o.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(o.setEdge(e,t,{style:"invis"}),t))}),o}}}),S=o((e,t)=>{t.exports="2.0.4"});let L=o((e,t)=>{t.exports={graphlib:a(),layout:R(),debug:P(),util:{time:d().time,notime:d().notime},version:S()}})(),T={direction:"LR",ranksep:200,nodesep:15},D={featureNode:{width:288,height:140},repositoryNode:{width:328,height:50}};function I(e,t){let r=e.data;return r&&"number"==typeof r.width&&"number"==typeof r.height?{width:r.width,height:r.height}:D[e.type??""]??t}function F(e,t,r={}){let{direction:n="TB",nodeSize:o={width:172,height:36},ranksep:a=80,nodesep:i=30}=r;if(0===e.length)return{nodes:[],edges:[]};let s=new L.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:n,ranksep:a,nodesep:i});let d=new Set;for(let e of t)d.add(e.source),d.add(e.target);let l=e.filter(e=>d.has(e.id)),c=e.filter(e=>!d.has(e.id));for(let e of l){let t=I(e,o);s.setNode(e.id,{width:t.width,height:t.height})}for(let e of t)s.hasNode(e.source)&&s.hasNode(e.target)&&s.setEdge(e.source,e.target,{},e.id);L.layout(s);let{targetPosition:u,sourcePosition:h}=function(e){switch(e){case"LR":return{targetPosition:"left",sourcePosition:"right"};case"RL":return{targetPosition:"right",sourcePosition:"left"};case"BT":return{targetPosition:"bottom",sourcePosition:"top"};default:return{targetPosition:"top",sourcePosition:"bottom"}}}(n),p="LR"===n||"RL"===n,f=new Map;for(let e of l){let t=s.node(e.id),r=I(e,o);f.set(e.id,{cx:t.x,cy:t.y,w:r.width,h:r.height})}let g=new Map;for(let e of t)f.has(e.source)&&f.has(e.target)&&(g.has(e.source)||g.set(e.source,[]),g.get(e.source).push(e.target));for(let[e,t]of g){if(t.length<=1)continue;let r=f.get(e),n=p?r.cy:r.cx,o=t.filter(e=>f.has(e)).sort((e,t)=>{let r=f.get(e),n=f.get(t);return p?r.cy-n.cy:r.cx-n.cx}),a=f.get(o[0]),i=f.get(o[o.length-1]),s=n-(p?(a.cy+i.cy)/2:(a.cx+i.cx)/2);if(Math.abs(s)>1)for(let e of o){let t=f.get(e);p?t.cy+=s:t.cx+=s}}let v=new Map;for(let e=0;e<l.length;e++)v.set(l[e].id,e);for(let[,e]of g){let t=e.filter(e=>f.has(e));if(t.length<=1)continue;let r=t.map(e=>p?f.get(e).cy:f.get(e).cx).sort((e,t)=>e-t),n=[...t].sort((e,t)=>(v.get(e)??0)-(v.get(t)??0));for(let e=0;e<n.length;e++){let t=f.get(n[e]);p?t.cy=r[e]:t.cx=r[e]}}let m=[];for(let e of l){let t=f.get(e.id);m.push({...e,targetPosition:u,sourcePosition:h,position:{x:t.cx-t.w/2,y:t.cy-t.h/2}})}if(c.length>0){let e=0,t=1/0;for(let r of m){let n=I(r,o);e=Math.max(e,r.position.y+n.height),t=Math.min(t,r.position.x)}t===1/0&&(t=0);for(let r=0;r<c.length;r++){let n=c[r],a=I(n,o);m.push({...n,targetPosition:u,sourcePosition:h,position:{x:t,y:e+30+r*(a.height+20)}})}}return{nodes:m,edges:[...t]}}var A=e.i(14236),$=e.i(21023);let z=(0,$.createServerReference)("4010a3f84ebd444f4abbdea94079f6feebaa8ad945",$.callServer,void 0,$.findSourceMapURL,"addRepository"),G=(0,$.createServerReference)("40bd2e03e3260255448bf365056f6aa5984dafb2a0",$.callServer,void 0,$.findSourceMapURL,"deleteRepository"),B=(0,$.createServerReference)("40f2fcff474bb62fe493c7a4c261b28c2ad3168066",$.callServer,void 0,$.findSourceMapURL,"getFeatureMetadata"),q=(0,$.createServerReference)("001c765c3767fa0435e888e2669281ef134f6b35f0",$.callServer,void 0,$.findSourceMapURL,"fetchGraphData");var W=e.i(39443),V=e.i(8361),U=e.i(18354),H=e.i(99045);function X(e,t){let r=new Map;for(let e of t)"dependencyEdge"===e.type&&r.set(e.target,e.source);let n=new Map,o=new Map;for(let t of e)"featureNode"===t.type?n.set(t.id,{nodeId:t.id,data:t.data,parentNodeId:r.get(t.id)}):"repositoryNode"===t.type&&o.set(t.id,{nodeId:t.id,data:t.data});return{featureMap:n,repoMap:o}}function K(e,t){return(void 0===t.state||t.state===e.state)&&(void 0===t.lifecycle||t.lifecycle===e.lifecycle)&&(void 0===t.name||t.name===e.name)&&(void 0===t.description||t.description===e.description)}let Y=(0,U.createLogger)("[Polling]"),J=0,Q=0;function Z(e,o){let a=(0,r.useRouter)(),i=(0,V.useSoundAction)("delete"),s=(0,V.useSoundAction)("create"),{nodes:d,edges:l,reconcile:c,updateFeature:u,addPendingFeature:h,removeFeature:p,restoreFeature:f,addRepository:g,removeRepository:v,replaceRepository:m,getFeatureRepositoryPath:y,getRepositoryData:w,getRepoMapSize:b,setCallbacks:x}=function(e,r){let n=(0,t.useMemo)(()=>X(e,r),[]),[o,a]=(0,t.useState)(n.featureMap),[i,s]=(0,t.useState)(n.repoMap),[d,l]=(0,t.useState)(new Map),c=(0,t.useRef)(new Map),u=(0,t.useRef)({}),h=(0,t.useMemo)(()=>({onNodeAction:e=>u.current.onNodeAction?.(e),onNodeSettings:e=>u.current.onNodeSettings?.(e),onFeatureDelete:e=>u.current.onFeatureDelete?.(e),onRepositoryAdd:e=>u.current.onRepositoryAdd?.(e),onRepositoryClick:e=>u.current.onRepositoryClick?.(e),onRepositoryDelete:e=>u.current.onRepositoryDelete?.(e)}),[]),p=(0,t.useRef)(o);p.current=o;let f=(0,t.useRef)(i);f.current=i;let g=(0,t.useMemo)(()=>(function(e,t,r,n){let o=[],a=[],i=new Map;for(let[e,r]of t)r.data.repositoryPath&&i.set(r.data.repositoryPath,e);let s=new Map;for(let[e,r]of t){let t={...r.data,...n?.onRepositoryAdd&&{onAdd:()=>n.onRepositoryAdd(e)},...n?.onRepositoryClick&&{onClick:()=>n.onRepositoryClick(e)},...n?.onRepositoryDelete&&{onDelete:n.onRepositoryDelete}};o.push({id:e,type:"repositoryNode",position:{x:0,y:0},data:t})}for(let[t,d,l]of[...[...e.entries()].map(([e,t])=>[e,t,!1]),...[...r.entries()].filter(([t])=>!e.has(t)).map(([e,t])=>[e,t,!0])]){let e="creating"===d.data.state||l,r={...d.data,...!e&&n?.onNodeAction&&{onAction:()=>n.onNodeAction(t)},...!e&&n?.onNodeSettings&&{onSettings:()=>n.onNodeSettings(t)},...!e&&n?.onFeatureDelete&&{onDelete:n.onFeatureDelete}};if(o.push({id:t,type:"featureNode",position:{x:0,y:0},data:r}),d.parentNodeId)a.push({id:`dep-${d.parentNodeId}-${t}`,source:d.parentNodeId,target:t,type:"dependencyEdge"});else{let e=d.data.repositoryPath,r=i.get(e)??function(e){if(s.has(e))return s.get(e);let t=`virtual-repo-${e}`,r=e.split("/").filter(Boolean).at(-1)??e;return o.push({id:t,type:"repositoryNode",position:{x:0,y:0},data:{name:r,repositoryPath:e}}),s.set(e,t),t}(e);a.push({id:`edge-${r}-${t}`,source:r,target:t,style:{strokeDasharray:"5 5"}})}}let d=a.length>0;for(let e of o)e.data.showHandles=d;return{nodes:o,edges:a}})(o,i,d,h),[o,i,d,h]),v=(0,t.useRef)({key:"",positions:new Map}),{nodes:m,edges:y}=(0,t.useMemo)(()=>{let e=g.nodes.map(e=>e.id).sort().join(","),t=g.edges.map(e=>`${e.source}-${e.target}`).sort().join(","),r=`${e}|${t}`;if(r!==v.current.key){let e=F(g.nodes,g.edges,T),t=new Map;for(let r of e.nodes)t.set(r.id,{position:r.position,targetPosition:r.targetPosition,sourcePosition:r.sourcePosition});return v.current={key:r,positions:t},e}let{positions:n}=v.current;return{nodes:g.nodes.map(e=>{let t=n.get(e.id);return t?{...e,...t}:e}),edges:g.edges}},[g]),w=(0,t.useCallback)((e,t)=>{let{featureMap:r,repoMap:n}=X(e,t),o=new Set([...r.values()].map(e=>`${e.data.name}\0${e.data.repositoryPath}`));a(e=>{let t=[...e.entries()].filter(([,e])=>"creating"===e.data.state),n=new Map(r);for(let[e,r]of t){let t=`${r.data.name}\0${r.data.repositoryPath}`;o.has(t)||n.set(e,r)}for(let[e,t]of c.current){let r=n.get(e);r&&(n.set(e,{...r,data:{...r.data,...t}}),c.current.delete(e))}return n}),l(e=>{if(0===e.size)return e;let t=!1,r=new Map(e);for(let[n,a]of e){let e=`${a.data.name}\0${a.data.repositoryPath}`;o.has(e)&&(r.delete(n),t=!0)}return t?r:e}),s(n)},[]),b=(0,t.useCallback)((e,t)=>{a(r=>{let n=r.get(e);if(!n)return c.current.set(e,{...c.current.get(e),...t}),r;if(c.current.delete(e),K(n.data,t))return r;let o=new Map(r);return o.set(e,{...n,data:{...n.data,...t}}),o}),l(r=>{let n=r.get(e);if(!n||K(n.data,t))return r;let o=new Map(r);return o.set(e,{...n,data:{...n.data,...t}}),o})},[]),x=(0,t.useCallback)((e,t,r)=>{l(n=>{let o=new Map(n);return o.set(e,{nodeId:e,data:t,parentNodeId:r}),o})},[]),E=(0,t.useCallback)(e=>{l(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),k=(0,t.useCallback)(e=>{a(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),j=(0,t.useCallback)((e,t)=>{a(r=>{let n=new Map(r);return n.set(e,t),n})},[]),_=(0,t.useCallback)((e,t)=>{s(r=>{let n=new Map(r);return n.set(e,{nodeId:e,data:t}),n})},[]),C=(0,t.useCallback)(e=>{s(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),N=(0,t.useCallback)((e,t,r)=>{s(n=>{if(!n.has(e))return n;let o=new Map(n);return o.delete(e),o.set(t,{nodeId:t,data:r}),o})},[]),O=(0,t.useCallback)(e=>p.current.get(e)?.data.repositoryPath,[]),M=(0,t.useCallback)(e=>f.current.get(e)?.data,[]);return{nodes:m,edges:y,reconcile:w,updateFeature:b,addPendingFeature:x,removePendingFeature:E,removeFeature:k,restoreFeature:j,addRepository:_,removeRepository:C,replaceRepository:N,getFeatureRepositoryPath:O,getRepositoryData:M,getRepoMapSize:(0,t.useCallback)(()=>f.current.size,[]),setCallbacks:(0,t.useCallback)(e=>{u.current=e},[])}}(e,o),E=(0,t.useRef)(d),k=(0,t.useRef)(l);(0,t.useEffect)(()=>{E.current=d,k.current=l},[d,l]);let j=(0,t.useMemo)(()=>e.map(e=>e.id).sort().join(","),[e]),_=(0,t.useMemo)(()=>e.filter(e=>"featureNode"===e.type).map(e=>{let t=e.data;return`${e.id}:${t.state}:${t.lifecycle}`}).sort().join(","),[e]),C=(0,t.useRef)("");(0,t.useEffect)(()=>{let t=`${j}|${_}`;t!==C.current&&(C.current=t,c(e,o))},[j,_,e,o,c]);let N=(0,t.useRef)(new Map),{events:O}=(0,W.useAgentEventsContext)();(0,t.useEffect)(()=>{let t=N.current;for(let r of e){if("featureNode"!==r.type)continue;let e=r.data,o=t.get(r.id);void 0!==o&&o!==e.state&&(O.some(t=>t.featureId===e.featureId&&(0,H.mapEventTypeToState)(t.eventType)===e.state)||("done"===e.state?n.toast.success(e.name,{description:"Feature completed!"}):"action-required"===e.state?n.toast.warning(e.name,{description:"Waiting for your approval",action:{label:"Review",onClick:()=>a.push(`/feature/${e.featureId}`)}}):"error"===e.state&&n.toast.error(e.name,{description:e.errorMessage??"Agent failed"}))),t.set(r.id,e.state)}},[_,e,O,a]);let M=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(M.current>O.length&&(M.current=0),O.length<=M.current)return;let e=O.slice(M.current);for(let{featureId:t,state:r,lifecycle:n}of(M.current=O.length,(0,H.resolveSseEventUpdates)(e)))(void 0!==r||void 0!==n)&&u(`feat-${t}`,{...void 0!==r&&{state:r},...void 0!==n&&{lifecycle:n}})},[O,u]),(0,t.useEffect)(()=>{let e=e=>{let{featureId:t}=e.detail;u(`feat-${t}`,{state:"running"})};return window.addEventListener("shep:feature-approved",e),()=>window.removeEventListener("shep:feature-approved",e)},[u]);let R=(0,t.useRef)(new Set),P=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(P.current>O.length&&(P.current=0),O.length<=P.current)return;let e=O.slice(P.current);for(let t of(P.current=O.length,e)){if("Feature metadata updated"!==t.message||R.current.has(t.featureId))continue;R.current.add(t.featureId);let e=`feat-${t.featureId}`;B(t.featureId).then(t=>{t&&u(e,{name:t.name,description:t.description})}).catch(()=>{})}},[O,u]),(0,t.useEffect)(()=>{Y.debug("polling enabled (3000ms interval)");let e=setInterval(async()=>{try{let{nodes:e,edges:t}=await q();c(e,t)}catch{Y.warn("poll fetch failed — will retry next interval")}},3e3);return()=>{Y.debug("polling disabled"),clearInterval(e)}},[c]);let S=(0,t.useCallback)(e=>{},[]),L=(0,t.useCallback)(e=>{},[]),D=(0,t.useCallback)((e,t,r)=>{let n=t?.featureId?`feat-${t.featureId}`:`feature-${Date.now()}-${J++}`,o={name:t?.name??"New Feature",description:t?.description??"Describe what this feature does",featureId:t?.featureId??`#${n.slice(-4)}`,lifecycle:"requirements",state:t?.state??"running",progress:0,repositoryPath:t?.repositoryPath??"",branch:t?.branch??""};return h(n,o,"dependencyEdge"===r&&e?e:void 0),n},[h]),I=(0,t.useCallback)(e=>{let t=`feat-${e}`,r=E.current.filter(e=>e.id===t).map(e=>({nodeId:e.id,data:e.data}))[0];p(t),i.play(),n.toast.success("Feature deleted successfully"),a.push("/"),(0,A.deleteFeature)(e).then(e=>{e.error&&(r&&f(t,r),n.toast.error(e.error))}).catch(()=>{r&&f(t,r),n.toast.error("Failed to delete feature")})},[a,i,p,f]),$=(0,t.useCallback)(async e=>{let t=`repo-${e}`,r=new Set(k.current.filter(e=>e.source===t).map(e=>e.target)),o=w(t),a=new Map;for(let e of r){let t=E.current.find(t=>t.id===e);t&&a.set(e,{nodeId:e,data:t.data})}let s=()=>{for(let[e,r]of(o&&g(t,o),a))f(e,r)};for(let e of(v(t),r))p(e);try{let t=await G(e);if(!t.success){n.toast.error(t.error??"Failed to remove repository"),s();return}i.play(),n.toast.success("Repository removed")}catch{n.toast.error("Failed to remove repository"),s()}},[i,v,p,g,f,w]),U=(0,t.useCallback)(e=>{let t=F(E.current,k.current,{...T,direction:e});c(t.nodes,t.edges)},[c]);return{nodes:d,edges:l,onNodesChange:S,handleConnect:L,handleAddRepository:(0,t.useCallback)(e=>{let t=0===b(),r=`repo-temp-${++Q}`,o=e.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??e;return g(r,{name:o,repositoryPath:e,id:r}),z({path:e,name:o}).then(e=>{if(e.error){v(r),n.toast.error(e.error);return}let t=e.repository;m(r,`repo-${t.id}`,{name:t.name,repositoryPath:t.path,id:t.id}),s.play()}).catch(()=>{v(r),n.toast.error("Failed to add repository")}),{wasEmpty:t,repoPath:e}},[g,v,m,s,b]),handleLayout:U,handleDeleteFeature:I,handleDeleteRepository:$,createFeatureNode:D,getFeatureRepositoryPath:y,getRepositoryData:w,setCallbacks:x}}e.s(["useControlCenterState",()=>Z],17840)},48246,e=>{"use strict";var t=e.i(20314),r=e.i(53271),n=e.i(79054),o=e.i(31406),a=e.i(3214),i=e.i(3645);let s=(0,i.default)("rotate-ccw",[["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"}]]);var d=e.i(35364);e.i(54793);var l=e.i(7729);e.i(47506);var c=e.i(89313),u=e.i(92002);let h=(0,i.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var p=e.i(8986),f=e.i(38573),g=e.i(19933),v=e.i(67669),m=e.i(24042),y=e.i(64970),w=e.i(31777);e.i(81803);var b=e.i(72714),x=e.i(2287),E=e.i(2828);e.i(99348);var k=e.i(17466),j=e.i(8537),_=e.i(75921),C=e.i(76852);function N({data:e}){let o=(0,_.useFeatureFlags)(),[i,s]=(0,n.useState)(!1),l=(0,C.useRepositoryActions)(e.repositoryPath?{repositoryPath:e.repositoryPath}:null),c=(0,j.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),N="Booting"===c.status||"Ready"===c.status;return(0,t.jsxs)("div",{className:(0,w.cn)("group relative",e.onDelete&&e.id&&"pl-10"),children:[e.showHandles?(0,t.jsx)(r.Handle,{type:"target",position:u.Position.Left,isConnectable:!1,className:"opacity-0!"}):null,e.onDelete&&e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-0 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Remove repository","data-testid":"repository-node-delete-button",onClick:e=>{e.stopPropagation(),s(!0)},className:"bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors",children:(0,t.jsx)(v.Trash2,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(E.TooltipContent,{children:"Remove repository"})]})})}),(0,t.jsx)(x.Dialog,{open:i,onOpenChange:s,children:(0,t.jsxs)(x.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:"Remove repository?"}),(0,t.jsxs)(x.DialogDescription,{children:["This will remove ",(0,t.jsx)("strong",{children:e.name})," and all its features from your workspace. The repository files on disk won't be affected."]})]}),(0,t.jsxs)(x.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(x.DialogClose,{asChild:!0,children:(0,t.jsx)(d.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(d.Button,{variant:"destructive",onClick:()=>{s(!1),e.onDelete?.(e.id)},children:"Remove"})]})]})})]}):null,(0,t.jsxs)("div",{role:"button",tabIndex:0,"data-testid":"repository-node-card","data-repo-name":e.name,onClick:t=>{t.stopPropagation(),e.onClick?.()},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),t.stopPropagation(),e.onClick?.())},className:"nodrag bg-card flex min-w-[18rem] cursor-default items-center gap-3 rounded-full border px-4 py-3 shadow-sm",children:[(0,t.jsx)(h,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("span",{"data-testid":"repository-node-name",className:"min-w-0 truncate text-sm font-medium",children:e.name}),(0,t.jsxs)("div",{className:(0,w.cn)("flex shrink-0 items-center gap-2",(e.repositoryPath??e.onAdd)&&"ml-auto"),onClick:e=>e.stopPropagation(),children:[e.repositoryPath?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open in IDE",onClick:l.openInIde,loading:l.ideLoading,error:!!l.ideError,icon:p.Code2,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:"Open in IDE"})]})}),(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open in Shell",onClick:l.openInShell,loading:l.shellLoading,error:!!l.shellError,icon:f.Terminal,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:"Open in Shell"})]})}),(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:"Open Folder",onClick:l.openFolder,loading:l.folderLoading,error:!!l.folderError,icon:g.FolderOpen,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:"Open Folder"})]})}),o.envDeploy?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(b.ActionButton,{label:N?"Stop Dev Server":"Start Dev Server",onClick:N?c.stop:c.deploy,loading:c.deployLoading||c.stopLoading,error:!!c.deployError,icon:N?y.Square:m.Play,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(E.TooltipContent,{children:N?"Stop Dev Server":"Start Dev Server"})]})}),N?(0,t.jsx)(k.DeploymentStatusBadge,{status:c.status,url:c.url,targetId:e.repositoryPath}):null]}):null]}):null,e.onAdd?(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Add feature","data-testid":"repository-node-add-button",onClick:t=>{t.stopPropagation(),e.onAdd?.()},className:"text-muted-foreground hover:bg-accent dark:hover:bg-accent/50 flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors hover:text-blue-500",children:(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(E.TooltipContent,{children:"Add feature"})]})}):null]})]}),e.onAdd||e.showHandles?(0,t.jsx)(r.Handle,{type:"source",position:u.Position.Right,isConnectable:!e.showHandles,className:"opacity-0!"}):null]})}function O(e){let[n]=(0,u.getBezierPath)({sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition});return(0,t.jsx)(r.BaseEdge,{id:e.id,path:n,style:{strokeDasharray:"5 5"}})}e.i(1650),e.i(45811),e.i(25235);let M={x:30,y:30,zoom:.85};function R({onResetViewport:e}){let{setViewport:o}=(0,r.useReactFlow)(),a=(0,n.useCallback)(()=>{o(e(),{duration:400})},[e,o]);return(0,t.jsx)(r.ControlButton,{onClick:a,title:"Reset view","aria-label":"Reset view",children:(0,t.jsx)(s,{style:{fill:"none"}})})}function P({nodes:e,edges:o,selectedFeatureId:i,defaultViewport:s,onNodesChange:u,onAddFeature:h,onConnect:p,onNodeClick:f,onPaneClick:g,onCanvasDrag:v,onMoveEnd:m,onResetViewport:y,toolbar:w,emptyState:b}){let x=(0,n.useMemo)(()=>({featureNode:c.FeatureNode,repositoryNode:N}),[]),E=(0,n.useMemo)(()=>({dependencyEdge:O}),[]),k=(0,n.useMemo)(()=>null==i?e:e.map(e=>"featureNode"===e.type&&e.data.featureId===i?{...e,selected:!0}:e),[e,i]);return 0===e.length?b?(0,t.jsx)("div",{"data-testid":"features-canvas-empty",className:"h-full w-full",children:b}):(0,t.jsx)("div",{"data-testid":"features-canvas-empty",children:(0,t.jsx)(l.EmptyState,{title:"No features yet",description:"Get started by creating your first feature.",action:(0,t.jsxs)(d.Button,{onClick:h,children:[(0,t.jsx)(a.Plus,{className:"mr-2 h-4 w-4"}),"New Feature"]})})}):(0,t.jsx)("div",{"data-testid":"features-canvas","data-no-drawer-close":!0,className:"pointer-events-auto h-full w-full",children:(0,t.jsxs)(r.ReactFlow,{nodes:k,edges:o,nodeTypes:x,edgeTypes:E,onConnect:p,onNodesChange:u,onNodeClick:f,onPaneClick:g,onMoveStart:v,onMoveEnd:m,defaultViewport:s??M,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,t.jsx)(r.Background,{}),(0,t.jsx)(r.Controls,{showInteractive:!1,children:y?(0,t.jsx)(R,{onResetViewport:y}):null}),w]})})}var S=e.i(5147),L=e.i(8361),T=e.i(30153);let D="shep-canvas-viewport",I={x:30,y:30,zoom:.85},F=(0,i.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);var A=e.i(33548),$=e.i(23925),z=e.i(83428),G=e.i(78521);let B=["cd ~/my-repo",'shep feat new "create modern, sleek dashboards"'];function q({onRepositorySelect:e,className:r}){let[o,i]=(0,n.useState)(!1),[s,d]=(0,n.useState)(!1);async function l(){if(!s){d(!0);try{let t=await (0,G.pickFolder)();t&&e?.(t)}finally{d(!1)}}}let c=(0,n.useCallback)(async()=>{await navigator.clipboard.writeText(B.join("\n")),i(!0),setTimeout(()=>i(!1),2e3)},[]);return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,w.cn)("relative h-full w-full",r),children:[(0,t.jsx)("div",{className:"absolute inset-0 [background-image:radial-gradient(circle,_var(--color-border)_1px,_transparent_1px)] [background-size:24px_24px]"}),(0,t.jsxs)("div",{className:"absolute top-8 left-8 z-10",children:[(0,t.jsx)("h1",{className:"text-4xl font-bold tracking-tight",children:"Features"}),(0,t.jsx)("p",{className:"text-muted-foreground text-3xl font-light",children:"Control Center"})]}),(0,t.jsx)("div",{className:"relative z-10 flex h-full items-center justify-center",children:(0,t.jsxs)("div",{className:"flex max-w-lg flex-col items-center gap-6",children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(h,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-widest uppercase",children:"Repositories"})]}),(0,t.jsxs)("button",{type:"button","data-testid":"empty-state-add-repository",onClick:l,disabled:s,className:"border-muted-foreground/30 hover:border-primary hover:text-primary flex cursor-pointer items-center gap-3 rounded-lg border-2 border-dashed px-8 py-4 transition-colors disabled:cursor-wait disabled:opacity-60",children:[s?(0,t.jsx)(z.Loader2,{className:"h-5 w-5 animate-spin"}):(0,t.jsx)(a.Plus,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:s?"Opening...":"Add Repository"})]}),(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-3",children:[(0,t.jsx)("div",{className:"bg-border h-px w-16"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(F,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-widest uppercase",children:"Or start from the command line"})]}),(0,t.jsx)("div",{className:"bg-border h-px w-16"})]}),(0,t.jsxs)("div",{"data-testid":"cli-code-block",className:"relative w-full rounded-lg bg-zinc-900 px-5 py-4 font-mono text-sm text-zinc-100",children:[(0,t.jsx)("button",{type:"button","data-testid":"cli-code-block-copy",onClick:c,className:"absolute top-3 right-3 cursor-pointer rounded p-1.5 text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-200","aria-label":"Copy commands",children:o?(0,t.jsx)($.Check,{className:"h-4 w-4"}):(0,t.jsx)(A.Copy,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"space-y-1",children:B.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-zinc-500 select-none",children:"$ "}),(0,t.jsx)("span",{children:e})]},e))})]}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Feature will appear on canvas once created"})]})})]})}var W=e.i(17840);let V={maxZoom:1,padding:.5,duration:500};function U({initialNodes:e,initialEdges:a}){let i,s,d,l=(0,o.useRouter)(),c=(0,o.usePathname)(),u=(i=(0,o.usePathname)().match(/^\/feature\/(.+)$/),i?.[1]??null),h=(0,L.useSoundAction)("click"),{guardedNavigate:p}=(0,T.useDrawerCloseGuard)(),{fitView:f}=(0,r.useReactFlow)(),g=(0,n.useRef)(null),{defaultViewport:v,onMoveEnd:m,resetViewport:y}=(s=(0,n.useRef)(function(){try{let e=localStorage.getItem(D);if(null==e)return I;let t=JSON.parse(e);return!(null==t||"object"!=typeof t||Array.isArray(t))&&"number"==typeof t.x&&"number"==typeof t.y&&"number"==typeof t.zoom&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.zoom)&&t.zoom>0?t:I}catch{return I}}()).current,d=(0,n.useRef)(null),(0,n.useEffect)(()=>()=>{null!=d.current&&clearTimeout(d.current)},[]),{defaultViewport:s,onMoveEnd:(0,n.useCallback)(e=>{null!=d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{try{localStorage.setItem(D,JSON.stringify(e))}catch{}},500)},[]),resetViewport:(0,n.useCallback)(()=>{try{localStorage.removeItem(D)}catch{}return I},[])}),{nodes:w,edges:b,onNodesChange:x,handleConnect:E,handleAddRepository:k,handleDeleteFeature:j,handleDeleteRepository:_,createFeatureNode:C,setCallbacks:N}=(0,W.useControlCenterState)(e,a),{setFeatures:O}=(0,S.useSidebarFeaturesContext)(),M=(0,n.useMemo)(()=>w.filter(e=>"featureNode"===e.type),[w]),R=(0,n.useMemo)(()=>M.map(e=>{let t=e.data;return`${t.featureId}:${t.state}:${t.name}`}).sort().join(","),[M]);(0,n.useEffect)(()=>{O(M.map(e=>{let t=e.data,r=(0,S.mapNodeStateToSidebarStatus)(t.state);return r?{featureId:t.featureId,name:t.name,status:r,...null!=t.startedAt&&{startedAt:t.startedAt},...null!=t.runtime&&{duration:t.runtime},...t.agentType&&{agentType:t.agentType},...t.modelId&&{modelId:t.modelId}}:null}).filter(Boolean))},[R,M,O]);let F=(0,n.useCallback)((e,t)=>{if("featureNode"===t.type){let e=t.data;"creating"!==e.state&&p(()=>{h.play(),l.push(`/feature/${e.featureId}`)})}},[l,h,p]),A=(0,n.useCallback)(()=>{h.play(),l.push("/create")},[l,h]),$=(0,n.useCallback)(e=>{h.play();let t=w.find(t=>t.id===e),r=t?.data?.repositoryPath;r?l.push(`/create?repo=${encodeURIComponent(r)}`):l.push("/create")},[w,l,h]),z=(0,n.useCallback)(e=>{let t=e.startsWith("feat-")?e.slice(5):e,r=b.find(t=>t.target===e),n=r?w.find(e=>e.id===r.source):null,o=n?.data?.repositoryPath;h.play();let a=new URLSearchParams;o&&a.set("repo",o),a.set("parent",t),l.push(`/create?${a.toString()}`)},[w,b,l,h]),G=(0,n.useCallback)(e=>{let t=w.find(t=>t.id===e);if(t?.type==="repositoryNode"){let e=t.data;e.id&&p(()=>l.push(`/repository/${e.id}`))}},[w,l,p]),B=(0,n.useCallback)(()=>{"/"!==c&&p(()=>l.push("/"))},[l,c,p]);(0,n.useEffect)(()=>{let e=e=>{let{wasEmpty:t,repoPath:r}=k(e.detail.path);t&&setTimeout(()=>{f(V),g.current=setTimeout(()=>{p(()=>l.push(`/create?repo=${encodeURIComponent(r)}`))},600)},0)};return window.addEventListener("shep:add-repository",e),()=>{window.removeEventListener("shep:add-repository",e),null!=g.current&&clearTimeout(g.current)}},[k,f,p,l]),(0,n.useEffect)(()=>{let e=e=>{let t=e.detail;if(t.parentId)return void C(`feat-${t.parentId}`,{state:"creating",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath},"dependencyEdge");let r=w.find(e=>"repositoryNode"===e.type&&e.data.repositoryPath===t.repositoryPath);C(r?.id??null,{state:"running",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath})};return window.addEventListener("shep:feature-created",e),()=>window.removeEventListener("shep:feature-created",e)},[w,C]),(0,n.useEffect)(()=>{N({onNodeAction:z,onFeatureDelete:j,onRepositoryAdd:$,onRepositoryClick:G,onRepositoryDelete:_})},[N,z,j,$,G,_]);let U=(0,n.useCallback)((e,t)=>{m(t)},[m]);return w.some(e=>"repositoryNode"===e.type)?(0,t.jsx)(P,{nodes:w,edges:b,selectedFeatureId:u,defaultViewport:v,onNodesChange:x,onConnect:E,onAddFeature:A,onNodeClick:F,onPaneClick:B,onMoveEnd:U,onResetViewport:y,emptyState:(0,t.jsx)(q,{onRepositorySelect:k})}):(0,t.jsx)(q,{onRepositorySelect:k})}function H({initialNodes:e,initialEdges:n,drawer:o}){return(0,t.jsxs)("div",{"data-testid":"control-center",className:"h-full w-full",children:[(0,t.jsx)(r.ReactFlowProvider,{children:(0,t.jsx)(U,{initialNodes:e,initialEdges:n})}),(0,t.jsx)("div",{children:o},"drawer")]})}e.s(["ControlCenter",()=>H],48246)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16298,e=>{"use strict";let t=(0,e.i(3645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>t])},69512,e=>{"use strict";let t=(0,e.i(3645).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(["default",()=>t])},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t])},54277,e=>{"use strict";var t=e.i(30090);e.s(["CircleX",()=>t.default])},33548,e=>{"use strict";let t=(0,e.i(3645).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",()=>t],33548)},54793,7729,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({icon:e,title:a,description:l,action:s,className:c,...u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",c),...u,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),l?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:l}):null,s?(0,t.jsx)("div",{className:"mt-2",children:s}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},81846,e=>{"use strict";var t=e.i(20314),r=e.i(94237),a=e.i(31777);let l=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s({className:e,variant:r,...s}){return(0,t.jsx)("div",{className:(0,a.cn)(l({variant:r}),e),...s})}e.s(["Badge",()=>s])},1650,e=>{"use strict";e.i(11495),e.s([])},19933,e=>{"use strict";let t=(0,e.i(3645).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],19933)},8986,170,55337,97290,e=>{"use strict";let t=(0,e.i(3645).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>t],8986);var r=e.i(21023);let a=(0,r.createServerReference)("4054a8243d3e8a146d45b83f5fbdafcaed9971e6fc",r.callServer,void 0,r.findSourceMapURL,"openIde");e.s(["openIde",()=>a],170);let l=(0,r.createServerReference)("40fdf993f22791ece07439592187ab467a2e919157",r.callServer,void 0,r.findSourceMapURL,"openShell");e.s(["openShell",()=>l],55337);let s=(0,r.createServerReference)("409006740275b93b103e2bf7698984d51ced06bd0b",r.callServer,void 0,r.findSourceMapURL,"openFolder");e.s(["openFolder",()=>s],97290)},76852,e=>{"use strict";var t=e.i(79054),r=e.i(170),a=e.i(55337),l=e.i(97290);function s(e){let[s,c]=(0,t.useState)(!1),[u,n]=(0,t.useState)(!1),[o,i]=(0,t.useState)(!1),[d,f]=(0,t.useState)(null),[p,h]=(0,t.useState)(null),[y,m]=(0,t.useState)(null),v=(0,t.useRef)(null),x=(0,t.useRef)(null),b=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),b.current&&clearTimeout(b.current)},[]);let g=(0,t.useCallback)(async(t,r,a,l,s)=>{if(e&&!s){l.current&&clearTimeout(l.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),l.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),l.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>g(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),c,f,v,s),[g,s,e]),openInShell:(0,t.useCallback)(()=>g(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),n,h,x,u),[g,u,e]),openFolder:(0,t.useCallback)(()=>g(()=>(0,l.openFolder)(e.repositoryPath),i,m,b,o),[g,o,e]),ideLoading:s,shellLoading:u,folderLoading:o,ideError:d,shellError:p,folderError:y}}e.s(["useRepositoryActions",()=>s])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3645,e=>{"use strict";var t=e.i(79054);let n=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:l="",children:c,iconNode:u,...s},f)=>(0,t.createElement)("svg",{ref:f,...o,width:r,height:r,stroke:e,strokeWidth:a?24*Number(i)/Number(r):i,className:n("lucide",l),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(s)&&{"aria-hidden":"true"},...s},[...u.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(c)?c:[c]])),a=(e,o)=>{let a=(0,t.forwardRef)(({className:a,...l},c)=>(0,t.createElement)(i,{ref:c,iconNode:o,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...l}));return a.displayName=r(e),a};e.s(["default",()=>a],3645)},53532,e=>{"use strict";var t,n=e.i(79054),r=e.i(91967),o=e.i(87620),i=e.i(5978),a=e.i(29297),l=e.i(20314),c="dismissableLayer.update",u=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s=n.forwardRef((e,s)=>{let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:v,onInteractOutside:g,onDismiss:y,...w}=e,b=n.useContext(u),[x,E]=n.useState(null),S=x?.ownerDocument??globalThis?.document,[,R]=n.useState({}),C=(0,i.useComposedRefs)(s,e=>E(e)),A=Array.from(b.layers),[L]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),P=A.indexOf(L),T=x?A.indexOf(x):-1,O=b.layersWithOutsidePointerEventsDisabled.size>0,k=T>=P,N=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let n=function(){d("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...b.branches].some(e=>e.contains(t));k&&!n&&(m?.(e),g?.(e),e.defaultPrevented||y?.())},S),M=function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e),o=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!o.current&&d("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...b.branches].some(e=>e.contains(t))&&(v?.(e),g?.(e),e.defaultPrevented||y?.())},S);return!function(e,t=globalThis?.document){let r=(0,a.useCallbackRef)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{T===b.layers.size-1&&(h?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},S),n.useEffect(()=>{if(x)return p&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(t=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(x)),b.layers.add(x),f(),()=>{p&&1===b.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=t)}},[x,S,p,b]),n.useEffect(()=>()=>{x&&(b.layers.delete(x),b.layersWithOutsidePointerEventsDisabled.delete(x),f())},[x,b]),n.useEffect(()=>{let e=()=>R({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,l.jsx)(o.Primitive.div,{...w,ref:C,style:{pointerEvents:O?k?"auto":"none":void 0,...e.style},onFocusCapture:(0,r.composeEventHandlers)(e.onFocusCapture,M.onFocusCapture),onBlurCapture:(0,r.composeEventHandlers)(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:(0,r.composeEventHandlers)(e.onPointerDownCapture,N.onPointerDownCapture)})});function f(){let e=new CustomEvent(c);document.dispatchEvent(e)}function d(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?(0,o.dispatchDiscreteCustomEvent)(i,a):i.dispatchEvent(a)}s.displayName="DismissableLayer",n.forwardRef((e,t)=>{let r=n.useContext(u),a=n.useRef(null),c=(0,i.useComposedRefs)(t,a);return n.useEffect(()=>{let e=a.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,l.jsx)(o.Primitive.div,{...e,ref:c})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",()=>s],53532)},56720,e=>{"use strict";let t;var n=e.i(79054),r=e.i(5978),o=e.i(87620),i=e.i(29297),a=e.i(20314),l="focusScope.autoFocusOnMount",c="focusScope.autoFocusOnUnmount",u={bubbles:!1,cancelable:!0},s=n.forwardRef((e,t)=>{let{loop:s=!1,trapped:m=!1,onMountAutoFocus:v,onUnmountAutoFocus:g,...y}=e,[w,b]=n.useState(null),x=(0,i.useCallbackRef)(v),E=(0,i.useCallbackRef)(g),S=n.useRef(null),R=(0,r.useComposedRefs)(t,e=>b(e)),C=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(m){let e=function(e){if(C.paused||!w)return;let t=e.target;w.contains(t)?S.current=t:p(S.current,{select:!0})},t=function(e){if(C.paused||!w)return;let t=e.relatedTarget;null!==t&&(w.contains(t)||p(S.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&p(w)});return w&&n.observe(w,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[m,w,C.paused]),n.useEffect(()=>{if(w){h.add(C);let e=document.activeElement;if(!w.contains(e)){let t=new CustomEvent(l,u);w.addEventListener(l,x),w.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(p(r,{select:t}),document.activeElement!==n)return}(f(w).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&p(w))}return()=>{w.removeEventListener(l,x),setTimeout(()=>{let t=new CustomEvent(c,u);w.addEventListener(c,E),w.dispatchEvent(t),t.defaultPrevented||p(e??document.body,{select:!0}),w.removeEventListener(c,E),h.remove(C)},0)}}},[w,x,E,C]);let A=n.useCallback(e=>{if(!s&&!m||C.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){var r;let t,o=e.currentTarget,[i,a]=[d(t=f(r=o),r),d(t.reverse(),r)];i&&a?e.shiftKey||n!==a?e.shiftKey&&n===i&&(e.preventDefault(),s&&p(a,{select:!0})):(e.preventDefault(),s&&p(i,{select:!0})):n===o&&e.preventDefault()}},[s,m,C.paused]);return(0,a.jsx)(o.Primitive.div,{tabIndex:-1,...y,ref:R,onKeyDown:A})});function f(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function d(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function p(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}s.displayName="FocusScope";var h=(t=[],{add(e){let n=t[0];e!==n&&n?.pause(),(t=m(t,e)).unshift(e)},remove(e){t=m(t,e),t[0]?.resume()}});function m(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}e.s(["FocusScope",()=>s])},39979,e=>{"use strict";var t=e.i(79054),n=e.i(26036),r=e.i(87620),o=e.i(5192),i=e.i(20314),a=t.forwardRef((e,a)=>{let{container:l,...c}=e,[u,s]=t.useState(!1);(0,o.useLayoutEffect)(()=>s(!0),[]);let f=l||u&&globalThis?.document?.body;return f?n.default.createPortal((0,i.jsx)(r.Primitive.div,{...c,ref:a}),f):null});a.displayName="Portal",e.s(["Portal",()=>a])},41687,e=>{"use strict";var t=e.i(79054),n=0;function r(){t.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o()),document.body.insertAdjacentElement("beforeend",e[1]??o()),n++,()=>{1===n&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),n--}},[])}function o(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e.s(["useFocusGuards",()=>r])},13044,e=>{"use strict";var t,n,r,o,i,a,l,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var s=("function"==typeof SuppressedError&&SuppressedError,e.i(79054)),f="right-scroll-bar-position",d="width-before-scroll-bar";function p(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var h="u">typeof window?s.useLayoutEffect:s.useEffect,m=new WeakMap,v=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,i={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}).options=c({async:!0,ssr:!1},t),i),g=function(){},y=s.forwardRef(function(e,t){var n,r,o,i,a=s.useRef(null),l=s.useState({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:g}),f=l[0],d=l[1],y=e.forwardProps,w=e.children,b=e.className,x=e.removeScrollBar,E=e.enabled,S=e.shards,R=e.sideCar,C=e.noRelative,A=e.noIsolation,L=e.inert,P=e.allowPinchZoom,T=e.as,O=e.gapMode,k=u(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=(n=[a,t],r=function(e){return n.forEach(function(t){return p(t,e)})},(o=(0,s.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,i=o.facade,h(function(){var e=m.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||p(e,null)}),r.forEach(function(e){t.has(e)||p(e,o)})}m.set(i,n)},[n]),i),M=c(c({},k),f);return s.createElement(s.Fragment,null,E&&s.createElement(R,{sideCar:v,removeScrollBar:x,shards:S,noRelative:C,noIsolation:A,inert:L,setCallbacks:d,allowPinchZoom:!!P,lockRef:a,gapMode:O}),y?s.cloneElement(s.Children.only(w),c(c({},M),{ref:N})):s.createElement(void 0===T?"div":T,c({},M,{className:b,ref:N}),w))});y.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},y.classNames={fullWidth:d,zeroRight:f};var w=function(e){var t=e.sideCar,n=u(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return s.createElement(r,c({},n))};w.isSideCarExport=!0;var b=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x=function(){var e=b();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},E=function(){var e=x();return function(t){return e(t.styles,t.dynamic),null}},S={left:0,top:0,right:0,gap:0},R=function(e){return parseInt(e||"",10)||0},C=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[R(n),R(r),R(o)]},A=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return S;var t=C(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},L=E(),P="data-scroll-locked",T=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(P,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(f," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(d," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n right: 0 ").concat(r,";\n }\n \n .").concat(d," .").concat(d," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(P,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},O=function(){var e=parseInt(document.body.getAttribute(P)||"0",10);return isFinite(e)?e:0},k=function(){s.useEffect(function(){return document.body.setAttribute(P,(O()+1).toString()),function(){var e=O()-1;e<=0?document.body.removeAttribute(P):document.body.setAttribute(P,e.toString())}},[])},N=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;k();var i=s.useMemo(function(){return A(o)},[o]);return s.createElement(L,{styles:T(i,!t,o,n?"":"!important")})},M=!1;if("u">typeof window)try{var D=Object.defineProperty({},"passive",{get:function(){return M=!0,!0}});window.addEventListener("test",D,D),window.removeEventListener("test",D,D)}catch(e){M=!1}var W=!!M&&{passive:!1},F=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},_=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),j(e,r)){var o=B(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},j=function(e,t){return"v"===e?F(t,"overflowY"):F(t,"overflowX")},B=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},H=function(e,t,n,r,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),l=a*r,c=n.target,u=t.contains(c),s=!1,f=l>0,d=0,p=0;do{if(!c)break;var h=B(e,c),m=h[0],v=h[1]-h[2]-a*m;(m||v)&&j(e,c)&&(d+=v,p+=m);var g=c.parentNode;c=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&c!==document.body||u&&(t.contains(c)||t===c))return f&&(o&&1>Math.abs(d)||!o&&l>d)?s=!0:!f&&(o&&1>Math.abs(p)||!o&&-l>p)&&(s=!0),s},z=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},I=function(e){return[e.deltaX,e.deltaY]},$=function(e){return e&&"current"in e?e.current:e},Y=0,U=[];let V=(a=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Y++)[0],i=s.useState(E)[0],a=s.useRef(e);s.useEffect(function(){a.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map($),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=z(e),l=n.current,c="deltaX"in e?e.deltaX:l[0]-i[0],u="deltaY"in e?e.deltaY:l[1]-i[1],s=e.target,f=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===f&&"range"===s.type)return!1;var d=window.getSelection(),p=d&&d.anchorNode;if(p&&(p===s||p.contains(s)))return!1;var h=_(f,s);if(!h)return!0;if(h?o=f:(o="v"===f?"h":"v",h=_(f,s)),!h)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var m=r.current||o;return H(m,t,e,"h"===m?c:u,!0)},[]),c=s.useCallback(function(e){if(U.length&&U[U.length-1]===i){var n="deltaY"in e?I(e):z(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(a.current.shards||[]).map($).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=s.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),f=s.useCallback(function(e){n.current=z(e),r.current=void 0},[]),d=s.useCallback(function(t){u(t.type,I(t),t.target,l(t,e.lockRef.current))},[]),p=s.useCallback(function(t){u(t.type,z(t),t.target,l(t,e.lockRef.current))},[]);s.useEffect(function(){return U.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,W),document.addEventListener("touchmove",c,W),document.addEventListener("touchstart",f,W),function(){U=U.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,W),document.removeEventListener("touchmove",c,W),document.removeEventListener("touchstart",f,W)}},[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?s.createElement(N,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},v.useMedium(a),w);var K=s.forwardRef(function(e,t){return s.createElement(y,c({},e,{ref:t,sideCar:V}))});K.classNames=y.classNames,e.s(["RemoveScroll",0,K],13044)},73772,e=>{"use strict";var t=new WeakMap,n=new WeakMap,r={},o=0,i=function(e){return e&&(e.host||i(e.parentNode))},a=function(e,a,l,c){var u=(Array.isArray(e)?e:[e]).map(function(e){if(a.contains(e))return e;var t=i(e);return t&&a.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",a,". Doing nothing"),null)}).filter(function(e){return!!e});r[l]||(r[l]=new WeakMap);var s=r[l],f=[],d=new Set,p=new Set(u),h=function(e){!e||d.has(e)||(d.add(e),h(e.parentNode))};u.forEach(h);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(d.has(e))m(e);else try{var r=e.getAttribute(c),o=null!==r&&"false"!==r,i=(t.get(e)||0)+1,a=(s.get(e)||0)+1;t.set(e,i),s.set(e,a),f.push(e),1===i&&o&&n.set(e,!0),1===a&&e.setAttribute(l,"true"),o||e.setAttribute(c,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(a),d.clear(),o++,function(){f.forEach(function(e){var r=t.get(e)-1,o=s.get(e)-1;t.set(e,r),s.set(e,o),r||(n.has(e)||e.removeAttribute(c),n.delete(e)),o||e.removeAttribute(l)}),--o||(t=new WeakMap,t=new WeakMap,n=new WeakMap,r={})}},l=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),a(r,o,n,"aria-hidden")):function(){return null}};e.s(["hideOthers",()=>l])},31227,41712,96142,e=>{"use strict";let t=["top","right","bottom","left"],n=t.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),r=Math.min,o=Math.max,i=Math.round,a=Math.floor,l=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function s(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}let m=new Set(["top","bottom"]);function v(e){return m.has(f(e))?"y":"x"}function g(e,t,n){void 0===n&&(n=!1);let r=d(e),o=p(v(e)),i=h(o),a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=S(a)),[a,S(a)]}function y(e){return e.replace(/start|end/g,e=>u[e])}let w=["left","right"],b=["right","left"],x=["top","bottom"],E=["bottom","top"];function S(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function R(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function A(e,t,n){let r,{reference:o,floating:i}=e,a=v(t),l=p(v(t)),c=h(l),u=f(t),s="y"===a,m=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,y=o[c]/2-i[c]/2;switch(u){case"top":r={x:m,y:o.y-i.height};break;case"bottom":r={x:m,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:g};break;case"left":r={x:o.x-i.width,y:g};break;default:r={x:o.x,y:o.y}}switch(d(t)){case"start":r[l]-=y*(n&&s?-1:1);break;case"end":r[l]+=y*(n&&s?-1:1)}return r}async function L(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=s(t,e),m=R(h),v=l[p?"floating"===d?"reference":"floating":d],g=C(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await (null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await (null==i.isElement?void 0:i.isElement(w))&&await (null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:c}):y);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}let P=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),c=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:f}=A(u,r,c),d=r,p={},h=0;for(let n=0;n<l.length;n++){var m;let{name:i,fn:v}=l[n],{x:g,y:y,data:w,reset:b}=await v({x:s,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:u,platform:{...a,detectOverflow:null!=(m=a.detectOverflow)?m:L},elements:{reference:e,floating:t}});s=null!=g?g:s,f=null!=y?y:f,p={...p,[i]:{...p[i],...w}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:s,y:f}=A(u,d,c)),n=-1)}return{x:s,y:f,placement:d,strategy:o,middlewareData:p}};function T(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O(e){return t.some(t=>e[t]>=0)}function k(e){let t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top));return{x:t,y:n,width:o(...e.map(e=>e.right))-t,height:o(...e.map(e=>e.bottom))-n}}let N=new Set(["left","top"]);async function M(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),a=f(n),l=d(n),c="y"===v(n),u=N.has(a)?-1:1,p=i&&c?-1:1,h=s(t,e),{mainAxis:m,crossAxis:g,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&"number"==typeof y&&(g="end"===l?-1*y:y),c?{x:g*p,y:m*u}:{x:m*u,y:g*p}}function D(){return"u">typeof window}function W(e){return j(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _(e){var t;return null==(t=(j(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function j(e){return!!D()&&(e instanceof Node||e instanceof F(e).Node)}function B(e){return!!D()&&(e instanceof Element||e instanceof F(e).Element)}function H(e){return!!D()&&(e instanceof HTMLElement||e instanceof F(e).HTMLElement)}function z(e){return!(!D()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof F(e).ShadowRoot)}let I=new Set(["inline","contents"]);function $(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!I.has(o)}let Y=new Set(["table","td","th"]),U=[":popover-open",":modal"];function V(e){return U.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let K=["transform","translate","scale","rotate","perspective"],X=["transform","translate","scale","rotate","perspective","filter"],Z=["paint","layout","strict","content"];function q(e){let t=G(),n=B(e)?ee(e):e;return K.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||X.some(e=>(n.willChange||"").includes(e))||Z.some(e=>(n.contain||"").includes(e))}function G(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let J=new Set(["html","body","#document"]);function Q(e){return J.has(W(e))}function ee(e){return F(e).getComputedStyle(e)}function et(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function en(e){if("html"===W(e))return e;let t=e.assignedSlot||e.parentNode||z(e)&&e.host||_(e);return z(t)?t.host:t}function er(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=en(t);return Q(n)?t.ownerDocument?t.ownerDocument.body:t.body:H(n)&&$(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=F(o);if(i){let e=eo(a);return t.concat(a,a.visualViewport||[],$(o)?o:[],e&&n?er(e):[])}return t.concat(o,er(o,[],n))}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ei(e){let t=ee(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=H(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=i(n)!==a||i(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function ea(e){return B(e)?e:e.contextElement}function el(e){let t=ea(e);if(!H(t))return l(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ei(t),c=(a?i(n.width):n.width)/r,u=(a?i(n.height):n.height)/o;return c&&Number.isFinite(c)||(c=1),u&&Number.isFinite(u)||(u=1),{x:c,y:u}}let ec=l(0);function eu(e){let t=F(e);return G()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ec}function es(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),a=ea(e),c=l(1);t&&(r?B(r)&&(c=el(r)):c=el(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===F(a))&&o)?eu(a):l(0),s=(i.left+u.x)/c.x,f=(i.top+u.y)/c.y,d=i.width/c.x,p=i.height/c.y;if(a){let e=F(a),t=r&&B(r)?F(r):r,n=e,o=eo(n);for(;o&&r&&t!==n;){let e=el(o),t=o.getBoundingClientRect(),r=ee(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,f*=e.y,d*=e.x,p*=e.y,s+=i,f+=a,o=eo(n=F(o))}}return C({width:d,height:p,x:s,y:f})}function ef(e,t){let n=et(e).scrollLeft;return t?t.left+n:es(_(e)).left+n}function ed(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ef(e,n),y:n.top+t.scrollTop}}let ep=new Set(["absolute","fixed"]);function eh(e,t,n){var r;let i;if("viewport"===t)i=function(e,t){let n=F(e),r=_(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;let e=G();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}let u=ef(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else u<=25&&(i+=u);return{width:i,height:a,x:l,y:c}}(e,n);else if("document"===t){let t,n,a,l,c,u,s;r=_(e),t=_(r),n=et(r),a=r.ownerDocument.body,l=o(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),c=o(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),u=-n.scrollLeft+ef(r),s=-n.scrollTop,"rtl"===ee(a).direction&&(u+=o(t.clientWidth,a.clientWidth)-l),i={width:l,height:c,x:u,y:s}}else if(B(t)){let e,r,o,a,c,u;r=(e=es(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,a=H(t)?el(t):l(1),c=t.clientWidth*a.x,u=t.clientHeight*a.y,i={width:c,height:u,x:o*a.x,y:r*a.y}}else{let n=eu(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return C(i)}function em(e){return"static"===ee(e).position}function ev(e,t){if(!H(e)||"fixed"===ee(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _(e)===n&&(n=n.ownerDocument.body),n}function eg(e,t){var n;let r=F(e);if(V(e))return r;if(!H(e)){let t=en(e);for(;t&&!Q(t);){if(B(t)&&!em(t))return t;t=en(t)}return r}let o=ev(e,t);for(;o&&(n=o,Y.has(W(n)))&&em(o);)o=ev(o,t);return o&&Q(o)&&em(o)&&!q(o)?r:o||function(e){let t=en(e);for(;H(t)&&!Q(t);){if(q(t))return t;if(V(t))break;t=en(t)}return null}(e)||r}let ey=async function(e){let t=this.getOffsetParent||eg,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=H(t),o=_(t),i="fixed"===n,a=es(e,!0,i,t),c={scrollLeft:0,scrollTop:0},u=l(0);if(r||!r&&!i)if(("body"!==W(t)||$(o))&&(c=et(t)),r){let e=es(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=ef(o));i&&!r&&o&&(u.x=ef(o));let s=!o||r||i?l(0):ed(o,c);return{x:a.left+c.scrollLeft-u.x-s.x,y:a.top+c.scrollTop-u.y-s.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ew={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,a=_(r),c=!!t&&V(t.floating);if(r===a||c&&i)return n;let u={scrollLeft:0,scrollTop:0},s=l(1),f=l(0),d=H(r);if((d||!d&&!i)&&(("body"!==W(r)||$(a))&&(u=et(r)),H(r))){let e=es(r);s=el(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}let p=!a||d||i?l(0):ed(a,u);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+f.x+p.x,y:n.y*s.y-u.scrollTop*s.y+f.y+p.y}},getDocumentElement:_,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:a}=e,l=[..."clippingAncestors"===n?V(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=er(e,[],!1).filter(e=>B(e)&&"body"!==W(e)),o=null,i="fixed"===ee(e).position,a=i?en(e):e;for(;B(a)&&!Q(a);){let t=ee(a),n=q(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&ep.has(o.position)||$(a)&&!n&&function e(t,n){let r=en(t);return!(r===n||!B(r)||Q(r))&&("fixed"===ee(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):o=t,a=en(a)}return t.set(e,r),r}(t,this._c):[].concat(n),i],c=l[0],u=l.reduce((e,n)=>{let i=eh(t,n,a);return e.top=o(i.top,e.top),e.right=r(i.right,e.right),e.bottom=r(i.bottom,e.bottom),e.left=o(i.left,e.left),e},eh(t,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:eg,getElementRects:ey,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ei(e);return{width:t,height:n}},getScale:el,isElement:B,isRTL:function(e){return"rtl"===ee(e).direction}};function eb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ex(e,t,n,i){let l;void 0===i&&(i={});let{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=i,p=ea(e),h=c||u?[...p?er(p):[],...er(t)]:[];h.forEach(e=>{c&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let m=p&&f?function(e,t){let n,i=null,l=_(e);function c(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}return!function u(s,f){void 0===s&&(s=!1),void 0===f&&(f=1),c();let d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:v}=d;if(s||t(),!m||!v)return;let g={rootMargin:-a(h)+"px "+-a(l.clientWidth-(p+m))+"px "+-a(l.clientHeight-(h+v))+"px "+-a(p)+"px",threshold:o(0,r(1,f))||1},y=!0;function w(t){let r=t[0].intersectionRatio;if(r!==f){if(!y)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||eb(d,e.getBoundingClientRect())||u(),y=!1}try{i=new IntersectionObserver(w,{...g,root:l.ownerDocument})}catch(e){i=new IntersectionObserver(w,g)}i.observe(e)}(!0),c}(p,n):null,v=-1,g=null;s&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),p&&!d&&g.observe(p),g.observe(t));let y=d?es(e):null;return d&&function t(){let r=es(e);y&&!eb(y,r)&&n(),y=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{c&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=g)||e.disconnect(),g=null,d&&cancelAnimationFrame(l)}}let eE=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:a,middlewareData:l}=t,c=await M(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},eS=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,o,i,a;let{rects:l,middlewareData:c,placement:u,platform:p,elements:h}=t,{crossAxis:m=!1,alignment:v,allowedPlacements:w=n,autoAlignment:b=!0,...x}=s(e,t),E=void 0!==v||w===n?((a=v||null)?[...w.filter(e=>d(e)===a),...w.filter(e=>d(e)!==a)]:w.filter(e=>f(e)===e)).filter(e=>!a||d(e)===a||!!b&&y(e)!==e):w,S=await p.detectOverflow(t,x),R=(null==(r=c.autoPlacement)?void 0:r.index)||0,C=E[R];if(null==C)return{};let A=g(C,l,await (null==p.isRTL?void 0:p.isRTL(h.floating)));if(u!==C)return{reset:{placement:E[0]}};let L=[S[f(C)],S[A[0]],S[A[1]]],P=[...(null==(o=c.autoPlacement)?void 0:o.overflows)||[],{placement:C,overflows:L}],T=E[R+1];if(T)return{data:{index:R+1,overflows:P},reset:{placement:T}};let O=P.map(e=>{let t=d(e.placement);return[e.placement,t&&m?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),k=(null==(i=O.filter(e=>e[2].slice(0,d(e[0])?2:3).every(e=>e<=0))[0])?void 0:i[0])||O[0][0];return k!==u?{data:{index:R+1,overflows:P},reset:{placement:k}}:{}}}},eR=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:i,placement:a,platform:l}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...h}=s(e,t),m={x:n,y:i},g=await l.detectOverflow(t,h),y=v(f(a)),w=p(y),b=m[w],x=m[y];if(c){let e="y"===w?"top":"left",t="y"===w?"bottom":"right",n=b+g[e],i=b-g[t];b=o(n,r(b,i))}if(u){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=x+g[e],i=x-g[t];x=o(n,r(x,i))}let E=d.fn({...t,[w]:b,[y]:x});return{...E,data:{x:E.x-n,y:E.y-i,enabled:{[w]:c,[y]:u}}}}}},eC=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,a;let l,c,u,{placement:p,middlewareData:h,rects:m,initialPlacement:R,platform:C,elements:A}=t,{mainAxis:L=!0,crossAxis:P=!0,fallbackPlacements:T,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:N=!0,...M}=s(e,t);if(null!=(n=h.arrow)&&n.alignmentOffset)return{};let D=f(p),W=v(R),F=f(R)===R,_=await (null==C.isRTL?void 0:C.isRTL(A.floating)),j=T||(F||!N?[S(R)]:(l=S(R),[y(R),l,y(l)])),B="none"!==k;!T&&B&&j.push(...(c=d(R),u=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?b:w;return t?w:b;case"left":case"right":return t?x:E;default:return[]}}(f(R),"start"===k,_),c&&(u=u.map(e=>e+"-"+c),N&&(u=u.concat(u.map(y)))),u));let H=[R,...j],z=await C.detectOverflow(t,M),I=[],$=(null==(r=h.flip)?void 0:r.overflows)||[];if(L&&I.push(z[D]),P){let e=g(p,m,_);I.push(z[e[0]],z[e[1]])}if($=[...$,{placement:p,overflows:I}],!I.every(e=>e<=0)){let e=((null==(o=h.flip)?void 0:o.index)||0)+1,t=H[e];if(t&&("alignment"!==P||W===v(t)||$.every(e=>v(e.placement)!==W||e.overflows[0]>0)))return{data:{index:e,overflows:$},reset:{placement:t}};let n=null==(i=$.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(O){case"bestFit":{let e=null==(a=$.filter(e=>{if(B){let t=v(e.placement);return t===W||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=R}if(p!==n)return{reset:{placement:n}}}return{}}}},eA=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;let a,l,{placement:c,rects:u,platform:p,elements:h}=t,{apply:m=()=>{},...g}=s(e,t),y=await p.detectOverflow(t,g),w=f(c),b=d(c),x="y"===v(c),{width:E,height:S}=u.floating;"top"===w||"bottom"===w?(a=w,l=b===(await (null==p.isRTL?void 0:p.isRTL(h.floating))?"start":"end")?"left":"right"):(l=w,a="end"===b?"top":"bottom");let R=S-y.top-y.bottom,C=E-y.left-y.right,A=r(S-y[a],R),L=r(E-y[l],C),P=!t.middlewareData.shift,T=A,O=L;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(O=C),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(T=R),P&&!b){let e=o(y.left,0),t=o(y.right,0),n=o(y.top,0),r=o(y.bottom,0);x?O=E-2*(0!==e||0!==t?e+t:o(y.left,y.right)):T=S-2*(0!==n||0!==r?n+r:o(y.top,y.bottom))}await m({...t,availableWidth:O,availableHeight:T});let k=await p.getDimensions(h.floating);return E!==k.width||S!==k.height?{reset:{rects:!0}}:{}}}},eL=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=s(e,t);switch(o){case"referenceHidden":{let e=T(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:O(e)}}}case"escaped":{let e=T(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:O(e)}}}default:return{}}}}},eP=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:i,placement:a,rects:l,platform:c,elements:u,middlewareData:f}=t,{element:m,padding:g=0}=s(e,t)||{};if(null==m)return{};let y=R(g),w={x:n,y:i},b=p(v(a)),x=h(b),E=await c.getDimensions(m),S="y"===b,C=S?"clientHeight":"clientWidth",A=l.reference[x]+l.reference[b]-w[b]-l.floating[x],L=w[b]-l.reference[b],P=await (null==c.getOffsetParent?void 0:c.getOffsetParent(m)),T=P?P[C]:0;T&&await (null==c.isElement?void 0:c.isElement(P))||(T=u.floating[C]||l.floating[x]);let O=T/2-E[x]/2-1,k=r(y[S?"top":"left"],O),N=r(y[S?"bottom":"right"],O),M=T-E[x]-N,D=T/2-E[x]/2+(A/2-L/2),W=o(k,r(D,M)),F=!f.arrow&&null!=d(a)&&D!==W&&l.reference[x]/2-(D<k?k:N)-E[x]/2<0,_=F?D<k?D-k:D-M:0;return{[b]:w[b]+_,data:{[b]:W,centerOffset:D-W-_,...F&&{alignmentOffset:_}},reset:F}}}),eT=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:i,rects:a,platform:l,strategy:c}=t,{padding:u=2,x:d,y:p}=s(e,t),h=Array.from(await (null==l.getClientRects?void 0:l.getClientRects(i.reference))||[]),m=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>C(k(e)))}(h),g=C(k(h)),y=R(u),w=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===m.length&&m[0].left>m[1].right&&null!=d&&null!=p)return m.find(e=>d>e.left-y.left&&d<e.right+y.right&&p>e.top-y.top&&p<e.bottom+y.bottom)||g;if(m.length>=2){if("y"===v(n)){let e=m[0],t=m[m.length-1],r="top"===f(n),o=e.top,i=t.bottom,a=r?e.left:t.left,l=r?e.right:t.right;return{top:o,bottom:i,left:a,right:l,width:l-a,height:i-o,x:a,y:o}}let e="left"===f(n),t=o(...m.map(e=>e.right)),i=r(...m.map(e=>e.left)),a=m.filter(n=>e?n.left===i:n.right===t),l=a[0].top,c=a[a.length-1].bottom;return{top:l,bottom:c,left:i,right:t,width:t-i,height:c-l,x:i,y:l}}return g}},floating:i.floating,strategy:c});return a.reference.x!==w.reference.x||a.reference.y!==w.reference.y||a.reference.width!==w.reference.width||a.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},eO=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=s(e,t),d={x:n,y:r},h=v(o),m=p(h),g=d[m],y=d[h],w=s(l,t),b="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){let e="y"===m?"height":"width",t=i.reference[m]-i.floating[e]+b.mainAxis,n=i.reference[m]+i.reference[e]-b.mainAxis;g<t?g=t:g>n&&(g=n)}if(u){var x,E;let e="y"===m?"width":"height",t=N.has(f(o)),n=i.reference[h]-i.floating[e]+(t&&(null==(x=a.offset)?void 0:x[h])||0)+(t?0:b.crossAxis),r=i.reference[h]+i.reference[e]+(t?0:(null==(E=a.offset)?void 0:E[h])||0)-(t?b.crossAxis:0);y<n?y=n:y>r&&(y=r)}return{[m]:g,[h]:y}}}},ek=(e,t,n)=>{let r=new Map,o={platform:ew,...n},i={...o.platform,_c:r};return P(e,t,{...o,platform:i})};e.s(["arrow",()=>eP,"autoPlacement",()=>eS,"autoUpdate",()=>ex,"computePosition",()=>ek,"flip",()=>eC,"hide",()=>eL,"inline",()=>eT,"limitShift",()=>eO,"offset",()=>eE,"shift",()=>eR,"size",()=>eA],41712);var eN=e.i(79054),eM=e.i(26036),eD="u">typeof document?eN.useLayoutEffect:function(){};function eW(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eW(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eW(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eF(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e_(e,t){let n=eF(e);return Math.round(t*n)/n}function ej(e){let t=eN.useRef(e);return eD(()=>{t.current=e}),t}function eB(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[s,f]=eN.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=eN.useState(r);eW(d,r)||p(r);let[h,m]=eN.useState(null),[v,g]=eN.useState(null),y=eN.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),w=eN.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),b=i||h,x=a||v,E=eN.useRef(null),S=eN.useRef(null),R=eN.useRef(s),C=null!=c,A=ej(c),L=ej(o),P=ej(u),T=eN.useCallback(()=>{if(!E.current||!S.current)return;let e={placement:t,strategy:n,middleware:d};L.current&&(e.platform=L.current),ek(E.current,S.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};O.current&&!eW(R.current,t)&&(R.current=t,eM.flushSync(()=>{f(t)}))})},[d,t,n,L,P]);eD(()=>{!1===u&&R.current.isPositioned&&(R.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let O=eN.useRef(!1);eD(()=>(O.current=!0,()=>{O.current=!1}),[]),eD(()=>{if(b&&(E.current=b),x&&(S.current=x),b&&x){if(A.current)return A.current(b,x,T);T()}},[b,x,T,A,C]);let k=eN.useMemo(()=>({reference:E,floating:S,setReference:y,setFloating:w}),[y,w]),N=eN.useMemo(()=>({reference:b,floating:x}),[b,x]),M=eN.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=e_(N.floating,s.x),r=e_(N.floating,s.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...eF(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,N.floating,s.x,s.y]);return eN.useMemo(()=>({...s,update:T,refs:k,elements:N,floatingStyles:M}),[s,T,k,N,M])}let eH=(e,t)=>({...eE(e),options:[e,t]}),ez=(e,t)=>({...eR(e),options:[e,t]}),eI=(e,t)=>({...eO(e),options:[e,t]}),e$=(e,t)=>({...eC(e),options:[e,t]}),eY=(e,t)=>({...eA(e),options:[e,t]}),eU=(e,t)=>({...eL(e),options:[e,t]}),eV=(e,t)=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eP({element:n.current,padding:r}).fn(t):{}:n?eP({element:n,padding:r}).fn(t):{}},options:[e,t]});e.s(["arrow",()=>eV,"flip",()=>e$,"hide",()=>eU,"limitShift",()=>eI,"offset",()=>eH,"shift",()=>ez,"size",()=>eY,"useFloating",()=>eB],31227);var eK=e.i(87620),eX=e.i(20314),eZ=eN.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,eX.jsx)(eK.Primitive.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eX.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eZ.displayName="Arrow",e.s(["Root",()=>eZ],96142)},77624,e=>{"use strict";var t=e.i(79054),n=e.i(5192);function r(e){let[r,o]=t.useState(void 0);return(0,n.useLayoutEffect)(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,r;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,r=t.blockSize}else n=e.offsetWidth,r=e.offsetHeight;o({width:n,height:r})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}o(void 0)},[e]),r}e.s(["useSize",()=>r])},52740,e=>{"use strict";var t=e.i(79054),n=e.i(31227),r=e.i(41712),o=e.i(96142),i=e.i(5978),a=e.i(22528),l=e.i(87620),c=e.i(29297),u=e.i(5192),s=e.i(77624),f=e.i(20314),d="Popper",[p,h]=(0,a.createContextScope)(d),[m,v]=p(d),g=e=>{let{__scopePopper:n,children:r}=e,[o,i]=t.useState(null);return(0,f.jsx)(m,{scope:n,anchor:o,onAnchorChange:i,children:r})};g.displayName=d;var y="PopperAnchor",w=t.forwardRef((e,n)=>{let{__scopePopper:r,virtualRef:o,...a}=e,c=v(y,r),u=t.useRef(null),s=(0,i.useComposedRefs)(n,u),d=t.useRef(null);return t.useEffect(()=>{let e=d.current;d.current=o?.current||u.current,e!==d.current&&c.onAnchorChange(d.current)}),o?null:(0,f.jsx)(l.Primitive.div,{...a,ref:s})});w.displayName=y;var b="PopperContent",[x,E]=p(b),S=t.forwardRef((e,o)=>{let{__scopePopper:a,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:w=[],collisionPadding:E=0,sticky:S="partial",hideWhenDetached:R=!1,updatePositionStrategy:C="optimized",onPlaced:A,...O}=e,k=v(b,a),[N,M]=t.useState(null),D=(0,i.useComposedRefs)(o,e=>M(e)),[W,F]=t.useState(null),_=(0,s.useSize)(W),j=_?.width??0,B=_?.height??0,H="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},z=Array.isArray(w)?w:[w],I=z.length>0,$={padding:H,boundary:z.filter(L),altBoundary:I},{refs:Y,floatingStyles:U,placement:V,isPositioned:K,middlewareData:X}=(0,n.useFloating)({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:(...e)=>(0,r.autoUpdate)(...e,{animationFrame:"always"===C}),elements:{reference:k.anchor},middleware:[(0,n.offset)({mainAxis:p+B,alignmentAxis:m}),y&&(0,n.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===S?(0,n.limitShift)():void 0,...$}),y&&(0,n.flip)({...$}),(0,n.size)({...$,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),W&&(0,n.arrow)({element:W,padding:g}),P({arrowWidth:j,arrowHeight:B}),R&&(0,n.hide)({strategy:"referenceHidden",...$})]}),[Z,q]=T(V),G=(0,c.useCallbackRef)(A);(0,u.useLayoutEffect)(()=>{K&&G?.()},[K,G]);let J=X.arrow?.x,Q=X.arrow?.y,ee=X.arrow?.centerOffset!==0,[et,en]=t.useState();return(0,u.useLayoutEffect)(()=>{N&&en(window.getComputedStyle(N).zIndex)},[N]),(0,f.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:K?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[X.transformOrigin?.x,X.transformOrigin?.y].join(" "),...X.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,f.jsx)(x,{scope:a,placedSide:Z,onArrowChange:F,arrowX:J,arrowY:Q,shouldHideArrow:ee,children:(0,f.jsx)(l.Primitive.div,{"data-side":Z,"data-align":q,...O,ref:D,style:{...O.style,animation:K?void 0:"none"}})})})});S.displayName=b;var R="PopperArrow",C={top:"bottom",right:"left",bottom:"top",left:"right"},A=t.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=E(R,n),a=C[i.placedSide];return(0,f.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,f.jsx)(o.Root,{...r,ref:t,style:{...r.style,display:"block"}})})});function L(e){return null!==e}A.displayName=R;var P=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=T(n),s={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+a/2,d=(o.arrow?.y??0)+l/2,p="",h="";return"bottom"===c?(p=i?s:`${f}px`,h=`${-l}px`):"top"===c?(p=i?s:`${f}px`,h=`${r.floating.height+l}px`):"right"===c?(p=`${-l}px`,h=i?s:`${d}px`):"left"===c&&(p=`${r.floating.width+l}px`,h=i?s:`${d}px`),{data:{x:p,y:h}}}});function T(e){let[t,n="center"]=e.split("-");return[t,n]}e.s(["Anchor",()=>w,"Arrow",()=>A,"Content",()=>S,"Root",()=>g,"createPopperScope",()=>h])},1693,e=>{"use strict";var t=e.i(79054),n=e.i(87620),r=e.i(20314),o=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),i=t.forwardRef((e,t)=>(0,r.jsx)(n.Primitive.span,{...e,ref:t,style:{...o,...e.style}}));i.displayName="VisuallyHidden",e.s(["Root",()=>i,"VISUALLY_HIDDEN_STYLES",()=>o])},21023,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return i.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=e.r(40487),a=e.r(45398),l=e.r(48378)},17406,e=>{"use strict";var t,n,r,o,i,a,l,c=((t={}).VsCode="vscode",t.Cursor="cursor",t.Windsurf="windsurf",t.Zed="zed",t.Antigravity="antigravity",t),u=((n={}).Session="session",n.Token="token",n),s=((r={}).Open="Open",r.Merged="Merged",r.Closed="Closed",r),f=((o={}).Pending="Pending",o.Success="Success",o.Failure="Failure",o),d=((i={}).AgentStarted="agent_started",i.PhaseCompleted="phase_completed",i.WaitingApproval="waiting_approval",i.AgentCompleted="agent_completed",i.AgentFailed="agent_failed",i.PrMerged="pr_merged",i.PrClosed="pr_closed",i.PrChecksPassed="pr_checks_passed",i.PrChecksFailed="pr_checks_failed",i),p=((a={}).Info="info",a.Warning="warning",a.Success="success",a.Error="error",a),h=((l={}).Booting="Booting",l.Ready="Ready",l.Stopped="Stopped",l);e.s(["AgentAuthMethod",()=>u,"CiStatus",()=>f,"DeploymentState",()=>h,"EditorType",()=>c,"NotificationEventType",()=>d,"NotificationSeverity",()=>p,"PrStatus",()=>s])}]);
|