@anvia/studio 1.0.2 → 1.0.4
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/README.md +25 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +148 -3
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/Check.es-DgvuCllR.js +2 -0
- package/dist/ui/assets/Check.es-DgvuCllR.js.map +1 -0
- package/dist/ui/assets/Copy.es-DV7tb_eC.js +2 -0
- package/dist/ui/assets/Copy.es-DV7tb_eC.js.map +1 -0
- package/dist/ui/assets/MagnifyingGlass.es-yzEp9c89.js +2 -0
- package/dist/ui/assets/MagnifyingGlass.es-yzEp9c89.js.map +1 -0
- package/dist/ui/assets/Wrench.es-rRuP3Mrh.js +2 -0
- package/dist/ui/assets/Wrench.es-rRuP3Mrh.js.map +1 -0
- package/dist/ui/assets/agents-page-ByhvVYOx.js +2 -0
- package/dist/ui/assets/agents-page-ByhvVYOx.js.map +1 -0
- package/dist/ui/assets/badge-C3fkxijh.js +2 -0
- package/dist/ui/assets/badge-C3fkxijh.js.map +1 -0
- package/dist/ui/assets/button-B_AoswCu.js +2 -0
- package/dist/ui/assets/button-B_AoswCu.js.map +1 -0
- package/dist/ui/assets/{dialog-DN8F1Aaq.js → dialog-BfKpnby4.js} +2 -2
- package/dist/ui/assets/{dialog-DN8F1Aaq.js.map → dialog-BfKpnby4.js.map} +1 -1
- package/dist/ui/assets/{dist-PrGeYMiK.js → dist-Dr6EWOhl.js} +2 -2
- package/dist/ui/assets/{dist-PrGeYMiK.js.map → dist-Dr6EWOhl.js.map} +1 -1
- package/dist/ui/assets/{es2015-Ck1KeeEx.js → es2015-DGcxtKLK.js} +2 -2
- package/dist/ui/assets/{es2015-Ck1KeeEx.js.map → es2015-DGcxtKLK.js.map} +1 -1
- package/dist/ui/assets/favicon-dark.svg +7 -0
- package/dist/ui/assets/favicon-light.svg +7 -0
- package/dist/ui/assets/favicon.svg +1 -1
- package/dist/ui/assets/graphs-page-ne3dJIrx.js +2 -0
- package/dist/ui/assets/graphs-page-ne3dJIrx.js.map +1 -0
- package/dist/ui/assets/index-BGl7eOVR.css +2 -0
- package/dist/ui/assets/index-DF9Ysm8q.js +75 -0
- package/dist/ui/assets/index-DF9Ysm8q.js.map +1 -0
- package/dist/ui/assets/{input-DHvac9Uq.js → input-DuERdYTl.js} +2 -2
- package/dist/ui/assets/{input-DHvac9Uq.js.map → input-DuERdYTl.js.map} +1 -1
- package/dist/ui/assets/knowledge-page-1WgvGV4f.js +2 -0
- package/dist/ui/assets/knowledge-page-1WgvGV4f.js.map +1 -0
- package/dist/ui/assets/{mcps-page-MSz67ifn.js → mcps-page-BV96jSfG.js} +2 -2
- package/dist/ui/assets/mcps-page-BV96jSfG.js.map +1 -0
- package/dist/ui/assets/memory-page-DxClkjRl.js +4 -0
- package/dist/ui/assets/{memory-page-2qr2eMrI.js.map → memory-page-DxClkjRl.js.map} +1 -1
- package/dist/ui/assets/pipelines-page-ClO_uXn1.js +2 -0
- package/dist/ui/assets/pipelines-page-ClO_uXn1.js.map +1 -0
- package/dist/ui/assets/{renderers-BIw5yJkg.js → renderers-Cf55u6J4.js} +3 -3
- package/dist/ui/assets/{renderers-BIw5yJkg.js.map → renderers-Cf55u6J4.js.map} +1 -1
- package/dist/ui/assets/{request-CnFL8L6p.js → request-DbgMKweq.js} +2 -2
- package/dist/ui/assets/{request-CnFL8L6p.js.map → request-DbgMKweq.js.map} +1 -1
- package/dist/ui/assets/{sandboxes-page-DWMtrKYJ.js → sandboxes-page-Bo4S4ILL.js} +2 -2
- package/dist/ui/assets/sandboxes-page-Bo4S4ILL.js.map +1 -0
- package/dist/ui/assets/select-BdCBnmXx.js +2 -0
- package/dist/ui/assets/{select-C1_9fsRu.js.map → select-BdCBnmXx.js.map} +1 -1
- package/dist/ui/assets/sessions-page-BMnR-r_F.js +2 -0
- package/dist/ui/assets/sessions-page-BMnR-r_F.js.map +1 -0
- package/dist/ui/assets/status-page-Ys5dQyMG.js +2 -0
- package/dist/ui/assets/status-page-Ys5dQyMG.js.map +1 -0
- package/dist/ui/assets/studio-DzEdCFsX.js +2 -0
- package/dist/ui/assets/studio-DzEdCFsX.js.map +1 -0
- package/dist/ui/assets/style-BstB0PNS.js +8 -0
- package/dist/ui/assets/style-BstB0PNS.js.map +1 -0
- package/dist/ui/assets/{textarea-CZvhTJxB.js → textarea-fAtCF2cf.js} +2 -2
- package/dist/ui/assets/{textarea-CZvhTJxB.js.map → textarea-fAtCF2cf.js.map} +1 -1
- package/dist/ui/assets/tool-runner-Cwfc3yY8.js +2 -0
- package/dist/ui/assets/tool-runner-Cwfc3yY8.js.map +1 -0
- package/dist/ui/assets/{tools-page-D1ewvG0D.js → tools-page-BSgFqVi2.js} +2 -2
- package/dist/ui/assets/tools-page-BSgFqVi2.js.map +1 -0
- package/dist/ui/assets/trace-browser-Co9iS9HR.js +4 -0
- package/dist/ui/assets/trace-browser-Co9iS9HR.js.map +1 -0
- package/dist/ui/assets/transcript-item-ChVGempt.js +3 -0
- package/dist/ui/assets/transcript-item-ChVGempt.js.map +1 -0
- package/dist/ui/index.html +28 -20
- package/package.json +5 -4
- package/dist/ui/assets/CaretDown.es-CXu4Fvbf.js +0 -2
- package/dist/ui/assets/CaretDown.es-CXu4Fvbf.js.map +0 -1
- package/dist/ui/assets/Check.es-DSXK9-8c.js +0 -2
- package/dist/ui/assets/Check.es-DSXK9-8c.js.map +0 -1
- package/dist/ui/assets/Wrench.es-Cl38Pi3C.js +0 -4
- package/dist/ui/assets/Wrench.es-Cl38Pi3C.js.map +0 -1
- package/dist/ui/assets/agents-page-h-83w9EN.js +0 -2
- package/dist/ui/assets/agents-page-h-83w9EN.js.map +0 -1
- package/dist/ui/assets/badge-O3YyUN3G.js +0 -2
- package/dist/ui/assets/badge-O3YyUN3G.js.map +0 -1
- package/dist/ui/assets/button-Dsqwey2_.js +0 -2
- package/dist/ui/assets/button-Dsqwey2_.js.map +0 -1
- package/dist/ui/assets/index-DmctBqLn.js +0 -75
- package/dist/ui/assets/index-DmctBqLn.js.map +0 -1
- package/dist/ui/assets/index-VCdJ2Rb4.css +0 -2
- package/dist/ui/assets/knowledge-page-DKnPrmhK.js +0 -2
- package/dist/ui/assets/knowledge-page-DKnPrmhK.js.map +0 -1
- package/dist/ui/assets/mcps-page-MSz67ifn.js.map +0 -1
- package/dist/ui/assets/memory-page-2qr2eMrI.js +0 -4
- package/dist/ui/assets/pipelines-page-D1IB1tw-.js +0 -8
- package/dist/ui/assets/pipelines-page-D1IB1tw-.js.map +0 -1
- package/dist/ui/assets/sandboxes-page-DWMtrKYJ.js.map +0 -1
- package/dist/ui/assets/select-C1_9fsRu.js +0 -2
- package/dist/ui/assets/sessions-page-BIk4q-L8.js +0 -2
- package/dist/ui/assets/sessions-page-BIk4q-L8.js.map +0 -1
- package/dist/ui/assets/status-page-jKTghmnz.js +0 -2
- package/dist/ui/assets/status-page-jKTghmnz.js.map +0 -1
- package/dist/ui/assets/studio-Bh00wIF1.js +0 -2
- package/dist/ui/assets/studio-Bh00wIF1.js.map +0 -1
- package/dist/ui/assets/tool-runner-BtaZqE3R.js +0 -2
- package/dist/ui/assets/tool-runner-BtaZqE3R.js.map +0 -1
- package/dist/ui/assets/tools-page-D1ewvG0D.js.map +0 -1
- package/dist/ui/assets/trace-browser-CuBl9__d.js +0 -10
- package/dist/ui/assets/trace-browser-CuBl9__d.js.map +0 -1
- package/dist/ui/assets/transcript-item-ChtaJvPe.js +0 -3
- package/dist/ui/assets/transcript-item-ChtaJvPe.js.map +0 -1
- /package/dist/ui/assets/{pipelines-page-DLioOiRN.css → style-DLioOiRN.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sandboxes-page-DWMtrKYJ.js","names":["e","e","e","e","r","t","a","i","e","t","a","a","i"],"sources":["../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/DownloadSimple.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/File.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/FolderOpen.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/TerminalWindow.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/DownloadSimple.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/File.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/FolderOpen.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/TerminalWindow.es.js","../../../src/ui/app/modules/sandboxes/sandboxes-page.tsx"],"sourcesContent":["import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as e from \"react\";\nconst a = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M208,88H152V32Z\", opacity: \"0.2\" }), /* @__PURE__ */ e.createElement(\"path\", { d: \"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z\" }))\n ]\n]);\nexport {\n a as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M72.5,150.63,100.79,128,72.5,105.37a12,12,0,1,1,15-18.74l40,32a12,12,0,0,1,0,18.74l-40,32a12,12,0,0,1-15-18.74ZM144,172h32a12,12,0,0,0,0-24H144a12,12,0,0,0,0,24ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,128a8,8,0,0,1-3,6.25l-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32A8,8,0,0,1,128,128Zm48,24H136a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm56-96V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-91,94.25-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32a8,8,0,0,1,0,12.5ZM176,168H136a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M126,128a6,6,0,0,1-2.25,4.69l-40,32a6,6,0,0,1-7.5-9.38L110.4,128,76.25,100.69a6,6,0,1,1,7.5-9.38l40,32A6,6,0,0,1,126,128Zm50,26H136a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Zm54-98V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,128a8,8,0,0,1-3,6.25l-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32A8,8,0,0,1,128,128Zm48,24H136a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm56-96V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M122.5,124.88a4,4,0,0,1,0,6.24l-40,32a4,4,0,0,1-5-6.24L113.6,128,77.5,99.12a4,4,0,0,1,5-6.24ZM176,156H136a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8ZM228,56V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as o from \"react\";\nimport r from \"../lib/IconBase.es.js\";\nimport t from \"../defs/DownloadSimple.es.js\";\nconst e = o.forwardRef((a, m) => /* @__PURE__ */ o.createElement(r, { ref: m, ...a, weights: t }));\ne.displayName = \"DownloadSimpleIcon\";\nconst l = e;\nexport {\n l as DownloadSimple,\n e as DownloadSimpleIcon\n};\n","import * as e from \"react\";\nimport a from \"../lib/IconBase.es.js\";\nimport i from \"../defs/File.es.js\";\nconst o = e.forwardRef((r, t) => /* @__PURE__ */ e.createElement(a, { ref: t, ...r, weights: i }));\no.displayName = \"FileIcon\";\nconst s = o;\nexport {\n s as File,\n o as FileIcon\n};\n","import * as o from \"react\";\nimport t from \"../lib/IconBase.es.js\";\nimport a from \"../defs/FolderOpen.es.js\";\nconst e = o.forwardRef((r, n) => /* @__PURE__ */ o.createElement(t, { ref: n, ...r, weights: a }));\ne.displayName = \"FolderOpenIcon\";\nconst m = e;\nexport {\n e as FolderNotchOpenIcon,\n m as FolderOpen,\n e as FolderOpenIcon\n};\n","import * as o from \"react\";\nimport a from \"../lib/IconBase.es.js\";\nimport i from \"../defs/TerminalWindow.es.js\";\nconst e = o.forwardRef((r, n) => /* @__PURE__ */ o.createElement(a, { ref: n, ...r, weights: i }));\ne.displayName = \"TerminalWindowIcon\";\nconst c = e;\nexport {\n c as TerminalWindow,\n e as TerminalWindowIcon\n};\n","import {\n ArrowClockwise,\n DownloadSimple,\n File,\n FolderOpen,\n TerminalWindow,\n} from \"@phosphor-icons/react\";\nimport { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport type {\n StudioSandboxesSummary,\n StudioSandboxFileEntry,\n StudioSandboxFilesResponse,\n StudioSandboxPort,\n StudioSandboxPortsResponse,\n StudioSandboxProcess,\n StudioSandboxProcessesResponse,\n StudioSandboxProcessLogsResponse,\n StudioSandboxSummary,\n} from \"../../../../types\";\nimport { responseErrorMessage } from \"../../app-errors\";\nimport { Button } from \"../../components/ui/button\";\nimport { StudioIcon } from \"../../components/ui/icon\";\nimport {\n StudioEmptyState,\n StudioPageContent,\n StudioPageHeader,\n StudioPageShell,\n StudioStatusBadge,\n StudioSurface,\n} from \"../../components/ui/studio\";\nimport { cn } from \"../../lib/utils\";\nimport { errorMessage } from \"../shared/format\";\nimport { requestJson } from \"../shared/request\";\n\nconst maxInlinePreviewBytes = 1024 * 1024;\nconst textExtensions = new Set([\n \"css\",\n \"csv\",\n \"env\",\n \"gitignore\",\n \"graphql\",\n \"html\",\n \"ini\",\n \"java\",\n \"js\",\n \"json\",\n \"jsx\",\n \"log\",\n \"md\",\n \"mdx\",\n \"mjs\",\n \"py\",\n \"rb\",\n \"rs\",\n \"sh\",\n \"sql\",\n \"svg\",\n \"toml\",\n \"ts\",\n \"tsx\",\n \"txt\",\n \"xml\",\n \"yaml\",\n \"yml\",\n]);\nconst imageTypes = new Map([\n [\"gif\", \"image/gif\"],\n [\"jpeg\", \"image/jpeg\"],\n [\"jpg\", \"image/jpeg\"],\n [\"png\", \"image/png\"],\n [\"webp\", \"image/webp\"],\n]);\n\ntype LoadState = \"idle\" | \"loading\";\ntype FilePreview =\n | { kind: \"binary\" | \"large\"; file: StudioSandboxFileEntry }\n | { kind: \"image\"; file: StudioSandboxFileEntry; url: string }\n | { kind: \"loading\"; file: StudioSandboxFileEntry }\n | { kind: \"text\"; file: StudioSandboxFileEntry; text: string };\n\nexport function SandboxesPage(props: {\n enabled: boolean;\n initialSandboxRef?: string;\n onError: (message: string) => void;\n onSelectSandbox: (sandboxRef: string) => void;\n}) {\n const [sandboxes, setSandboxes] = useState<StudioSandboxSummary[]>([]);\n const [summaryLoadState, setSummaryLoadState] = useState<LoadState>(\"idle\");\n const [refreshSequence, setRefreshSequence] = useState(0);\n const [currentPath, setCurrentPath] = useState(\".\");\n const [files, setFiles] = useState<StudioSandboxFileEntry[]>([]);\n const [fileLoadState, setFileLoadState] = useState<LoadState>(\"idle\");\n const [preview, setPreview] = useState<FilePreview | undefined>();\n const [ports, setPorts] = useState<StudioSandboxPort[]>([]);\n const [processes, setProcesses] = useState<StudioSandboxProcess[]>([]);\n const [runtimeLoadState, setRuntimeLoadState] = useState<LoadState>(\"idle\");\n const [selectedProcessId, setSelectedProcessId] = useState(\"\");\n const [processLogs, setProcessLogs] = useState<StudioSandboxProcessLogsResponse | undefined>();\n const [localError, setLocalError] = useState(\"\");\n const previewRequest = useRef<AbortController | undefined>(undefined);\n\n const selectedRef = props.initialSandboxRef ?? sandboxes[0]?.ref ?? \"\";\n const selectedSandbox = sandboxes.find((sandbox) => sandbox.ref === selectedRef);\n const selectedSandboxRef = selectedSandbox?.ref;\n const supportsFiles = selectedSandbox?.capabilities.files ?? false;\n const supportsPorts = selectedSandbox?.capabilities.ports ?? false;\n const supportsProcesses = selectedSandbox?.capabilities.processes ?? false;\n\n const reportError = useCallback(\n (error: unknown) => {\n const message = errorMessage(error);\n setLocalError(message);\n props.onError(message);\n },\n [props.onError],\n );\n\n useEffect(() => {\n if (!props.enabled) {\n setSandboxes([]);\n return;\n }\n const controller = new AbortController();\n setSummaryLoadState(\"loading\");\n setLocalError(\"\");\n void requestJson<StudioSandboxesSummary>(\n \"/sandboxes\",\n \"Sandboxes\",\n controller.signal,\n refreshSequence === 0 ? \"default\" : \"reload\",\n )\n .then((summary) => setSandboxes(summary.sandboxes))\n .catch((error: unknown) => {\n if (!controller.signal.aborted) reportError(error);\n })\n .finally(() => {\n if (!controller.signal.aborted) setSummaryLoadState(\"idle\");\n });\n return () => controller.abort();\n }, [props.enabled, refreshSequence, reportError]);\n\n useEffect(() => {\n if (props.initialSandboxRef === undefined && sandboxes[0] !== undefined) {\n props.onSelectSandbox(sandboxes[0].ref);\n }\n }, [props.initialSandboxRef, props.onSelectSandbox, sandboxes]);\n\n useEffect(() => {\n setCurrentPath(\".\");\n setFiles([]);\n setPreview(undefined);\n setPorts([]);\n setProcesses([]);\n setSelectedProcessId(\"\");\n setProcessLogs(undefined);\n return () => previewRequest.current?.abort();\n }, [selectedRef]);\n\n useEffect(() => {\n if (selectedSandboxRef === undefined || !supportsFiles) {\n setFiles([]);\n setFileLoadState(\"idle\");\n return;\n }\n const controller = new AbortController();\n setFileLoadState(\"loading\");\n const params = new URLSearchParams({ path: currentPath });\n void requestJson<StudioSandboxFilesResponse>(\n `/sandboxes/${encodeURIComponent(selectedSandboxRef)}/files?${params}`,\n \"Sandbox files\",\n controller.signal,\n refreshSequence === 0 ? \"default\" : \"reload\",\n )\n .then((response) => setFiles(response.entries))\n .catch((error: unknown) => {\n if (!controller.signal.aborted) {\n setFiles([]);\n reportError(error);\n }\n })\n .finally(() => {\n if (!controller.signal.aborted) setFileLoadState(\"idle\");\n });\n return () => controller.abort();\n }, [currentPath, refreshSequence, reportError, selectedSandboxRef, supportsFiles]);\n\n useEffect(() => {\n if (selectedSandboxRef === undefined) {\n return;\n }\n const controller = new AbortController();\n setRuntimeLoadState(\"loading\");\n const base = `/sandboxes/${encodeURIComponent(selectedSandboxRef)}`;\n const requests: Promise<void>[] = [];\n if (supportsPorts) {\n requests.push(\n requestJson<StudioSandboxPortsResponse>(\n `${base}/ports`,\n \"Sandbox ports\",\n controller.signal,\n refreshSequence === 0 ? \"default\" : \"reload\",\n ).then((response) => setPorts(response.ports)),\n );\n } else {\n setPorts([]);\n }\n if (supportsProcesses) {\n requests.push(\n requestJson<StudioSandboxProcessesResponse>(\n `${base}/processes`,\n \"Sandbox processes\",\n controller.signal,\n refreshSequence === 0 ? \"default\" : \"reload\",\n ).then((response) => {\n setProcesses(response.processes);\n setSelectedProcessId((current) =>\n response.processes.some((process) => process.id === current) ? current : \"\",\n );\n }),\n );\n } else {\n setProcesses([]);\n setSelectedProcessId(\"\");\n }\n void Promise.all(requests)\n .catch((error: unknown) => {\n if (!controller.signal.aborted) reportError(error);\n })\n .finally(() => {\n if (!controller.signal.aborted) setRuntimeLoadState(\"idle\");\n });\n return () => controller.abort();\n }, [refreshSequence, reportError, selectedSandboxRef, supportsPorts, supportsProcesses]);\n\n useEffect(() => {\n if (selectedSandboxRef === undefined || selectedProcessId.length === 0) {\n setProcessLogs(undefined);\n return;\n }\n const controller = new AbortController();\n const base = `/sandboxes/${encodeURIComponent(selectedSandboxRef)}/processes`;\n void requestJson<StudioSandboxProcessLogsResponse>(\n `${base}/${encodeURIComponent(selectedProcessId)}/logs`,\n \"Process logs\",\n controller.signal,\n refreshSequence === 0 ? \"default\" : \"reload\",\n )\n .then(setProcessLogs)\n .catch((error: unknown) => {\n if (!controller.signal.aborted) reportError(error);\n });\n return () => controller.abort();\n }, [refreshSequence, reportError, selectedProcessId, selectedSandboxRef]);\n\n useEffect(\n () => () => {\n if (preview?.kind === \"image\") URL.revokeObjectURL(preview.url);\n },\n [preview],\n );\n\n const clearPreview = useCallback(() => {\n previewRequest.current?.abort();\n previewRequest.current = undefined;\n setPreview(undefined);\n }, []);\n\n const openFile = useCallback(\n async (file: StudioSandboxFileEntry) => {\n previewRequest.current?.abort();\n previewRequest.current = undefined;\n if (selectedSandboxRef === undefined) {\n return;\n }\n if ((file.size ?? 0) > maxInlinePreviewBytes) {\n setPreview({ kind: \"large\", file });\n return;\n }\n const extension = fileExtension(file.path);\n const imageType = imageTypes.get(extension);\n if (!textExtensions.has(extension) && imageType === undefined) {\n setPreview({ kind: \"binary\", file });\n return;\n }\n\n setPreview({ kind: \"loading\", file });\n setLocalError(\"\");\n const controller = new AbortController();\n previewRequest.current = controller;\n try {\n const response = await fetch(fileContentUrl(selectedSandboxRef, file.path), {\n signal: controller.signal,\n });\n if (!response.ok) {\n throw new Error(await responseErrorMessage(response, \"Sandbox file\"));\n }\n const bytes = await response.arrayBuffer();\n if (bytes.byteLength > maxInlinePreviewBytes) {\n setPreview({ kind: \"large\", file });\n return;\n }\n if (imageType !== undefined) {\n const url = URL.createObjectURL(new Blob([bytes], { type: imageType }));\n setPreview({ kind: \"image\", file, url });\n return;\n }\n try {\n const text = new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes);\n setPreview({ kind: \"text\", file, text });\n } catch {\n setPreview({ kind: \"binary\", file });\n }\n } catch (error) {\n if (controller.signal.aborted) return;\n reportError(error);\n setPreview({ kind: \"binary\", file });\n } finally {\n if (previewRequest.current === controller) previewRequest.current = undefined;\n }\n },\n [reportError, selectedSandboxRef],\n );\n\n if (!props.enabled) {\n return (\n <StudioPageShell className=\"grid-rows-[auto_minmax(0,1fr)]\" aria-label=\"Sandboxes\">\n <StudioPageHeader\n title=\"Sandboxes\"\n description=\"Read-only sandbox inspectors explicitly registered by the application.\"\n />\n <StudioPageContent className=\"overflow-auto\">\n <StudioEmptyState\n title=\"No sandbox workspaces\"\n text=\"Register a sandbox inspector in the Studio options to inspect it here.\"\n />\n </StudioPageContent>\n </StudioPageShell>\n );\n }\n\n return (\n <StudioPageShell className=\"grid-rows-[auto_minmax(0,1fr)]\" aria-label=\"Sandboxes\">\n <StudioPageHeader\n title=\"Sandboxes\"\n description=\"Read-only sandbox inspectors explicitly registered by the application.\"\n action={\n <Button\n disabled={summaryLoadState === \"loading\"}\n size=\"sm\"\n type=\"button\"\n variant=\"secondary\"\n onClick={() => setRefreshSequence((current) => current + 1)}\n >\n <StudioIcon icon={ArrowClockwise} aria-hidden=\"true\" />\n Refresh\n </Button>\n }\n />\n\n <StudioPageContent className=\"grid grid-rows-[minmax(0,1fr)] overflow-hidden\">\n {sandboxes.length === 0 ? (\n <StudioEmptyState\n className=\"h-full\"\n title={\n summaryLoadState === \"loading\" ? \"Loading sandboxes\" : \"No live sandboxes detected\"\n }\n text={\n summaryLoadState === \"loading\"\n ? \"Reading live sandbox workspaces.\"\n : \"Register live sandbox inspectors in the Studio options.\"\n }\n />\n ) : (\n <div className=\"grid min-h-0 min-w-0 grid-cols-[250px_minmax(300px,0.8fr)_minmax(400px,1.2fr)] gap-3 overflow-hidden\">\n <SandboxRail\n sandboxes={sandboxes}\n selectedRef={selectedRef}\n onSelect={props.onSelectSandbox}\n />\n {supportsFiles ? (\n <FileBrowser\n currentPath={currentPath}\n files={files}\n loading={fileLoadState === \"loading\"}\n onOpenDirectory={(filePath) => {\n clearPreview();\n setCurrentPath(filePath);\n }}\n onOpenFile={(file) => void openFile(file)}\n onSelectPath={(filePath) => {\n clearPreview();\n setCurrentPath(filePath);\n }}\n />\n ) : (\n <StudioEmptyState\n title=\"Files unavailable\"\n text=\"This registration did not expose file inspection.\"\n />\n )}\n <div className=\"grid min-h-0 gap-3 overflow-y-auto pr-1\">\n {selectedSandbox === undefined ? (\n <StudioEmptyState\n title=\"Sandbox unavailable\"\n text=\"The requested live sandbox is not registered by this Studio runtime.\"\n />\n ) : (\n <>\n <SandboxOverview sandbox={selectedSandbox} error={localError} />\n <FilePreviewPanel preview={preview} sandboxRef={selectedSandbox.ref} />\n <RuntimePanel\n loading={runtimeLoadState === \"loading\"}\n logs={processLogs}\n ports={ports}\n processes={processes}\n selectedProcessId={selectedProcessId}\n supportsPorts={selectedSandbox.capabilities.ports}\n supportsProcesses={selectedSandbox.capabilities.processes}\n onSelectProcess={setSelectedProcessId}\n />\n </>\n )}\n </div>\n </div>\n )}\n </StudioPageContent>\n </StudioPageShell>\n );\n}\n\nfunction SandboxRail(props: {\n sandboxes: StudioSandboxSummary[];\n selectedRef: string;\n onSelect: (sandboxRef: string) => void;\n}) {\n return (\n <StudioSurface className=\"grid min-h-0 grid-rows-[auto_minmax(0,1fr)]\">\n <div className=\"border-b border-border/70 px-4 py-3\">\n <span className=\"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Workspaces\n </span>\n <p className=\"m-0 mt-1 text-xs text-muted-foreground\">\n {props.sandboxes.length} live {props.sandboxes.length === 1 ? \"session\" : \"sessions\"}\n </p>\n </div>\n <div className=\"min-h-0 overflow-y-auto p-2\">\n {props.sandboxes.map((sandbox) => (\n <Button\n className={cn(\n \"mb-1 grid h-auto min-h-16 w-full justify-stretch gap-1 rounded-lg px-3 py-2.5 text-left\",\n sandbox.ref === props.selectedRef && \"border-border bg-accent text-foreground\",\n )}\n key={sandbox.ref}\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onSelect(sandbox.ref)}\n >\n <span className=\"flex min-w-0 items-center justify-between gap-2\">\n <strong className=\"truncate text-sm font-semibold text-foreground\">\n {sandbox.id}\n </strong>\n <StudioStatusBadge className=\"shrink-0 px-1.5 py-0.5 text-[10px]\">\n {sandbox.provider}\n </StudioStatusBadge>\n </span>\n <span className=\"truncate font-mono text-[11px] font-normal text-muted-foreground\">\n {sandbox.workdir}\n </span>\n </Button>\n ))}\n </div>\n </StudioSurface>\n );\n}\n\nfunction FileBrowser(props: {\n currentPath: string;\n files: StudioSandboxFileEntry[];\n loading: boolean;\n onOpenDirectory: (path: string) => void;\n onOpenFile: (file: StudioSandboxFileEntry) => void;\n onSelectPath: (path: string) => void;\n}) {\n const breadcrumbs = useMemo(() => sandboxBreadcrumbs(props.currentPath), [props.currentPath]);\n return (\n <StudioSurface className=\"grid min-h-0 grid-rows-[auto_auto_minmax(0,1fr)]\">\n <div className=\"border-b border-border/70 px-4 py-3\">\n <span className=\"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Files\n </span>\n <p className=\"m-0 mt-1 text-xs text-muted-foreground\">One level at a time</p>\n </div>\n <div className=\"flex min-h-10 items-center gap-1 overflow-x-auto border-b border-border/70 px-3 py-1.5\">\n {breadcrumbs.map((breadcrumb, index) => (\n <span className=\"flex items-center gap-1\" key={breadcrumb.path}>\n {index > 0 ? <span className=\"text-muted-foreground/60\">/</span> : null}\n <Button\n className=\"h-7 min-h-7 px-2 font-mono text-xs\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onSelectPath(breadcrumb.path)}\n >\n {breadcrumb.label}\n </Button>\n </span>\n ))}\n </div>\n <div className=\"min-h-0 overflow-y-auto p-2\">\n {props.loading ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"Loading workspace\"\n text=\"Reading files from the selected sandbox.\"\n />\n ) : null}\n {!props.loading && props.files.length === 0 ? (\n <StudioEmptyState\n size=\"compact\"\n title=\"Empty directory\"\n text=\"This directory does not contain any files.\"\n />\n ) : null}\n {props.files.map((file) => (\n <Button\n className=\"mb-0.5 grid h-10 min-h-10 w-full grid-cols-[18px_minmax(0,1fr)_auto] justify-stretch gap-2 rounded-md px-2.5 text-left text-xs font-medium\"\n key={file.path}\n type=\"button\"\n variant=\"ghost\"\n onClick={() =>\n file.type === \"directory\" ? props.onOpenDirectory(file.path) : props.onOpenFile(file)\n }\n >\n <StudioIcon\n className=\"text-muted-foreground\"\n icon={file.type === \"directory\" ? FolderOpen : File}\n aria-hidden=\"true\"\n />\n <span className=\"truncate text-foreground\">{basename(file.path)}</span>\n <span className=\"font-mono text-[10px] font-normal text-muted-foreground\">\n {file.type === \"file\" ? formatBytes(file.size) : file.type}\n </span>\n </Button>\n ))}\n </div>\n </StudioSurface>\n );\n}\n\nfunction SandboxOverview(props: { sandbox: StudioSandboxSummary; error: string }) {\n return (\n <StudioSurface className=\"p-4\">\n <div className=\"flex flex-wrap items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <span className=\"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Active sandbox\n </span>\n <h2 className=\"m-0 mt-1 truncate text-lg font-semibold text-foreground\">\n {props.sandbox.id}\n </h2>\n <p className=\"m-0 mt-1 truncate font-mono text-xs text-muted-foreground\">\n {props.sandbox.workdir}\n </p>\n </div>\n <StudioStatusBadge>{props.sandbox.provider}</StudioStatusBadge>\n </div>\n <div className=\"mt-4 grid grid-cols-3 gap-3 text-xs\">\n <MetadataList label=\"Agents\" values={props.sandbox.agentIds} />\n <MetadataList label=\"Sandbox tools\" values={props.sandbox.toolNames} />\n <MetadataList\n label=\"Views\"\n values={props.sandbox.views.map((view) => `${view.label} (${view.protocol})`)}\n />\n </div>\n {props.error.length > 0 ? (\n <p className=\"m-0 mt-3 rounded-lg border border-destructive/25 bg-destructive/5 px-3 py-2 text-xs leading-5 text-destructive\">\n {props.error}\n </p>\n ) : null}\n </StudioSurface>\n );\n}\n\nfunction MetadataList(props: { label: string; values: string[] }) {\n return (\n <div className=\"rounded-lg border border-border/70 bg-background/45 p-3\">\n <span className=\"font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {props.label}\n </span>\n <p className=\"m-0 mt-1 break-words font-mono leading-5 text-foreground\">\n {props.values.join(\", \") || \"-\"}\n </p>\n </div>\n );\n}\n\nfunction FilePreviewPanel(props: { preview: FilePreview | undefined; sandboxRef: string }) {\n const file = props.preview?.file;\n return (\n <StudioSurface className=\"grid min-h-64 grid-rows-[auto_minmax(0,1fr)]\">\n <div className=\"flex min-h-12 items-center justify-between gap-3 border-b border-border/70 px-4 py-2\">\n <div className=\"min-w-0\">\n <span className=\"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Preview\n </span>\n <p className=\"m-0 mt-0.5 truncate font-mono text-[11px] text-muted-foreground\">\n {file?.path ?? \"Select a file\"}\n </p>\n </div>\n {file !== undefined ? (\n <Button asChild size=\"sm\" variant=\"secondary\">\n <a href={fileContentUrl(props.sandboxRef, file.path, true)}>\n <StudioIcon icon={DownloadSimple} aria-hidden=\"true\" />\n Download\n </a>\n </Button>\n ) : null}\n </div>\n <div className=\"grid min-h-0 place-items-center overflow-auto\">\n {props.preview === undefined ? (\n <StudioEmptyState\n className=\"h-full rounded-none\"\n size=\"compact\"\n title=\"No file selected\"\n text=\"Choose a regular file to inspect its contents.\"\n />\n ) : null}\n {props.preview?.kind === \"loading\" ? (\n <StudioEmptyState\n className=\"h-full rounded-none\"\n size=\"compact\"\n title=\"Loading preview\"\n text=\"Reading the selected file.\"\n />\n ) : null}\n {props.preview?.kind === \"text\" ? (\n <pre className=\"m-0 h-full min-h-48 w-full overflow-auto whitespace-pre-wrap break-words rounded-lg border border-border/70 bg-card/60 p-4 font-mono text-xs leading-5 text-foreground\">\n {props.preview.text}\n </pre>\n ) : null}\n {props.preview?.kind === \"image\" ? (\n <img\n className=\"max-h-96 max-w-full rounded-lg border border-border/70 object-contain\"\n src={props.preview.url}\n alt={basename(props.preview.file.path)}\n />\n ) : null}\n {props.preview?.kind === \"binary\" ? (\n <PreviewNotice text=\"This file type is download-only and will not be rendered in Studio.\" />\n ) : null}\n {props.preview?.kind === \"large\" ? (\n <PreviewNotice text=\"This file is larger than the 1 MiB inline preview limit.\" />\n ) : null}\n </div>\n </StudioSurface>\n );\n}\n\nfunction PreviewNotice(props: { text: string }) {\n return (\n <div className=\"grid max-w-sm justify-items-center gap-2 text-center\">\n <StudioIcon className=\"h-6 w-6 text-muted-foreground\" icon={File} aria-hidden=\"true\" />\n <p className=\"m-0 text-xs leading-5 text-muted-foreground\">{props.text}</p>\n </div>\n );\n}\n\nfunction RuntimePanel(props: {\n loading: boolean;\n logs: StudioSandboxProcessLogsResponse | undefined;\n ports: StudioSandboxPort[];\n processes: StudioSandboxProcess[];\n selectedProcessId: string;\n supportsPorts: boolean;\n supportsProcesses: boolean;\n onSelectProcess: (processId: string) => void;\n}) {\n return (\n <StudioSurface className=\"p-4\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <span className=\"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n Runtime\n </span>\n <p className=\"m-0 mt-1 text-xs text-muted-foreground\">\n Published ports and managed processes\n </p>\n </div>\n {props.loading ? <StudioStatusBadge>Refreshing</StudioStatusBadge> : null}\n </div>\n\n <div className=\"mt-4 grid gap-4\">\n <RuntimeSection title=\"Ports\">\n {!props.supportsPorts ? (\n <RuntimeEmpty text=\"Published ports are not supported by this sandbox.\" />\n ) : props.ports.length === 0 ? (\n <RuntimeEmpty text=\"No ports are published.\" />\n ) : (\n <div className=\"grid gap-1\">\n {props.ports.map((port) => (\n <div\n className=\"grid grid-cols-[90px_minmax(0,1fr)] gap-3 rounded-md border border-border/60 px-3 py-2 font-mono text-xs\"\n key={`${port.containerPort}:${port.hostPort}`}\n >\n <span className=\"text-foreground\">\n {port.containerPort}/{port.protocol}\n </span>\n <span className=\"truncate text-muted-foreground\">\n {port.host}:{port.hostPort}\n </span>\n </div>\n ))}\n </div>\n )}\n </RuntimeSection>\n\n <RuntimeSection title=\"Processes\">\n {!props.supportsProcesses ? (\n <RuntimeEmpty text=\"Managed processes are not supported by this sandbox.\" />\n ) : props.processes.length === 0 ? (\n <RuntimeEmpty text=\"No managed processes are recorded.\" />\n ) : (\n <div className=\"grid gap-1\">\n {props.processes.map((process) => (\n <Button\n className={cn(\n \"grid h-auto min-h-11 w-full grid-cols-[minmax(0,1fr)_auto] justify-stretch gap-3 rounded-md px-3 py-2 text-left\",\n process.id === props.selectedProcessId &&\n \"border-border bg-accent text-foreground\",\n )}\n key={process.id}\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onSelectProcess(process.id)}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <StudioIcon\n className=\"text-muted-foreground\"\n icon={TerminalWindow}\n aria-hidden=\"true\"\n />\n <span className=\"truncate font-mono text-xs text-foreground\">\n {[process.command, ...process.args].join(\" \")}\n </span>\n </span>\n <StudioStatusBadge className=\"px-1.5 py-0.5 text-[10px]\">\n {process.status}\n </StudioStatusBadge>\n </Button>\n ))}\n </div>\n )}\n </RuntimeSection>\n\n {props.selectedProcessId.length > 0 ? (\n <RuntimeSection title=\"Process logs\">\n {props.logs === undefined ? (\n <RuntimeEmpty text=\"Loading the latest bounded output.\" />\n ) : (\n <div className=\"grid gap-2\">\n <LogBlock\n label=\"stdout\"\n text={props.logs.stdout}\n truncated={props.logs.stdoutTruncated}\n />\n <LogBlock\n label=\"stderr\"\n text={props.logs.stderr}\n truncated={props.logs.stderrTruncated}\n />\n </div>\n )}\n </RuntimeSection>\n ) : null}\n </div>\n </StudioSurface>\n );\n}\n\nfunction RuntimeSection(props: { title: string; children: ReactNode }) {\n return (\n <section className=\"grid gap-2\">\n <h3 className=\"m-0 text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground\">\n {props.title}\n </h3>\n {props.children}\n </section>\n );\n}\n\nfunction RuntimeEmpty(props: { text: string }) {\n return (\n <p className=\"m-0 rounded-md border border-dashed border-border/70 px-3 py-2 text-xs leading-5 text-muted-foreground\">\n {props.text}\n </p>\n );\n}\n\nfunction LogBlock(props: { label: string; text: string; truncated: boolean }) {\n return (\n <div className=\"overflow-hidden rounded-md border border-border/70 bg-background/55\">\n <div className=\"flex items-center justify-between border-b border-border/60 px-3 py-1.5 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground\">\n <span>{props.label}</span>\n {props.truncated ? <span>truncated</span> : null}\n </div>\n <pre className=\"m-0 max-h-48 overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[11px] leading-5 text-foreground\">\n {props.text || \"No output\"}\n </pre>\n </div>\n );\n}\n\nfunction sandboxBreadcrumbs(filePath: string): Array<{ label: string; path: string }> {\n const segments = filePath === \".\" ? [] : filePath.split(\"/\").filter(Boolean);\n const breadcrumbs = [{ label: \"/\", path: \".\" }];\n for (let index = 0; index < segments.length; index += 1) {\n breadcrumbs.push({\n label: segments[index] ?? \"\",\n path: segments.slice(0, index + 1).join(\"/\"),\n });\n }\n return breadcrumbs;\n}\n\nfunction fileContentUrl(sandboxRef: string, filePath: string, download = false): string {\n const params = new URLSearchParams({ path: filePath });\n if (download) params.set(\"download\", \"1\");\n return `/sandboxes/${encodeURIComponent(sandboxRef)}/files/content?${params}`;\n}\n\nfunction fileExtension(filePath: string): string {\n const name = basename(filePath).toLowerCase();\n const dot = name.lastIndexOf(\".\");\n return dot < 0 ? name : name.slice(dot + 1);\n}\n\nfunction basename(filePath: string): string {\n return filePath.split(\"/\").at(-1) ?? filePath;\n}\n\nfunction formatBytes(size: number | undefined): string {\n if (size === undefined) return \"-\";\n if (size < 1024) return `${size} B`;\n if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KiB`;\n return `${(size / (1024 * 1024)).toFixed(1)} MiB`;\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7],"mappings":"4VACMA,EAAoB,IAAI,IAAI,CAChC,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,0NAA2N,CAAC,CAAC,CAC9T,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAClE,OACA,CACE,EAAG,8DACH,QAAS,KACX,CACF,EAAmB,EAAE,cAAc,OAAQ,CAAE,EAAG,2NAA4N,CAAC,CAAC,CAChR,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cA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AK,IAC5B,EAAO,QAAoB,IAAI,EAAO,KAAA,CAAM,QAAQ,CAAC,EAAE,MACpD,IAAI,EAAQ,QAAA,CAAc,QAAQ,CAAC,EAAE,KAC9C"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t,s as n,t as r}from"./utils-DzstcfqT.js";import{a as i,c as a,n as o,o as s,r as c,s as l,t as u}from"./dist-PrGeYMiK.js";import{n as d,r as f}from"./button-Dsqwey2_.js";import{t as p}from"./CaretDown.es-CXu4Fvbf.js";import{t as m}from"./Check.es-DSXK9-8c.js";import{t as h}from"./icon-DyadsXLr.js";import{a as g,c as _,i as v,l as y,n as b,o as x,r as S,t as C}from"./es2015-Ck1KeeEx.js";import{n as w,t as T}from"./dist-CUv0NHNl.js";var E=n(a(),1),D=n(e(),1),O=t(),k=Object.defineProperty,A=(e,t)=>k(e,`name`,{value:t,configurable:!0});function j(e){let t=e+`CollectionProvider`,[n,r]=s(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=A(e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let c=e+`CollectionSlot`,l=d(c),u=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(c,n),o=f(t,i.collectionRef);return(0,O.jsx)(l,{ref:o,children:r})});u.displayName=c;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=d(p),g=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=f(t,o),c=a(p,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,O.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=p;function _(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return A(_,`useCollection`),[{Provider:o,Slot:u,ItemSlot:g},_,r]}A(j,`createCollection`);var M=new WeakMap,N=class e extends Map{static{A(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],M.set(this,!0)}set(e,t){return M.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=ee(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=P(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=P(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return P(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function P(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=F(e,t);return n===-1?void 0:e[n]}A(P,`at`);function F(e,t){let n=e.length,r=ee(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}A(F,`toSafeIndex`);function ee(e){return e!==e||e===0?0:Math.trunc(e)}A(ee,`toSafeInteger`);function I(e){let t=e+`CollectionProvider`,[n,r]=s(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new N,setItemMap:A(()=>void 0,`setItemMap`)}),o=A(({state:e,...t})=>e?(0,O.jsx)(l,{...t,state:e}):(0,O.jsx)(c,{...t}),`CollectionProvider`);o.displayName=t;let c=A(e=>{let t=v();return(0,O.jsx)(l,{...e,state:t})},`CollectionInit`);c.displayName=t+`Init`;let l=A(e=>{let{scope:t,children:n,state:r}=e,a=D.useRef(null),[o,s]=D.useState(null),c=f(a,s),[l,u]=r;return D.useEffect(()=>{if(!o)return;let e=B(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,O.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);l.displayName=t+`Impl`;let u=e+`CollectionSlot`,p=d(u),m=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(u,n),o=f(t,i.collectionRef);return(0,O.jsx)(p,{ref:o,children:r})});m.displayName=u;let h=e+`CollectionItemSlot`,g=d(h),_=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),[s,c]=D.useState(null),l=f(t,o,c),{setItemMap:u}=a(h,n),d=D.useRef(i);L(d.current,i)||(d.current=i);let p=d.current;return D.useEffect(()=>{let e=p;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(z):(t.set(s,{...e,element:s}),t.toSorted(z)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new N(e)))}},[s,p,u]),(0,O.jsx)(g,{"data-radix-collection-item":``,ref:l,children:r})});_.displayName=h;function v(){return D.useState(new N)}A(v,`useInitCollection`);function y(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return A(y,`useCollection`),[{Provider:o,Slot:m,ItemSlot:_},{createCollectionScope:r,useCollection:y,useInitCollection:v}]}A(I,`createCollection`);function L(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}A(L,`shallowEqual`);function R(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}A(R,`isElementPreceding`);function z(e,t){return!e[1].element||!t[1].element?0:R(e[1].element,t[1].element)?-1:1}A(z,`sortByDocumentPosition`);function B(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}A(B,`getChildListObserver`);var te=[`top`,`right`,`bottom`,`left`],V=Math.min,H=Math.max,ne=Math.round,re=Math.floor,U=e=>({x:e,y:e}),ie={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ae(e,t,n){return H(e,V(t,n))}function W(e,t){return typeof e==`function`?e(t):e}function G(e){return e.split(`-`)[0]}function oe(e){return e.split(`-`)[1]}function se(e){return e===`x`?`y`:`x`}function ce(e){return e===`y`?`height`:`width`}function K(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function le(e){return se(K(e))}function ue(e,t,n){n===void 0&&(n=!1);let r=oe(e),i=le(e),a=ce(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ye(o)),[o,ye(o)]}function de(e){let t=ye(e);return[fe(e),t,fe(t)]}function fe(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pe=[`left`,`right`],me=[`right`,`left`],he=[`top`,`bottom`],ge=[`bottom`,`top`];function _e(e,t,n){switch(e){case`top`:case`bottom`:return n?t?me:pe:t?pe:me;case`left`:case`right`:return t?he:ge;default:return[]}}function ve(e,t,n,r){let i=oe(e),a=_e(G(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(fe)))),a}function ye(e){let t=G(e);return ie[t]+e.slice(t.length)}function be(e){return{top:0,right:0,bottom:0,left:0,...e}}function xe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:be(e)}function Se(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ce(e,t,n){let{reference:r,floating:i}=e,a=K(t),o=le(t),s=ce(o),c=G(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(oe(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function we(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=W(t,e),p=xe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Se(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Se(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Te=50,Ee=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:we},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ce(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Te&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ce(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},De=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=W(e,t)||{};if(l==null)return{};let d=xe(u),f={x:n,y:r},p=le(i),m=ce(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=V(d[_],T),D=V(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ae(O,A,k),M=!c.arrow&&oe(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Oe=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=W(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=G(r),_=K(o),v=G(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ye(o)]:de(o)),x=p!==`none`;!d&&x&&b.push(...ve(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ue(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===K(t)||T.every(e=>K(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=K(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function ke(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ae(e){return te.some(t=>e[t]>=0)}var je=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=W(e,t);switch(i){case`referenceHidden`:{let e=ke(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ae(e)}}}case`escaped`:{let e=ke(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ae(e)}}}default:return{}}}}},Me=new Set([`left`,`top`]);async function Ne(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=G(n),s=oe(n),c=K(n)===`y`,l=Me.has(o)?-1:1,u=a&&c?-1:1,d=W(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Pe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ne(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Fe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=W(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=K(G(i)),p=se(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ae(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ae(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ie=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=W(e,t),u={x:n,y:r},d=K(i),f=se(d),p=u[f],m=u[d],h=W(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Me.has(G(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Le=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=W(e,t),u=await o.detectOverflow(t,l),d=G(i),f=oe(i),p=K(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=V(h-u[g],v),x=V(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=H(u.left,0),t=H(u.right,0),n=H(u.top,0),r=H(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:H(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:H(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Re(){return typeof window<`u`}function ze(e){return Be(e)?(e.nodeName||``).toLowerCase():`#document`}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function J(e){return((Be(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Be(e){return Re()?e instanceof Node||e instanceof q(e).Node:!1}function Y(e){return Re()?e instanceof Element||e instanceof q(e).Element:!1}function X(e){return Re()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function Ve(e){return!Re()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function He(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ue(e){return/^(table|td|th)$/.test(ze(e))}function We(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ge=/transform|translate|scale|rotate|perspective|filter/,Ke=/paint|layout|strict|content/,qe=e=>!!e&&e!==`none`,Je;function Ye(e){let t=Y(e)?Z(e):e;return qe(t.transform)||qe(t.translate)||qe(t.scale)||qe(t.rotate)||qe(t.perspective)||!Ze()&&(qe(t.backdropFilter)||qe(t.filter))||Ge.test(t.willChange||``)||Ke.test(t.contain||``)}function Xe(e){let t=et(e);for(;X(t)&&!Qe(t);){if(Ye(t))return t;if(We(t))return null;t=et(t)}return null}function Ze(){return Je??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Je}function Qe(e){return/^(html|body|#document)$/.test(ze(e))}function Z(e){return q(e).getComputedStyle(e)}function $e(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if(ze(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ve(e)&&e.host||J(e);return Ve(t)?t.host:t}function tt(e){let t=et(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&He(t)?t:tt(t)}function nt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=tt(e),i=r===e.ownerDocument?.body,a=q(r);if(i){let e=rt(a);return t.concat(a,a.visualViewport||[],He(r)?r:[],e&&n?nt(e):[])}return t.concat(r,nt(r,[],n))}function rt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function it(e){let t=Z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=X(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ne(n)!==a||ne(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function at(e){return Y(e)?e:e.contextElement}function ot(e){let t=at(e);if(!X(t))return U(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=it(t),o=(a?ne(n.width):n.width)/r,s=(a?ne(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var st=U(0);function ct(e){let t=q(e);return!Ze()||!t.visualViewport?st:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function ut(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=at(e),o=U(1);t&&(r?Y(r)&&(o=ot(r)):o=ot(e));let s=lt(a,n,r)?ct(a):U(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=q(a),t=r&&Y(r)?q(r):r,n=e,i=rt(n);for(;i&&r&&t!==n;){let e=ot(i),t=i.getBoundingClientRect(),r=Z(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=q(i),i=rt(n)}}return Se({width:u,height:d,x:c,y:l})}function dt(e,t){let n=$e(e).scrollLeft;return t?t.left+n:ut(J(e)).left+n}function ft(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dt(e,n),y:n.top+t.scrollTop}}function pt(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=J(r),s=t?We(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=U(1),u=U(0),d=X(r);if((d||!d&&!a)&&((ze(r)!==`body`||He(o))&&(c=$e(r)),d)){let e=ut(r);l=ot(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ft(o,c):U(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function mt(e){return Array.from(e.getClientRects())}function ht(e){let t=J(e),n=$e(e),r=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+dt(e),s=-n.scrollTop;return Z(r).direction===`rtl`&&(o+=H(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var gt=25;function _t(e,t){let n=q(e),r=J(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ze();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=dt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=gt&&(a-=o)}else l<=gt&&(a+=l);return{width:a,height:o,x:s,y:c}}function vt(e,t){let n=ut(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=X(e)?ot(e):U(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function yt(e,t,n){let r;if(t===`viewport`)r=_t(e,n);else if(t===`document`)r=ht(J(e));else if(Y(t))r=vt(t,n);else{let n=ct(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Se(r)}function bt(e,t){let n=et(e);return n===t||!Y(n)||Qe(n)?!1:Z(n).position===`fixed`||bt(n,t)}function xt(e,t){let n=t.get(e);if(n)return n;let r=nt(e,[],!1).filter(e=>Y(e)&&ze(e)!==`body`),i=null,a=Z(e).position===`fixed`,o=a?et(e):e;for(;Y(o)&&!Qe(o);){let t=Z(o),n=Ye(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||He(o)&&!n&&bt(e,o))?r=r.filter(e=>e!==o):i=t,o=et(o)}return t.set(e,r),r}function St(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?We(t)?[]:xt(t,this._c):[].concat(n),r],o=yt(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=yt(t,a[e],i);s=H(n.top,s),c=V(n.right,c),l=V(n.bottom,l),u=H(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ct(e){let{width:t,height:n}=it(e);return{width:t,height:n}}function wt(e,t,n){let r=X(t),i=J(t),a=n===`fixed`,o=ut(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=U(0);function l(){c.x=dt(i)}if(r||!r&&!a){if((ze(t)!==`body`||He(i))&&(s=$e(t)),r){let e=ut(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?ft(i,s):U(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Tt(e){return Z(e).position===`static`}function Et(e,t){if(!X(e)||Z(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return J(e)===n&&(n=n.ownerDocument.body),n}function Dt(e,t){let n=q(e);if(We(e))return n;if(!X(e)){let t=et(e);for(;t&&!Qe(t);){if(Y(t)&&!Tt(t))return t;t=et(t)}return n}let r=Et(e,t);for(;r&&Ue(r)&&Tt(r);)r=Et(r,t);return r&&Qe(r)&&Tt(r)&&!Ye(r)?n:r||Xe(e)||n}var Ot=async function(e){let t=this.getOffsetParent||Dt,n=this.getDimensions,r=await n(e.floating);return{reference:wt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kt(e){return Z(e).direction===`rtl`}var At={convertOffsetParentRelativeRectToViewportRelativeRect:pt,getDocumentElement:J,getClippingRect:St,getOffsetParent:Dt,getElementRects:Ot,getClientRects:mt,getDimensions:Ct,getScale:ot,isElement:Y,isRTL:kt};function jt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mt(e,t){let n=null,r,i=J(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=re(d),h=re(i.clientWidth-(u+f)),g=re(i.clientHeight-(d+p)),_=re(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:H(0,V(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!jt(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Nt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=at(e),u=i||a?[...l?nt(l):[],...t?nt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Mt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ut(e):null;c&&g();function g(){let t=ut(e);h&&!jt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Pt=Pe,Ft=Fe,It=Oe,Lt=Le,Rt=je,zt=De,Bt=Ie,Vt=(e,t,n)=>{let r=new Map,i={platform:At,...n},a={...i.platform,_c:r};return Ee(e,t,{...i,platform:a})},Ht=typeof document<`u`?D.useLayoutEffect:function(){};function Ut(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ut(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ut(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Wt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gt(e,t){let n=Wt(e);return Math.round(t*n)/n}function Kt(e){let t=D.useRef(e);return Ht(()=>{t.current=e}),t}function qt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=D.useState(r);Ut(f,r)||p(r);let[m,h]=D.useState(null),[g,_]=D.useState(null),v=D.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=D.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=D.useRef(null),C=D.useRef(null),w=D.useRef(u),T=c!=null,O=Kt(c),k=Kt(i),A=Kt(l),j=D.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Vt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ut(w.current,t)&&(w.current=t,E.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Ht(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=D.useRef(!1);Ht(()=>(M.current=!0,()=>{M.current=!1}),[]),Ht(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(O.current)return O.current(b,x,j);j()}},[b,x,j,O,T]);let N=D.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),P=D.useMemo(()=>({reference:b,floating:x}),[b,x]),F=D.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Gt(P.floating,u.x),r=Gt(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Wt(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return D.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Jt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:zt({element:r.current,padding:i}).fn(n):r?zt({element:r,padding:i}).fn(n):{}}}},Yt=(e,t)=>{let n=Pt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xt=(e,t)=>{let n=Ft(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zt=(e,t)=>({fn:Bt(e).fn,options:[e,t]}),Qt=(e,t)=>{let n=It(e);return{name:n.name,fn:n.fn,options:[e,t]}},$t=(e,t)=>{let n=Lt(e);return{name:n.name,fn:n.fn,options:[e,t]}},en=(e,t)=>{let n=Rt(e);return{name:n.name,fn:n.fn,options:[e,t]}},tn=(e,t)=>{let n=Jt(e);return{name:n.name,fn:n.fn,options:[e,t]}},nn=Object.defineProperty,rn=(e,t)=>nn(e,`name`,{value:t,configurable:!0});function an(e){let[t,n]=D.useState(void 0);return i(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}rn(an,`useSize`);var on=Object.defineProperty,sn=(e,t)=>on(e,`name`,{value:t,configurable:!0}),cn=`Popper`,[ln,un]=s(cn),[dn,fn]=ln(cn),pn=sn(e=>{let{__scopePopper:t,children:n}=e,[r,i]=D.useState(null),[a,o]=D.useState(void 0);return(0,O.jsx)(dn,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),mn=`PopperAnchor`,hn=D.forwardRef(sn(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=fn(mn,n),o=D.useRef(null),s=a.onAnchorChange,l=D.useCallback(e=>{o.current=e,e&&s(e)},[s]),u=f(t,l),d=D.useRef(null);D.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&s(d.current)});let p=a.placementState&&Sn(a.placementState),m=p?.[0],h=p?.[1];return r?null:(0,O.jsx)(c.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...i,ref:u})},`PopperAnchor`)),gn=`PopperContent`,[_n,vn]=ln(gn),yn=D.forwardRef(sn(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:s=`center`,alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:h=`partial`,hideWhenDetached:g=!1,updatePositionStrategy:_=`optimized`,onPlaced:v,...y}=e,b=fn(gn,n),[x,S]=D.useState(null),C=f(t,S),[w,T]=D.useState(null),E=an(w),k=E?.width??0,A=E?.height??0,j=r+(s===`center`?``:`-`+s),M=typeof m==`number`?m:{top:0,right:0,bottom:0,left:0,...m},N=Array.isArray(p)?p:[p],P=N.length>0,F={padding:M,boundary:N.filter(bn),altBoundary:P},{refs:ee,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=qt({strategy:`fixed`,placement:j,whileElementsMounted:sn((...e)=>Nt(...e,{animationFrame:_===`always`}),`whileElementsMounted`),elements:{reference:b.anchor},middleware:[Yt({mainAxis:a+A,alignmentAxis:l}),d&&Xt({mainAxis:!0,crossAxis:!1,limiter:h===`partial`?Zt():void 0,...F}),d&&Qt({...F}),$t({...F,apply:sn(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),w&&tn({element:w,padding:u}),xn({arrowWidth:k,arrowHeight:A}),g&&en({strategy:`referenceHidden`,...F,boundary:P?F.boundary:void 0})]}),B=b.setPlacementState;i(()=>(B(L),()=>{B(void 0)}),[L,B]);let[te,V]=Sn(L),H=o(v);i(()=>{R&&H?.()},[R,H]);let ne=z.arrow?.x,re=z.arrow?.y,U=z.arrow?.centerOffset!==0,[ie,ae]=D.useState();return i(()=>{x&&ae(window.getComputedStyle(x).zIndex)},[x]),(0,O.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:R?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ie,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,O.jsx)(_n,{scope:n,placedSide:te,placedAlign:V,onArrowChange:T,arrowX:ne,arrowY:re,shouldHideArrow:U,children:(0,O.jsx)(c.div,{"data-side":te,"data-align":V,...y,ref:C,style:{...y.style,animation:R?y.style?.animation:`none`}})})})},`PopperContent`));function bn(e){return e!==null}sn(bn,`isNotNull`);var xn=sn(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Sn(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Sn(e){let[t,n=`center`]=e.split(`-`);return[t,n]}sn(Sn,`getSideAndAlignFromPlacement`);var Cn=pn,wn=hn,Tn=yn,En=Object.defineProperty,Dn=(e,t)=>En(e,`name`,{value:t,configurable:!0});function On(e){let t=D.useRef({value:e,previous:e});return D.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Dn(On,`usePrevious`);var kn=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`}),An=Object.defineProperty,Q=(e,t)=>An(e,`name`,{value:t,configurable:!0}),jn=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Mn=[` `,`Enter`],Nn=`Select`,[Pn,Fn,In]=j(Nn),[Ln,Rn]=s(Nn,[In,un]),zn=un(),[Bn,Vn]=Ln(Nn),[Hn,Un]=Ln(Nn);function Wn(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=zn(t),[v,b]=D.useState(null),[x,S]=D.useState(null),[C,w]=D.useState(!1),E=T(l),[k,A]=_({prop:r,defaultProp:i??!1,onChange:a,caller:Nn}),[j,M]=_({prop:o,defaultProp:s,onChange:c,caller:Nn}),N=D.useRef(null),P=D.useRef(j);D.useEffect(()=>{let e=m?v?.ownerDocument.getElementById(m):v?.form;if(e instanceof HTMLFormElement){let t=Q(()=>M(P.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,v,M]);let F=!v||!!m||!!v.closest(`form`),[ee,I]=D.useState(new Set),L=y(),R=Array.from(ee).map(e=>e.props.value).join(`;`),z=D.useCallback(e=>{I(t=>new Set(t).add(e))},[]),B=D.useCallback(e=>{I(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:L,value:j,onValueChange:M,open:k,onOpenChange:A,dir:E,triggerPointerDownPosRef:N,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:ee,nativeSelectKey:R,isFormControl:F};return(0,O.jsx)(Cn,{...g,children:(0,O.jsx)(Bn,{scope:t,...te,children:(0,O.jsx)(Pn.Provider,{scope:t,children:(0,O.jsx)(Hn,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:B,children:Tr(h)?h(te):n})})})})}Q(Wn,`SelectProvider`);var Gn=Q(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,O.jsx)(Wn,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[n,e?(0,O.jsx)(wr,{__scopeSelect:t}):null]})})},`Select`),Kn=`SelectTrigger`,qn=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=zn(n),o=Vn(Kn,n),s=o.disabled||r,u=f(t,o.onTriggerChange),d=Fn(n),p=D.useRef(`touch`),[m,h,g]=Dr(e=>{let t=d().filter(e=>!e.disabled),n=Or(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),_=Q(e=>{s||(o.onOpenChange(!0),g()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,O.jsx)(wn,{asChild:!0,...a,children:(0,O.jsx)(c.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Er(o.value)?``:void 0,...i,ref:u,onClick:l(i.onClick,e=>{e.currentTarget.focus(),p.current!==`mouse`&&_(e)}),onPointerDown:l(i.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:l(i.onKeyDown,e=>{let t=m.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&h(e.key),!(t&&e.key===` `)&&jn.includes(e.key)&&(_(),e.preventDefault())})})})},`SelectTrigger`)),Jn=`SelectValue`,Yn=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,className:r,style:a,children:o,placeholder:s=``,...l}=e,u=Vn(Jn,n),{onValueNodeHasChildrenChange:d}=u,p=o!==void 0,m=f(t,u.onValueNodeChange);i(()=>{d(p)},[d,p]);let h=Er(u.value);return(0,O.jsx)(c.span,{...l,asChild:!h&&l.asChild,ref:m,style:{pointerEvents:`none`},children:(0,O.jsx)(D.Fragment,{children:h?s:o},h?`placeholder`:`value`)})},`SelectValue`)),Xn=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,O.jsx)(c.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Zn,Qn]=Ln(`SelectPortal`,{forceMount:void 0}),$n=Q(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,O.jsx)(Zn,{scope:e.__scopeSelect,forceMount:n,children:(0,O.jsx)(v,{asChild:!0,...r})})},`SelectPortal`),er=`SelectContent`,tr=D.forwardRef(Q(function(e,t){let n=Qn(er,e.__scopeSelect),{forceMount:r=n.forceMount,...a}=e,o=Vn(er,e.__scopeSelect),[s,c]=D.useState();return i(()=>{c(new DocumentFragment)},[]),(0,O.jsx)(u,{present:r||o.open,children:({present:e})=>e?(0,O.jsx)(or,{...a,ref:t}):(0,O.jsx)(nr,{...a,fragment:s})})},`SelectContent`)),nr=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?E.createPortal((0,O.jsx)(rr,{scope:n,children:(0,O.jsx)(Pn.Slot,{scope:n,children:(0,O.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),$=10,[rr,ir]=Ln(er),ar=d(`SelectContent.RemoveScroll`),or=D.forwardRef(Q(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:_,hideWhenDetached:v,avoidCollisions:y,...w}=e,T=Vn(er,n),[E,k]=D.useState(null),[A,j]=D.useState(null),M=f(t,k),[N,P]=D.useState(null),[F,ee]=D.useState(null),I=Fn(n),[L,R]=D.useState(!1),z=D.useRef(!1);D.useEffect(()=>{if(E)return C(E)},[E]),S();let B=D.useCallback(e=>{let[t,...n]=I().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&A&&(A.scrollTop=0),n===r&&A&&(A.scrollTop=A.scrollHeight),n?.focus(),document.activeElement!==i))return},[I,A]),te=D.useCallback(()=>B([N,E]),[B,N,E]);D.useEffect(()=>{L&&te()},[L,te]);let{onOpenChange:V,triggerPointerDownPosRef:H}=T;D.useEffect(()=>{if(E){let e={x:0,y:0},t=Q(t=>{e={x:Math.abs(Math.round(t.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(H.current?.y??0))}},`handlePointerMove`),n=Q(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(E)||V(!1),document.removeEventListener(`pointermove`,t),H.current=null},`handlePointerUp`);return H.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,V,H]),D.useEffect(()=>{let e=Q(()=>V(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[V]);let[ne,re]=Dr(e=>{let t=I().filter(e=>!e.disabled),n=Or(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),U=D.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&(P(e),r&&(z.current=!0))},[T.value]),ie=D.useCallback(()=>E?.focus(),[E]),ae=D.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&ee(e)},[T.value]),W=r===`popper`?cr:sr,G=W===cr?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:_,hideWhenDetached:v,avoidCollisions:y}:{};return(0,O.jsx)(rr,{scope:n,content:E,viewport:A,onViewportChange:j,itemRefCallback:U,selectedItem:N,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:te,selectedItemText:F,position:r,isPositioned:L,searchRef:ne,children:(0,O.jsx)(b,{as:ar,allowPinchZoom:!0,children:(0,O.jsx)(g,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:l(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,O.jsx)(x,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,O.jsx)(W,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...G,onPlaced:()=>R(!0),ref:M,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:l(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),sr=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,onPlaced:r,...a}=e,o=Vn(er,n),s=ir(er,n),[l,u]=D.useState(null),[d,p]=D.useState(null),m=f(t,p),h=Fn(n),g=D.useRef(!1),_=D.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=s,S=D.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&d&&v&&y&&b){let e=o.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(o.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-$,d=w(a,[$,Math.max($,u-c)]);l.style.minWidth=s+`px`,l.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-$,d=w(a,[$,Math.max($,u-c)]);l.style.minWidth=s+`px`,l.style.right=d+`px`}let a=h(),s=window.innerHeight-$*2,c=v.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=f+p+c+_+m,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),T=parseInt(C.paddingTop,10),E=parseInt(C.paddingBottom,10),D=e.top+e.height/2-$,O=s-D,k=y.offsetHeight/2,A=y.offsetTop+k,j=f+p+A,M=x-j;if(j<=D){let e=a.length>0&&y===a[a.length-1].ref.current;l.style.bottom=`0px`;let t=d.clientHeight-v.offsetTop-v.offsetHeight,n=j+Math.max(O,k+(e?E:0)+t+m);l.style.height=n+`px`}else{let e=a.length>0&&y===a[0].ref.current;l.style.top=`0px`;let t=Math.max(D,f+v.offsetTop+(e?T:0)+k)+M;l.style.height=t+`px`,v.scrollTop=j-D+v.offsetTop}l.style.margin=`${$}px 0`,l.style.minHeight=S+`px`,l.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,o.trigger,o.valueNode,l,d,v,y,b,o.dir,r]);i(()=>S(),[S]);let[C,T]=D.useState();i(()=>{d&&T(window.getComputedStyle(d).zIndex)},[d]);let E=D.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]);return(0,O.jsx)(lr,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:(0,O.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,O.jsx)(c.div,{...a,ref:m,style:{boxSizing:`border-box`,maxHeight:`100%`,...a.style}})})})},`SelectItemAlignedPosition`)),cr=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=$,...a}=e,o=zn(n);return(0,O.jsx)(Tn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[lr,ur]=Ln(er,{}),dr=`SelectViewport`,fr=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=ir(dr,n),o=ur(dr,n),s=f(t,a.onViewportChange),u=D.useRef(0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,O.jsx)(Pn.Slot,{scope:n,children:(0,O.jsx)(c.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:l(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-$*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})},`SelectViewport`)),[pr,mr]=Ln(`SelectGroup`),hr=`SelectItem`,[gr,_r]=Ln(hr),vr=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...s}=e,u=Vn(hr,n),d=ir(hr,n),p=u.value===r,[m,h]=D.useState(a??``),[g,_]=D.useState(!1),v=o(e=>d.itemRefCallback?.(e,r,i)),b=f(t,v),x=y(),S=D.useRef(`touch`),C=Q(()=>{i||(u.onValueChange(r),u.onOpenChange(!1))},`handleSelect`);return(0,O.jsx)(gr,{scope:n,value:r,disabled:i,textId:x,isSelected:p,onItemTextChange:D.useCallback(e=>{h(t=>t||(e?.textContent??``).trim())},[]),children:(0,O.jsx)(Pn.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:(0,O.jsx)(c.div,{role:`option`,"aria-labelledby":x,"data-highlighted":g?``:void 0,"aria-selected":p&&g,"data-state":p?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...s,ref:b,onFocus:l(s.onFocus,()=>_(!0)),onBlur:l(s.onBlur,()=>_(!1)),onClick:l(s.onClick,()=>{S.current!==`mouse`&&C()}),onPointerUp:l(s.onPointerUp,()=>{S.current===`mouse`&&C()}),onPointerDown:l(s.onPointerDown,e=>{S.current=e.pointerType}),onPointerMove:l(s.onPointerMove,e=>{S.current=e.pointerType,i?d.onItemLeave?.():S.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:l(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:l(s.onKeyDown,e=>{i||e.target!==e.currentTarget||(d.searchRef?.current===``||e.key!==` `)&&(Mn.includes(e.key)&&C(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),yr=`SelectItemText`,br=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,className:r,style:a,...s}=e,l=Vn(yr,n),u=ir(yr,n),d=_r(yr,n),p=Un(yr,n),[m,h]=D.useState(null),g=o(e=>u.itemTextRefCallback?.(e,d.value,d.disabled)),_=f(t,h,d.onItemTextChange,g),v=m?.textContent,y=D.useMemo(()=>(0,O.jsx)(`option`,{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=p;return i(()=>(b(y),()=>x(y)),[b,x,y]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(c.span,{id:d.textId,...s,ref:_}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!Er(l.value)?E.createPortal(s.children,l.valueNode):null]})},`SelectItemText`)),xr=`SelectItemIndicator`,Sr=D.forwardRef(Q(function(e,t){let{__scopeSelect:n,...r}=e;return _r(xr,n).isSelected?(0,O.jsx)(c.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Cr=`SelectBubbleInput`,wr=D.forwardRef(Q(function({__scopeSelect:e,...t},n){let r=Vn(Cr,e),{value:i,onValueChange:a,required:o,disabled:s,name:l,autoComplete:u,form:d}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=D.useRef(null),g=f(n,h),_=i??``,v=On(_),y=Array.from(p).some(e=>(e.props.value??``)===``);return D.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,O.jsxs)(c.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:l,autoComplete:u,disabled:s,form:d,onChange:e=>a(e.target.value),...t,style:{...kn,...t.style},ref:g,defaultValue:_,children:[Er(i)&&!y?(0,O.jsx)(`option`,{value:``}):null,Array.from(p)]},m)},`SelectBubbleInput`));function Tr(e){return typeof e==`function`}Q(Tr,`isFunction`);function Er(e){return e===``||e===void 0}Q(Er,`shouldShowPlaceholder`);function Dr(e){let t=o(e),n=D.useRef(``),r=D.useRef(0),i=D.useCallback(e=>{let i=n.current+e;t(i),Q((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=D.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Q(Dr,`useTypeaheadSearch`);function Or(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=kr(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Q(Or,`findNextItem`);function kr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Q(kr,`wrapArray`);var Ar=Gn,jr=Yn;function Mr({className:e,children:t,...n}){return(0,O.jsxs)(qn,{className:r(`flex h-8 w-full items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-1 pr-2 pl-2.5 text-sm text-foreground outline-none transition-colors select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50`,e),...n,children:[t,(0,O.jsx)(Xn,{asChild:!0,children:(0,O.jsx)(h,{icon:p,className:`h-4 w-4 opacity-60`})})]})}function Nr({className:e,children:t,position:n=`popper`,...i}){return(0,O.jsx)($n,{children:(0,O.jsx)(tr,{position:n,className:r(`z-50 max-h-80 min-w-36 overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10`,e),...i,children:(0,O.jsx)(fr,{className:`p-1`,children:t})})})}function Pr({className:e,children:t,...n}){return(0,O.jsxs)(vr,{className:r(`relative flex min-h-8 cursor-default select-none items-center rounded-md py-1 pr-8 pl-1.5 text-base outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50`,e),...n,children:[(0,O.jsx)(`span`,{className:`absolute right-2 flex size-4 items-center justify-center`,children:(0,O.jsx)(Sr,{children:(0,O.jsx)(h,{icon:m,className:`h-4 w-4`})})}),(0,O.jsx)(br,{children:t})]})}export{jr as a,Mr as i,Nr as n,Pr as r,Ar as t};
|
|
2
|
-
//# sourceMappingURL=select-C1_9fsRu.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t,s as n,t as r}from"./utils-DzstcfqT.js";import{i,l as a,t as o}from"./button-Dsqwey2_.js";import{a as s,c,i as l,n as u,o as d,r as f,t as p}from"./dialog-DN8F1Aaq.js";import{n as m,t as h}from"./icon-DyadsXLr.js";import{a as g,s as _,t as v}from"./studio-Bh00wIF1.js";var y=n(e(),1),b=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),x=y.forwardRef((e,t)=>y.createElement(m,{ref:t,...e,weights:b}));x.displayName=`TrashIcon`;var S=x,C=t();function w(e){return e.sessionsEnabled?e.sessions.length===0?(0,C.jsx)(g,{"aria-label":`Sessions`,children:(0,C.jsx)(v,{title:e.sessionLoadState===`loading`?`Loading sessions`:`No sessions`,text:e.sessionLoadState===`loading`?`Reading saved Studio sessions.`:`Start a chat to create a Studio session.`})}):(0,C.jsx)(g,{className:`overflow-auto pb-6 pr-6`,"aria-label":`Sessions`,children:(0,C.jsxs)(_,{className:`h-full min-w-225`,children:[(0,C.jsxs)(`div`,{className:`sticky top-0 z-10 grid min-h-11 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px_72px] items-center gap-4 border-b bg-background/95 px-4 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground backdrop-blur`,children:[(0,C.jsx)(`span`,{children:`Session`}),(0,C.jsx)(`span`,{children:`Agent`}),(0,C.jsx)(`span`,{children:`Messages`}),(0,C.jsx)(`span`,{children:`Updated`}),(0,C.jsx)(`span`,{className:`sr-only`,children:`Actions`})]}),e.sessions.map(t=>(0,C.jsxs)(`div`,{className:r(`grid min-h-14 w-full min-w-0 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px_72px] items-center gap-4 border-b px-4 text-left text-muted-foreground transition duration-200 hover:bg-accent/80 hover:text-accent-foreground`,t.id===e.selectedSessionId&&`bg-muted/45 text-foreground`),children:[(0,C.jsxs)(o,{className:`col-span-4 grid h-full min-h-14 min-w-0 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px] items-center justify-start gap-4 border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit`,type:`button`,variant:`ghost`,onClick:()=>e.onOpenSession(t.id),children:[(0,C.jsxs)(`span`,{className:`grid min-w-0 gap-0.5`,children:[(0,C.jsx)(`strong`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,children:t.title??`Untitled chat`}),(0,C.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium text-muted-foreground`,children:t.id})]}),(0,C.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium`,children:i(e.agents,t.agentId)}),(0,C.jsxs)(`span`,{className:`text-xs font-medium tabular-nums text-muted-foreground`,children:[t.messageCount,` messages`]}),(0,C.jsx)(`time`,{className:`text-xs font-medium text-muted-foreground`,children:a(t.updatedAt)})]}),(0,C.jsxs)(`span`,{className:`flex items-center justify-end gap-1`,children:[(0,C.jsx)(o,{"aria-label":`View tracing for ${t.title??`Untitled chat`}`,className:`h-7 min-h-7 w-7 border-0 bg-transparent p-0 text-muted-foreground opacity-80 hover:bg-transparent hover:text-foreground hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5`,size:`icon`,type:`button`,variant:`ghost`,onClick:n=>{n.stopPropagation(),e.onViewSessionTracing(t.id)},children:(0,C.jsx)(h,{icon:c,"aria-hidden":`true`})}),(0,C.jsx)(o,{"aria-label":`Delete ${t.title??`Untitled chat`}`,className:`h-7 min-h-7 w-7 border-0 bg-transparent p-0 text-muted-foreground opacity-80 hover:bg-transparent hover:text-destructive hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5`,size:`icon`,type:`button`,variant:`ghost`,onClick:n=>{n.stopPropagation(),e.onDeleteSession(t)},children:(0,C.jsx)(h,{icon:S,"aria-hidden":`true`})})]})]},t.id))]})}):(0,C.jsx)(g,{"aria-label":`Sessions`,children:(0,C.jsx)(v,{className:`h-full`,title:`Sessions unavailable`,text:`This Studio runtime does not expose saved sessions.`})})}function T(e){let t=e.session?.title??`Untitled chat`;return(0,C.jsx)(p,{open:e.session!==void 0,onOpenChange:e.onOpenChange,children:(0,C.jsxs)(u,{children:[(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:`Delete session`}),(0,C.jsxs)(f,{children:[`Delete "`,t,`" and its traces. This cannot be undone.`]})]}),(0,C.jsxs)(l,{children:[(0,C.jsx)(o,{type:`button`,variant:`ghost`,onClick:()=>e.onOpenChange(!1),children:`Cancel`}),(0,C.jsx)(o,{type:`button`,variant:`destructive`,onClick:()=>{e.session!==void 0&&e.onConfirm(e.session)},children:`Delete`})]})]})})}export{T as DeleteSessionDialog,w as SessionsPage};
|
|
2
|
-
//# sourceMappingURL=sessions-page-BIk4q-L8.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessions-page-BIk4q-L8.js","names":["s","e","t"],"sources":["../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/defs/Trash.es.js","../../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@phosphor-icons/react/dist/csr/Trash.es.js","../../../src/ui/app/modules/sessions/sessions-page.tsx"],"sourcesContent":["import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z\", opacity: \"0.2\" }), /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as o from \"react\";\nimport s from \"../lib/IconBase.es.js\";\nimport t from \"../defs/Trash.es.js\";\nconst r = o.forwardRef((a, e) => /* @__PURE__ */ o.createElement(s, { ref: e, ...a, weights: t }));\nr.displayName = \"TrashIcon\";\nconst n = r;\nexport {\n n as Trash,\n r as TrashIcon\n};\n","import { Pulse, Trash } from \"@phosphor-icons/react\";\nimport type { StudioConfig, StudioSessionSummary } from \"../../../../types\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../../components/ui/dialog\";\nimport { StudioIcon } from \"../../components/ui/icon\";\nimport { StudioEmptyState, StudioPageShell, StudioSurface } from \"../../components/ui/studio\";\nimport { cn } from \"../../lib/utils\";\nimport { agentLabel, formatRelativeTime } from \"../shared/format\";\nimport type { SessionLoadState } from \"../shared/types\";\n\nexport function SessionsPage(props: {\n agents: StudioConfig[\"agents\"];\n sessions: StudioSessionSummary[];\n sessionsEnabled: boolean;\n sessionLoadState: SessionLoadState;\n selectedSessionId: string;\n onOpenSession: (sessionId: string) => void;\n onViewSessionTracing: (sessionId: string) => void;\n onDeleteSession: (session: StudioSessionSummary) => void;\n}) {\n if (!props.sessionsEnabled) {\n return (\n <StudioPageShell aria-label=\"Sessions\">\n <StudioEmptyState\n className=\"h-full\"\n title=\"Sessions unavailable\"\n text=\"This Studio runtime does not expose saved sessions.\"\n />\n </StudioPageShell>\n );\n }\n if (props.sessions.length === 0) {\n return (\n <StudioPageShell aria-label=\"Sessions\">\n <StudioEmptyState\n title={props.sessionLoadState === \"loading\" ? \"Loading sessions\" : \"No sessions\"}\n text={\n props.sessionLoadState === \"loading\"\n ? \"Reading saved Studio sessions.\"\n : \"Start a chat to create a Studio session.\"\n }\n />\n </StudioPageShell>\n );\n }\n\n return (\n <StudioPageShell className=\"overflow-auto pb-6 pr-6\" aria-label=\"Sessions\">\n <StudioSurface className=\"h-full min-w-225\">\n <div className=\"sticky top-0 z-10 grid min-h-11 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px_72px] items-center gap-4 border-b bg-background/95 px-4 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground backdrop-blur\">\n <span>Session</span>\n <span>Agent</span>\n <span>Messages</span>\n <span>Updated</span>\n <span className=\"sr-only\">Actions</span>\n </div>\n {props.sessions.map((session) => (\n <div\n className={cn(\n \"grid min-h-14 w-full min-w-0 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px_72px] items-center gap-4 border-b px-4 text-left text-muted-foreground transition duration-200 hover:bg-accent/80 hover:text-accent-foreground\",\n session.id === props.selectedSessionId && \"bg-muted/45 text-foreground\",\n )}\n key={session.id}\n >\n <Button\n className=\"col-span-4 grid h-full min-h-14 min-w-0 grid-cols-[minmax(220px,1.3fr)_180px_120px_120px] items-center justify-start gap-4 border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onOpenSession(session.id)}\n >\n <span className=\"grid min-w-0 gap-0.5\">\n <strong className=\"min-w-0 truncate text-sm font-medium text-foreground\">\n {session.title ?? \"Untitled chat\"}\n </strong>\n <span className=\"min-w-0 truncate text-xs font-medium text-muted-foreground\">\n {session.id}\n </span>\n </span>\n <span className=\"min-w-0 truncate text-xs font-medium\">\n {agentLabel(props.agents, session.agentId)}\n </span>\n <span className=\"text-xs font-medium tabular-nums text-muted-foreground\">\n {session.messageCount} messages\n </span>\n <time className=\"text-xs font-medium text-muted-foreground\">\n {formatRelativeTime(session.updatedAt)}\n </time>\n </Button>\n <span className=\"flex items-center justify-end gap-1\">\n <Button\n aria-label={`View tracing for ${session.title ?? \"Untitled chat\"}`}\n className=\"h-7 min-h-7 w-7 border-0 bg-transparent p-0 text-muted-foreground opacity-80 hover:bg-transparent hover:text-foreground hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5\"\n size=\"icon\"\n type=\"button\"\n variant=\"ghost\"\n onClick={(event) => {\n event.stopPropagation();\n props.onViewSessionTracing(session.id);\n }}\n >\n <StudioIcon icon={Pulse} aria-hidden=\"true\" />\n </Button>\n <Button\n aria-label={`Delete ${session.title ?? \"Untitled chat\"}`}\n className=\"h-7 min-h-7 w-7 border-0 bg-transparent p-0 text-muted-foreground opacity-80 hover:bg-transparent hover:text-destructive hover:opacity-100 [&_svg]:h-3.5 [&_svg]:w-3.5\"\n size=\"icon\"\n type=\"button\"\n variant=\"ghost\"\n onClick={(event) => {\n event.stopPropagation();\n props.onDeleteSession(session);\n }}\n >\n <StudioIcon icon={Trash} aria-hidden=\"true\" />\n </Button>\n </span>\n </div>\n ))}\n </StudioSurface>\n </StudioPageShell>\n );\n}\n\nexport function DeleteSessionDialog(props: {\n session: StudioSessionSummary | undefined;\n onOpenChange: (open: boolean) => void;\n onConfirm: (session: StudioSessionSummary) => void;\n}) {\n const title = props.session?.title ?? \"Untitled chat\";\n\n return (\n <Dialog open={props.session !== undefined} onOpenChange={props.onOpenChange}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Delete session</DialogTitle>\n <DialogDescription>\n Delete \"{title}\" and its traces. This cannot be undone.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button type=\"button\" variant=\"ghost\" onClick={() => props.onOpenChange(false)}>\n Cancel\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={() => {\n if (props.session !== undefined) {\n props.onConfirm(props.session);\n }\n }}\n >\n Delete\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n"],"x_google_ignoreList":[0,1],"mappings":"iTACM,EAAoB,IAAI,IAAI,CAChC,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,qTAAsT,CAAC,CAAC,CACzZ,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,iDAAkD,QAAS,KAAM,CAAC,EAAmB,EAAE,cAAc,OAAQ,CAAE,EAAG,qSAAsS,CAAC,CAAC,CAC3f,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,8QAA+Q,CAAC,CAAC,CAClX,EACA,CACE,QACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,8UAA+U,CAAC,CAAC,CAClb,EACA,CACE,UACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,qSAAsS,CAAC,CAAC,CACzY,EACA,CACE,OACgB,EAAE,cAAA,EAAgB,SAAU,KAAsB,EAAE,cAAc,OAAQ,CAAE,EAAG,wUAAyU,CAAC,CAAC,CAC5a,CACF,CAAC,ECvBK,EAAA,EAAM,YAAY,EAAG,IAAsB,EAAE,cAAcA,EAAG,CAAE,IAAKC,EAAG,GAAG,EAAG,QAASC,CAAE,CAAC,C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A,SAAgB,EAAoB,EAIjC,CACD,IAAM,EAAQ,EAAM,SAAS,OAAS,gBAEtC,OACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAQ,KAAM,EAAM,UAAY,IAAA,GAAW,aAAc,EAAM,aAC7D,UAAA,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAA,SAAa,gBAA2B,CAAA,GACxC,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,CAAmB,WACR,EAAM,0CACE,CAAA,CAAA,CACP,CAAA,CAAA,GACd,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAQ,KAAK,SAAS,QAAQ,QAAQ,YAAe,EAAM,aAAa,EAAK,EAAG,SAAA,QAExE,CAAA,GACR,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,KAAK,SACL,QAAQ,cACR,YAAe,CACT,EAAM,UAAY,IAAA,IACpB,EAAM,UAAU,EAAM,OAAO,CAEjC,EACD,SAAA,QAEO,CAAA,CACI,CAAA,CAAA,CACD,CAAA,CAAA,CACT,CAAA,CAEZ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t,s as n}from"./utils-DzstcfqT.js";import{l as r,t as i}from"./button-Dsqwey2_.js";import{a,i as o,n as s,r as c,t as l}from"./studio-Bh00wIF1.js";import{t as u}from"./badge-O3YyUN3G.js";import{t as d}from"./renderers-BIw5yJkg.js";var f=n(e(),1),p=t();function m(e){let[t,n]=(0,f.useState)(),[r,u]=(0,f.useState)(!1),[d,m]=(0,f.useState)(``),g=(0,f.useCallback)(async()=>{if(!e.enabled){n(void 0);return}u(!0),m(``);try{let e=await fetch(`/status`);if(!e.ok)throw Error(`Status failed with HTTP ${e.status}`);n(await e.json())}catch(e){m(e instanceof Error?e.message:String(e)),n(void 0)}finally{u(!1)}},[e.enabled]);return(0,f.useEffect)(()=>{g()},[g]),(0,p.jsxs)(a,{className:`grid-rows-[auto_minmax(0,1fr)]`,"aria-label":`Status`,children:[(0,p.jsx)(o,{title:`Status`,description:`Runtime health, storage adapters, feature capabilities, and current record counts.`,action:(0,p.jsxs)(`div`,{className:`flex min-w-0 flex-wrap justify-end gap-2 max-sm:justify-start`,children:[(0,p.jsx)(s,{label:`agents`,value:t?.counts.agents??0}),(0,p.jsx)(s,{label:`sessions`,value:t?.counts.sessions??`-`}),(0,p.jsx)(s,{label:`traces`,value:t?.counts.traces??`-`}),(0,p.jsx)(i,{className:`h-8 min-h-8 rounded-md px-3 text-xs`,type:`button`,variant:`secondary`,disabled:r,onClick:()=>void g(),children:`Refresh`})]})}),(0,p.jsx)(c,{className:`overflow-auto`,children:e.enabled?r&&t===void 0?(0,p.jsx)(l,{title:`Loading status`,text:`Reading runtime status.`}):d.length>0?(0,p.jsx)(l,{title:`Status error`,text:d}):t===void 0?null:(0,p.jsx)(h,{summary:t}):(0,p.jsx)(l,{title:`Status unavailable`,text:`This Studio runtime did not expose status.`})})]})}function h(e){let t=Object.entries(e.summary.capabilities).filter(([,e])=>e?.enabled===!0).length;return(0,p.jsxs)(`div`,{className:`grid h-full min-h-0 gap-5 border-t border-border/80 pt-4`,children:[(0,p.jsxs)(`section`,{className:`grid gap-5 xl:grid-cols-[minmax(280px,0.58fr)_minmax(0,1.42fr)]`,children:[(0,p.jsx)(g,{summary:e.summary,enabledCapabilityCount:t}),(0,p.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,p.jsx)(_,{storage:e.summary.storage}),(0,p.jsx)(v,{counts:e.summary.counts})]})]}),(0,p.jsxs)(`section`,{className:`grid gap-5 xl:grid-cols-[minmax(0,1.05fr)_minmax(0,0.95fr)]`,children:[(0,p.jsx)(y,{capabilities:e.summary.capabilities}),(0,p.jsx)(b,{summary:e.summary})]})]})}function g(e){return(0,p.jsxs)(`section`,{className:`grid content-start gap-5 border-b border-border/80 pb-5 xl:border-b-0 xl:border-r xl:pb-0 xl:pr-5`,children:[(0,p.jsxs)(`div`,{className:`grid gap-3`,children:[(0,p.jsx)(S,{children:`runtime`}),(0,p.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,p.jsx)(u,{className:`border-border/80 bg-muted/45 text-foreground`,children:`online`}),(0,p.jsxs)(u,{className:`border-border/80 bg-background/45 text-muted-foreground`,children:[e.enabledCapabilityCount,` capabilities`]})]})]}),(0,p.jsxs)(`div`,{className:`grid border-y border-border/80`,children:[(0,p.jsx)(C,{label:`id`,value:e.summary.runner.id}),(0,p.jsx)(C,{label:`name`,value:e.summary.runner.name??`-`}),(0,p.jsx)(C,{label:`version`,value:e.summary.runner.version??`-`}),(0,p.jsx)(C,{label:`generated`,value:`${r(e.summary.generatedAt)} / ${e.summary.generatedAt}`})]})]})}function _(e){let t=Object.entries(e.storage);return(0,p.jsxs)(`section`,{className:`grid content-start gap-3`,children:[(0,p.jsx)(x,{title:`storage`,value:`${t.length} adapters`}),t.length===0?(0,p.jsx)(T,{text:`No storage adapters reported.`}):(0,p.jsx)(`div`,{className:`grid border-y border-border/80`,children:t.map(([e,t])=>(0,p.jsx)(w,{label:E(e),value:t??`-`,tone:t===void 0?`muted`:`normal`},e))})]})}function v(e){let t=Object.entries(e.counts).filter(e=>typeof e[1]==`number`);return(0,p.jsxs)(`section`,{className:`grid content-start gap-3`,children:[(0,p.jsx)(x,{title:`records`,value:`${t.length} counters`}),(0,p.jsx)(`div`,{className:`grid border-y border-border/80`,children:t.map(([e,t])=>(0,p.jsx)(w,{label:E(e),value:t},e))})]})}function y(e){let t=Object.entries(e.capabilities);return(0,p.jsxs)(`section`,{className:`grid content-start gap-3`,children:[(0,p.jsx)(x,{title:`capabilities`,value:`${t.length} reported`}),t.length===0?(0,p.jsx)(T,{text:`No capabilities reported.`}):(0,p.jsx)(`div`,{className:`grid border-y border-border/80 sm:grid-cols-2 sm:divide-x sm:divide-border/80`,children:t.map(([e,n],r)=>(0,p.jsxs)(`div`,{className:[`grid min-w-0 gap-1 border-b border-border/70 px-3 py-3`,r>=t.length-(t.length%2==0?2:1)?`sm:border-b-0`:``].join(` `),children:[(0,p.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,p.jsx)(`span`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:E(e)}),(0,p.jsx)(`span`,{className:n?.enabled?`text-xs font-medium text-foreground`:`text-xs font-medium text-muted-foreground`,children:n?.enabled?`enabled`:`disabled`})]}),n?.reason===void 0?null:(0,p.jsx)(`p`,{className:`m-0 text-xs leading-5 text-muted-foreground`,children:n.reason})]},e))})]})}function b(e){return(0,p.jsxs)(`section`,{className:`grid min-w-0 content-start gap-3`,children:[(0,p.jsx)(x,{title:`raw summary`,value:`JSON`}),(0,p.jsxs)(`details`,{className:`group grid min-w-0 overflow-hidden border-y border-border/80`,open:!0,children:[(0,p.jsxs)(`summary`,{className:`flex min-h-11 cursor-pointer list-none items-center justify-between gap-3 bg-muted/10 px-3 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground marker:hidden`,children:[`Payload`,(0,p.jsx)(`span`,{className:`font-medium normal-case tracking-normal group-open:hidden`,children:`Show`}),(0,p.jsx)(`span`,{className:`hidden font-medium normal-case tracking-normal group-open:inline`,children:`Hide`})]}),(0,p.jsx)(`div`,{className:`min-w-0 overflow-x-auto border-t border-border/70`,children:(0,p.jsx)(`pre`,{className:`m-0 max-h-[28rem] min-w-max p-4 text-xs leading-5 text-foreground`,children:(0,p.jsx)(`code`,{children:(0,p.jsx)(d,{text:JSON.stringify(e.summary,null,2)})})})})]})]})}function x(e){return(0,p.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,p.jsx)(S,{children:e.title}),(0,p.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:e.value})]})}function S(e){return(0,p.jsx)(`h2`,{className:`m-0 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:e.children})}function C(e){return(0,p.jsxs)(`div`,{className:`grid min-w-0 gap-1 border-b border-border/70 px-3 py-3 first:pt-3 last:border-b-0`,children:[(0,p.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:e.label}),(0,p.jsx)(`span`,{className:`min-w-0 truncate text-sm text-foreground`,title:String(e.value),children:e.value})]})}function w(e){return(0,p.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(120px,0.5fr)_minmax(0,1fr)] gap-3 border-b border-border/70 px-3 py-3 last:border-b-0`,children:[(0,p.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-muted-foreground`,children:e.label}),(0,p.jsx)(`span`,{className:[`min-w-0 truncate text-right text-sm font-semibold tabular-nums`,e.tone===`muted`?`text-muted-foreground`:`text-foreground`].join(` `),title:String(e.value),children:e.value})]})}function T(e){return(0,p.jsx)(`div`,{className:`border-y border-dashed border-border/80 px-3 py-8 text-center text-sm text-muted-foreground`,children:e.text})}function E(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).toLowerCase()}export{m as StatusPage};
|
|
2
|
-
//# sourceMappingURL=status-page-jKTghmnz.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status-page-jKTghmnz.js","names":[],"sources":["../../../src/ui/app/modules/status/status-page.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\nimport type { StudioStatusSummary } from \"../../../../types\";\nimport { Badge } from \"../../components/ui/badge\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n StudioEmptyState,\n StudioHeaderMetric,\n StudioPageContent,\n StudioPageHeader,\n StudioPageShell,\n} from \"../../components/ui/studio\";\nimport { formatRelativeTime } from \"../shared/format\";\nimport { JsonSyntax } from \"../shared/renderers\";\n\nexport function StatusPage(props: { enabled: boolean }) {\n const [summary, setSummary] = useState<StudioStatusSummary | undefined>();\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState(\"\");\n\n const loadStatus = useCallback(async () => {\n if (!props.enabled) {\n setSummary(undefined);\n return;\n }\n setLoading(true);\n setError(\"\");\n try {\n const response = await fetch(\"/status\");\n if (!response.ok) {\n throw new Error(`Status failed with HTTP ${response.status}`);\n }\n setSummary((await response.json()) as StudioStatusSummary);\n } catch (loadError) {\n setError(loadError instanceof Error ? loadError.message : String(loadError));\n setSummary(undefined);\n } finally {\n setLoading(false);\n }\n }, [props.enabled]);\n\n useEffect(() => {\n void loadStatus();\n }, [loadStatus]);\n\n return (\n <StudioPageShell className=\"grid-rows-[auto_minmax(0,1fr)]\" aria-label=\"Status\">\n <StudioPageHeader\n title=\"Status\"\n description=\"Runtime health, storage adapters, feature capabilities, and current record counts.\"\n action={\n <div className=\"flex min-w-0 flex-wrap justify-end gap-2 max-sm:justify-start\">\n <StudioHeaderMetric label=\"agents\" value={summary?.counts.agents ?? 0} />\n <StudioHeaderMetric label=\"sessions\" value={summary?.counts.sessions ?? \"-\"} />\n <StudioHeaderMetric label=\"traces\" value={summary?.counts.traces ?? \"-\"} />\n <Button\n className=\"h-8 min-h-8 rounded-md px-3 text-xs\"\n type=\"button\"\n variant=\"secondary\"\n disabled={loading}\n onClick={() => void loadStatus()}\n >\n Refresh\n </Button>\n </div>\n }\n />\n\n <StudioPageContent className=\"overflow-auto\">\n {!props.enabled ? (\n <StudioEmptyState\n title=\"Status unavailable\"\n text=\"This Studio runtime did not expose status.\"\n />\n ) : loading && summary === undefined ? (\n <StudioEmptyState title=\"Loading status\" text=\"Reading runtime status.\" />\n ) : error.length > 0 ? (\n <StudioEmptyState title=\"Status error\" text={error} />\n ) : summary === undefined ? null : (\n <StatusDashboard summary={summary} />\n )}\n </StudioPageContent>\n </StudioPageShell>\n );\n}\n\nfunction StatusDashboard(props: { summary: StudioStatusSummary }) {\n const capabilityEntries = Object.entries(props.summary.capabilities);\n const enabledCapabilityCount = capabilityEntries.filter(\n ([, capability]) => capability?.enabled === true,\n ).length;\n\n return (\n <div className=\"grid h-full min-h-0 gap-5 border-t border-border/80 pt-4\">\n <section className=\"grid gap-5 xl:grid-cols-[minmax(280px,0.58fr)_minmax(0,1.42fr)]\">\n <RuntimeSummary summary={props.summary} enabledCapabilityCount={enabledCapabilityCount} />\n <div className=\"grid gap-5 lg:grid-cols-2\">\n <StorageMatrix storage={props.summary.storage} />\n <CountsLedger counts={props.summary.counts} />\n </div>\n </section>\n <section className=\"grid gap-5 xl:grid-cols-[minmax(0,1.05fr)_minmax(0,0.95fr)]\">\n <CapabilityLedger capabilities={props.summary.capabilities} />\n <RawSummary summary={props.summary} />\n </section>\n </div>\n );\n}\n\nfunction RuntimeSummary(props: { summary: StudioStatusSummary; enabledCapabilityCount: number }) {\n return (\n <section className=\"grid content-start gap-5 border-b border-border/80 pb-5 xl:border-b-0 xl:border-r xl:pb-0 xl:pr-5\">\n <div className=\"grid gap-3\">\n <SectionLabel>runtime</SectionLabel>\n <div className=\"flex min-w-0 flex-wrap items-center gap-2\">\n <Badge className=\"border-border/80 bg-muted/45 text-foreground\">online</Badge>\n <Badge className=\"border-border/80 bg-background/45 text-muted-foreground\">\n {props.enabledCapabilityCount} capabilities\n </Badge>\n </div>\n </div>\n <div className=\"grid border-y border-border/80\">\n <StatusFact label=\"id\" value={props.summary.runner.id} />\n <StatusFact label=\"name\" value={props.summary.runner.name ?? \"-\"} />\n <StatusFact label=\"version\" value={props.summary.runner.version ?? \"-\"} />\n <StatusFact\n label=\"generated\"\n value={`${formatRelativeTime(props.summary.generatedAt)} / ${props.summary.generatedAt}`}\n />\n </div>\n </section>\n );\n}\n\nfunction StorageMatrix(props: { storage: StudioStatusSummary[\"storage\"] }) {\n const entries = Object.entries(props.storage);\n return (\n <section className=\"grid content-start gap-3\">\n <SectionHeader title=\"storage\" value={`${entries.length} adapters`} />\n {entries.length === 0 ? (\n <DashedNote text=\"No storage adapters reported.\" />\n ) : (\n <div className=\"grid border-y border-border/80\">\n {entries.map(([key, value]) => (\n <StatusRow\n label={humanizeKey(key)}\n value={value ?? \"-\"}\n key={key}\n tone={value === undefined ? \"muted\" : \"normal\"}\n />\n ))}\n </div>\n )}\n </section>\n );\n}\n\nfunction CountsLedger(props: { counts: StudioStatusSummary[\"counts\"] }) {\n const entries = Object.entries(props.counts).filter((entry): entry is [string, number] => {\n return typeof entry[1] === \"number\";\n });\n return (\n <section className=\"grid content-start gap-3\">\n <SectionHeader title=\"records\" value={`${entries.length} counters`} />\n <div className=\"grid border-y border-border/80\">\n {entries.map(([key, value]) => (\n <StatusRow label={humanizeKey(key)} value={value} key={key} />\n ))}\n </div>\n </section>\n );\n}\n\nfunction CapabilityLedger(props: { capabilities: StudioStatusSummary[\"capabilities\"] }) {\n const entries = Object.entries(props.capabilities);\n return (\n <section className=\"grid content-start gap-3\">\n <SectionHeader title=\"capabilities\" value={`${entries.length} reported`} />\n {entries.length === 0 ? (\n <DashedNote text=\"No capabilities reported.\" />\n ) : (\n <div className=\"grid border-y border-border/80 sm:grid-cols-2 sm:divide-x sm:divide-border/80\">\n {entries.map(([name, capability], index) => (\n <div\n className={[\n \"grid min-w-0 gap-1 border-b border-border/70 px-3 py-3\",\n index >= entries.length - (entries.length % 2 === 0 ? 2 : 1) ? \"sm:border-b-0\" : \"\",\n ].join(\" \")}\n key={name}\n >\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <span className=\"min-w-0 truncate text-sm font-semibold text-foreground\">\n {humanizeKey(name)}\n </span>\n <span\n className={\n capability?.enabled\n ? \"text-xs font-medium text-foreground\"\n : \"text-xs font-medium text-muted-foreground\"\n }\n >\n {capability?.enabled ? \"enabled\" : \"disabled\"}\n </span>\n </div>\n {capability?.reason === undefined ? null : (\n <p className=\"m-0 text-xs leading-5 text-muted-foreground\">{capability.reason}</p>\n )}\n </div>\n ))}\n </div>\n )}\n </section>\n );\n}\n\nfunction RawSummary(props: { summary: StudioStatusSummary }) {\n return (\n <section className=\"grid min-w-0 content-start gap-3\">\n <SectionHeader title=\"raw summary\" value=\"JSON\" />\n <details className=\"group grid min-w-0 overflow-hidden border-y border-border/80\" open>\n <summary className=\"flex min-h-11 cursor-pointer list-none items-center justify-between gap-3 bg-muted/10 px-3 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground marker:hidden\">\n Payload\n <span className=\"font-medium normal-case tracking-normal group-open:hidden\">Show</span>\n <span className=\"hidden font-medium normal-case tracking-normal group-open:inline\">\n Hide\n </span>\n </summary>\n <div className=\"min-w-0 overflow-x-auto border-t border-border/70\">\n <pre className=\"m-0 max-h-[28rem] min-w-max p-4 text-xs leading-5 text-foreground\">\n <code>\n <JsonSyntax text={JSON.stringify(props.summary, null, 2)} />\n </code>\n </pre>\n </div>\n </details>\n </section>\n );\n}\n\nfunction SectionHeader(props: { title: string; value: string }) {\n return (\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <SectionLabel>{props.title}</SectionLabel>\n <span className=\"text-xs font-medium text-muted-foreground\">{props.value}</span>\n </div>\n );\n}\n\nfunction SectionLabel(props: { children: string }) {\n return (\n <h2 className=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground\">\n {props.children}\n </h2>\n );\n}\n\nfunction StatusFact(props: { label: string; value: string | number }) {\n return (\n <div className=\"grid min-w-0 gap-1 border-b border-border/70 px-3 py-3 first:pt-3 last:border-b-0\">\n <span className=\"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground\">\n {props.label}\n </span>\n <span className=\"min-w-0 truncate text-sm text-foreground\" title={String(props.value)}>\n {props.value}\n </span>\n </div>\n );\n}\n\nfunction StatusRow(props: { label: string; value: string | number; tone?: \"normal\" | \"muted\" }) {\n return (\n <div className=\"grid min-w-0 grid-cols-[minmax(120px,0.5fr)_minmax(0,1fr)] gap-3 border-b border-border/70 px-3 py-3 last:border-b-0\">\n <span className=\"min-w-0 truncate text-sm font-medium text-muted-foreground\">\n {props.label}\n </span>\n <span\n className={[\n \"min-w-0 truncate text-right text-sm font-semibold tabular-nums\",\n props.tone === \"muted\" ? \"text-muted-foreground\" : \"text-foreground\",\n ].join(\" \")}\n title={String(props.value)}\n >\n {props.value}\n </span>\n </div>\n );\n}\n\nfunction DashedNote(props: { text: string }) {\n return (\n <div className=\"border-y border-dashed border-border/80 px-3 py-8 text-center text-sm text-muted-foreground\">\n {props.text}\n </div>\n );\n}\n\nfunction humanizeKey(value: string): string {\n return value\n .replace(/([a-z])([A-Z])/g, \"$1 $2\")\n .replace(/[_-]+/g, \" \")\n .toLowerCase();\n}\n"],"mappings":"+QAcA,SAAgB,EAAW,EAA6B,CACtD,GAAM,CAAC,EAAS,IAAA,EAAc,EAAA,SAAA,CAA0C,EAClE,CAAC,EAAS,IAAA,EAAc,EAAA,SAAA,CAAS,EAAK,EACtC,CAAC,EAAO,IAAA,EAAY,EAAA,SAAA,CAAS,EAAE,EAE/B,GAAA,EAAa,EAAA,YAAA,CAAY,SAAY,CACzC,GAAI,CAAC,EAAM,QAAS,CAClB,EAAW,IAAA,EAAS,EACpB,MACF,CACA,EAAW,EAAI,EACf,EAAS,EAAE,EACX,GAAI,CACF,IAAM,EAAW,MAAM,MAAM,SAAS,EACtC,GAAI,CAAC,EAAS,GACZ,MAAU,MAAM,2BAA2B,EAAS,QAAQ,EAE9D,EAAY,MAAM,EAAS,KAAK,CAAyB,CAC3D,OAAS,EAAW,CAClB,EAAS,aAAqB,MAAQ,EAAU,QAAU,OAAO,CAAS,CAAC,EAC3E,EAAW,IAAA,EAAS,CACtB,QAAU,CACR,EAAW,EAAK,CAClB,CACF,EAAG,CAAC,EAAM,OAAO,CAAC,EAMlB,OAJA,EAAA,EAAA,UAAA,KAAgB,CACd,EAAgB,CAClB,EAAG,CAAC,CAAU,CAAC,GAGb,EAAA,EAAA,KAAA,CAAC,EAAD,CAAiB,UAAU,iCAAiC,aAAW,SAAvE,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,MAAM,SACN,YAAY,qFACZ,QACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK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A,SAAS,EAAU,EAA6E,CAC9F,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,uHAAf,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,6DACb,SAAA,EAAM,KACH,CAAA,GACN,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,UAAW,CACT,iEACA,EAAM,OAAS,QAAU,wBAA0B,iBACrD,CAAC,CAAC,KAAK,GAAG,EACV,MAAO,OAAO,EAAM,KAAK,EAExB,SAAA,EAAM,KACH,CAAA,CACH,GAET,CAEA,SAAS,EAAW,EAAyB,CAC3C,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,8FACZ,SAAA,EAAM,IACJ,CAAA,CAET,CAEA,SAAS,EAAY,EAAuB,CAC1C,OAAO,EACJ,QAAQ,kBAAmB,OAAO,CAAC,CACnC,QAAQ,SAAU,GAAG,CAAC,CACtB,YAAY,CACjB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./utils-DzstcfqT.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`section`,{className:t(`grid h-full min-h-0 min-w-0 max-h-full max-w-full overflow-hidden bg-background`,e),...r})}function i(e){let{title:r,description:i,action:a,className:o,...s}=e;return(0,n.jsxs)(`header`,{className:t(`flex flex-col gap-3 px-4 pt-4 sm:flex-row sm:items-end sm:justify-between md:px-6 md:pt-6`,o),...s,children:[(0,n.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,n.jsx)(`h1`,{className:`m-0 font-heading text-2xl font-medium tracking-tight`,children:r}),(0,n.jsx)(`p`,{className:`m-0 max-w-[68ch] text-sm text-muted-foreground`,children:i})]}),a]})}function a({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`min-h-0 min-w-0 px-4 pb-4 pt-6 md:px-6 md:pb-6`,e),...r})}function o(e){return(0,n.jsxs)(`span`,{className:t(`inline-flex h-8 items-center gap-2 rounded-md border border-border/70 px-2.5 text-xs font-medium text-muted-foreground`,e.className),children:[(0,n.jsx)(`span`,{className:`font-medium tabular-nums text-foreground`,children:e.value}),e.label]})}function s({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`min-h-0 min-w-0 overflow-hidden bg-background`,e),...r})}function c(e){return(0,n.jsxs)(`div`,{"data-size":e.size??`default`,"data-slot":`studio-empty-state`,className:t(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border border-dashed border-border p-6 text-center text-balance`,e.size===`compact`?`min-h-32`:`h-full min-h-64`,e.className),children:[(0,n.jsxs)(`div`,{className:`flex max-w-sm flex-col items-center gap-2`,children:[(0,n.jsx)(`h2`,{className:`m-0 font-heading text-sm font-medium tracking-tight text-foreground`,children:e.title}),(0,n.jsx)(`p`,{className:`m-0 text-sm/relaxed text-muted-foreground`,children:e.text})]}),e.action?(0,n.jsx)(`div`,{className:`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,children:e.action}):null]})}function l({className:e,...r}){return(0,n.jsx)(`span`,{className:t(`inline-flex h-5 items-center rounded-4xl bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground`,e),...r})}function u({className:e,...r}){return(0,n.jsx)(`div`,{className:t(`grid gap-1 rounded-lg bg-muted p-1`,e),...r})}export{r as a,u as c,i,o as n,l as o,a as r,s,c as t};
|
|
2
|
-
//# sourceMappingURL=studio-Bh00wIF1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"studio-Bh00wIF1.js","names":[],"sources":["../../../src/ui/app/components/ui/studio.tsx"],"sourcesContent":["import type * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport function StudioPageShell({ className, ...props }: React.ComponentProps<\"section\">) {\n return (\n <section\n className={cn(\n \"grid h-full min-h-0 min-w-0 max-h-full max-w-full overflow-hidden bg-background\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport function StudioPageHeader(\n props: {\n title: string;\n description: string;\n action?: React.ReactNode;\n } & Omit<React.ComponentProps<\"header\">, \"children\">,\n) {\n const { title, description, action, className, ...headerProps } = props;\n return (\n <header\n className={cn(\n \"flex flex-col gap-3 px-4 pt-4 sm:flex-row sm:items-end sm:justify-between md:px-6 md:pt-6\",\n className,\n )}\n {...headerProps}\n >\n <div className=\"grid min-w-0 gap-1\">\n <h1 className=\"m-0 font-heading text-2xl font-medium tracking-tight\">{title}</h1>\n <p className=\"m-0 max-w-[68ch] text-sm text-muted-foreground\">{description}</p>\n </div>\n {action}\n </header>\n );\n}\n\nexport function StudioPageContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div className={cn(\"min-h-0 min-w-0 px-4 pb-4 pt-6 md:px-6 md:pb-6\", className)} {...props} />\n );\n}\n\nexport function StudioHeaderMetric(props: {\n label: string;\n value: React.ReactNode;\n className?: string;\n}) {\n return (\n <span\n className={cn(\n \"inline-flex h-8 items-center gap-2 rounded-md border border-border/70 px-2.5 text-xs font-medium text-muted-foreground\",\n props.className,\n )}\n >\n <span className=\"font-medium tabular-nums text-foreground\">{props.value}</span>\n {props.label}\n </span>\n );\n}\n\nexport function StudioSurface({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div className={cn(\"min-h-0 min-w-0 overflow-hidden bg-background\", className)} {...props} />\n );\n}\n\nexport function StudioSection({ className, ...props }: React.ComponentProps<\"section\">) {\n return (\n <section\n className={cn(\"grid gap-3 rounded-xl border border-border bg-card p-4\", className)}\n {...props}\n />\n );\n}\n\nexport function StudioMetric(props: { label: string; value: React.ReactNode; className?: string }) {\n return (\n <div className={cn(\"grid gap-1 rounded-xl border border-border bg-card p-4\", props.className)}>\n <span className=\"text-xs font-medium text-muted-foreground\">{props.label}</span>\n <span className=\"text-lg font-semibold tabular-nums text-foreground\">{props.value}</span>\n </div>\n );\n}\n\nexport function StudioEmptyState(props: {\n title: string;\n text: string;\n action?: React.ReactNode;\n size?: \"default\" | \"compact\";\n className?: string;\n}) {\n return (\n <div\n data-size={props.size ?? \"default\"}\n data-slot=\"studio-empty-state\"\n className={cn(\n \"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border border-dashed border-border p-6 text-center text-balance\",\n props.size === \"compact\" ? \"min-h-32\" : \"h-full min-h-64\",\n props.className,\n )}\n >\n <div className=\"flex max-w-sm flex-col items-center gap-2\">\n <h2 className=\"m-0 font-heading text-sm font-medium tracking-tight text-foreground\">\n {props.title}\n </h2>\n <p className=\"m-0 text-sm/relaxed text-muted-foreground\">{props.text}</p>\n </div>\n {props.action ? (\n <div className=\"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance\">\n {props.action}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function StudioStatusBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"inline-flex h-5 items-center rounded-4xl bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport function StudioTabs({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={cn(\"grid gap-1 rounded-lg bg-muted p-1\", className)} {...props} />;\n}\n"],"mappings":"oDAGA,SAAgB,EAAgB,CAAE,YAAW,GAAG,GAA0C,CACxF,OACE,EAAA,EAAA,IAAA,CAAC,UAAD,CACE,UAAW,EACT,kFACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EACd,EAKA,CACA,GAAM,CAAE,QAAO,cAAa,SAAQ,YAAW,GAAG,GAAgB,EAClE,OACE,EAAA,EAAA,KAAA,CAAC,SAAD,CACE,UAAW,EACT,4FACA,CACF,EACA,GAAI,EALN,SAAA,EAOE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,qBAAf,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,uDAAwD,SAAA,CAAU,CAAA,GAChF,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,iDAAkD,SAAA,CAAe,CAAA,CAC3E,CACJ,C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W,GAAG,GAAsC,CAC/E,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAG,qCAAsC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC1F"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t,s as n}from"./utils-DzstcfqT.js";import{h as r,t as i,v as a}from"./button-Dsqwey2_.js";import{a as o,i as s,n as c,r as l,t as u}from"./select-C1_9fsRu.js";import{t as d}from"./textarea-CZvhTJxB.js";import{t as f}from"./badge-O3YyUN3G.js";import{t as ee}from"./renderers-BIw5yJkg.js";import{t as p}from"./input-DHvac9Uq.js";var m=n(e(),1),h=t();function g(e){let[t,n]=(0,m.useState)(`form`),r=(0,m.useMemo)(()=>T(e.schema),[e.schema]),i=(0,m.useMemo)(()=>F(e.value),[e.value]),o=e.disabled===!0,s=r.length>0,c=s?t:`json`,l=i.ok&&a(i.value)?i.value:void 0;function u(t,n){let r=l??{};e.onChange(z(P(r,t,n)))}function d(t,n){let r=l??{},i=N(r,t);Array.isArray(i)&&e.onChange(z(P(r,t,i.filter((e,t)=>t!==n))))}return(0,h.jsxs)(`div`,{className:`grid min-w-0 gap-3`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,h.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:`Arguments`}),s?(0,h.jsxs)(`div`,{className:`inline-grid h-8 grid-cols-2 overflow-hidden rounded-md border border-border/80 bg-background/45 p-0.5`,children:[(0,h.jsx)(_,{active:c===`form`,onClick:()=>n(`form`),children:`Form`}),(0,h.jsx)(_,{active:c===`json`,onClick:()=>n(`json`),children:`JSON`})]}):(0,h.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`JSON`})]}),c===`json`||l===void 0?(0,h.jsx)(v,{disabled:o,error:i.ok?``:i.error,value:e.value,onChange:e.onChange}):(0,h.jsx)(`div`,{className:`grid gap-3`,children:r.map(e=>(0,h.jsx)(y,{disabled:o,field:e,path:[e.name],rootValue:l,onChange:u,onRemoveArrayItem:d},e.name))})]})}function _(e){return(0,h.jsx)(`button`,{className:e.active?`rounded-[5px] bg-muted/55 px-3 text-xs font-semibold text-foreground`:`rounded-[5px] px-3 text-xs font-medium text-muted-foreground transition hover:text-foreground`,type:`button`,onClick:e.onClick,children:e.children})}function v(e){return(0,h.jsxs)(`div`,{className:`grid gap-2`,children:[(0,h.jsx)(d,{className:`min-h-36 resize-y rounded-md border-border bg-background/45 p-3 text-xs leading-5`,disabled:e.disabled,value:e.value,spellCheck:!1,onChange:t=>e.onChange(t.target.value)}),e.error.length===0?null:(0,h.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs leading-5 text-destructive`,children:e.error})]})}function y(e){let t=N(e.rootValue,e.path),n=k(e.field.schema,e.field.name),r=A(e.field.schema),i=E(e.field.schema);if(i===`object`){let i=T(e.field.schema);return(0,h.jsxs)(`fieldset`,{className:`grid min-w-0 gap-3 border-b border-border/70 pb-3 last:border-b-0`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,h.jsx)(`legend`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:n}),e.field.required?(0,h.jsx)(S,{}):null]}),r===void 0?null:(0,h.jsx)(`p`,{className:`m-0 text-xs leading-5 text-muted-foreground`,children:r}),i.length===0?(0,h.jsx)(w,{disabled:e.disabled,path:e.path,value:t,onChange:e.onChange}):(0,h.jsx)(`div`,{className:`grid gap-3 border-l border-border/70 pl-3`,children:i.map(t=>(0,h.jsx)(y,{disabled:e.disabled,field:t,path:[...e.path,t.name],rootValue:e.rootValue,onChange:e.onChange,onRemoveArrayItem:e.onRemoveArrayItem},t.name))})]})}return i===`array`?(0,h.jsx)(b,{description:r,disabled:e.disabled,field:e.field,label:n,path:e.path,rootValue:e.rootValue,value:t,onChange:e.onChange,onRemoveArrayItem:e.onRemoveArrayItem}):(0,h.jsxs)(`div`,{className:`grid min-w-0 gap-2 border-b border-border/70 pb-3 last:border-b-0`,children:[(0,h.jsx)(x,{label:n,required:e.field.required}),r===void 0?null:(0,h.jsx)(`p`,{className:`m-0 text-xs leading-5 text-muted-foreground`,children:r}),(0,h.jsx)(te,{disabled:e.disabled,path:e.path,required:e.field.required,schema:e.field.schema,value:t,onChange:e.onChange})]})}function b(e){let t=D(e.field.schema),n=Array.isArray(e.value)?e.value:[],r=n.map((t,n)=>({index:n,key:`${H(e.path)}:${n}:${V(t)}`}));return(0,h.jsxs)(`div`,{className:`grid min-w-0 gap-3 border-b border-border/70 pb-3 last:border-b-0`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,h.jsx)(x,{label:e.label,required:e.field.required}),t===void 0?null:(0,h.jsx)(i,{className:`h-8 min-h-8 rounded-md px-3 text-xs`,disabled:e.disabled,type:`button`,variant:`secondary`,onClick:()=>e.onChange(e.path,[...n,M(t)]),children:`Add`})]}),e.description===void 0?null:(0,h.jsx)(`p`,{className:`m-0 text-xs leading-5 text-muted-foreground`,children:e.description}),t===void 0?(0,h.jsx)(w,{disabled:e.disabled,path:e.path,value:e.value,onChange:e.onChange}):n.length===0?(0,h.jsx)(`div`,{className:`rounded-md border border-dashed border-border/70 px-3 py-2 text-xs text-muted-foreground`,children:`Empty array`}):(0,h.jsx)(`div`,{className:`grid gap-3 border-l border-border/70 pl-3`,children:r.map(n=>(0,h.jsxs)(`div`,{className:`grid gap-2`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,h.jsxs)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:[`Item `,n.index+1]}),(0,h.jsx)(i,{className:`h-7 min-h-7 rounded-md px-2 text-xs`,disabled:e.disabled,type:`button`,variant:`ghost`,onClick:()=>e.onRemoveArrayItem(e.path,n.index),children:`Remove`})]}),(0,h.jsx)(y,{disabled:e.disabled,field:{name:String(n.index+1),required:!0,schema:t},path:[...e.path,n.index],rootValue:e.rootValue,onChange:e.onChange,onRemoveArrayItem:e.onRemoveArrayItem})]},n.key))})]})}function x(e){return(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:e.label}),e.required?(0,h.jsx)(S,{}):null]})}function S(){return(0,h.jsx)(`span`,{className:`rounded-md bg-muted/35 px-2 py-0.5 text-[11px] font-medium text-muted-foreground`,children:`required`})}function te(e){let t=O(e.schema);if(t.length>0){let n=t.findIndex(t=>B(t,e.value)),r=t.map((e,t)=>({label:V(e),value:String(t),key:`${t}:${V(e)}`}));return(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,h.jsxs)(u,{value:n===-1?``:String(n),disabled:e.disabled,onValueChange:n=>e.onChange(e.path,t[Number(n)]),children:[(0,h.jsx)(s,{className:`h-9 min-h-9 rounded-md border-border bg-background/45 text-sm`,children:(0,h.jsx)(o,{placeholder:`Select value`})}),(0,h.jsx)(c,{children:r.map(e=>(0,h.jsx)(l,{value:e.value,children:e.label},e.key))})]}),n===-1||e.required?null:(0,h.jsx)(i,{className:`h-9 min-h-9 rounded-md px-3 text-xs`,disabled:e.disabled,type:`button`,variant:`ghost`,onClick:()=>e.onChange(e.path,void 0),children:`Clear`})]})}let n=E(e.schema);return n===`boolean`?(0,h.jsxs)(`label`,{className:`flex min-h-9 w-fit cursor-pointer items-center gap-2 rounded-md border border-border/70 bg-background/45 px-3 text-sm text-foreground`,children:[(0,h.jsx)(`input`,{checked:e.value===!0,disabled:e.disabled,type:`checkbox`,className:`h-4 w-4 accent-foreground`,onChange:t=>e.onChange(e.path,t.target.checked)}),`Enabled`]}):n===`number`||n===`integer`?(0,h.jsx)(C,{disabled:e.disabled,path:e.path,schema:e.schema,type:n,value:e.value,onChange:e.onChange}):n===`string`?(0,h.jsx)(p,{className:`h-9 rounded-md border-border bg-background/45 text-sm`,disabled:e.disabled,type:`text`,value:typeof e.value==`string`?e.value:``,placeholder:j(e.schema),onChange:t=>{let n=t.target.value;e.onChange(e.path,n.length===0&&!e.required?void 0:n)}}):(0,h.jsx)(w,{disabled:e.disabled,path:e.path,value:e.value,onChange:e.onChange})}function C(e){let t=typeof e.value==`number`?String(e.value):``,[n,r]=(0,m.useState)(t);return(0,m.useEffect)(()=>{r(t)},[t]),(0,h.jsx)(p,{className:`h-9 rounded-md border-border bg-background/45 text-sm`,disabled:e.disabled,inputMode:e.type===`integer`?`numeric`:`decimal`,type:`text`,value:n,placeholder:j(e.schema),onBlur:()=>{if(n.trim().length===0){r(``);return}let i=I(n,e.type);r(i.ok?String(i.value):t)},onChange:t=>{let n=t.target.value;if(r(n),n.trim().length===0){e.onChange(e.path,void 0);return}let i=I(n,e.type);i.ok&&e.onChange(e.path,i.value)}})}function w(e){let t=(0,m.useMemo)(()=>R(e.value),[e.value]),[n,r]=(0,m.useState)(t),i=(0,m.useMemo)(()=>F(n),[n]);return(0,m.useEffect)(()=>{r(t)},[t]),(0,h.jsxs)(`div`,{className:`grid gap-2`,children:[(0,h.jsx)(d,{className:`min-h-24 resize-y rounded-md border-border bg-background/45 p-3 text-xs leading-5`,disabled:e.disabled,value:n,spellCheck:!1,onChange:t=>{let n=t.target.value;if(r(n),n.trim().length===0){e.onChange(e.path,void 0);return}let i=F(n);i.ok&&e.onChange(e.path,i.value)}}),i.ok||n.trim().length===0?null:(0,h.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs leading-5 text-destructive`,children:i.error})]})}function T(e){if(!a(e))return[];let t=e.properties;if(!a(t))return[];let n=ne(e);return Object.entries(t).map(([e,t])=>({name:e,required:n.has(e),schema:a(t)?t:{}}))}function ne(e){let t=e.required;return Array.isArray(t)?new Set(t.filter(e=>typeof e==`string`)):new Set}function E(e){let t=e.type;if(typeof t==`string`)return t;if(Array.isArray(t)){let e=t.find(e=>typeof e==`string`&&e!==`null`);if(e!==void 0)return e}return O(e).length>0?`enum`:a(e.properties)?`object`:e.items===void 0?`unknown`:`array`}function D(e){return a(e.items)?e.items:void 0}function O(e){return Array.isArray(e.enum)?e.enum:[]}function k(e,t){return typeof e.title==`string`&&e.title.length>0?e.title:U(t)}function A(e){return typeof e.description==`string`&&e.description.length>0?e.description:void 0}function j(e){return Object.hasOwn(e,`default`)?V(e.default):void 0}function M(e){if(Object.hasOwn(e,`default`))return e.default;let t=O(e);if(t.length>0)return t[0];let n=E(e);return n===`boolean`?!1:n===`integer`||n===`number`?0:n===`array`?[]:n===`object`?{}:n===`string`?``:null}function N(e,t){let n=e;for(let e of t){if(typeof e==`number`){if(!Array.isArray(n))return;n=n[e];continue}if(!a(n))return;n=n[e]}return n}function P(e,t,n){if(t.length===0)return n;let[r,...i]=t,o=Array.isArray(e)?[...e]:a(e)?{...e}:{};if(i.length===0)return n===void 0?(Array.isArray(o)&&typeof r==`number`?o.splice(r,1):!Array.isArray(o)&&typeof r==`string`&&delete o[r],o):((Array.isArray(o)&&typeof r==`number`||!Array.isArray(o)&&typeof r==`string`)&&(o[r]=n),o);let s=P(Array.isArray(o)&&typeof r==`number`||!Array.isArray(o)&&typeof r==`string`?o[r]:void 0,i,n);return(Array.isArray(o)&&typeof r==`number`||!Array.isArray(o)&&typeof r==`string`)&&(o[r]=s),o}function F(e){if(e.trim().length===0)return{ok:!0,value:void 0};try{return{ok:!0,value:JSON.parse(e)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function I(e,t){let n=e.trim();if(n.length===0||L(n))return{ok:!1};let r=Number(n);return!Number.isFinite(r)||t===`integer`&&!Number.isInteger(r)?{ok:!1}:{ok:!0,value:r}}function L(e){return e===`-`||e===`+`||e===`.`||e===`-.`||e===`+.`||/^[+-]?\d+\.$/.test(e)||/[eE][+-]?$/.test(e)}function R(e){return e===void 0?``:z(e)}function z(e){return JSON.stringify(e,null,2)}function B(e,t){return JSON.stringify(e)===JSON.stringify(t)}function V(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):e===null?`null`:JSON.stringify(e)}function H(e){return e.join(`.`)}function U(e){return e.replace(/[_-]+/g,` `).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/\b\w/g,e=>e.toUpperCase())}function W(e){let t=e.selectedTool===void 0?0:$(e.selectedTool.parameters);return(0,h.jsxs)(`section`,{className:`grid gap-4 border-t border-border/80 pt-4 xl:grid-cols-[minmax(260px,0.42fr)_minmax(0,1fr)]`,children:[(0,h.jsxs)(`div`,{className:`grid content-start gap-3`,children:[(0,h.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,h.jsx)(`h2`,{className:`m-0 text-base font-semibold text-foreground`,children:`Runner`}),e.selectedTool===void 0?(0,h.jsx)(`p`,{className:`m-0 text-sm leading-6 text-muted-foreground`,children:`No tool selected`}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:`m-0 break-all text-sm font-semibold leading-6 text-foreground`,children:e.selectedTool.name}),(0,h.jsx)(`p`,{className:`m-0 max-w-[62ch] text-sm leading-6 text-muted-foreground`,children:e.selectedTool.description})]})]}),e.selectedTool===void 0?null:(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2`,children:[(0,h.jsx)(f,{className:X(e.selectedTool),children:Z(e.selectedTool)}),(0,h.jsxs)(f,{className:J(e.selectedTool.approval.required),children:[`approval `,e.selectedTool.approval.required?`required`:`none`]}),(0,h.jsxs)(q,{children:[t,` `,t===1?`field`:`fields`]})]}),e.selectedTool?.approval.reason===void 0?null:(0,h.jsx)(`p`,{className:`m-0 border-l border-border/80 pl-3 text-xs leading-5 text-muted-foreground`,children:e.selectedTool.approval.reason})]}),(0,h.jsxs)(`div`,{className:`grid min-w-0 gap-3`,children:[(0,h.jsx)(g,{disabled:e.selectedTool===void 0,schema:e.selectedTool?.parameters,value:e.argsText,onChange:e.onArgsTextChange}),(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,h.jsx)(`span`,{className:`min-w-0 truncate text-xs text-muted-foreground`,children:`Arguments must be valid JSON.`}),(0,h.jsx)(i,{className:`h-8 min-h-8 rounded-md px-4 text-xs`,type:`button`,disabled:e.runState===`running`||e.selectedTool===void 0,onClick:e.onRun,children:e.runState===`running`?`Running`:`Run`})]}),e.runError.length>0?(0,h.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs leading-5 text-destructive`,children:e.runError}):null,e.selectedTool===void 0?null:(0,h.jsxs)(`details`,{className:`group border-t border-border/70 pt-3`,children:[(0,h.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground marker:hidden`,children:[`Parameter schema`,(0,h.jsx)(`span`,{className:`font-medium normal-case tracking-normal`,children:Q(e.selectedTool.parameters)})]}),(0,h.jsx)(`div`,{className:`mt-3`,children:(0,h.jsx)(K,{value:e.selectedTool.parameters,title:`JSON schema`})})]}),e.runResponse===void 0?null:(0,h.jsx)(G,{response:e.runResponse})]})]})}function G(e){let t=Object.hasOwn(e.response,`result`),n=t?e.response.result:e.response.error,r=t?`Tool result`:`Tool error`;return(0,h.jsxs)(`div`,{className:`grid gap-3`,children:[(0,h.jsx)(K,{value:ae(n),title:r}),(0,h.jsxs)(`details`,{className:`group border-t border-border/70 pt-3`,children:[(0,h.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground marker:hidden`,children:[`Raw run response`,(0,h.jsxs)(`span`,{className:`font-medium normal-case tracking-normal`,children:[e.response.status,` / `,e.response.durationMs,`ms`]})]}),(0,h.jsx)(`div`,{className:`mt-3`,children:(0,h.jsx)(K,{value:e.response,title:`Studio envelope`})})]})]})}function K(e){return(0,h.jsxs)(`section`,{className:`grid min-w-0 content-start overflow-hidden rounded-lg bg-background/45`,children:[(0,h.jsxs)(`div`,{className:`flex min-h-9 items-center justify-between gap-3 bg-muted/20 px-4`,children:[(0,h.jsx)(`span`,{className:` text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:e.title}),(0,h.jsx)(`span`,{className:` text-xs text-muted-foreground`,children:Q(e.value)})]}),(0,h.jsx)(`div`,{className:`min-w-0 overflow-x-auto`,children:(0,h.jsx)(`pre`,{className:`m-0 max-h-96 min-w-max p-4 text-xs leading-5 text-foreground`,children:(0,h.jsx)(`code`,{children:(0,h.jsx)(ee,{text:oe(e.value)})})})})]})}function q(e){return(0,h.jsx)(`span`,{className:`inline-flex min-h-7 items-center rounded-md bg-muted/25 px-2.5 text-xs font-medium text-muted-foreground`,children:e.children})}function J(e){return e?`border-border/80 bg-muted/35 text-foreground`:`border-transparent bg-transparent text-muted-foreground/60`}function Y(e){return e===`dynamic`?`border-border/80 bg-muted/45 text-foreground`:`border-border/80 bg-muted/55 text-muted-foreground`}function X(e){return e.mcpServerName===void 0?Y(e.source):`border-border/80 bg-muted/35 text-foreground`}function Z(e){return e.mcpServerName===void 0?e.source:`MCP / ${e.mcpServerName}`}function Q(e){if(typeof e!=`object`||!e||Array.isArray(e))return`value`;let t=e.type;return typeof t==`string`?t:`object`}function $(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e.properties;return typeof t==`object`&&t&&!Array.isArray(t)?Object.keys(t).length:0}function re(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ie(e){if(a(e)&&typeof e.agentId==`string`&&e.agentId.length!==0&&typeof e.toolName==`string`&&e.toolName.length!==0&&(e.status===`success`||e.status===`error`)&&!(typeof e.durationMs!=`number`||!Number.isFinite(e.durationMs))&&typeof e.startedAt==`string`&&typeof e.endedAt==`string`&&Array.isArray(e.events))return e}function ae(e){if(typeof e!=`string`)return e;let t=r(e);return t.kind===`json`?t.value:e}function oe(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}export{re as a,$ as c,Z as d,J as i,Q as l,q as n,X as o,W as r,ie as s,K as t,Y as u};
|
|
2
|
-
//# sourceMappingURL=tool-runner-BtaZqE3R.js.map
|