decocms 2.306.8 → 2.306.9

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 (206) hide show
  1. package/dist/client/assets/{AlertCircle-BTzXzMwa.js → AlertCircle-DJf7WJW3.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-D2yH9wXQ.js → ArrowNarrowLeft-zhth65sS.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-Oalb5bG5.js → ArrowUpRight-B3qf65r_.js} +1 -1
  4. package/dist/client/assets/{Check-D4yu1L9M.js → Check-BA7p_1wq.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-Ce90skz0.js → CheckCircle-Y9PieZLB.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-BqGwceCn.js → ChevronDown-CHAav7qy.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-BRV7Tdzz.js → ChevronRight-2ozRd8ql.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-pbRiDYbB.js → ChevronUp-DiTrXBul.js} +1 -1
  9. package/dist/client/assets/{Container-Cf08ks6f.js → Container-C2bhieKl.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-Cb1IeswQ.js → DotsVertical-EPasiNNs.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-DfeIVyGK.js → LinkExternal01-BPHdX5PH.js} +1 -1
  12. package/dist/client/assets/{Lock01-B6CuPSqy.js → Lock01-BGF0eORu.js} +1 -1
  13. package/dist/client/assets/{Palette-6MGVk9XZ.js → Palette-C_hdzDFv.js} +1 -1
  14. package/dist/client/assets/{Play-Z9TLXhXZ.js → Play-F9KGb4fS.js} +1 -1
  15. package/dist/client/assets/{Plus-BWFmeYbA.js → Plus-yWDQ_tpZ.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-DdNBG9uq.js → RefreshCcw01-02Zm-r_b.js} +1 -1
  17. package/dist/client/assets/{SearchMd-Bk2WMaal.js → SearchMd-KthT6Z0D.js} +1 -1
  18. package/dist/client/assets/{Settings02-DV_JgL_i.js → Settings02-o9kWs5LM.js} +1 -1
  19. package/dist/client/assets/{Shield01-DabBYOJe.js → Shield01-C6IvOcka.js} +1 -1
  20. package/dist/client/assets/{Star01-EsNS3h_Z.js → Star01-DfneWwne.js} +1 -1
  21. package/dist/client/assets/{Sun-BSBNF16W.js → Sun-jEEtT5QL.js} +1 -1
  22. package/dist/client/assets/{Tool01-BLP2PhNo.js → Tool01-Ba51oSqA.js} +1 -1
  23. package/dist/client/assets/{Trash01-BrCWXUwU.js → Trash01-phS8Heeq.js} +1 -1
  24. package/dist/client/assets/{User01-YnNa4o8H.js → User01-ZJzkhpRI.js} +1 -1
  25. package/dist/client/assets/{Users03-ju7GWCNc.js → Users03-BpQp0OZp.js} +1 -1
  26. package/dist/client/assets/{X-Bwb7_m5v.js → X-C7tkmqiA.js} +1 -1
  27. package/dist/client/assets/{XCircle-CH3QyMaX.js → XCircle-D-iHz9mr.js} +1 -1
  28. package/dist/client/assets/{XClose-CWzVSlUZ.js → XClose-DGH-dkmK.js} +1 -1
  29. package/dist/client/assets/{Zap-ByRL5ggZ.js → Zap-B3d9PZiM.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-DwXwFOB5.js → ZapSquare-zYT4mArq.js} +1 -1
  31. package/dist/client/assets/{accordion-DEfiI4_u.js → accordion-hHFtU32i.js} +1 -1
  32. package/dist/client/assets/{agent-icon-BWW-_spm.js → agent-icon-CJE3IrTn.js} +1 -1
  33. package/dist/client/assets/{agents-list-DtSKcauO.js → agents-list-vYYge1ev.js} +1 -1
  34. package/dist/client/assets/ai-providers-CqQQNPte.js +1 -0
  35. package/dist/client/assets/{alert-dialog-CIRyCiSh.js → alert-dialog-BX6tjxLQ.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-DM2HSAyx.js → auth-catchall-tLsDaZib.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-BZQnmXsD.js → automation-list-row-CcwE53y-.js} +1 -1
  38. package/dist/client/assets/{automations-BpoAkXQ6.js → automations-BESFBIp2.js} +1 -1
  39. package/dist/client/assets/{avatar-O6nD_RVH.js → avatar-qtN1d68D.js} +1 -1
  40. package/dist/client/assets/{badge-1GzX8YfJ.js → badge-B9X-6Gl1.js} +1 -1
  41. package/dist/client/assets/{brand-context-pSsdhU7u.js → brand-context-XewU7lcG.js} +1 -1
  42. package/dist/client/assets/{card-YRPYO7rK.js → card-BoqhySt6.js} +1 -1
  43. package/dist/client/assets/{chat-context-BXGy7Agh.js → chat-context-CKn0S8Zn.js} +1 -1
  44. package/dist/client/assets/{checkbox-BtvQbCay.js → checkbox-CsbRNJyh.js} +1 -1
  45. package/dist/client/assets/{collection-detail--ucxh4J-.js → collection-detail-CNKa10ok.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-CMOfNtao.js → collection-display-button-DKtSFWra.js} +1 -1
  47. package/dist/client/assets/{collection-search-CYChlQpy.js → collection-search-B3qdCdab.js} +1 -1
  48. package/dist/client/assets/{collection-search-mbr97YEK.js → collection-search-Ce1lQnUu.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-BnAWIjfr.js → collection-table-wrapper-Bd9ZSFN9.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-CkdgJkBV.js → collection-tabs-f6wZXNju.js} +1 -1
  51. package/dist/client/assets/{collections-BFntmLot.js → collections-DW4PTltg.js} +1 -1
  52. package/dist/client/assets/{command-Cbz_0bPm.js → command-COSC6-sU.js} +1 -1
  53. package/dist/client/assets/{connection-card-BLDKB8T1.js → connection-card-CZXyfhfz.js} +1 -1
  54. package/dist/client/assets/{connection-detail-BFIdeQRn.js → connection-detail-j7Z5rP7l.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-CSJOop0l.js → connection-form-helpers-BlYNQpCT.js} +1 -1
  56. package/dist/client/assets/{connections-BW08Tw6P.js → connections-BV8XJOt_.js} +1 -1
  57. package/dist/client/assets/{constants-O6TOd6Fi.js → constants-BVAyWr7s.js} +1 -1
  58. package/dist/client/assets/{constants-CyYXtNQt.js → constants-DGVET5nO.js} +1 -1
  59. package/dist/client/assets/{dialog-BapANLA4.js → dialog-Hnl5R_ro.js} +1 -1
  60. package/dist/client/assets/{domain-settings-BiGD_AWa.js → domain-settings-C-IlkGnr.js} +1 -1
  61. package/dist/client/assets/{drawer-DXfcxG35.js → drawer-Crup1SLH.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-8r0P5O89.js → dropdown-menu-V4M0HjsW.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-88jqqJ-n.js → dynamic-plugin-layout-8c6x-ky8.js} +1 -1
  64. package/dist/client/assets/{empty-state-CxaKSceI.js → empty-state-CZ3CJw7j.js} +1 -1
  65. package/dist/client/assets/{empty-state-D31vnJxY.js → empty-state-D5_lJgOy.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-BAmE4x-0.js → extract-connection-data-em000wPy.js} +1 -1
  67. package/dist/client/assets/{features-Zs1cJ0se.js → features-DAVmQLQk.js} +1 -1
  68. package/dist/client/assets/{form-vm22t8bs.js → form-C7tw7wIR.js} +1 -1
  69. package/dist/client/assets/{general-DOQdXWNJ.js → general-DnnDmUeP.js} +1 -1
  70. package/dist/client/assets/{index-DSEbXUmT.js → index-BFRqxr4t.js} +1 -1
  71. package/dist/client/assets/{index-DnMFHGHl.js → index-BOzqanlB.js} +1 -1
  72. package/dist/client/assets/{index-C3KqPz7f.js → index-Bbymo0Ib.js} +1 -1
  73. package/dist/client/assets/index-Bg9RJYuW.js +1 -0
  74. package/dist/client/assets/{index-DCtZqQ0W.js → index-CA3OM7o_.js} +1 -1
  75. package/dist/client/assets/{index-CtJ1_vQP.js → index-CnknCe9i.js} +2 -2
  76. package/dist/client/assets/{index-4ADaRsb3.js → index-CoJ8j1Pw.js} +1 -1
  77. package/dist/client/assets/{index-BZSJm92U.js → index-DNL4AbVG.js} +1 -1
  78. package/dist/client/assets/{index-CZoa5Voq.js → index-DUQBUyCZ.js} +1 -1
  79. package/dist/client/assets/{index-B1K3k56c.js → index-DkII30Yp.js} +1 -1
  80. package/dist/client/assets/{index-Irwc0F9z.js → index-Dq2z-GHI.js} +1 -1
  81. package/dist/client/assets/{index-CDWEA7tA.js → index-DtUD0Pyz.js} +3 -3
  82. package/dist/client/assets/{index-cMeVTxue.js → index-HuDOZoSO.js} +1 -1
  83. package/dist/client/assets/{index-COg7cSsl.js → index-RIIjlnIA.js} +1 -1
  84. package/dist/client/assets/{index-CHlpZld0.js → index-XN9sCkdo.js} +1 -1
  85. package/dist/client/assets/{index-Dy9FasiB.js → index-pVdenInH.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-BORSReP2.js → infiniteQueryObserver-BpzCmbvi.js} +1 -1
  87. package/dist/client/assets/{input-DzKH4IoC.js → input-tSjlegEI.js} +1 -1
  88. package/dist/client/assets/{integration-icon-DZ1DDayM.js → integration-icon-BIIE53tx.js} +1 -1
  89. package/dist/client/assets/{label-B1j7QJO9.js → label-BPDMOqL-.js} +1 -1
  90. package/dist/client/assets/{layout-CgSQP9Dz.js → layout-CdewzpDg.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-CkuRnY-q.js → lean-canvas-recruit-modal-vF31gMjX.js} +1 -1
  92. package/dist/client/assets/{login-BFVakp9W.js → login-BoZD0ihV.js} +1 -1
  93. package/dist/client/assets/{members-BvtGRXTq.js → members-Cu6j2bC_.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-DbLGolnd.js → monaco-editor-BkaEDfnn.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-Bs9q7htN.js → monitoring-stats-row-B4VSVC5f.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-C2IfOXdE.js → oauth-callback-BZ22lnb7.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-DjdeIGJy.js → oauth-callback-ai-provider-DdNo-cUU.js} +1 -1
  98. package/dist/client/assets/{onboarding-qQL2AHJp.js → onboarding-BsxXp_91.js} +1 -1
  99. package/dist/client/assets/{org-layout-r-dIMXY7.js → org-layout-C5IzT9XM.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-BdbYhknE.js → org-plugin-layout-rnBVYx1J.js} +1 -1
  101. package/dist/client/assets/{pair-BeVk0nw4.js → pair-CgrOS8jZ.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-tnsMkLWl.js → plugin-empty-state-DrUsi_Xi.js} +1 -1
  103. package/dist/client/assets/{plugin-header-DlR3Hsv1.js → plugin-header-CdV-nsX3.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-j_5ixQWh.js → plugin-layout-CazyvxCF.js} +1 -1
  105. package/dist/client/assets/{popover-BoJSCjqj.js → popover-B72j1a-i.js} +1 -1
  106. package/dist/client/assets/{profile-DJw46v6U.js → profile-Cu0ySZu7.js} +1 -1
  107. package/dist/client/assets/{project-app-view-CqGwq86p.js → project-app-view-DrBetUBZ.js} +1 -1
  108. package/dist/client/assets/registry-BcpPcvh_.js +2 -0
  109. package/dist/client/assets/{registry-layout-CKKMYc0F.js → registry-layout-CjG7kzKY.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-BOqEO0UW.js → required-auth-layout-DesCgYHR.js} +1 -1
  111. package/dist/client/assets/{reset-password-DC2CZqgK.js → reset-password-eRneDfhd.js} +1 -1
  112. package/dist/client/assets/{roles-B7M_sNQI.js → roles-BOPJuCtk.js} +1 -1
  113. package/dist/client/assets/{scroll-area-CVP2hanW.js → scroll-area-B7p5KGay.js} +1 -1
  114. package/dist/client/assets/{search-input-DBJx5Puk.js → search-input-BkMpxSNZ.js} +1 -1
  115. package/dist/client/assets/{select-BL-3WYG3.js → select-Cgq5fB25.js} +1 -1
  116. package/dist/client/assets/{select-model-CBeAOuD4.js → select-model-BrcDDMDY.js} +1 -1
  117. package/dist/client/assets/{settings-layout-D4-CafDE.js → settings-layout-DnlWM3l_.js} +1 -1
  118. package/dist/client/assets/{settings-section-sY44gYa3.js → settings-section-BnPqXFEQ.js} +1 -1
  119. package/dist/client/assets/{shell-layout-BRqsQqla.js → shell-layout-KvQC2n8R.js} +1 -1
  120. package/dist/client/assets/{skeleton-BWfslVYc.js → skeleton-DIbgbTEL.js} +1 -1
  121. package/dist/client/assets/{sso-CqR7Oikv.js → sso-CKV2Ny8h.js} +1 -1
  122. package/dist/client/assets/{store-QjnVaNvS.js → store-OiRvkTn1.js} +1 -1
  123. package/dist/client/assets/store-registry-CcoZihF8.js +2 -0
  124. package/dist/client/assets/{switch-ClIsCuo0.js → switch-DHlXaCRu.js} +1 -1
  125. package/dist/client/assets/{table-DLr2fSXp.js → table-DM5YCF_t.js} +1 -1
  126. package/dist/client/assets/{tabs-CEhOvCGw.js → tabs-DP8p-QKj.js} +1 -1
  127. package/dist/client/assets/{task-status-C-SQfZZK.js → task-status-RjLfrU9E.js} +1 -1
  128. package/dist/client/assets/{textarea-BQD2K7xE.js → textarea-BKxnYjv4.js} +1 -1
  129. package/dist/client/assets/{toggle-group-i71R22i3.js → toggle-group-BTIHjGuh.js} +1 -1
  130. package/dist/client/assets/{tools-list-CPm-Mx4D.js → tools-list-DltD98In.js} +1 -1
  131. package/dist/client/assets/{tooltip-BTEnXfpw.js → tooltip-VTeNtMCR.js} +1 -1
  132. package/dist/client/assets/{types-lb3PNUQc.js → types-DXN89wPs.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-BKH_isZv.js → use-ai-providers-Dn3Z7IEd.js} +1 -1
  134. package/dist/client/assets/{use-collections-VlH2NrqV.js → use-collections-CiD-L_rq.js} +1 -1
  135. package/dist/client/assets/{use-connection-M1xDmD9i.js → use-connection-JNwwjcGV.js} +1 -1
  136. package/dist/client/assets/{use-copy-DEJBJAsZ.js → use-copy-BC2pt5R_.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-BL0xa08p.js → use-create-virtual-mcp-BaV_MWOd.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-DJj5fuFt.js → use-debounced-autosave-BZkVf5Bt.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-Bb2NleBN.js → use-decopilot-events-CNFY9Cdo.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-Bib86QGR.js → use-delete-connection-B92EkvSW.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-D8nIolCd.js → use-infinite-scroll-DxHMXvd2.js} +1 -1
  142. package/dist/client/assets/{use-list-state-BYi_uUtE.js → use-list-state-CC6sLPth.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-CtUqFvLD.js → use-mcp-tools-CVArZMz4.js} +1 -1
  144. package/dist/client/assets/{use-members-CdkSabwq.js → use-members-DwBHQoXS.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-D91A1ehg.js → use-navigate-to-agent-CBT4EeEo.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-CANxngbZ.js → use-org-auth-client-Btoi24Ng.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-KaCvgTMV.js → use-org-sso-BraRussC.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-BXlhN5BZ.js → use-organization-roles-D_UI-fW0.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-CCxU4osF.js → use-organization-settings-Dxy82qy3.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-CcXpK-ys.js → use-registry-connections-Dutuf-7C.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds-Cwi7Sfh7.js → use-status-sounds-D0gU5bqv.js} +1 -1
  152. package/dist/client/assets/{use-tasks-D03EtFvf.js → use-tasks-dDV8jhdD.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-CQIRYhjw.js → use-view-mode-CNrwjFk2.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-CX5iadV3.js → use-virtual-mcp-DYwCZbrQ.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-DgNRpfvJ.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-olKcjkDq.js +1 -0
  157. package/dist/client/assets/{user-C8zZ-7QW.js → user-kEnfgZB9.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-Cw5HKJog.js → view-mode-toggle-CrpJwZiO.js} +1 -1
  159. package/dist/client/assets/{workflow-Det6DT4b.js → workflow-BXznQ79f.js} +1 -1
  160. package/dist/client/assets/workflow-detail-DeJ9MrPo.js +1 -0
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +1 -8
  163. package/dist/server/node_modules/cli-boxes/boxes.json +82 -0
  164. package/dist/server/node_modules/cli-boxes/index.d.ts +127 -0
  165. package/dist/server/node_modules/cli-boxes/index.js +6 -0
  166. package/dist/server/node_modules/cli-boxes/license +9 -0
  167. package/dist/server/node_modules/cli-boxes/package.json +42 -0
  168. package/dist/server/node_modules/cli-boxes/readme.md +115 -0
  169. package/dist/server/node_modules/cli-spinners/index.d.ts +139 -0
  170. package/dist/server/node_modules/cli-spinners/index.js +11 -0
  171. package/dist/server/node_modules/cli-spinners/license +9 -0
  172. package/dist/server/node_modules/cli-spinners/package.json +56 -0
  173. package/dist/server/node_modules/cli-spinners/readme.md +74 -0
  174. package/dist/server/node_modules/cli-spinners/spinners.json +1697 -0
  175. package/dist/server/node_modules/{postgres-date/license → stack-utils/LICENSE.md} +1 -1
  176. package/dist/server/node_modules/stack-utils/index.js +344 -0
  177. package/dist/server/node_modules/stack-utils/package.json +39 -0
  178. package/dist/server/node_modules/stack-utils/readme.md +143 -0
  179. package/dist/server/server.js +0 -7
  180. package/package.json +1 -1
  181. package/dist/client/assets/ai-providers-Dmv17i-r.js +0 -1
  182. package/dist/client/assets/index-sD08ZTU7.js +0 -1
  183. package/dist/client/assets/registry-CRDkHUvw.js +0 -2
  184. package/dist/client/assets/store-registry-CEd7y-Xb.js +0 -2
  185. package/dist/client/assets/useInfiniteQuery-CgSxuvH6.js +0 -1
  186. package/dist/client/assets/useSuspenseInfiniteQuery-CH8re_uO.js +0 -1
  187. package/dist/client/assets/workflow-detail-BeFzNTls.js +0 -1
  188. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  189. package/dist/server/node_modules/postgres-bytea/license +0 -21
  190. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  191. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  192. package/dist/server/node_modules/postgres-date/index.js +0 -116
  193. package/dist/server/node_modules/postgres-date/package.json +0 -33
  194. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  195. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  196. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  197. package/dist/server/node_modules/postgres-interval/license +0 -21
  198. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  199. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  200. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  201. package/dist/server/node_modules/xtend/LICENSE +0 -20
  202. package/dist/server/node_modules/xtend/README.md +0 -32
  203. package/dist/server/node_modules/xtend/immutable.js +0 -19
  204. package/dist/server/node_modules/xtend/mutable.js +0 -17
  205. package/dist/server/node_modules/xtend/package.json +0 -55
  206. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -1 +1 @@
1
- import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-CtJ1_vQP.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-BTEnXfpw.js";import{i as U}from"./X-Bwb7_m5v.js";const O=({size:i=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M9 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
1
+ import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-CnknCe9i.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-VTeNtMCR.js";import{i as U}from"./X-C7tkmqiA.js";const O=({size:i=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M9 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
@@ -1,4 +1,4 @@
1
- import{cp as Fe,bn as Os,J as oe,I as ge,a_ as ti,bS as _i,aK as Ie,bl as mt,a$ as qe,ap as mr,cq as rn,H as _e,cr as Ii,cs as ws,ct as ec,bQ as tc,cu as ia,cv as nc,cw as rc,cx as ic,cy as fn,cz as Tr,cA as xs,bL as sa,bD as sc,aJ as ze,bR as oc,aI as On,bb as Ci,cB as ac,r as N,j as w,cC as oa,cD as lc}from"./index-CtJ1_vQP.js";import{f as cc,h as uc,n as fc,j as dc,C as hc,A as pc}from"./constants-CyYXtNQt.js";import{B as Ti,c as Pi}from"./collections-BFntmLot.js";import{R as Es}from"./index-COg7cSsl.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
1
+ import{cp as Fe,bn as Os,J as oe,I as ge,a_ as ti,bS as _i,aK as Ie,bl as mt,a$ as qe,ap as mr,cq as rn,H as _e,cr as Ii,cs as ws,ct as ec,bQ as tc,cu as ia,cv as nc,cw as rc,cx as ic,cy as fn,cz as Tr,cA as xs,bL as sa,bD as sc,aJ as ze,bR as oc,aI as On,bb as Ci,cB as ac,r as N,j as w,cC as oa,cD as lc}from"./index-CnknCe9i.js";import{f as cc,h as uc,n as fc,j as dc,C as hc,A as pc}from"./constants-DGVET5nO.js";import{B as Ti,c as Pi}from"./collections-DW4PTltg.js";import{R as Es}from"./index-RIIjlnIA.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
2
2
  The stepInput is the resolved value of the references in the input field. Example:
3
3
  {
4
4
  "input": {
@@ -1,4 +1,4 @@
1
- import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-CtJ1_vQP.js";import{D as Ts,F as Es,B as $s}from"./index-BZSJm92U.js";import{e as Fe,i as Os,u as ae}from"./constants-CyYXtNQt.js";import{b as fn}from"./use-virtual-mcp-CX5iadV3.js";import{M as Re}from"./monaco-editor-DbLGolnd.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-DEfiI4_u.js";import{B as le}from"./badge-1GzX8YfJ.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-BL-3WYG3.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-DnMFHGHl.js";import{V as Xs}from"./view-mode-toggle-Cw5HKJog.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,P as Zs,r as eo,ac as pn,Y as to,U as xn,ad as no,ae as so,S as bt,af as oo}from"./agent-icon-BWW-_spm.js";import{i as hn}from"./Play-Z9TLXhXZ.js";import{b as ro,a as io,V as Qe}from"./layout-CgSQP9Dz.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-BTEnXfpw.js";import{u as lo,a as co}from"./use-connection-M1xDmD9i.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-CtUqFvLD.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-BapANLA4.js";import"./index-COg7cSsl.js";import{S as ho}from"./index-Dy9FasiB.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-8r0P5O89.js";import{s as go}from"./Plus-BWFmeYbA.js";import{b as kn}from"./Tool01-BLP2PhNo.js";import{i as He}from"./Check-D4yu1L9M.js";import{s as Mt}from"./XClose-CWzVSlUZ.js";import{I as Lt}from"./integration-icon-DZ1DDayM.js";import{a as bo,S as So}from"./scroll-area-CVP2hanW.js";import"./index-C3KqPz7f.js";import{i as _n}from"./X-Bwb7_m5v.js";import{u as Cn,a as jo}from"./use-collections-VlH2NrqV.js";import{E as In}from"./empty-state-CxaKSceI.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-DzKH4IoC.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-CnknCe9i.js";import{D as Ts,F as Es,B as $s}from"./index-DNL4AbVG.js";import{e as Fe,i as Os,u as ae}from"./constants-DGVET5nO.js";import{b as fn}from"./use-virtual-mcp-DYwCZbrQ.js";import{M as Re}from"./monaco-editor-BkaEDfnn.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-hHFtU32i.js";import{B as le}from"./badge-B9X-6Gl1.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-Cgq5fB25.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-BOzqanlB.js";import{V as Xs}from"./view-mode-toggle-CrpJwZiO.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,P as Zs,r as eo,ac as pn,Y as to,U as xn,ad as no,ae as so,S as bt,af as oo}from"./agent-icon-CJE3IrTn.js";import{i as hn}from"./Play-F9KGb4fS.js";import{b as ro,a as io,V as Qe}from"./layout-CdewzpDg.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-VTeNtMCR.js";import{u as lo,a as co}from"./use-connection-JNwwjcGV.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-CVArZMz4.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-Hnl5R_ro.js";import"./index-RIIjlnIA.js";import{S as ho}from"./index-pVdenInH.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-V4M0HjsW.js";import{s as go}from"./Plus-yWDQ_tpZ.js";import{b as kn}from"./Tool01-Ba51oSqA.js";import{i as He}from"./Check-BA7p_1wq.js";import{s as Mt}from"./XClose-DGH-dkmK.js";import{I as Lt}from"./integration-icon-BIIE53tx.js";import{a as bo,S as So}from"./scroll-area-B7p5KGay.js";import"./index-Bbymo0Ib.js";import{i as _n}from"./X-C7tkmqiA.js";import{u as Cn,a as jo}from"./use-collections-CiD-L_rq.js";import{E as In}from"./empty-state-CZ3CJw7j.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-tSjlegEI.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}
@@ -1 +1 @@
1
- import{r as n,aU as q,bZ as R,b_ as Ee,b$ as ke,c0 as Se,be as xe,c1 as j}from"./index-CtJ1_vQP.js";var de=1,Ie=.9,Ce=.8,Re=.17,Z=.1,Q=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Q,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Q,I.length))):(h*=Re,u>0&&(h*=Math.pow(Q,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Z>h&&(h=x*Z)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
1
+ import{r as n,aU as q,bZ as R,b_ as Ee,b$ as ke,c0 as Se,be as xe,c1 as j}from"./index-CnknCe9i.js";var de=1,Ie=.9,Ce=.8,Re=.17,Z=.1,Q=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Q,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Q,I.length))):(h*=Re,u>0&&(h*=Math.pow(Q,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Z>h&&(h=x*Z)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
@@ -1 +1 @@
1
- import{e as R,j as i,r as P,s as ae,P as Ne,f as ke,c as ce,t as me,b as be,K as Ce,n as we}from"./index-CtJ1_vQP.js";import{I as je}from"./integration-icon-DZ1DDayM.js";import{S as ue}from"./skeleton-BWfslVYc.js";import{W as F,i as _e}from"./constants-CyYXtNQt.js";import{b as Ie}from"./use-virtual-mcp-CX5iadV3.js";import{u as Se}from"./use-organization-settings-CCxU4osF.js";import{i as Ae}from"./ChevronRight-BRV7Tdzz.js";import{s as Oe}from"./Plus-BWFmeYbA.js";import{a as De}from"./Users03-ju7GWCNc.js";import{I as oe,S as Ee,L as Me,b as Re}from"./lean-canvas-recruit-modal-CkuRnY-q.js";import{b as Te,c as $e,d as Pe,S as Le,u as ze,C as G}from"./index-CHlpZld0.js";import{u as Be}from"./use-create-virtual-mcp-BL0xa08p.js";import{u as Fe}from"./tooltip-BTEnXfpw.js";import{d as He}from"./XCircle-CH3QyMaX.js";import"./Container-Cf08ks6f.js";import"./agent-icon-BWW-_spm.js";import"./AlertCircle-BTzXzMwa.js";import"./Tool01-BLP2PhNo.js";import"./XClose-CWzVSlUZ.js";import"./RefreshCcw01-DdNBG9uq.js";import"./ArrowNarrowLeft-D2yH9wXQ.js";import"./ArrowUpRight-Oalb5bG5.js";import"./ZapSquare-DwXwFOB5.js";import"./CheckCircle-Ce90skz0.js";import"./Check-D4yu1L9M.js";import"./ChevronDown-BqGwceCn.js";import"./ChevronUp-pbRiDYbB.js";import"./DotsVertical-Cb1IeswQ.js";import"./Star01-EsNS3h_Z.js";import"./Palette-6MGVk9XZ.js";import"./SearchMd-Bk2WMaal.js";import"./index-4ADaRsb3.js";import"./X-Bwb7_m5v.js";import"./LinkExternal01-DfeIVyGK.js";import"./Lock01-B6CuPSqy.js";import"./Sun-BSBNF16W.js";import"./Play-Z9TLXhXZ.js";import"./Settings02-DV_JgL_i.js";import"./Shield01-DabBYOJe.js";import"./Trash01-BrCWXUwU.js";import"./User01-YnNa4o8H.js";import"./Zap-ByRL5ggZ.js";import"./use-collections-VlH2NrqV.js";import"./use-navigate-to-agent-D91A1ehg.js";import"./dialog-BapANLA4.js";import"./collection-search-mbr97YEK.js";import"./checkbox-BtvQbCay.js";import"./use-connection-M1xDmD9i.js";import"./extract-connection-data-BAmE4x-0.js";import"./constants-O6TOd6Fi.js";import"./collections-BFntmLot.js";import"./drawer-DXfcxG35.js";import"./use-mcp-tools-CtUqFvLD.js";import"./switch-ClIsCuo0.js";import"./input-DzKH4IoC.js";import"./chat-context-BXGy7Agh.js";import"./use-ai-providers-BKH_isZv.js";import"./use-decopilot-events-Bb2NleBN.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-D03EtFvf.js";import"./shell-layout-BRqsQqla.js";import"./required-auth-layout-BOqEO0UW.js";import"./use-org-sso-KaCvgTMV.js";import"./pair-BeVk0nw4.js";import"./index-DnMFHGHl.js";import"./use-copy-DEJBJAsZ.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-lb3PNUQc.js";import"./tabs-CEhOvCGw.js";import"./form-vm22t8bs.js";import"./label-B1j7QJO9.js";import"./dropdown-menu-8r0P5O89.js";import"./select-BL-3WYG3.js";import"./toggle-group-i71R22i3.js";import"./select-model-CBeAOuD4.js";import"./ai-providers-logos-DD3qZ33J.js";import"./use-debounced-autosave-DJj5fuFt.js";import"./settings-section-sY44gYa3.js";import"./card-YRPYO7rK.js";import"./avatar-O6nD_RVH.js";import"./alert-dialog-CIRyCiSh.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-Dy9FasiB.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BLDKB8T1.js";import"./use-registry-connections-CcXpK-ys.js";import"./useInfiniteQuery-CgSxuvH6.js";import"./infiniteQueryObserver-BORSReP2.js";import"./collection-tabs-CkdgJkBV.js";import"./badge-1GzX8YfJ.js";import"./textarea-BQD2K7xE.js";import"./connection-form-helpers-CSJOop0l.js";import"./use-infinite-scroll-D8nIolCd.js";import"./useSuspenseInfiniteQuery-CH8re_uO.js";function Ue(e){try{const t=localStorage.getItem(`mesh:chat:recent-agents:${e}`);return t?JSON.parse(t):[]}catch{return[]}}const We=8;function xe(e){const t=R.c(21),{agent:s,onSpecialClick:r,tracking:n}=e,{org:o}=ae(),c=ke();let a;t[0]!==s.id||t[1]!==s.title||t[2]!==c||t[3]!==r||t[4]!==o||t[5]!==n.action||t[6]!==n.template_id||t[7]!==n.tile_kind?(a=()=>{if(me("home_agent_tile_clicked",{template_id:n.template_id,agent_id:s.id,agent_title:s.title,tile_kind:n.tile_kind,action:n.action}),r)r();else{const I=crypto.randomUUID();c({to:"/$org/$taskId",params:{org:o.slug,taskId:I},search:{virtualmcpid:s.id}})}},t[0]=s.id,t[1]=s.title,t[2]=c,t[3]=r,t[4]=o,t[5]=n.action,t[6]=n.template_id,t[7]=n.tile_kind,t[8]=a):a=t[8];const m=a;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),t[9]=u):u=t[9];const L=`Select agent ${s.title}`;let b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(De,{size:24}),t[10]=b):b=t[10];let x;t[11]!==s.icon||t[12]!==s.title?(x=i.jsx(je,{icon:s.icon,name:s.title,size:"md",fallbackIcon:b,className:"transition-transform group-hover:scale-110"}),t[11]=s.icon,t[12]=s.title,t[13]=x):x=t[13];let d;t[14]!==s.title?(d=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2 break-words w-full",children:s.title}),t[14]=s.title,t[15]=d):d=t[15];let k;return t[16]!==m||t[17]!==L||t[18]!==x||t[19]!==d?(k=i.jsxs("button",{type:"button",onClick:m,className:u,"aria-label":L,children:[x,d]}),t[16]=m,t[17]=L,t[18]=x,t[19]=d,t[20]=k):k=t[20],k}function Ke(){const e=R.c(8),t=ke(),{org:s}=ae();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),e[0]=r):r=e[0];let n;e[1]!==t||e[2]!==s.slug?(n=()=>{me("home_see_all_agents_clicked"),t({to:"/$org/settings/agents",params:{org:s.slug}})},e[1]=t,e[2]=s.slug,e[3]=n):n=e[3];let o,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Ae,{size:20,className:"text-foreground"})}),c=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"}),e[4]=o,e[5]=c):(o=e[4],c=e[5]);let a;return e[6]!==n?(a=i.jsxs("button",{type:"button",className:r,"aria-label":"See all agents",onClick:n,children:[o,c]}),e[6]=n,e[7]=a):a=e[7],a}function Ve(){const e=R.c(9);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={navigateOnCreate:!0},e[0]=t):t=e[0];const{createVirtualMCP:s,isCreating:r}=Be(t);let n;e[1]!==s?(n=()=>{me("home_create_agent_clicked"),s()},e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group","disabled:opacity-50 disabled:cursor-not-allowed"),e[3]=o):o=e[3];let c,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Oe,{size:20,className:"text-muted-foreground"})}),a=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),e[4]=c,e[5]=a):(c=e[4],a=e[5]);let m;return e[6]!==r||e[7]!==n?(m=i.jsxs("button",{type:"button",onClick:n,disabled:r,className:o,"aria-label":"Create agent",children:[c,a]}),e[6]=r,e[7]=n,e[8]=m):m=e[8],m}function ie(e,t,s){return e.find(r=>r.id!==null&&(r.metadata?.type===t||r.title===s))}function qe(){const e=R.c(52),t=Ie(),{locator:s,org:r}=ae(),n=Se(),[o,c]=P.useState(!1),[a,m]=P.useState(!1),[u,L]=P.useState(!1),[b,x]=P.useState(!1),[d,k]=P.useState(!1),[I,T]=P.useState(!1),[M,$]=P.useState(!1),[z]=Ne(),S=Te(r.slug);let h,p,f,g,j,A,_,v;if(e[0]!==s||e[1]!==S||e[2]!==n||e[3]!==z||e[4]!==t){const se=F.find(rt),Y=F.find(nt),J=F.find(st),Q=F.find(it),Z=F.find(tt),de=F.find(et),ne=F.find(Ze);f=ie(t,Y.id,Y.title),h=ie(t,J.id,J.title),p=ie(t,Q.id,Q.title),g=ie(t,Z.id,Z.title);const pe=l=>{if(l===se.id)return{key:l,kind:"template-recruit",templateId:"site-editor",agent:se,onClick:"import-deco"};if(l===Y.id)return f?{key:f.id,kind:"existing",templateId:"site-diagnostics",agent:f}:{key:l,kind:"template-recruit",templateId:"site-diagnostics",agent:Y,onClick:"diagnostics"};if(l===J.id)return h?{key:h.id,kind:"existing",templateId:"ai-image",agent:h}:{key:l,kind:"template-recruit",templateId:"ai-image",agent:J,onClick:"ai-image"};if(l===Z.id)return g?{key:g.id,kind:"existing",templateId:"lean-canvas",agent:g}:{key:l,kind:"template-recruit",templateId:"lean-canvas",agent:Z,onClick:"lean-canvas"};if(l===de.id)return{key:l,kind:"template-recruit",templateId:"studio-pack",agent:de,onClick:"studio-pack"};if(l===ne.id)return z.experimental_vibecode?{key:l,kind:"template-recruit",templateId:"self-healing-storefront",agent:ne,onClick:"self-healing"}:null;if(l===Q.id)return p?{key:p.id,kind:"existing",templateId:"ai-research",agent:p}:{key:l,kind:"template-recruit",templateId:"ai-research",agent:Q,onClick:"ai-research"};const B=t.find(V=>V.id!==null&&V.id===l&&!_e(V.id));return B?{key:B.id,kind:"existing",templateId:null,agent:B}:null};let ee;if(n?.ids)ee=n.ids.map(pe).filter(Xe).slice(0,We);else{const B=[se.id,ne.id,Y.id,J.id,Q.id].map(pe).filter(Qe),V=Ue(s),ye=t.filter(Je).filter(q=>q.id!==f?.id&&q.id!==h?.id&&q.id!==p?.id).sort((q,fe)=>{const re=V.indexOf(q.id),le=V.indexOf(fe.id);return re!==-1&&le!==-1?re-le:re!==-1?-1:le!==-1?1:new Date(fe.updated_at).getTime()-new Date(q.updated_at).getTime()}).slice(0,4).map(Ye);ee=[...B,...ye]}j=ee.some(Ge);let te;e[13]!==S?(te=l=>{if(l.kind==="template-recruit"){const B={"import-deco":()=>c(!0),diagnostics:()=>m(!0),"ai-image":()=>L(!0),"ai-research":()=>x(!0),"lean-canvas":()=>k(!0),"studio-pack":()=>T(!0),"self-healing":()=>$(!0)}[l.onClick];return i.jsx(xe,{agent:l.agent,onSpecialClick:B,tracking:{template_id:l.templateId,tile_kind:"template",action:"open_modal"}},l.key)}return i.jsx(xe,{agent:l.agent,onSpecialClick:()=>S(l.agent.id),tracking:{template_id:l.templateId,tile_kind:l.templateId?"existing":"recent",action:"navigate"}},l.key)},e[13]=S,e[14]=te):te=e[14];const ve=te;v="w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",A="flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",_=ee.map(ve),e[0]=s,e[1]=S,e[2]=n,e[3]=z,e[4]=t,e[5]=h,e[6]=p,e[7]=f,e[8]=g,e[9]=j,e[10]=A,e[11]=_,e[12]=v}else h=e[5],p=e[6],f=e[7],g=e[8],j=e[9],A=e[10],_=e[11],v=e[12];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsx(Ve,{}),e[15]=O):O=e[15];let y;e[16]!==j?(y=j&&i.jsx(Ke,{}),e[16]=j,e[17]=y):y=e[17];let D;e[18]!==A||e[19]!==_||e[20]!==y?(D=i.jsxs("div",{className:A,children:[_,O,y]}),e[18]=A,e[19]=_,e[20]=y,e[21]=D):D=e[21];let N;e[22]!==v||e[23]!==D?(N=i.jsx("div",{className:v,children:D}),e[22]=v,e[23]=D,e[24]=N):N=e[24];let C;e[25]!==o?(C=i.jsx(oe,{open:o,onOpenChange:c}),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==a||e[28]!==f?(w=i.jsx(Ee,{open:a,onOpenChange:m,existingAgent:f}),e[27]=a,e[28]=f,e[29]=w):w=e[29];let E;e[30]!==u||e[31]!==h?(E=i.jsx($e,{open:u,onOpenChange:L,existingAgent:h}),e[30]=u,e[31]=h,e[32]=E):E=e[32];let H;e[33]!==b||e[34]!==p?(H=i.jsx(Pe,{open:b,onOpenChange:x,existingAgent:p}),e[33]=b,e[34]=p,e[35]=H):H=e[35];let U;e[36]!==g||e[37]!==d?(U=i.jsx(Me,{open:d,onOpenChange:k,existingAgent:g}),e[36]=g,e[37]=d,e[38]=U):U=e[38];let W;e[39]!==I?(W=i.jsx(Re,{open:I,onOpenChange:T}),e[39]=I,e[40]=W):W=e[40];let K;e[41]!==M?(K=i.jsx(Le,{open:M,onOpenChange:$}),e[41]=M,e[42]=K):K=e[42];let X;return e[43]!==H||e[44]!==U||e[45]!==W||e[46]!==K||e[47]!==N||e[48]!==C||e[49]!==w||e[50]!==E?(X=i.jsxs(i.Fragment,{children:[N,C,w,E,H,U,W,K]}),e[43]=H,e[44]=U,e[45]=W,e[46]=K,e[47]=N,e[48]=C,e[49]=w,e[50]=E,e[51]=X):X=e[51],X}function Ge(e){return e.kind==="existing"&&e.templateId===null}function Ye(e){return{key:e.id,kind:"existing",templateId:null,agent:e}}function Je(e){return e.id!==null&&!_e(e.id)}function Qe(e){return e!==null}function Xe(e){return e!==null}function Ze(e){return e.id==="self-healing-storefront"}function et(e){return e.id==="studio-pack"}function tt(e){return e.id==="lean-canvas"}function it(e){return e.id==="ai-research"}function st(e){return e.id==="ai-image"}function nt(e){return e.id==="site-diagnostics"}function rt(e){return e.id==="site-editor"}function lt(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",children:i.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",children:Array.from({length:7}).map(ot)})}),e[0]=t):t=e[0],t}function ot(e,t){return i.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[100px] shrink-0",children:[i.jsx(ue,{className:"size-12 rounded-xl shrink-0"}),i.jsx(ue,{className:"h-3 sm:h-4 w-full"})]},t)}function ge(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(P.Suspense,{fallback:i.jsx(lt,{}),children:i.jsx(qe,{})}),e[0]=t):t=e[0],t}const at=["radial-gradient(ellipse 25% 220% at -5% 120%, rgba(165,149,255,0.35) 0%, transparent 100%)","radial-gradient(ellipse 25% 220% at 105% -20%, rgba(208,236,26,0.32) 0%, transparent 100%)"].join(", "),ct="/decotexture.svg";function he(e){const t=R.c(7),{onClick:s}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundImage:at},t[0]=r):r=t[0];let n,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:i.jsx(je,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none bg-transparent"})}),o=i.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),t[1]=n,t[2]=o):(n=t[1],o=t[2]);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("img",{src:ct,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:i.jsx(He,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),t[4]=a):a=t[4];let m;return t[5]!==s?(m=i.jsxs("button",{type:"button",onClick:s,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:r,children:[n,o,c,a]}),t[5]=s,t[6]=m):m=t[6],m}function mt(){const e=R.c(5),{data:t}=be.useSession();let s;e[0]!==t?.user?.email?(s=Ce.decoProfile(t?.user?.email),e[0]=t?.user?.email,e[1]=s):s=e[1];const r=!!t?.user?.email;let n;e[2]!==s||e[3]!==r?(n={queryKey:s,queryFn:dt,enabled:r,staleTime:3e5},e[2]=s,e[3]=r,e[4]=n):n=e[4];const{data:o}=we(n);return o?.isDecoUser??!1}async function dt(){const e=await fetch("/api/deco-sites/profile");return e.ok?e.json():{isDecoUser:!1}}function pt(){const e=R.c(51),{data:t}=be.useSession(),[s,r]=P.useState(!1),n=mt(),o=Fe(),{hasDecoKey:c,isZeroBalance:a,isInitialFreeCredit:m,balanceDollars:u,hasOnlyDecoProvider:L}=ze();let b;e[0]!==t?.user?.name?(b=t?.user?.name?.split(" ")[0]||"there",e[0]=t?.user?.name,e[1]=b):b=e[1];const x=b,d=c&&m&&u!=null,k=c&&a&&L;if(o){let _;e[2]!==u||e[3]!==d?(_=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[2]=u,e[3]=d,e[4]=_):_=e[4];let v;e[5]!==k?(v=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[5]=k,e[6]=v):v=e[6];let O;e[7]!==x?(O=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",x,"?"]}),e[7]=x,e[8]=O):O=e[8];let y;e[9]!==_||e[10]!==v||e[11]!==O?(y=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[_,v,O]}),e[9]=_,e[10]=v,e[11]=O,e[12]=y):y=e[12];let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsxs("div",{className:"w-full flex flex-col gap-4 pb-4",children:[i.jsx(ge,{}),i.jsx(G.Input,{showConnectionsBanner:!0})]}),e[13]=D):D=e[13];let N;e[14]!==n?(N=n&&i.jsx("div",{className:"w-full",children:i.jsx(he,{onClick:()=>r(!0)})}),e[14]=n,e[15]=N):N=e[15];let C;e[16]!==y||e[17]!==N?(C=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-4",children:[y,D,N]}),e[16]=y,e[17]=N,e[18]=C):C=e[18];let w;e[19]!==s?(w=i.jsx(oe,{open:s,onOpenChange:r}),e[19]=s,e[20]=w):w=e[20];let E;return e[21]!==C||e[22]!==w?(E=i.jsxs(i.Fragment,{children:[C,w]}),e[21]=C,e[22]=w,e[23]=E):E=e[23],E}let I;e[24]!==u||e[25]!==d?(I=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[24]=u,e[25]=d,e[26]=I):I=e[26];let T;e[27]!==k?(T=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[27]=k,e[28]=T):T=e[28];let M;e[29]!==x?(M=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",x,"?"]}),e[29]=x,e[30]=M):M=e[30];let $;e[31]!==I||e[32]!==T||e[33]!==M?($=i.jsxs("div",{className:"text-center mb-10",children:[I,T,M]}),e[31]=I,e[32]=T,e[33]=M,e[34]=$):$=e[34];let z;e[35]===Symbol.for("react.memo_cache_sentinel")?(z=i.jsx("div",{className:"w-full",children:i.jsx(G.Input,{showConnectionsBanner:!0})}),e[35]=z):z=e[35];let S;e[36]!==$?(S=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[$,z]}),e[36]=$,e[37]=S):S=e[37];let h;e[38]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx("div",{className:"w-full mt-10 mx-auto",children:i.jsx(ge,{})}),e[38]=h):h=e[38];let p;e[39]!==S?(p=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[S,h]}),e[39]=S,e[40]=p):p=e[40];let f;e[41]!==n?(f=n&&i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-10",children:i.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:i.jsx(he,{onClick:()=>r(!0)})})}),e[41]=n,e[42]=f):f=e[42];let g;e[43]!==p||e[44]!==f?(g=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-10",children:[p,f]}),e[43]=p,e[44]=f,e[45]=g):g=e[45];let j;e[46]!==s?(j=i.jsx(oe,{open:s,onOpenChange:r}),e[46]=s,e[47]=j):j=e[47];let A;return e[48]!==g||e[49]!==j?(A=i.jsxs(i.Fragment,{children:[g,j]}),e[48]=g,e[49]=j,e[50]=A):A=e[50],A}function is(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"flex-1 min-h-0 p-1.5 overflow-hidden",children:i.jsx("div",{className:"flex h-full flex-col bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(pt,{})})}),e[0]=t):t=e[0],t}export{is as default};
1
+ import{e as R,j as i,r as P,s as ae,P as Ne,f as ke,c as ce,t as me,b as be,K as Ce,n as we}from"./index-CnknCe9i.js";import{I as je}from"./integration-icon-BIIE53tx.js";import{S as ue}from"./skeleton-DIbgbTEL.js";import{W as F,i as _e}from"./constants-DGVET5nO.js";import{b as Ie}from"./use-virtual-mcp-DYwCZbrQ.js";import{u as Se}from"./use-organization-settings-Dxy82qy3.js";import{i as Ae}from"./ChevronRight-2ozRd8ql.js";import{s as Oe}from"./Plus-yWDQ_tpZ.js";import{a as De}from"./Users03-BpQp0OZp.js";import{I as oe,S as Ee,L as Me,b as Re}from"./lean-canvas-recruit-modal-vF31gMjX.js";import{b as Te,c as $e,d as Pe,S as Le,u as ze,C as G}from"./index-XN9sCkdo.js";import{u as Be}from"./use-create-virtual-mcp-BaV_MWOd.js";import{u as Fe}from"./tooltip-VTeNtMCR.js";import{d as He}from"./XCircle-D-iHz9mr.js";import"./Container-C2bhieKl.js";import"./agent-icon-CJE3IrTn.js";import"./AlertCircle-DJf7WJW3.js";import"./Tool01-Ba51oSqA.js";import"./XClose-DGH-dkmK.js";import"./RefreshCcw01-02Zm-r_b.js";import"./ArrowNarrowLeft-zhth65sS.js";import"./ArrowUpRight-B3qf65r_.js";import"./ZapSquare-zYT4mArq.js";import"./CheckCircle-Y9PieZLB.js";import"./Check-BA7p_1wq.js";import"./ChevronDown-CHAav7qy.js";import"./ChevronUp-DiTrXBul.js";import"./DotsVertical-EPasiNNs.js";import"./Star01-DfneWwne.js";import"./Palette-C_hdzDFv.js";import"./SearchMd-KthT6Z0D.js";import"./index-CoJ8j1Pw.js";import"./X-C7tkmqiA.js";import"./LinkExternal01-BPHdX5PH.js";import"./Lock01-BGF0eORu.js";import"./Sun-jEEtT5QL.js";import"./Play-F9KGb4fS.js";import"./Settings02-o9kWs5LM.js";import"./Shield01-C6IvOcka.js";import"./Trash01-phS8Heeq.js";import"./User01-ZJzkhpRI.js";import"./Zap-B3d9PZiM.js";import"./use-collections-CiD-L_rq.js";import"./use-navigate-to-agent-CBT4EeEo.js";import"./dialog-Hnl5R_ro.js";import"./collection-search-Ce1lQnUu.js";import"./checkbox-CsbRNJyh.js";import"./use-connection-JNwwjcGV.js";import"./extract-connection-data-em000wPy.js";import"./constants-BVAyWr7s.js";import"./collections-DW4PTltg.js";import"./drawer-Crup1SLH.js";import"./use-mcp-tools-CVArZMz4.js";import"./switch-DHlXaCRu.js";import"./input-tSjlegEI.js";import"./chat-context-CKn0S8Zn.js";import"./use-ai-providers-Dn3Z7IEd.js";import"./use-decopilot-events-CNFY9Cdo.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-dDV8jhdD.js";import"./shell-layout-KvQC2n8R.js";import"./required-auth-layout-DesCgYHR.js";import"./use-org-sso-BraRussC.js";import"./pair-CgrOS8jZ.js";import"./index-BOzqanlB.js";import"./use-copy-BC2pt5R_.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-DXN89wPs.js";import"./tabs-DP8p-QKj.js";import"./form-C7tw7wIR.js";import"./label-BPDMOqL-.js";import"./dropdown-menu-V4M0HjsW.js";import"./select-Cgq5fB25.js";import"./toggle-group-BTIHjGuh.js";import"./select-model-BrcDDMDY.js";import"./ai-providers-logos-DD3qZ33J.js";import"./use-debounced-autosave-BZkVf5Bt.js";import"./settings-section-BnPqXFEQ.js";import"./card-BoqhySt6.js";import"./avatar-qtN1d68D.js";import"./alert-dialog-BX6tjxLQ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-pVdenInH.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CZXyfhfz.js";import"./use-registry-connections-Dutuf-7C.js";import"./useInfiniteQuery-DgNRpfvJ.js";import"./infiniteQueryObserver-BpzCmbvi.js";import"./collection-tabs-f6wZXNju.js";import"./badge-B9X-6Gl1.js";import"./textarea-BKxnYjv4.js";import"./connection-form-helpers-BlYNQpCT.js";import"./use-infinite-scroll-DxHMXvd2.js";import"./useSuspenseInfiniteQuery-olKcjkDq.js";function Ue(e){try{const t=localStorage.getItem(`mesh:chat:recent-agents:${e}`);return t?JSON.parse(t):[]}catch{return[]}}const We=8;function xe(e){const t=R.c(21),{agent:s,onSpecialClick:r,tracking:n}=e,{org:o}=ae(),c=ke();let a;t[0]!==s.id||t[1]!==s.title||t[2]!==c||t[3]!==r||t[4]!==o||t[5]!==n.action||t[6]!==n.template_id||t[7]!==n.tile_kind?(a=()=>{if(me("home_agent_tile_clicked",{template_id:n.template_id,agent_id:s.id,agent_title:s.title,tile_kind:n.tile_kind,action:n.action}),r)r();else{const I=crypto.randomUUID();c({to:"/$org/$taskId",params:{org:o.slug,taskId:I},search:{virtualmcpid:s.id}})}},t[0]=s.id,t[1]=s.title,t[2]=c,t[3]=r,t[4]=o,t[5]=n.action,t[6]=n.template_id,t[7]=n.tile_kind,t[8]=a):a=t[8];const m=a;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),t[9]=u):u=t[9];const L=`Select agent ${s.title}`;let b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(De,{size:24}),t[10]=b):b=t[10];let x;t[11]!==s.icon||t[12]!==s.title?(x=i.jsx(je,{icon:s.icon,name:s.title,size:"md",fallbackIcon:b,className:"transition-transform group-hover:scale-110"}),t[11]=s.icon,t[12]=s.title,t[13]=x):x=t[13];let d;t[14]!==s.title?(d=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2 break-words w-full",children:s.title}),t[14]=s.title,t[15]=d):d=t[15];let k;return t[16]!==m||t[17]!==L||t[18]!==x||t[19]!==d?(k=i.jsxs("button",{type:"button",onClick:m,className:u,"aria-label":L,children:[x,d]}),t[16]=m,t[17]=L,t[18]=x,t[19]=d,t[20]=k):k=t[20],k}function Ke(){const e=R.c(8),t=ke(),{org:s}=ae();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),e[0]=r):r=e[0];let n;e[1]!==t||e[2]!==s.slug?(n=()=>{me("home_see_all_agents_clicked"),t({to:"/$org/settings/agents",params:{org:s.slug}})},e[1]=t,e[2]=s.slug,e[3]=n):n=e[3];let o,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Ae,{size:20,className:"text-foreground"})}),c=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"}),e[4]=o,e[5]=c):(o=e[4],c=e[5]);let a;return e[6]!==n?(a=i.jsxs("button",{type:"button",className:r,"aria-label":"See all agents",onClick:n,children:[o,c]}),e[6]=n,e[7]=a):a=e[7],a}function Ve(){const e=R.c(9);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={navigateOnCreate:!0},e[0]=t):t=e[0];const{createVirtualMCP:s,isCreating:r}=Be(t);let n;e[1]!==s?(n=()=>{me("home_create_agent_clicked"),s()},e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group","disabled:opacity-50 disabled:cursor-not-allowed"),e[3]=o):o=e[3];let c,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Oe,{size:20,className:"text-muted-foreground"})}),a=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),e[4]=c,e[5]=a):(c=e[4],a=e[5]);let m;return e[6]!==r||e[7]!==n?(m=i.jsxs("button",{type:"button",onClick:n,disabled:r,className:o,"aria-label":"Create agent",children:[c,a]}),e[6]=r,e[7]=n,e[8]=m):m=e[8],m}function ie(e,t,s){return e.find(r=>r.id!==null&&(r.metadata?.type===t||r.title===s))}function qe(){const e=R.c(52),t=Ie(),{locator:s,org:r}=ae(),n=Se(),[o,c]=P.useState(!1),[a,m]=P.useState(!1),[u,L]=P.useState(!1),[b,x]=P.useState(!1),[d,k]=P.useState(!1),[I,T]=P.useState(!1),[M,$]=P.useState(!1),[z]=Ne(),S=Te(r.slug);let h,p,f,g,j,A,_,v;if(e[0]!==s||e[1]!==S||e[2]!==n||e[3]!==z||e[4]!==t){const se=F.find(rt),Y=F.find(nt),J=F.find(st),Q=F.find(it),Z=F.find(tt),de=F.find(et),ne=F.find(Ze);f=ie(t,Y.id,Y.title),h=ie(t,J.id,J.title),p=ie(t,Q.id,Q.title),g=ie(t,Z.id,Z.title);const pe=l=>{if(l===se.id)return{key:l,kind:"template-recruit",templateId:"site-editor",agent:se,onClick:"import-deco"};if(l===Y.id)return f?{key:f.id,kind:"existing",templateId:"site-diagnostics",agent:f}:{key:l,kind:"template-recruit",templateId:"site-diagnostics",agent:Y,onClick:"diagnostics"};if(l===J.id)return h?{key:h.id,kind:"existing",templateId:"ai-image",agent:h}:{key:l,kind:"template-recruit",templateId:"ai-image",agent:J,onClick:"ai-image"};if(l===Z.id)return g?{key:g.id,kind:"existing",templateId:"lean-canvas",agent:g}:{key:l,kind:"template-recruit",templateId:"lean-canvas",agent:Z,onClick:"lean-canvas"};if(l===de.id)return{key:l,kind:"template-recruit",templateId:"studio-pack",agent:de,onClick:"studio-pack"};if(l===ne.id)return z.experimental_vibecode?{key:l,kind:"template-recruit",templateId:"self-healing-storefront",agent:ne,onClick:"self-healing"}:null;if(l===Q.id)return p?{key:p.id,kind:"existing",templateId:"ai-research",agent:p}:{key:l,kind:"template-recruit",templateId:"ai-research",agent:Q,onClick:"ai-research"};const B=t.find(V=>V.id!==null&&V.id===l&&!_e(V.id));return B?{key:B.id,kind:"existing",templateId:null,agent:B}:null};let ee;if(n?.ids)ee=n.ids.map(pe).filter(Xe).slice(0,We);else{const B=[se.id,ne.id,Y.id,J.id,Q.id].map(pe).filter(Qe),V=Ue(s),ye=t.filter(Je).filter(q=>q.id!==f?.id&&q.id!==h?.id&&q.id!==p?.id).sort((q,fe)=>{const re=V.indexOf(q.id),le=V.indexOf(fe.id);return re!==-1&&le!==-1?re-le:re!==-1?-1:le!==-1?1:new Date(fe.updated_at).getTime()-new Date(q.updated_at).getTime()}).slice(0,4).map(Ye);ee=[...B,...ye]}j=ee.some(Ge);let te;e[13]!==S?(te=l=>{if(l.kind==="template-recruit"){const B={"import-deco":()=>c(!0),diagnostics:()=>m(!0),"ai-image":()=>L(!0),"ai-research":()=>x(!0),"lean-canvas":()=>k(!0),"studio-pack":()=>T(!0),"self-healing":()=>$(!0)}[l.onClick];return i.jsx(xe,{agent:l.agent,onSpecialClick:B,tracking:{template_id:l.templateId,tile_kind:"template",action:"open_modal"}},l.key)}return i.jsx(xe,{agent:l.agent,onSpecialClick:()=>S(l.agent.id),tracking:{template_id:l.templateId,tile_kind:l.templateId?"existing":"recent",action:"navigate"}},l.key)},e[13]=S,e[14]=te):te=e[14];const ve=te;v="w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",A="flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",_=ee.map(ve),e[0]=s,e[1]=S,e[2]=n,e[3]=z,e[4]=t,e[5]=h,e[6]=p,e[7]=f,e[8]=g,e[9]=j,e[10]=A,e[11]=_,e[12]=v}else h=e[5],p=e[6],f=e[7],g=e[8],j=e[9],A=e[10],_=e[11],v=e[12];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsx(Ve,{}),e[15]=O):O=e[15];let y;e[16]!==j?(y=j&&i.jsx(Ke,{}),e[16]=j,e[17]=y):y=e[17];let D;e[18]!==A||e[19]!==_||e[20]!==y?(D=i.jsxs("div",{className:A,children:[_,O,y]}),e[18]=A,e[19]=_,e[20]=y,e[21]=D):D=e[21];let N;e[22]!==v||e[23]!==D?(N=i.jsx("div",{className:v,children:D}),e[22]=v,e[23]=D,e[24]=N):N=e[24];let C;e[25]!==o?(C=i.jsx(oe,{open:o,onOpenChange:c}),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==a||e[28]!==f?(w=i.jsx(Ee,{open:a,onOpenChange:m,existingAgent:f}),e[27]=a,e[28]=f,e[29]=w):w=e[29];let E;e[30]!==u||e[31]!==h?(E=i.jsx($e,{open:u,onOpenChange:L,existingAgent:h}),e[30]=u,e[31]=h,e[32]=E):E=e[32];let H;e[33]!==b||e[34]!==p?(H=i.jsx(Pe,{open:b,onOpenChange:x,existingAgent:p}),e[33]=b,e[34]=p,e[35]=H):H=e[35];let U;e[36]!==g||e[37]!==d?(U=i.jsx(Me,{open:d,onOpenChange:k,existingAgent:g}),e[36]=g,e[37]=d,e[38]=U):U=e[38];let W;e[39]!==I?(W=i.jsx(Re,{open:I,onOpenChange:T}),e[39]=I,e[40]=W):W=e[40];let K;e[41]!==M?(K=i.jsx(Le,{open:M,onOpenChange:$}),e[41]=M,e[42]=K):K=e[42];let X;return e[43]!==H||e[44]!==U||e[45]!==W||e[46]!==K||e[47]!==N||e[48]!==C||e[49]!==w||e[50]!==E?(X=i.jsxs(i.Fragment,{children:[N,C,w,E,H,U,W,K]}),e[43]=H,e[44]=U,e[45]=W,e[46]=K,e[47]=N,e[48]=C,e[49]=w,e[50]=E,e[51]=X):X=e[51],X}function Ge(e){return e.kind==="existing"&&e.templateId===null}function Ye(e){return{key:e.id,kind:"existing",templateId:null,agent:e}}function Je(e){return e.id!==null&&!_e(e.id)}function Qe(e){return e!==null}function Xe(e){return e!==null}function Ze(e){return e.id==="self-healing-storefront"}function et(e){return e.id==="studio-pack"}function tt(e){return e.id==="lean-canvas"}function it(e){return e.id==="ai-research"}function st(e){return e.id==="ai-image"}function nt(e){return e.id==="site-diagnostics"}function rt(e){return e.id==="site-editor"}function lt(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",children:i.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",children:Array.from({length:7}).map(ot)})}),e[0]=t):t=e[0],t}function ot(e,t){return i.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[100px] shrink-0",children:[i.jsx(ue,{className:"size-12 rounded-xl shrink-0"}),i.jsx(ue,{className:"h-3 sm:h-4 w-full"})]},t)}function ge(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(P.Suspense,{fallback:i.jsx(lt,{}),children:i.jsx(qe,{})}),e[0]=t):t=e[0],t}const at=["radial-gradient(ellipse 25% 220% at -5% 120%, rgba(165,149,255,0.35) 0%, transparent 100%)","radial-gradient(ellipse 25% 220% at 105% -20%, rgba(208,236,26,0.32) 0%, transparent 100%)"].join(", "),ct="/decotexture.svg";function he(e){const t=R.c(7),{onClick:s}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundImage:at},t[0]=r):r=t[0];let n,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:i.jsx(je,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none bg-transparent"})}),o=i.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),t[1]=n,t[2]=o):(n=t[1],o=t[2]);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("img",{src:ct,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:i.jsx(He,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),t[4]=a):a=t[4];let m;return t[5]!==s?(m=i.jsxs("button",{type:"button",onClick:s,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:r,children:[n,o,c,a]}),t[5]=s,t[6]=m):m=t[6],m}function mt(){const e=R.c(5),{data:t}=be.useSession();let s;e[0]!==t?.user?.email?(s=Ce.decoProfile(t?.user?.email),e[0]=t?.user?.email,e[1]=s):s=e[1];const r=!!t?.user?.email;let n;e[2]!==s||e[3]!==r?(n={queryKey:s,queryFn:dt,enabled:r,staleTime:3e5},e[2]=s,e[3]=r,e[4]=n):n=e[4];const{data:o}=we(n);return o?.isDecoUser??!1}async function dt(){const e=await fetch("/api/deco-sites/profile");return e.ok?e.json():{isDecoUser:!1}}function pt(){const e=R.c(51),{data:t}=be.useSession(),[s,r]=P.useState(!1),n=mt(),o=Fe(),{hasDecoKey:c,isZeroBalance:a,isInitialFreeCredit:m,balanceDollars:u,hasOnlyDecoProvider:L}=ze();let b;e[0]!==t?.user?.name?(b=t?.user?.name?.split(" ")[0]||"there",e[0]=t?.user?.name,e[1]=b):b=e[1];const x=b,d=c&&m&&u!=null,k=c&&a&&L;if(o){let _;e[2]!==u||e[3]!==d?(_=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[2]=u,e[3]=d,e[4]=_):_=e[4];let v;e[5]!==k?(v=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[5]=k,e[6]=v):v=e[6];let O;e[7]!==x?(O=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",x,"?"]}),e[7]=x,e[8]=O):O=e[8];let y;e[9]!==_||e[10]!==v||e[11]!==O?(y=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[_,v,O]}),e[9]=_,e[10]=v,e[11]=O,e[12]=y):y=e[12];let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsxs("div",{className:"w-full flex flex-col gap-4 pb-4",children:[i.jsx(ge,{}),i.jsx(G.Input,{showConnectionsBanner:!0})]}),e[13]=D):D=e[13];let N;e[14]!==n?(N=n&&i.jsx("div",{className:"w-full",children:i.jsx(he,{onClick:()=>r(!0)})}),e[14]=n,e[15]=N):N=e[15];let C;e[16]!==y||e[17]!==N?(C=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-4",children:[y,D,N]}),e[16]=y,e[17]=N,e[18]=C):C=e[18];let w;e[19]!==s?(w=i.jsx(oe,{open:s,onOpenChange:r}),e[19]=s,e[20]=w):w=e[20];let E;return e[21]!==C||e[22]!==w?(E=i.jsxs(i.Fragment,{children:[C,w]}),e[21]=C,e[22]=w,e[23]=E):E=e[23],E}let I;e[24]!==u||e[25]!==d?(I=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[24]=u,e[25]=d,e[26]=I):I=e[26];let T;e[27]!==k?(T=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[27]=k,e[28]=T):T=e[28];let M;e[29]!==x?(M=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",x,"?"]}),e[29]=x,e[30]=M):M=e[30];let $;e[31]!==I||e[32]!==T||e[33]!==M?($=i.jsxs("div",{className:"text-center mb-10",children:[I,T,M]}),e[31]=I,e[32]=T,e[33]=M,e[34]=$):$=e[34];let z;e[35]===Symbol.for("react.memo_cache_sentinel")?(z=i.jsx("div",{className:"w-full",children:i.jsx(G.Input,{showConnectionsBanner:!0})}),e[35]=z):z=e[35];let S;e[36]!==$?(S=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[$,z]}),e[36]=$,e[37]=S):S=e[37];let h;e[38]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx("div",{className:"w-full mt-10 mx-auto",children:i.jsx(ge,{})}),e[38]=h):h=e[38];let p;e[39]!==S?(p=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[S,h]}),e[39]=S,e[40]=p):p=e[40];let f;e[41]!==n?(f=n&&i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-10",children:i.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:i.jsx(he,{onClick:()=>r(!0)})})}),e[41]=n,e[42]=f):f=e[42];let g;e[43]!==p||e[44]!==f?(g=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-10",children:[p,f]}),e[43]=p,e[44]=f,e[45]=g):g=e[45];let j;e[46]!==s?(j=i.jsx(oe,{open:s,onOpenChange:r}),e[46]=s,e[47]=j):j=e[47];let A;return e[48]!==g||e[49]!==j?(A=i.jsxs(i.Fragment,{children:[g,j]}),e[48]=g,e[49]=j,e[50]=A):A=e[50],A}function is(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"flex-1 min-h-0 p-1.5 overflow-hidden",children:i.jsx("div",{className:"flex h-full flex-col bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(pt,{})})}),e[0]=t):t=e[0],t}export{is as default};