@decocms/mesh 1.0.0-alpha.41 → 1.0.0-alpha.42

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 (105) hide show
  1. package/dist/client/assets/{AlertCircle-D6ztaobt.js → AlertCircle-CP-aGRsA.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CjVyVt-H.js → ArrowLeft-wElnUYJ0.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-DgunLZQR.js → CheckCircle-B_WVChj1.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BbXb_40w.js → ChevronDown-133w8HOk.js} +1 -1
  5. package/dist/client/assets/{Clock-YTJnTBDI.js → Clock-DqQ41LIc.js} +1 -1
  6. package/dist/client/assets/{Copy01-CCevdGb6.js → Copy01-BJwDNoQC.js} +1 -1
  7. package/dist/client/assets/{CpuChip02-CTGBZdsr.js → CpuChip02-bWa1f3Y1.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-DWgbGhdO.js → DotsVertical-CYYr09mb.js} +1 -1
  9. package/dist/client/assets/{File06-CRfao4L4.js → File06-Dtn5wW91.js} +1 -1
  10. package/dist/client/assets/{Grid01-S3S2kEug.js → Grid01-DZvMiQMk.js} +1 -1
  11. package/dist/client/assets/{Inbox01-CdZg2SI6.js → Inbox01-CSe7MExo.js} +1 -1
  12. package/dist/client/assets/{InfoCircle-CEqhPApg.js → InfoCircle-D3bW5Omw.js} +1 -1
  13. package/dist/client/assets/{Key01-7zjlT7bl.js → Key01-C1qHez6H.js} +1 -1
  14. package/dist/client/assets/{LinkExternal01-Zdv63NPa.js → LinkExternal01-BWIXuo1e.js} +1 -1
  15. package/dist/client/assets/{Loading01-CNHBx4kI.js → Loading01-CAh3R9sn.js} +1 -1
  16. package/dist/client/assets/{Plus-DfnNWvZl.js → Plus-CYOELvWT.js} +1 -1
  17. package/dist/client/assets/{SearchMd-DBUkNw9d.js → SearchMd-Bq2ogvbg.js} +1 -1
  18. package/dist/client/assets/{Trash01-CC4RWtjd.js → Trash01-KvM_z2HW.js} +1 -1
  19. package/dist/client/assets/{Upload01-ZzW7ToAX.js → Upload01-BP0jqpHq.js} +1 -1
  20. package/dist/client/assets/{X-CmV6VETi.js → X-CafPP_Iv.js} +1 -1
  21. package/dist/client/assets/{XClose-C_Ro2jwa.js → XClose-CqJrzETU.js} +1 -1
  22. package/dist/client/assets/{alert-dialog-DKN25P9n.js → alert-dialog-BUlG7TA4.js} +1 -1
  23. package/dist/client/assets/{auth-y34g-zyR.js → auth-CJSooDCA.js} +1 -1
  24. package/dist/client/assets/{auth-catchall-wEPMHcQu.js → auth-catchall-BjCX5usv.js} +1 -1
  25. package/dist/client/assets/{avatar-D6wdL-4h.js → avatar-Cq0eS4K8.js} +1 -1
  26. package/dist/client/assets/{badge-D5IC8-XQ.js → badge-DwRxIVxi.js} +1 -1
  27. package/dist/client/assets/{button-n-dnBUcs.js → button-DylnVNOq.js} +1 -1
  28. package/dist/client/assets/{card--RtELIXA.js → card-DxJ2CMrY.js} +1 -1
  29. package/dist/client/assets/{checkbox-ByvFrlEw.js → checkbox-DEErbcc0.js} +1 -1
  30. package/dist/client/assets/collection-detail-CrH6CPOn.js +1 -0
  31. package/dist/client/assets/{collection-display-button-BziK2H4v.js → collection-display-button-CvZ8eTT6.js} +1 -1
  32. package/dist/client/assets/{collection-header-AOGSaKJV.js → collection-header-BZWDRhRJ.js} +1 -1
  33. package/dist/client/assets/{collection-page-Dx7W84ZY.js → collection-page-Cy4Url61.js} +1 -1
  34. package/dist/client/assets/{collection-search-D33egpeg.js → collection-search-BEr5-om_.js} +1 -1
  35. package/dist/client/assets/{collection-table-wrapper-BWoWsFFZ.js → collection-table-wrapper-CYIQZiF8.js} +1 -1
  36. package/dist/client/assets/{connection-card-BPbF-94Z.js → connection-card-Cjb0De9E.js} +1 -1
  37. package/dist/client/assets/{connection-detail-CwV1WRCA.js → connection-detail-CtapWDy0.js} +1 -1
  38. package/dist/client/assets/{connections-D2Osqpr9.js → connections-ByAWgP1A.js} +1 -1
  39. package/dist/client/assets/{core-BhcYClLI.js → core-CwMiM80c.js} +1 -1
  40. package/dist/client/assets/{create-organization-dialog-CJOAZXZ4.js → create-organization-dialog-CDHLiEAk.js} +1 -1
  41. package/dist/client/assets/{deco-chat-skeleton-DgwTbso-.js → deco-chat-skeleton-DpvJuUNp.js} +39 -39
  42. package/dist/client/assets/{dialog-Dn--K_0P.js → dialog-DHu5nMEY.js} +1 -1
  43. package/dist/client/assets/{dropdown-menu-DSDzjgEf.js → dropdown-menu-DiYpBa-u.js} +1 -1
  44. package/dist/client/assets/{error-boundary-kZqJcvYt.js → error-boundary-xo0wHpmi.js} +1 -1
  45. package/dist/client/assets/{extract-connection-data-PMNMoMwh.js → extract-connection-data-CuVedqWo.js} +1 -1
  46. package/dist/client/assets/{form-BSFKQpec.js → form-DJrhF5P2.js} +1 -1
  47. package/dist/client/assets/{formatDistanceToNow-Mwdq3o1w.js → formatDistanceToNow-BbvSNUQF.js} +1 -1
  48. package/dist/client/assets/{gateway-detail-DOneoUn2.js → gateway-detail-BOFhJRga.js} +1 -1
  49. package/dist/client/assets/{gateways-CjpiwVjc.js → gateways-EOO6wJEW.js} +1 -1
  50. package/dist/client/assets/{home-M1jCNsQa.js → home-BFuz55uE.js} +1 -1
  51. package/dist/client/assets/index-BwcY8s4g.js +32 -0
  52. package/dist/client/assets/{index-CXP-3IgR.js → index-Dm4arKBM.js} +1 -1
  53. package/dist/client/assets/{index-DDrssUsd.js → index-DrO6_oKQ.js} +3 -3
  54. package/dist/client/assets/index-MyldRbGR.css +1 -0
  55. package/dist/client/assets/{index-Bg7J5oIq.js → index-dUwc3ttQ.js} +1 -1
  56. package/dist/client/assets/{input-8OLj0EZ_.js → input-KnYDv1A5.js} +1 -1
  57. package/dist/client/assets/json-D3Bs6F9t.js +1 -0
  58. package/dist/client/assets/{json-syntax-highlighter-DefdwgI_.js → json-syntax-highlighter-BHL3wK0f.js} +2 -2
  59. package/dist/client/assets/{layout-BlymenNb.js → layout-NjL7irXi.js} +1 -1
  60. package/dist/client/assets/{lazy-highlighter-DB5NDxPR.js → lazy-highlighter-DfXFtweD.js} +1 -1
  61. package/dist/client/assets/{localstorage-keys-CKN9Xi55.js → localstorage-keys-Bla3L5Kn.js} +1 -1
  62. package/dist/client/assets/{login-sBeHDiTP.js → login-DWfPFu6G.js} +1 -1
  63. package/dist/client/assets/{mcp-oauth-2aNbgRyW.js → mcp-oauth-B3voaRxT.js} +1 -1
  64. package/dist/client/assets/{members-6chwwhsu.js → members-zioM9DX4.js} +1 -1
  65. package/dist/client/assets/{monitoring-Cb6EoA-b.js → monitoring-BWq8obqP.js} +1 -1
  66. package/dist/client/assets/{oauth-callback-DAWi3xsa.js → oauth-callback-B4ueERM_.js} +1 -1
  67. package/dist/client/assets/{page-BZMAJRR4.js → page-Clx7_tn2.js} +1 -1
  68. package/dist/client/assets/{popover-CgBSUikh.js → popover-BUiNi8m6.js} +1 -1
  69. package/dist/client/assets/prism-light-CzedzUri.js +1 -0
  70. package/dist/client/assets/{resource-tabs-DfS272DC.js → resource-tabs-yB0ODQBX.js} +1 -1
  71. package/dist/client/assets/{schema-CcHURukQ.js → schema-DS_MXXSd.js} +1 -1
  72. package/dist/client/assets/{select-D032IwwR.js → select-D2oQHnH-.js} +1 -1
  73. package/dist/client/assets/{settings-CdDiUrft.js → settings-CPxuZwVp.js} +1 -1
  74. package/dist/client/assets/shell-layout-BX0g1F2C.js +17 -0
  75. package/dist/client/assets/{spinner-CnnM_4YL.js → spinner-B-LyDgpm.js} +1 -1
  76. package/dist/client/assets/{store-PUlSXJGE.js → store-DpIupuN4.js} +1 -1
  77. package/dist/client/assets/{store-app-detail-C7BmJzlu.js → store-app-detail-Dzqp2haZ.js} +1 -1
  78. package/dist/client/assets/{switch-y8R7z10u.js → switch-ZVXF1B-B.js} +1 -1
  79. package/dist/client/assets/{textarea-BFoLEajE.js → textarea-BYzZCFR4.js} +1 -1
  80. package/dist/client/assets/{tools-list-DoiOjPde.js → tools-list-DX1uzNKs.js} +1 -1
  81. package/dist/client/assets/{tooltip-CScUy2XK.js → tooltip-C9HJ0ESh.js} +1 -1
  82. package/dist/client/assets/{types-xAaKjcGO.js → types-BzJYylI4.js} +1 -1
  83. package/dist/client/assets/{use-binding-Csa06z5J.js → use-binding-zihfVeqz.js} +2 -2
  84. package/dist/client/assets/{use-connection-DrLts5Bh.js → use-connection-PNwxddOO.js} +1 -1
  85. package/dist/client/assets/{use-gateway-D8DNYcSu.js → use-gateway-v9UrwqWL.js} +1 -1
  86. package/dist/client/assets/{use-list-state-XxCjYHe0.js → use-list-state-lBd2usQq.js} +1 -1
  87. package/dist/client/assets/{use-mcp-8IvMYP4j.js → use-mcp-DnENzWav.js} +1 -1
  88. package/dist/client/assets/{use-members-BpQaxhYw.js → use-members-BZ9F4tXm.js} +1 -1
  89. package/dist/client/assets/{use-mobile-D-4KOtW8.js → use-mobile-BZVx-pSu.js} +1 -1
  90. package/dist/client/assets/{use-organization-settings-DFt-PXFE.js → use-organization-settings-D8NOmgEj.js} +1 -1
  91. package/dist/client/assets/use-tool-call-CDsX2AuI.js +1 -0
  92. package/dist/client/assets/useQuery-BeDo1OnH.js +1 -0
  93. package/dist/client/assets/utils-CzqUBWOD.js +1 -0
  94. package/dist/client/assets/{well-known-mcp-DyxrC_Rx.js → well-known-mcp-0xOmKc1Z.js} +1 -1
  95. package/dist/client/index.html +2 -2
  96. package/package.json +1 -1
  97. package/dist/client/assets/collection-detail-CBSvkQ-g.js +0 -1
  98. package/dist/client/assets/index-C_LVkq3-.js +0 -32
  99. package/dist/client/assets/index-DPE8fUfl.css +0 -1
  100. package/dist/client/assets/json-_ojk50i2.js +0 -1
  101. package/dist/client/assets/prism-light-B2_4LIBk.js +0 -1
  102. package/dist/client/assets/shell-layout-BrTksREn.js +0 -17
  103. package/dist/client/assets/use-tool-call-Ega50w5M.js +0 -1
  104. package/dist/client/assets/useQuery-iHOeESxa.js +0 -1
  105. package/dist/client/assets/utils-BNxGaTF3.js +0 -1
