import{j as t,i as h}from"./vendor-ui-BUsIib4b.js";import{r as e,u as I,e as T}from"./vendor-react-C0ZmnAiH.js";import{p as E,y as h0,F as R,s as z,a4 as g0,Q as V0,R as f0,S as x0,V as A0,W as H0,B as M,v as Z0,u as E0}from"./index-ccpu5IUx.js";import{u as B}from"./vendor-utils-DwtcRXMR.js";import{n as b0}from"./Star.es-B3o3Wp1q.js";import{S as M0,a as v0}from"./scroll-area-Bq8pc02q.js";import{u as y0}from"./use_circuit-VqyWUs5T.js";import{C as x,u as w0}from"./use_metric-JQcwAm9V.js";import{U as C0}from"./index-CvNY0Ztw.js";import{B as L0}from"./badge-Dksr9fi5.js";const j0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z"}))]]),F0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M54.8,119.49A35.06,35.06,0,0,1,49.05,128a35.06,35.06,0,0,1,5.75,8.51C60,147.24,60,159.83,60,172c0,25.94,1.84,32,20,32a12,12,0,0,1,0,24c-19.14,0-32.2-6.9-38.8-20.51C36,196.76,36,184.17,36,172c0-25.94-1.84-32-20-32a12,12,0,0,1,0-24c18.16,0,20-6.06,20-32,0-12.17,0-24.76,5.2-35.49C47.8,34.9,60.86,28,80,28a12,12,0,0,1,0,24c-18.16,0-20,6.06-20,32C60,96.17,60,108.76,54.8,119.49ZM240,116c-18.16,0-20-6.06-20-32,0-12.17,0-24.76-5.2-35.49C208.2,34.9,195.14,28,176,28a12,12,0,0,0,0,24c18.16,0,20,6.06,20,32,0,12.17,0,24.76,5.2,35.49A35.06,35.06,0,0,0,207,128a35.06,35.06,0,0,0-5.75,8.51C196,147.24,196,159.83,196,172c0,25.94-1.84,32-20,32a12,12,0,0,0,0,24c19.14,0,32.2-6.9,38.8-20.51C220,196.76,220,184.17,220,172c0-25.94,1.84-32,20-32a12,12,0,0,0,0-24Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M240,128c-64,0,0,88-64,88H80c-64,0,0-88-64-88,64,0,0-88,64-88h96C240,40,176,128,240,128Z",opacity:"0.2"}),e.createElement("path",{d:"M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"}))],["fill",e.createElement(e.Fragment,null,e.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,40ZM88,155.84c.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16c-31.27,0-31.72-22.43-32-35.84C71.71,141.9,71.59,136,56,136a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16C72.28,86.43,72.73,64,104,64a8,8,0,0,1,0,16c-15.59,0-15.71,5.9-16,20.16-.17,8.31-.41,20.09-8,27.84C87.59,135.75,87.83,147.53,88,155.84ZM200,136c-15.59,0-15.71,5.9-16,20.16-.28,13.41-.73,35.84-32,35.84a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16.17-8.31.41-20.09,8-27.84-7.6-7.75-7.84-19.53-8-27.84C167.71,85.9,167.59,80,152,80a8,8,0,0,1,0-16c31.27,0,31.72,22.43,32,35.84.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M39.91,128a27.68,27.68,0,0,1,9.49,11.13C54,148.62,54,160.51,54,172c0,24.27,1.21,38,26,38a6,6,0,0,1,0,12c-16.88,0-27.81-5.6-33.4-17.13C42,195.38,42,183.49,42,172c0-24.27-1.21-38-26-38a6,6,0,0,1,0-12c24.79,0,26-13.73,26-38,0-11.49,0-23.38,4.6-32.87C52.19,39.6,63.12,34,80,34a6,6,0,0,1,0,12C55.21,46,54,59.73,54,84c0,11.49,0,23.38-4.6,32.87A27.68,27.68,0,0,1,39.91,128ZM240,122c-24.79,0-26-13.73-26-38,0-11.49,0-23.38-4.6-32.87C203.81,39.6,192.88,34,176,34a6,6,0,0,0,0,12c24.79,0,26,13.73,26,38,0,11.49,0,23.38,4.6,32.87A27.68,27.68,0,0,0,216.09,128a27.68,27.68,0,0,0-9.49,11.13C202,148.62,202,160.51,202,172c0,24.27-1.21,38-26,38a6,6,0,0,0,0,12c16.88,0,27.81-5.6,33.4-17.13,4.6-9.49,4.6-21.38,4.6-32.87,0-24.27,1.21-38,26-38a6,6,0,0,0,0-12Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"}))]]),$0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM52,52H76v95.22a24,24,0,1,0,24,0V125l40,40v39H52ZM204,204H164V160a12,12,0,0,0-3.51-8.49L100,91V52h24V72a12,12,0,0,0,3.51,8.49l17.31,17.3a24,24,0,1,0,17-17L148,67V52h56Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,40H48a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V48A8,8,0,0,0,208,40ZM88,184a16,16,0,1,1,16-16A16,16,0,0,1,88,184Zm80-64a16,16,0,1,1,16-16A16,16,0,0,1,168,120Z",opacity:"0.2"}),e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM88,160a8,8,0,1,1-8,8A8,8,0,0,1,88,160ZM48,48H80v97.38a24,24,0,1,0,16,0V115.31l48,48V208H48ZM208,208H160V160a8,8,0,0,0-2.34-5.66L96,92.69V48h32V72a8,8,0,0,0,2.34,5.66l16,16A23.74,23.74,0,0,0,144,104a24,24,0,1,0,24-24,23.74,23.74,0,0,0-10.34,2.35L144,68.69V48h64V208ZM168,96a8,8,0,1,1-8,8A8,8,0,0,1,168,96Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M88,111.31l48,48V220a4,4,0,0,1-4,4H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H68a4,4,0,0,1,4,4V153.38a24,24,0,1,0,16,0ZM80,184a8,8,0,1,0-8-8A8,8,0,0,0,80,184Zm104-80a8,8,0,1,0-8,8A8,8,0,0,0,184,104Zm24-72H156a4,4,0,0,0-4,4V68.69l13.66,13.66a24,24,0,1,1-11.31,11.31l-16-16A8,8,0,0,1,136,72V36a4,4,0,0,0-4-4H92a4,4,0,0,0-4,4V88.69l61.66,61.65A8,8,0,0,1,152,156v64a4,4,0,0,0,4,4h52a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM88,158a10,10,0,1,1-10,10A10,10,0,0,1,88,158ZM46,208V48a2,2,0,0,1,2-2H82V146.84a22,22,0,1,0,12,0V110.49l52,52V210H48A2,2,0,0,1,46,208Zm164,0a2,2,0,0,1-2,2H158V160a6,6,0,0,0-1.76-4.24L94,93.51V46h36V72a6,6,0,0,0,1.76,4.24l17,17a22,22,0,1,0,8.48-8.48L142,69.51V46h66a2,2,0,0,1,2,2ZM168,94a10,10,0,1,1-10,10A10,10,0,0,1,168,94Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM88,160a8,8,0,1,1-8,8A8,8,0,0,1,88,160ZM48,48H80v97.38a24,24,0,1,0,16,0V115.31l48,48V208H48ZM208,208H160V160a8,8,0,0,0-2.34-5.66L96,92.69V48h32V72a8,8,0,0,0,2.34,5.66l16,16A23.74,23.74,0,0,0,144,104a24,24,0,1,0,24-24,23.74,23.74,0,0,0-10.34,2.35L144,68.69V48h64V208ZM168,96a8,8,0,1,1-8,8A8,8,0,0,1,168,96Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM88,156a12,12,0,1,1-12,12A12,12,0,0,1,88,156ZM44,208V48a4,4,0,0,1,4-4H84V148.4a20,20,0,1,0,8,0V105.66l56,56V212H48A4,4,0,0,1,44,208Zm168,0a4,4,0,0,1-4,4H156V160a4,4,0,0,0-1.17-2.83L92,94.34V44h40V72a4,4,0,0,0,1.17,2.83L151.33,93A20,20,0,1,0,157,87.33l-17-17V44h68a4,4,0,0,1,4,4ZM168,92a12,12,0,1,1-12,12A12,12,0,0,1,168,92Z"}))]]),S0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),e.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z"}))]]),k0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z",opacity:"0.2"}),e.createElement("path",{d:"M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M74.34,85.66A8,8,0,0,1,85.66,74.34L120,108.69V24a8,8,0,0,1,16,0v84.69l34.34-34.35a8,8,0,0,1,11.32,11.32l-48,48a8,8,0,0,1-11.32,0ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H84.4a4,4,0,0,1,2.83,1.17L111,145A24,24,0,0,0,145,145l23.8-23.8A4,4,0,0,1,171.6,120H224A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"}))]]),N0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M209.94,113.94l-96,96a48,48,0,0,1-67.88-67.88l96-96a48,48,0,0,1,67.88,67.88Z",opacity:"0.2"}),e.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM144.56,173.66l-21.45,21.45a44,44,0,0,1-62.22-62.22l21.45-21.46a8,8,0,0,1,11.32,11.31L72.2,144.2a28,28,0,0,0,39.6,39.6l21.45-21.46a8,8,0,0,1,11.31,11.32Zm-34.9-16a8,8,0,0,1-11.32-11.32l48-48a8,8,0,0,1,11.32,11.32Zm85.45-34.55-21.45,21.45a8,8,0,0,1-11.32-11.31L183.8,111.8a28,28,0,0,0-39.6-39.6L122.74,93.66a8,8,0,0,1-11.31-11.32l21.46-21.45a44,44,0,0,1,62.22,62.22Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M164.25,91.75a6,6,0,0,1,0,8.49l-64,64a6,6,0,0,1-8.49-8.48l64-64A6,6,0,0,1,164.25,91.75ZM214.2,41.8a54.07,54.07,0,0,0-76.38,0L107.75,71.85a6,6,0,0,0,8.49,8.49l30.07-30.06a42,42,0,0,1,59.41,59.41l-30.08,30.07a6,6,0,1,0,8.49,8.49l30.07-30.07A54,54,0,0,0,214.2,41.8ZM139.76,175.64l-30.07,30.08a42,42,0,0,1-59.41-59.41l30.06-30.07a6,6,0,0,0-8.49-8.49l-30,30.07a54,54,0,0,0,76.38,76.39l30.07-30.08a6,6,0,0,0-8.49-8.49Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M162.84,93.16a4,4,0,0,1,0,5.66l-64,64a4,4,0,0,1-5.66-5.66l64-64A4,4,0,0,1,162.84,93.16Zm49.95-49.95a52.07,52.07,0,0,0-73.56,0L109.17,73.27a4,4,0,0,0,5.65,5.66l30.07-30.06a44,44,0,0,1,62.24,62.24l-30.07,30.06a4,4,0,0,0,5.66,5.66l30.07-30.06A52.07,52.07,0,0,0,212.79,43.21ZM141.17,177.06l-30.06,30.07a44,44,0,0,1-62.24-62.24l30.06-30.06a4,4,0,0,0-5.66-5.66L43.21,139.23a52,52,0,0,0,73.56,73.56l30.06-30.07a4,4,0,1,0-5.66-5.66Z"}))]]),R0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M72,104a16,16,0,1,1,16,16A16,16,0,0,1,72,104Zm96,16a16,16,0,1,0-16-16A16,16,0,0,0,168,120Zm68-40V192a36,36,0,0,1-36,36H56a36,36,0,0,1-36-36V80A36,36,0,0,1,56,44h60V16a12,12,0,0,1,24,0V44h60A36,36,0,0,1,236,80Zm-24,0a12,12,0,0,0-12-12H56A12,12,0,0,0,44,80V192a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12Zm-12,82a30,30,0,0,1-30,30H86a30,30,0,0,1,0-60h84A30,30,0,0,1,200,162Zm-80-6v12h16V156ZM86,168H96V156H86a6,6,0,0,0,0,12Zm90-6a6,6,0,0,0-6-6H160v12h10A6,6,0,0,0,176,162Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,56H56A24,24,0,0,0,32,80V192a24,24,0,0,0,24,24H200a24,24,0,0,0,24-24V80A24,24,0,0,0,200,56ZM164,184H92a20,20,0,0,1,0-40h72a20,20,0,0,1,0,40Z",opacity:"0.2"}),e.createElement("path",{d:"M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Zm4,28H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48ZM172,96a12,12,0,1,1-12,12A12,12,0,0,1,172,96ZM96,184H80a16,16,0,0,1,0-32H96ZM84,120a12,12,0,1,1,12-12A12,12,0,0,1,84,120Zm60,64H112V152h32Zm32,0H160V152h16a16,16,0,0,1,0,32Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,50H134V16a6,6,0,0,0-12,0V50H56A30,30,0,0,0,26,80V192a30,30,0,0,0,30,30H200a30,30,0,0,0,30-30V80A30,30,0,0,0,200,50Zm18,142a18,18,0,0,1-18,18H56a18,18,0,0,1-18-18V80A18,18,0,0,1,56,62H200a18,18,0,0,1,18,18ZM74,108a10,10,0,1,1,10,10A10,10,0,0,1,74,108Zm88,0a10,10,0,1,1,10,10A10,10,0,0,1,162,108Zm2,30H92a26,26,0,0,0,0,52h72a26,26,0,0,0,0-52Zm-22,12v28H114V150ZM78,164a14,14,0,0,1,14-14h10v28H92A14,14,0,0,1,78,164Zm86,14H154V150h10a14,14,0,0,1,0,28Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,52H132V16a4,4,0,0,0-8,0V52H56A28,28,0,0,0,28,80V192a28,28,0,0,0,28,28H200a28,28,0,0,0,28-28V80A28,28,0,0,0,200,52Zm20,140a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V80A20,20,0,0,1,56,60H200a20,20,0,0,1,20,20ZM76,108a8,8,0,1,1,8,8A8,8,0,0,1,76,108Zm88,0a8,8,0,1,1,8,8A8,8,0,0,1,164,108Zm0,32H92a24,24,0,0,0,0,48h72a24,24,0,0,0,0-48Zm-20,8v32H112V148ZM76,164a16,16,0,0,1,16-16h12v32H92A16,16,0,0,1,76,164Zm88,16H152V148h12a16,16,0,0,1,0,32Z"}))]]),U=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:j0}));U.displayName="ArrowsOutSimpleIcon";const I0=U,O=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:F0}));O.displayName="BracketsCurlyIcon";const P=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:$0}));P.displayName="CircuitryIcon";const Q=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:S0}));Q.displayName="ClockCounterClockwiseIcon";const D=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:k0}));D.displayName="DownloadIcon";const x1=D,q=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:N0}));q.displayName="LinkSimpleIcon";const G=e.forwardRef((a,r)=>e.createElement(E,{ref:r,...a,weights:R0}));G.displayName="RobotIcon";const D0=G;var K={VITE_API_HOST_URL:"https://modelworks.ai/api"};const F=K.VITE_API_HOST_URL,$=K.VITE_API_HOST_URL,_0=async(a,r)=>{const o=`${F}/circuit-versions/${r}`;try{return(await a.get(o)).data.payload}catch(n){throw console.error("Error fetching circuit version:",n),new Error(n.message||"Failed to fetch circuit version")}},T0=async(a,r)=>{const o=`${F}/circuit-versions/${r}/llm-instructions`;try{return(await a.get(o)).data.payload}catch(n){throw console.error("Error fetching LLM instructions for circuit version:",n),new Error(n.message||"Failed to fetch LLM instructions for circuit version")}},z0=async(a,r,o,n)=>{const i=`${F}/circuits/${r}/circuit-versions`,m=[];o!==void 0&&m.push(`limit=${o}`),n!==void 0&&m.push(`page=${n}`);const c=m.length>0?`?${m.join("&")}`:"";try{const d=await a.get(`${i}${c}`),{payload:g,meta:p}=d.data;return{data:g,meta:p||{total_count:0,limit:o,offset:n||0}}}catch(d){throw console.error("Error fetching circuit versions:",d),new Error(d.message||"Failed to fetch circuit versions")}},B0=async(a,r)=>{try{const o=new FormData;return o.append("file",r),(await a.post(`${$}/circuit-versions/validate`,o,{headers:{"Content-Type":"multipart/form-data"}})).data.payload}catch(o){throw console.error("Error validating JSON file:",o),o}},U0=async(a,r,o,n)=>{try{const i=new FormData;return i.append("file",n),(await a.post(`${$}/users/${r}/circuits/${o}/circuit-versions`,i,{headers:{"Content-Type":"multipart/form-data"}})).data.payload}catch(i){throw console.error("Error creating circuit version:",i),i}},O0=async(a,r,o)=>{try{const n=new FormData;return n.append("file",o),(await a.put(`${$}/circuit-versions/${r}/readme`,n,{headers:{"Content-Type":"multipart/form-data"}})).data.payload}catch(n){throw console.error("Error uploading README:",n),new Error(n.message||"Failed to upload README")}},P0=async(a,r,o)=>{try{const n=new FormData;return n.append("file",o),(await a.put(`${$}/circuit-versions/${r}/license`,n,{headers:{"Content-Type":"multipart/form-data"}})).data.payload}catch(n){throw console.error("Error uploading LICENSE:",n),new Error(n.message||"Failed to upload LICENSE")}},Q0=async(a,r)=>{const o=`${F}/circuit-versions/${r}/deprecate`;try{return(await a.put(o,null)).data.payload}catch(n){throw console.error("Error deprecating circuit version:",n),new Error(n.message||"Failed to deprecate circuit version")}},W=()=>{const[a,r]=B(z),o=I(),n=h0({navigate:o,setState:r});return{useCircuitVersionByIdQuery:s=>R({queryKey:["circuitVersion",s],queryFn:async()=>{if(!s)return null;const l=await _0(n,s);return l&&r({circuitVersion:{mem:{circuitVersion:{...a.circuitVersion.mem.circuitVersion,[s]:l}}}}),l},options:{enabled:!!s},navigate:o,setState:r}),useCircuitVersionLlmInstructionsQuery:s=>R({queryKey:["circuitVersionLlmInstructions",s],queryFn:async()=>s?await T0(n,s):null,options:{enabled:!!s},navigate:o,setState:r}),useCircuitVersionsByCircuitUidQuery:(s,l=10,u=1,H={})=>R({queryKey:["circuitVersions",s,l,u],queryFn:async()=>{if(!s)return{data:[],meta:null};const{data:v,meta:L}=await z0(n,s,l,u);return v&&r({circuitVersion:{mem:{circuitsVersionsByCircuit:{...a.circuitVersion.mem.circuitsVersionsByCircuit,[s]:v}}}}),{data:v??[],meta:L}},options:{enabled:!!s,...H},navigate:o,setState:r}),createCircuitVersion:async({username:s,circuitName:l,file:u})=>{const H=await U0(n,s,l,u);return H&&r({circuitVersion:{mem:{circuitVersion:{...a.circuitVersion.mem.circuitVersion,[H.uid]:H}}}}),H},validateCircuitVersion:async s=>{try{return await B0(n,s)}catch(l){throw console.error("Error validating circuit version:",l),l}},uploadReadme:async({circuitVersionId:s,readmeFile:l})=>{const u=await O0(n,s,l);return console.log("README uploaded successfully:",u),u},uploadLicense:async({circuitVersionUID:s,licenseFile:l})=>{const u=await P0(n,s,l);return console.log("License uploaded successfully:",u),u},deprecateCircuitVersion:async s=>{const l=await Q0(n,s);return l&&r({circuitVersion:{mem:{circuitVersion:{...a.circuitVersion.mem.circuitVersion,[l.uid]:l}}}}),l},hasRunnableVersions:s=>{const l=[x.STAGING,x.DEPRECATED,x.RUNNING];return s.some(u=>l.includes(u.state))},getRunnableVersions:s=>{const l=[x.STAGING,x.DEPRECATED,x.RUNNING];return s.filter(u=>l.includes(u.state))},isVersionRunnable:s=>[x.STAGING,x.DEPRECATED,x.RUNNING].includes(s.state)}},q0=h.div`
  display: flex;
  justify-content: start;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.18);
  margin-bottom: 5px;
  font-size: 14px;
`,y=h.div`
  display: flex;
  align-items: center;
  padding: 10px 15px 15px 10px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;

  position: relative;
  margin-right: 15px;
  border-radius: 5px 5px 0 0;

  &::after {
    content: '';
    display: ${a=>a.selected?"block":"none"};
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: white;
  }

  &:hover {
    background-color: hsla(0, 0%, 100%, 0.08);
  }
`,w=h.div`
  margin-right: 8px;
  display: flex;
  align-items: center;
`,A1=({circuit:a,user:r})=>{const[o,n]=e.useState("circuit"),[i]=B(z),{useCircuitVersionsByCircuitUidQuery:m,hasRunnableVersions:c}=W(),[d,g]=e.useState(!1),p=I(),V=T(),f=i.user.disk.currentUser,{data:Z}=m(a.uid);e.useEffect(()=>{const s=V.pathname;s.includes("/repo")?n("files"):s.includes("/settings")?n("settings"):s.includes("/api")?n("api"):s.includes("/versions")?n("versions"):s.includes("/code")?n("code"):n("circuit")},[V]),e.useEffect(()=>{if(Z&&Z.data.length>0){const s=c(Z.data);g(s)}else g(!1)},[Z,c]);const A=s=>{n(s);const l=`/${r.username}/${a.name}`;switch(s){case"files":p(`${l}/repo`);break;case"code":p(`${l}/code`);break;case"api":p(`${l}/api`);break;case"versions":p(`${l}/versions`);break;case"settings":p(`${l}/settings/information`);break;default:p(l)}},C=!a.is_private||f&&a.user_uid===f.uid||a.is_protected&&f&&a.user_uid===f.uid;return t.jsxs(q0,{children:[t.jsxs(y,{selected:o==="circuit",onClick:()=>A("circuit"),children:[t.jsx(w,{children:t.jsx(P,{size:16,weight:"regular"})}),"Circuit"]}),C&&d&&t.jsxs(y,{selected:o==="code",onClick:()=>A("code"),children:[t.jsx(w,{children:t.jsx(O,{size:16,weight:"regular"})}),"Code"]}),t.jsxs(y,{selected:o==="versions",onClick:()=>A("versions"),children:[t.jsx(w,{children:t.jsx(Q,{size:16,weight:"regular"})}),"Versions"]}),d&&t.jsxs(y,{selected:o==="api",onClick:()=>A("api"),children:[t.jsx(w,{children:t.jsx(q,{size:16,weight:"regular"})}),"API"]}),f&&f.username===r.username&&t.jsxs(y,{selected:o==="settings",onClick:()=>A("settings"),children:[t.jsx(w,{children:t.jsx(g0,{size:16,weight:"regular"})}),"Settings"]})]})},G0=h(M)`
	width: 100%;
`,K0=h.div`
	display: flex;
	justify-content: center;
	width: 100%;
	margin-top: 20px;
`,W0=({isOpen:a,onClose:r,circuit:o,primaryVersion:n})=>{const i=()=>{r==null||r()},m=d=>{d||i()},c=()=>{const d=n.embed_template_blob||"No embed template available.",g=new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(g),V=document.createElement("a");V.href=p,V.download=`${o.name}_embed_template.txt`,V.click(),URL.revokeObjectURL(p)};return t.jsx(V0,{open:a,onOpenChange:m,children:t.jsxs(f0,{className:"max-w-[550px] bg-neutral-900 text-white border border-neutral-800",onOpenAutoFocus:d=>d.preventDefault(),children:[t.jsxs(x0,{className:"mb-2",children:[t.jsxs(A0,{className:"mb-0 text-white",children:["Embed Template for ",o.name]}),t.jsxs(H0,{className:"mt-0 text-gray-400 text-sm",children:["Download the template to embed the circuit"," ",t.jsx("strong",{children:o.name})," into your application."]})]}),t.jsx(K0,{children:t.jsxs(G0,{size:"lg",onClick:c,className:"h-11 bg-white text-black hover:bg-neutral-200 hover:text-black",children:[t.jsx(D,{size:16,style:{marginRight:"8px"}}),"Download Embed Template"]})})]})})},J0=({open:a,onOpenChange:r,instructions:o,isLoading:n})=>{const[i,m]=e.useState(!1);e.useEffect(()=>{a||m(!1)},[a]);const c=async()=>{if(!(!o||n))try{await navigator.clipboard.writeText(o),m(!0),setTimeout(()=>m(!1),1500)}catch(d){console.error("Failed to copy instructions:",d)}};return t.jsx(Z0,{open:a,onOpenChange:r,title:"Instructions for LLMs",subtitle:"Use these instructions as a system prompt or tool description for this circuit version.",hideFooter:!0,maxWidth:"xl",allowHorizontalScroll:!1,allowVerticalScroll:!0,children:t.jsxs("div",{className:"mt-3 flex flex-col gap-3",children:[t.jsx("p",{className:"text-sm text-zinc-300",children:"These instructions are specific to this circuit version. Paste them into your LLM so it knows how to:"}),t.jsxs("ul",{className:"list-disc space-y-1 pl-5 text-sm text-zinc-400",children:[t.jsxs("li",{children:["Call the circuit via the"," ",t.jsx("code",{className:"font-mono",children:"MODELWORKS_HTTP"})," adaptor."]}),t.jsxs("li",{children:["Construct requests that match the circuit's"," ",t.jsx("code",{className:"font-mono",children:"query_schema"}),"."]}),t.jsxs("li",{children:["Interpret sample responses from previous"," ",t.jsx("code",{className:"font-mono",children:"circuit_runs"}),"."]})]}),t.jsx("div",{className:"w-full",children:t.jsxs(M0,{className:"w-full mt-3 max-h-72 overflow-y-auto overflow-x-hidden rounded-md border border-zinc-700 bg-black/40",children:[t.jsx("div",{className:"w-full whitespace-pre-wrap break-words p-3 text-xs font-mono text-zinc-100",children:n?"Loading instructions…":o||"No LLM instructions are available for this circuit version."}),t.jsx(v0,{orientation:"vertical"})]})}),t.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[t.jsx(M,{type:"button",size:"default",variant:"outline",onClick:c,disabled:n||!o,className:"min-w-[140px]",children:i?"Copied!":"Copy Instructions"}),t.jsx(M,{type:"button",size:"default",variant:"outline",onClick:()=>r(!1),className:"min-w-[110px] bg-zinc-50 text-zinc-900 hover:bg-zinc-200 hover:text-zinc-900",children:"OK"})]})]})})},X0=h.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 5px;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
  padding: 10px 20px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
