decocms 2.186.6 → 2.186.7

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 (234) hide show
  1. package/dist/client/assets/{AlertCircle-CMykqSBg.js → AlertCircle-CE4aMC_6.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-uGR-9mNu.js → ArrowLeft-VzQjF5nf.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-nzMjud7y.js → ArrowUp-DVMY0e13.js} +1 -1
  4. package/dist/client/assets/{Check-xiDQ8BtU.js → Check-BgcEZAFd.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-Br-9w7at.js → ChevronDown-Ca93y5Zg.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-9oNUepCi.js → ChevronRight-iThFOnTS.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-Cn8mueH6.js → ChevronUp-Dfrjh0kb.js} +1 -1
  8. package/dist/client/assets/{Container-2jV0v6El.js → Container-BQWbDEy6.js} +1 -1
  9. package/dist/client/assets/{Dataflow03-DxoSS6Mb.js → Dataflow03-DdTzEDv9.js} +1 -1
  10. package/dist/client/assets/{FolderClosed-rSkxBpcc.js → FolderClosed-jb7WzUeW.js} +1 -1
  11. package/dist/client/assets/{Loading01-BcvCGReP.js → Loading01-CrI0NwPE.js} +1 -1
  12. package/dist/client/assets/{Play-CfPk1Jil.js → Play-DSddPPya.js} +1 -1
  13. package/dist/client/assets/{Plus-_0WPT4fC.js → Plus-ltkKoqJz.js} +1 -1
  14. package/dist/client/assets/{RefreshCcw01-7vLfxx-h.js → RefreshCcw01-DN-y3At7.js} +1 -1
  15. package/dist/client/assets/{SearchMd-Drvt0RJI.js → SearchMd-CS43V34Y.js} +1 -1
  16. package/dist/client/assets/{Settings01-BWfYiv65.js → Settings01-ClJz1ULQ.js} +1 -1
  17. package/dist/client/assets/{Trash01-1xYo27RH.js → Trash01-fCw8HP0s.js} +1 -1
  18. package/dist/client/assets/{Type01-BYtXAD5n.js → Type01-Dp2k0by5.js} +1 -1
  19. package/dist/client/assets/{Upload01-B0BJCQ_e.js → Upload01-3AVPYkeL.js} +1 -1
  20. package/dist/client/assets/{User01-BeQd85RG.js → User01-CKoZ8ZDH.js} +1 -1
  21. package/dist/client/assets/{X-COxH8ezg.js → X-BNpME-HX.js} +1 -1
  22. package/dist/client/assets/{XCircle-DF_H_9sl.js → XCircle-MpsZU5qt.js} +1 -1
  23. package/dist/client/assets/{XClose-DN7ytwf7.js → XClose-DKDxXEaA.js} +1 -1
  24. package/dist/client/assets/{Zap-EKbyzC1z.js → Zap-kD49gPEF.js} +1 -1
  25. package/dist/client/assets/{agent-connections-preview-BJR4An4x.js → agent-connections-preview-DusvXNLB.js} +1 -1
  26. package/dist/client/assets/{agent-detail-S7Xnyf74.js → agent-detail-B-PecVBx.js} +1 -1
  27. package/dist/client/assets/{agents-DGMB2xM-.js → agents-DTWgODy0.js} +1 -1
  28. package/dist/client/assets/{ai-providers-logos-AsQMrQkI.js → ai-providers-logos-Bp_JBc4Z.js} +1 -1
  29. package/dist/client/assets/{alert-dialog-CahR3t2-.js → alert-dialog-DPu-w5FH.js} +1 -1
  30. package/dist/client/assets/{auth-catchall-CuUUPNMf.js → auth-catchall-CVoq5acq.js} +1 -1
  31. package/dist/client/assets/{automation-detail-D21R_NZo.js → automation-detail-BtlNzqYH.js} +1 -1
  32. package/dist/client/assets/{automations-BDE5mXwW.js → automations-B9MMi9MY.js} +1 -1
  33. package/dist/client/assets/{avatar-CUJtyPo2.js → avatar-DJ_eE6FL.js} +1 -1
  34. package/dist/client/assets/{badge-CED9DV1z.js → badge-Dg_rRuRo.js} +1 -1
  35. package/dist/client/assets/{breadcrumb-CCQEGtsd.js → breadcrumb-B3Pzyfpg.js} +1 -1
  36. package/dist/client/assets/{card-CPxXaS9B.js → card-CQTuw0Xi.js} +1 -1
  37. package/dist/client/assets/{checkbox-BkHtMStR.js → checkbox-pwwqVDt-.js} +1 -1
  38. package/dist/client/assets/{collapsible-B030Rvpo.js → collapsible-BpfdSPbv.js} +1 -1
  39. package/dist/client/assets/{collection-detail-6j0HNb-_.js → collection-detail-7hb0Mplz.js} +1 -1
  40. package/dist/client/assets/{collection-display-button--wDfVH13.js → collection-display-button-DgaN6ief.js} +1 -1
  41. package/dist/client/assets/{collection-search-DpxIEj2Y.js → collection-search-BxbLLE-D.js} +1 -1
  42. package/dist/client/assets/{collection-table-wrapper-fDncVs5S.js → collection-table-wrapper-DhM52ivn.js} +1 -1
  43. package/dist/client/assets/{collection-tabs-CqPectm8.js → collection-tabs-B87Atjwc.js} +1 -1
  44. package/dist/client/assets/{collections-D4sy0Xs0.js → collections-pcWRi6G6.js} +1 -1
  45. package/dist/client/assets/{command-BeBA7wJA.js → command-CIWQeRGP.js} +1 -1
  46. package/dist/client/assets/{connection-card-Bji8m80q.js → connection-card-CM5AlZwH.js} +1 -1
  47. package/dist/client/assets/{connection-detail-CGya4X8s.js → connection-detail-O3fmkpqe.js} +1 -1
  48. package/dist/client/assets/{connections-CzVW7p9D.js → connections-BCkT2NPr.js} +1 -1
  49. package/dist/client/assets/{constants-C2mKle9u.js → constants-B7D0VCWO.js} +1 -1
  50. package/dist/client/assets/constants-B_S2_Dfe.js +1 -0
  51. package/dist/client/assets/{context-BiAMhAiB.js → context-IJmL4QO_.js} +1 -1
  52. package/dist/client/assets/{create-organization-dialog-MUEiKqL8.js → create-organization-dialog-ixA2WoW7.js} +1 -1
  53. package/dist/client/assets/{create-project-dialog-B8VM2kbV.js → create-project-dialog-B6n_03Ug.js} +1 -1
  54. package/dist/client/assets/{danger-CCuvZ302.js → danger-CYvp_RGb.js} +1 -1
  55. package/dist/client/assets/{danger-zone-R1YnFMha.js → danger-zone-xpmW0-9o.js} +1 -1
  56. package/dist/client/assets/{dependencies-usSRHhHV.js → dependencies-C9e_dQDy.js} +1 -1
  57. package/dist/client/assets/{dialog-DkflQEEK.js → dialog-Ce95gXqs.js} +1 -1
  58. package/dist/client/assets/{drawer-CWTdsYcu.js → drawer-ByM8CEL_.js} +1 -1
  59. package/dist/client/assets/{dropdown-menu-CPUZgeQt.js → dropdown-menu-BT7g2ayh.js} +1 -1
  60. package/dist/client/assets/{dynamic-plugin-layout-COn0BiTQ.js → dynamic-plugin-layout-exCUjntN.js} +1 -1
  61. package/dist/client/assets/{editable-task-title-CXF21pnu.js → editable-task-title-wQy-5KA-.js} +1 -1
  62. package/dist/client/assets/{empty-state-mZytJ7Og.js → empty-state-8546_PpL.js} +1 -1
  63. package/dist/client/assets/{empty-state-DLNIkqnc.js → empty-state-CjwgvmoI.js} +1 -1
  64. package/dist/client/assets/{env-vars-editor-74-7rifU.js → env-vars-editor-Cn7u3DNm.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-0iT2_wST.js → extract-connection-data-OUAaU9Od.js} +1 -1
  66. package/dist/client/assets/{form-DTthvfe9.js → form-BxnLhCD_.js} +1 -1
  67. package/dist/client/assets/{general-g1xkIict.js → general-CnJT7yxb.js} +1 -1
  68. package/dist/client/assets/{home-29e6ki_m.js → home-CVvG2Fqq.js} +1 -1
  69. package/dist/client/assets/{import-from-deco-dialog-1gjK7_AP.js → import-from-deco-dialog-Chrnp3Cw.js} +1 -1
  70. package/dist/client/assets/{index-ZixwJ1Pk.js → index-3yf2NnlI.js} +1 -1
  71. package/dist/client/assets/{index-DIir8pgm.js → index-B62MiQAu.js} +2 -2
  72. package/dist/client/assets/{index-DTnP3oIT.js → index-BcOdsrKl.js} +1 -1
  73. package/dist/client/assets/{index-CuI-2Tt-.js → index-C-wrel8E.js} +1 -1
  74. package/dist/client/assets/{index--5l6Kd5l.js → index-CMA-66KF.js} +1 -1
  75. package/dist/client/assets/{index-Cb6NnGWb.js → index-CsLoKsqY.js} +1 -1
  76. package/dist/client/assets/{index-DIiriVeM.js → index-DAKvcNkQ.js} +1 -1
  77. package/dist/client/assets/{index-B_aEJlRD.js → index-DNarCA5m.js} +1 -1
  78. package/dist/client/assets/{index-DcP_WR0J.js → index-DXw26Swq.js} +1 -1
  79. package/dist/client/assets/{index-Dz9R7lP6.js → index-DehDS4SM.js} +1 -1
  80. package/dist/client/assets/{index-DoQQIBf1.js → index-DrtlaMfG.js} +1 -1
  81. package/dist/client/assets/{infiniteQueryObserver-D_1D5AYq.js → infiniteQueryObserver-C4rkYsAc.js} +1 -1
  82. package/dist/client/assets/{input-BVAvDQ_C.js → input-BNSWRvAr.js} +1 -1
  83. package/dist/client/assets/{integration-icon-B_0G_X87.js → integration-icon-BByVvYW2.js} +1 -1
  84. package/dist/client/assets/{label-C6omQTs_.js → label-C-5U7XF4.js} +1 -1
  85. package/dist/client/assets/{layout-D4tWA0bw.js → layout-CxMMzlDg.js} +1 -1
  86. package/dist/client/assets/{layout-AYXb28rc.js → layout-DuIBVgOo.js} +1 -1
  87. package/dist/client/assets/{login-Cx7hoJoT.js → login-ayW5J8kp.js} +1 -1
  88. package/dist/client/assets/{logo-upload-FTAEWKjw.js → logo-upload-Cnlppzw5.js} +1 -1
  89. package/dist/client/assets/{mcp-app-renderer-DDZtzzcL.js → mcp-app-renderer-C5hh7NUh.js} +1 -1
  90. package/dist/client/assets/{mcp-server-card-C8wXu9yO.js → mcp-server-card-3TrMzryK.js} +1 -1
  91. package/dist/client/assets/{mcp-server-detail-BVknczom.js → mcp-server-detail-BHg2jU2j.js} +2 -2
  92. package/dist/client/assets/{members-CczX95O-.js → members-DR64AFBa.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-BF2WLfQD.js → monaco-editor-0MGgMe6Z.js} +1 -1
  94. package/dist/client/assets/{monitoring-dashboard-edit-6dYajQ_1.js → monitoring-dashboard-edit-D0wDbirt.js} +1 -1
  95. package/dist/client/assets/{monitoring-dashboard-view-C154UPGx.js → monitoring-dashboard-view-Cye--xow.js} +1 -1
  96. package/dist/client/assets/{monitoring-stats-row-C6qBbHow.js → monitoring-stats-row-Br-gOcw_.js} +1 -1
  97. package/dist/client/assets/{monitoring-9XsThidn.js → monitoring-zjAHbr2Y.js} +1 -1
  98. package/dist/client/assets/{oauth-callback-3Syoq1nk.js → oauth-callback-C5qRKz1E.js} +1 -1
  99. package/dist/client/assets/{oauth-callback-ai-provider-udnTMnIE.js → oauth-callback-ai-provider-Belxh9YS.js} +1 -1
  100. package/dist/client/assets/{org-ai-providers-BZX8CBbC.js → org-ai-providers-vLOcM2IN.js} +1 -1
  101. package/dist/client/assets/{page-B8I6CLK9.js → page-Bk-6gYjF.js} +1 -1
  102. package/dist/client/assets/{page-DG6axqmW.js → page-D9taTz3x.js} +1 -1
  103. package/dist/client/assets/{plugin-empty-state-Bt8UXvj0.js → plugin-empty-state-DwTx3Irb.js} +1 -1
  104. package/dist/client/assets/{plugin-header-DT9lR12I.js → plugin-header-_SJ-AMks.js} +1 -1
  105. package/dist/client/assets/plugins-_-cF0kV-.js +1 -0
  106. package/dist/client/assets/{popover-BMBGvHQ_.js → popover-CW4G5neq.js} +1 -1
  107. package/dist/client/assets/{project-app-view-fuhRg8H7.js → project-app-view-Cxge46GP.js} +1 -1
  108. package/dist/client/assets/{project-layout-DWnRAr4s.js → project-layout-CszLr05H.js} +1 -1
  109. package/dist/client/assets/{project-plugins-CRqpdPvu.js → project-plugins-CB_lBTqe.js} +1 -1
  110. package/dist/client/assets/{projects-list-Dl8bD1xL.js → projects-list-BAFLJ8Ur.js} +1 -1
  111. package/dist/client/assets/{registry-layout-CdBoBkB6.js → registry-layout-BFPpF2ab.js} +1 -1
  112. package/dist/client/assets/{registry-utils-pfpET92F.js → registry-utils-DWGplsmC.js} +1 -1
  113. package/dist/client/assets/{reset-password-BL4AtRcT.js → reset-password-D2kT9zWB.js} +1 -1
  114. package/dist/client/assets/{resizable-CcW4J8VD.js → resizable-DFwU4W6w.js} +1 -1
  115. package/dist/client/assets/{save-actions-3dOJ5Mjm.js → save-actions-CmbT6lbz.js} +1 -1
  116. package/dist/client/assets/{scroll-area-Bqfa6wPc.js → scroll-area-DEb4D9kS.js} +1 -1
  117. package/dist/client/assets/{select-CBE7xbF4.js → select-BY6esNmT.js} +1 -1
  118. package/dist/client/assets/{select-virtual-mcp-Bco91LS8.js → select-virtual-mcp-C6Eik732.js} +1 -1
  119. package/dist/client/assets/{shell-layout-BVpZ2wZ-.js → shell-layout-BPQbdNig.js} +2 -2
  120. package/dist/client/assets/{sidebar-settings-BpXHJmnQ.js → sidebar-settings-LoxM-jfH.js} +1 -1
  121. package/dist/client/assets/{skeleton-CQd2QEI9.js → skeleton-H6tvOoEj.js} +1 -1
  122. package/dist/client/assets/{spinner-DCPsu4ZG.js → spinner-X15c9Qjw.js} +1 -1
  123. package/dist/client/assets/{store-invite-D4qgWC83.js → store-invite-CbJMqLqm.js} +1 -1
  124. package/dist/client/assets/{switch-CDhXZx5x.js → switch-1W8o5vam.js} +1 -1
  125. package/dist/client/assets/{table-CGhKFeKb.js → table-oKRuJlES.js} +1 -1
  126. package/dist/client/assets/{tabs-BMh4okm_.js → tabs-wloAa-G_.js} +1 -1
  127. package/dist/client/assets/{task-status-2ts0kYwT.js → task-status-DtA3vCfp.js} +1 -1
  128. package/dist/client/assets/tasks-DYQdfmG5.js +1 -0
  129. package/dist/client/assets/{tasks-panel-0RmxrVW1.js → tasks-panel-CfTCpIaN.js} +1 -1
  130. package/dist/client/assets/{textarea-CdQzy4Ij.js → textarea-Db5eGrte.js} +1 -1
  131. package/dist/client/assets/{time-range-picker-obtb96_y.js → time-range-picker-kvCom5E0.js} +1 -1
  132. package/dist/client/assets/{toggle-group-BvQ8i1-N.js → toggle-group-nuX--X8U.js} +1 -1
  133. package/dist/client/assets/{tools-list-SV45eRcg.js → tools-list-CzNHOfxQ.js} +1 -1
  134. package/dist/client/assets/{tooltip-iG9fvlrZ.js → tooltip-Cz2tQy7f.js} +1 -1
  135. package/dist/client/assets/{types-BJ15oicG.js → types-B85FeN8J.js} +1 -1
  136. package/dist/client/assets/{use-automations-DDYigIn8.js → use-automations-Bmzs_h6Z.js} +1 -1
  137. package/dist/client/assets/{use-collections-CeVeE6L5.js → use-collections-Cw-CkhM5.js} +1 -1
  138. package/dist/client/assets/{use-connection-B3ekSVUc.js → use-connection-u5F7YTDM.js} +1 -1
  139. package/dist/client/assets/{use-copy-DFqHt08d.js → use-copy-DXoYLkGY.js} +1 -1
  140. package/dist/client/assets/{use-create-virtual-mcp-J-6A5Uhg.js → use-create-virtual-mcp-B6BY4hNy.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-DbO9lGzn.js → use-infinite-scroll-BCAoqpbu.js} +1 -1
  142. package/dist/client/assets/{use-install-from-registry-BKwLRanW.js → use-install-from-registry-Bh4CcElp.js} +1 -1
  143. package/dist/client/assets/{use-list-state-BSx7RPGJ.js → use-list-state-J17yqbOy.js} +1 -1
  144. package/dist/client/assets/{use-mcp-prompts-ClavsAnj.js → use-mcp-prompts-C4rv2YNo.js} +1 -1
  145. package/dist/client/assets/{use-mcp-resources-BuE1rP0c.js → use-mcp-resources-C2RRZo8d.js} +1 -1
  146. package/dist/client/assets/{use-mcp-tools-JDKA9UZ8.js → use-mcp-tools-CS9dH9Hk.js} +1 -1
  147. package/dist/client/assets/{use-members-DNGgajFa.js → use-members-L6twvwj_.js} +1 -1
  148. package/dist/client/assets/{use-project-DvVOFuu-.js → use-project-DmzlV8IR.js} +1 -1
  149. package/dist/client/assets/{use-store-discovery-dPavPbA-.js → use-store-discovery-B_zVCnQi.js} +1 -1
  150. package/dist/client/assets/{use-view-mode-BijqAGDe.js → use-view-mode-DDZQlalb.js} +1 -1
  151. package/dist/client/assets/{use-virtual-mcp-DXFVfjMZ.js → use-virtual-mcp-BQ1ML2v_.js} +1 -1
  152. package/dist/client/assets/useInfiniteQuery-D_7z7Ekt.js +1 -0
  153. package/dist/client/assets/{useMutation-DPjXSTSD.js → useMutation-5tF0rOhi.js} +1 -1
  154. package/dist/client/assets/useQuery-Cr3Ibn6v.js +1 -0
  155. package/dist/client/assets/useSuspenseInfiniteQuery-UikfpG9C.js +1 -0
  156. package/dist/client/assets/{user-BAgoGcDp.js → user-Wn7CHNY8.js} +1 -1
  157. package/dist/client/assets/{workflow-CrjjFLE3.js → workflow-CehUk0kO.js} +1 -1
  158. package/dist/client/assets/{workflow-DCKJ21al.js → workflow-DGOWYrJv.js} +1 -1
  159. package/dist/client/index.html +1 -1
  160. package/dist/server/cli.js +338 -337
  161. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  162. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  163. package/dist/server/node_modules/ansi-styles/license +9 -0
  164. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  165. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  166. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  167. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  168. package/dist/server/node_modules/mimic-fn/license +9 -0
  169. package/dist/server/node_modules/mimic-fn/package.json +42 -0
  170. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  171. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  172. package/dist/server/node_modules/pg-int8/README.md +16 -0
  173. package/dist/server/node_modules/pg-int8/index.js +100 -0
  174. package/dist/server/node_modules/pg-int8/package.json +24 -0
  175. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  176. package/dist/server/node_modules/postgres-array/index.js +97 -0
  177. package/dist/server/node_modules/postgres-array/license +21 -0
  178. package/dist/server/node_modules/postgres-array/package.json +35 -0
  179. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  180. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  181. package/dist/server/node_modules/postgres-bytea/license +21 -0
  182. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  183. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  184. package/dist/server/node_modules/postgres-date/index.js +116 -0
  185. package/dist/server/node_modules/postgres-date/license +21 -0
  186. package/dist/server/node_modules/postgres-date/package.json +33 -0
  187. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  188. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  189. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  190. package/dist/server/node_modules/postgres-interval/license +21 -0
  191. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  192. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  193. package/dist/server/node_modules/split2/LICENSE +13 -0
  194. package/dist/server/node_modules/split2/README.md +85 -0
  195. package/dist/server/node_modules/split2/bench.js +27 -0
  196. package/dist/server/node_modules/split2/index.js +141 -0
  197. package/dist/server/node_modules/split2/package.json +39 -0
  198. package/dist/server/node_modules/split2/test.js +409 -0
  199. package/dist/server/node_modules/xtend/.jshintrc +30 -0
  200. package/dist/server/node_modules/{pg → xtend}/LICENSE +6 -7
  201. package/dist/server/node_modules/xtend/README.md +32 -0
  202. package/dist/server/node_modules/xtend/immutable.js +19 -0
  203. package/dist/server/node_modules/xtend/mutable.js +17 -0
  204. package/dist/server/node_modules/xtend/package.json +55 -0
  205. package/dist/server/node_modules/xtend/test.js +103 -0
  206. package/dist/server/server.js +269 -269
  207. package/package.json +1 -1
  208. package/dist/client/assets/constants-CUwoz2Qc.js +0 -1
  209. package/dist/client/assets/plugins-S0nxg7Xk.js +0 -1
  210. package/dist/client/assets/tasks-DR3nWr8j.js +0 -1
  211. package/dist/client/assets/useInfiniteQuery-DfmHdhse.js +0 -1
  212. package/dist/client/assets/useQuery-BJg_09kQ.js +0 -1
  213. package/dist/client/assets/useSuspenseInfiniteQuery-xbYvMmn4.js +0 -1
  214. package/dist/server/node_modules/pg/README.md +0 -95
  215. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  216. package/dist/server/node_modules/pg/lib/client.js +0 -743
  217. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  218. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  219. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  220. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  221. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  222. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  223. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  224. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  225. package/dist/server/node_modules/pg/lib/index.js +0 -73
  226. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  227. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  228. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  229. package/dist/server/node_modules/pg/lib/query.js +0 -252
  230. package/dist/server/node_modules/pg/lib/result.js +0 -109
  231. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  232. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  233. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  234. package/dist/server/node_modules/pg/package.json +0 -76
