@decocms/mesh 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/client/assets/{AlertCircle-Du1WT751.js → AlertCircle-D7Y5lb85.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-D2XEhobZ.js → ArrowLeft-DLGdR8R3.js} +1 -1
  3. package/dist/client/assets/{Calendar-Co6ako3r.js → Calendar-BIuHCFcF.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BTsoCUlX.js → ChevronDown-DNVwrHI3.js} +1 -1
  5. package/dist/client/assets/{Clock-DaV6oMqF.js → Clock-CbKCY_SW.js} +1 -1
  6. package/dist/client/assets/{Copy01-DK5159Rb.js → Copy01-B-rLWzst.js} +1 -1
  7. package/dist/client/assets/{CpuChip02-DG7E5vjX.js → CpuChip02-wuCmGgd2.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-ATvueeDl.js → DotsVertical-qrfHOj7f.js} +1 -1
  9. package/dist/client/assets/{File06-CCcPYdcS.js → File06-DJfHNtkr.js} +1 -1
  10. package/dist/client/assets/{GitBranch01-DdBZ2zon.js → GitBranch01-DKUtbZqA.js} +1 -1
  11. package/dist/client/assets/{Inbox01-FsIho9ps.js → Inbox01-C3SohPjD.js} +1 -1
  12. package/dist/client/assets/{InfoCircle-z9SmeZ2K.js → InfoCircle-JMKMx9jx.js} +1 -1
  13. package/dist/client/assets/{Key01-PJxsN9f2.js → Key01-BUYdliq4.js} +1 -1
  14. package/dist/client/assets/{LinkExternal01-UPDE0V2O.js → LinkExternal01-CwO6S7_R.js} +1 -1
  15. package/dist/client/assets/{Loading01-CH6mw7mn.js → Loading01-DyCC_wp5.js} +1 -1
  16. package/dist/client/assets/{Lock01-DfYPtjUw.js → Lock01-CJO1oPaw.js} +1 -1
  17. package/dist/client/assets/{Plus-D2stpxr4.js → Plus-BoZvN_rT.js} +1 -1
  18. package/dist/client/assets/{SearchMd-CwAqtJqG.js → SearchMd-DBw3zp_M.js} +1 -1
  19. package/dist/client/assets/{Terminal-zrKj2_VN.js → Terminal-DURJ2Sop.js} +1 -1
  20. package/dist/client/assets/{Trash01-BRxmwmD1.js → Trash01-D8NpuzHg.js} +1 -1
  21. package/dist/client/assets/{Upload01-CGDUyeg3.js → Upload01-BYUhUNdK.js} +1 -1
  22. package/dist/client/assets/{X-E7J_uWRT.js → X-BV7uqO3B.js} +1 -1
  23. package/dist/client/assets/{XClose-BGxDstvO.js → XClose-Dez1KTRy.js} +1 -1
  24. package/dist/client/assets/{alert-dialog-CxYBxRCI.js → alert-dialog-2c4JlYwD.js} +1 -1
  25. package/dist/client/assets/{auth-TMT6XsET.js → auth-DLdX6AGd.js} +1 -1
  26. package/dist/client/assets/{auth-catchall-DkkFwJAm.js → auth-catchall-kFa24VQN.js} +1 -1
  27. package/dist/client/assets/{avatar-F70el86e.js → avatar-NC000dj0.js} +1 -1
  28. package/dist/client/assets/{badge-BcTlBuEb.js → badge-ffsmxYLL.js} +1 -1
  29. package/dist/client/assets/{button-Dj8ueofv.js → button-BM8Ntdfr.js} +1 -1
  30. package/dist/client/assets/{card-66QSeiOF.js → card-BWKGhflg.js} +1 -1
  31. package/dist/client/assets/{checkbox-CVcef9O7.js → checkbox-CDB4i5WM.js} +1 -1
  32. package/dist/client/assets/{collection-detail-D8wVTEqX.js → collection-detail-DUvB2Vch.js} +1 -1
  33. package/dist/client/assets/{collection-display-button-C193PAy9.js → collection-display-button-M0ZEYwbq.js} +1 -1
  34. package/dist/client/assets/{collection-header-BuFCeK4g.js → collection-header-BZq2RMFO.js} +1 -1
  35. package/dist/client/assets/{collection-page-M_cHcDoQ.js → collection-page-DV7fHb8_.js} +1 -1
  36. package/dist/client/assets/{collection-search-Vq1GfSWB.js → collection-search-D4vMytfv.js} +1 -1
  37. package/dist/client/assets/{collection-table-wrapper-BCXAi-BN.js → collection-table-wrapper-CDYLUpBi.js} +1 -1
  38. package/dist/client/assets/{connection-card-BsnAC2N8.js → connection-card-DMoDmlju.js} +1 -1
  39. package/dist/client/assets/{connection-detail-R_iXfPNX.js → connection-detail-BPMKrF4u.js} +1 -1
  40. package/dist/client/assets/{connections-DYIPJTN9.js → connections-W2RFM1S-.js} +1 -1
  41. package/dist/client/assets/{core-DKy85ot6.js → core-CJVZ6TZ4.js} +1 -1
  42. package/dist/client/assets/{create-organization-dialog-Dc45BpM3.js → create-organization-dialog-DY8wFeXZ.js} +1 -1
  43. package/dist/client/assets/{dialog-Dcux2Ttt.js → dialog-_0iI5rNw.js} +1 -1
  44. package/dist/client/assets/{dropdown-menu-BUANjhM2.js → dropdown-menu-4Ypgp2xI.js} +1 -1
  45. package/dist/client/assets/{env-vars-editor-Cmi8ii-i.js → env-vars-editor-DuAsDAtd.js} +1 -1
  46. package/dist/client/assets/{error-boundary-BaDP7Z4Q.js → error-boundary-Dd7BgwTJ.js} +1 -1
  47. package/dist/client/assets/{extract-connection-data-BD7XgNcV.js → extract-connection-data-C4wZpmQd.js} +1 -1
  48. package/dist/client/assets/{form-D1QOQ8Im.js → form-DNdbWanJ.js} +1 -1
  49. package/dist/client/assets/{formatDistanceToNow-BZKDch9X.js → formatDistanceToNow-CNMZ-Ei_.js} +1 -1
  50. package/dist/client/assets/{gateway-detail-BruHhfdQ.js → gateway-detail-De4b4XSK.js} +1 -1
  51. package/dist/client/assets/{gateways-MFtOEWry.js → gateways-q4D0Ec2r.js} +1 -1
  52. package/dist/client/assets/{home-CfjYes5U.js → home-RuIm8-ic.js} +1 -1
  53. package/dist/client/assets/{index-DkE856zJ.js → index-BlsDXE23.js} +20 -20
  54. package/dist/client/assets/{index-D7vBid7X.js → index-CD92JRY8.js} +1 -1
  55. package/dist/client/assets/{index-CXfjFAB2.js → index-CGy1qJ5Y.js} +1 -1
  56. package/dist/client/assets/{index-B-Y0sZwN.js → index-MYfTA9Ba.js} +1 -1
  57. package/dist/client/assets/{input-C2Ph-V5_.js → input-B45bC0Rc.js} +1 -1
  58. package/dist/client/assets/json-DzSEyFTU.js +1 -0
  59. package/dist/client/assets/{json-syntax-highlighter-B4SQlh57.js → json-syntax-highlighter-DO7qBvWL.js} +2 -2
  60. package/dist/client/assets/{layout-DqSCBByW.js → layout-RDUry3u6.js} +1 -1
  61. package/dist/client/assets/{lazy-highlighter-BZxAEkAn.js → lazy-highlighter-KouMYaFu.js} +1 -1
  62. package/dist/client/assets/{localstorage-keys-BdgFgIfr.js → localstorage-keys-BNPDgZQf.js} +1 -1
  63. package/dist/client/assets/{login-CjvCnOTd.js → login-BZwM9o36.js} +1 -1
  64. package/dist/client/assets/{mcp-oauth-BRLf6SSt.js → mcp-oauth-BxQJ_sZ7.js} +1 -1
  65. package/dist/client/assets/{members-qDc7lURh.js → members-b4fCyidG.js} +1 -1
  66. package/dist/client/assets/{monitoring-B3MEXlZy.js → monitoring-C3u-RljV.js} +1 -1
  67. package/dist/client/assets/{oauth-callback-DRBgoMZ7.js → oauth-callback-C8RVlzMp.js} +1 -1
  68. package/dist/client/assets/{page-BQFA7pBB.js → page-D9cTJOkH.js} +1 -1
  69. package/dist/client/assets/{popover-B5X6Vli5.js → popover-CDfnuIYl.js} +1 -1
  70. package/dist/client/assets/prism-light-CAnIadDL.js +1 -0
  71. package/dist/client/assets/{resizable-D_GRD1gk.js → resizable-CwsfF64n.js} +34 -34
  72. package/dist/client/assets/{resource-tabs-BeL7wdCw.js → resource-tabs-yHmaZ9ZD.js} +1 -1
  73. package/dist/client/assets/{select-DIsljPdj.js → select-CG-oLpgX.js} +1 -1
  74. package/dist/client/assets/{settings-D0j6CjB5.js → settings-CrKQeRt-.js} +1 -1
  75. package/dist/client/assets/shell-layout-DRz6Ov6H.js +19 -0
  76. package/dist/client/assets/{spinner-TVmB-5qD.js → spinner-BIp36cWs.js} +1 -1
  77. package/dist/client/assets/{store-Dg8rXQqH.js → store-DpYoNJNm.js} +1 -1
  78. package/dist/client/assets/{store-app-detail-BaLRva6m.js → store-app-detail-CxLOlzfX.js} +1 -1
  79. package/dist/client/assets/{switch-Zc7AToJx.js → switch-Ckivla4Z.js} +1 -1
  80. package/dist/client/assets/{tools-list-D_OD1vn5.js → tools-list-DWIsrkx2.js} +1 -1
  81. package/dist/client/assets/{tooltip-CNuF1S13.js → tooltip-CYopm1Sm.js} +1 -1
  82. package/dist/client/assets/{types-BFTKKK_w.js → types-Bmw9MVte.js} +1 -1
  83. package/dist/client/assets/{use-binding-Dx0VfUue.js → use-binding-DiGbYyGi.js} +1 -1
  84. package/dist/client/assets/{use-connection-B9P3V0a0.js → use-connection-BGthiOfQ.js} +1 -1
  85. package/dist/client/assets/{use-connection-resources-BzPnvL0L.js → use-connection-resources-B-9emPmy.js} +1 -1
  86. package/dist/client/assets/{use-gateway-DynzgasG.js → use-gateway-B_vZFCo_.js} +1 -1
  87. package/dist/client/assets/{use-list-state-DLhjJXJo.js → use-list-state-D2xhuXBP.js} +1 -1
  88. package/dist/client/assets/{use-mcp-B4HuTx_L.js → use-mcp-CKeUPEl8.js} +1 -1
  89. package/dist/client/assets/{use-members-8RC-uoxQ.js → use-members-DGy3Ohsl.js} +1 -1
  90. package/dist/client/assets/{use-mobile-BtxRZpBG.js → use-mobile-BSF9aYm8.js} +1 -1
  91. package/dist/client/assets/{use-organization-settings-D16HeZQR.js → use-organization-settings-Xs2e_hDY.js} +1 -1
  92. package/dist/client/assets/{use-tool-call-Betk01yc.js → use-tool-call-DOhzogS9.js} +1 -1
  93. package/dist/client/assets/useQuery-CA4Qsiz4.js +1 -0
  94. package/dist/client/assets/{useSuspenseInfiniteQuery-DHmfnsAy.js → useSuspenseInfiniteQuery-HnhdgP6D.js} +1 -1
  95. package/dist/client/assets/{view-mode-toggle-CIqr2uxV.js → view-mode-toggle-D-v785I-.js} +1 -1
  96. package/dist/client/index.html +1 -1
  97. package/dist/server/cli.js +131 -131
  98. package/dist/server/server.js +128 -128
  99. package/package.json +1 -1
  100. package/dist/client/assets/json-DVnNOwmi.js +0 -1
  101. package/dist/client/assets/prism-light-BeJZ3zKA.js +0 -1
  102. package/dist/client/assets/shell-layout-CdA9l5Mv.js +0 -17
  103. package/dist/client/assets/useQuery-BDcaqn5m.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aw as Pt,r as N,c as P,d as Rn,j as p,g as Ks,as as Yi,x as ip,y as ru,v as lp,w as jo,i as ap,b as cp,t as up,F as ee,Q as dp,ax as Ro,ay as su,ai as fp,ah as hp,az as pp,H as Xi,a2 as ou,a5 as mp,B as Dn,E as We,$ as Qi,a6 as gp,z as Js,a3 as yp,Z as Zi,ac as xp,ad as bp,ae as kp,aA as el,aB as vp,a4 as iu,a1 as wp,aC as Sp,L as Cp,aD as Np,aE as Ep}from"./index-DkE856zJ.js";import{U as ht,f as tl,d as Gs,c as Lt,b as nl,I as Ys,u as Tp,n as Mp}from"./use-connection-B9P3V0a0.js";import{d as Op,C as mn,e as Ap,f as Ip,g as jp,I as Rp,B as Dp,n as ca,G as lu,M as Pp,o as Lp,R as ua,m as $p}from"./resizable-D_GRD1gk.js";import{E as vr,i as _p}from"./SearchMd-CwAqtJqG.js";import{E as ar}from"./error-boundary-BaDP7Z4Q.js";import{P as Xs}from"./formatDistanceToNow-BZKDch9X.js";import{u as zp,L as Bp}from"./localstorage-keys-BdgFgIfr.js";import{u as Fp,a as Ue,c as Ke,b as Je,T as Ge,i as rl}from"./tooltip-CNuF1S13.js";import{B as ue,c as Z}from"./button-Dj8ueofv.js";import{F as ct,a as au,b as $t,c as wr,d as Pn}from"./form-D1QOQ8Im.js";import{I as Ln}from"./input-C2Ph-V5_.js";import{T as Zr,D as Vp,a as Hp,b as Wp,f as qp,c as Up,d as Kp}from"./dialog-Dcux2Ttt.js";import{A as Jp,D as Gp,u as Yp}from"./use-binding-Dx0VfUue.js";import{i as Zt}from"./Loading01-CH6mw7mn.js";import{s as sl}from"./Plus-D2stpxr4.js";import{i as Xp}from"./Upload01-CGDUyeg3.js";import{b as Nn,a as ol,V as Qs}from"./layout-DqSCBByW.js";import{i as Qp}from"./AlertCircle-Du1WT751.js";import{s as Zp}from"./Clock-DaV6oMqF.js";import{a as em}from"./Copy01-DK5159Rb.js";import{i as il,J as tm}from"./json-syntax-highlighter-B4SQlh57.js";import{s as ll,i as cu}from"./XClose-BGxDstvO.js";import{u as nm,O as rm,M as sm,F as om,v as im,E as lm}from"./index-D7vBid7X.js";import{u as al}from"./use-mcp-B4HuTx_L.js";import{S as $n}from"./spinner-TVmB-5qD.js";import{V as am}from"./view-mode-toggle-CIqr2uxV.js";import{i as cm}from"./GitBranch01-DdBZ2zon.js";import{a as uu,b as um}from"./use-tool-call-Betk01yc.js";import"./index-CXfjFAB2.js";import{n as dm}from"./Calendar-Co6ako3r.js";import{b as fm,D as hm,a as pm,d as da,i as mm}from"./dropdown-menu-BUANjhM2.js";import{B as fn}from"./badge-BcTlBuEb.js";import{i as du}from"./X-E7J_uWRT.js";import"./CpuChip02-DG7E5vjX.js";import"./select-DIsljPdj.js";import"./ChevronDown-BTsoCUlX.js";import"./use-mobile-BtxRZpBG.js";import"./use-gateway-DynzgasG.js";import"./Terminal-zrKj2_VN.js";import"./connection-card-BsnAC2N8.js";import"./card-66QSeiOF.js";import"./LinkExternal01-UPDE0V2O.js";import"./alert-dialog-CxYBxRCI.js";import"./File06-CCcPYdcS.js";import"./InfoCircle-z9SmeZ2K.js";import"./use-organization-settings-D16HeZQR.js";import"./useQuery-BDcaqn5m.js";import"./auth-TMT6XsET.js";import"./ArrowLeft-D2XEhobZ.js";import"./mcp-oauth-BRLf6SSt.js";import"./env-vars-editor-Cmi8ii-i.js";import"./Trash01-BRxmwmD1.js";import"./Key01-PJxsN9f2.js";import"./extract-connection-data-BD7XgNcV.js";import"./registry-utils-ulDDT0d8.js";import"./generate-id-Dyweu44Y.js";import"./index-B-Y0sZwN.js";const fu=Pt("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const hu=Pt("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const gm=Pt("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const ym=Pt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const pu=Pt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const mu=Pt("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const gu=Pt("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const yu=Pt("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),cl=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));cl.displayName="AlertOctagon";const xu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));xu.displayName="Box";const bu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));bu.displayName="ClockFastForward";const ku=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m16 18 6-6-6-6M8 6l-6 6 6 6"}));ku.displayName="Code01";const vu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));vu.displayName="Code02";const wu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M12 17a5 5 0 1 0 10 0 5 5 0 0 0-10 0Zm0 0c0-1.126.372-2.165 1-3V5m-1 12c0 .825.2 1.604.554 2.29-.842.712-2.788 1.21-5.054 1.21-3.038 0-5.5-.895-5.5-2V5m11 0c0 1.105-2.462 2-5.5 2S2 6.105 2 5m11 0c0-1.105-2.462-2-5.5-2S2 3.895 2 5m0 9c0 1.105 2.462 2 5.5 2 2.189 0 4.08-.465 4.965-1.138M13 9.5c0 1.105-2.462 2-5.5 2S2 10.605 2 9.5"}));wu.displayName="CoinsStacked01";const Ur=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Ur.displayName="Columns01";const Su=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Su.displayName="CornerDownRight";const Cu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));Cu.displayName="Database01";const Nu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M11 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 22 5.12 22 6.8 22h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V13M8 16h1.675c.489 0 .733 0 .963-.055.204-.05.4-.13.579-.24.201-.123.374-.296.72-.642L21.5 5.5a2.121 2.121 0 0 0-3-3l-9.563 9.563c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.579c-.055.23-.055.474-.055.963V16Z"}));Nu.displayName="Edit05";const Zs=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M3 9h13.5a4.5 4.5 0 1 1 0 9H12M3 9l4-4M3 9l4 4"}));Zs.displayName="FlipBackward";const Eu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));Eu.displayName="Repeat03";const eo=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M15 8H8.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C7 7.24 7 6.96 7 6.4V3m10 18v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));eo.displayName="Save02";const Tu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));Tu.displayName="Tool01";const to=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M16 3.468a4.5 4.5 0 0 1 0 8.064m2 5.234c1.512.684 2.872 1.799 4 3.234M2 20c1.946-2.477 4.59-4 7.5-4s5.553 1.523 7.5 4M14 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));to.displayName="Users02";const{getOwnPropertyNames:xm,getOwnPropertySymbols:bm}=Object,{hasOwnProperty:km}=Object.prototype;function Do(n,e){return function(r,s,o){return n(r,s,o)&&e(r,s,o)}}function Ir(n){return function(t,r,s){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,s);const{cache:o}=s,i=o.get(t),l=o.get(r);if(i&&l)return i===r&&l===t;o.set(t,r),o.set(r,t);const a=n(t,r,s);return o.delete(t),o.delete(r),a}}function vm(n){return n?.[Symbol.toStringTag]}function fa(n){return xm(n).concat(bm(n))}const wm=Object.hasOwn||((n,e)=>km.call(n,e));function on(n,e){return n===e||!n&&!e&&n!==n&&e!==e}const Sm="__v",Cm="__o",Nm="_owner",{getOwnPropertyDescriptor:ha,keys:pa}=Object;function Em(n,e){return n.byteLength===e.byteLength&&es(new Uint8Array(n),new Uint8Array(e))}function Tm(n,e,t){let r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function Mm(n,e){return n.byteLength===e.byteLength&&es(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Om(n,e){return on(n.getTime(),e.getTime())}function Am(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Im(n,e){return n===e}function ma(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.entries();let i,l,a=0;for(;(i=o.next())&&!i.done;){const c=e.entries();let u=!1,d=0;for(;(l=c.next())&&!l.done;){if(s[d]){d++;continue}const f=i.value,h=l.value;if(t.equals(f[0],h[0],a,d,n,e,t)&&t.equals(f[1],h[1],f[0],h[0],n,e,t)){u=s[d]=!0;break}d++}if(!u)return!1;a++}return!0}const jm=on;function Rm(n,e,t){const r=pa(n);let s=r.length;if(pa(e).length!==s)return!1;for(;s-- >0;)if(!Mu(n,e,t,r[s]))return!1;return!0}function Hn(n,e,t){const r=fa(n);let s=r.length;if(fa(e).length!==s)return!1;let o,i,l;for(;s-- >0;)if(o=r[s],!Mu(n,e,t,o)||(i=ha(n,o),l=ha(e,o),(i||l)&&(!i||!l||i.configurable!==l.configurable||i.enumerable!==l.enumerable||i.writable!==l.writable)))return!1;return!0}function Dm(n,e){return on(n.valueOf(),e.valueOf())}function Pm(n,e){return n.source===e.source&&n.flags===e.flags}function ga(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.values();let i,l;for(;(i=o.next())&&!i.done;){const a=e.values();let c=!1,u=0;for(;(l=a.next())&&!l.done;){if(!s[u]&&t.equals(i.value,l.value,i.value,l.value,n,e,t)){c=s[u]=!0;break}u++}if(!c)return!1}return!0}function es(n,e){let t=n.byteLength;if(e.byteLength!==t||n.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function Lm(n,e){return n.hostname===e.hostname&&n.pathname===e.pathname&&n.protocol===e.protocol&&n.port===e.port&&n.hash===e.hash&&n.username===e.username&&n.password===e.password}function Mu(n,e,t,r){return(r===Nm||r===Cm||r===Sm)&&(n.$$typeof||e.$$typeof)?!0:wm(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}const $m="[object ArrayBuffer]",_m="[object Arguments]",zm="[object Boolean]",Bm="[object DataView]",Fm="[object Date]",Vm="[object Error]",Hm="[object Map]",Wm="[object Number]",qm="[object Object]",Um="[object RegExp]",Km="[object Set]",Jm="[object String]",Gm={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Ym="[object URL]",Xm=Object.prototype.toString;function Qm({areArrayBuffersEqual:n,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:m}){return function(y,x,b){if(y===x)return!0;if(y==null||x==null)return!1;const v=typeof y;if(v!==typeof x)return!1;if(v!=="object")return v==="number"?l(y,x,b):v==="function"?o(y,x,b):!1;const C=y.constructor;if(C!==x.constructor)return!1;if(C===Object)return a(y,x,b);if(Array.isArray(y))return e(y,x,b);if(C===Date)return r(y,x,b);if(C===RegExp)return u(y,x,b);if(C===Map)return i(y,x,b);if(C===Set)return d(y,x,b);const k=Xm.call(y);if(k===Fm)return r(y,x,b);if(k===Um)return u(y,x,b);if(k===Hm)return i(y,x,b);if(k===Km)return d(y,x,b);if(k===qm)return typeof y.then!="function"&&typeof x.then!="function"&&a(y,x,b);if(k===Ym)return h(y,x,b);if(k===Vm)return s(y,x,b);if(k===_m)return a(y,x,b);if(Gm[k])return f(y,x,b);if(k===$m)return n(y,x,b);if(k===Bm)return t(y,x,b);if(k===zm||k===Wm||k===Jm)return c(y,x,b);if(m){let w=m[k];if(!w){const S=vm(y);S&&(w=m[S])}if(w)return w(y,x,b)}return!1}}function Zm({circular:n,createCustomConfig:e,strict:t}){let r={areArrayBuffersEqual:Em,areArraysEqual:t?Hn:Tm,areDataViewsEqual:Mm,areDatesEqual:Om,areErrorsEqual:Am,areFunctionsEqual:Im,areMapsEqual:t?Do(ma,Hn):ma,areNumbersEqual:jm,areObjectsEqual:t?Hn:Rm,arePrimitiveWrappersEqual:Dm,areRegExpsEqual:Pm,areSetsEqual:t?Do(ga,Hn):ga,areTypedArraysEqual:t?Do(es,Hn):es,areUrlsEqual:Lm,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),n){const s=Ir(r.areArraysEqual),o=Ir(r.areMapsEqual),i=Ir(r.areObjectsEqual),l=Ir(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:i,areSetsEqual:l})}return r}function eg(n){return function(e,t,r,s,o,i,l){return n(e,t,l)}}function tg({circular:n,comparator:e,createState:t,equals:r,strict:s}){if(t)return function(l,a){const{cache:c=n?new WeakMap:void 0,meta:u}=t();return e(l,a,{cache:c,equals:r,meta:u,strict:s})};if(n)return function(l,a){return e(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const o={cache:void 0,equals:r,meta:void 0,strict:s};return function(l,a){return e(l,a,o)}}const ng=_t();_t({strict:!0});_t({circular:!0});_t({circular:!0,strict:!0});_t({createInternalComparator:()=>on});_t({strict:!0,createInternalComparator:()=>on});_t({circular:!0,createInternalComparator:()=>on});_t({circular:!0,createInternalComparator:()=>on,strict:!0});function _t(n={}){const{circular:e=!1,createInternalComparator:t,createState:r,strict:s=!1}=n,o=Zm(n),i=Qm(o),l=t?t(i):eg(i);return tg({circular:e,comparator:i,createState:r,equals:l,strict:s})}function rg(n){const e=P.c(3),{gatewayId:t,onSelect:r}=n,{data:s}=Ip(t);if(s.length===0)return null;let o;return e[0]!==r||e[1]!==s?(o=p.jsx(Rp,{prompts:s,onSelect:r,className:"mt-6"}),e[0]=r,e[1]=s,e[2]=o):o=e[2],o}function sg(n){const e=P.c(20),{form:t}=n;let r;e[0]!==t?(r=d=>{const{field:f}=d;return p.jsx(hg,{size:"md",value:f.value,onChange:f.onChange,alt:t.watch("title")})},e[0]=t,e[1]=r):r=e[1];let s;e[2]!==t.control||e[3]!==r?(s=p.jsx(ct,{control:t.control,name:"avatar",render:r}),e[2]=t.control,e[3]=r,e[4]=s):s=e[4];let o;e[5]!==t.control?(o=p.jsxs("div",{className:"flex flex-col gap-3 flex-1 min-w-0",children:[p.jsx(ct,{control:t.control,name:"title",render:cg}),p.jsx(ct,{control:t.control,name:"description",render:ag})]}),e[5]=t.control,e[6]=o):o=e[6];let i;e[7]!==s||e[8]!==o?(i=p.jsxs("div",{className:"flex gap-4 items-start",children:[s,o]}),e[7]=s,e[8]=o,e[9]=i):i=e[9];let l,a;e[10]!==t.control?(l=p.jsxs("div",{className:"flex gap-4",children:[p.jsx(ct,{control:t.control,name:"gateway_id",render:lg}),p.jsx(ct,{control:t.control,name:"model",render:ig})]}),a=p.jsx(ct,{control:t.control,name:"system_prompt",render:og}),e[10]=t.control,e[11]=l,e[12]=a):(l=e[11],a=e[12]);let c;e[13]!==i||e[14]!==l||e[15]!==a?(c=p.jsxs("div",{className:"h-full py-6 flex flex-col max-w-2xl mx-auto w-full min-w-0 gap-6 overflow-y-auto",children:[i,l,a]}),e[13]=i,e[14]=l,e[15]=a,e[16]=c):c=e[16];let u;return e[17]!==t||e[18]!==c?(u=p.jsx(au,{...t,children:c}),e[17]=t,e[18]=c,e[19]=u):u=e[19],u}function og(n){const{field:e}=n;return p.jsxs($t,{className:"flex-1 flex flex-col min-h-0",children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"System prompt"}),p.jsx(Pn,{children:p.jsx(Zr,{...e,placeholder:"You are a helpful assistant...",className:"flex-1 min-h-[200px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})]})}function ig(n){const{field:e}=n;return p.jsxs($t,{className:"flex-1",children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Model"}),p.jsx(Pp,{selectedModel:e.value?{id:e.value.id,connectionId:e.value.connectionId}:void 0,onModelChange:t=>e.onChange({id:t.id,connectionId:t.connectionId}),placeholder:"Select model",variant:"bordered",className:"w-full"})]})}function lg(n){const{field:e}=n;return p.jsxs($t,{className:"flex-1",children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Gateway"}),p.jsx(lu,{selectedGatewayId:e.value,onGatewayChange:e.onChange,placeholder:"Select gateway",variant:"bordered",className:"w-full"})]})}function ag(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Description"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function cg(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Name"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,placeholder:"Untitled assistant",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function ug(n){const e=P.c(12),{onSubmit:t,onStop:r,isStreaming:s,disabled:o,usageMessages:i}=n,{inputValue:l,handleInputChange:a,handleSubmit:c,branchContext:u}=jp();let d;e[0]!==c||e[1]!==t?(d=m=>c(m,t),e[0]=c,e[1]=t,e[2]=d):d=e[2];const f=u?"Edit your message...":"Ask anything or @ for context";let h;return e[3]!==o||e[4]!==a||e[5]!==l||e[6]!==s||e[7]!==r||e[8]!==d||e[9]!==f||e[10]!==i?(h=p.jsx(mn.Input,{onSubmit:d,onStop:r,disabled:o,isStreaming:s,placeholder:f,usageMessages:i,value:l,onValueChange:a}),e[3]=o,e[4]=a,e[5]=l,e[6]=s,e[7]=r,e[8]=d,e[9]=f,e[10]=i,e[11]=h):h=e[11],h}function dg(n){const e=P.c(77),{activeThreadId:t,setActiveThreadId:r,mode:s,assistant:o,form:i}=n;let l;e[0]!==t||e[1]!==o.system_prompt||e[2]!==r?(l={threadId:t,systemPrompt:o.system_prompt,onThreadChange:r},e[0]=t,e[1]=o.system_prompt,e[2]=r,e[3]=l):l=e[3];const a=Op(l),{inputController:c,branchContext:u,clearBranchContext:d,branchFromMessage:f}=a,h=!!o.gateway_id&&!!o.model?.id&&!!o.model?.connectionId;let m;e[4]!==t||e[5]!==o.gateway_id||e[6]!==o.model||e[7]!==a||e[8]!==d||e[9]!==h?(m=async He=>{if(!h)return;const gt={created_at:new Date().toISOString(),thread_id:t,model:{id:o.model.id,connectionId:o.model.connectionId},gateway:{id:o.gateway_id??""},user:{name:"you"}};await a.sendMessage(He,gt),d()},e[4]=t,e[5]=o.gateway_id,e[6]=o.model,e[7]=a,e[8]=d,e[9]=h,e[10]=m):m=e[10];const g=m;let y;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==r?(y=()=>{u&&(r(u.originalThreadId),d(),c.setValue(""))},e[11]=u,e[12]=d,e[13]=c,e[14]=r,e[15]=y):y=e[15];const x=y;let b;e[16]!==o.avatar||e[17]!==o.title?(b=o.avatar?p.jsx("div",{className:"size-[60px] rounded-[18px] border border-border shrink-0 overflow-hidden",children:p.jsx("img",{src:o.avatar,alt:o.title,className:"h-full w-full object-cover"})}):p.jsx("div",{className:"size-[60px] rounded-[18px] border border-border shrink-0 overflow-hidden bg-muted/20 flex items-center justify-center",children:p.jsx(to,{size:28,className:"text-muted-foreground"})}),e[16]=o.avatar,e[17]=o.title,e[18]=b):b=e[18];let v;e[19]!==o.title?(v=p.jsx("h3",{className:"text-xl font-medium text-foreground",children:o.title}),e[19]=o.title,e[20]=v):v=e[20];let C;e[21]!==o.description?(C=o.description?p.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:o.description}):null,e[21]=o.description,e[22]=C):C=e[22];let k;e[23]!==b||e[24]!==v||e[25]!==C?(k=p.jsxs("div",{className:"flex flex-col items-center gap-4",children:[b,v,C]}),e[23]=b,e[24]=v,e[25]=C,e[26]=k):k=e[26];let w;e[27]!==o.gateway_id||e[28]!==g?(w=o.gateway_id&&p.jsx(ar,{fallback:null,children:p.jsx(N.Suspense,{fallback:p.jsx("div",{className:"flex justify-center mt-6",children:p.jsx(Zt,{size:20,className:"animate-spin text-muted-foreground"})}),children:p.jsx(rg,{gatewayId:o.gateway_id,onSelect:He=>{g(He.description??He.name)}})})}),e[27]=o.gateway_id,e[28]=g,e[29]=w):w=e[29];let S;e[30]!==k||e[31]!==w?(S=p.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-4 text-center",children:[k,w]}),e[30]=k,e[31]=w,e[32]=S):S=e[32];const M=S;let E;e[33]!==a.messages?(E=a.messages.filter(fg),e[33]=a.messages,e[34]=E):E=e[34];const T=E,R=s==="edit",L=R?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none";let B;e[35]!==L?(B=Z("absolute inset-0 px-2 transition-opacity duration-200 ease-out",L),e[35]=L,e[36]=B):B=e[36];let _;e[37]!==i?(_=p.jsx(sg,{form:i}),e[37]=i,e[38]=_):_=e[38];let O;e[39]!==B||e[40]!==_?(O=p.jsx("div",{className:B,children:_}),e[39]=B,e[40]=_,e[41]=O):O=e[41];const A=R?"opacity-0 pointer-events-none":"opacity-100";let D;e[42]!==A?(D=Z("h-full transition-opacity duration-200 ease-out",A),e[42]=A,e[43]=D):D=e[43];let z;e[44]!==f||e[45]!==a.messages||e[46]!==a.status||e[47]!==M||e[48]!==T.length?(z=T.length===0?p.jsx(mn.EmptyState,{children:M}):p.jsx(mn.Messages,{messages:a.messages,status:a.status,minHeightOffset:240,onBranchFromMessage:f}),e[44]=f,e[45]=a.messages,e[46]=a.status,e[47]=M,e[48]=T.length,e[49]=z):z=e[49];let K;e[50]!==D||e[51]!==z?(K=p.jsx("div",{className:D,children:z}),e[50]=D,e[51]=z,e[52]=K):K=e[52];let W;e[53]!==O||e[54]!==K?(W=p.jsxs(mn.Main,{className:"h-full relative overflow-hidden",children:[O,K]}),e[53]=O,e[54]=K,e[55]=W):W=e[55];const H=R?"translate-y-full":"translate-y-0";let q;e[56]!==H?(q=Z("transition-transform duration-300 ease-out",H),e[56]=H,e[57]=q):q=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=p.jsx(Dp,{}),e[58]=X):X=e[58];const J=a.status==="submitted"||a.status==="streaming",Q=!h;let ne;e[59]!==a.messages||e[60]!==a.stop||e[61]!==g||e[62]!==J||e[63]!==Q?(ne=p.jsxs("div",{className:"max-w-2xl mx-auto w-full min-w-0 flex flex-col gap-2",children:[X,p.jsx(ug,{onSubmit:g,onStop:a.stop,isStreaming:J,disabled:Q,usageMessages:a.messages})]}),e[59]=a.messages,e[60]=a.stop,e[61]=g,e[62]=J,e[63]=Q,e[64]=ne):ne=e[64];let me;e[65]!==u||e[66]!==d||e[67]!==x||e[68]!==c||e[69]!==ne?(me=p.jsx(mn.Footer,{children:p.jsx(Ap,{inputController:c,branchContext:u,clearBranchContext:d,onGoToOriginalMessage:x,children:ne})}),e[65]=u,e[66]=d,e[67]=x,e[68]=c,e[69]=ne,e[70]=me):me=e[70];let je;e[71]!==q||e[72]!==me?(je=p.jsx("div",{className:q,children:me}),e[71]=q,e[72]=me,e[73]=je):je=e[73];let mt;return e[74]!==W||e[75]!==je?(mt=p.jsxs(mn,{children:[W,je]}),e[74]=W,e[75]=je,e[76]=mt):mt=e[76],mt}function fg(n){return n.role!=="system"}function hg(n){const e=P.c(18),{value:t,onChange:r,alt:s,size:o}=n,i=o===void 0?"md":o,l=N.useRef(null),a=i==="xs"?"h-6 w-6":i==="sm"?"h-8 w-8":"h-16 w-16",c=i==="xs"?"h-3 w-3":i==="sm"?"h-4 w-4":"h-6 w-6",u=i==="xs"?"h-3 w-3":i==="sm"?"h-3.5 w-3.5":"h-5 w-5";let d;e[0]!==r?(d=w=>{const S=w.target.files?.[0];if(!S)return;const M=new FileReader;M.onloadend=()=>{const E=M.result;r(E)},M.readAsDataURL(S)},e[0]=r,e[1]=d):d=e[1];const f=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{l.current?.click()},e[2]=h):h=e[2];const m=h,g=`relative ${a} shrink-0 cursor-pointer group`;let y;e[3]!==f?(y=p.jsx("input",{type:"file",ref:l,className:"hidden",accept:"image/*",onChange:f}),e[3]=f,e[4]=y):y=e[4];let x;e[5]!==s||e[6]!==c||e[7]!==t?(x=t?p.jsx("img",{src:t,alt:s||"Avatar",className:"w-full h-full object-cover"}):p.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground",children:p.jsx(to,{className:c})}),e[5]=s,e[6]=c,e[7]=t,e[8]=x):x=e[8];const b=`${u} text-white`;let v;e[9]!==b?(v=p.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center rounded-xl",children:p.jsx(Xp,{className:b})}),e[9]=b,e[10]=v):v=e[10];let C;e[11]!==x||e[12]!==v?(C=p.jsxs("div",{className:"h-full w-full rounded-xl border border-border bg-muted/20 overflow-hidden relative",children:[x,v]}),e[11]=x,e[12]=v,e[13]=C):C=e[13];let k;return e[14]!==g||e[15]!==y||e[16]!==C?(k=p.jsxs("div",{className:g,onClick:m,children:[y,C]}),e[14]=g,e[15]=y,e[16]=C,e[17]=k):k=e[17],k}function pg(n){const e=P.c(57),{providerId:t,assistantId:r,onBack:s}=n,i=Ks().location.href,l=Yi();let a;e[0]!==s||e[1]!==l?(a=s??(()=>l.history.back()),e[0]=s,e[1]=l,e[2]=a):a=e[2];const c=a,{locator:u}=Fp();let d;e[3]!==r||e[4]!==u?(d=Bp.assistantChatActiveThread(u,r),e[3]=r,e[4]=u,e[5]=d):d=e[5];const[f,h]=zp(d,mg),m=t||ht;let g;e[6]!==m?(g=Lt(m),e[6]=m,e[7]=g):g=e[7];const y=g,x=tl(t,"ASSISTANT",r,y),b=Gs(t,"ASSISTANT",y),v=b.update.isPending,[C,k]=N.useState(x?.model.id&&x?.gateway_id?"chat":"edit");let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=ip(Jp),e[8]=w):w=e[8];const S=x??void 0;let M;e[9]!==S?(M={resolver:w,values:S},e[9]=S,e[10]=M):M=e[10];const E=ru(M);let T;e[11]!==b.update||e[12]!==r||e[13]!==E?(T=E.handleSubmit(async J=>{const Q=await b.update.mutateAsync({id:r,data:J});E.reset(Q),k("chat")}),e[11]=b.update,e[12]=r,e[13]=E,e[14]=T):T=e[14];const R=T;if(!x){let J;e[15]===Symbol.for("react.memo_cache_sentinel")?(J=p.jsx(ca,{}),e[15]=J):J=e[15];let Q;e[16]===Symbol.for("react.memo_cache_sentinel")?(Q=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Assistant not found",description:"This assistant may have been deleted or you may not have access to it."})}),e[16]=Q):Q=e[16];let ne;return e[17]!==c?(ne=p.jsx(ar,{children:p.jsx(N.Suspense,{fallback:J,children:p.jsx(Nn,{onBack:c,children:Q})})}),e[17]=c,e[18]=ne):ne=e[18],ne}let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L=p.jsx(ca,{}),e[19]=L):L=e[19];let B;e[20]!==x.avatar||e[21]!==x.title?(B=p.jsx("div",{className:"h-6 w-6 min-w-6 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:x.avatar?p.jsx("img",{src:x.avatar,alt:x.title,className:"h-full w-full object-cover"}):p.jsx("div",{className:"h-full w-full flex items-center justify-center text-muted-foreground",children:p.jsx(to,{size:12,className:"text-muted-foreground"})})}),e[20]=x.avatar,e[21]=x.title,e[22]=B):B=e[22];let _;e[23]!==x.title?(_=p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.title}),e[23]=x.title,e[24]=_):_=e[24];let O;e[25]!==x.description?(O=x.description?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),p.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:x.description})]}):null,e[25]=x.description,e[26]=O):O=e[26];let A;e[27]!==_||e[28]!==O?(A=p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[_,O]}),e[27]=_,e[28]=O,e[29]=A):A=e[29];let D;e[30]!==B||e[31]!==A?(D=p.jsx(ol,{children:p.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[B,A]})}),e[30]=B,e[31]=A,e[32]=D):D=e[32];const z=x.avatar??"assistant";let K;e[33]!==x.title||e[34]!==z||e[35]!==i?(K=p.jsx(Xs,{title:x.title,url:i,icon:z}),e[33]=x.title,e[34]=z,e[35]=i,e[36]=K):K=e[36];let W;e[37]!==E.formState.isDirty||e[38]!==v||e[39]!==C||e[40]!==R||e[41]!==h?(W=C==="chat"?p.jsxs(p.Fragment,{children:[p.jsx(Ue,{children:p.jsxs(Ke,{children:[p.jsx(Je,{asChild:!0,children:p.jsx(ue,{type:"button",onClick:()=>h(crypto.randomUUID()),"aria-label":"New thread",variant:"outline",size:"icon",className:"size-7 border border-input",children:p.jsx(sl,{size:16})})}),p.jsx(Ge,{children:"New thread"})]})}),p.jsx(Ue,{children:p.jsxs(Ke,{children:[p.jsx(Je,{asChild:!0,children:p.jsx(ue,{type:"button",onClick:()=>k("edit"),"aria-label":"Edit",variant:"outline",size:"icon",className:"size-7 border border-input",children:p.jsx(Nu,{size:16})})}),p.jsx(Ge,{children:"Edit"})]})})]}):p.jsxs(p.Fragment,{children:[p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:v,onClick:()=>k("chat"),"aria-label":"Cancel",children:p.jsx(Zs,{size:14})})})}),p.jsx(Ge,{side:"bottom",children:"Cancel"})]})}),p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:!E.formState.isDirty||v,onClick:()=>{R()},"aria-label":"Save",children:v?p.jsx(Zt,{size:14,className:"animate-spin"}):p.jsx(eo,{size:14})})})}),p.jsx(Ge,{side:"bottom",children:"Save"})]})})]}),e[37]=E.formState.isDirty,e[38]=v,e[39]=C,e[40]=R,e[41]=h,e[42]=W):W=e[42];let H;e[43]!==K||e[44]!==W?(H=p.jsxs(Qs,{children:[K,W]}),e[43]=K,e[44]=W,e[45]=H):H=e[45];let q;e[46]!==f||e[47]!==x||e[48]!==E||e[49]!==C||e[50]!==h?(q=p.jsx("div",{className:"h-full",children:p.jsx(dg,{activeThreadId:f,setActiveThreadId:h,mode:C,assistant:x,form:E},E.formState.submitCount)}),e[46]=f,e[47]=x,e[48]=E,e[49]=C,e[50]=h,e[51]=q):q=e[51];let X;return e[52]!==c||e[53]!==D||e[54]!==H||e[55]!==q?(X=p.jsx(ar,{children:p.jsx(N.Suspense,{fallback:L,children:p.jsxs(Nn,{onBack:c,children:[D,H,q]})})}),e[52]=c,e[53]=D,e[54]=H,e[55]=q,e[56]=X):X=e[56],X}function mg(n){return n||crypto.randomUUID()}function gg(n){const e=P.c(6),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Rn(s).connectionId??ht;if(!i||i===ht){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Assistant not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==i||e[3]!==t||e[4]!==r?(l=p.jsx(pg,{providerId:i,assistantId:t,onBack:r}),e[2]=i,e[3]=t,e[4]=r,e[5]=l):l=e[5],l}lp({title:jo().min(1),description:jo().nullable(),body:jo()});function Po(n){for(const e of n.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function yg(){const n=window.location.pathname.split("/").filter(Boolean),e=n.findIndex(r=>r==="mcps"),t=e>=0?n[e+1]:void 0;return t?decodeURIComponent(t):void 0}function xg(n){const e=P.c(13),{form:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=p.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=r):r=e[0];let s;e[1]!==t.control?(s=p.jsxs("div",{className:"flex flex-col gap-4",children:[r,p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsx(ct,{control:t.control,name:"title",render:vg}),p.jsx(ct,{control:t.control,name:"description",render:kg})]})]}),e[1]=t.control,e[2]=s):s=e[2];let o,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=p.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=p.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=o,e[4]=i):(o=e[3],i=e[4]);let l;e[5]!==t.control?(l=p.jsxs("div",{className:"flex flex-col gap-2",children:[o,i,p.jsx(ct,{control:t.control,name:"body",render:bg})]}),e[5]=t.control,e[6]=l):l=e[6];let a;e[7]!==s||e[8]!==l?(a=p.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[s,l]}),e[7]=s,e[8]=l,e[9]=a):a=e[9];let c;return e[10]!==t||e[11]!==a?(c=p.jsx(au,{...t,children:a}),e[10]=t,e[11]=a,e[12]=c):c=e[12],c}function bg(n){const{field:e}=n;return p.jsx($t,{children:p.jsx(Pn,{children:p.jsx(Zr,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function kg(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function vg(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function wg(n){const e=P.c(51),{providerId:t,promptId:r,onBack:s}=n,i=Ks().location.href,l=t||ht;let a;e[0]!==l?(a=Lt(l),e[0]=l,e[1]=a):a=e[1];const c=a,u=tl(t,"PROMPT",r,c),d=Gs(t,"PROMPT",c),f=d.update.isPending;let h;e[2]!==u?(h=u?{title:u.title,description:u.description??null,body:Po(u)}:void 0,e[2]=u,e[3]=h):h=e[3];let m;e[4]!==h?(m={values:h},e[4]=h,e[5]=m):m=e[5];const g=ru(m);let y;e[6]!==g||e[7]!==u?(y=()=>{u&&g.reset({title:u.title,description:u.description??null,body:Po(u)})},e[6]=g,e[7]=u,e[8]=y):y=e[8];const x=y;let b;e[9]!==d.update||e[10]!==g||e[11]!==r?(b=g.handleSubmit(async q=>{const X=await d.update.mutateAsync({id:r,data:{title:q.title,description:q.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:q.body}}]}});g.reset({title:X.title,description:X.description??null,body:Po(X)})}),e[9]=d.update,e[10]=g,e[11]=r,e[12]=b):b=e[12];const v=b;if(!u){let q;return e[13]===Symbol.for("react.memo_cache_sentinel")?(q=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[13]=q):q=e[13],q}let C;e[14]!==u.title?(C=p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[14]=u.title,e[15]=C):C=e[15];let k;e[16]!==u.description?(k=u.description?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),p.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[16]=u.description,e[17]=k):k=e[17];let w;e[18]!==C||e[19]!==k?(w=p.jsx(ol,{children:p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[C,k]})}),e[18]=C,e[19]=k,e[20]=w):w=e[20];let S;e[21]!==u.title||e[22]!==i?(S=p.jsx(Xs,{title:u.title,url:i,icon:"description"}),e[21]=u.title,e[22]=i,e[23]=S):S=e[23];const M=!g.formState.isDirty||f;let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=p.jsx(Zs,{size:14}),e[24]=E):E=e[24];let T;e[25]!==x||e[26]!==M?(T=p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:M,onClick:x,"aria-label":"Cancel",children:E})})}),e[25]=x,e[26]=M,e[27]=T):T=e[27];let R;e[28]===Symbol.for("react.memo_cache_sentinel")?(R=p.jsx(Ge,{side:"bottom",children:"Cancel"}),e[28]=R):R=e[28];let L;e[29]!==T?(L=p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[T,R]})}),e[29]=T,e[30]=L):L=e[30];const B=!g.formState.isDirty||f;let _;e[31]!==v?(_=()=>{v()},e[31]=v,e[32]=_):_=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=p.jsx(eo,{size:14}),e[33]=O):O=e[33];let A;e[34]!==B||e[35]!==_?(A=p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:B,onClick:_,"aria-label":"Save",children:O})})}),e[34]=B,e[35]=_,e[36]=A):A=e[36];let D;e[37]===Symbol.for("react.memo_cache_sentinel")?(D=p.jsx(Ge,{side:"bottom",children:"Save"}),e[37]=D):D=e[37];let z;e[38]!==A?(z=p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[A,D]})}),e[38]=A,e[39]=z):z=e[39];let K;e[40]!==S||e[41]!==L||e[42]!==z?(K=p.jsxs(Qs,{children:[S,L,z]}),e[40]=S,e[41]=L,e[42]=z,e[43]=K):K=e[43];let W;e[44]!==g?(W=p.jsx("div",{className:"h-full",children:p.jsx(xg,{form:g})}),e[44]=g,e[45]=W):W=e[45];let H;return e[46]!==s||e[47]!==K||e[48]!==W||e[49]!==w?(H=p.jsxs(Nn,{onBack:s,children:[w,K,W]}),e[46]=s,e[47]=K,e[48]=W,e[49]=w,e[50]=H):H=e[50],H}function Sg(n){const e=P.c(5),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=yg()??ht,e[0]=s):s=e[0];const o=s;if(!o||o===ht){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let i;return e[2]!==t||e[3]!==r?(i=p.jsx(ar,{children:p.jsx(N.Suspense,{fallback:null,children:p.jsx(wg,{providerId:o,promptId:t,onBack:r})})}),e[2]=t,e[3]=r,e[4]=i):i=e[4],i}const Cg=ap("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Ng(n){const e=P.c(10);let t,r,s;e[0]!==n?({className:t,variant:s,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let o;e[4]!==t||e[5]!==s?(o=Z(Cg({variant:s}),t),e[4]=t,e[5]=s,e[6]=o):o=e[6];let i;return e[7]!==r||e[8]!==o?(i=p.jsx("div",{"data-slot":"alert",role:"alert",className:o,...r}),e[7]=r,e[8]=o,e[9]=i):i=e[9],i}function Eg(n){const e=P.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=Z("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=p.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}function Tg(n){const e=P.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=Z("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=p.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}const Mg=n=>n.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Og(n){const e=P.c(13),{toolName:t,connectionId:r,onBack:s}=n,o=`/mcp/${r}`;let i;e[0]!==o?(i=new URL(o,window.location.origin),e[0]=o,e[1]=i):i=e[1];const l=i;let a;e[2]!==r?(a={connectionId:r},e[2]=r,e[3]=a):a=e[3];const c=nm(a);if(!c.isAuthenticated){let f;return e[4]!==c.supportsOAuth||e[5]!==s?(f=p.jsx("div",{className:"flex h-full items-center justify-center",children:c.supportsOAuth?p.jsx(rm,{onAuthenticate:()=>s(),buttonText:"Go back to authenticate"}):p.jsx(sm,{hasReadme:!1})}),e[4]=c.supportsOAuth,e[5]=s,e[6]=f):f=e[6],f}const u=`${r}:${t}`;let d;return e[7]!==r||e[8]!==l||e[9]!==s||e[10]!==u||e[11]!==t?(d=p.jsx(Ag,{toolName:t,connectionId:r,mcpProxyUrl:l,onBack:s},u),e[7]=r,e[8]=l,e[9]=s,e[10]=u,e[11]=t,e[12]=d):d=e[12],d}function Ag({toolName:n,connectionId:e,mcpProxyUrl:t,onBack:r}){const o=Ks().location.href,{replayId:i}=cp({strict:!1}),l=(()=>{if(!i)return null;const A=`replay-${i}`,D=sessionStorage.getItem(A);if(!D)return null;sessionStorage.removeItem(A);try{return JSON.parse(D)}catch{return null}})(),a=(()=>{if(!l)return null;const A={};for(const[D,z]of Object.entries(l))z!==null&&typeof z=="object"?A[D]=JSON.stringify(z,null,2):A[D]=z;return A})(),[c,u]=N.useState(a??{}),[d,f]=N.useState(l?JSON.stringify(l,null,2):"{}"),[h,m]=N.useState(null),[g,y]=N.useState(null),[x,b]=N.useState(!1),[v,C]=N.useState(null),k=nl(e),w=al({url:t.href});N.useEffect(()=>{w.error&&console.error("MCP Error:",w.error)},[w.error]);const S=w.tools?.find(A=>A.name===n),M=S?.inputSchema?.properties,E=M?Object.keys(M):[],T=E.length>0,R={};if(T&&S?.inputSchema?.properties)for(const A of E)R[A]=S.inputSchema.required?.includes(A)?"":void 0;const L=A=>Object.prototype.hasOwnProperty.call(c,A),B=async()=>{b(!0),y(null),m(null),C(null);const A=performance.now(),D=Lt(e);try{const z=T?{...R,...c}:(()=>{const J=d.trim();if(!J)return{};const Q=JSON.parse(J);if(Q&&typeof Q=="object")return Q;throw new Error("Raw JSON input must be an object.")})();T&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([J,Q])=>{if((Q.type==="object"||Q.type==="array")&&typeof z[J]=="string")try{z[J]=JSON.parse(z[J])}catch{}});const K=await D(n,z),W=performance.now(),H=Math.round(W-A);m(K);const q=JSON.stringify(K),X=new TextEncoder().encode(q).length;C({duration:`${H}ms`,bytes:`${X} bytes`,tokens:`~${Math.ceil(X/4)} tokens`,cost:"$0.0000"})}catch(z){const K=z instanceof Error?z.message:String(z);y(K||"Unknown error occurred");const W=performance.now();C({duration:`${Math.round(W-A)}ms`})}finally{b(!1)}},_=(A,D)=>{u(z=>({...z,[A]:D}))},O=()=>{m(null),y(null),C(null)};return p.jsxs(Nn,{onBack:r,children:[p.jsx(Qs,{children:p.jsx(Xs,{title:S?.name??Mg(n),url:o,icon:"build"})}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[p.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:p.jsxs("div",{className:"flex-1 overflow-auto",children:[p.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Ys,{icon:k?.icon||null,name:k?.title||n,size:"sm",className:"shadow-sm shrink-0"}),p.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:n}),p.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.state==="ready"?p.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.state==="connecting"?p.jsx(Zt,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):p.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),p.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.state.replace("_"," ")})]})]}),p.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]})}),p.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:[p.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),p.jsx("div",{className:"space-y-4",children:T&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([A,D])=>p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[A,S.inputSchema?.required?.includes(A)&&p.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),p.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:D.type})]}),D.description&&p.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:D.description}),D.type==="object"||D.type==="array"?p.jsx(Zr,{className:"font-mono text-xs",value:L(A)?c[A]??"":R[A]??"",onChange:z=>_(A,z.target.value),placeholder:`Enter ${A} as JSON...`,rows:3}):p.jsx(Ln,{value:L(A)?c[A]??"":R[A]??"",onChange:z=>_(A,z.target.value),placeholder:`Enter ${A}...`})]},A)):S?.inputSchema&&!T?p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),p.jsx(Zr,{className:"font-mono text-xs min-h-[120px]",value:d,onChange:A=>f(A.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):p.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:p.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),p.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[p.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),v&&p.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Zp,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(xu,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Cu,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&p.jsx("div",{className:"flex items-center gap-1.5",children:p.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]})]}),p.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:p.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[p.jsx(ue,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:B,disabled:x,children:x?p.jsxs(p.Fragment,{children:[p.jsx(Zt,{size:14,className:"animate-spin"}),"Executing..."]}):p.jsxs(p.Fragment,{children:[p.jsx(il,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),p.jsx(Ue,{children:p.jsxs(Ke,{children:[p.jsx(Je,{asChild:!0,children:p.jsx(ue,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:O,disabled:!h&&!g,children:p.jsx(ll,{size:14})})}),p.jsx(Ge,{children:p.jsx("p",{children:"Clear results"})})]})})]})}),g&&p.jsx("div",{className:"px-6 py-4 bg-background",children:p.jsx(Ng,{variant:"destructive",children:p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Qp,{className:"h-4 w-4"}),p.jsx(Eg,{className:"mb-0",children:"Execution Failed"})]}),p.jsx(Tg,{className:"text-xs text-destructive",children:g})]})})}),p.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:h?p.jsxs(p.Fragment,{children:[p.jsx(tm,{jsonString:JSON.stringify(h,null,2),padding:"1.5rem"}),p.jsx(ue,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(h,null,2)),up.success("Copied to clipboard")},children:p.jsx(em,{className:"h-3.5 w-3.5"})})]}):p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[p.jsx(ku,{className:"h-12 w-12 mb-3 opacity-40"}),p.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function Ig(n){const e=P.c(7),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Rn(s).connectionId??ht;if(!nl(i)){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(Zt,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==r||e[5]!==t?(c=p.jsx(N.Suspense,{fallback:a,children:p.jsx(Og,{toolName:t,connectionId:i,onBack:r})}),e[3]=i,e[4]=r,e[5]=t,e[6]=c):c=e[6],c}const ya=n=>{let e;const t=new Set,r=(c,u)=>{const d=typeof c=="function"?c(e):c;if(!Object.is(d,e)){const f=e;e=u??(typeof d!="object"||d===null)?d:Object.assign({},e,d),t.forEach(h=>h(e,f))}},s=()=>e,l={setState:r,getState:s,getInitialState:()=>a,subscribe:c=>(t.add(c),()=>t.delete(c))},a=e=n(r,s,l);return l},ul=(n=>n?ya(n):ya),jg=n=>n;function yi(n,e=jg){const t=ee.useSyncExternalStore(n.subscribe,ee.useCallback(()=>e(n.getState()),[n,e]),ee.useCallback(()=>e(n.getInitialState()),[n,e]));return ee.useDebugValue(t),t}const Rg=n=>{const e=ul(n),t=r=>yi(e,r);return Object.assign(t,e),t},Dg=(n=>Rg);function Ou(n,e){let t;try{t=n()}catch{return}return{getItem:s=>{var o;const i=a=>a===null?null:JSON.parse(a,void 0),l=(o=t.getItem(s))!=null?o:null;return l instanceof Promise?l.then(i):i(l)},setItem:(s,o)=>t.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>t.removeItem(s)}}const xi=n=>e=>{try{const t=n(e);return t instanceof Promise?t:{then(r){return xi(r)(t)},catch(r){return this}}}catch(t){return{then(r){return this},catch(r){return xi(r)(t)}}}},Pg=(n,e)=>(t,r,s)=>{let o={storage:Ou(()=>localStorage),partialize:g=>g,version:0,merge:(g,y)=>({...y,...g}),...e},i=!1;const l=new Set,a=new Set;let c=o.storage;if(!c)return n((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),t(...g)},r,s);const u=()=>{const g=o.partialize({...r()});return c.setItem(o.name,{state:g,version:o.version})},d=s.setState;s.setState=(g,y)=>(d(g,y),u());const f=n((...g)=>(t(...g),u()),r,s);s.getInitialState=()=>f;let h;const m=()=>{var g,y;if(!c)return;i=!1,l.forEach(b=>{var v;return b((v=r())!=null?v:f)});const x=((y=o.onRehydrateStorage)==null?void 0:y.call(o,(g=r())!=null?g:f))||void 0;return xi(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate){const v=o.migrate(b.state,b.version);return v instanceof Promise?v.then(C=>[!0,C]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var v;const[C,k]=b;if(h=o.merge(k,(v=r())!=null?v:f),t(h,!0),C)return u()}).then(()=>{x?.(h,void 0),h=r(),i=!0,a.forEach(b=>b(h))}).catch(b=>{x?.(void 0,b)})};return s.persist={setOptions:g=>{o={...o,...g},g.storage&&(c=g.storage)},clearStorage:()=>{c?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>i,onHydrate:g=>(l.add(g),()=>{l.delete(g)}),onFinishHydration:g=>(a.add(g),()=>{a.delete(g)})},o.skipHydration||m(),h||f},Au=Pg,{useSyncExternalStoreWithSelector:Lg}=dp,$g=n=>n;function _g(n,e=$g,t){const r=Lg(n.subscribe,n.getState,n.getInitialState,e,t);return ee.useDebugValue(r),r}const xa=n=>Symbol.iterator in n,ba=n=>"entries"in n,ka=(n,e)=>{const t=n instanceof Map?n:new Map(n.entries()),r=e instanceof Map?e:new Map(e.entries());if(t.size!==r.size)return!1;for(const[s,o]of t)if(!r.has(s)||!Object.is(o,r.get(s)))return!1;return!0},zg=(n,e)=>{const t=n[Symbol.iterator](),r=e[Symbol.iterator]();let s=t.next(),o=r.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=t.next(),o=r.next()}return!!s.done&&!!o.done};function Bg(n,e){return Object.is(n,e)?!0:typeof n!="object"||n===null||typeof e!="object"||e===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(e)?!1:xa(n)&&xa(e)?ba(n)&&ba(e)?ka(n,e):zg(n,e):ka({entries:()=>Object.entries(n)},{entries:()=>Object.entries(e)})}function Fg(n,e="Output"){if(!n)return`interface ${e} {}`;function t(o){if(!o||typeof o!="object")return"unknown";const i=o.type;if(Array.isArray(i))return i.map(l=>r(l)).join(" | ");switch(i){case"string":return o.enum?o.enum.map(l=>`"${l}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const l=o.items;return l?`${t(l)}[]`:"unknown[]"}case"object":return s(o);default:return o.anyOf?o.anyOf.map(t).join(" | "):o.oneOf?o.oneOf.map(t).join(" | "):o.allOf?o.allOf.map(t).join(" & "):"unknown"}}function r(o){switch(o){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function s(o){const i=o.properties;if(!i)return"Record<string, unknown>";const l=new Set(o.required||[]);return`{
1
+ import{aw as Pt,r as N,c as P,d as Rn,j as p,g as Ks,as as Yi,x as ip,y as ru,v as lp,w as jo,i as ap,b as cp,t as up,F as ee,Q as dp,ax as Ro,ay as su,ai as fp,ah as hp,az as pp,H as Xi,a2 as ou,a5 as mp,B as Dn,E as We,$ as Qi,a6 as gp,z as Js,a3 as yp,Z as Zi,ac as xp,ad as bp,ae as kp,aA as el,aB as vp,a4 as iu,a1 as wp,aC as Sp,L as Cp,aD as Np,aE as Ep}from"./index-BlsDXE23.js";import{U as ht,f as tl,d as Gs,c as Lt,b as nl,I as Ys,u as Tp,n as Mp}from"./use-connection-BGthiOfQ.js";import{d as Op,C as mn,e as Ap,f as Ip,g as jp,I as Rp,B as Dp,n as ca,G as lu,M as Pp,o as Lp,R as ua,m as $p}from"./resizable-CwsfF64n.js";import{E as vr,i as _p}from"./SearchMd-DBw3zp_M.js";import{E as ar}from"./error-boundary-Dd7BgwTJ.js";import{P as Xs}from"./formatDistanceToNow-CNMZ-Ei_.js";import{u as zp,L as Bp}from"./localstorage-keys-BNPDgZQf.js";import{u as Fp,a as Ue,c as Ke,b as Je,T as Ge,i as rl}from"./tooltip-CYopm1Sm.js";import{B as ue,c as Z}from"./button-BM8Ntdfr.js";import{F as ct,a as au,b as $t,c as wr,d as Pn}from"./form-DNdbWanJ.js";import{I as Ln}from"./input-B45bC0Rc.js";import{T as Zr,D as Vp,a as Hp,b as Wp,f as qp,c as Up,d as Kp}from"./dialog-_0iI5rNw.js";import{A as Jp,D as Gp,u as Yp}from"./use-binding-DiGbYyGi.js";import{i as Zt}from"./Loading01-DyCC_wp5.js";import{s as sl}from"./Plus-BoZvN_rT.js";import{i as Xp}from"./Upload01-BYUhUNdK.js";import{b as Nn,a as ol,V as Qs}from"./layout-RDUry3u6.js";import{i as Qp}from"./AlertCircle-D7Y5lb85.js";import{s as Zp}from"./Clock-CbKCY_SW.js";import{a as em}from"./Copy01-B-rLWzst.js";import{i as il,J as tm}from"./json-syntax-highlighter-DO7qBvWL.js";import{s as ll,i as cu}from"./XClose-Dez1KTRy.js";import{u as nm,O as rm,M as sm,F as om,v as im,E as lm}from"./index-CD92JRY8.js";import{u as al}from"./use-mcp-CKeUPEl8.js";import{S as $n}from"./spinner-BIp36cWs.js";import{V as am}from"./view-mode-toggle-D-v785I-.js";import{i as cm}from"./GitBranch01-DKUtbZqA.js";import{a as uu,b as um}from"./use-tool-call-DOhzogS9.js";import"./index-CGy1qJ5Y.js";import{n as dm}from"./Calendar-BIuHCFcF.js";import{b as fm,D as hm,a as pm,d as da,i as mm}from"./dropdown-menu-4Ypgp2xI.js";import{B as fn}from"./badge-ffsmxYLL.js";import{i as du}from"./X-BV7uqO3B.js";import"./CpuChip02-wuCmGgd2.js";import"./select-CG-oLpgX.js";import"./ChevronDown-DNVwrHI3.js";import"./use-mobile-BSF9aYm8.js";import"./use-gateway-B_vZFCo_.js";import"./Terminal-DURJ2Sop.js";import"./connection-card-DMoDmlju.js";import"./card-BWKGhflg.js";import"./LinkExternal01-CwO6S7_R.js";import"./alert-dialog-2c4JlYwD.js";import"./File06-DJfHNtkr.js";import"./InfoCircle-JMKMx9jx.js";import"./use-organization-settings-Xs2e_hDY.js";import"./useQuery-CA4Qsiz4.js";import"./auth-DLdX6AGd.js";import"./ArrowLeft-DLGdR8R3.js";import"./mcp-oauth-BxQJ_sZ7.js";import"./env-vars-editor-DuAsDAtd.js";import"./Trash01-D8NpuzHg.js";import"./Key01-BUYdliq4.js";import"./extract-connection-data-C4wZpmQd.js";import"./registry-utils-ulDDT0d8.js";import"./generate-id-Dyweu44Y.js";import"./index-MYfTA9Ba.js";const fu=Pt("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const hu=Pt("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const gm=Pt("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const ym=Pt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const pu=Pt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const mu=Pt("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const gu=Pt("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const yu=Pt("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),cl=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));cl.displayName="AlertOctagon";const xu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));xu.displayName="Box";const bu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));bu.displayName="ClockFastForward";const ku=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m16 18 6-6-6-6M8 6l-6 6 6 6"}));ku.displayName="Code01";const vu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));vu.displayName="Code02";const wu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M12 17a5 5 0 1 0 10 0 5 5 0 0 0-10 0Zm0 0c0-1.126.372-2.165 1-3V5m-1 12c0 .825.2 1.604.554 2.29-.842.712-2.788 1.21-5.054 1.21-3.038 0-5.5-.895-5.5-2V5m11 0c0 1.105-2.462 2-5.5 2S2 6.105 2 5m11 0c0-1.105-2.462-2-5.5-2S2 3.895 2 5m0 9c0 1.105 2.462 2 5.5 2 2.189 0 4.08-.465 4.965-1.138M13 9.5c0 1.105-2.462 2-5.5 2S2 10.605 2 9.5"}));wu.displayName="CoinsStacked01";const Ur=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Ur.displayName="Columns01";const Su=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Su.displayName="CornerDownRight";const Cu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));Cu.displayName="Database01";const Nu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M11 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 22 5.12 22 6.8 22h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V13M8 16h1.675c.489 0 .733 0 .963-.055.204-.05.4-.13.579-.24.201-.123.374-.296.72-.642L21.5 5.5a2.121 2.121 0 0 0-3-3l-9.563 9.563c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.579c-.055.23-.055.474-.055.963V16Z"}));Nu.displayName="Edit05";const Zs=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M3 9h13.5a4.5 4.5 0 1 1 0 9H12M3 9l4-4M3 9l4 4"}));Zs.displayName="FlipBackward";const Eu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));Eu.displayName="Repeat03";const eo=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M15 8H8.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C7 7.24 7 6.96 7 6.4V3m10 18v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));eo.displayName="Save02";const Tu=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));Tu.displayName="Tool01";const to=({size:n=24,color:e="currentColor",...t})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},N.createElement("path",{d:"M16 3.468a4.5 4.5 0 0 1 0 8.064m2 5.234c1.512.684 2.872 1.799 4 3.234M2 20c1.946-2.477 4.59-4 7.5-4s5.553 1.523 7.5 4M14 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));to.displayName="Users02";const{getOwnPropertyNames:xm,getOwnPropertySymbols:bm}=Object,{hasOwnProperty:km}=Object.prototype;function Do(n,e){return function(r,s,o){return n(r,s,o)&&e(r,s,o)}}function Ir(n){return function(t,r,s){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,s);const{cache:o}=s,i=o.get(t),l=o.get(r);if(i&&l)return i===r&&l===t;o.set(t,r),o.set(r,t);const a=n(t,r,s);return o.delete(t),o.delete(r),a}}function vm(n){return n?.[Symbol.toStringTag]}function fa(n){return xm(n).concat(bm(n))}const wm=Object.hasOwn||((n,e)=>km.call(n,e));function on(n,e){return n===e||!n&&!e&&n!==n&&e!==e}const Sm="__v",Cm="__o",Nm="_owner",{getOwnPropertyDescriptor:ha,keys:pa}=Object;function Em(n,e){return n.byteLength===e.byteLength&&es(new Uint8Array(n),new Uint8Array(e))}function Tm(n,e,t){let r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function Mm(n,e){return n.byteLength===e.byteLength&&es(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Om(n,e){return on(n.getTime(),e.getTime())}function Am(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function Im(n,e){return n===e}function ma(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.entries();let i,l,a=0;for(;(i=o.next())&&!i.done;){const c=e.entries();let u=!1,d=0;for(;(l=c.next())&&!l.done;){if(s[d]){d++;continue}const f=i.value,h=l.value;if(t.equals(f[0],h[0],a,d,n,e,t)&&t.equals(f[1],h[1],f[0],h[0],n,e,t)){u=s[d]=!0;break}d++}if(!u)return!1;a++}return!0}const jm=on;function Rm(n,e,t){const r=pa(n);let s=r.length;if(pa(e).length!==s)return!1;for(;s-- >0;)if(!Mu(n,e,t,r[s]))return!1;return!0}function Hn(n,e,t){const r=fa(n);let s=r.length;if(fa(e).length!==s)return!1;let o,i,l;for(;s-- >0;)if(o=r[s],!Mu(n,e,t,o)||(i=ha(n,o),l=ha(e,o),(i||l)&&(!i||!l||i.configurable!==l.configurable||i.enumerable!==l.enumerable||i.writable!==l.writable)))return!1;return!0}function Dm(n,e){return on(n.valueOf(),e.valueOf())}function Pm(n,e){return n.source===e.source&&n.flags===e.flags}function ga(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=n.values();let i,l;for(;(i=o.next())&&!i.done;){const a=e.values();let c=!1,u=0;for(;(l=a.next())&&!l.done;){if(!s[u]&&t.equals(i.value,l.value,i.value,l.value,n,e,t)){c=s[u]=!0;break}u++}if(!c)return!1}return!0}function es(n,e){let t=n.byteLength;if(e.byteLength!==t||n.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function Lm(n,e){return n.hostname===e.hostname&&n.pathname===e.pathname&&n.protocol===e.protocol&&n.port===e.port&&n.hash===e.hash&&n.username===e.username&&n.password===e.password}function Mu(n,e,t,r){return(r===Nm||r===Cm||r===Sm)&&(n.$$typeof||e.$$typeof)?!0:wm(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}const $m="[object ArrayBuffer]",_m="[object Arguments]",zm="[object Boolean]",Bm="[object DataView]",Fm="[object Date]",Vm="[object Error]",Hm="[object Map]",Wm="[object Number]",qm="[object Object]",Um="[object RegExp]",Km="[object Set]",Jm="[object String]",Gm={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Ym="[object URL]",Xm=Object.prototype.toString;function Qm({areArrayBuffersEqual:n,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:m}){return function(y,x,b){if(y===x)return!0;if(y==null||x==null)return!1;const v=typeof y;if(v!==typeof x)return!1;if(v!=="object")return v==="number"?l(y,x,b):v==="function"?o(y,x,b):!1;const C=y.constructor;if(C!==x.constructor)return!1;if(C===Object)return a(y,x,b);if(Array.isArray(y))return e(y,x,b);if(C===Date)return r(y,x,b);if(C===RegExp)return u(y,x,b);if(C===Map)return i(y,x,b);if(C===Set)return d(y,x,b);const k=Xm.call(y);if(k===Fm)return r(y,x,b);if(k===Um)return u(y,x,b);if(k===Hm)return i(y,x,b);if(k===Km)return d(y,x,b);if(k===qm)return typeof y.then!="function"&&typeof x.then!="function"&&a(y,x,b);if(k===Ym)return h(y,x,b);if(k===Vm)return s(y,x,b);if(k===_m)return a(y,x,b);if(Gm[k])return f(y,x,b);if(k===$m)return n(y,x,b);if(k===Bm)return t(y,x,b);if(k===zm||k===Wm||k===Jm)return c(y,x,b);if(m){let w=m[k];if(!w){const S=vm(y);S&&(w=m[S])}if(w)return w(y,x,b)}return!1}}function Zm({circular:n,createCustomConfig:e,strict:t}){let r={areArrayBuffersEqual:Em,areArraysEqual:t?Hn:Tm,areDataViewsEqual:Mm,areDatesEqual:Om,areErrorsEqual:Am,areFunctionsEqual:Im,areMapsEqual:t?Do(ma,Hn):ma,areNumbersEqual:jm,areObjectsEqual:t?Hn:Rm,arePrimitiveWrappersEqual:Dm,areRegExpsEqual:Pm,areSetsEqual:t?Do(ga,Hn):ga,areTypedArraysEqual:t?Do(es,Hn):es,areUrlsEqual:Lm,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),n){const s=Ir(r.areArraysEqual),o=Ir(r.areMapsEqual),i=Ir(r.areObjectsEqual),l=Ir(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:i,areSetsEqual:l})}return r}function eg(n){return function(e,t,r,s,o,i,l){return n(e,t,l)}}function tg({circular:n,comparator:e,createState:t,equals:r,strict:s}){if(t)return function(l,a){const{cache:c=n?new WeakMap:void 0,meta:u}=t();return e(l,a,{cache:c,equals:r,meta:u,strict:s})};if(n)return function(l,a){return e(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const o={cache:void 0,equals:r,meta:void 0,strict:s};return function(l,a){return e(l,a,o)}}const ng=_t();_t({strict:!0});_t({circular:!0});_t({circular:!0,strict:!0});_t({createInternalComparator:()=>on});_t({strict:!0,createInternalComparator:()=>on});_t({circular:!0,createInternalComparator:()=>on});_t({circular:!0,createInternalComparator:()=>on,strict:!0});function _t(n={}){const{circular:e=!1,createInternalComparator:t,createState:r,strict:s=!1}=n,o=Zm(n),i=Qm(o),l=t?t(i):eg(i);return tg({circular:e,comparator:i,createState:r,equals:l,strict:s})}function rg(n){const e=P.c(3),{gatewayId:t,onSelect:r}=n,{data:s}=Ip(t);if(s.length===0)return null;let o;return e[0]!==r||e[1]!==s?(o=p.jsx(Rp,{prompts:s,onSelect:r,className:"mt-6"}),e[0]=r,e[1]=s,e[2]=o):o=e[2],o}function sg(n){const e=P.c(20),{form:t}=n;let r;e[0]!==t?(r=d=>{const{field:f}=d;return p.jsx(hg,{size:"md",value:f.value,onChange:f.onChange,alt:t.watch("title")})},e[0]=t,e[1]=r):r=e[1];let s;e[2]!==t.control||e[3]!==r?(s=p.jsx(ct,{control:t.control,name:"avatar",render:r}),e[2]=t.control,e[3]=r,e[4]=s):s=e[4];let o;e[5]!==t.control?(o=p.jsxs("div",{className:"flex flex-col gap-3 flex-1 min-w-0",children:[p.jsx(ct,{control:t.control,name:"title",render:cg}),p.jsx(ct,{control:t.control,name:"description",render:ag})]}),e[5]=t.control,e[6]=o):o=e[6];let i;e[7]!==s||e[8]!==o?(i=p.jsxs("div",{className:"flex gap-4 items-start",children:[s,o]}),e[7]=s,e[8]=o,e[9]=i):i=e[9];let l,a;e[10]!==t.control?(l=p.jsxs("div",{className:"flex gap-4",children:[p.jsx(ct,{control:t.control,name:"gateway_id",render:lg}),p.jsx(ct,{control:t.control,name:"model",render:ig})]}),a=p.jsx(ct,{control:t.control,name:"system_prompt",render:og}),e[10]=t.control,e[11]=l,e[12]=a):(l=e[11],a=e[12]);let c;e[13]!==i||e[14]!==l||e[15]!==a?(c=p.jsxs("div",{className:"h-full py-6 flex flex-col max-w-2xl mx-auto w-full min-w-0 gap-6 overflow-y-auto",children:[i,l,a]}),e[13]=i,e[14]=l,e[15]=a,e[16]=c):c=e[16];let u;return e[17]!==t||e[18]!==c?(u=p.jsx(au,{...t,children:c}),e[17]=t,e[18]=c,e[19]=u):u=e[19],u}function og(n){const{field:e}=n;return p.jsxs($t,{className:"flex-1 flex flex-col min-h-0",children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"System prompt"}),p.jsx(Pn,{children:p.jsx(Zr,{...e,placeholder:"You are a helpful assistant...",className:"flex-1 min-h-[200px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})]})}function ig(n){const{field:e}=n;return p.jsxs($t,{className:"flex-1",children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Model"}),p.jsx(Pp,{selectedModel:e.value?{id:e.value.id,connectionId:e.value.connectionId}:void 0,onModelChange:t=>e.onChange({id:t.id,connectionId:t.connectionId}),placeholder:"Select model",variant:"bordered",className:"w-full"})]})}function lg(n){const{field:e}=n;return p.jsxs($t,{className:"flex-1",children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Gateway"}),p.jsx(lu,{selectedGatewayId:e.value,onGatewayChange:e.onChange,placeholder:"Select gateway",variant:"bordered",className:"w-full"})]})}function ag(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Description"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function cg(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx(wr,{className:"text-xs text-muted-foreground",children:"Name"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,placeholder:"Untitled assistant",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function ug(n){const e=P.c(12),{onSubmit:t,onStop:r,isStreaming:s,disabled:o,usageMessages:i}=n,{inputValue:l,handleInputChange:a,handleSubmit:c,branchContext:u}=jp();let d;e[0]!==c||e[1]!==t?(d=m=>c(m,t),e[0]=c,e[1]=t,e[2]=d):d=e[2];const f=u?"Edit your message...":"Ask anything or @ for context";let h;return e[3]!==o||e[4]!==a||e[5]!==l||e[6]!==s||e[7]!==r||e[8]!==d||e[9]!==f||e[10]!==i?(h=p.jsx(mn.Input,{onSubmit:d,onStop:r,disabled:o,isStreaming:s,placeholder:f,usageMessages:i,value:l,onValueChange:a}),e[3]=o,e[4]=a,e[5]=l,e[6]=s,e[7]=r,e[8]=d,e[9]=f,e[10]=i,e[11]=h):h=e[11],h}function dg(n){const e=P.c(77),{activeThreadId:t,setActiveThreadId:r,mode:s,assistant:o,form:i}=n;let l;e[0]!==t||e[1]!==o.system_prompt||e[2]!==r?(l={threadId:t,systemPrompt:o.system_prompt,onThreadChange:r},e[0]=t,e[1]=o.system_prompt,e[2]=r,e[3]=l):l=e[3];const a=Op(l),{inputController:c,branchContext:u,clearBranchContext:d,branchFromMessage:f}=a,h=!!o.gateway_id&&!!o.model?.id&&!!o.model?.connectionId;let m;e[4]!==t||e[5]!==o.gateway_id||e[6]!==o.model||e[7]!==a||e[8]!==d||e[9]!==h?(m=async He=>{if(!h)return;const gt={created_at:new Date().toISOString(),thread_id:t,model:{id:o.model.id,connectionId:o.model.connectionId},gateway:{id:o.gateway_id??""},user:{name:"you"}};await a.sendMessage(He,gt),d()},e[4]=t,e[5]=o.gateway_id,e[6]=o.model,e[7]=a,e[8]=d,e[9]=h,e[10]=m):m=e[10];const g=m;let y;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==r?(y=()=>{u&&(r(u.originalThreadId),d(),c.setValue(""))},e[11]=u,e[12]=d,e[13]=c,e[14]=r,e[15]=y):y=e[15];const x=y;let b;e[16]!==o.avatar||e[17]!==o.title?(b=o.avatar?p.jsx("div",{className:"size-[60px] rounded-[18px] border border-border shrink-0 overflow-hidden",children:p.jsx("img",{src:o.avatar,alt:o.title,className:"h-full w-full object-cover"})}):p.jsx("div",{className:"size-[60px] rounded-[18px] border border-border shrink-0 overflow-hidden bg-muted/20 flex items-center justify-center",children:p.jsx(to,{size:28,className:"text-muted-foreground"})}),e[16]=o.avatar,e[17]=o.title,e[18]=b):b=e[18];let v;e[19]!==o.title?(v=p.jsx("h3",{className:"text-xl font-medium text-foreground",children:o.title}),e[19]=o.title,e[20]=v):v=e[20];let C;e[21]!==o.description?(C=o.description?p.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:o.description}):null,e[21]=o.description,e[22]=C):C=e[22];let k;e[23]!==b||e[24]!==v||e[25]!==C?(k=p.jsxs("div",{className:"flex flex-col items-center gap-4",children:[b,v,C]}),e[23]=b,e[24]=v,e[25]=C,e[26]=k):k=e[26];let w;e[27]!==o.gateway_id||e[28]!==g?(w=o.gateway_id&&p.jsx(ar,{fallback:null,children:p.jsx(N.Suspense,{fallback:p.jsx("div",{className:"flex justify-center mt-6",children:p.jsx(Zt,{size:20,className:"animate-spin text-muted-foreground"})}),children:p.jsx(rg,{gatewayId:o.gateway_id,onSelect:He=>{g(He.description??He.name)}})})}),e[27]=o.gateway_id,e[28]=g,e[29]=w):w=e[29];let S;e[30]!==k||e[31]!==w?(S=p.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-4 text-center",children:[k,w]}),e[30]=k,e[31]=w,e[32]=S):S=e[32];const M=S;let E;e[33]!==a.messages?(E=a.messages.filter(fg),e[33]=a.messages,e[34]=E):E=e[34];const T=E,R=s==="edit",L=R?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none";let B;e[35]!==L?(B=Z("absolute inset-0 px-2 transition-opacity duration-200 ease-out",L),e[35]=L,e[36]=B):B=e[36];let _;e[37]!==i?(_=p.jsx(sg,{form:i}),e[37]=i,e[38]=_):_=e[38];let O;e[39]!==B||e[40]!==_?(O=p.jsx("div",{className:B,children:_}),e[39]=B,e[40]=_,e[41]=O):O=e[41];const A=R?"opacity-0 pointer-events-none":"opacity-100";let D;e[42]!==A?(D=Z("h-full transition-opacity duration-200 ease-out",A),e[42]=A,e[43]=D):D=e[43];let z;e[44]!==f||e[45]!==a.messages||e[46]!==a.status||e[47]!==M||e[48]!==T.length?(z=T.length===0?p.jsx(mn.EmptyState,{children:M}):p.jsx(mn.Messages,{messages:a.messages,status:a.status,minHeightOffset:240,onBranchFromMessage:f}),e[44]=f,e[45]=a.messages,e[46]=a.status,e[47]=M,e[48]=T.length,e[49]=z):z=e[49];let K;e[50]!==D||e[51]!==z?(K=p.jsx("div",{className:D,children:z}),e[50]=D,e[51]=z,e[52]=K):K=e[52];let W;e[53]!==O||e[54]!==K?(W=p.jsxs(mn.Main,{className:"h-full relative overflow-hidden",children:[O,K]}),e[53]=O,e[54]=K,e[55]=W):W=e[55];const H=R?"translate-y-full":"translate-y-0";let q;e[56]!==H?(q=Z("transition-transform duration-300 ease-out",H),e[56]=H,e[57]=q):q=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=p.jsx(Dp,{}),e[58]=X):X=e[58];const J=a.status==="submitted"||a.status==="streaming",Q=!h;let ne;e[59]!==a.messages||e[60]!==a.stop||e[61]!==g||e[62]!==J||e[63]!==Q?(ne=p.jsxs("div",{className:"max-w-2xl mx-auto w-full min-w-0 flex flex-col gap-2",children:[X,p.jsx(ug,{onSubmit:g,onStop:a.stop,isStreaming:J,disabled:Q,usageMessages:a.messages})]}),e[59]=a.messages,e[60]=a.stop,e[61]=g,e[62]=J,e[63]=Q,e[64]=ne):ne=e[64];let me;e[65]!==u||e[66]!==d||e[67]!==x||e[68]!==c||e[69]!==ne?(me=p.jsx(mn.Footer,{children:p.jsx(Ap,{inputController:c,branchContext:u,clearBranchContext:d,onGoToOriginalMessage:x,children:ne})}),e[65]=u,e[66]=d,e[67]=x,e[68]=c,e[69]=ne,e[70]=me):me=e[70];let je;e[71]!==q||e[72]!==me?(je=p.jsx("div",{className:q,children:me}),e[71]=q,e[72]=me,e[73]=je):je=e[73];let mt;return e[74]!==W||e[75]!==je?(mt=p.jsxs(mn,{children:[W,je]}),e[74]=W,e[75]=je,e[76]=mt):mt=e[76],mt}function fg(n){return n.role!=="system"}function hg(n){const e=P.c(18),{value:t,onChange:r,alt:s,size:o}=n,i=o===void 0?"md":o,l=N.useRef(null),a=i==="xs"?"h-6 w-6":i==="sm"?"h-8 w-8":"h-16 w-16",c=i==="xs"?"h-3 w-3":i==="sm"?"h-4 w-4":"h-6 w-6",u=i==="xs"?"h-3 w-3":i==="sm"?"h-3.5 w-3.5":"h-5 w-5";let d;e[0]!==r?(d=w=>{const S=w.target.files?.[0];if(!S)return;const M=new FileReader;M.onloadend=()=>{const E=M.result;r(E)},M.readAsDataURL(S)},e[0]=r,e[1]=d):d=e[1];const f=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{l.current?.click()},e[2]=h):h=e[2];const m=h,g=`relative ${a} shrink-0 cursor-pointer group`;let y;e[3]!==f?(y=p.jsx("input",{type:"file",ref:l,className:"hidden",accept:"image/*",onChange:f}),e[3]=f,e[4]=y):y=e[4];let x;e[5]!==s||e[6]!==c||e[7]!==t?(x=t?p.jsx("img",{src:t,alt:s||"Avatar",className:"w-full h-full object-cover"}):p.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground",children:p.jsx(to,{className:c})}),e[5]=s,e[6]=c,e[7]=t,e[8]=x):x=e[8];const b=`${u} text-white`;let v;e[9]!==b?(v=p.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center rounded-xl",children:p.jsx(Xp,{className:b})}),e[9]=b,e[10]=v):v=e[10];let C;e[11]!==x||e[12]!==v?(C=p.jsxs("div",{className:"h-full w-full rounded-xl border border-border bg-muted/20 overflow-hidden relative",children:[x,v]}),e[11]=x,e[12]=v,e[13]=C):C=e[13];let k;return e[14]!==g||e[15]!==y||e[16]!==C?(k=p.jsxs("div",{className:g,onClick:m,children:[y,C]}),e[14]=g,e[15]=y,e[16]=C,e[17]=k):k=e[17],k}function pg(n){const e=P.c(57),{providerId:t,assistantId:r,onBack:s}=n,i=Ks().location.href,l=Yi();let a;e[0]!==s||e[1]!==l?(a=s??(()=>l.history.back()),e[0]=s,e[1]=l,e[2]=a):a=e[2];const c=a,{locator:u}=Fp();let d;e[3]!==r||e[4]!==u?(d=Bp.assistantChatActiveThread(u,r),e[3]=r,e[4]=u,e[5]=d):d=e[5];const[f,h]=zp(d,mg),m=t||ht;let g;e[6]!==m?(g=Lt(m),e[6]=m,e[7]=g):g=e[7];const y=g,x=tl(t,"ASSISTANT",r,y),b=Gs(t,"ASSISTANT",y),v=b.update.isPending,[C,k]=N.useState(x?.model.id&&x?.gateway_id?"chat":"edit");let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=ip(Jp),e[8]=w):w=e[8];const S=x??void 0;let M;e[9]!==S?(M={resolver:w,values:S},e[9]=S,e[10]=M):M=e[10];const E=ru(M);let T;e[11]!==b.update||e[12]!==r||e[13]!==E?(T=E.handleSubmit(async J=>{const Q=await b.update.mutateAsync({id:r,data:J});E.reset(Q),k("chat")}),e[11]=b.update,e[12]=r,e[13]=E,e[14]=T):T=e[14];const R=T;if(!x){let J;e[15]===Symbol.for("react.memo_cache_sentinel")?(J=p.jsx(ca,{}),e[15]=J):J=e[15];let Q;e[16]===Symbol.for("react.memo_cache_sentinel")?(Q=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Assistant not found",description:"This assistant may have been deleted or you may not have access to it."})}),e[16]=Q):Q=e[16];let ne;return e[17]!==c?(ne=p.jsx(ar,{children:p.jsx(N.Suspense,{fallback:J,children:p.jsx(Nn,{onBack:c,children:Q})})}),e[17]=c,e[18]=ne):ne=e[18],ne}let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L=p.jsx(ca,{}),e[19]=L):L=e[19];let B;e[20]!==x.avatar||e[21]!==x.title?(B=p.jsx("div",{className:"h-6 w-6 min-w-6 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:x.avatar?p.jsx("img",{src:x.avatar,alt:x.title,className:"h-full w-full object-cover"}):p.jsx("div",{className:"h-full w-full flex items-center justify-center text-muted-foreground",children:p.jsx(to,{size:12,className:"text-muted-foreground"})})}),e[20]=x.avatar,e[21]=x.title,e[22]=B):B=e[22];let _;e[23]!==x.title?(_=p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.title}),e[23]=x.title,e[24]=_):_=e[24];let O;e[25]!==x.description?(O=x.description?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),p.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:x.description})]}):null,e[25]=x.description,e[26]=O):O=e[26];let A;e[27]!==_||e[28]!==O?(A=p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[_,O]}),e[27]=_,e[28]=O,e[29]=A):A=e[29];let D;e[30]!==B||e[31]!==A?(D=p.jsx(ol,{children:p.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[B,A]})}),e[30]=B,e[31]=A,e[32]=D):D=e[32];const z=x.avatar??"assistant";let K;e[33]!==x.title||e[34]!==z||e[35]!==i?(K=p.jsx(Xs,{title:x.title,url:i,icon:z}),e[33]=x.title,e[34]=z,e[35]=i,e[36]=K):K=e[36];let W;e[37]!==E.formState.isDirty||e[38]!==v||e[39]!==C||e[40]!==R||e[41]!==h?(W=C==="chat"?p.jsxs(p.Fragment,{children:[p.jsx(Ue,{children:p.jsxs(Ke,{children:[p.jsx(Je,{asChild:!0,children:p.jsx(ue,{type:"button",onClick:()=>h(crypto.randomUUID()),"aria-label":"New thread",variant:"outline",size:"icon",className:"size-7 border border-input",children:p.jsx(sl,{size:16})})}),p.jsx(Ge,{children:"New thread"})]})}),p.jsx(Ue,{children:p.jsxs(Ke,{children:[p.jsx(Je,{asChild:!0,children:p.jsx(ue,{type:"button",onClick:()=>k("edit"),"aria-label":"Edit",variant:"outline",size:"icon",className:"size-7 border border-input",children:p.jsx(Nu,{size:16})})}),p.jsx(Ge,{children:"Edit"})]})})]}):p.jsxs(p.Fragment,{children:[p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:v,onClick:()=>k("chat"),"aria-label":"Cancel",children:p.jsx(Zs,{size:14})})})}),p.jsx(Ge,{side:"bottom",children:"Cancel"})]})}),p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:!E.formState.isDirty||v,onClick:()=>{R()},"aria-label":"Save",children:v?p.jsx(Zt,{size:14,className:"animate-spin"}):p.jsx(eo,{size:14})})})}),p.jsx(Ge,{side:"bottom",children:"Save"})]})})]}),e[37]=E.formState.isDirty,e[38]=v,e[39]=C,e[40]=R,e[41]=h,e[42]=W):W=e[42];let H;e[43]!==K||e[44]!==W?(H=p.jsxs(Qs,{children:[K,W]}),e[43]=K,e[44]=W,e[45]=H):H=e[45];let q;e[46]!==f||e[47]!==x||e[48]!==E||e[49]!==C||e[50]!==h?(q=p.jsx("div",{className:"h-full",children:p.jsx(dg,{activeThreadId:f,setActiveThreadId:h,mode:C,assistant:x,form:E},E.formState.submitCount)}),e[46]=f,e[47]=x,e[48]=E,e[49]=C,e[50]=h,e[51]=q):q=e[51];let X;return e[52]!==c||e[53]!==D||e[54]!==H||e[55]!==q?(X=p.jsx(ar,{children:p.jsx(N.Suspense,{fallback:L,children:p.jsxs(Nn,{onBack:c,children:[D,H,q]})})}),e[52]=c,e[53]=D,e[54]=H,e[55]=q,e[56]=X):X=e[56],X}function mg(n){return n||crypto.randomUUID()}function gg(n){const e=P.c(6),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Rn(s).connectionId??ht;if(!i||i===ht){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Assistant not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==i||e[3]!==t||e[4]!==r?(l=p.jsx(pg,{providerId:i,assistantId:t,onBack:r}),e[2]=i,e[3]=t,e[4]=r,e[5]=l):l=e[5],l}lp({title:jo().min(1),description:jo().nullable(),body:jo()});function Po(n){for(const e of n.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function yg(){const n=window.location.pathname.split("/").filter(Boolean),e=n.findIndex(r=>r==="mcps"),t=e>=0?n[e+1]:void 0;return t?decodeURIComponent(t):void 0}function xg(n){const e=P.c(13),{form:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=p.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=r):r=e[0];let s;e[1]!==t.control?(s=p.jsxs("div",{className:"flex flex-col gap-4",children:[r,p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsx(ct,{control:t.control,name:"title",render:vg}),p.jsx(ct,{control:t.control,name:"description",render:kg})]})]}),e[1]=t.control,e[2]=s):s=e[2];let o,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=p.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=p.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=o,e[4]=i):(o=e[3],i=e[4]);let l;e[5]!==t.control?(l=p.jsxs("div",{className:"flex flex-col gap-2",children:[o,i,p.jsx(ct,{control:t.control,name:"body",render:bg})]}),e[5]=t.control,e[6]=l):l=e[6];let a;e[7]!==s||e[8]!==l?(a=p.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[s,l]}),e[7]=s,e[8]=l,e[9]=a):a=e[9];let c;return e[10]!==t||e[11]!==a?(c=p.jsx(au,{...t,children:a}),e[10]=t,e[11]=a,e[12]=c):c=e[12],c}function bg(n){const{field:e}=n;return p.jsx($t,{children:p.jsx(Pn,{children:p.jsx(Zr,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function kg(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function vg(n){const{field:e}=n;return p.jsxs($t,{children:[p.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),p.jsx(Pn,{children:p.jsx(Ln,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function wg(n){const e=P.c(51),{providerId:t,promptId:r,onBack:s}=n,i=Ks().location.href,l=t||ht;let a;e[0]!==l?(a=Lt(l),e[0]=l,e[1]=a):a=e[1];const c=a,u=tl(t,"PROMPT",r,c),d=Gs(t,"PROMPT",c),f=d.update.isPending;let h;e[2]!==u?(h=u?{title:u.title,description:u.description??null,body:Po(u)}:void 0,e[2]=u,e[3]=h):h=e[3];let m;e[4]!==h?(m={values:h},e[4]=h,e[5]=m):m=e[5];const g=ru(m);let y;e[6]!==g||e[7]!==u?(y=()=>{u&&g.reset({title:u.title,description:u.description??null,body:Po(u)})},e[6]=g,e[7]=u,e[8]=y):y=e[8];const x=y;let b;e[9]!==d.update||e[10]!==g||e[11]!==r?(b=g.handleSubmit(async q=>{const X=await d.update.mutateAsync({id:r,data:{title:q.title,description:q.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:q.body}}]}});g.reset({title:X.title,description:X.description??null,body:Po(X)})}),e[9]=d.update,e[10]=g,e[11]=r,e[12]=b):b=e[12];const v=b;if(!u){let q;return e[13]===Symbol.for("react.memo_cache_sentinel")?(q=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[13]=q):q=e[13],q}let C;e[14]!==u.title?(C=p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[14]=u.title,e[15]=C):C=e[15];let k;e[16]!==u.description?(k=u.description?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),p.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[16]=u.description,e[17]=k):k=e[17];let w;e[18]!==C||e[19]!==k?(w=p.jsx(ol,{children:p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[C,k]})}),e[18]=C,e[19]=k,e[20]=w):w=e[20];let S;e[21]!==u.title||e[22]!==i?(S=p.jsx(Xs,{title:u.title,url:i,icon:"description"}),e[21]=u.title,e[22]=i,e[23]=S):S=e[23];const M=!g.formState.isDirty||f;let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=p.jsx(Zs,{size:14}),e[24]=E):E=e[24];let T;e[25]!==x||e[26]!==M?(T=p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:M,onClick:x,"aria-label":"Cancel",children:E})})}),e[25]=x,e[26]=M,e[27]=T):T=e[27];let R;e[28]===Symbol.for("react.memo_cache_sentinel")?(R=p.jsx(Ge,{side:"bottom",children:"Cancel"}),e[28]=R):R=e[28];let L;e[29]!==T?(L=p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[T,R]})}),e[29]=T,e[30]=L):L=e[30];const B=!g.formState.isDirty||f;let _;e[31]!==v?(_=()=>{v()},e[31]=v,e[32]=_):_=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=p.jsx(eo,{size:14}),e[33]=O):O=e[33];let A;e[34]!==B||e[35]!==_?(A=p.jsx(Je,{asChild:!0,children:p.jsx("span",{className:"inline-block",children:p.jsx(ue,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:B,onClick:_,"aria-label":"Save",children:O})})}),e[34]=B,e[35]=_,e[36]=A):A=e[36];let D;e[37]===Symbol.for("react.memo_cache_sentinel")?(D=p.jsx(Ge,{side:"bottom",children:"Save"}),e[37]=D):D=e[37];let z;e[38]!==A?(z=p.jsx(Ue,{children:p.jsxs(Ke,{delayDuration:0,children:[A,D]})}),e[38]=A,e[39]=z):z=e[39];let K;e[40]!==S||e[41]!==L||e[42]!==z?(K=p.jsxs(Qs,{children:[S,L,z]}),e[40]=S,e[41]=L,e[42]=z,e[43]=K):K=e[43];let W;e[44]!==g?(W=p.jsx("div",{className:"h-full",children:p.jsx(xg,{form:g})}),e[44]=g,e[45]=W):W=e[45];let H;return e[46]!==s||e[47]!==K||e[48]!==W||e[49]!==w?(H=p.jsxs(Nn,{onBack:s,children:[w,K,W]}),e[46]=s,e[47]=K,e[48]=W,e[49]=w,e[50]=H):H=e[50],H}function Sg(n){const e=P.c(5),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=yg()??ht,e[0]=s):s=e[0];const o=s;if(!o||o===ht){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=p.jsx("div",{className:"flex h-full w-full bg-background",children:p.jsx(vr,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let i;return e[2]!==t||e[3]!==r?(i=p.jsx(ar,{children:p.jsx(N.Suspense,{fallback:null,children:p.jsx(wg,{providerId:o,promptId:t,onBack:r})})}),e[2]=t,e[3]=r,e[4]=i):i=e[4],i}const Cg=ap("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Ng(n){const e=P.c(10);let t,r,s;e[0]!==n?({className:t,variant:s,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let o;e[4]!==t||e[5]!==s?(o=Z(Cg({variant:s}),t),e[4]=t,e[5]=s,e[6]=o):o=e[6];let i;return e[7]!==r||e[8]!==o?(i=p.jsx("div",{"data-slot":"alert",role:"alert",className:o,...r}),e[7]=r,e[8]=o,e[9]=i):i=e[9],i}function Eg(n){const e=P.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=Z("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=p.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}function Tg(n){const e=P.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=Z("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=p.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o}const Mg=n=>n.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Og(n){const e=P.c(13),{toolName:t,connectionId:r,onBack:s}=n,o=`/mcp/${r}`;let i;e[0]!==o?(i=new URL(o,window.location.origin),e[0]=o,e[1]=i):i=e[1];const l=i;let a;e[2]!==r?(a={connectionId:r},e[2]=r,e[3]=a):a=e[3];const c=nm(a);if(!c.isAuthenticated){let f;return e[4]!==c.supportsOAuth||e[5]!==s?(f=p.jsx("div",{className:"flex h-full items-center justify-center",children:c.supportsOAuth?p.jsx(rm,{onAuthenticate:()=>s(),buttonText:"Go back to authenticate"}):p.jsx(sm,{hasReadme:!1})}),e[4]=c.supportsOAuth,e[5]=s,e[6]=f):f=e[6],f}const u=`${r}:${t}`;let d;return e[7]!==r||e[8]!==l||e[9]!==s||e[10]!==u||e[11]!==t?(d=p.jsx(Ag,{toolName:t,connectionId:r,mcpProxyUrl:l,onBack:s},u),e[7]=r,e[8]=l,e[9]=s,e[10]=u,e[11]=t,e[12]=d):d=e[12],d}function Ag({toolName:n,connectionId:e,mcpProxyUrl:t,onBack:r}){const o=Ks().location.href,{replayId:i}=cp({strict:!1}),l=(()=>{if(!i)return null;const A=`replay-${i}`,D=sessionStorage.getItem(A);if(!D)return null;sessionStorage.removeItem(A);try{return JSON.parse(D)}catch{return null}})(),a=(()=>{if(!l)return null;const A={};for(const[D,z]of Object.entries(l))z!==null&&typeof z=="object"?A[D]=JSON.stringify(z,null,2):A[D]=z;return A})(),[c,u]=N.useState(a??{}),[d,f]=N.useState(l?JSON.stringify(l,null,2):"{}"),[h,m]=N.useState(null),[g,y]=N.useState(null),[x,b]=N.useState(!1),[v,C]=N.useState(null),k=nl(e),w=al({url:t.href});N.useEffect(()=>{w.error&&console.error("MCP Error:",w.error)},[w.error]);const S=w.tools?.find(A=>A.name===n),M=S?.inputSchema?.properties,E=M?Object.keys(M):[],T=E.length>0,R={};if(T&&S?.inputSchema?.properties)for(const A of E)R[A]=S.inputSchema.required?.includes(A)?"":void 0;const L=A=>Object.prototype.hasOwnProperty.call(c,A),B=async()=>{b(!0),y(null),m(null),C(null);const A=performance.now(),D=Lt(e);try{const z=T?{...R,...c}:(()=>{const J=d.trim();if(!J)return{};const Q=JSON.parse(J);if(Q&&typeof Q=="object")return Q;throw new Error("Raw JSON input must be an object.")})();T&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([J,Q])=>{if((Q.type==="object"||Q.type==="array")&&typeof z[J]=="string")try{z[J]=JSON.parse(z[J])}catch{}});const K=await D(n,z),W=performance.now(),H=Math.round(W-A);m(K);const q=JSON.stringify(K),X=new TextEncoder().encode(q).length;C({duration:`${H}ms`,bytes:`${X} bytes`,tokens:`~${Math.ceil(X/4)} tokens`,cost:"$0.0000"})}catch(z){const K=z instanceof Error?z.message:String(z);y(K||"Unknown error occurred");const W=performance.now();C({duration:`${Math.round(W-A)}ms`})}finally{b(!1)}},_=(A,D)=>{u(z=>({...z,[A]:D}))},O=()=>{m(null),y(null),C(null)};return p.jsxs(Nn,{onBack:r,children:[p.jsx(Qs,{children:p.jsx(Xs,{title:S?.name??Mg(n),url:o,icon:"build"})}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[p.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:p.jsxs("div",{className:"flex-1 overflow-auto",children:[p.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Ys,{icon:k?.icon||null,name:k?.title||n,size:"sm",className:"shadow-sm shrink-0"}),p.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:n}),p.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.state==="ready"?p.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.state==="connecting"?p.jsx(Zt,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):p.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),p.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.state.replace("_"," ")})]})]}),p.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]})}),p.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:[p.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),p.jsx("div",{className:"space-y-4",children:T&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([A,D])=>p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[A,S.inputSchema?.required?.includes(A)&&p.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),p.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:D.type})]}),D.description&&p.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:D.description}),D.type==="object"||D.type==="array"?p.jsx(Zr,{className:"font-mono text-xs",value:L(A)?c[A]??"":R[A]??"",onChange:z=>_(A,z.target.value),placeholder:`Enter ${A} as JSON...`,rows:3}):p.jsx(Ln,{value:L(A)?c[A]??"":R[A]??"",onChange:z=>_(A,z.target.value),placeholder:`Enter ${A}...`})]},A)):S?.inputSchema&&!T?p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),p.jsx(Zr,{className:"font-mono text-xs min-h-[120px]",value:d,onChange:A=>f(A.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):p.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:p.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),p.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[p.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),v&&p.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Zp,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(xu,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Cu,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&p.jsx("div",{className:"flex items-center gap-1.5",children:p.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]})]}),p.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:p.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[p.jsx(ue,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:B,disabled:x,children:x?p.jsxs(p.Fragment,{children:[p.jsx(Zt,{size:14,className:"animate-spin"}),"Executing..."]}):p.jsxs(p.Fragment,{children:[p.jsx(il,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),p.jsx(Ue,{children:p.jsxs(Ke,{children:[p.jsx(Je,{asChild:!0,children:p.jsx(ue,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:O,disabled:!h&&!g,children:p.jsx(ll,{size:14})})}),p.jsx(Ge,{children:p.jsx("p",{children:"Clear results"})})]})})]})}),g&&p.jsx("div",{className:"px-6 py-4 bg-background",children:p.jsx(Ng,{variant:"destructive",children:p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Qp,{className:"h-4 w-4"}),p.jsx(Eg,{className:"mb-0",children:"Execution Failed"})]}),p.jsx(Tg,{className:"text-xs text-destructive",children:g})]})})}),p.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:h?p.jsxs(p.Fragment,{children:[p.jsx(tm,{jsonString:JSON.stringify(h,null,2),padding:"1.5rem"}),p.jsx(ue,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(h,null,2)),up.success("Copied to clipboard")},children:p.jsx(em,{className:"h-3.5 w-3.5"})})]}):p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[p.jsx(ku,{className:"h-12 w-12 mb-3 opacity-40"}),p.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function Ig(n){const e=P.c(7),{itemId:t,onBack:r}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Rn(s).connectionId??ht;if(!nl(i)){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(Zt,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==r||e[5]!==t?(c=p.jsx(N.Suspense,{fallback:a,children:p.jsx(Og,{toolName:t,connectionId:i,onBack:r})}),e[3]=i,e[4]=r,e[5]=t,e[6]=c):c=e[6],c}const ya=n=>{let e;const t=new Set,r=(c,u)=>{const d=typeof c=="function"?c(e):c;if(!Object.is(d,e)){const f=e;e=u??(typeof d!="object"||d===null)?d:Object.assign({},e,d),t.forEach(h=>h(e,f))}},s=()=>e,l={setState:r,getState:s,getInitialState:()=>a,subscribe:c=>(t.add(c),()=>t.delete(c))},a=e=n(r,s,l);return l},ul=(n=>n?ya(n):ya),jg=n=>n;function yi(n,e=jg){const t=ee.useSyncExternalStore(n.subscribe,ee.useCallback(()=>e(n.getState()),[n,e]),ee.useCallback(()=>e(n.getInitialState()),[n,e]));return ee.useDebugValue(t),t}const Rg=n=>{const e=ul(n),t=r=>yi(e,r);return Object.assign(t,e),t},Dg=(n=>Rg);function Ou(n,e){let t;try{t=n()}catch{return}return{getItem:s=>{var o;const i=a=>a===null?null:JSON.parse(a,void 0),l=(o=t.getItem(s))!=null?o:null;return l instanceof Promise?l.then(i):i(l)},setItem:(s,o)=>t.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>t.removeItem(s)}}const xi=n=>e=>{try{const t=n(e);return t instanceof Promise?t:{then(r){return xi(r)(t)},catch(r){return this}}}catch(t){return{then(r){return this},catch(r){return xi(r)(t)}}}},Pg=(n,e)=>(t,r,s)=>{let o={storage:Ou(()=>localStorage),partialize:g=>g,version:0,merge:(g,y)=>({...y,...g}),...e},i=!1;const l=new Set,a=new Set;let c=o.storage;if(!c)return n((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),t(...g)},r,s);const u=()=>{const g=o.partialize({...r()});return c.setItem(o.name,{state:g,version:o.version})},d=s.setState;s.setState=(g,y)=>(d(g,y),u());const f=n((...g)=>(t(...g),u()),r,s);s.getInitialState=()=>f;let h;const m=()=>{var g,y;if(!c)return;i=!1,l.forEach(b=>{var v;return b((v=r())!=null?v:f)});const x=((y=o.onRehydrateStorage)==null?void 0:y.call(o,(g=r())!=null?g:f))||void 0;return xi(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate){const v=o.migrate(b.state,b.version);return v instanceof Promise?v.then(C=>[!0,C]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var v;const[C,k]=b;if(h=o.merge(k,(v=r())!=null?v:f),t(h,!0),C)return u()}).then(()=>{x?.(h,void 0),h=r(),i=!0,a.forEach(b=>b(h))}).catch(b=>{x?.(void 0,b)})};return s.persist={setOptions:g=>{o={...o,...g},g.storage&&(c=g.storage)},clearStorage:()=>{c?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>i,onHydrate:g=>(l.add(g),()=>{l.delete(g)}),onFinishHydration:g=>(a.add(g),()=>{a.delete(g)})},o.skipHydration||m(),h||f},Au=Pg,{useSyncExternalStoreWithSelector:Lg}=dp,$g=n=>n;function _g(n,e=$g,t){const r=Lg(n.subscribe,n.getState,n.getInitialState,e,t);return ee.useDebugValue(r),r}const xa=n=>Symbol.iterator in n,ba=n=>"entries"in n,ka=(n,e)=>{const t=n instanceof Map?n:new Map(n.entries()),r=e instanceof Map?e:new Map(e.entries());if(t.size!==r.size)return!1;for(const[s,o]of t)if(!r.has(s)||!Object.is(o,r.get(s)))return!1;return!0},zg=(n,e)=>{const t=n[Symbol.iterator](),r=e[Symbol.iterator]();let s=t.next(),o=r.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=t.next(),o=r.next()}return!!s.done&&!!o.done};function Bg(n,e){return Object.is(n,e)?!0:typeof n!="object"||n===null||typeof e!="object"||e===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(e)?!1:xa(n)&&xa(e)?ba(n)&&ba(e)?ka(n,e):zg(n,e):ka({entries:()=>Object.entries(n)},{entries:()=>Object.entries(e)})}function Fg(n,e="Output"){if(!n)return`interface ${e} {}`;function t(o){if(!o||typeof o!="object")return"unknown";const i=o.type;if(Array.isArray(i))return i.map(l=>r(l)).join(" | ");switch(i){case"string":return o.enum?o.enum.map(l=>`"${l}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const l=o.items;return l?`${t(l)}[]`:"unknown[]"}case"object":return s(o);default:return o.anyOf?o.anyOf.map(t).join(" | "):o.oneOf?o.oneOf.map(t).join(" | "):o.allOf?o.allOf.map(t).join(" & "):"unknown"}}function r(o){switch(o){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function s(o){const i=o.properties;if(!i)return"Record<string, unknown>";const l=new Set(o.required||[]);return`{
2
2
  ${Object.entries(i).map(([c,u])=>{const d=l.has(c)?"":"?";return`${u.description?` /** ${u.description} */
3
3
  `:""} ${c}${d}: ${t(u)};`}).join(`
4
4
  `)}
@@ -1 +1 @@
1
- import{r as n,c as N,j as s}from"./index-DkE856zJ.js";import{c as C,B as y}from"./button-Dj8ueofv.js";import{d as M,j as z,D as E,c as D,b as S,a as T}from"./dropdown-menu-BUANjhM2.js";import{i as L,a as V,c as B,b as _,T as W}from"./tooltip-CNuF1S13.js";import{V as $}from"./view-mode-toggle-CIqr2uxV.js";const w=({size:t=24,color:e="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M12 5v14m0 0 7-7m-7 7-7-7"}));w.displayName="ArrowDown";const k=({size:t=24,color:e="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));k.displayName="List";const b=({size:t=24,color:e="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));b.displayName="Sliders01";function I(t){const e=N.c(16),{viewMode:r,onViewModeChange:g,sortKey:v,sortDirection:a,onSort:l,sortOptions:c}=t;let d;e[0]!==c?(d=c===void 0?[]:c,e[0]=c,e[1]=d):d=e[1];const m=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(V,{children:s.jsxs(B,{children:[s.jsx(_,{asChild:!0,children:s.jsx(E,{asChild:!0,children:s.jsx(y,{variant:"outline",size:"icon",className:"size-7 border border-input",children:s.jsx(b,{size:16})})})}),s.jsx(W,{children:"Search filters"})]})}),e[2]=h):h=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p={value:"table",icon:s.jsx(k,{})},e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=[p,{value:"cards",icon:s.jsx(D,{})}],e[4]=x):x=e[4];let o;e[5]!==g||e[6]!==r?(o=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx($,{value:r,onValueChange:g,fullWidth:!0,options:x})}),e[5]=g,e[6]=r,e[7]=o):o=e[7];let i;e[8]!==l||e[9]!==a||e[10]!==v||e[11]!==m?(i=m.length>0&&l&&s.jsxs("div",{className:"p-2",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),m.map(f=>{const j=v===f.id;return s.jsx(M,{onClick:()=>l(f.id),className:C("h-8 px-2 py-0 cursor-pointer",j&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[j&&s.jsx(L,{size:16,className:"text-foreground shrink-0"}),!j&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:f.label}),j&&a&&(a==="asc"?s.jsx(z,{size:16,className:"text-foreground shrink-0"}):s.jsx(w,{size:16,className:"text-foreground shrink-0"}))]})},f.id)})]}),e[8]=l,e[9]=a,e[10]=v,e[11]=m,e[12]=i):i=e[12];let u;return e[13]!==o||e[14]!==i?(u=s.jsxs(S,{children:[h,s.jsxs(T,{align:"end",className:"w-[200px] p-0 gap-0",children:[o,i]})]}),e[13]=o,e[14]=i,e[15]=u):u=e[15],u}export{I as C,w as n};
1
+ import{r as n,c as N,j as s}from"./index-BlsDXE23.js";import{c as C,B as y}from"./button-BM8Ntdfr.js";import{d as M,j as z,D as E,c as D,b as S,a as T}from"./dropdown-menu-4Ypgp2xI.js";import{i as L,a as V,c as B,b as _,T as W}from"./tooltip-CYopm1Sm.js";import{V as $}from"./view-mode-toggle-D-v785I-.js";const w=({size:t=24,color:e="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M12 5v14m0 0 7-7m-7 7-7-7"}));w.displayName="ArrowDown";const k=({size:t=24,color:e="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));k.displayName="List";const b=({size:t=24,color:e="currentColor",...r})=>n.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},n.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));b.displayName="Sliders01";function I(t){const e=N.c(16),{viewMode:r,onViewModeChange:g,sortKey:v,sortDirection:a,onSort:l,sortOptions:c}=t;let d;e[0]!==c?(d=c===void 0?[]:c,e[0]=c,e[1]=d):d=e[1];const m=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(V,{children:s.jsxs(B,{children:[s.jsx(_,{asChild:!0,children:s.jsx(E,{asChild:!0,children:s.jsx(y,{variant:"outline",size:"icon",className:"size-7 border border-input",children:s.jsx(b,{size:16})})})}),s.jsx(W,{children:"Search filters"})]})}),e[2]=h):h=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p={value:"table",icon:s.jsx(k,{})},e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=[p,{value:"cards",icon:s.jsx(D,{})}],e[4]=x):x=e[4];let o;e[5]!==g||e[6]!==r?(o=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx($,{value:r,onValueChange:g,fullWidth:!0,options:x})}),e[5]=g,e[6]=r,e[7]=o):o=e[7];let i;e[8]!==l||e[9]!==a||e[10]!==v||e[11]!==m?(i=m.length>0&&l&&s.jsxs("div",{className:"p-2",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),m.map(f=>{const j=v===f.id;return s.jsx(M,{onClick:()=>l(f.id),className:C("h-8 px-2 py-0 cursor-pointer",j&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[j&&s.jsx(L,{size:16,className:"text-foreground shrink-0"}),!j&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:f.label}),j&&a&&(a==="asc"?s.jsx(z,{size:16,className:"text-foreground shrink-0"}):s.jsx(w,{size:16,className:"text-foreground shrink-0"}))]})},f.id)})]}),e[8]=l,e[9]=a,e[10]=v,e[11]=m,e[12]=i):i=e[12];let u;return e[13]!==o||e[14]!==i?(u=s.jsxs(S,{children:[h,s.jsxs(T,{align:"end",className:"w-[200px] p-0 gap-0",children:[o,i]})]}),e[13]=o,e[14]=i,e[15]=u):u=e[15],u}export{I as C,w as n};
@@ -1 +1 @@
1
- import{c as j,j as i}from"./index-DkE856zJ.js";import{C as b}from"./collection-display-button-C193PAy9.js";function g(h){const e=j.c(17),{title:d,viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:n,ctaButton:p}=h;let c;e[0]!==n?(c=n===void 0?[]:n,e[0]=n,e[1]=c):c=e[1];const u=c;let t;e[2]!==d?(t=i.jsx("h1",{className:"text-sm font-medium text-foreground",children:d}),e[2]=d,e[3]=t):t=e[3];let s;e[4]!==x||e[5]!==l||e[6]!==f||e[7]!==m||e[8]!==u||e[9]!==r?(s=r&&l&&i.jsx(b,{viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:u}),e[4]=x,e[5]=l,e[6]=f,e[7]=m,e[8]=u,e[9]=r,e[10]=s):s=e[10];let o;e[11]!==p||e[12]!==s?(o=i.jsxs("div",{className:"flex items-center gap-2",children:[s,p]}),e[11]=p,e[12]=s,e[13]=o):o=e[13];let a;return e[14]!==t||e[15]!==o?(a=i.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:i.jsxs("div",{className:"flex items-center justify-between gap-3 h-12 px-4",children:[t,o]})}),e[14]=t,e[15]=o,e[16]=a):a=e[16],a}export{g as C};
1
+ import{c as j,j as i}from"./index-BlsDXE23.js";import{C as b}from"./collection-display-button-M0ZEYwbq.js";function g(h){const e=j.c(17),{title:d,viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:n,ctaButton:p}=h;let c;e[0]!==n?(c=n===void 0?[]:n,e[0]=n,e[1]=c):c=e[1];const u=c;let t;e[2]!==d?(t=i.jsx("h1",{className:"text-sm font-medium text-foreground",children:d}),e[2]=d,e[3]=t):t=e[3];let s;e[4]!==x||e[5]!==l||e[6]!==f||e[7]!==m||e[8]!==u||e[9]!==r?(s=r&&l&&i.jsx(b,{viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:u}),e[4]=x,e[5]=l,e[6]=f,e[7]=m,e[8]=u,e[9]=r,e[10]=s):s=e[10];let o;e[11]!==p||e[12]!==s?(o=i.jsxs("div",{className:"flex items-center gap-2",children:[s,p]}),e[11]=p,e[12]=s,e[13]=o):o=e[13];let a;return e[14]!==t||e[15]!==o?(a=i.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:i.jsxs("div",{className:"flex items-center justify-between gap-3 h-12 px-4",children:[t,o]})}),e[14]=t,e[15]=o,e[16]=a):a=e[16],a}export{g as C};
@@ -1 +1 @@
1
- import{c as s,j as c}from"./index-DkE856zJ.js";function r(t){const e=s.c(2),{children:l}=t;let o;return e[0]!==l?(o=c.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:l}),e[0]=l,e[1]=o):o=e[1],o}export{r as C};
1
+ import{c as s,j as c}from"./index-BlsDXE23.js";function r(t){const e=s.c(2),{children:l}=t;let o;return e[0]!==l?(o=c.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:l}),e[0]=l,e[1]=o):o=e[1],o}export{r as C};
@@ -1 +1 @@
1
- import{c as x,j as a}from"./index-DkE856zJ.js";import{i as u}from"./SearchMd-CwAqtJqG.js";import{I as b}from"./input-C2Ph-V5_.js";import{c as g}from"./button-Dj8ueofv.js";function w(h){const e=x.c(13),{value:n,onChange:c,placeholder:d,onKeyDown:i,className:m}=h,f=d===void 0?"Search...":d;let t;e[0]!==m?(t=g("shrink-0 w-full border-b border-border h-12",m),e[0]=m,e[1]=t):t=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(u,{size:16,className:"text-muted-foreground shrink-0"}),e[2]=o):o=e[2];let r;e[3]!==c?(r=p=>c(p.target.value),e[3]=c,e[4]=r):r=e[4];let s;e[5]!==i||e[6]!==f||e[7]!==r||e[8]!==n?(s=a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[o,a.jsx(b,{value:n,onChange:r,onKeyDown:i,placeholder:f,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]}),e[5]=i,e[6]=f,e[7]=r,e[8]=n,e[9]=s):s=e[9];let l;return e[10]!==t||e[11]!==s?(l=a.jsx("div",{className:t,children:s}),e[10]=t,e[11]=s,e[12]=l):l=e[12],l}export{w as C};
1
+ import{c as x,j as a}from"./index-BlsDXE23.js";import{i as u}from"./SearchMd-DBw3zp_M.js";import{I as b}from"./input-B45bC0Rc.js";import{c as g}from"./button-BM8Ntdfr.js";function w(h){const e=x.c(13),{value:n,onChange:c,placeholder:d,onKeyDown:i,className:m}=h,f=d===void 0?"Search...":d;let t;e[0]!==m?(t=g("shrink-0 w-full border-b border-border h-12",m),e[0]=m,e[1]=t):t=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(u,{size:16,className:"text-muted-foreground shrink-0"}),e[2]=o):o=e[2];let r;e[3]!==c?(r=p=>c(p.target.value),e[3]=c,e[4]=r):r=e[4];let s;e[5]!==i||e[6]!==f||e[7]!==r||e[8]!==n?(s=a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[o,a.jsx(b,{value:n,onChange:r,onKeyDown:i,placeholder:f,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]}),e[5]=i,e[6]=f,e[7]=r,e[8]=n,e[9]=s):s=e[9];let l;return e[10]!==t||e[11]!==s?(l=a.jsx("div",{className:t,children:s}),e[10]=t,e[11]=s,e[12]=l):l=e[12],l}export{w as C};
@@ -1 +1 @@
1
- import{c as g,j as o}from"./index-DkE856zJ.js";import{c as u}from"./button-Dj8ueofv.js";import{n as T}from"./collection-display-button-C193PAy9.js";import{j as $}from"./dropdown-menu-BUANjhM2.js";function R(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full min-w-0",children:o.jsx("table",{"data-slot":"table",className:l,...s})}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function H(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function L(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function S(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function z(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function D(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function E(a){const e=g.c(29),{columns:t,data:s,sortKey:l,sortDirection:r,onSort:f,onRowClick:c,rowClassName:x}=a;let h;e[0]!==r?(h=function(n,N){return o.jsx("div",{className:"w-4 flex items-center justify-center",children:N&&r&&(r==="asc"?o.jsx($,{size:16,className:"text-muted-foreground transition-colors"}):o.jsx(T,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=r,e[1]=h):h=e[1];const w=h;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=function(n,N){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider";return n===N-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider w-8"),C},e[2]=p):p=e[2];const i=p;let d;if(e[3]!==t||e[4]!==f||e[5]!==w||e[6]!==l){let m;e[8]!==t.length||e[9]!==f||e[10]!==w||e[11]!==l?(m=(n,N)=>{const C=l===n.id;return o.jsx(z,{className:u(i(N,t.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&f?()=>f(n.id):void 0,children:o.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&w(n.id,C)]})},n.id)},e[8]=t.length,e[9]=f,e[10]=w,e[11]=l,e[12]=m):m=e[12],d=t.map(m),e[3]=t,e[4]=f,e[5]=w,e[6]=l,e[7]=d}else d=e[7];let j;e[13]!==d?(j=o.jsx(H,{className:"sticky top-0 z-10 border-b-0 bg-muted/30",children:o.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:d})}),e[13]=d,e[14]=j):j=e[14];let v;if(e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==x){let m;e[20]!==t||e[21]!==c||e[22]!==x?(m=(n,N)=>{const C=x?.(n);return o.jsx(S,{"data-row-index":N,className:u("group/data-row transition-colors border-b-0 hover:bg-accent/50",c?"cursor-pointer":"",C),onClick:c?()=>c(n):void 0,children:t.map(b=>o.jsx(D,{className:u("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:o.jsx("div",{className:u(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(n):b.accessor?b.accessor(n):null})},b.id))},N)},e[20]=t,e[21]=c,e[22]=x,e[23]=m):m=e[23],v=s.map(m),e[15]=t,e[16]=s,e[17]=c,e[18]=x,e[19]=v}else v=e[19];let y;e[24]!==v?(y=o.jsx(L,{children:v}),e[24]=v,e[25]=y):y=e[25];let k;return e[26]!==j||e[27]!==y?(k=o.jsx("div",{className:"w-full bg-background min-w-0",children:o.jsxs(R,{className:"w-full border-collapse",children:[j,y]})}),e[26]=j,e[27]=y,e[28]=k):k=e[28],k}function W(a){const e=g.c(12),{columns:t,data:s,isLoading:l,sortKey:r,sortDirection:f,onSort:c,onRowClick:x,emptyState:h}=a;if(l===void 0?!1:l){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=i):i=e[0],i}if(s.length===0){let i;e[1]!==h?(i=h||o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=h,e[2]=i):i=e[2];let d;return e[3]!==i?(d=o.jsx("div",{className:"flex items-center justify-center h-full",children:i}),e[3]=i,e[4]=d):d=e[4],d}let p;return e[5]!==t||e[6]!==s||e[7]!==x||e[8]!==c||e[9]!==f||e[10]!==r?(p=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(E,{columns:t,data:s,sortKey:r,sortDirection:f,onSort:c,onRowClick:x})}),e[5]=t,e[6]=s,e[7]=x,e[8]=c,e[9]=f,e[10]=r,e[11]=p):p=e[11],p}export{W as C};
1
+ import{c as g,j as o}from"./index-BlsDXE23.js";import{c as u}from"./button-BM8Ntdfr.js";import{n as T}from"./collection-display-button-M0ZEYwbq.js";import{j as $}from"./dropdown-menu-4Ypgp2xI.js";function R(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full min-w-0",children:o.jsx("table",{"data-slot":"table",className:l,...s})}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function H(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function L(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function S(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function z(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function D(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function E(a){const e=g.c(29),{columns:t,data:s,sortKey:l,sortDirection:r,onSort:f,onRowClick:c,rowClassName:x}=a;let h;e[0]!==r?(h=function(n,N){return o.jsx("div",{className:"w-4 flex items-center justify-center",children:N&&r&&(r==="asc"?o.jsx($,{size:16,className:"text-muted-foreground transition-colors"}):o.jsx(T,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=r,e[1]=h):h=e[1];const w=h;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=function(n,N){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider";return n===N-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider w-8"),C},e[2]=p):p=e[2];const i=p;let d;if(e[3]!==t||e[4]!==f||e[5]!==w||e[6]!==l){let m;e[8]!==t.length||e[9]!==f||e[10]!==w||e[11]!==l?(m=(n,N)=>{const C=l===n.id;return o.jsx(z,{className:u(i(N,t.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&f?()=>f(n.id):void 0,children:o.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&w(n.id,C)]})},n.id)},e[8]=t.length,e[9]=f,e[10]=w,e[11]=l,e[12]=m):m=e[12],d=t.map(m),e[3]=t,e[4]=f,e[5]=w,e[6]=l,e[7]=d}else d=e[7];let j;e[13]!==d?(j=o.jsx(H,{className:"sticky top-0 z-10 border-b-0 bg-muted/30",children:o.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:d})}),e[13]=d,e[14]=j):j=e[14];let v;if(e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==x){let m;e[20]!==t||e[21]!==c||e[22]!==x?(m=(n,N)=>{const C=x?.(n);return o.jsx(S,{"data-row-index":N,className:u("group/data-row transition-colors border-b-0 hover:bg-accent/50",c?"cursor-pointer":"",C),onClick:c?()=>c(n):void 0,children:t.map(b=>o.jsx(D,{className:u("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:o.jsx("div",{className:u(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(n):b.accessor?b.accessor(n):null})},b.id))},N)},e[20]=t,e[21]=c,e[22]=x,e[23]=m):m=e[23],v=s.map(m),e[15]=t,e[16]=s,e[17]=c,e[18]=x,e[19]=v}else v=e[19];let y;e[24]!==v?(y=o.jsx(L,{children:v}),e[24]=v,e[25]=y):y=e[25];let k;return e[26]!==j||e[27]!==y?(k=o.jsx("div",{className:"w-full bg-background min-w-0",children:o.jsxs(R,{className:"w-full border-collapse",children:[j,y]})}),e[26]=j,e[27]=y,e[28]=k):k=e[28],k}function W(a){const e=g.c(12),{columns:t,data:s,isLoading:l,sortKey:r,sortDirection:f,onSort:c,onRowClick:x,emptyState:h}=a;if(l===void 0?!1:l){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=i):i=e[0],i}if(s.length===0){let i;e[1]!==h?(i=h||o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=h,e[2]=i):i=e[2];let d;return e[3]!==i?(d=o.jsx("div",{className:"flex items-center justify-center h-full",children:i}),e[3]=i,e[4]=d):d=e[4],d}let p;return e[5]!==t||e[6]!==s||e[7]!==x||e[8]!==c||e[9]!==f||e[10]!==r?(p=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(E,{columns:t,data:s,sortKey:r,sortDirection:f,onSort:c,onRowClick:x})}),e[5]=t,e[6]=s,e[7]=x,e[8]=c,e[9]=f,e[10]=r,e[11]=p):p=e[11],p}export{W as C};
@@ -1 +1 @@
1
- import{c as S,j as s}from"./index-DkE856zJ.js";import{C as _}from"./card-66QSeiOF.js";import{c as j}from"./button-Dj8ueofv.js";import{I as A}from"./use-connection-B9P3V0a0.js";function H(h){const e=S.c(40),{connection:t,onClick:g,headerActions:v,footer:C,className:k,size:R,fallbackIcon:z}=h,b=R===void 0?"md":R,y=b==="sm"?"p-4":"p-6",I=b==="sm"?"text-sm":"text-base",w=b==="sm"?"text-xs":"text-sm",E=g&&"hover:bg-muted/50";let i;e[0]!==k||e[1]!==E?(i=j("cursor-pointer transition-colors group",E,k),e[0]=k,e[1]=E,e[2]=i):i=e[2];let l;e[3]!==y?(l=j("flex flex-col gap-4 relative",y),e[3]=y,e[4]=l):l=e[4];let o;e[5]!==t.icon||e[6]!==t.title||e[7]!==z?(o=s.jsx(A,{icon:t.icon,name:t.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:z}),e[5]=t.icon,e[6]=t.title,e[7]=z,e[8]=o):o=e[8];let n;e[9]!==v?(n=v&&s.jsx("div",{className:j("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:q,children:v}),e[9]=v,e[10]=n):n=e[10];let c;e[11]!==n?(c=s.jsx("div",{className:"relative",children:n}),e[11]=n,e[12]=c):c=e[12];let r;e[13]!==o||e[14]!==c?(r=s.jsxs("div",{className:"flex items-start justify-between",children:[o,c]}),e[13]=o,e[14]=c,e[15]=r):r=e[15];let a;e[16]!==I?(a=j("font-medium text-foreground truncate",I),e[16]=I,e[17]=a):a=e[17];let m;e[18]!==t.title||e[19]!==a?(m=s.jsx("h3",{className:a,children:t.title}),e[18]=t.title,e[19]=a,e[20]=m):m=e[20];let d;e[21]!==w?(d=j("text-muted-foreground line-clamp-2",w),e[21]=w,e[22]=d):d=e[22];const P=t.description||"No description";let f;e[23]!==d||e[24]!==P?(f=s.jsx("p",{className:d,children:P}),e[23]=d,e[24]=P,e[25]=f):f=e[25];let p;e[26]!==m||e[27]!==f?(p=s.jsxs("div",{className:"flex flex-col gap-0",children:[m,f]}),e[26]=m,e[27]=f,e[28]=p):p=e[28];let x;e[29]!==C?(x=C&&s.jsx("div",{onClick:$,children:C}),e[29]=C,e[30]=x):x=e[30];let u;e[31]!==p||e[32]!==x||e[33]!==l||e[34]!==r?(u=s.jsxs("div",{className:l,children:[r,p,x]}),e[31]=p,e[32]=x,e[33]=l,e[34]=r,e[35]=u):u=e[35];let N;return e[36]!==g||e[37]!==u||e[38]!==i?(N=s.jsx(_,{className:i,onClick:g,children:u}),e[36]=g,e[37]=u,e[38]=i,e[39]=N):N=e[39],N}function $(h){return h.stopPropagation()}function q(h){return h.stopPropagation()}export{H as C};
1
+ import{c as S,j as s}from"./index-BlsDXE23.js";import{C as _}from"./card-BWKGhflg.js";import{c as j}from"./button-BM8Ntdfr.js";import{I as A}from"./use-connection-BGthiOfQ.js";function H(h){const e=S.c(40),{connection:t,onClick:g,headerActions:v,footer:C,className:k,size:R,fallbackIcon:z}=h,b=R===void 0?"md":R,y=b==="sm"?"p-4":"p-6",I=b==="sm"?"text-sm":"text-base",w=b==="sm"?"text-xs":"text-sm",E=g&&"hover:bg-muted/50";let i;e[0]!==k||e[1]!==E?(i=j("cursor-pointer transition-colors group",E,k),e[0]=k,e[1]=E,e[2]=i):i=e[2];let l;e[3]!==y?(l=j("flex flex-col gap-4 relative",y),e[3]=y,e[4]=l):l=e[4];let o;e[5]!==t.icon||e[6]!==t.title||e[7]!==z?(o=s.jsx(A,{icon:t.icon,name:t.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:z}),e[5]=t.icon,e[6]=t.title,e[7]=z,e[8]=o):o=e[8];let n;e[9]!==v?(n=v&&s.jsx("div",{className:j("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:q,children:v}),e[9]=v,e[10]=n):n=e[10];let c;e[11]!==n?(c=s.jsx("div",{className:"relative",children:n}),e[11]=n,e[12]=c):c=e[12];let r;e[13]!==o||e[14]!==c?(r=s.jsxs("div",{className:"flex items-start justify-between",children:[o,c]}),e[13]=o,e[14]=c,e[15]=r):r=e[15];let a;e[16]!==I?(a=j("font-medium text-foreground truncate",I),e[16]=I,e[17]=a):a=e[17];let m;e[18]!==t.title||e[19]!==a?(m=s.jsx("h3",{className:a,children:t.title}),e[18]=t.title,e[19]=a,e[20]=m):m=e[20];let d;e[21]!==w?(d=j("text-muted-foreground line-clamp-2",w),e[21]=w,e[22]=d):d=e[22];const P=t.description||"No description";let f;e[23]!==d||e[24]!==P?(f=s.jsx("p",{className:d,children:P}),e[23]=d,e[24]=P,e[25]=f):f=e[25];let p;e[26]!==m||e[27]!==f?(p=s.jsxs("div",{className:"flex flex-col gap-0",children:[m,f]}),e[26]=m,e[27]=f,e[28]=p):p=e[28];let x;e[29]!==C?(x=C&&s.jsx("div",{onClick:$,children:C}),e[29]=C,e[30]=x):x=e[30];let u;e[31]!==p||e[32]!==x||e[33]!==l||e[34]!==r?(u=s.jsxs("div",{className:l,children:[r,p,x]}),e[31]=p,e[32]=x,e[33]=l,e[34]=r,e[35]=u):u=e[35];let N;return e[36]!==g||e[37]!==u||e[38]!==i?(N=s.jsx(_,{className:i,onClick:g,children:u}),e[36]=g,e[37]=u,e[38]=i,e[39]=N):N=e[39],N}function $(h){return h.stopPropagation()}function q(h){return h.stopPropagation()}export{H as C};