`,Y0=h.div`
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
`,e1=h.span`
  font-size: 24px;
  font-weight: bold;
  color: white;
  border-bottom: 1px solid transparent;

  &:hover {
    border-bottom: 1px dotted white;
    cursor: pointer;
  }
`,a1=h.span`
  font-size: 24px;
  font-weight: bold;
  color: white;
  border-bottom: 1px solid transparent;

  &:hover {
    border-bottom: 1px dotted white;
    cursor: pointer;
  }
`,J=h.span`
  color: ${({$isStarred:a})=>a?"gold":"#aaa"};
  transition:
    color 0.2s ease,
    border-color 0.3s ease;
`,t1=h(M)`
  border: 1px solid ${({$isStarred:a})=>a?"gold":"#333"} !important;
  color: ${({$isStarred:a})=>a?"gold":"#aaa"};
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: transparent;
  transition:
    color 0.2s ease,
    border-color 0.3s ease,
    background-color 0.2s ease;

  &:hover {
    cursor: pointer;
    color: gold !important;
    border-color: gold !important;
    background-color: #111827;

    & ${J} {
      color: gold !important;
    }
  }

  svg {
    width: 16px;
    height: 16px;
  }
`,r1=h(M)`
  color: #aaa;
  border: 1px solid #333 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: none;
  background-color: transparent;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    background-color 0.2s ease;

  &:hover {
    color: #00ff00;
    border-color: #00ff00 !important;
    background-color: #111827;
    cursor: pointer;
  }

  svg {
    width: 16px;
    height: 16px;
  }