@@ -1 +1 @@
1
- import{d as K,j as t,c as ue,x as fe,r as pe,y as ne,K as ee,B as xe,w as re}from"./index-DIir8pgm.js";import{u as he}from"./useQuery-BJg_09kQ.js";import{u as oe}from"./useMutation-DPjXSTSD.js";import{b as je,P as ge,a as Ce}from"./popover-BMBGvHQ_.js";import{C as be,a as Ne,b as ve,c as ye,d as Ee,e as Te}from"./command-BeBA7wJA.js";import{s as _e}from"./Plus-_0WPT4fC.js";import{i as Ie}from"./X-COxH8ezg.js";import{b as Pe}from"./use-connection-B3ekSVUc.js";import{a as Se,u as we}from"./constants-C2mKle9u.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-DIiriVeM.js";import"./SearchMd-Drvt0RJI.js";import"./use-collections-CeVeE6L5.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function Oe(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=we(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let w;e[13]!==u?(w=s=>u.has(s.id),e[13]=u,e[14]=w):w=e[14];const I=(a??[]).filter(w);let O;e[15]!==u?(O=s=>!u.has(s.id),e[15]=u,e[16]=O):O=e[16];const le=(a??[]).filter(O);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=ve;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=Ne;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let N;e[47]!==H||e[48]!==W?(N=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=N):N=e[49];let v;e[50]!==Y||e[51]!==b||e[52]!==N?(v=t.jsxs(Y,{children:[b,N]}),e[50]=Y,e[51]=b,e[52]=N,e[53]=v):v=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==v?(y=t.jsxs(V,{children:[C,v]}),e[54]=V,e[55]=C,e[56]=v,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(Oe,{})]}),e[0]=n):n=e[0],n}function Ye(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ye as default};
1
+ import{d as K,j as t,c as ue,x as fe,r as pe,y as ne,K as ee,B as xe,w as re}from"./index-B62MiQAu.js";import{u as he}from"./useQuery-Cr3Ibn6v.js";import{u as oe}from"./useMutation-5tF0rOhi.js";import{b as je,P as ge,a as Ce}from"./popover-CW4G5neq.js";import{C as be,a as Ne,b as ve,c as ye,d as Ee,e as Te}from"./command-CIWQeRGP.js";import{s as _e}from"./Plus-ltkKoqJz.js";import{i as Ie}from"./X-BNpME-HX.js";import{b as Pe}from"./use-connection-u5F7YTDM.js";import{a as Se,u as we}from"./constants-B7D0VCWO.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-DAKvcNkQ.js";import"./SearchMd-CS43V34Y.js";import"./use-collections-Cw-CkhM5.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function Oe(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=we(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let w;e[13]!==u?(w=s=>u.has(s.id),e[13]=u,e[14]=w):w=e[14];const I=(a??[]).filter(w);let O;e[15]!==u?(O=s=>!u.has(s.id),e[15]=u,e[16]=O):O=e[16];const le=(a??[]).filter(O);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=ve;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=Ne;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let N;e[47]!==H||e[48]!==W?(N=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=N):N=e[49];let v;e[50]!==Y||e[51]!==b||e[52]!==N?(v=t.jsxs(Y,{children:[b,N]}),e[50]=Y,e[51]=b,e[52]=N,e[53]=v):v=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==v?(y=t.jsxs(V,{children:[C,v]}),e[54]=V,e[55]=C,e[56]=v,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(Oe,{})]}),e[0]=n):n=e[0],n}function Ye(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ye as default};
@@ -1 +1 @@
1
- import{d as n,j as i,ac as g,y as c,ad as u,ae as m,af as x,ag as j,ah as N,ai as b,aj as h}from"./index-DIir8pgm.js";import{i as D}from"./X-COxH8ezg.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(h,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(D,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{w as D,C as a,T as b,B as c,R as d,E as e,k as f};
1
+ import{d as n,j as i,ac as g,y as c,ad as u,ae as m,af as x,ag as j,ah as N,ai as b,aj as h}from"./index-B62MiQAu.js";import{i as D}from"./X-BNpME-HX.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(h,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(D,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{w as D,C as a,T as b,B as c,R as d,E as e,k as f};
@@ -1 +1 @@
1
- import{d,j as s,a9 as i,y as c}from"./index-DIir8pgm.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("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",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,h as b,D as c,N as d,b as e,j as f,v as g};
1
+ import{d,j as s,a9 as i,y as c}from"./index-B62MiQAu.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("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",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,h as b,D as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
1
- import{d as c,j as d,al as f,am as m,y as u,an as g,ao as x,ap as v,aq as b,ar as h,as as w,at as p,au as j,av as N,aw as y,ax as z,ay as _}from"./index-DIir8pgm.js";import{i as $}from"./Check-xiDQ8BtU.js";import{i as D}from"./ChevronRight-9oNUepCi.js";import{b as M}from"./RefreshCcw01-7vLfxx-h.js";function C(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,sideOffset:a,...s}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=d.jsx(g,{children:d.jsx(x,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function G(o){const e=c.c(12);let t,s,a,n;e[0]!==o?({className:t,inset:s,variant:n,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("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-pointer items-center gap-2 rounded-lg 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",t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(l=d.jsx(h,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=l):l=e[11],l}function L(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:a,children:s,checked:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(p,{children:d.jsx($,{className:"size-4"})})}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=d.jsxs(b,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function O(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function q(o){const e=c.c(11);let t,s,a;e[0]!==o?({className:s,children:t,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(p,{children:d.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==a||e[9]!==n?(i=d.jsxs(z,{"data-slot":"dropdown-menu-radio-item",className:n,...a,children:[r,t]}),e[7]=t,e[8]=a,e[9]=n,e[10]=i):i=e[10],i}function P(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,inset:s,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==n?(r=d.jsx(v,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...a}),e[6]=s,e[7]=a,e[8]=n,e[9]=r):r=e[9],r}function A(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=d.jsx(w,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}function B(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:s,inset:a,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(D,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(l=d.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,i]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function H(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=d.jsx(y,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}export{C as D,T as a,E as b,G as c,F as d,B as e,H as f,q as g,O as h,A as i,P as j,L as k};
1
+ import{d as c,j as d,al as f,am as m,y as u,an as g,ao as x,ap as v,aq as b,ar as h,as as w,at as p,au as j,av as N,aw as y,ax as z,ay as _}from"./index-B62MiQAu.js";import{i as $}from"./Check-BgcEZAFd.js";import{i as D}from"./ChevronRight-iThFOnTS.js";import{b as M}from"./RefreshCcw01-DN-y3At7.js";function C(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,sideOffset:a,...s}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=d.jsx(g,{children:d.jsx(x,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function G(o){const e=c.c(12);let t,s,a,n;e[0]!==o?({className:t,inset:s,variant:n,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("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-pointer items-center gap-2 rounded-lg 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",t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(l=d.jsx(h,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=l):l=e[11],l}function L(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:a,children:s,checked:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(p,{children:d.jsx($,{className:"size-4"})})}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=d.jsxs(b,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function O(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function q(o){const e=c.c(11);let t,s,a;e[0]!==o?({className:s,children:t,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(p,{children:d.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==a||e[9]!==n?(i=d.jsxs(z,{"data-slot":"dropdown-menu-radio-item",className:n,...a,children:[r,t]}),e[7]=t,e[8]=a,e[9]=n,e[10]=i):i=e[10],i}function P(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,inset:s,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==n?(r=d.jsx(v,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...a}),e[6]=s,e[7]=a,e[8]=n,e[9]=r):r=e[9],r}function A(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=d.jsx(w,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}function B(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:s,inset:a,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(D,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(l=d.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,i]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function H(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=d.jsx(y,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}export{C as D,T as a,E as b,G as c,F as d,B as e,H as f,q as g,O as h,A as i,P as j,L as k};
@@ -1 +1 @@
1
- import{d as F,j as n,r as b,c as W,k as D,g as X,K as Z,aU as U,B as ee,H as te,bn as ne}from"./index-DIir8pgm.js";import{i as H}from"./Loading01-BcvCGReP.js";import{c as ie}from"./workflow-DCKJ21al.js";import{u as se}from"./useQuery-BJg_09kQ.js";import{b as oe}from"./use-connection-B3ekSVUc.js";import{a as le,u as re,f as ce}from"./constants-C2mKle9u.js";import{t as ae}from"./Settings01-BWfYiv65.js";import{P as E}from"./index-B_aEJlRD.js";import"./collections-D4sy0Xs0.js";import"./use-collections-CeVeE6L5.js";import"./useMutation-DPjXSTSD.js";import"./tooltip-iG9fvlrZ.js";import"./index-DTnP3oIT.js";import"./X-COxH8ezg.js";const de=b.createContext(null);function q(t){const e=F.c(3),{value:d,children:a}=t,i=d;let s;return e[0]!==a||e[1]!==i?(s=n.jsx(de.Provider,{value:i,children:a}),e[0]=a,e[1]=i,e[2]=s):s=e[2],s}b.createContext(null);function me(t,e){return t?t.filter(d=>ie(d,e)):[]}function A(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function ue(t){const e=F.c(35),{binding:d,renderHeader:a,renderEmptyState:i}=t,{org:s,project:l}=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[0]=m):m=e[0];const{org:r,project:x,pluginId:f}=D(m),J=oe(),{data:y}=X.useSession();let _;e[1]!==s.id?(_={connectionId:le,orgId:s.id},e[1]=s.id,e[2]=_):_=e[2];const T=re(_);let g;e[3]!==f||e[4]!==l.id?(g=Z.projectPluginConfig(l.id??"",f),e[3]=f,e[4]=l.id,e[5]=g):g=e[5];let p;e[6]!==f||e[7]!==l.id||e[8]!==T?(p=async()=>{const o=await T.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:f}});return o.structuredContent??o},e[6]=f,e[7]=l.id,e[8]=T,e[9]=p):p=e[9];const k=!!l.id&&!!f;let P;e[10]!==g||e[11]!==p||e[12]!==k?(P={queryKey:g,queryFn:p,enabled:k},e[10]=g,e[11]=p,e[12]=k,e[13]=P):P=e[13];const{data:Q,isLoading:Y}=se(P),K=me(J,d),R=Q?.config?.connectionId,j=R?K.find(o=>o.id===R):null,S=ce({connectionId:j?.id,orgId:s.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:s.id,slug:s.slug,name:s.name};if(Y){let o;return e[14]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=o):o=e[14],o}if(K.length===0){const o={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[15]!==i?(c=i(),e[15]=i,e[16]=c):c=e[16];let u;return e[17]!==c?(u=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:c}),e[17]=c,e[18]=u):u=e[18],n.jsx(q,{value:o,children:u})}if(!j){const o={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[19]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=c):c=e[19];const u=r??s.slug,O=x??l.slug??"";let L;return e[20]!==u||e[21]!==O?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[c,n.jsx(ee,{asChild:!0,children:n.jsx(te,{to:"/$org/$project/settings",params:{org:u,project:O},children:"Go to Project Settings"})})]}),e[20]=u,e[21]=O,e[22]=L):L=e[22],n.jsx(q,{value:o,children:L})}let N;e[23]!==S?(N=(o,c)=>S?S.callTool({name:o,arguments:c}).then(xe):Promise.reject(new Error("MCP client is not available")),e[23]=S,e[24]=N):N=e[24];const V={connectionId:j.id,connection:A(j),toolCaller:N,org:z,session:w},B=E,G=E,$=E,M=a({connections:[A(j)],selectedConnectionId:j.id,onConnectionChange:fe});let h;e[25]!==M||e[26]!==$.Header.Left?(h=n.jsx($.Header.Left,{children:M}),e[25]=M,e[26]=$.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let I;e[31]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(E.Content,{children:n.jsx(b.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(U,{})})}),e[31]=I):I=e[31];let v;return e[32]!==B||e[33]!==C?(v=n.jsxs(B,{children:[C,I]}),e[32]=B,e[33]=C,e[34]=v):v=e[34],n.jsx(q,{value:V,children:v})}function fe(){}function xe(t){return t.structuredContent??t}function Ee(){const t=F.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:d}=D(e);let a;t[1]!==d?(a=ne.find(r=>r.id===d),t[1]=d,t[2]=a):a=t[2];const i=a;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let x;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(x=n.jsx(b.Suspense,{fallback:r,children:n.jsx(ue,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=x):x=t[7],x}const s=i?.LayoutComponent;if(!s){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(U,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let m;return t[10]!==s?(m=n.jsx(b.Suspense,{fallback:l,children:n.jsx(s,{})}),t[10]=s,t[11]=m):m=t[11],m}export{Ee as default};
1
+ import{d as F,j as n,r as b,c as W,k as D,g as X,K as Z,aU as U,B as ee,H as te,bn as ne}from"./index-B62MiQAu.js";import{i as H}from"./Loading01-CrI0NwPE.js";import{c as ie}from"./workflow-DGOWYrJv.js";import{u as se}from"./useQuery-Cr3Ibn6v.js";import{b as oe}from"./use-connection-u5F7YTDM.js";import{a as le,u as re,f as ce}from"./constants-B7D0VCWO.js";import{t as ae}from"./Settings01-ClJz1ULQ.js";import{P as E}from"./index-DNarCA5m.js";import"./collections-pcWRi6G6.js";import"./use-collections-Cw-CkhM5.js";import"./useMutation-5tF0rOhi.js";import"./tooltip-Cz2tQy7f.js";import"./index-BcOdsrKl.js";import"./X-BNpME-HX.js";const de=b.createContext(null);function q(t){const e=F.c(3),{value:d,children:a}=t,i=d;let s;return e[0]!==a||e[1]!==i?(s=n.jsx(de.Provider,{value:i,children:a}),e[0]=a,e[1]=i,e[2]=s):s=e[2],s}b.createContext(null);function me(t,e){return t?t.filter(d=>ie(d,e)):[]}function A(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function ue(t){const e=F.c(35),{binding:d,renderHeader:a,renderEmptyState:i}=t,{org:s,project:l}=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[0]=m):m=e[0];const{org:r,project:x,pluginId:f}=D(m),J=oe(),{data:y}=X.useSession();let _;e[1]!==s.id?(_={connectionId:le,orgId:s.id},e[1]=s.id,e[2]=_):_=e[2];const T=re(_);let g;e[3]!==f||e[4]!==l.id?(g=Z.projectPluginConfig(l.id??"",f),e[3]=f,e[4]=l.id,e[5]=g):g=e[5];let p;e[6]!==f||e[7]!==l.id||e[8]!==T?(p=async()=>{const o=await T.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:f}});return o.structuredContent??o},e[6]=f,e[7]=l.id,e[8]=T,e[9]=p):p=e[9];const k=!!l.id&&!!f;let P;e[10]!==g||e[11]!==p||e[12]!==k?(P={queryKey:g,queryFn:p,enabled:k},e[10]=g,e[11]=p,e[12]=k,e[13]=P):P=e[13];const{data:Q,isLoading:Y}=se(P),K=me(J,d),R=Q?.config?.connectionId,j=R?K.find(o=>o.id===R):null,S=ce({connectionId:j?.id,orgId:s.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:s.id,slug:s.slug,name:s.name};if(Y){let o;return e[14]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=o):o=e[14],o}if(K.length===0){const o={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[15]!==i?(c=i(),e[15]=i,e[16]=c):c=e[16];let u;return e[17]!==c?(u=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:c}),e[17]=c,e[18]=u):u=e[18],n.jsx(q,{value:o,children:u})}if(!j){const o={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[19]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=c):c=e[19];const u=r??s.slug,O=x??l.slug??"";let L;return e[20]!==u||e[21]!==O?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[c,n.jsx(ee,{asChild:!0,children:n.jsx(te,{to:"/$org/$project/settings",params:{org:u,project:O},children:"Go to Project Settings"})})]}),e[20]=u,e[21]=O,e[22]=L):L=e[22],n.jsx(q,{value:o,children:L})}let N;e[23]!==S?(N=(o,c)=>S?S.callTool({name:o,arguments:c}).then(xe):Promise.reject(new Error("MCP client is not available")),e[23]=S,e[24]=N):N=e[24];const V={connectionId:j.id,connection:A(j),toolCaller:N,org:z,session:w},B=E,G=E,$=E,M=a({connections:[A(j)],selectedConnectionId:j.id,onConnectionChange:fe});let h;e[25]!==M||e[26]!==$.Header.Left?(h=n.jsx($.Header.Left,{children:M}),e[25]=M,e[26]=$.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let I;e[31]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(E.Content,{children:n.jsx(b.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(U,{})})}),e[31]=I):I=e[31];let v;return e[32]!==B||e[33]!==C?(v=n.jsxs(B,{children:[C,I]}),e[32]=B,e[33]=C,e[34]=v):v=e[34],n.jsx(q,{value:V,children:v})}function fe(){}function xe(t){return t.structuredContent??t}function Ee(){const t=F.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:d}=D(e);let a;t[1]!==d?(a=ne.find(r=>r.id===d),t[1]=d,t[2]=a):a=t[2];const i=a;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let x;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(x=n.jsx(b.Suspense,{fallback:r,children:n.jsx(ue,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=x):x=t[7],x}const s=i?.LayoutComponent;if(!s){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(U,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(H,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let m;return t[10]!==s?(m=n.jsx(b.Suspense,{fallback:l,children:n.jsx(s,{})}),t[10]=s,t[11]=m):m=t[11],m}export{Ee as default};
@@ -1,4 +1,4 @@
1
- import{d as R,r as D,y as E,j as t}from"./index-DIir8pgm.js";import{i as de}from"./AlertCircle-CMykqSBg.js";import{e as ue,c as me}from"./XCircle-DF_H_9sl.js";import{n as Y}from"./Type01-BYtXAD5n.js";import{i as fe}from"./Loading01-BcvCGReP.js";import{s as Z}from"./XClose-DN7ytwf7.js";import{c as xe}from"./usage-BW6ztpN6.js";import{I as pe}from"./integration-icon-B_0G_X87.js";import{a as he,u as ge}from"./context-BiAMhAiB.js";function A(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}function ee(s){if(!s)return"—";const e=typeof s=="string"?new Date(s):s;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function be(s){return s?s.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function je(s){const e=R.c(4),{items:n}=s;let a;e[0]!==n?(a=n.map(ve),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:a}),e[2]=a,e[3]=r):r=e[3],r}function ve(s){return t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("span",{className:"text-xs text-muted-foreground truncate",children:s.label}),t.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:s.value})]},s.label)}function Ne(s){const e=R.c(30),{userTokens:n,assistantTokens:a,otherTokens:r}=s,k=n+a+r,w=k>0?n/k*100:0,o=k>0?a/k*100:0,N=k>0?r/k*100:0;let u;e[0]!==w?(u=w>0&&t.jsx("div",{className:"h-full bg-chart-1",style:{width:`${w}%`}}),e[0]=w,e[1]=u):u=e[1];let g;e[2]!==o?(g=o>0&&t.jsx("div",{className:"h-full bg-chart-2",style:{width:`${o}%`}}),e[2]=o,e[3]=g):g=e[3];let v;e[4]!==N?(v=N>0&&t.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${N}%`}}),e[4]=N,e[5]=v):v=e[5];let h;e[6]!==u||e[7]!==g||e[8]!==v?(h=t.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[u,g,v]}),e[6]=u,e[7]=g,e[8]=v,e[9]=h):h=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=x):x=e[10];let c;e[11]!==w?(c=w.toFixed(1),e[11]=w,e[12]=c):c=e[12];let b;e[13]!==c?(b=t.jsxs("div",{className:"flex items-center gap-1.5",children:[x,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["User ",c,"%"]})]}),e[13]=c,e[14]=b):b=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[15]=d):d=e[15];let m;e[16]!==o?(m=o.toFixed(1),e[16]=o,e[17]=m):m=e[17];let f;e[18]!==m?(f=t.jsxs("div",{className:"flex items-center gap-1.5",children:[d,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Assistant ",m,"%"]})]}),e[18]=m,e[19]=f):f=e[19];let l;e[20]!==N||e[21]!==r?(l=r>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Other ",N.toFixed(1),"%"]})]}),e[20]=N,e[21]=r,e[22]=l):l=e[22];let i;e[23]!==f||e[24]!==l||e[25]!==b?(i=t.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[b,f,l]}),e[23]=f,e[24]=l,e[25]=b,e[26]=i):i=e[26];let p;return e[27]!==i||e[28]!==h?(p=t.jsxs("div",{className:"flex flex-col gap-2",children:[h,i]}),e[27]=i,e[28]=h,e[29]=p):p=e[29],p}function Ue(s){const e=R.c(61),{onClose:n,back:a,className:r}=s,[k,w]=D.useState(null),{messages:o,tasks:N,activeTaskId:u,model:g,selectedVirtualMcp:v,virtualMcps:h}=he();let x,c,b,d,m,f,l,i;if(e[0]!==u||e[1]!==a||e[2]!==r||e[3]!==o||e[4]!==g||e[5]!==n||e[6]!==k?.id||e[7]!==v?.title||e[8]!==N||e[9]!==h){i=Symbol.for("react.early_return_sentinel");e:{let $;e[18]!==u?($=j=>j.id===u,e[18]=u,e[19]=$):$=e[19];const L=N.find($),S=xe(o),F=g?.limits?.contextWindow??null,Q=F&&F>0?(S.totalTokens/F*100).toFixed(1):null,J=o;let P;e[20]!==J?(P=J.filter(Ce).reduce(_e,0),e[20]=J,e[21]=P):P=e[21];const U=P,V=o;let B;e[22]!==V?(B=V.filter(Se).reduce(Te,0),e[22]=V,e[23]=B):B=e[23];const O=B,H=Math.max(0,S.totalTokens-U-O),te=o[0],se=o.at(-1),ne=te?.metadata?.created_at??L?.created_at,le=se?.metadata?.created_at??L?.updated_at,W=o.filter(we);let K;e[24]!==h?(K=j=>(j.parts??[]).filter(ye).map(y=>{const _=y.input?.agent_id,C=_?h.find(ce=>ce.id===_):null,M=y.state==="input-streaming"||y.state==="input-available"||y.state==="output-available"&&y.preliminary===!0,z=y.state==="output-error",oe=y.state==="approval-requested";return{part:y,agentTitle:C?.title??"Subtask",agentIcon:C?.icon??null,isRunning:M,isError:z,isApproval:oe}}),e[24]=h,e[25]=K):K=e[25];const X=o.flatMap(K),ae=g?.modelId?be(g.modelId):"—",re=v?.title??"Decopilot",ie=[{label:"Session",value:L?.title??"New chat"},{label:"Messages",value:W.length},{label:"Agent",value:re},{label:"Model",value:ae},{label:"Context Limit",value:F?A(F):"—"},{label:"Total Tokens",value:S.totalTokens>0?A(S.totalTokens):"0"},{label:"Usage",value:Q!==null?`${Q}%`:"—"},{label:"Input Tokens",value:S.inputTokens>0?A(S.inputTokens):"0"},{label:"Output Tokens",value:S.outputTokens>0?A(S.outputTokens):"0"},{label:"Reasoning Tokens",value:S.reasoningTokens>0?A(S.reasoningTokens):"0"},{label:"Cost",value:S.cost>0?`$${S.cost<.001?S.cost.toFixed(6):S.cost.toFixed(4)}`:"$0.00"},{label:"Session Created",value:ee(ne)},{label:"Last Activity",value:ee(le)}];if(!L&&W.length===0){let j;e[26]!==r?(j=E("flex flex-col h-full w-full border-l border-border bg-background",r),e[26]=r,e[27]=j):j=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[28]=y):y=e[28];let _;e[29]!==a?(_=a?t.jsx(Y,{size:14,className:"text-muted-foreground"}):t.jsx(Z,{size:14,className:"text-muted-foreground"}),e[29]=a,e[30]=_):_=e[30];let C;e[31]!==n||e[32]!==_?(C=t.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[y,t.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center rounded hover:bg-accent transition-colors",children:_})]}),e[31]=n,e[32]=_,e[33]=C):C=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:t.jsx("p",{className:"text-xs text-muted-foreground",children:"Start a conversation to see context"})}),e[34]=M):M=e[34];let z;e[35]!==j||e[36]!==C?(z=t.jsxs("div",{className:j,children:[C,M]}),e[35]=j,e[36]=C,e[37]=z):z=e[37],i=z;break e}e[38]!==r?(f=E("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",r),e[38]=r,e[39]=f):f=e[39];let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[40]=q):q=e[40];let I;e[41]!==a?(I=a?t.jsx(Y,{size:14}):t.jsx(Z,{size:14}),e[41]=a,e[42]=I):I=e[42],e[43]!==n||e[44]!==I?(l=t.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[q,t.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:I})]}),e[43]=n,e[44]=I,e[45]=l):l=e[45],x="flex flex-col gap-8 p-6",c=X.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Subtasks"}),t.jsx("div",{className:"flex flex-col gap-1",children:X.map(ke)})]}),b=t.jsx(je,{items:ie});let G;e[46]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Context Breakdown"}),e[46]=G):G=e[46],e[47]!==O||e[48]!==H||e[49]!==U?(d=t.jsxs("div",{className:"flex flex-col gap-3",children:[G,t.jsx(Ne,{userTokens:U,assistantTokens:O,otherTokens:H})]}),e[47]=O,e[48]=H,e[49]=U,e[50]=d):d=e[50],m=W.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Raw messages"}),t.jsx("div",{className:"flex flex-col gap-1",children:W.map(j=>{const y=j.metadata?.created_at,_=k?.id===j.id;return t.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[t.jsxs("button",{type:"button",onClick:()=>w(_?null:j),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:E("shrink-0 font-medium",j.role==="user"?"text-chart-1":"text-chart-2"),children:j.role}),t.jsx("span",{className:"text-muted-foreground",children:"•"}),t.jsx("span",{className:"truncate text-muted-foreground font-mono",children:j.id})]}),y&&t.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:new Date(y).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})})]}),_&&t.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(j,null,2)})]},j.id)})})]})}e[0]=u,e[1]=a,e[2]=r,e[3]=o,e[4]=g,e[5]=n,e[6]=k?.id,e[7]=v?.title,e[8]=N,e[9]=h,e[10]=x,e[11]=c,e[12]=b,e[13]=d,e[14]=m,e[15]=f,e[16]=l,e[17]=i}else x=e[10],c=e[11],b=e[12],d=e[13],m=e[14],f=e[15],l=e[16],i=e[17];if(i!==Symbol.for("react.early_return_sentinel"))return i;let p;e[51]!==x||e[52]!==c||e[53]!==b||e[54]!==d||e[55]!==m?(p=t.jsxs("div",{className:x,children:[c,b,d,m]}),e[51]=x,e[52]=c,e[53]=b,e[54]=d,e[55]=m,e[56]=p):p=e[56];let T;return e[57]!==f||e[58]!==l||e[59]!==p?(T=t.jsxs("div",{className:f,children:[l,p]}),e[57]=f,e[58]=l,e[59]=p,e[60]=T):T=e[60],T}function ke(s,e){return t.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[t.jsx(pe,{icon:s.agentIcon,name:s.agentTitle,size:"xs",className:"size-6 rounded-md shrink-0"}),t.jsx("span",{className:E("shrink-0 font-medium",s.isError?"text-destructive":"text-foreground"),children:s.agentTitle}),s.part.input?.prompt&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground/50",children:"·"}),t.jsx("span",{className:"truncate text-muted-foreground",children:s.part.input.prompt})]}),t.jsx("span",{className:"ml-auto shrink-0",children:s.isRunning?t.jsx(fe,{size:12,className:"animate-spin text-muted-foreground"}):s.isError?t.jsx(ue,{size:12,className:"text-destructive"}):s.isApproval?t.jsx(de,{size:12,className:"text-warning"}):t.jsx(me,{size:12,className:"text-emerald-500"})})]},e)}function ye(s){return s.type==="tool-subtask"}function we(s){return s.role!=="system"}function Te(s,e){const n=e.metadata?.usage;return s+(n?.outputTokens??0)}function Se(s){return s.role==="assistant"}function _e(s,e){const n=e.metadata?.usage;return s+(n?.inputTokens??0)}function Ce(s){return s.role==="user"}function $e(s){const e=R.c(22),{text:n,className:a,speed:r}=s,k=a===void 0?"":a,w=r===void 0?30:r,[o,N]=D.useState(!1),u=n.length/w*1e3,g=n.length,v=`${n.length}ch`;let h;e[0]!==u?(h=()=>{N(!1);const $=setTimeout(()=>{N(!0)},u);return()=>clearTimeout($)},e[0]=u,e[1]=h):h=e[1];let x;e[2]!==u||e[3]!==n?(x=[n,u],e[2]=u,e[3]=n,e[4]=x):x=e[4],D.useEffect(h,x);let c;e[5]!==k?(c=E(k,"block overflow-hidden inline-flex"),e[5]=k,e[6]=c):c=e[6];const b=`${u}ms`;let d;e[7]!==v||e[8]!==g||e[9]!==b?(d={"--typewriter-duration":b,"--typewriter-steps":g,"--typewriter-max-width":v},e[7]=v,e[8]=g,e[9]=b,e[10]=d):d=e[10];const m=d,f=o&&"truncate";let l;e[11]!==f?(l=E("typewriter-text",f),e[11]=f,e[12]=l):l=e[12];let i;e[13]!==l||e[14]!==n?(i=t.jsx("span",{className:l,children:n}),e[13]=l,e[14]=n,e[15]=i):i=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("style",{children:`
1
+ import{d as R,r as D,y as E,j as t}from"./index-B62MiQAu.js";import{i as de}from"./AlertCircle-CE4aMC_6.js";import{e as ue,c as me}from"./XCircle-MpsZU5qt.js";import{n as Y}from"./Type01-Dp2k0by5.js";import{i as fe}from"./Loading01-CrI0NwPE.js";import{s as Z}from"./XClose-DKDxXEaA.js";import{c as xe}from"./usage-BW6ztpN6.js";import{I as pe}from"./integration-icon-BByVvYW2.js";import{a as he,u as ge}from"./context-IJmL4QO_.js";function A(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}function ee(s){if(!s)return"—";const e=typeof s=="string"?new Date(s):s;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function be(s){return s?s.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function je(s){const e=R.c(4),{items:n}=s;let a;e[0]!==n?(a=n.map(ve),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:a}),e[2]=a,e[3]=r):r=e[3],r}function ve(s){return t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("span",{className:"text-xs text-muted-foreground truncate",children:s.label}),t.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:s.value})]},s.label)}function Ne(s){const e=R.c(30),{userTokens:n,assistantTokens:a,otherTokens:r}=s,k=n+a+r,w=k>0?n/k*100:0,o=k>0?a/k*100:0,N=k>0?r/k*100:0;let u;e[0]!==w?(u=w>0&&t.jsx("div",{className:"h-full bg-chart-1",style:{width:`${w}%`}}),e[0]=w,e[1]=u):u=e[1];let g;e[2]!==o?(g=o>0&&t.jsx("div",{className:"h-full bg-chart-2",style:{width:`${o}%`}}),e[2]=o,e[3]=g):g=e[3];let v;e[4]!==N?(v=N>0&&t.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${N}%`}}),e[4]=N,e[5]=v):v=e[5];let h;e[6]!==u||e[7]!==g||e[8]!==v?(h=t.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[u,g,v]}),e[6]=u,e[7]=g,e[8]=v,e[9]=h):h=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=x):x=e[10];let c;e[11]!==w?(c=w.toFixed(1),e[11]=w,e[12]=c):c=e[12];let b;e[13]!==c?(b=t.jsxs("div",{className:"flex items-center gap-1.5",children:[x,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["User ",c,"%"]})]}),e[13]=c,e[14]=b):b=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[15]=d):d=e[15];let m;e[16]!==o?(m=o.toFixed(1),e[16]=o,e[17]=m):m=e[17];let f;e[18]!==m?(f=t.jsxs("div",{className:"flex items-center gap-1.5",children:[d,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Assistant ",m,"%"]})]}),e[18]=m,e[19]=f):f=e[19];let l;e[20]!==N||e[21]!==r?(l=r>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Other ",N.toFixed(1),"%"]})]}),e[20]=N,e[21]=r,e[22]=l):l=e[22];let i;e[23]!==f||e[24]!==l||e[25]!==b?(i=t.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[b,f,l]}),e[23]=f,e[24]=l,e[25]=b,e[26]=i):i=e[26];let p;return e[27]!==i||e[28]!==h?(p=t.jsxs("div",{className:"flex flex-col gap-2",children:[h,i]}),e[27]=i,e[28]=h,e[29]=p):p=e[29],p}function Ue(s){const e=R.c(61),{onClose:n,back:a,className:r}=s,[k,w]=D.useState(null),{messages:o,tasks:N,activeTaskId:u,model:g,selectedVirtualMcp:v,virtualMcps:h}=he();let x,c,b,d,m,f,l,i;if(e[0]!==u||e[1]!==a||e[2]!==r||e[3]!==o||e[4]!==g||e[5]!==n||e[6]!==k?.id||e[7]!==v?.title||e[8]!==N||e[9]!==h){i=Symbol.for("react.early_return_sentinel");e:{let $;e[18]!==u?($=j=>j.id===u,e[18]=u,e[19]=$):$=e[19];const L=N.find($),S=xe(o),F=g?.limits?.contextWindow??null,Q=F&&F>0?(S.totalTokens/F*100).toFixed(1):null,J=o;let P;e[20]!==J?(P=J.filter(Ce).reduce(_e,0),e[20]=J,e[21]=P):P=e[21];const U=P,V=o;let B;e[22]!==V?(B=V.filter(Se).reduce(Te,0),e[22]=V,e[23]=B):B=e[23];const O=B,H=Math.max(0,S.totalTokens-U-O),te=o[0],se=o.at(-1),ne=te?.metadata?.created_at??L?.created_at,le=se?.metadata?.created_at??L?.updated_at,W=o.filter(we);let K;e[24]!==h?(K=j=>(j.parts??[]).filter(ye).map(y=>{const _=y.input?.agent_id,C=_?h.find(ce=>ce.id===_):null,M=y.state==="input-streaming"||y.state==="input-available"||y.state==="output-available"&&y.preliminary===!0,z=y.state==="output-error",oe=y.state==="approval-requested";return{part:y,agentTitle:C?.title??"Subtask",agentIcon:C?.icon??null,isRunning:M,isError:z,isApproval:oe}}),e[24]=h,e[25]=K):K=e[25];const X=o.flatMap(K),ae=g?.modelId?be(g.modelId):"—",re=v?.title??"Decopilot",ie=[{label:"Session",value:L?.title??"New chat"},{label:"Messages",value:W.length},{label:"Agent",value:re},{label:"Model",value:ae},{label:"Context Limit",value:F?A(F):"—"},{label:"Total Tokens",value:S.totalTokens>0?A(S.totalTokens):"0"},{label:"Usage",value:Q!==null?`${Q}%`:"—"},{label:"Input Tokens",value:S.inputTokens>0?A(S.inputTokens):"0"},{label:"Output Tokens",value:S.outputTokens>0?A(S.outputTokens):"0"},{label:"Reasoning Tokens",value:S.reasoningTokens>0?A(S.reasoningTokens):"0"},{label:"Cost",value:S.cost>0?`$${S.cost<.001?S.cost.toFixed(6):S.cost.toFixed(4)}`:"$0.00"},{label:"Session Created",value:ee(ne)},{label:"Last Activity",value:ee(le)}];if(!L&&W.length===0){let j;e[26]!==r?(j=E("flex flex-col h-full w-full border-l border-border bg-background",r),e[26]=r,e[27]=j):j=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[28]=y):y=e[28];let _;e[29]!==a?(_=a?t.jsx(Y,{size:14,className:"text-muted-foreground"}):t.jsx(Z,{size:14,className:"text-muted-foreground"}),e[29]=a,e[30]=_):_=e[30];let C;e[31]!==n||e[32]!==_?(C=t.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[y,t.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center rounded hover:bg-accent transition-colors",children:_})]}),e[31]=n,e[32]=_,e[33]=C):C=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:t.jsx("p",{className:"text-xs text-muted-foreground",children:"Start a conversation to see context"})}),e[34]=M):M=e[34];let z;e[35]!==j||e[36]!==C?(z=t.jsxs("div",{className:j,children:[C,M]}),e[35]=j,e[36]=C,e[37]=z):z=e[37],i=z;break e}e[38]!==r?(f=E("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",r),e[38]=r,e[39]=f):f=e[39];let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[40]=q):q=e[40];let I;e[41]!==a?(I=a?t.jsx(Y,{size:14}):t.jsx(Z,{size:14}),e[41]=a,e[42]=I):I=e[42],e[43]!==n||e[44]!==I?(l=t.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[q,t.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:I})]}),e[43]=n,e[44]=I,e[45]=l):l=e[45],x="flex flex-col gap-8 p-6",c=X.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Subtasks"}),t.jsx("div",{className:"flex flex-col gap-1",children:X.map(ke)})]}),b=t.jsx(je,{items:ie});let G;e[46]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Context Breakdown"}),e[46]=G):G=e[46],e[47]!==O||e[48]!==H||e[49]!==U?(d=t.jsxs("div",{className:"flex flex-col gap-3",children:[G,t.jsx(Ne,{userTokens:U,assistantTokens:O,otherTokens:H})]}),e[47]=O,e[48]=H,e[49]=U,e[50]=d):d=e[50],m=W.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Raw messages"}),t.jsx("div",{className:"flex flex-col gap-1",children:W.map(j=>{const y=j.metadata?.created_at,_=k?.id===j.id;return t.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[t.jsxs("button",{type:"button",onClick:()=>w(_?null:j),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:E("shrink-0 font-medium",j.role==="user"?"text-chart-1":"text-chart-2"),children:j.role}),t.jsx("span",{className:"text-muted-foreground",children:"•"}),t.jsx("span",{className:"truncate text-muted-foreground font-mono",children:j.id})]}),y&&t.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:new Date(y).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})})]}),_&&t.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(j,null,2)})]},j.id)})})]})}e[0]=u,e[1]=a,e[2]=r,e[3]=o,e[4]=g,e[5]=n,e[6]=k?.id,e[7]=v?.title,e[8]=N,e[9]=h,e[10]=x,e[11]=c,e[12]=b,e[13]=d,e[14]=m,e[15]=f,e[16]=l,e[17]=i}else x=e[10],c=e[11],b=e[12],d=e[13],m=e[14],f=e[15],l=e[16],i=e[17];if(i!==Symbol.for("react.early_return_sentinel"))return i;let p;e[51]!==x||e[52]!==c||e[53]!==b||e[54]!==d||e[55]!==m?(p=t.jsxs("div",{className:x,children:[c,b,d,m]}),e[51]=x,e[52]=c,e[53]=b,e[54]=d,e[55]=m,e[56]=p):p=e[56];let T;return e[57]!==f||e[58]!==l||e[59]!==p?(T=t.jsxs("div",{className:f,children:[l,p]}),e[57]=f,e[58]=l,e[59]=p,e[60]=T):T=e[60],T}function ke(s,e){return t.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[t.jsx(pe,{icon:s.agentIcon,name:s.agentTitle,size:"xs",className:"size-6 rounded-md shrink-0"}),t.jsx("span",{className:E("shrink-0 font-medium",s.isError?"text-destructive":"text-foreground"),children:s.agentTitle}),s.part.input?.prompt&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground/50",children:"·"}),t.jsx("span",{className:"truncate text-muted-foreground",children:s.part.input.prompt})]}),t.jsx("span",{className:"ml-auto shrink-0",children:s.isRunning?t.jsx(fe,{size:12,className:"animate-spin text-muted-foreground"}):s.isError?t.jsx(ue,{size:12,className:"text-destructive"}):s.isApproval?t.jsx(de,{size:12,className:"text-warning"}):t.jsx(me,{size:12,className:"text-emerald-500"})})]},e)}function ye(s){return s.type==="tool-subtask"}function we(s){return s.role!=="system"}function Te(s,e){const n=e.metadata?.usage;return s+(n?.outputTokens??0)}function Se(s){return s.role==="assistant"}function _e(s,e){const n=e.metadata?.usage;return s+(n?.inputTokens??0)}function Ce(s){return s.role==="user"}function $e(s){const e=R.c(22),{text:n,className:a,speed:r}=s,k=a===void 0?"":a,w=r===void 0?30:r,[o,N]=D.useState(!1),u=n.length/w*1e3,g=n.length,v=`${n.length}ch`;let h;e[0]!==u?(h=()=>{N(!1);const $=setTimeout(()=>{N(!0)},u);return()=>clearTimeout($)},e[0]=u,e[1]=h):h=e[1];let x;e[2]!==u||e[3]!==n?(x=[n,u],e[2]=u,e[3]=n,e[4]=x):x=e[4],D.useEffect(h,x);let c;e[5]!==k?(c=E(k,"block overflow-hidden inline-flex"),e[5]=k,e[6]=c):c=e[6];const b=`${u}ms`;let d;e[7]!==v||e[8]!==g||e[9]!==b?(d={"--typewriter-duration":b,"--typewriter-steps":g,"--typewriter-max-width":v},e[7]=v,e[8]=g,e[9]=b,e[10]=d):d=e[10];const m=d,f=o&&"truncate";let l;e[11]!==f?(l=E("typewriter-text",f),e[11]=f,e[12]=l):l=e[12];let i;e[13]!==l||e[14]!==n?(i=t.jsx("span",{className:l,children:n}),e[13]=l,e[14]=n,e[15]=i):i=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("style",{children:`
2
2
  .typewriter-text {
3
3
  display: inline-block;
4
4
  width: 0;
@@ -1 +1 @@
1
- import{d as v,y as N,j as t}from"./index-DIir8pgm.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{d as v,y as N,j as t}from"./index-B62MiQAu.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import{d as b,y as h,j as t,B as g}from"./index-DIir8pgm.js";function y(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{y as E};
1
+ import{d as b,y as h,j as t,B as g}from"./index-B62MiQAu.js";function y(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{y as E};
@@ -1 +1 @@
1
- import{o as V,aV as q,aQ as R,q as o,aL as S,aN as A,d as I,j as l,B as C}from"./index-DIir8pgm.js";import{I as T}from"./input-BVAvDQ_C.js";import{s as z}from"./Plus-_0WPT4fC.js";import{s as K}from"./Trash01-1xYo27RH.js";const L=V({key:o().min(1,"Key is required"),value:o()}),M=V({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:A(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:S(L).optional(),configuration_scopes:S(o()).nullable().optional(),configuration_state:q(o(),R()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function W(s){const e=s.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(c=>e.includes(c))||["sk_","rk_","whsec_","pk_live","sk_live"].some(c=>e.startsWith(c))||["_key","_secret","_token","_password","_auth","_pat"].some(c=>e.endsWith(c)))}function X(s){const e=I.c(34),{value:t,onChange:n,keyPlaceholder:N,valuePlaceholder:c,className:E}=s,d=N===void 0?"VARIABLE_NAME":N,f=c===void 0?"value...":c;let v;e[0]!==n||e[1]!==t?(v=()=>{n([...t,{key:"",value:""}])},e[0]=n,e[1]=t,e[2]=v):v=e[2];const P=v;let y;e[3]!==n||e[4]!==t?(y=i=>{n(t.filter((u,r)=>r!==i))},e[3]=n,e[4]=t,e[5]=y):y=e[5];const h=y;let x;e[6]!==n||e[7]!==t?(x=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:u,value:a.value},n(r))},e[6]=n,e[7]=t,e[8]=x):x=e[8];const k=x;let b;e[9]!==n||e[10]!==t?(b=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:a.key,value:u},n(r))},e[9]=n,e[10]=t,e[11]=b):b=e[11];const g=b;let p;if(e[12]!==k||e[13]!==h||e[14]!==g||e[15]!==d||e[16]!==t||e[17]!==f){let i;e[19]!==k||e[20]!==h||e[21]!==g||e[22]!==d||e[23]!==f?(i=(u,r)=>l.jsxs("div",{className:"flex gap-2 items-center",children:[l.jsx(T,{placeholder:d,value:u.key,onChange:a=>k(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),l.jsx(T,{type:W(u.key)?"password":"text",placeholder:f,value:u.value,onChange:a=>g(r,a.target.value),className:"h-10 rounded-lg flex-1"}),l.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>h(r),children:l.jsx(K,{size:16})})]},r),e[19]=k,e[20]=h,e[21]=g,e[22]=d,e[23]=f,e[24]=i):i=e[24],p=t.map(i),e[12]=k,e[13]=h,e[14]=g,e[15]=d,e[16]=t,e[17]=f,e[18]=p}else p=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx(z,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==P?(m=l.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:P,children:[w,"Add Environment Variable"]}),e[26]=P,e[27]=m):m=e[27];let _;e[28]!==p||e[29]!==m?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[p,m]}),e[28]=p,e[29]=m,e[30]=_):_=e[30];let j;return e[31]!==E||e[32]!==_?(j=l.jsx("div",{className:E,children:_}),e[31]=E,e[32]=_,e[33]=j):j=e[33],j}function $(s){const e={};for(const{key:t,value:n}of s)t.trim()&&(e[t.trim()]=n);return e}function F(s){return s?Object.entries(s).map(([e,t])=>({key:e,value:t})):[]}export{X as E,M as c,$ as e,F as r};
1
+ import{o as V,aV as q,aQ as R,q as o,aL as S,aN as A,d as I,j as l,B as C}from"./index-B62MiQAu.js";import{I as T}from"./input-BNSWRvAr.js";import{s as z}from"./Plus-ltkKoqJz.js";import{s as K}from"./Trash01-fCw8HP0s.js";const L=V({key:o().min(1,"Key is required"),value:o()}),M=V({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:A(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:S(L).optional(),configuration_scopes:S(o()).nullable().optional(),configuration_state:q(o(),R()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function W(s){const e=s.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(c=>e.includes(c))||["sk_","rk_","whsec_","pk_live","sk_live"].some(c=>e.startsWith(c))||["_key","_secret","_token","_password","_auth","_pat"].some(c=>e.endsWith(c)))}function X(s){const e=I.c(34),{value:t,onChange:n,keyPlaceholder:N,valuePlaceholder:c,className:E}=s,d=N===void 0?"VARIABLE_NAME":N,f=c===void 0?"value...":c;let v;e[0]!==n||e[1]!==t?(v=()=>{n([...t,{key:"",value:""}])},e[0]=n,e[1]=t,e[2]=v):v=e[2];const P=v;let y;e[3]!==n||e[4]!==t?(y=i=>{n(t.filter((u,r)=>r!==i))},e[3]=n,e[4]=t,e[5]=y):y=e[5];const h=y;let x;e[6]!==n||e[7]!==t?(x=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:u,value:a.value},n(r))},e[6]=n,e[7]=t,e[8]=x):x=e[8];const k=x;let b;e[9]!==n||e[10]!==t?(b=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:a.key,value:u},n(r))},e[9]=n,e[10]=t,e[11]=b):b=e[11];const g=b;let p;if(e[12]!==k||e[13]!==h||e[14]!==g||e[15]!==d||e[16]!==t||e[17]!==f){let i;e[19]!==k||e[20]!==h||e[21]!==g||e[22]!==d||e[23]!==f?(i=(u,r)=>l.jsxs("div",{className:"flex gap-2 items-center",children:[l.jsx(T,{placeholder:d,value:u.key,onChange:a=>k(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),l.jsx(T,{type:W(u.key)?"password":"text",placeholder:f,value:u.value,onChange:a=>g(r,a.target.value),className:"h-10 rounded-lg flex-1"}),l.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>h(r),children:l.jsx(K,{size:16})})]},r),e[19]=k,e[20]=h,e[21]=g,e[22]=d,e[23]=f,e[24]=i):i=e[24],p=t.map(i),e[12]=k,e[13]=h,e[14]=g,e[15]=d,e[16]=t,e[17]=f,e[18]=p}else p=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx(z,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==P?(m=l.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:P,children:[w,"Add Environment Variable"]}),e[26]=P,e[27]=m):m=e[27];let _;e[28]!==p||e[29]!==m?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[p,m]}),e[28]=p,e[29]=m,e[30]=_):_=e[30];let j;return e[31]!==E||e[32]!==_?(j=l.jsx("div",{className:E,children:_}),e[31]=E,e[32]=_,e[33]=j):j=e[33],j}function $(s){const e={};for(const{key:t,value:n}of s)t.trim()&&(e[t.trim()]=n);return e}function F(s){return s?Object.entries(s).map(([e,t])=>({key:e,value:t})):[]}export{X as E,M as c,$ as e,F as r};
@@ -1 +1 @@
1
- import"./constants-CUwoz2Qc.js";import{g as A,b as D}from"./registry-utils-pfpET92F.js";import{g as H}from"./generate-id-Dyweu44Y.js";const E="mcp.mesh";function O(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function R(e){const r=e?.identifier||e?.name;return r?r.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase()):"Unknown"}function $(e,r,g,s){const n=e.server,t=e._meta?.[E],f=new Date().toISOString(),b=t?.friendlyName||t?.friendly_name||e.title||n?.title||n?.name||"Unnamed MCP Server",v=n?.description||null,x=n?.icons?.[0]?.src||A(n?.repository)||null,o=t?.oauth_config,I=o&&typeof o.authorizationEndpoint=="string"&&typeof o.tokenEndpoint=="string"&&typeof o.clientId=="string"&&Array.isArray(o.scopes)&&(o.grantType==="authorization_code"||o.grantType==="client_credentials")?o:null,N=t?.configuration_state,P=t?.configuration_scopes,T=n?.repository?{url:n.repository.url,source:n.repository.source,subfolder:n.repository.subfolder}:null,u=n?.packages??[],m=n?.remotes??[],C=s?.packageIndex??0,S=s?.remoteIndex??0,y=u.length>0&&s?.packageIndex!==void 0,a=y?u[C]:null,i=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const d={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(d[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(d).length>0&&{envVars:d}}}else i?(c=D(i.type)||"HTTP",l=i.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:i&&w&&(p=` (${O(i)})`);const U=b+p;return{id:H("conn"),title:U,description:v,icon:x,app_name:t?.appName||n?.name||null,app_id:t?.id||e.id||null,connection_type:c,connection_url:l,connection_token:null,connection_headers:_,oauth_config:I,configuration_state:N??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:t?.verified??!1,scopeName:t?.scopeName??null,toolsCount:t?.tools?.length??0,publishedAt:t?.publishedAt??null,repository:T},created_at:f,updated_at:f,created_by:g,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,$ as e};
1
+ import"./constants-B_S2_Dfe.js";import{g as A,b as D}from"./registry-utils-DWGplsmC.js";import{g as H}from"./generate-id-Dyweu44Y.js";const E="mcp.mesh";function O(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function R(e){const r=e?.identifier||e?.name;return r?r.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase()):"Unknown"}function $(e,r,g,s){const n=e.server,t=e._meta?.[E],f=new Date().toISOString(),b=t?.friendlyName||t?.friendly_name||e.title||n?.title||n?.name||"Unnamed MCP Server",v=n?.description||null,x=n?.icons?.[0]?.src||A(n?.repository)||null,o=t?.oauth_config,I=o&&typeof o.authorizationEndpoint=="string"&&typeof o.tokenEndpoint=="string"&&typeof o.clientId=="string"&&Array.isArray(o.scopes)&&(o.grantType==="authorization_code"||o.grantType==="client_credentials")?o:null,N=t?.configuration_state,P=t?.configuration_scopes,T=n?.repository?{url:n.repository.url,source:n.repository.source,subfolder:n.repository.subfolder}:null,u=n?.packages??[],m=n?.remotes??[],C=s?.packageIndex??0,S=s?.remoteIndex??0,y=u.length>0&&s?.packageIndex!==void 0,a=y?u[C]:null,i=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const d={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(d[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(d).length>0&&{envVars:d}}}else i?(c=D(i.type)||"HTTP",l=i.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:i&&w&&(p=` (${O(i)})`);const U=b+p;return{id:H("conn"),title:U,description:v,icon:x,app_name:t?.appName||n?.name||null,app_id:t?.id||e.id||null,connection_type:c,connection_url:l,connection_token:null,connection_headers:_,oauth_config:I,configuration_state:N??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:t?.verified??!1,scopeName:t?.scopeName??null,toolsCount:t?.tools?.length??0,publishedAt:t?.publishedAt??null,repository:T},created_at:f,updated_at:f,created_by:g,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,$ as e};
@@ -1 +1 @@
1
- import{M as C,d as f,j as c,J as j,r as d,y as p,Q as v,R as b,T as h}from"./index-DIir8pgm.js";import{L as N}from"./label-C6omQTs_.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function y(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function L(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function P(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,D as a,w as b,y as c,L as d,P as e,R as f};
1
+ import{M as C,d as f,j as c,J as j,r as d,y as p,Q as v,R as b,T as h}from"./index-B62MiQAu.js";import{L as N}from"./label-C-5U7XF4.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function y(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function L(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function P(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,D as a,w as b,y as c,L as d,P as e,R as f};
@@ -1 +1 @@
1
- import{o as y,q as d,c as P,x as S,O as F,v as N,t as E,w as I,K as g,j as e,d as v}from"./index-DIir8pgm.js";import{u as w}from"./useMutation-DPjXSTSD.js";import{u as D,a as T}from"./constants-C2mKle9u.js";import{I as f}from"./input-BVAvDQ_C.js";import{T as B}from"./textarea-CdQzy4Ij.js";import{a as L,F as u,b as i,c,d as m,e as b,f as x}from"./form-DTthvfe9.js";import{L as O}from"./logo-upload-FTAEWKjw.js";import{D as A}from"./danger-zone-R1YnFMha.js";import"./label-C6omQTs_.js";import"./Upload01-B0BJCQ_e.js";import"./X-COxH8ezg.js";import"./alert-dialog-CahR3t2-.js";const G=y({name:d().min(1,"Name is required").max(200,"Name is too long"),description:d().max(1e3,"Description is too long").nullable(),themeColor:d().nullable(),logo:d().nullable().optional()});function M(){const{org:r,project:n}=P(),t=S(),h=n.slug===F,C=D({connectionId:T,orgId:r.id}),s=N({resolver:E(G),values:{name:n.name??"",description:n.description??"",themeColor:n.ui?.themeColor??"#60a5fa",logo:n.ui?.icon??""}}),l=w({mutationFn:async o=>{const a=await C.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:o.name,description:o.description||null,ui:{themeColor:o.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:o.logo||null}}});return a.structuredContent??a},onSuccess:()=>{t.invalidateQueries({queryKey:g.project(r.id,n.slug)}),t.invalidateQueries({queryKey:g.projects(r.id)}),s.reset(s.getValues())},onError:o=>{I.error("Failed to update project: "+(o instanceof Error?o.message:"Unknown error"))}}),j=async o=>{await l.mutateAsync(o)},p=o=>{o(),s.handleSubmit(j)()};return e.jsx("div",{className:"flex flex-col",children:e.jsx(L,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(j),className:"space-y-6",children:[e.jsx(u,{control:s.control,name:"name",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Project Name"}),e.jsx(m,{children:e.jsx(f,{placeholder:"My Project",...o,onBlur:()=>p(o.onBlur),disabled:h||l.isPending})}),h&&e.jsx(b,{children:"The organization admin project name cannot be changed."}),e.jsx(x,{})]})}),e.jsxs(i,{children:[e.jsx(c,{children:"Slug"}),e.jsx(m,{children:e.jsx(f,{value:n.slug,disabled:!0,className:"bg-muted"})}),e.jsx(b,{children:"The project slug cannot be changed after creation."})]}),e.jsx(u,{control:s.control,name:"description",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Description"}),e.jsx(m,{children:e.jsx(B,{placeholder:"Optional project description...",rows:3,...o,value:o.value??"",onBlur:()=>p(o.onBlur),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"logo",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Logo"}),e.jsx(m,{children:e.jsx(O,{value:o.value,onChange:a=>{o.onChange(a),s.handleSubmit(j)()},name:s.watch("name"),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"themeColor",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Color"}),e.jsx(m,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:o.value??"#60a5fa"},children:e.jsx("input",{type:"color",value:o.value??"#60a5fa",onChange:a=>o.onChange(a.target.value),onBlur:()=>p(o.onBlur),disabled:l.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),e.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:o.value??"#60a5fa"})]})}),e.jsx(x,{})]})})]})})})}function _(){const r=v.c(2);let n;r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),r[0]=n):n=r[0];let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs("div",{className:"flex flex-col",children:[n,e.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[e.jsx(M,{}),e.jsx(A,{})]})]}),r[1]=t):t=r[1],t}function H(){const r=v.c(1);let n;return r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(_,{}),r[0]=n):n=r[0],n}export{H as default};
1
+ import{o as y,q as d,c as P,x as S,O as F,v as N,t as E,w as I,K as g,j as e,d as v}from"./index-B62MiQAu.js";import{u as w}from"./useMutation-5tF0rOhi.js";import{u as D,a as T}from"./constants-B7D0VCWO.js";import{I as f}from"./input-BNSWRvAr.js";import{T as B}from"./textarea-Db5eGrte.js";import{a as L,F as u,b as i,c,d as m,e as b,f as x}from"./form-BxnLhCD_.js";import{L as O}from"./logo-upload-Cnlppzw5.js";import{D as A}from"./danger-zone-xpmW0-9o.js";import"./label-C-5U7XF4.js";import"./Upload01-3AVPYkeL.js";import"./X-BNpME-HX.js";import"./alert-dialog-DPu-w5FH.js";const G=y({name:d().min(1,"Name is required").max(200,"Name is too long"),description:d().max(1e3,"Description is too long").nullable(),themeColor:d().nullable(),logo:d().nullable().optional()});function M(){const{org:r,project:n}=P(),t=S(),h=n.slug===F,C=D({connectionId:T,orgId:r.id}),s=N({resolver:E(G),values:{name:n.name??"",description:n.description??"",themeColor:n.ui?.themeColor??"#60a5fa",logo:n.ui?.icon??""}}),l=w({mutationFn:async o=>{const a=await C.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:o.name,description:o.description||null,ui:{themeColor:o.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:o.logo||null}}});return a.structuredContent??a},onSuccess:()=>{t.invalidateQueries({queryKey:g.project(r.id,n.slug)}),t.invalidateQueries({queryKey:g.projects(r.id)}),s.reset(s.getValues())},onError:o=>{I.error("Failed to update project: "+(o instanceof Error?o.message:"Unknown error"))}}),j=async o=>{await l.mutateAsync(o)},p=o=>{o(),s.handleSubmit(j)()};return e.jsx("div",{className:"flex flex-col",children:e.jsx(L,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(j),className:"space-y-6",children:[e.jsx(u,{control:s.control,name:"name",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Project Name"}),e.jsx(m,{children:e.jsx(f,{placeholder:"My Project",...o,onBlur:()=>p(o.onBlur),disabled:h||l.isPending})}),h&&e.jsx(b,{children:"The organization admin project name cannot be changed."}),e.jsx(x,{})]})}),e.jsxs(i,{children:[e.jsx(c,{children:"Slug"}),e.jsx(m,{children:e.jsx(f,{value:n.slug,disabled:!0,className:"bg-muted"})}),e.jsx(b,{children:"The project slug cannot be changed after creation."})]}),e.jsx(u,{control:s.control,name:"description",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Description"}),e.jsx(m,{children:e.jsx(B,{placeholder:"Optional project description...",rows:3,...o,value:o.value??"",onBlur:()=>p(o.onBlur),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"logo",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Logo"}),e.jsx(m,{children:e.jsx(O,{value:o.value,onChange:a=>{o.onChange(a),s.handleSubmit(j)()},name:s.watch("name"),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"themeColor",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Color"}),e.jsx(m,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:o.value??"#60a5fa"},children:e.jsx("input",{type:"color",value:o.value??"#60a5fa",onChange:a=>o.onChange(a.target.value),onBlur:()=>p(o.onBlur),disabled:l.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),e.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:o.value??"#60a5fa"})]})}),e.jsx(x,{})]})})]})})})}function _(){const r=v.c(2);let n;r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),r[0]=n):n=r[0];let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs("div",{className:"flex flex-col",children:[n,e.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[e.jsx(M,{}),e.jsx(A,{})]})]}),r[1]=t):t=r[1],t}function H(){const r=v.c(1);let n;return r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(_,{}),r[0]=n):n=r[0],n}export{H as default};
@@ -1 +1 @@
1
- import{d as f,y,j as s,g as _,r as C,B as $,bN as O,f as E,x as F,w,D,S as R,N as H}from"./index-DIir8pgm.js";import{C as k}from"./card-CPxXaS9B.js";import{A as G}from"./avatar-CUJtyPo2.js";import{i as Q}from"./AlertCircle-CMykqSBg.js";import{i as q}from"./Check-xiDQ8BtU.js";import{s as B}from"./Plus-_0WPT4fC.js";import{i as T}from"./SearchMd-Drvt0RJI.js";import{s as M}from"./XClose-DN7ytwf7.js";import{I as U}from"./input-BVAvDQ_C.js";import{C as P}from"./create-organization-dialog-MUEiKqL8.js";import"./User01-BeQd85RG.js";import"./alert-dialog-CahR3t2-.js";import"./form-DTthvfe9.js";import"./label-C6omQTs_.js";import"./spinner-DCPsu4ZG.js";import"./useMutation-DPjXSTSD.js";function V(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:a}=t,c=a===void 0?!1:a;let o;e[0]!==i?(o=j=>{i&&i(j)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",r=c&&"hover:ring-2 hover:ring-primary";let d;e[2]!==l||e[3]!==x||e[4]!==r?(d=y("group transition-all flex flex-col gap-0",x,r,l),e[2]=l,e[3]=x,e[4]=r,e[5]=d):d=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==d?(g=s.jsx(k,{className:d,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=d,e[9]=g):g=e[9],g}function X(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:a,objectFit:c,className:o}=t,m=i===void 0?"square":i,x=a===void 0?"lg":a,r=c===void 0?"contain":c;let d;return e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==m||e[4]!==x||e[5]!==n?(d=s.jsx(G,{url:n,fallback:l,shape:m,size:x,objectFit:r,className:o}),e[0]=o,e[1]=l,e[2]=r,e[3]=m,e[4]=x,e[5]=n,e[6]=d):d=e[6],d}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Z(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function ee(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function te(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function se(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(V,{Avatar:X,AvatarSection:Z,Header:Y,Title:J,Subtitle:K,Content:W,Footer:ee,Badge:te,Skeleton:se}),ie={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},le={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},ne={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ae={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},re={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},oe={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:a}=t;let c;e[0]!==l?(c=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=c):c=e[1];const o=c,x=ie[i===void 0?4:i],r=o.sm&&le[o.sm],d=o.md&&ne[o.md],g=o.lg&&ae[o.lg],j=o.xl&&re[o.xl],v=o["2xl"]&&oe[o["2xl"]];let N;e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==d||e[6]!==g||e[7]!==j||e[8]!==v?(N=y("w-full grid",x,r,d,g,j,v,a),e[2]=a,e[3]=x,e[4]=r,e[5]=d,e[6]=g,e[7]=j,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function ce(t){const e=f.c(9),{count:n,columns:l,gap:i,className:a}=t,c=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let r;e[2]!==c?(r=Array.from({length:c}).map(de),e[2]=c,e[3]=r):r=e[3];let d;return e[4]!==a||e[5]!==m||e[6]!==x||e[7]!==r?(d=s.jsx(L,{columns:m,gap:x,className:a,children:r}),e[4]=a,e[5]=m,e[6]=x,e[7]=r,e[8]=d):d=e[8],d}function de(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const I=Object.assign(L,{Skeleton:ce});function me({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),a=F(),c=E(),o=async()=>{n(!0);try{const r=await _.organization.acceptInvitation({invitationId:t.id});if(r.error)w.error(r.error.message),n(!1);else{const d=await _.organization.setActive({organizationId:t.organizationId});d?.data?.slug?(w.success("Invitation accepted!"),c({to:"/$org",params:{org:d.data.slug}})):(w.success("Invitation accepted! Redirecting..."),c({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const r=await _.organization.rejectInvitation({invitationId:t.id});r.error?(w.error(r.error.message),i(!1)):(w.success("Invitation rejected"),await a.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(M,{size:16}),"Decline"]})})]})})]})}function xe({query:t}){const e=C.useContext(O),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(c=>c.status==="pending"&&new Date(c.expiresAt)>new Date),a=t?(()=>{const c=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(c)||o.organizationId.toLowerCase().includes(c))})():i;return a.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(I,{columns:{sm:2,md:3,lg:4},children:a.map(c=>s.jsx(me,{invitation:c},c.id))})]})}function ue(t){const e=f.c(14),{query:n}=t,{data:l}=_.useListOrganizations(),i=E();let a;e[0]!==l||e[1]!==n?(a=l?n?(()=>{const r=n.toLowerCase();return l.filter(d=>d.name.toLowerCase().includes(r)||d.slug.toLowerCase().includes(r))})():l:[],e[0]=l,e[1]=n,e[2]=a):a=e[2];const c=a;if(!l||l.length===0){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=r):r=e[3],r}if(c.length===0){let r;return e[4]!==n?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=r):r=e[5],r}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==c||e[8]!==i){let r;e[10]!==i?(r=d=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:d.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:d.logo||"",fallback:d.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",d.slug]}),s.jsx(u.Title,{children:d.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(d.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},d.id),e[10]=i,e[11]=r):r=e[11],m=c.map(r),e[7]=c,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(I,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function fe(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function ge(){const t=f.c(27),{error:e,isPending:n}=_.useListOrganizations(),[l,i]=C.useState(""),[a,c]=C.useState(!1),o=C.useDeferredValue(l);if(n){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"max-w-6xl mx-auto p-4 md:p-8",children:s.jsx("div",{className:"@container",children:s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=p):p=t[0],p}if(e){let p;return t[1]!==e?(p=s.jsx("div",{className:"max-w-6xl mx-auto p-4 md:p-8",children:s.jsx(fe,{error:e})}),t[1]=e,t[2]=p):p=t[2],p}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(xe,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(T,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=r):r=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=p=>i(p.target.value),t[7]=d):d=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[r,s.jsx(U,{className:"pl-8 h-8 w-full sm:w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:d})]}),t[8]=l,t[9]=g):g=t[9];let j;t[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs($,{size:"sm",onClick:()=>c(!0),children:[s.jsx(B,{size:16}),s.jsx("span",{className:"hidden sm:inline",children:"New organization"})]}),t[10]=j):j=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,j]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(ue,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==a?(z=s.jsx(P,{open:a,onOpenChange:c}),t[22]=a,t[23]=z):z=t[23];let A;return t[24]!==S||t[25]!==z?(A=s.jsxs("div",{className:"max-w-6xl mx-auto p-4 md:p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=A):A=t[26],A}function ke(){const t=f.c(4),e=D(),{data:n,isPending:l}=_.useListOrganizations();if(e.localMode){if(l){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(R,{}),t[0]=c):c=t[0],c}const a=n?.[0];if(a?.slug){const c=`/${a.slug}/org-admin`;let o;return t[1]!==c?(o=s.jsx(H,{to:c,replace:!0}),t[1]=c,t[2]=o):o=t[2],o}}let i;return t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"min-h-full",children:s.jsx(ge,{})}),t[3]=i):i=t[3],i}export{ke as default};
1
+ import{d as f,y,j as s,g as _,r as C,B as $,bN as O,f as E,x as F,w,D,S as R,N as H}from"./index-B62MiQAu.js";import{C as k}from"./card-CQTuw0Xi.js";import{A as G}from"./avatar-DJ_eE6FL.js";import{i as Q}from"./AlertCircle-CE4aMC_6.js";import{i as q}from"./Check-BgcEZAFd.js";import{s as B}from"./Plus-ltkKoqJz.js";import{i as T}from"./SearchMd-CS43V34Y.js";import{s as M}from"./XClose-DKDxXEaA.js";import{I as U}from"./input-BNSWRvAr.js";import{C as P}from"./create-organization-dialog-ixA2WoW7.js";import"./User01-CKoZ8ZDH.js";import"./alert-dialog-DPu-w5FH.js";import"./form-BxnLhCD_.js";import"./label-C-5U7XF4.js";import"./spinner-X15c9Qjw.js";import"./useMutation-5tF0rOhi.js";function V(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:a}=t,c=a===void 0?!1:a;let o;e[0]!==i?(o=j=>{i&&i(j)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",r=c&&"hover:ring-2 hover:ring-primary";let d;e[2]!==l||e[3]!==x||e[4]!==r?(d=y("group transition-all flex flex-col gap-0",x,r,l),e[2]=l,e[3]=x,e[4]=r,e[5]=d):d=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==d?(g=s.jsx(k,{className:d,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=d,e[9]=g):g=e[9],g}function X(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:a,objectFit:c,className:o}=t,m=i===void 0?"square":i,x=a===void 0?"lg":a,r=c===void 0?"contain":c;let d;return e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==m||e[4]!==x||e[5]!==n?(d=s.jsx(G,{url:n,fallback:l,shape:m,size:x,objectFit:r,className:o}),e[0]=o,e[1]=l,e[2]=r,e[3]=m,e[4]=x,e[5]=n,e[6]=d):d=e[6],d}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function Z(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function ee(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function te(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function se(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(V,{Avatar:X,AvatarSection:Z,Header:Y,Title:J,Subtitle:K,Content:W,Footer:ee,Badge:te,Skeleton:se}),ie={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},le={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},ne={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ae={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},re={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},oe={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:a}=t;let c;e[0]!==l?(c=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=c):c=e[1];const o=c,x=ie[i===void 0?4:i],r=o.sm&&le[o.sm],d=o.md&&ne[o.md],g=o.lg&&ae[o.lg],j=o.xl&&re[o.xl],v=o["2xl"]&&oe[o["2xl"]];let N;e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==d||e[6]!==g||e[7]!==j||e[8]!==v?(N=y("w-full grid",x,r,d,g,j,v,a),e[2]=a,e[3]=x,e[4]=r,e[5]=d,e[6]=g,e[7]=j,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function ce(t){const e=f.c(9),{count:n,columns:l,gap:i,className:a}=t,c=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let r;e[2]!==c?(r=Array.from({length:c}).map(de),e[2]=c,e[3]=r):r=e[3];let d;return e[4]!==a||e[5]!==m||e[6]!==x||e[7]!==r?(d=s.jsx(L,{columns:m,gap:x,className:a,children:r}),e[4]=a,e[5]=m,e[6]=x,e[7]=r,e[8]=d):d=e[8],d}function de(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const I=Object.assign(L,{Skeleton:ce});function me({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),a=F(),c=E(),o=async()=>{n(!0);try{const r=await _.organization.acceptInvitation({invitationId:t.id});if(r.error)w.error(r.error.message),n(!1);else{const d=await _.organization.setActive({organizationId:t.organizationId});d?.data?.slug?(w.success("Invitation accepted!"),c({to:"/$org",params:{org:d.data.slug}})):(w.success("Invitation accepted! Redirecting..."),c({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const r=await _.organization.rejectInvitation({invitationId:t.id});r.error?(w.error(r.error.message),i(!1)):(w.success("Invitation rejected"),await a.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(M,{size:16}),"Decline"]})})]})})]})}function xe({query:t}){const e=C.useContext(O),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(c=>c.status==="pending"&&new Date(c.expiresAt)>new Date),a=t?(()=>{const c=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(c)||o.organizationId.toLowerCase().includes(c))})():i;return a.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(I,{columns:{sm:2,md:3,lg:4},children:a.map(c=>s.jsx(me,{invitation:c},c.id))})]})}function ue(t){const e=f.c(14),{query:n}=t,{data:l}=_.useListOrganizations(),i=E();let a;e[0]!==l||e[1]!==n?(a=l?n?(()=>{const r=n.toLowerCase();return l.filter(d=>d.name.toLowerCase().includes(r)||d.slug.toLowerCase().includes(r))})():l:[],e[0]=l,e[1]=n,e[2]=a):a=e[2];const c=a;if(!l||l.length===0){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=r):r=e[3],r}if(c.length===0){let r;return e[4]!==n?(r=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=r):r=e[5],r}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==c||e[8]!==i){let r;e[10]!==i?(r=d=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:d.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:d.logo||"",fallback:d.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",d.slug]}),s.jsx(u.Title,{children:d.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(d.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},d.id),e[10]=i,e[11]=r):r=e[11],m=c.map(r),e[7]=c,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(I,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function fe(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function ge(){const t=f.c(27),{error:e,isPending:n}=_.useListOrganizations(),[l,i]=C.useState(""),[a,c]=C.useState(!1),o=C.useDeferredValue(l);if(n){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"max-w-6xl mx-auto p-4 md:p-8",children:s.jsx("div",{className:"@container",children:s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=p):p=t[0],p}if(e){let p;return t[1]!==e?(p=s.jsx("div",{className:"max-w-6xl mx-auto p-4 md:p-8",children:s.jsx(fe,{error:e})}),t[1]=e,t[2]=p):p=t[2],p}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(xe,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(T,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=r):r=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=p=>i(p.target.value),t[7]=d):d=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[r,s.jsx(U,{className:"pl-8 h-8 w-full sm:w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:d})]}),t[8]=l,t[9]=g):g=t[9];let j;t[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs($,{size:"sm",onClick:()=>c(!0),children:[s.jsx(B,{size:16}),s.jsx("span",{className:"hidden sm:inline",children:"New organization"})]}),t[10]=j):j=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,j]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(ue,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==a?(z=s.jsx(P,{open:a,onOpenChange:c}),t[22]=a,t[23]=z):z=t[23];let A;return t[24]!==S||t[25]!==z?(A=s.jsxs("div",{className:"max-w-6xl mx-auto p-4 md:p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=A):A=t[26],A}function ke(){const t=f.c(4),e=D(),{data:n,isPending:l}=_.useListOrganizations();if(e.localMode){if(l){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(R,{}),t[0]=c):c=t[0],c}const a=n?.[0];if(a?.slug){const c=`/${a.slug}/org-admin`;let o;return t[1]!==c?(o=s.jsx(H,{to:c,replace:!0}),t[1]=c,t[2]=o):o=t[2],o}}let i;return t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"min-h-full",children:s.jsx(ge,{})}),t[3]=i):i=t[3],i}export{ke as default};
@@ -1 +1 @@
1
- import{d as fe,c as pe,f as ge,x as xe,g as he,r as ne,j as o,y as be,B as re,K as je,w as le}from"./index-DIir8pgm.js";import{u as ye}from"./useQuery-BJg_09kQ.js";import{u as Ce}from"./useMutation-DPjXSTSD.js";import{a as Ie,u as Ne}from"./constants-C2mKle9u.js";import{D as _e,a as we,b as Se,c as ve,d as Ee}from"./dialog-DkflQEEK.js";import{i as Pe}from"./ArrowLeft-uGR-9mNu.js";import{g as De}from"./generate-id-Dyweu44Y.js";import{g as Te}from"./slug-DcxyEoi0.js";import{C as ke}from"./collection-search-DpxIEj2Y.js";async function Oe(){const l=await fetch("/api/deco-sites");if(!l.ok){const e=await l.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${l.status})`)}return l.json()}function Ue(l){const e=fe.c(69),{open:P,onOpenChange:K,onBack:D}=l,{org:s}=pe(),M=ge(),q=xe(),{data:te}=he.useSession(),[i,oe]=ne.useState(null),[a,B]=ne.useState("");let T;e[0]!==s.id?(T={connectionId:Ie,orgId:s.id},e[0]=s.id,e[1]=T):T=e[1];const E=Ne(T),z=te?.user?.email;let m;e[2]!==z?(m=["deco-sites",z],e[2]=z,e[3]=m):m=e[3];const Q=P&&!!te?.user?.email;let k;e[4]!==m||e[5]!==Q?(k={queryKey:m,queryFn:Oe,enabled:Q,staleTime:6e4,retry:!1},e[4]=m,e[5]=Q,e[6]=k):k=e[6];const{data:ie,isLoading:u,error:ae}=ye(k),V=ie?.sites??[];let O;e[7]!==K?(O=t=>{t||(oe(null),B("")),K(t)},e[7]=K,e[8]=O):O=e[8];const n=O;let L;e[9]!==a?(L=t=>t.name.toLowerCase().includes(a.toLowerCase())||t.domains?.[0]?.domain.toLowerCase().includes(a.toLowerCase()),e[9]=a,e[10]=L):L=e[10];const U=V.filter(L),ce=!i||U.some(t=>t.name===i);let f;e[11]!==E||e[12]!==s.id?(f=async t=>{const r=De("conn"),d=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:t,connId:r,orgId:s.id})});if(!d.ok){const ue=await d.json().catch(Fe);throw new Error(ue.error??`Failed to create connection (${d.status})`)}const se=await E.callTool({name:"PROJECT_CREATE",arguments:{organizationId:s.id,slug:Te(t),name:t,description:"Imported from deco.cx",enabledPlugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:null,themeColor:"#22C55E"}}}),ee=(se.structuredContent??se).project;return await E.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:ee.id,connectionId:r}}),await E.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:ee.id,pinnedViews:[{connectionId:r,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:r,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:r,toolName:"get_monitor_data",label:"Monitor",icon:null}]}}),{project:ee,connId:r}},e[11]=E,e[12]=s.id,e[13]=f):f=e[13];let p;e[14]!==n||e[15]!==M||e[16]!==s.id||e[17]!==s.slug||e[18]!==q?(p=t=>{const{project:r,connId:d}=t;q.invalidateQueries({queryKey:je.projects(s.id)}),le.success(`Imported ${r.slug} from deco.cx`),n(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),M({to:"/$org/$project/apps/$connectionId/$toolName",params:{org:s.slug,project:r.slug,connectionId:d,toolName:"file_explorer"}})},e[14]=n,e[15]=M,e[16]=s.id,e[17]=s.slug,e[18]=q,e[19]=p):p=e[19];let $;e[20]!==f||e[21]!==p?($={mutationFn:f,onSuccess:p,onError:$e},e[20]=f,e[21]=p,e[22]=$):$=e[22];const c=Ce($),G=we,H=_e,de="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Se,{className:"sr-only",children:o.jsx(ve,{children:"Import from deco.cx"})}),e[23]=g):g=e[23];let x;e[24]!==n||e[25]!==D?(x=()=>D?D():n(!1),e[24]=n,e[25]=D,e[26]=x):x=e[26];let F;e[27]===Symbol.for("react.memo_cache_sentinel")?(F=o.jsx(Pe,{size:18}),e[27]=F):F=e[27];let h;e[28]!==x?(h=o.jsx("button",{type:"button",onClick:x,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:F}),e[28]=x,e[29]=h):h=e[29];let R;e[30]===Symbol.for("react.memo_cache_sentinel")?(R=o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[30]=R):R=e[30];let b;e[31]!==h?(b=o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[h,R]}),e[31]=h,e[32]=b):b=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t=>{t.key==="Escape"&&B("")},e[33]=A):A=e[33];let j;e[34]!==a?(j=o.jsx("div",{children:o.jsx(ke,{value:a,onChange:B,placeholder:"Search sites...",onKeyDown:A})}),e[34]=a,e[35]=j):j=e[35];const me="pb-0 min-h-[300px]";let y;e[36]!==u?(y=u&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[36]=u,e[37]=y):y=e[37];const W=!u&&!ae&&V.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Y=!u&&V.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[U.length===0&&o.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",a,"”"]}),U.map(t=>{const r=t.domains?.find(Le)?.domain??t.domains?.[0]?.domain,d=i===t.name;return o.jsxs("button",{type:"button",onClick:()=>oe(t.name),className:be("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",d?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:t.thumb_url?o.jsx("img",{src:t.thumb_url,alt:t.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:t.name}),r&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:r})]})]},t.name)})]});let C;e[38]!==y||e[39]!==W||e[40]!==Y?(C=o.jsxs("div",{className:me,children:[y,W,Y]}),e[38]=y,e[39]=W,e[40]=Y,e[41]=C):C=e[41];let I;e[42]!==n?(I=()=>n(!1),e[42]=n,e[43]=I):I=e[43];let N;e[44]!==c.isPending||e[45]!==I?(N=o.jsx(re,{variant:"outline",onClick:I,disabled:c.isPending,children:"Cancel"}),e[44]=c.isPending,e[45]=I,e[46]=N):N=e[46];const X=!i||!ce||c.isPending||u;let _;e[47]!==c||e[48]!==i?(_=()=>i&&c.mutate(i),e[47]=c,e[48]=i,e[49]=_):_=e[49];const Z=c.isPending?"Importing...":"Import";let w;e[50]!==X||e[51]!==_||e[52]!==Z?(w=o.jsx(re,{disabled:X,onClick:_,children:Z}),e[50]=X,e[51]=_,e[52]=Z,e[53]=w):w=e[53];let S;e[54]!==N||e[55]!==w?(S=o.jsxs(Ee,{className:"px-8 py-5 border-t border-border",children:[N,w]}),e[54]=N,e[55]=w,e[56]=S):S=e[56];let v;e[57]!==H||e[58]!==g||e[59]!==b||e[60]!==j||e[61]!==C||e[62]!==S?(v=o.jsxs(H,{className:de,children:[g,b,j,C,S]}),e[57]=H,e[58]=g,e[59]=b,e[60]=j,e[61]=C,e[62]=S,e[63]=v):v=e[63];let J;return e[64]!==G||e[65]!==n||e[66]!==P||e[67]!==v?(J=o.jsx(G,{open:P,onOpenChange:n,children:v}),e[64]=G,e[65]=n,e[66]=P,e[67]=v,e[68]=J):J=e[68],J}function Le(l){return l.production}function $e(l){le.error("Import failed: "+(l instanceof Error?l.message:"Unknown error"))}function Fe(){return{}}export{Ue as I};
1
+ import{d as fe,c as pe,f as ge,x as xe,g as he,r as ne,j as o,y as be,B as re,K as je,w as le}from"./index-B62MiQAu.js";import{u as ye}from"./useQuery-Cr3Ibn6v.js";import{u as Ce}from"./useMutation-5tF0rOhi.js";import{a as Ie,u as Ne}from"./constants-B7D0VCWO.js";import{D as _e,a as we,b as Se,c as ve,d as Ee}from"./dialog-Ce95gXqs.js";import{i as Pe}from"./ArrowLeft-VzQjF5nf.js";import{g as De}from"./generate-id-Dyweu44Y.js";import{g as Te}from"./slug-DcxyEoi0.js";import{C as ke}from"./collection-search-BxbLLE-D.js";async function Oe(){const l=await fetch("/api/deco-sites");if(!l.ok){const e=await l.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${l.status})`)}return l.json()}function Ue(l){const e=fe.c(69),{open:P,onOpenChange:K,onBack:D}=l,{org:s}=pe(),M=ge(),q=xe(),{data:te}=he.useSession(),[i,oe]=ne.useState(null),[a,B]=ne.useState("");let T;e[0]!==s.id?(T={connectionId:Ie,orgId:s.id},e[0]=s.id,e[1]=T):T=e[1];const E=Ne(T),z=te?.user?.email;let m;e[2]!==z?(m=["deco-sites",z],e[2]=z,e[3]=m):m=e[3];const Q=P&&!!te?.user?.email;let k;e[4]!==m||e[5]!==Q?(k={queryKey:m,queryFn:Oe,enabled:Q,staleTime:6e4,retry:!1},e[4]=m,e[5]=Q,e[6]=k):k=e[6];const{data:ie,isLoading:u,error:ae}=ye(k),V=ie?.sites??[];let O;e[7]!==K?(O=t=>{t||(oe(null),B("")),K(t)},e[7]=K,e[8]=O):O=e[8];const n=O;let L;e[9]!==a?(L=t=>t.name.toLowerCase().includes(a.toLowerCase())||t.domains?.[0]?.domain.toLowerCase().includes(a.toLowerCase()),e[9]=a,e[10]=L):L=e[10];const U=V.filter(L),ce=!i||U.some(t=>t.name===i);let f;e[11]!==E||e[12]!==s.id?(f=async t=>{const r=De("conn"),d=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:t,connId:r,orgId:s.id})});if(!d.ok){const ue=await d.json().catch(Fe);throw new Error(ue.error??`Failed to create connection (${d.status})`)}const se=await E.callTool({name:"PROJECT_CREATE",arguments:{organizationId:s.id,slug:Te(t),name:t,description:"Imported from deco.cx",enabledPlugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:null,themeColor:"#22C55E"}}}),ee=(se.structuredContent??se).project;return await E.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:ee.id,connectionId:r}}),await E.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:ee.id,pinnedViews:[{connectionId:r,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:r,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:r,toolName:"get_monitor_data",label:"Monitor",icon:null}]}}),{project:ee,connId:r}},e[11]=E,e[12]=s.id,e[13]=f):f=e[13];let p;e[14]!==n||e[15]!==M||e[16]!==s.id||e[17]!==s.slug||e[18]!==q?(p=t=>{const{project:r,connId:d}=t;q.invalidateQueries({queryKey:je.projects(s.id)}),le.success(`Imported ${r.slug} from deco.cx`),n(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),M({to:"/$org/$project/apps/$connectionId/$toolName",params:{org:s.slug,project:r.slug,connectionId:d,toolName:"file_explorer"}})},e[14]=n,e[15]=M,e[16]=s.id,e[17]=s.slug,e[18]=q,e[19]=p):p=e[19];let $;e[20]!==f||e[21]!==p?($={mutationFn:f,onSuccess:p,onError:$e},e[20]=f,e[21]=p,e[22]=$):$=e[22];const c=Ce($),G=we,H=_e,de="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Se,{className:"sr-only",children:o.jsx(ve,{children:"Import from deco.cx"})}),e[23]=g):g=e[23];let x;e[24]!==n||e[25]!==D?(x=()=>D?D():n(!1),e[24]=n,e[25]=D,e[26]=x):x=e[26];let F;e[27]===Symbol.for("react.memo_cache_sentinel")?(F=o.jsx(Pe,{size:18}),e[27]=F):F=e[27];let h;e[28]!==x?(h=o.jsx("button",{type:"button",onClick:x,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:F}),e[28]=x,e[29]=h):h=e[29];let R;e[30]===Symbol.for("react.memo_cache_sentinel")?(R=o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[30]=R):R=e[30];let b;e[31]!==h?(b=o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[h,R]}),e[31]=h,e[32]=b):b=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t=>{t.key==="Escape"&&B("")},e[33]=A):A=e[33];let j;e[34]!==a?(j=o.jsx("div",{children:o.jsx(ke,{value:a,onChange:B,placeholder:"Search sites...",onKeyDown:A})}),e[34]=a,e[35]=j):j=e[35];const me="pb-0 min-h-[300px]";let y;e[36]!==u?(y=u&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[36]=u,e[37]=y):y=e[37];const W=!u&&!ae&&V.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Y=!u&&V.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[U.length===0&&o.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",a,"”"]}),U.map(t=>{const r=t.domains?.find(Le)?.domain??t.domains?.[0]?.domain,d=i===t.name;return o.jsxs("button",{type:"button",onClick:()=>oe(t.name),className:be("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",d?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:t.thumb_url?o.jsx("img",{src:t.thumb_url,alt:t.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:t.name}),r&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:r})]})]},t.name)})]});let C;e[38]!==y||e[39]!==W||e[40]!==Y?(C=o.jsxs("div",{className:me,children:[y,W,Y]}),e[38]=y,e[39]=W,e[40]=Y,e[41]=C):C=e[41];let I;e[42]!==n?(I=()=>n(!1),e[42]=n,e[43]=I):I=e[43];let N;e[44]!==c.isPending||e[45]!==I?(N=o.jsx(re,{variant:"outline",onClick:I,disabled:c.isPending,children:"Cancel"}),e[44]=c.isPending,e[45]=I,e[46]=N):N=e[46];const X=!i||!ce||c.isPending||u;let _;e[47]!==c||e[48]!==i?(_=()=>i&&c.mutate(i),e[47]=c,e[48]=i,e[49]=_):_=e[49];const Z=c.isPending?"Importing...":"Import";let w;e[50]!==X||e[51]!==_||e[52]!==Z?(w=o.jsx(re,{disabled:X,onClick:_,children:Z}),e[50]=X,e[51]=_,e[52]=Z,e[53]=w):w=e[53];let S;e[54]!==N||e[55]!==w?(S=o.jsxs(Ee,{className:"px-8 py-5 border-t border-border",children:[N,w]}),e[54]=N,e[55]=w,e[56]=S):S=e[56];let v;e[57]!==H||e[58]!==g||e[59]!==b||e[60]!==j||e[61]!==C||e[62]!==S?(v=o.jsxs(H,{className:de,children:[g,b,j,C,S]}),e[57]=H,e[58]=g,e[59]=b,e[60]=j,e[61]=C,e[62]=S,e[63]=v):v=e[63];let J;return e[64]!==G||e[65]!==n||e[66]!==P||e[67]!==v?(J=o.jsx(G,{open:P,onOpenChange:n,children:v}),e[64]=G,e[65]=n,e[66]=P,e[67]=v,e[68]=J):J=e[68],J}function Le(l){return l.production}function $e(l){le.error("Import failed: "+(l instanceof Error?l.message:"Unknown error"))}function Fe(){return{}}export{Ue as I};
@@ -1 +1 @@
1
- import{r as n,Z as I,j as c,$ as v,aa as O,a2 as S,a5 as D,a4 as M,a0 as L,ab as k}from"./index-DIir8pgm.js";var f="Collapsible",[F,q]=D(f),[$,g]=F(f),T=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,open:o,defaultOpen:t,disabled:l,onOpenChange:i,...C}=e,[p,d]=I({prop:o,defaultProp:t??!1,onChange:i,caller:f});return c.jsx($,{scope:r,disabled:l,contentId:O(),open:p,onOpenToggle:n.useCallback(()=>d(b=>!b),[d]),children:c.jsx(v.div,{"data-state":R(p),"data-disabled":l?"":void 0,...C,ref:s})})});T.displayName=f;var j="CollapsibleTrigger",w=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,...o}=e,t=g(j,r);return c.jsx(v.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":R(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...o,ref:s,onClick:S(e.onClick,t.onOpenToggle)})});w.displayName=j;var x="CollapsibleContent",A=n.forwardRef((e,s)=>{const{forceMount:r,...o}=e,t=g(x,e.__scopeCollapsible);return c.jsx(M,{present:r||t.open,children:({present:l})=>c.jsx(B,{...o,ref:s,present:l})})});A.displayName=x;var B=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,present:o,children:t,...l}=e,i=g(x,r),[C,p]=n.useState(o),d=n.useRef(null),b=L(s,d),h=n.useRef(0),y=h.current,N=n.useRef(0),P=N.current,m=i.open||C,E=n.useRef(m),u=n.useRef(void 0);return n.useEffect(()=>{const a=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(a)},[]),k(()=>{const a=d.current;if(a){u.current=u.current||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const _=a.getBoundingClientRect();h.current=_.height,N.current=_.width,E.current||(a.style.transitionDuration=u.current.transitionDuration,a.style.animationName=u.current.animationName),p(o)}},[i.open,o]),c.jsx(v.div,{"data-state":R(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...l,ref:b,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":P?`${P}px`:void 0,...e.style},children:m&&t})});function R(e){return e?"open":"closed"}var H=T,Z=w,z=A;export{w as C,H as R,Z as T,A as a,z as b,q as c};
1
+ import{r as n,Z as I,j as c,$ as v,aa as O,a2 as S,a5 as D,a4 as M,a0 as L,ab as k}from"./index-B62MiQAu.js";var f="Collapsible",[F,q]=D(f),[$,g]=F(f),T=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,open:o,defaultOpen:t,disabled:l,onOpenChange:i,...C}=e,[p,d]=I({prop:o,defaultProp:t??!1,onChange:i,caller:f});return c.jsx($,{scope:r,disabled:l,contentId:O(),open:p,onOpenToggle:n.useCallback(()=>d(b=>!b),[d]),children:c.jsx(v.div,{"data-state":R(p),"data-disabled":l?"":void 0,...C,ref:s})})});T.displayName=f;var j="CollapsibleTrigger",w=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,...o}=e,t=g(j,r);return c.jsx(v.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":R(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...o,ref:s,onClick:S(e.onClick,t.onOpenToggle)})});w.displayName=j;var x="CollapsibleContent",A=n.forwardRef((e,s)=>{const{forceMount:r,...o}=e,t=g(x,e.__scopeCollapsible);return c.jsx(M,{present:r||t.open,children:({present:l})=>c.jsx(B,{...o,ref:s,present:l})})});A.displayName=x;var B=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,present:o,children:t,...l}=e,i=g(x,r),[C,p]=n.useState(o),d=n.useRef(null),b=L(s,d),h=n.useRef(0),y=h.current,N=n.useRef(0),P=N.current,m=i.open||C,E=n.useRef(m),u=n.useRef(void 0);return n.useEffect(()=>{const a=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(a)},[]),k(()=>{const a=d.current;if(a){u.current=u.current||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const _=a.getBoundingClientRect();h.current=_.height,N.current=_.width,E.current||(a.style.transitionDuration=u.current.transitionDuration,a.style.animationName=u.current.animationName),p(o)}},[i.open,o]),c.jsx(v.div,{"data-state":R(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...l,ref:b,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":P?`${P}px`:void 0,...e.style},children:m&&t})});function R(e){return e?"open":"closed"}var H=T,Z=w,z=A;export{w as C,H as R,Z as T,A as a,z as b,q as c};