@@ -1,17 +0,0 @@
1
- import{r as x,c as C,j as a,e as ss,f as qt,K as Yt,g as ct,a as qe,t as os,R as rs,T as as,D as ls,C as is,P as cs,h as ds,O as us,i as fs,k as ms,l as ps,d as Xt,m as hs,G as xs,U as gs,n as bs,S as Jt,o as vs,p as ys,N as Ss,q as js,s as Qt}from"./index-DDrssUsd.js";import{i as ws,E as Cs}from"./SearchMd-DBUkNw9d.js";import{u as Ns,I as At,n as zs}from"./use-connection-DrLts5Bh.js";import{u as Ge,L as Ye}from"./localstorage-keys-CKN9Xi55.js";import{u as Xe,T as ks,a as _s,b as Is,c as Ps,L as Tt,i as $s,P as Ms,O as Es}from"./tooltip-CScUy2XK.js";import{B as we}from"./button-n-dnBUcs.js";import{c as B}from"./utils-BNxGaTF3.js";import{i as Nt}from"./CpuChip02-CTGBZdsr.js";import{i as Rs}from"./Loading01-CNHBx4kI.js";import{s as As}from"./Plus-DfnNWvZl.js";import{i as at}from"./X-CmV6VETi.js";import{u as Ts,a as Ds,b as Ls,c as Os,d as Hs,C as te,D as Bs,e as Us,f as Gs,g as Vs,h as Ws,i as Fs,j as Ks}from"./deco-chat-skeleton-DgwTbso-.js";import{P as en,a as tn,b as nn}from"./popover-CgBSUikh.js";import{s as Zs}from"./Clock-YTJnTBDI.js";import{s as qs}from"./Trash01-CC4RWtjd.js";import{u as Ys}from"./use-binding-Csa06z5J.js";import{E as _t}from"./error-boundary-kZqJcvYt.js";import{i as Xs}from"./File06-CRfao4L4.js";import{u as Je}from"./use-mobile-D-4KOtW8.js";import{u as sn,a as Js}from"./use-organization-settings-DFt-PXFE.js";import{C as Qs}from"./create-organization-dialog-CJOAZXZ4.js";import{I as eo}from"./input-8OLj0EZ_.js";import{A as Ve}from"./avatar-D6wdL-4h.js";import{c as to}from"./Grid01-S3S2kEug.js";import{D as no,a as so,b as oo,c as ro,d as Dt}from"./dropdown-menu-DSDzjgEf.js";import{a as ao}from"./Copy01-CCevdGb6.js";import{n as Lt}from"./LinkExternal01-Zdv63NPa.js";import{D as on,a as rn,b as an,c as ln,d as cn}from"./dialog-Dn--K_0P.js";import"./useQuery-iHOeESxa.js";import"./textarea-BFoLEajE.js";import"./select-D032IwwR.js";import"./ChevronDown-BbXb_40w.js";import"./use-gateway-D8DNYcSu.js";import"./AlertCircle-D6ztaobt.js";import"./connection-card-BPbF-94Z.js";import"./card--RtELIXA.js";import"./spinner-CnnM_4YL.js";import"./InfoCircle-CEqhPApg.js";import"./auth-y34g-zyR.js";import"./alert-dialog-DKN25P9n.js";import"./form-BSFKQpec.js";const dn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));dn.displayName="BarChart10";const un=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.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 3H6.2c-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 21Z"}));un.displayName="Building02";const fn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));fn.displayName="ChevronSelectorVertical";const mn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));mn.displayName="DotsGrid";const pn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));pn.displayName="Globe01";const hn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));hn.displayName="Home02";const xn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 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 3Z"}));xn.displayName="LayoutRight";const gn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));gn.displayName="LogOut01";const bn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 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.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));bn.displayName="Mail01";const vn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));vn.displayName="MessageChatSquare";const yn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),x.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));yn.displayName="Settings01";const Sn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Sn.displayName="UserCircle";const jn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));jn.displayName="Users01";function It(){const t=C.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Ye.decoChatOpen(),t[0]=e):e=t[0];const[n,s]=Ge(e,lo);let o;return t[1]!==n||t[2]!==s?(o=[n,s],t[1]=n,t[2]=s,t[3]=o):o=t[3],o}function lo(t){return!!(t??!1)}function io(t){const e=C.c(14),{title:n,description:s,avatar:o,avatarNode:r,className:l}=t,i=n===void 0?"Start a conversation":n;let c;e[0]!==l?(c=B("flex flex-col items-center justify-center gap-4 p-8 text-center",l),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==o||e[3]!==r?(d=r||o&&a.jsx("img",{src:o,alt:"Chat avatar",className:"size-[60px] rounded-[18px] border-[1.875px] border-border/10"}),e[2]=o,e[3]=r,e[4]=d):d=e[4];let f;e[5]!==i?(f=i&&a.jsx("h3",{className:"text-xl font-medium text-foreground",children:i}),e[5]=i,e[6]=f):f=e[6];let m;e[7]!==s?(m=s&&a.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:s}),e[7]=s,e[8]=m):m=e[8];let u;return e[9]!==c||e[10]!==d||e[11]!==f||e[12]!==m?(u=a.jsxs("div",{className:c,children:[d,f,m]}),e[9]=c,e[10]=d,e[11]=f,e[12]=m,e[13]=u):u=e[13],u}const wn=()=>crypto.randomUUID(),Cn=x.createContext(null);function co(t){const e=C.c(15),{children:n}=t,{locator:s}=Xe(),o=Ts(),[r,l]=Ge(Ye.threadManagerState(s)+":active-id",uo);let i;e[0]!==l||e[1]!==o?(i=p=>{const v=p?.id||crypto.randomUUID(),b=new Date().toISOString(),g={id:v,title:p?.title||"",created_at:p?.created_at||b,updated_at:p?.updated_at||b,hidden:p?.hidden??!1};return o.insert.mutate(g),l(v),g},e[0]=l,e[1]=o,e[2]=i):i=e[2];const c=i;let d;e[3]!==r||e[4]!==l||e[5]!==o?(d=p=>{o.update.mutate({id:p,updates:{hidden:!0,updated_at:new Date().toISOString()}}),r===p&&l(wn())},e[3]=r,e[4]=l,e[5]=o,e[6]=d):d=e[6];const f=d;let m;e[7]!==r||e[8]!==c||e[9]!==f||e[10]!==l?(m={activeThreadId:r,createThread:c,setActiveThreadId:l,hideThread:f},e[7]=r,e[8]=c,e[9]=f,e[10]=l,e[11]=m):m=e[11];const u=m;let h;return e[12]!==n||e[13]!==u?(h=a.jsx(Cn.Provider,{value:u,children:n}),e[12]=n,e[13]=u,e[14]=h):h=e[14],h}function uo(t){return t||wn()}function fo(){const t=x.useContext(Cn);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function mo(t){const e=new Date(t),s=new Date().getTime()-e.getTime(),o=Math.floor(s/6e4),r=Math.floor(s/36e5);return o<1?"now":o<60?`${o}m`:`${r}h`}function po(t){const e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),s=new Date(n.getTime()-864e5),o=new Date(n.getTime()-7*864e5),r=new Date(n.getTime()-30*864e5),l=[],i=[],c=[],d=[],f=[];for(const u of t){const h=new Date(u.updated_at);h>=n?l.push(u):h>=s?i.push(u):h>=o?c.push(u):h>=r?d.push(u):f.push(u)}const m=[];return l.length>0&&m.push({label:"Today",threads:l,showRelativeTime:!0}),i.length>0&&m.push({label:"Yesterday",threads:i,showRelativeTime:!1}),c.length>0&&m.push({label:"7 days ago",threads:c,showRelativeTime:!1}),d.length>0&&m.push({label:"30 days ago",threads:d,showRelativeTime:!1}),f.length>0&&m.push({label:"Older",threads:f,showRelativeTime:!1}),m}function ho(t){const e=C.c(36),{threads:n,activeThreadId:s,onSelectThread:o,onRemoveThread:r,onOpen:l}=t,[i,c]=x.useState("");let d,f,m,u,h,p,v,b,g;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==o||e[4]!==i||e[5]!==n){const k=i.trim()?n.filter($=>($.title||"New chat").toLowerCase().includes(i.toLowerCase())):n,N=po(k);let j;e[15]!==l?(j=$=>{$?l?.():c("")},e[15]=l,e[16]=j):j=e[16];const O=j;f=en,b=O,e[17]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(tn,{asChild:!0,children:a.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:a.jsx(Zs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=g):g=e[17],d=nn,h="end",p="w-80 p-0";let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=a.jsx(ws,{size:16,className:"text-muted-foreground shrink-0"}),e[18]=E):E=e[18];let A;e[19]===Symbol.for("react.memo_cache_sentinel")?(A=$=>c($.target.value),e[19]=A):A=e[19],e[20]!==i?(v=a.jsx("div",{className:"border-b",children:a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[E,a.jsx("input",{type:"text",placeholder:"Search chats...",value:i,onChange:A,className:"flex-1 border-0 shadow-none focus:outline-none px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[20]=i,e[21]=v):v=e[21],m="max-h-[300px] overflow-y-auto",u=k.length===0?a.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:i.trim()?"No chats found":"No chats yet"}):N.map(($,T)=>a.jsxs("div",{children:[T>0&&a.jsx("div",{className:"border-t mx-3"}),a.jsx("div",{className:"px-3 py-1",children:a.jsx("span",{className:"text-xs font-medium text-muted-foreground tracking-wide",children:$.label})}),$.threads.map(L=>{const K=L.id===s;return a.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${K?"bg-accent/50":""}`,onClick:()=>o(L.id),children:[a.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[a.jsx("span",{className:"text-sm truncate",children:L.title||"New chat"}),a.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:K?"current":$.showRelativeTime?mo(L.updated_at):null})]}),a.jsx("button",{type:"button",onClick:H=>{H.stopPropagation(),r(L.id)},className:"opacity-0 cursor-pointer group/trash group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove chat",children:a.jsx(qs,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},L.id)})]},$.label)),e[0]=s,e[1]=l,e[2]=r,e[3]=o,e[4]=i,e[5]=n,e[6]=d,e[7]=f,e[8]=m,e[9]=u,e[10]=h,e[11]=p,e[12]=v,e[13]=b,e[14]=g}else d=e[6],f=e[7],m=e[8],u=e[9],h=e[10],p=e[11],v=e[12],b=e[13],g=e[14];let S;e[22]!==m||e[23]!==u?(S=a.jsx("div",{className:m,children:u}),e[22]=m,e[23]=u,e[24]=S):S=e[24];let w;e[25]!==d||e[26]!==h||e[27]!==p||e[28]!==v||e[29]!==S?(w=a.jsxs(d,{align:h,className:p,children:[v,S]}),e[25]=d,e[26]=h,e[27]=p,e[28]=v,e[29]=S,e[30]=w):w=e[30];let z;return e[31]!==f||e[32]!==b||e[33]!==g||e[34]!==w?(z=a.jsxs(f,{onOpenChange:b,children:[g,w]}),e[31]=f,e[32]=b,e[33]=g,e[34]=w,e[35]=z):z=e[35],z}function xo(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,n=t.match(e);return n&&n[1]&&n[2]&&n[3]?{connectionId:decodeURIComponent(n[1]),collectionName:decodeURIComponent(n[2]),itemId:decodeURIComponent(n[3])}:{connectionId:null,collectionName:null,itemId:null}}function go(){const t=C.c(2),e=ss();let n;t[0]!==e.location.pathname?(n=xo(e.location.pathname),t[0]=e.location.pathname,t[1]=n):n=t[1];const{connectionId:s,collectionName:o,itemId:r}=n;return`You are an AI assistant running in an MCP Mesh environment.
2
-
3
- ## About MCP Mesh
4
- The Model Context Protocol (MCP) Mesh allows users to connect external MCP servers and expose their capabilities through gateways. Each gateway provides access to a curated set of tools from connected MCP servers.
5
-
6
- ## Important Notes
7
- - All tool calls are logged and audited for security and compliance
8
- - You have access to the tools exposed through the selected gateway
9
- - MCPs may expose resources that users can browse and edit
10
-
11
- ## Current Editing Context
12
- ${s?`- Connection ID: ${s}`:""}
13
- ${o?`- Collection Name: ${o}`:""}
14
- ${r?`- Item ID: ${r}`:""}
15
-
16
- Help the user understand and work with this resource.
17
- `}async function bo(t){const e=`/mcp/gateway/${t}`,n={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const s=await fetch(e,{method:"POST",headers:n,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-chat",version:"1.0.0"}}})});if(!s.ok)return[];if((await s.json()).error)return[];const r=await fetch(e,{method:"POST",headers:n,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!r.ok)return[];const l=await r.json();return l.error?[]:l.result?.prompts||[]}catch{return[]}}function vo(t){const e=C.c(7);let n;e[0]!==t?(n=Yt.gatewayPrompts(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=()=>bo(t),e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o={queryKey:n,queryFn:s,staleTime:6e4,retry:!1},e[4]=n,e[5]=s,e[6]=o):o=e[6],qt(o)}function yo(t){const e=C.c(19),{prompts:n,onSelect:s,className:o}=t;if(n.length===0)return null;let r,l,i,c;if(e[0]!==o||e[1]!==s||e[2]!==n){const m=n.slice(0,4);e[7]!==o?(i=B("flex flex-col gap-3 w-full",o),e[7]=o,e[8]=i):i=e[8],e[9]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Try asking"}),e[9]=c):c=e[9],r="grid grid-cols-1 sm:grid-cols-2 gap-2";let u;e[10]!==s?(u=h=>a.jsxs("button",{type:"button",onClick:()=>s(h),className:B("flex items-start gap-3 p-3 rounded-xl","bg-muted/50 hover:bg-muted transition-colors","text-left cursor-pointer group","border border-transparent hover:border-border"),children:[a.jsx("div",{className:"shrink-0 mt-0.5",children:a.jsx(vn,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),a.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[a.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:h.name.replace(/_/g," ")}),h.description&&a.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:h.description})]})]},h.name),e[10]=s,e[11]=u):u=e[11],l=m.map(u),e[0]=o,e[1]=s,e[2]=n,e[3]=r,e[4]=l,e[5]=i,e[6]=c}else r=e[3],l=e[4],i=e[5],c=e[6];let d;e[12]!==r||e[13]!==l?(d=a.jsx("div",{className:r,children:l}),e[12]=r,e[13]=l,e[14]=d):d=e[14];let f;return e[15]!==i||e[16]!==c||e[17]!==d?(f=a.jsxs("div",{className:i,children:[c,d]}),e[15]=i,e[16]=c,e[17]=d,e[18]=f):f=e[18],f}const So="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function jo(t){const e=C.c(3),{gatewayId:n,onSelect:s}=t,{data:o}=vo(n);if(console.log({prompts:o}),o.length===0)return null;let r;return e[0]!==s||e[1]!==o?(r=a.jsx(yo,{prompts:o,onSelect:s,className:"mt-6"}),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}function wo(){const t=C.c(120),{org:e,locator:n}=Xe(),{slug:s}=e,[,o]=It(),r=ct(),{data:l}=qe.useSession(),i=l?.user,{createThread:c,activeThreadId:d,setActiveThreadId:f,hideThread:m}=fo(),{threads:u,refetch:h}=Ds(),p=Ls(),v=Os(),b=Ns();let g;t[0]!==b?(g={connections:b,binding:"LLMS"},t[0]=b,t[1]=g):g=t[1];const[S]=Ys(g),w=!!S,z=p.length>0,k=w&&z;let N;t[2]!==n?(N=Ye.chatSelectedModel(n),t[2]=n,t[3]=N):N=t[3];const[j,O]=Ge(N,zo),[E,A]=Ge(`${n}:selected-gateway`,No),$=v[0];let T;t[4]!==$||t[5]!==j?(T=j??($?{id:$.id,connectionId:$.connectionId}:null),t[4]=$,t[5]=j,t[6]=T):T=t[6];const L=T,K=p[0]?.id,H=E?.gatewayId??K;let F;if(t[7]!==H||t[8]!==p){let G;t[10]!==H?(G=le=>le.id===H,t[10]=H,t[11]=G):G=t[11],F=p.find(G),t[7]=H,t[8]=p,t[9]=F}else F=t[9];const W=F;let ee;if(t[12]!==L?.connectionId||t[13]!==L?.id||t[14]!==v){let G;t[16]!==L?.connectionId||t[17]!==L?.id?(G=le=>le.id===L?.id&&le.connectionId===L?.connectionId,t[16]=L?.connectionId,t[17]=L?.id,t[18]=G):G=t[18],ee=v.find(G),t[12]=L?.connectionId,t[13]=L?.id,t[14]=v,t[15]=ee}else ee=t[15];const X=ee,ae=go();let q;t[19]!==c?(q=G=>c({id:G.id,title:G.title}),t[19]=c,t[20]=q):q=t[20];let Q;t[21]!==d||t[22]!==ae||t[23]!==q?(Q={threadId:d,systemPrompt:ae,onCreateThread:q},t[21]=d,t[22]=ae,t[23]=q,t[24]=Q):Q=t[24];const y=Hs(Q);let P;t[25]!==d||t[26]!==y||t[27]!==W||t[28]!==X||t[29]!==i?.image||t[30]!==i?.name?(P=async G=>{if(!X){os.error("No model configured");return}const le={created_at:new Date().toISOString(),thread_id:d,model:{id:X.id,connectionId:X.connectionId,provider:X.provider??void 0},gateway:W?{id:W.id}:void 0,user:{avatar:i?.image??void 0,name:i?.name??"you"}};await y.sendMessage(G,le)},t[25]=d,t[26]=y,t[27]=W,t[28]=X,t[29]=i?.image,t[30]=i?.name,t[31]=P):P=t[31];const M=P;let I;t[32]!==O?(I=G=>{O({id:G.id,connectionId:G.connectionId})},t[32]=O,t[33]=I):I=t[33];const _=I;if(!k){let G,le;!w&&!z?(G="Connect your providers",le="Connect an LLM provider and create a gateway to unlock AI-powered features."):w?(G="No gateways configured",le="Create a gateway to expose your MCP tools to the chat."):(G="No model provider connected",le="Connect to a model provider to unlock AI-powered features.");let et;t[34]===Symbol.for("react.memo_cache_sentinel")?(et=a.jsxs(te.Header.Left,{children:[a.jsx("img",{src:So,alt:"deco chat",className:"size-5 rounded"}),a.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),t[34]=et):et=t[34];let Re;t[35]!==o?(Re=()=>o(!1),t[35]=o,t[36]=Re):Re=t[36];let tt;t[37]===Symbol.for("react.memo_cache_sentinel")?(tt=a.jsx(at,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[37]=tt):tt=t[37];let Ae;t[38]!==Re?(Ae=a.jsxs(te.Header,{children:[et,a.jsx(te.Header.Right,{children:a.jsx("button",{type:"button",onClick:Re,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:tt})})]}),t[38]=Re,t[39]=Ae):Ae=t[39];let Te;t[40]!==w||t[41]!==r||t[42]!==s?(Te=()=>r({to:w?"/$org/gateways":"/$org/mcps",params:{org:s},search:w?void 0:{action:"create"}}),t[40]=w,t[41]=r,t[42]=s,t[43]=Te):Te=t[43];const vt=w?"Create gateway":"Add connection";let De;t[44]!==Te||t[45]!==vt?(De=a.jsx(we,{variant:"outline",onClick:Te,children:vt}),t[44]=Te,t[45]=vt,t[46]=De):De=t[46];let Le;t[47]!==le||t[48]!==De||t[49]!==G?(Le=a.jsx(te.Main,{className:"flex flex-col items-center",innerClassName:"max-w-2xl mx-auto w-full min-w-0",children:a.jsx(te.EmptyState,{children:a.jsx(Cs,{title:G,description:le,actions:De})})}),t[47]=le,t[48]=De,t[49]=G,t[50]=Le):Le=t[50];let nt;return t[51]!==Ae||t[52]!==Le?(nt=a.jsxs(te,{children:[Ae,Le]}),t[51]=Ae,t[52]=Le,t[53]=nt):nt=t[53],nt}let R;t[54]!==y.messages?(R=y.messages.filter(Co),t[54]=y.messages,t[55]=R):R=t[55];const U=R,Z=W?.icon,oe=W?.title||"deco chat";let ne;t[56]===Symbol.for("react.memo_cache_sentinel")?(ne=a.jsx(Nt,{size:12}),t[56]=ne):ne=t[56];let V;t[57]!==Z||t[58]!==oe?(V=a.jsx(At,{icon:Z,name:oe,size:"xs",fallbackIcon:ne}),t[57]=Z,t[58]=oe,t[59]=V):V=t[59];const se=W?.title||"deco chat";let ce;t[60]!==se?(ce=a.jsx("span",{className:"text-sm font-medium",children:se}),t[60]=se,t[61]=ce):ce=t[61];let ue;t[62]!==V||t[63]!==ce?(ue=a.jsxs(te.Header.Left,{children:[V,ce]}),t[62]=V,t[63]=ce,t[64]=ue):ue=t[64];let me;t[65]!==c?(me=()=>c(),t[65]=c,t[66]=me):me=t[66];let J;t[67]===Symbol.for("react.memo_cache_sentinel")?(J=a.jsx(As,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[67]=J):J=t[67];let pe;t[68]!==me?(pe=a.jsx("button",{type:"button",onClick:me,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:J}),t[68]=me,t[69]=pe):pe=t[69];let ge;t[70]!==h?(ge=()=>h(),t[70]=h,t[71]=ge):ge=t[71];let de;t[72]!==d||t[73]!==m||t[74]!==f||t[75]!==ge||t[76]!==u?(de=a.jsx(ho,{threads:u,activeThreadId:d,onSelectThread:f,onRemoveThread:m,onOpen:ge}),t[72]=d,t[73]=m,t[74]=f,t[75]=ge,t[76]=u,t[77]=de):de=t[77];let he;t[78]!==o?(he=()=>o(!1),t[78]=o,t[79]=he):he=t[79];let Ne;t[80]===Symbol.for("react.memo_cache_sentinel")?(Ne=a.jsx(at,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[80]=Ne):Ne=t[80];let ze;t[81]!==he?(ze=a.jsx("button",{type:"button",onClick:he,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:Ne}),t[81]=he,t[82]=ze):ze=t[82];let ke;t[83]!==pe||t[84]!==de||t[85]!==ze?(ke=a.jsxs(te.Header.Right,{children:[pe,de,ze]}),t[83]=pe,t[84]=de,t[85]=ze,t[86]=ke):ke=t[86];let _e;t[87]!==ue||t[88]!==ke?(_e=a.jsxs(te.Header,{children:[ue,ke]}),t[87]=ue,t[88]=ke,t[89]=_e):_e=t[89];let Ie;t[90]!==y.messages||t[91]!==y.status||t[92]!==H||t[93]!==M||t[94]!==U.length||t[95]!==W?.description||t[96]!==W?.icon||t[97]!==W?.title?(Ie=a.jsx(te.Main,{innerClassName:"max-w-2xl mx-auto w-full min-w-0",children:U.length===0?a.jsx(te.EmptyState,{children:a.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-md px-4",children:[a.jsx(io,{title:W?.title||"Ask deco chat",description:W?.description??"Ask anything about configuring model providers or using MCP Mesh.",avatarNode:a.jsx(At,{icon:W?.icon,name:W?.title||"deco chat",size:"lg",fallbackIcon:a.jsx(Nt,{size:32}),className:"size-[60px]! rounded-[18px]!"})}),H&&a.jsx(_t,{fallback:null,children:a.jsx(x.Suspense,{fallback:a.jsx("div",{className:"flex justify-center",children:a.jsx(Rs,{size:20,className:"animate-spin text-muted-foreground"})}),children:a.jsx(jo,{gatewayId:H,onSelect:G=>{M(G.description??G.name)}})})},H)]})}):a.jsx(te.Messages,{messages:y.messages,status:y.status,minHeightOffset:240})}),t[90]=y.messages,t[91]=y.status,t[92]=H,t[93]=M,t[94]=U.length,t[95]=W?.description,t[96]=W?.icon,t[97]=W?.title,t[98]=Ie):Ie=t[98];const ht=v.length===0||!L,xt=y.status==="submitted"||y.status==="streaming",gt=v.length===0?"Add an LLM binding connection to start chatting":"Ask anything or @ for context";let Pe;t[99]!==A?(Pe=G=>{G&&A({gatewayId:G})},t[99]=A,t[100]=Pe):Pe=t[100];let $e;t[101]!==H||t[102]!==Pe?($e=a.jsx(te.Input.GatewaySelector,{disabled:!1,selectedGatewayId:H,onGatewayChange:Pe}),t[101]=H,t[102]=Pe,t[103]=$e):$e=t[103];const bt=L??void 0;let Me;t[104]!==_||t[105]!==bt?(Me=a.jsx(te.Input.ModelSelector,{disabled:!1,selectedModel:bt,onModelChange:_}),t[104]=_,t[105]=bt,t[106]=Me):Me=t[106];let Ee;t[107]!==y.messages||t[108]!==y.stop||t[109]!==M||t[110]!==ht||t[111]!==xt||t[112]!==gt||t[113]!==$e||t[114]!==Me?(Ee=a.jsx(te.Footer,{children:a.jsx("div",{children:a.jsxs(te.Input,{onSubmit:M,onStop:y.stop,disabled:ht,isStreaming:xt,placeholder:gt,usageMessages:y.messages,children:[$e,Me]})})}),t[107]=y.messages,t[108]=y.stop,t[109]=M,t[110]=ht,t[111]=xt,t[112]=gt,t[113]=$e,t[114]=Me,t[115]=Ee):Ee=t[115];let Qe;return t[116]!==_e||t[117]!==Ie||t[118]!==Ee?(Qe=a.jsxs(te,{children:[_e,Ie,Ee]}),t[116]=_e,t[117]=Ie,t[118]=Ee,t[119]=Qe):Qe=t[119],Qe}function Co(t){return t.role!=="system"}function No(){return null}function zo(t){return t??null}function ko(t){const e=C.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==n?(s=a.jsx(rs,{"data-slot":"sheet",...n}),e[2]=n,e[3]=s):s=e[3],s}function _o(t){const e=C.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==n?(s=a.jsx(cs,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=s):s=e[3],s}function Io(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(us,{"data-slot":"sheet-overlay",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Po(t){const e=C.c(17);let n,s,o,r;e[0]!==t?({className:s,children:n,side:r,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r):(n=e[1],s=e[2],o=e[3],r=e[4]);const l=r===void 0?"right":r;let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Io,{}),e[5]=i):i=e[5];const c=l==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=l==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=l==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",m=l==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let u;e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==f||e[10]!==m?(u=B("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,f,m,s),e[6]=s,e[7]=c,e[8]=d,e[9]=f,e[10]=m,e[11]=u):u=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsxs(ds,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[a.jsx(at,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=h):h=e[12];let p;return e[13]!==n||e[14]!==o||e[15]!==u?(p=a.jsxs(_o,{children:[i,a.jsxs(is,{"data-slot":"sheet-content",className:u,...o,children:[n,h]})]}),e[13]=n,e[14]=o,e[15]=u,e[16]=p):p=e[16],p}function $o(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("flex flex-col gap-1.5 p-4",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sheet-header",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Mo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("text-foreground font-semibold",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(as,{"data-slot":"sheet-title",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Eo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("text-muted-foreground text-sm",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(ls,{"data-slot":"sheet-description",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Nn(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"skeleton",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}const Ro="sidebar_state",Ao=3600*24*7,To="16rem",Do="18rem",Lo="3rem",Oo="b",zn=x.createContext(null);function Pt(){const t=x.useContext(zn);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Ho(t){const e=C.c(21),{defaultOpen:n,open:s,onOpenChange:o,children:r}=t,l=n===void 0?!0:n,i=Je(),[c,d]=x.useState(!1),[f,m]=x.useState(l),u=s??f;let h;e[0]!==u||e[1]!==o?(h=O=>{const E=typeof O=="function"?O(u):O;o?o(E):m(E),document.cookie=`${Ro}=${E}; path=/; max-age=${Ao}`},e[0]=u,e[1]=o,e[2]=h):h=e[2];const p=h;let v;e[3]!==i||e[4]!==p?(v=()=>i?d(Uo):p(Bo),e[3]=i,e[4]=p,e[5]=v):v=e[5];const b=v;let g,S;e[6]!==b?(g=()=>{const O=E=>{if(E.key===Oo&&(E.metaKey||E.ctrlKey)){const A=E.target;if(A.tagName==="INPUT"||A.tagName==="TEXTAREA"||A.isContentEditable)return;E.preventDefault(),b()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},S=[b],e[6]=b,e[7]=g,e[8]=S):(g=e[7],S=e[8]),x.useEffect(g,S);const w=u?"expanded":"collapsed";let z;e[9]!==i||e[10]!==u||e[11]!==c||e[12]!==p||e[13]!==w||e[14]!==b?(z={state:w,open:u,setOpen:p,isMobile:i,openMobile:c,setOpenMobile:d,toggleSidebar:b},e[9]=i,e[10]=u,e[11]=c,e[12]=p,e[13]=w,e[14]=b,e[15]=z):z=e[15];const k=z;let N;e[16]!==r?(N=a.jsx(_s,{delayDuration:0,children:r}),e[16]=r,e[17]=N):N=e[17];let j;return e[18]!==k||e[19]!==N?(j=a.jsx(zn.Provider,{value:k,children:N}),e[18]=k,e[19]=N,e[20]=j):j=e[20],j}function Bo(t){return!t}function Uo(t){return!t}function Go(t){const e=C.c(14);let n,s,o,r;e[0]!==t?({className:s,style:r,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r):(n=e[1],s=e[2],o=e[3],r=e[4]);let l;e[5]!==r?(l={"--sidebar-width":To,"--sidebar-width-icon":Lo,...r},e[5]=r,e[6]=l):l=e[6];const i=l;let c;e[7]!==s?(c=B("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=c):c=e[8];let d;return e[9]!==n||e[10]!==o||e[11]!==i||e[12]!==c?(d=a.jsx("div",{"data-slot":"sidebar-wrapper",style:i,className:c,...o,children:n}),e[9]=n,e[10]=o,e[11]=i,e[12]=c,e[13]=d):d=e[13],d}function Vo(t){const e=C.c(46);let n,s,o,r,l,i;e[0]!==t?({side:r,variant:l,collapsible:i,className:s,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=l,e[6]=i):(n=e[1],s=e[2],o=e[3],r=e[4],l=e[5],i=e[6]);const c=r===void 0?"left":r,d=l===void 0?"sidebar":l,f=i===void 0?"offcanvas":i,{isMobile:m,state:u,openMobile:h,setOpenMobile:p}=Pt();if(f==="none"){let E;e[7]!==s?(E=B("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),e[7]=s,e[8]=E):E=e[8];let A;return e[9]!==n||e[10]!==o||e[11]!==E?(A=a.jsx("div",{"data-slot":"sidebar",className:E,...o,children:n}),e[9]=n,e[10]=o,e[11]=E,e[12]=A):A=e[12],A}if(m){let E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E={"--sidebar-width":Do},e[13]=E):E=e[13];let A;e[14]===Symbol.for("react.memo_cache_sentinel")?(A=a.jsxs($o,{className:"sr-only",children:[a.jsx(Mo,{children:"Sidebar"}),a.jsx(Eo,{children:"Displays the mobile sidebar."})]}),e[14]=A):A=e[14];let $;e[15]!==n?($=a.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=$):$=e[16];let T;e[17]!==c||e[18]!==$?(T=a.jsxs(Po,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:E,side:c,children:[A,$]}),e[17]=c,e[18]=$,e[19]=T):T=e[19];let L;return e[20]!==h||e[21]!==o||e[22]!==p||e[23]!==T?(L=a.jsx(ko,{open:h,onOpenChange:p,...o,children:T}),e[20]=h,e[21]=o,e[22]=p,e[23]=T,e[24]=L):L=e[24],L}const v=u==="collapsed"?f:"",b=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let g;e[25]!==b?(g=B("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=g):g=e[26];let S;e[27]!==g?(S=a.jsx("div",{"data-slot":"sidebar-gap",className:g}),e[27]=g,e[28]=S):S=e[28];const w=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",z=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let k;e[29]!==s||e[30]!==w||e[31]!==z?(k=B("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",w,z,s),e[29]=s,e[30]=w,e[31]=z,e[32]=k):k=e[32];let N;e[33]!==n?(N=a.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n}),e[33]=n,e[34]=N):N=e[34];let j;e[35]!==o||e[36]!==k||e[37]!==N?(j=a.jsx("div",{"data-slot":"sidebar-container",className:k,...o,children:N}),e[35]=o,e[36]=k,e[37]=N,e[38]=j):j=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==j||e[42]!==v||e[43]!==S||e[44]!==d?(O=a.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":u,"data-collapsible":v,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[S,j]}),e[39]=c,e[40]=u,e[41]=j,e[42]=v,e[43]=S,e[44]=d,e[45]=O):O=e[45],O}function Wo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("main",{"data-slot":"sidebar-inset",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Fo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("h-4 m-0! w-full",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-sidebar":"separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Ko(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Zo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function qo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("w-full text-sm",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function Yo(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function dt(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("group/menu-item relative",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}const Xo=fs("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function kn(t){const e=C.c(28);let n,s,o,r,l,i,c;e[0]!==t?({asChild:o,isActive:r,variant:l,size:i,tooltip:c,className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=l,e[6]=i,e[7]=c):(n=e[1],s=e[2],o=e[3],r=e[4],l=e[5],i=e[6],c=e[7]);const d=o===void 0?!1:o,f=r===void 0?!1:r,m=l===void 0?"default":l,u=i===void 0?"default":i,h=d?ms:"button",{isMobile:p,state:v}=Pt();let b;e[8]!==n||e[9]!==u||e[10]!==m?(b=B(Xo({variant:m,size:u}),n),e[8]=n,e[9]=u,e[10]=m,e[11]=b):b=e[11];let g;e[12]!==h||e[13]!==f||e[14]!==s||e[15]!==u||e[16]!==b?(g=a.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":f,className:b,...s}),e[12]=h,e[13]=f,e[14]=s,e[15]=u,e[16]=b,e[17]=g):g=e[17];const S=g;if(!c)return S;if(typeof c=="string"){let j;e[18]!==c?(j={children:c},e[18]=c,e[19]=j):j=e[19],c=j}let w;e[20]!==S?(w=a.jsx(Is,{asChild:!0,children:S}),e[20]=S,e[21]=w):w=e[21];const z=v!=="collapsed"||p;let k;e[22]!==z||e[23]!==c?(k=a.jsx(ks,{side:"right",align:"center",hidden:z,...c}),e[22]=z,e[23]=c,e[24]=k):k=e[24];let N;return e[25]!==w||e[26]!==k?(N=a.jsxs(Ps,{children:[w,k]}),e[25]=w,e[26]=k,e[27]=N):N=e[27],N}function Jo(t){const e=C.c(26),{item:n}=t,s=ct(),{org:o}=Xe(),r=sn(o.id),l=Js(o.id);let i;e[0]!==l.update||e[1]!==n.url||e[2]!==r?.sidebar_items?(i=async()=>{const z=(r?.sidebar_items||[]).filter(k=>k.url!==n.url);await l.update.mutateAsync({sidebar_items:z})},e[0]=l.update,e[1]=n.url,e[2]=r?.sidebar_items,e[3]=i):i=e[3];const c=i;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let f;e[5]!==n.icon?(f=d.test(n.icon),e[5]=n.icon,e[6]=f):f=e[6];const m=f;let u;e[7]!==n.url||e[8]!==s?(u=()=>{s({to:n.url})},e[7]=n.url,e[8]=s,e[9]=u):u=e[9];const h=n.title;let p;e[10]!==m||e[11]!==n.icon||e[12]!==n.title?(p=a.jsx("div",{className:"flex items-center justify-center shrink-0",children:m?a.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):a.jsx(Xs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=m,e[11]=n.icon,e[12]=n.title,e[13]=p):p=e[13];let v;e[14]!==n.title?(v=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=v):v=e[15];let b;e[16]!==v?(b=a.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:a.jsx("span",{className:"truncate text-sm w-full capitalize",children:v})}),e[16]=v,e[17]=b):b=e[17];let g;e[18]!==c?(g=a.jsx(at,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:w=>{w.preventDefault(),w.stopPropagation(),c()}}),e[18]=c,e[19]=g):g=e[19];let S;return e[20]!==n.title||e[21]!==u||e[22]!==p||e[23]!==b||e[24]!==g?(S=a.jsx(dt,{children:a.jsxs(kn,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:h,children:[p,b,g]})}),e[20]=n.title,e[21]=u,e[22]=p,e[23]=b,e[24]=g,e[25]=S):S=e[25],S}function Qo(){const t=C.c(4),{org:e}=Xe(),s=sn(e.id)?.sidebar_items;if(!s?.length)return null;let o;t[0]!==s?(o=s.map(er),t[0]=s,t[1]=o):o=t[1];let r;return t[2]!==o?(r=a.jsx(_n,{children:o}),t[2]=o,t[3]=r):r=t[3],r}function er(t){return a.jsx(Jo,{item:t},t.url)}function Ot(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(dt,{children:a.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:a.jsx(Nn,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function _n(t){const e=C.c(4),{children:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(Fo,{className:"my-2 -ml-1"}),e[0]=s):s=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(dt,{children:a.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:a.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=o):o=e[1];let r;return e[2]!==n?(r=a.jsxs(a.Fragment,{children:[s,o,n]}),e[2]=n,e[3]=r):r=e[3],r}function tr(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(x.Suspense,{fallback:a.jsxs(_n,{children:[a.jsx(Ot,{}),a.jsx(Ot,{})]}),children:a.jsx(Qo,{})}),t[0]=e):e=t[0],e}function nr(){const t=C.c(43),{locator:e}=Xe(),n=ct();let s;t[0]!==e?(s=Tt.parse(e),t[0]=e,t[1]=s):s=t[1];const{org:o}=s;let r;t[2]!==e?(r=Tt.isOrgAdminProject(e),t[2]=e,t[3]=r):r=t[3];const l=r;let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(hn,{}),t[4]=i):i=t[4];let c;t[5]!==n||t[6]!==o?(c={key:"home",label:"Home",icon:i,onClick:()=>n({to:"/$org",params:{org:o}})},t[5]=n,t[6]=o,t[7]=c):c=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(un,{}),t[8]=d):d=t[8];let f;t[9]!==n||t[10]!==o?(f={key:"store",label:"Store",icon:d,onClick:()=>n({to:"/$org/store",params:{org:o}})},t[9]=n,t[10]=o,t[11]=f):f=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(zs,{}),t[12]=m):m=t[12];let u;t[13]!==n||t[14]!==o?(u={key:"mcps",label:"MCP Servers",icon:m,onClick:()=>n({to:"/$org/mcps",params:{org:o}})},t[13]=n,t[14]=o,t[15]=u):u=t[15];let h;t[16]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(Nt,{}),t[16]=h):h=t[16];let p;t[17]!==n||t[18]!==o?(p={key:"gateways",label:"MCP Gateways",icon:h,onClick:()=>n({to:"/$org/gateways",params:{org:o}})},t[17]=n,t[18]=o,t[19]=p):p=t[19];let v;t[20]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(dn,{}),t[20]=v):v=t[20];let b;t[21]!==n||t[22]!==o?(b={key:"monitoring",label:"Monitoring",icon:v,onClick:()=>n({to:"/$org/monitoring",params:{org:o}})},t[21]=n,t[22]=o,t[23]=b):b=t[23];let g;t[24]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(jn,{}),t[24]=g):g=t[24];let S;t[25]!==n||t[26]!==o?(S={key:"members",label:"Members",icon:g,onClick:()=>n({to:"/$org/members",params:{org:o}})},t[25]=n,t[26]=o,t[27]=S):S=t[27];let w;t[28]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(yn,{}),t[28]=w):w=t[28];let z;t[29]!==n||t[30]!==o?(z={key:"settings",label:"Settings",icon:w,onClick:()=>n({to:"/$org/settings",params:{org:o}})},t[29]=n,t[30]=o,t[31]=z):z=t[31];let k;t[32]!==b||t[33]!==S||t[34]!==z||t[35]!==c||t[36]!==f||t[37]!==u||t[38]!==p?(k=[c,f,u,p,b,S,z],t[32]=b,t[33]=S,t[34]=z,t[35]=c,t[36]=f,t[37]=u,t[38]=p,t[39]=k):k=t[39];const N=k;let j;return t[40]!==N||t[41]!==l?(j=l?N:[],t[40]=N,t[41]=l,t[42]=j):j=t[42],j}function In(t){const e=C.c(10),{navigationItems:n,footer:s,additionalContent:o,variant:r,collapsible:l}=t,i=r===void 0?"sidebar":r,c=l===void 0?"icon":l;let d;e[0]!==n?(d=n.map(sr),e[0]=n,e[1]=d):d=e[1];let f;e[2]!==o||e[3]!==d?(f=a.jsx(Ko,{className:"flex-1 overflow-x-hidden",children:a.jsx(Zo,{className:"font-medium",children:a.jsx(qo,{children:a.jsxs(Yo,{className:"gap-0.5",children:[d,o]})})})}),e[2]=o,e[3]=d,e[4]=f):f=e[4];let m;return e[5]!==c||e[6]!==s||e[7]!==f||e[8]!==i?(m=a.jsxs(Vo,{variant:i,collapsible:c,children:[f,s]}),e[5]=c,e[6]=s,e[7]=f,e[8]=i,e[9]=m):m=e[9],m}function sr(t){return a.jsx(dt,{children:a.jsxs(kn,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[a.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),a.jsx("span",{className:"truncate",children:t.label})]})},t.key)}In.Skeleton=function(){return a.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>a.jsx("div",{className:"w-full h-8",children:a.jsx(Nn,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function or(){const t=C.c(3),e=nr();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(a.Fragment,{children:a.jsx(_t,{children:a.jsx(x.Suspense,{fallback:null,children:a.jsx(tr,{})})})}),t[0]=n):n=t[0];let s;return t[1]!==e?(s=a.jsx(In,{navigationItems:e,additionalContent:n}),t[1]=e,t[2]=s):s=t[2],s}function rr(t){const e=C.c(12);let n,s,o,r;e[0]!==t?({className:n,orientation:o,decorative:r,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r):(n=e[1],s=e[2],o=e[3],r=e[4]);const l=o===void 0?"horizontal":o,i=r===void 0?!0:r;let c;e[5]!==n?(c=B("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==l||e[9]!==s||e[10]!==c?(d=a.jsx(ps,{"data-slot":"separator-root",decorative:i,orientation:l,className:c,...s}),e[7]=i,e[8]=l,e[9]=s,e[10]=c,e[11]=d):d=e[11],d}const Pn=x.createContext(null);function ar(){const t=x.useContext(Pn);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function lr(t){const e=C.c(10),{children:n,onItemHover:s}=t,[o,r]=x.useState(null);let l;e[0]!==s?(l=m=>{r(m),s?.(m)},e[0]=s,e[1]=l):l=e[1];const i=l;let c;e[2]!==o||e[3]!==i?(c={hoveredItem:o,setHoveredItem:i},e[2]=o,e[3]=i,e[4]=c):c=e[4];let d;e[5]!==n?(d=a.jsx(en,{children:n}),e[5]=n,e[6]=d):d=e[6];let f;return e[7]!==c||e[8]!==d?(f=a.jsx(Pn.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=f):f=e[9],f}function ir(t){const e=C.c(6),{children:n,onClick:s}=t;let o;e[0]!==n||e[1]!==s?(o=a.jsx(we,{variant:"link",className:"p-0.5 h-auto",onClick:s,type:"button",children:n}),e[0]=n,e[1]=s,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(tn,{asChild:!0,children:a.jsx(we,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:a.jsx(fn,{size:16,className:"opacity-50"})})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=a.jsxs("div",{className:"flex items-center gap-1",children:[o,r]}),e[4]=o,e[5]=l):l=e[5],l}function cr(t){const e=C.c(8),{item:n,fallback:s}=t,o=s===void 0?"":s,r=n?.avatarUrl??"",l=n?.name??o;let i;e[0]!==r||e[1]!==l?(i=a.jsx(Ve,{url:r,fallback:l,size:"xs",objectFit:"contain"}),e[0]=r,e[1]=l,e[2]=i):i=e[2];const c=n?.name??o;let d;e[3]!==c?(d=a.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let f;return e[5]!==i||e[6]!==d?(f=a.jsxs("div",{className:"flex items-center gap-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=f):f=e[7],f}function dr(t){const e=C.c(6),{children:n,align:s}=t,o=s===void 0?"start":s,l=x.Children.toArray(n).filter(ur).length===1?"280px":"480px";let i;e[0]!==l?(i={width:l},e[0]=l,e[1]=i):i=e[1];let c;return e[2]!==o||e[3]!==n||e[4]!==i?(c=a.jsx(nn,{align:o,className:"p-0 flex items-start",style:i,children:n}),e[2]=o,e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function ur(t){return x.isValidElement(t)&&(t.type===Mn||t.type===$n)}function $n(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=B("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}const Mn=$n;function fr(t){const e=C.c(6),{placeholder:n,value:s,onChange:o}=t,r=n===void 0?"Search...":n;let l;e[0]!==o?(l=c=>o(c.target.value),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==r||e[3]!==l||e[4]!==s?(i=a.jsx(eo,{placeholder:r,value:s,onChange:l,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=r,e[3]=l,e[4]=s,e[5]=i):i=e[5],i}function mr(t){const e=C.c(6),{children:n,emptyMessage:s}=t,o=s===void 0?"No items found.":s,r=x.Children.count(n)>0;let l;e[0]!==o||e[1]!==r?(l=!r&&a.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:o}),e[0]=o,e[1]=r,e[2]=l):l=e[2];let i;return e[3]!==n||e[4]!==l?(i=a.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[l,n]}),e[3]=n,e[4]=l,e[5]=i):i=e[5],i}function pr(t){const e=C.c(15),{item:n,onClick:s,onHover:o,children:r}=t,l=ar();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{l.setHoveredItem(n.slug),o?.(n)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const c=i;let d;e[4]!==n||e[5]!==s?(d=()=>s(n),e[4]=n,e[5]=s,e[6]=d):d=e[6];let f;e[7]!==r||e[8]!==n.avatarUrl||e[9]!==n.name?(f=r||a.jsxs(a.Fragment,{children:[a.jsx(Ve,{url:n.avatarUrl??"",fallback:n.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),a.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.name})]}),e[7]=r,e[8]=n.avatarUrl,e[9]=n.name,e[10]=f):f=e[10];let m;return e[11]!==c||e[12]!==d||e[13]!==f?(m=a.jsx(we,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:f}),e[11]=c,e[12]=d,e[13]=f,e[14]=m):m=e[14],m}function hr(t){const e=C.c(2),{children:n}=t;let s;return e[0]!==n?(s=a.jsx("div",{className:"px-1 pb-1 pt-0.5",children:n}),e[0]=n,e[1]=s):s=e[1],s}function xr(t){const e=C.c(11),{onClick:n,icon:s,children:o,variant:r}=t,i=(r===void 0?"default":r)==="muted"&&"text-muted-foreground";let c;e[0]!==i?(c=B("w-full justify-start font-normal",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&a.jsx("span",{className:"[&>svg]:size-4",children:s}),e[2]=s,e[3]=d):d=e[3];let f;e[4]!==o?(f=a.jsx("span",{children:o}),e[4]=o,e[5]=f):f=e[5];let m;return e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==f?(m=a.jsxs(we,{variant:"ghost",size:"sm",className:c,onClick:n,children:[d,f]}),e[6]=n,e[7]=c,e[8]=d,e[9]=f,e[10]=m):m=e[10],m}function gr(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(rr,{}),t[0]=e):e=t[0],e}function br(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const re=Object.assign(lr,{Trigger:ir,CurrentItem:cr,Content:dr,Panel:Mn,Search:fr,Items:mr,Item:pr,Actions:hr,Action:xr,Separator:gr,Skeleton:br});function zt(){const t=C.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=Xt(e),{data:s}=qe.useListOrganizations(),o=ct();let r;t[1]!==n||t[2]!==s?(r=s?.find(K=>K.slug===n),t[1]=n,t[2]=s,t[3]=r):r=t[3];const l=r,[i,c]=x.useState(""),[d,f]=x.useState(!1);let m,u,h,p,v,b,g,S;if(t[4]!==l||t[5]!==o||t[6]!==n||t[7]!==i||t[8]!==s){const H=(s?(()=>{const q=s.filter(Q=>Q.name.toLowerCase().includes(i.toLowerCase()));if(n){const Q=q.findIndex(y=>y.slug===n);if(Q>0){const y=q[Q];y&&(q.splice(Q,1),q.unshift(y))}}return q})():[]).map(vr);let F;t[17]!==l?(F=l?{slug:l.slug,name:l.name,avatarUrl:l.logo}:void 0,t[17]=l,t[18]=F):F=t[18];const W=F;p=re;let ee;t[19]!==o||t[20]!==n?(ee=()=>o({to:"/$org",params:{org:n??""}}),t[19]=o,t[20]=n,t[21]=ee):ee=t[21];let X;t[22]!==W?(X=a.jsx(re.CurrentItem,{item:W}),t[22]=W,t[23]=X):X=t[23],t[24]!==ee||t[25]!==X?(S=a.jsx(re.Trigger,{onClick:ee,children:X}),t[24]=ee,t[25]=X,t[26]=S):S=t[26],h=re.Content,u=re.Panel,t[27]!==i?(g=a.jsx(re.Search,{placeholder:"Search organizations...",value:i,onChange:c}),t[27]=i,t[28]=g):g=t[28],m=re.Items,v="No organizations found.";let ae;t[29]!==o?(ae=q=>a.jsx(re.Item,{item:q,onClick:Q=>o({to:"/$org",params:{org:Q.slug}})},q.slug),t[29]=o,t[30]=ae):ae=t[30],b=H.map(ae),t[4]=l,t[5]=o,t[6]=n,t[7]=i,t[8]=s,t[9]=m,t[10]=u,t[11]=h,t[12]=p,t[13]=v,t[14]=b,t[15]=g,t[16]=S}else m=t[9],u=t[10],h=t[11],p=t[12],v=t[13],b=t[14],g=t[15],S=t[16];let w;t[31]!==m||t[32]!==v||t[33]!==b?(w=a.jsx(m,{emptyMessage:v,children:b}),t[31]=m,t[32]=v,t[33]=b,t[34]=w):w=t[34];let z,k;t[35]===Symbol.for("react.memo_cache_sentinel")?(z=a.jsx(re.Actions,{children:a.jsx(re.Action,{onClick:()=>f(!0),variant:"muted",children:"+ Create organization"})}),k=a.jsx(re.Separator,{}),t[35]=z,t[36]=k):(z=t[35],k=t[36]);let N;t[37]!==o?(N=()=>o({to:"/"}),t[37]=o,t[38]=N):N=t[38];let j;t[39]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(to,{}),t[39]=j):j=t[39];let O;t[40]!==N?(O=a.jsx(re.Actions,{children:a.jsx(re.Action,{onClick:N,icon:j,children:"See all organizations"})}),t[40]=N,t[41]=O):O=t[41];let E;t[42]!==u||t[43]!==O||t[44]!==g||t[45]!==w?(E=a.jsxs(u,{children:[g,w,z,k,O]}),t[42]=u,t[43]=O,t[44]=g,t[45]=w,t[46]=E):E=t[46];let A;t[47]!==h||t[48]!==E?(A=a.jsx(h,{children:E}),t[47]=h,t[48]=E,t[49]=A):A=t[49];let $;t[50]!==p||t[51]!==A||t[52]!==S?($=a.jsxs(p,{children:[S,A]}),t[50]=p,t[51]=A,t[52]=S,t[53]=$):$=t[53];let T;t[54]!==d?(T=a.jsx(Qs,{open:d,onOpenChange:f}),t[54]=d,t[55]=T):T=t[55];let L;return t[56]!==$||t[57]!==T?(L=a.jsxs(a.Fragment,{children:[$,T]}),t[56]=$,t[57]=T,t[58]=L):L=t[58],L}function vr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}zt.Skeleton=re.Skeleton;const En=x.createContext({setOpen:()=>{}}),yr=()=>x.useContext(En),Sr=t=>{const e=C.c(25);let n,s,o,r,l;e[0]!==t?({children:n,defaultOpen:s,open:r,onOpenChange:o,...l}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o,e[4]=r,e[5]=l):(n=e[1],s=e[2],o=e[3],r=e[4],l=e[5]);const i=s??!1;let c;e[6]!==o||e[7]!==r||e[8]!==i?(c={prop:r,defaultProp:i,onChange:o},e[6]=o,e[7]=r,e[8]=i,e[9]=c):c=e[9];const[d,f]=Ws(c);let m;e[10]!==f?(m={setOpen:f},e[10]=f,e[11]=m):m=e[11];let u;e[12]!==n||e[13]!==d||e[14]!==l||e[15]!==f?(u=a.jsx(Fs,{open:d,onOpenChange:f,...l,children:n}),e[12]=n,e[13]=d,e[14]=l,e[15]=f,e[16]=u):u=e[16];let h;e[17]!==d||e[18]!==l||e[19]!==f||e[20]!==u?(h=a.jsx(oo,{open:d,onOpenChange:f,...l,children:u}),e[17]=d,e[18]=l,e[19]=f,e[20]=u,e[21]=h):h=e[21];let p;return e[22]!==m||e[23]!==h?(p=a.jsx(En.Provider,{value:m,children:h}),e[22]=m,e[23]=h,e[24]=p):p=e[24],p},jr=t=>{const{children:e,title:n,...s}=t,o=Je(),{className:r,...l}=s;return o?a.jsxs(Us,{...l,children:[a.jsx(Gs,{className:"hidden",children:a.jsx(Vs,{children:n})}),a.jsx("div",{className:B("flex flex-col gap-2 p-2 py-4",r),children:e})]}):a.jsx(so,{...s,children:e})},wr=t=>{const{children:e,...n}=t,{setOpen:s}=yr(),o=Je(),{className:r,...l}=n;return o?a.jsx("div",{...l,onClick:i=>{s(!1);const{onClick:c}=l;c?.(i)},className:B("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),children:e}):a.jsx(ro,{...n,children:e})},Cr=t=>{const e=C.c(7);let n,s;e[0]!==t?({children:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);const o=Je();let r;return e[3]!==n||e[4]!==o||e[5]!==s?(r=o?a.jsx(Bs,{asChild:!0,children:n}):a.jsx(no,{...s,children:n}),e[3]=n,e[4]=o,e[5]=s,e[6]=r):r=e[6],r},Nr=t=>{const e=C.c(7);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);const o=Je();let r;return e[3]!==n||e[4]!==o||e[5]!==s?(r=o?a.jsx(Dt,{className:B(n),...s}):a.jsx(Dt,{className:B(n),...s}),e[3]=n,e[4]=o,e[5]=s,e[6]=r):r=e[6],r};function zr(t){const e=C.c(11),{user:n,trigger:s,align:o,children:r}=t,l=o===void 0?"start":o;let i;e[0]!==s||e[1]!==n?(i=s(n),e[0]=s,e[1]=n,e[2]=i):i=e[2];let c;e[3]!==i?(c=a.jsx(Cr,{asChild:!0,children:a.jsx("div",{children:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==l||e[6]!==r?(d=a.jsx(jr,{side:"top",align:l,className:"md:w-[240px]",children:r}),e[5]=l,e[6]=r,e[7]=d):d=e[7];let f;return e[8]!==c||e[9]!==d?(f=a.jsxs(Sr,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=f):f=e[10],f}function kr(t){const e=C.c(8),{children:n,onClick:s,className:o,asChild:r}=t;let l;e[0]!==r||e[1]!==n||e[2]!==s?(l=r?n:a.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:s,children:n}),e[0]=r,e[1]=n,e[2]=s,e[3]=l):l=e[3];let i;return e[4]!==r||e[5]!==o||e[6]!==l?(i=a.jsx(wr,{asChild:r,className:o,children:l}),e[4]=r,e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function _r(t){const e=C.c(2),{className:n}=t;let s;return e[0]!==n?(s=a.jsx(Nr,{className:n}),e[0]=n,e[1]=s):s=e[1],s}function Ir(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const be=Object.assign(zr,{Item:kr,Separator:_r,Skeleton:Ir});function Pr(t){const e=C.c(32),{open:n,onOpenChange:s,user:o,userImage:r}=t,[l,i]=x.useState(!1);let c;e[0]!==o.id?(c=()=>{navigator.clipboard.writeText(o.id),i(!0),setTimeout(()=>i(!1),2e3)},e[0]=o.id,e[1]=c):c=e[1];const d=c;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsxs(on,{children:[a.jsx(rn,{children:"Profile"}),a.jsx(an,{children:"Your account information"})]}),e[2]=f):f=e[2];const m=o.name||o.email||"U";let u;e[3]!==m||e[4]!==r?(u=a.jsx(Ve,{url:r,fallback:m,shape:"circle",size:"2xl"}),e[3]=m,e[4]=r,e[5]=u):u=e[5];const h=o.name||o.email;let p;e[6]!==h?(p=a.jsx("div",{className:"text-lg font-semibold text-center",children:h}),e[6]=h,e[7]=p):p=e[7];let v;e[8]!==o.email?(v=a.jsx("div",{className:"text-sm text-muted-foreground text-center",children:o.email}),e[8]=o.email,e[9]=v):v=e[9];let b;e[10]!==p||e[11]!==v?(b=a.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[p,v]}),e[10]=p,e[11]=v,e[12]=b):b=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"User ID"}),e[13]=g):g=e[13];let S;e[14]!==o.id?(S=a.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[g,a.jsx("span",{className:"text-sm font-mono truncate",children:o.id})]}),e[14]=o.id,e[15]=S):S=e[15];let w;e[16]!==l?(w=l?a.jsx($s,{size:16,className:"text-green-600"}):a.jsx(ao,{size:16,className:"text-muted-foreground"}),e[16]=l,e[17]=w):w=e[17];let z;e[18]!==d||e[19]!==w?(z=a.jsx("button",{type:"button",onClick:d,className:"flex-shrink-0 p-2 hover:bg-background rounded-md transition-colors","aria-label":"Copy user ID",children:w}),e[18]=d,e[19]=w,e[20]=z):z=e[20];let k;e[21]!==S||e[22]!==z?(k=a.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-4 py-3 rounded-lg bg-muted/50 border border-border",children:[S,z]}),e[21]=S,e[22]=z,e[23]=k):k=e[23];let N;e[24]!==k||e[25]!==u||e[26]!==b?(N=a.jsxs(ln,{className:"sm:max-w-md",children:[f,a.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[u,b,k]})]}),e[24]=k,e[25]=u,e[26]=b,e[27]=N):N=e[27];let j;return e[28]!==s||e[29]!==n||e[30]!==N?(j=a.jsx(cn,{open:n,onOpenChange:s,children:N}),e[28]=s,e[29]=n,e[30]=N,e[31]=j):j=e[31],j}function $r(t){const e=C.c(5),{open:n,onOpenChange:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsxs(on,{children:[a.jsx(rn,{children:"Invitations"}),a.jsx(an,{children:"Your pending organization invitations"})]}),e[0]=o):o=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsxs(ln,{className:"sm:max-w-lg",children:[o,a.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:a.jsx(gs,{})})]}),e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx(cn,{open:n,onOpenChange:s,children:r}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Mr(t){const e=C.c(31),{user:n,userImage:s,hasInvites:o,showInvitesItem:r}=t,[l,i]=x.useState(!1),[c,d]=x.useState(!1);let f;e[0]!==o||e[1]!==n.email||e[2]!==n.name||e[3]!==s?(f=()=>a.jsxs("div",{className:"relative",children:[a.jsx(Ve,{url:s,fallback:n.name||n.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all"}),o&&a.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-destructive ring-2 ring-background"})]}),e[0]=o,e[1]=n.email,e[2]=n.name,e[3]=s,e[4]=f):f=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsxs(be.Item,{onClick:()=>i(!0),children:[a.jsx(Sn,{className:"text-muted-foreground",size:18}),"Profile"]}),e[5]=m):m=e[5];let u;e[6]!==o||e[7]!==r?(u=r&&a.jsxs(be.Item,{onClick:()=>d(!0),children:[a.jsx(bn,{className:"text-muted-foreground",size:18}),"Invitations",o&&a.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]}),e[6]=o,e[7]=r,e[8]=u):u=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(be.Separator,{}),e[9]=h):h=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(xs,{className:"w-4 h-4 text-muted-foreground"}),e[10]=p):p=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(be.Item,{asChild:!0,children:a.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[p,"decocms/admin",a.jsx(Lt,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=v):v=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(pn,{className:"text-muted-foreground",size:18}),e[12]=b):b=e[12];let g,S;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(be.Item,{asChild:!0,children:a.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[b,"Homepage",a.jsx(Lt,{size:18,className:"ml-auto text-muted-foreground"})]})}),S=a.jsx(be.Separator,{}),e[13]=g,e[14]=S):(g=e[13],S=e[14]);let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsxs(be.Item,{onClick:Er,children:[a.jsx(gn,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=w):w=e[15];let z;e[16]!==f||e[17]!==u||e[18]!==n?(z=a.jsxs(be,{user:n,trigger:f,align:"end",children:[m,u,h,v,g,S,w]}),e[16]=f,e[17]=u,e[18]=n,e[19]=z):z=e[19];let k;e[20]!==l||e[21]!==n||e[22]!==s?(k=l&&a.jsx(Pr,{open:l,onOpenChange:i,user:n,userImage:s}),e[20]=l,e[21]=n,e[22]=s,e[23]=k):k=e[23];let N;e[24]!==c||e[25]!==r?(N=r&&c&&a.jsx($r,{open:c,onOpenChange:d}),e[24]=c,e[25]=r,e[26]=N):N=e[26];let j;return e[27]!==z||e[28]!==k||e[29]!==N?(j=a.jsxs(a.Fragment,{children:[z,k,N]}),e[27]=z,e[28]=k,e[29]=N,e[30]=j):j=e[30],j}function Er(){return qe.signOut()}function Rr(){const{data:t}=qe.useSession(),e=x.useContext(hs),{data:n}=e.hooks.useListUserInvitations(),o=(n??[]).length>0;if(!t?.user)return a.jsx(Ve,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer",muted:!0});const r=t.user,l={...r,name:r.name??void 0},i=r.image;return a.jsx(Mr,{user:l,userImage:i,hasInvites:o,showInvitesItem:!0})}function Ar(t){const e=C.c(6),{children:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(bs,{children:a.jsx(Jt,{})}),e[0]=s):s=e[0];let o;e[1]!==n?(o=a.jsx(vs,{children:n}),e[1]=n,e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(ys,{children:a.jsx(Ss,{to:"/login",replace:!0})}),e[3]=r):r=e[3];let l;return e[4]!==o?(l=a.jsxs(a.Fragment,{children:[s,o,r]}),e[4]=o,e[5]=l):l=e[5],l}function Tr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=B("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Dr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=B("flex items-center justify-center px-2 h-full border-r border-border",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Lr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=B("flex items-center gap-2 px-2 h-full",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Or(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=B("flex items-center gap-2 px-2 h-full flex-1",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Hr(t){const e=C.c(5),{children:n,className:s}=t;let o;e[0]!==s?(o=B("flex items-center gap-2 px-2 h-full ml-auto",s),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==n||e[3]!==o?(r=a.jsx("div",{className:o,children:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4],r}function Br(){const t=C.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:a.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:a.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=n):n=t[1];let s;return t[2]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",children:[e,n,a.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:a.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=s):s=t[2],s}const st=Object.assign(Tr,{Sidebar:Dr,Left:Lr,Center:Or,Right:Hr,Skeleton:Br}),ut=x.createContext(null);ut.displayName="PanelGroupContext";const Y={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},$t=10,je=x.useLayoutEffect,Ht=js.useId,Ur=typeof Ht=="function"?Ht:()=>null;let Gr=0;function Mt(t=null){const e=Ur(),n=x.useRef(t||e||null);return n.current===null&&(n.current=""+Gr++),t??n.current}function Rn({children:t,className:e="",collapsedSize:n,collapsible:s,defaultSize:o,forwardedRef:r,id:l,maxSize:i,minSize:c,onCollapse:d,onExpand:f,onResize:m,order:u,style:h,tagName:p="div",...v}){const b=x.useContext(ut);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:g,expandPanel:S,getPanelSize:w,getPanelStyle:z,groupId:k,isPanelCollapsed:N,reevaluatePanelConstraints:j,registerPanel:O,resizePanel:E,unregisterPanel:A}=b,$=Mt(l),T=x.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:m},constraints:{collapsedSize:n,collapsible:s,defaultSize:o,maxSize:i,minSize:c},id:$,idIsFromProps:l!==void 0,order:u});x.useRef({didLogMissingDefaultSizeWarning:!1}),je(()=>{const{callbacks:K,constraints:H}=T.current,F={...H};T.current.id=$,T.current.idIsFromProps=l!==void 0,T.current.order=u,K.onCollapse=d,K.onExpand=f,K.onResize=m,H.collapsedSize=n,H.collapsible=s,H.defaultSize=o,H.maxSize=i,H.minSize=c,(F.collapsedSize!==H.collapsedSize||F.collapsible!==H.collapsible||F.maxSize!==H.maxSize||F.minSize!==H.minSize)&&j(T.current,F)}),je(()=>{const K=T.current;return O(K),()=>{A(K)}},[u,$,O,A]),x.useImperativeHandle(r,()=>({collapse:()=>{g(T.current)},expand:K=>{S(T.current,K)},getId(){return $},getSize(){return w(T.current)},isCollapsed(){return N(T.current)},isExpanded(){return!N(T.current)},resize:K=>{E(T.current,K)}}),[g,S,w,N,$,E]);const L=z(T.current,o);return x.createElement(p,{...v,children:t,className:e,id:$,style:{...L,...h},[Y.groupId]:k,[Y.panel]:"",[Y.panelCollapsible]:s||void 0,[Y.panelId]:$,[Y.panelSize]:parseFloat(""+L.flexGrow).toFixed(1)})}const An=x.forwardRef((t,e)=>x.createElement(Rn,{...t,forwardedRef:e}));Rn.displayName="Panel";An.displayName="forwardRef(Panel)";let kt=null,rt=-1,ve=null;function Vr(t,e){if(e){const n=(e&Hn)!==0,s=(e&Bn)!==0,o=(e&Un)!==0,r=(e&Gn)!==0;if(n)return o?"se-resize":r?"ne-resize":"e-resize";if(s)return o?"sw-resize":r?"nw-resize":"w-resize";if(o)return"s-resize";if(r)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Wr(){ve!==null&&(document.head.removeChild(ve),kt=null,ve=null,rt=-1)}function yt(t,e){var n,s;const o=Vr(t,e);if(kt!==o){if(kt=o,ve===null&&(ve=document.createElement("style"),document.head.appendChild(ve)),rt>=0){var r;(r=ve.sheet)===null||r===void 0||r.removeRule(rt)}rt=(n=(s=ve.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Tn(t){return t.type==="keydown"}function Dn(t){return t.type.startsWith("pointer")}function Ln(t){return t.type.startsWith("mouse")}function ft(t){if(Dn(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(Ln(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Fr(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Kr(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Zr(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Gt(t),b:Gt(e)};let s;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),s=t;D(s,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Ut(Bt(n.a)),b:Ut(Bt(n.b))};if(o.a===o.b){const r=s.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let i=r.length;for(;i--;){const c=r[i];if(c===l.a)return 1;if(c===l.b)return-1}}return Math.sign(o.a-o.b)}const qr=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Yr(t){var e;const n=getComputedStyle((e=On(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Xr(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Yr(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||qr.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Bt(t){let e=t.length;for(;e--;){const n=t[e];if(D(n,"Missing node"),Xr(n))return n}return null}function Ut(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Gt(t){const e=[];for(;t;)e.push(t),t=On(t);return e}function On(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const Hn=1,Bn=2,Un=4,Gn=8,Jr=Fr()==="coarse";let fe=[],Ue=!1,Se=new Map,mt=new Map;const Ke=new Set;function Qr(t,e,n,s,o){var r;const{ownerDocument:l}=e,i={direction:n,element:e,hitAreaMargins:s,setResizeHandlerState:o},c=(r=Se.get(l))!==null&&r!==void 0?r:0;return Se.set(l,c+1),Ke.add(i),lt(),function(){var f;mt.delete(t),Ke.delete(i);const m=(f=Se.get(l))!==null&&f!==void 0?f:1;if(Se.set(l,m-1),lt(),m===1&&Se.delete(l),fe.includes(i)){const u=fe.indexOf(i);u>=0&&fe.splice(u,1),Rt(),o("up",!0,null)}}}function ea(t){const{target:e}=t,{x:n,y:s}=ft(t);Ue=!0,Et({target:e,x:n,y:s}),lt(),fe.length>0&&(it("down",t),t.preventDefault(),Vn(e)||t.stopImmediatePropagation())}function St(t){const{x:e,y:n}=ft(t);if(Ue&&t.buttons===0&&(Ue=!1,it("up",t)),!Ue){const{target:s}=t;Et({target:s,x:e,y:n})}it("move",t),Rt(),fe.length>0&&t.preventDefault()}function jt(t){const{target:e}=t,{x:n,y:s}=ft(t);mt.clear(),Ue=!1,fe.length>0&&(t.preventDefault(),Vn(e)||t.stopImmediatePropagation()),it("up",t),Et({target:e,x:n,y:s}),Rt(),lt()}function Vn(t){let e=t;for(;e;){if(e.hasAttribute(Y.resizeHandle))return!0;e=e.parentElement}return!1}function Et({target:t,x:e,y:n}){fe.splice(0);let s=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(s=t),Ke.forEach(o=>{const{element:r,hitAreaMargins:l}=o,i=r.getBoundingClientRect(),{bottom:c,left:d,right:f,top:m}=i,u=Jr?l.coarse:l.fine;if(e>=d-u&&e<=f+u&&n>=m-u&&n<=c+u){if(s!==null&&document.contains(s)&&r!==s&&!r.contains(s)&&!s.contains(r)&&Zr(s,r)>0){let p=s,v=!1;for(;p&&!p.contains(r);){if(Kr(p.getBoundingClientRect(),i)){v=!0;break}p=p.parentElement}if(v)return}fe.push(o)}})}function wt(t,e){mt.set(t,e)}function Rt(){let t=!1,e=!1;fe.forEach(s=>{const{direction:o}=s;o==="horizontal"?t=!0:e=!0});let n=0;mt.forEach(s=>{n|=s}),t&&e?yt("intersection",n):t?yt("horizontal",n):e?yt("vertical",n):Wr()}let Ct=new AbortController;function lt(){Ct.abort(),Ct=new AbortController;const t={capture:!0,signal:Ct.signal};Ke.size&&(Ue?(fe.length>0&&Se.forEach((e,n)=>{const{body:s}=n;e>0&&(s.addEventListener("contextmenu",jt,t),s.addEventListener("pointerleave",St,t),s.addEventListener("pointermove",St,t))}),window.addEventListener("pointerup",jt,t),window.addEventListener("pointercancel",jt,t)):Se.forEach((e,n)=>{const{body:s}=n;e>0&&(s.addEventListener("pointerdown",ea,t),s.addEventListener("pointermove",St,t))}))}function it(t,e){Ke.forEach(n=>{const{setResizeHandlerState:s}=n,o=fe.includes(n);s(t,o,e)})}function ta(){const[t,e]=x.useState(0);return x.useCallback(()=>e(n=>n+1),[])}function D(t,e){if(!t)throw console.error(e),Error(e)}function Ce(t,e,n=$t){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function xe(t,e,n=$t){return Ce(t,e,n)===0}function ie(t,e,n){return Ce(t,e,n)===0}function na(t,e,n){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++){const o=t[s],r=e[s];if(!ie(o,r,n))return!1}return!0}function Be({panelConstraints:t,panelIndex:e,size:n}){const s=t[e];D(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:o=0,collapsible:r,maxSize:l=100,minSize:i=0}=s;if(Ce(n,i)<0)if(r){const c=(o+i)/2;Ce(n,c)<0?n=o:n=i}else n=i;return n=Math.min(l,n),n=parseFloat(n.toFixed($t)),n}function We({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:s,prevLayout:o,trigger:r}){if(ie(t,0))return e;const l=[...e],[i,c]=s;D(i!=null,"Invalid first pivot index"),D(c!=null,"Invalid second pivot index");let d=0;if(r==="keyboard"){{const m=t<0?c:i,u=n[m];D(u,`Panel constraints not found for index ${m}`);const{collapsedSize:h=0,collapsible:p,minSize:v=0}=u;if(p){const b=e[m];if(D(b!=null,`Previous layout not found for panel index ${m}`),ie(b,h)){const g=v-b;Ce(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}{const m=t<0?i:c,u=n[m];D(u,`No panel constraints found for index ${m}`);const{collapsedSize:h=0,collapsible:p,minSize:v=0}=u;if(p){const b=e[m];if(D(b!=null,`Previous layout not found for panel index ${m}`),ie(b,v)){const g=b-h;Ce(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const m=t<0?1:-1;let u=t<0?c:i,h=0;for(;;){const v=e[u];D(v!=null,`Previous layout not found for panel index ${u}`);const g=Be({panelConstraints:n,panelIndex:u,size:100})-v;if(h+=g,u+=m,u<0||u>=n.length)break}const p=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-p:p}{let u=t<0?i:c;for(;u>=0&&u<n.length;){const h=Math.abs(t)-Math.abs(d),p=e[u];D(p!=null,`Previous layout not found for panel index ${u}`);const v=p-h,b=Be({panelConstraints:n,panelIndex:u,size:v});if(!ie(p,b)&&(d+=p-b,l[u]=b,d.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?u--:u++}}if(na(o,l))return o;{const m=t<0?c:i,u=e[m];D(u!=null,`Previous layout not found for panel index ${m}`);const h=u+d,p=Be({panelConstraints:n,panelIndex:m,size:h});if(l[m]=p,!ie(p,h)){let v=h-p,g=t<0?c:i;for(;g>=0&&g<n.length;){const S=l[g];D(S!=null,`Previous layout not found for panel index ${g}`);const w=S+v,z=Be({panelConstraints:n,panelIndex:g,size:w});if(ie(S,z)||(v-=z-S,l[g]=z),ie(v,0))break;t>0?g--:g++}}}const f=l.reduce((m,u)=>u+m,0);return ie(f,100)?l:o}function sa({layout:t,panelsArray:e,pivotIndices:n}){let s=0,o=100,r=0,l=0;const i=n[0];D(i!=null,"No pivot index found"),e.forEach((m,u)=>{const{constraints:h}=m,{maxSize:p=100,minSize:v=0}=h;u===i?(s=v,o=p):(r+=v,l+=p)});const c=Math.min(o,100-r),d=Math.max(s,100-l),f=t[i];return{valueMax:c,valueMin:d,valueNow:f}}function Ze(t,e=document){return Array.from(e.querySelectorAll(`[${Y.resizeHandleId}][data-panel-group-id="${t}"]`))}function Wn(t,e,n=document){const o=Ze(t,n).findIndex(r=>r.getAttribute(Y.resizeHandleId)===e);return o??null}function Fn(t,e,n){const s=Wn(t,e,n);return s!=null?[s,s+1]:[-1,-1]}function Kn(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return s||null}function pt(t,e=document){const n=e.querySelector(`[${Y.resizeHandleId}="${t}"]`);return n||null}function oa(t,e,n,s=document){var o,r,l,i;const c=pt(e,s),d=Ze(t,s),f=c?d.indexOf(c):-1,m=(o=(r=n[f])===null||r===void 0?void 0:r.id)!==null&&o!==void 0?o:null,u=(l=(i=n[f+1])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l:null;return[m,u]}function ra({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:s,panelDataArray:o,panelGroupElement:r,setLayout:l}){x.useRef({didWarnAboutMissingResizeHandle:!1}),je(()=>{if(!r)return;const i=Ze(n,r);for(let c=0;c<o.length-1;c++){const{valueMax:d,valueMin:f,valueNow:m}=sa({layout:s,panelsArray:o,pivotIndices:[c,c+1]}),u=i[c];if(u!=null){const h=o[c];D(h,`No panel data found for index "${c}"`),u.setAttribute("aria-controls",h.id),u.setAttribute("aria-valuemax",""+Math.round(d)),u.setAttribute("aria-valuemin",""+Math.round(f)),u.setAttribute("aria-valuenow",m!=null?""+Math.round(m):"")}}return()=>{i.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,s,o,r]),x.useEffect(()=>{if(!r)return;const i=e.current;D(i,"Eager values not found");const{panelDataArray:c}=i,d=Kn(n,r);D(d!=null,`No group found for id "${n}"`);const f=Ze(n,r);D(f,`No resize handles found for group id "${n}"`);const m=f.map(u=>{const h=u.getAttribute(Y.resizeHandleId);D(h,"Resize handle element has no handle id attribute");const[p,v]=oa(n,h,c,r);if(p==null||v==null)return()=>{};const b=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();const S=c.findIndex(w=>w.id===p);if(S>=0){const w=c[S];D(w,`No panel data found for index ${S}`);const z=s[S],{collapsedSize:k=0,collapsible:N,minSize:j=0}=w.constraints;if(z!=null&&N){const O=We({delta:ie(z,k)?j-k:k-z,initialLayout:s,panelConstraints:c.map(E=>E.constraints),pivotIndices:Fn(n,h,r),prevLayout:s,trigger:"keyboard"});s!==O&&l(O)}}break}}};return u.addEventListener("keydown",b),()=>{u.removeEventListener("keydown",b)}});return()=>{m.forEach(u=>u())}},[r,t,e,n,s,o,l])}function Vt(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Zn(t,e){const n=t==="horizontal",{x:s,y:o}=ft(e);return n?s:o}function aa(t,e,n,s,o){const r=n==="horizontal",l=pt(e,o);D(l,`No resize handle element found for id "${e}"`);const i=l.getAttribute(Y.groupId);D(i,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=Zn(n,t),f=Kn(i,o);D(f,`No group element found for id "${i}"`);const m=f.getBoundingClientRect(),u=r?m.width:m.height;return(d-c)/u*100}function la(t,e,n,s,o,r){if(Tn(t)){const l=n==="horizontal";let i=0;t.shiftKey?i=100:o!=null?i=o:i=10;let c=0;switch(t.key){case"ArrowDown":c=l?0:i;break;case"ArrowLeft":c=l?-i:0;break;case"ArrowRight":c=l?i:0;break;case"ArrowUp":c=l?0:-i;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:aa(t,e,n,s,r)}function ia({panelDataArray:t}){const e=Array(t.length),n=t.map(r=>r.constraints);let s=0,o=100;for(let r=0;r<t.length;r++){const l=n[r];D(l,`Panel constraints not found for index ${r}`);const{defaultSize:i}=l;i!=null&&(s++,e[r]=i,o-=i)}for(let r=0;r<t.length;r++){const l=n[r];D(l,`Panel constraints not found for index ${r}`);const{defaultSize:i}=l;if(i!=null)continue;const c=t.length-s,d=o/c;s++,e[r]=d,o-=d}return e}function Oe(t,e,n){e.forEach((s,o)=>{const r=t[o];D(r,`Panel data not found for index ${o}`);const{callbacks:l,constraints:i,id:c}=r,{collapsedSize:d=0,collapsible:f}=i,m=n[c];if(m==null||s!==m){n[c]=s;const{onCollapse:u,onExpand:h,onResize:p}=l;p&&p(s,m),f&&(u||h)&&(h&&(m==null||xe(m,d))&&!xe(s,d)&&h(),u&&(m==null||!xe(m,d))&&xe(s,d)&&u())}})}function ot(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function ca({defaultSize:t,dragState:e,layout:n,panelData:s,panelIndex:o,precision:r=3}){const l=n[o];let i;return l==null?i=t!=null?t.toPrecision(r):"1":s.length===1?i="1":i=l.toPrecision(r),{flexBasis:0,flexGrow:i,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function da(t,e=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...o)},e)}}function Wt(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function qn(t){return`react-resizable-panels:${t}`}function Yn(t){return t.map(e=>{const{constraints:n,id:s,idIsFromProps:o,order:r}=e;return o?s:r?`${r}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Xn(t,e){try{const n=qn(t),s=e.getItem(n);if(s){const o=JSON.parse(s);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function ua(t,e,n){var s,o;const r=(s=Xn(t,n))!==null&&s!==void 0?s:{},l=Yn(e);return(o=r[l])!==null&&o!==void 0?o:null}function fa(t,e,n,s,o){var r;const l=qn(t),i=Yn(e),c=(r=Xn(t,o))!==null&&r!==void 0?r:{};c[i]={expandToSizes:Object.fromEntries(n.entries()),layout:s};try{o.setItem(l,JSON.stringify(c))}catch(d){console.error(d)}}function Ft({layout:t,panelConstraints:e}){const n=[...t],s=n.reduce((r,l)=>r+l,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(r=>`${r}%`).join(", ")}`);if(!ie(s,100)&&n.length>0)for(let r=0;r<e.length;r++){const l=n[r];D(l!=null,`No layout data found for index ${r}`);const i=100/s*l;n[r]=i}let o=0;for(let r=0;r<e.length;r++){const l=n[r];D(l!=null,`No layout data found for index ${r}`);const i=Be({panelConstraints:e,panelIndex:r,size:l});l!=i&&(o+=l-i,n[r]=i)}if(!ie(o,0))for(let r=0;r<e.length;r++){const l=n[r];D(l!=null,`No layout data found for index ${r}`);const i=l+o,c=Be({panelConstraints:e,panelIndex:r,size:i});if(l!==c&&(o-=c-l,n[r]=c,ie(o,0)))break}return n}const ma=100,Fe={getItem:t=>(Wt(Fe),Fe.getItem(t)),setItem:(t,e)=>{Wt(Fe),Fe.setItem(t,e)}},Kt={};function Jn({autoSaveId:t=null,children:e,className:n="",direction:s,forwardedRef:o,id:r=null,onLayout:l=null,keyboardResizeBy:i=null,storage:c=Fe,style:d,tagName:f="div",...m}){const u=Mt(r),h=x.useRef(null),[p,v]=x.useState(null),[b,g]=x.useState([]),S=ta(),w=x.useRef({}),z=x.useRef(new Map),k=x.useRef(0),N=x.useRef({autoSaveId:t,direction:s,dragState:p,id:u,keyboardResizeBy:i,onLayout:l,storage:c}),j=x.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});x.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),x.useImperativeHandle(o,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:y}=j.current;return y},setLayout:y=>{const{onLayout:P}=N.current,{layout:M,panelDataArray:I}=j.current,_=Ft({layout:y,panelConstraints:I.map(R=>R.constraints)});Vt(M,_)||(g(_),j.current.layout=_,P&&P(_),Oe(I,_,w.current))}}),[]),je(()=>{N.current.autoSaveId=t,N.current.direction=s,N.current.dragState=p,N.current.id=u,N.current.onLayout=l,N.current.storage=c}),ra({committedValuesRef:N,eagerValuesRef:j,groupId:u,layout:b,panelDataArray:j.current.panelDataArray,setLayout:g,panelGroupElement:h.current}),x.useEffect(()=>{const{panelDataArray:y}=j.current;if(t){if(b.length===0||b.length!==y.length)return;let P=Kt[t];P==null&&(P=da(fa,ma),Kt[t]=P);const M=[...y],I=new Map(z.current);P(t,M,I,b,c)}},[t,b,c]),x.useEffect(()=>{});const O=x.useCallback(y=>{const{onLayout:P}=N.current,{layout:M,panelDataArray:I}=j.current;if(y.constraints.collapsible){const _=I.map(oe=>oe.constraints),{collapsedSize:R=0,panelSize:U,pivotIndices:Z}=ye(I,y,M);if(D(U!=null,`Panel size not found for panel "${y.id}"`),!xe(U,R)){z.current.set(y.id,U);const ne=He(I,y)===I.length-1?U-R:R-U,V=We({delta:ne,initialLayout:M,panelConstraints:_,pivotIndices:Z,prevLayout:M,trigger:"imperative-api"});ot(M,V)||(g(V),j.current.layout=V,P&&P(V),Oe(I,V,w.current))}}},[]),E=x.useCallback((y,P)=>{const{onLayout:M}=N.current,{layout:I,panelDataArray:_}=j.current;if(y.constraints.collapsible){const R=_.map(se=>se.constraints),{collapsedSize:U=0,panelSize:Z=0,minSize:oe=0,pivotIndices:ne}=ye(_,y,I),V=P??oe;if(xe(Z,U)){const se=z.current.get(y.id),ce=se!=null&&se>=V?se:V,me=He(_,y)===_.length-1?Z-ce:ce-Z,J=We({delta:me,initialLayout:I,panelConstraints:R,pivotIndices:ne,prevLayout:I,trigger:"imperative-api"});ot(I,J)||(g(J),j.current.layout=J,M&&M(J),Oe(_,J,w.current))}}},[]),A=x.useCallback(y=>{const{layout:P,panelDataArray:M}=j.current,{panelSize:I}=ye(M,y,P);return D(I!=null,`Panel size not found for panel "${y.id}"`),I},[]),$=x.useCallback((y,P)=>{const{panelDataArray:M}=j.current,I=He(M,y);return ca({defaultSize:P,dragState:p,layout:b,panelData:M,panelIndex:I})},[p,b]),T=x.useCallback(y=>{const{layout:P,panelDataArray:M}=j.current,{collapsedSize:I=0,collapsible:_,panelSize:R}=ye(M,y,P);return D(R!=null,`Panel size not found for panel "${y.id}"`),_===!0&&xe(R,I)},[]),L=x.useCallback(y=>{const{layout:P,panelDataArray:M}=j.current,{collapsedSize:I=0,collapsible:_,panelSize:R}=ye(M,y,P);return D(R!=null,`Panel size not found for panel "${y.id}"`),!_||Ce(R,I)>0},[]),K=x.useCallback(y=>{const{panelDataArray:P}=j.current;P.push(y),P.sort((M,I)=>{const _=M.order,R=I.order;return _==null&&R==null?0:_==null?-1:R==null?1:_-R}),j.current.panelDataArrayChanged=!0,S()},[S]);je(()=>{if(j.current.panelDataArrayChanged){j.current.panelDataArrayChanged=!1;const{autoSaveId:y,onLayout:P,storage:M}=N.current,{layout:I,panelDataArray:_}=j.current;let R=null;if(y){const Z=ua(y,_,M);Z&&(z.current=new Map(Object.entries(Z.expandToSizes)),R=Z.layout)}R==null&&(R=ia({panelDataArray:_}));const U=Ft({layout:R,panelConstraints:_.map(Z=>Z.constraints)});Vt(I,U)||(g(U),j.current.layout=U,P&&P(U),Oe(_,U,w.current))}}),je(()=>{const y=j.current;return()=>{y.layout=[]}},[]);const H=x.useCallback(y=>{let P=!1;const M=h.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(P=!0),function(_){_.preventDefault();const R=h.current;if(!R)return()=>null;const{direction:U,dragState:Z,id:oe,keyboardResizeBy:ne,onLayout:V}=N.current,{layout:se,panelDataArray:ce}=j.current,{initialLayout:ue}=Z??{},me=Fn(oe,y,R);let J=la(_,y,U,Z,ne,R);const pe=U==="horizontal";pe&&P&&(J=-J);const ge=ce.map(Ne=>Ne.constraints),de=We({delta:J,initialLayout:ue??se,panelConstraints:ge,pivotIndices:me,prevLayout:se,trigger:Tn(_)?"keyboard":"mouse-or-touch"}),he=!ot(se,de);(Dn(_)||Ln(_))&&k.current!=J&&(k.current=J,!he&&J!==0?pe?wt(y,J<0?Hn:Bn):wt(y,J<0?Un:Gn):wt(y,0)),he&&(g(de),j.current.layout=de,V&&V(de),Oe(ce,de,w.current))}},[]),F=x.useCallback((y,P)=>{const{onLayout:M}=N.current,{layout:I,panelDataArray:_}=j.current,R=_.map(se=>se.constraints),{panelSize:U,pivotIndices:Z}=ye(_,y,I);D(U!=null,`Panel size not found for panel "${y.id}"`);const ne=He(_,y)===_.length-1?U-P:P-U,V=We({delta:ne,initialLayout:I,panelConstraints:R,pivotIndices:Z,prevLayout:I,trigger:"imperative-api"});ot(I,V)||(g(V),j.current.layout=V,M&&M(V),Oe(_,V,w.current))},[]),W=x.useCallback((y,P)=>{const{layout:M,panelDataArray:I}=j.current,{collapsedSize:_=0,collapsible:R}=P,{collapsedSize:U=0,collapsible:Z,maxSize:oe=100,minSize:ne=0}=y.constraints,{panelSize:V}=ye(I,y,M);V!=null&&(R&&Z&&xe(V,_)?xe(_,U)||F(y,U):V<ne?F(y,ne):V>oe&&F(y,oe))},[F]),ee=x.useCallback((y,P)=>{const{direction:M}=N.current,{layout:I}=j.current;if(!h.current)return;const _=pt(y,h.current);D(_,`Drag handle element not found for id "${y}"`);const R=Zn(M,P);v({dragHandleId:y,dragHandleRect:_.getBoundingClientRect(),initialCursorPosition:R,initialLayout:I})},[]),X=x.useCallback(()=>{v(null)},[]),ae=x.useCallback(y=>{const{panelDataArray:P}=j.current,M=He(P,y);M>=0&&(P.splice(M,1),delete w.current[y.id],j.current.panelDataArrayChanged=!0,S())},[S]),q=x.useMemo(()=>({collapsePanel:O,direction:s,dragState:p,expandPanel:E,getPanelSize:A,getPanelStyle:$,groupId:u,isPanelCollapsed:T,isPanelExpanded:L,reevaluatePanelConstraints:W,registerPanel:K,registerResizeHandle:H,resizePanel:F,startDragging:ee,stopDragging:X,unregisterPanel:ae,panelGroupElement:h.current}),[O,p,s,E,A,$,u,T,L,W,K,H,F,ee,X,ae]),Q={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return x.createElement(ut.Provider,{value:q},x.createElement(f,{...m,children:e,className:n,id:r,ref:h,style:{...Q,...d},[Y.group]:"",[Y.groupDirection]:s,[Y.groupId]:u}))}const Qn=x.forwardRef((t,e)=>x.createElement(Jn,{...t,forwardedRef:e}));Jn.displayName="PanelGroup";Qn.displayName="forwardRef(PanelGroup)";function He(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ye(t,e,n){const s=He(t,e),r=s===t.length-1?[s-1,s]:[s,s+1],l=n[s];return{...e.constraints,panelSize:l,pivotIndices:r}}function pa({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:s}){x.useEffect(()=>{if(t||n==null||s==null)return;const o=pt(e,s);if(o==null)return;const r=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const i=o.getAttribute(Y.groupId);D(i,`No group element found for id "${i}"`);const c=Ze(i,s),d=Wn(i,e,s);D(d!==null,`No resize element found for id "${e}"`);const f=l.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return o.addEventListener("keydown",r),()=>{o.removeEventListener("keydown",r)}},[s,t,e,n])}function es({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:s,id:o,onBlur:r,onClick:l,onDragging:i,onFocus:c,onPointerDown:d,onPointerUp:f,style:m={},tabIndex:u=0,tagName:h="div",...p}){var v,b;const g=x.useRef(null),S=x.useRef({onClick:l,onDragging:i,onPointerDown:d,onPointerUp:f});x.useEffect(()=>{S.current.onClick=l,S.current.onDragging=i,S.current.onPointerDown=d,S.current.onPointerUp=f});const w=x.useContext(ut);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:z,groupId:k,registerResizeHandle:N,startDragging:j,stopDragging:O,panelGroupElement:E}=w,A=Mt(o),[$,T]=x.useState("inactive"),[L,K]=x.useState(!1),[H,F]=x.useState(null),W=x.useRef({state:$});je(()=>{W.current.state=$}),x.useEffect(()=>{if(n)F(null);else{const q=N(A);F(()=>q)}},[n,A,N]);const ee=(v=s?.coarse)!==null&&v!==void 0?v:15,X=(b=s?.fine)!==null&&b!==void 0?b:5;x.useEffect(()=>{if(n||H==null)return;const q=g.current;D(q,"Element ref not attached");let Q=!1;return Qr(A,q,z,{coarse:ee,fine:X},(P,M,I)=>{if(!M){T("inactive");return}switch(P){case"down":{T("drag"),Q=!1,D(I,'Expected event to be defined for "down" action'),j(A,I);const{onDragging:_,onPointerDown:R}=S.current;_?.(!0),R?.();break}case"move":{const{state:_}=W.current;Q=!0,_!=="drag"&&T("hover"),D(I,'Expected event to be defined for "move" action'),H(I);break}case"up":{T("hover"),O();const{onClick:_,onDragging:R,onPointerUp:U}=S.current;R?.(!1),U?.(),Q||_?.();break}}})},[ee,z,n,X,N,A,H,j,O]),pa({disabled:n,handleId:A,resizeHandler:H,panelGroupElement:E});const ae={touchAction:"none",userSelect:"none"};return x.createElement(h,{...p,children:t,className:e,id:o,onBlur:()=>{K(!1),r?.()},onFocus:()=>{K(!0),c?.()},ref:g,role:"separator",style:{...ae,...m},tabIndex:u,[Y.groupDirection]:z,[Y.groupId]:k,[Y.resizeHandle]:"",[Y.resizeHandleActive]:$==="drag"?"pointer":L?"keyboard":void 0,[Y.resizeHandleEnabled]:!n,[Y.resizeHandleId]:A,[Y.resizeHandleState]:$})}es.displayName="PanelResizeHandle";function ha(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=B("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[3]=n,e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==o?(r=a.jsx(Qn,{"data-slot":"resizable-panel-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=r):r=e[7],r}function ts(t){const e=C.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==n?(s=a.jsx(An,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=s):s=e[3],s}function xa(t){const e=C.c(12);let n,s,o;e[0]!==t?({withHandle:o,className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);let r;e[4]!==n?(r=B("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=r):r=e[5];let l;e[6]!==o?(l=o&&a.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a.jsx(mn,{className:"size-2.5"})}),e[6]=o,e[7]=l):l=e[7];let i;return e[8]!==s||e[9]!==r||e[10]!==l?(i=a.jsx(es,{"data-slot":"resizable-handle",className:r,...s,children:l}),e[8]=s,e[9]=r,e[10]=l,e[11]=i):i=e[11],i}function ns(){const t=C.c(3),{toggleSidebar:e}=Pt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(xn,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:20}),t[0]=n):n=t[0];let s;return t[1]!==e?(s=a.jsx(a.Fragment,{children:a.jsx(we,{onClick:e,size:"icon",variant:"ghost",className:"w-8 h-8 rounded-md",children:n})}),t[1]=e,t[2]=s):s=t[2],s}ns.Skeleton=function(){return a.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})};const ga="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function Zt(t){const e=C.c(18),{showSidebarToggle:n,showOrgSwitcher:s,showDecoChat:o}=t,r=n===void 0?!1:n,l=s===void 0?!1:s,i=o===void 0?!1:o,[,c]=It();let d;e[0]!==c?(d=()=>c(ba),e[0]=c,e[1]=d):d=e[1];const f=d;let m;e[2]!==r?(m=r&&a.jsx(st.Sidebar,{children:a.jsx(ns,{})}),e[2]=r,e[3]=m):m=e[3];let u;e[4]!==l?(u=l&&a.jsx(x.Suspense,{fallback:a.jsx(zt.Skeleton,{}),children:a.jsx(zt,{})}),e[4]=l,e[5]=u):u=e[5];let h;e[6]!==u?(h=a.jsx(st.Left,{children:u}),e[6]=u,e[7]=h):h=e[7];let p;e[8]!==i||e[9]!==f?(p=i&&a.jsxs(we,{size:"sm",variant:"default",onClick:f,children:[a.jsx(Ve,{url:ga,fallback:"DC",size:"2xs",className:"rounded-sm"}),"deco chat"]}),e[8]=i,e[9]=f,e[10]=p):p=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Rr,{}),e[11]=v):v=e[11];let b;e[12]!==p?(b=a.jsxs(st.Right,{className:"gap-2",children:[p,v]}),e[12]=p,e[13]=b):b=e[13];let g;return e[14]!==b||e[15]!==m||e[16]!==h?(g=a.jsxs(st,{children:[m,h,b]}),e[14]=b,e[15]=m,e[16]=h,e[17]=g):g=e[17],g}function ba(t){return!t}function va(t){const e=C.c(10),{children:n,className:s}=t,[,o]=x.useTransition();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Ye.decoChatPanelWidth(),e[0]=r):r=e[0];const[l,i]=Ge(r,30);let c;e[1]!==i?(c=u=>o(()=>i(u)),e[1]=i,e[2]=c):c=e[2];const d=c;let f;e[3]!==s?(f=B("min-w-0",s),e[3]=s,e[4]=f):f=e[4];let m;return e[5]!==l||e[6]!==n||e[7]!==d||e[8]!==f?(m=a.jsx(ts,{defaultSize:l,minSize:20,className:f,onResize:d,children:n}),e[5]=l,e[6]=n,e[7]=d,e[8]=f,e[9]=m):m=e[9],m}function ya(t){const e=C.c(5),{children:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Ye.sidebarOpen(),e[0]=s):s=e[0];const[o,r]=Ge(s,!0);let l;return e[1]!==n||e[2]!==r||e[3]!==o?(l=a.jsx(Ho,{open:o,onOpenChange:r,children:n}),e[1]=n,e[2]=r,e[3]=o,e[4]=l):l=e[4],l}function Sa(){const t=C.c(9),[e]=It();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(ts,{className:"bg-background",children:a.jsx(Qt,{})}),t[0]=n):n=t[0];let s;t[1]!==e?(s=a.jsx(xa,{withHandle:e}),t[1]=e,t[2]=s):s=t[2];const o=e?"max-w-none":"max-w-0";let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(_t,{children:a.jsx(x.Suspense,{fallback:a.jsx(Ks,{}),children:a.jsx(wo,{})})}),t[3]=r):r=t[3];let l;t[4]!==o?(l=a.jsx(va,{className:o,children:r}),t[4]=o,t[5]=l):l=t[5];let i;return t[6]!==s||t[7]!==l?(i=a.jsxs(ha,{direction:"horizontal",children:[n,s,l]}),t[6]=s,t[7]=l,t[8]=i):i=t[8],i}function ja(){const t=C.c(19);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=Xt(e);let s;t[1]!==n?(s=Yt.activeOrganization(n),t[1]=n,t[2]=s):s=t[2];let o;t[3]!==n?(o=async()=>{if(!n)return null;const{data:h}=await qe.organization.setActive({organizationSlug:n});return{org:h,project:{slug:Es}}},t[3]=n,t[4]=o):o=t[4];let r;t[5]!==s||t[6]!==o?(r={queryKey:s,queryFn:o,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=s,t[6]=o,t[7]=r):r=t[7];const{data:l}=qt(r);if(!l){let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h=a.jsx(Zt,{}),t[8]=h):h=t[8];let p;return t[9]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsxs("div",{className:"min-h-screen bg-background",children:[h,a.jsx("div",{className:"pt-12",children:a.jsx(Qt,{})})]}),t[9]=p):p=t[9],p}let i;t[10]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Zt,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0}),t[10]=i):i=t[10];let c;t[11]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[11]=c):c=t[11];let d;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(or,{}),t[12]=d):d=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(ya,{children:a.jsxs("div",{className:"flex flex-col h-screen",children:[i,a.jsxs(Go,{className:"flex-1 bg-sidebar",style:c,children:[d,a.jsx(Wo,{className:"pt-12",children:a.jsx(Sa,{})})]})]})}),t[13]=f):f=t[13];let m;t[14]!==l.org.slug?(m=a.jsx(co,{children:f},l.org.slug),t[14]=l.org.slug,t[15]=m):m=t[15];let u;return t[16]!==l||t[17]!==m?(u=a.jsx(Ms,{...l,children:m}),t[16]=l,t[17]=m,t[18]=u):u=t[18],u}function dl(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Ar,{children:a.jsx(x.Suspense,{fallback:a.jsx(Jt,{}),children:a.jsx(ja,{})})}),t[0]=e):e=t[0],e}export{dl as default};
@@ -1 +0,0 @@
1
- import{c as y,f as K,K as q}from"./index-DDrssUsd.js";function S(p){const e=y.c(23);let s,o,r,t,l;e[0]!==p?({toolCaller:r,toolName:l,toolInputParams:t,scope:o,...s}=p,e[0]=p,e[1]=s,e[2]=o,e[3]=r,e[4]=t,e[5]=l):(s=e[1],o=e[2],r=e[3],t=e[4],l=e[5]);let a,u,i,c;if(e[6]!==s||e[7]!==o||e[8]!==t||e[9]!==l){const f=JSON.stringify(t);c=K,a=s,u=s.staleTime??6e4,i=q.toolCall(o,l,f),e[6]=s,e[7]=o,e[8]=t,e[9]=l,e[10]=a,e[11]=u,e[12]=i,e[13]=c}else a=e[10],u=e[11],i=e[12],c=e[13];let n;e[14]!==r||e[15]!==t||e[16]!==l?(n=async()=>await r(l,t),e[14]=r,e[15]=t,e[16]=l,e[17]=n):n=e[17];let m;return e[18]!==a||e[19]!==u||e[20]!==i||e[21]!==n?(m={...a,staleTime:u,queryKey:i,queryFn:n},e[18]=a,e[19]=u,e[20]=i,e[21]=n,e[22]=m):m=e[22],c(m)}export{S as u};
@@ -1 +0,0 @@
1
- import{at as u,ap as s}from"./index-DDrssUsd.js";function t(e,r){return u(e,s,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{be as e,V as t}from"./index-DDrssUsd.js";function n(...r){return e(t(r))}export{n as c};