`,n1=h(M)`
  color: #aaa;
  border: 1px solid #333 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: none;
  background-color: transparent;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    background-color 0.2s ease;

  &:hover {
    color: #a855f7;
    border-color: #a855f7 !important;
    background-color: #111827;
    cursor: pointer;
  }

  svg {
    width: 16px;
    height: 16px;
  }
`,s1=h.div`
  display: flex;
  align-items: center;
  gap: 10px;
`,o1=a=>{switch(a){case"ruby":return"border-red-500 text-red-300";case"blue":return"border-blue-500 text-blue-300";case"green":return"border-emerald-500 text-emerald-300";case"gold":return"border-yellow-500 text-yellow-300";case"orange":return"border-orange-500 text-orange-300";case"gray":default:return"border-zinc-600 text-zinc-300"}},H1=({circuit:a,user:r})=>{const[o,n]=e.useState(!1),[i,m]=e.useState(!1),[c,d]=e.useState(void 0),{useCircuitStarQuery:g,useCircuitQuery:p,createCircuitStar:V,deleteCircuitStar:f,usePrimaryCircuitVersionQuery:Z}=y0(),{useCircuitVersionLlmInstructionsQuery:A,isVersionRunnable:C}=W(),{useCircuitMetricQuery:s}=w0(),l=I(),u=T(),{sessionToken:H}=E0(),{data:v,isLoading:L,refetch:X}=g(r.username,a.name),{data:S,isLoading:Y,refetch:e0}=p(r.username,a.name),{data:b,isLoading:a0}=Z(a.uid),{data:k,isLoading:t0}=s(b==null?void 0:b.circuit_metric_uid),j=!!v,r0=(S==null?void 0:S.stars)||a.stars,N=L||Y||a0||t0;e.useEffect(()=>{!N&&b&&d(b)},[N,b]);const n0=c==null?void 0:c.uid,{data:s0,isLoading:o0}=A(n0),l0=async()=>{if(H)try{j?await f({username:r.username,circuitName:a.name}):await V({username:r.username,circuitName:a.name})}catch(p0){console.error("Failed to toggle star:",p0)}else l("/login",{state:{from:u.pathname}});X(),e0()},c0=()=>{l(`/${r.username}`,{replace:!0})},i0=()=>{l(`/${r.username}/${a.name}`,{replace:!0})},d0=()=>{console.log("Download Embed Template clicked")},m0=()=>{m(!0)},_=a.is_protected&&!a.is_private?{color:"blue",text:"Protected"}:a.is_deprecated?{color:"orange",text:"Deprecated"}:a.is_private?{color:"gray",text:"Private"}:{color:"green",text:"Public"},u0=o1(_.color);return t.jsxs(t.Fragment,{children:[t.jsxs(X0,{children:[t.jsxs(Y0,{children:[t.jsx(C0,{size:24,username:r.username,state:c==null?void 0:c.state}),t.jsx(e1,{onClick:c0,children:r.username}),"/",t.jsx(a1,{onClick:i0,children:a.name}),t.jsx(L0,{variant:"outline",className:`px-2 py-0.5 text-xs ${u0}`,children:_.text})]}),t.jsxs(s1,{children:[!N&&t.jsxs(t1,{variant:"outline",$isStarred:j,onClick:l0,disabled:L,children:[t.jsx(b0,{size:16,weight:"regular",style:{marginRight:"3px"}}),j?"Starred":"Star",t.jsx("span",{children:"•"}),t.jsx(J,{$isStarred:j,children:r0})]}),t.jsxs(r1,{variant:"outline",onClick:()=>n(!0),children:[t.jsx(I0,{size:16,weight:"regular",style:{marginRight:"3px"}}),"Embed",t.jsx("span",{children:"•"}),(k==null?void 0:k.embeds)??"0"]}),c&&C(c)&&t.jsxs(n1,{variant:"outline",onClick:m0,children:[t.jsx(D0,{size:16,weight:"regular",style:{marginRight:"3px"}}),"SKILL.md"]})]})]}),c&&t.jsx(W0,{isOpen:o,onClose:()=>n(!1),onDownloadTemplate:d0,circuit:a,primaryVersion:c}),t.jsx(J0,{open:i,onOpenChange:m,instructions:s0,isLoading:o0})]})};export{H1 as H,A1 as a,D as b,P as c,q as o,x1 as s,W as u};