decocms 4.286.6 → 4.286.8

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 (240) hide show
  1. package/dist/client/assets/{AlertCircle-DvlMJzvH.js → AlertCircle-Dw3SdgUF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Co3sUl8Q.js → AreaChart-D2vym8KR.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-RTJfGYqO.js → ArrowLeft-DvpAv4zp.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-C9GXuzBP.js → ArrowUp-B0Lqqmya.js} +1 -1
  5. package/dist/client/assets/{Check-Bcnwcxbs.js → Check-ttzquLcG.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CpE2gFL2.js → CheckCircle-Cy0Rnrsm.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-CYG4QSfS.js → ChevronDown-rzwAIpBt.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-CpQ-XGWn.js → ChevronRight-DkPzpckV.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-CD6IG3xp.js → ChevronSelectorVertical-LJxUB6jw.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DmLHjlB8.js → ChevronUp-BHQR4UV3.js} +1 -1
  11. package/dist/client/assets/{Circle-DquOefUY.js → Circle-IuE7HGfM.js} +1 -1
  12. package/dist/client/assets/{Copy01-D1fa_vNZ.js → Copy01-C9x-qaA5.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CzXoH2_E.js → CreditCard01-BjpClgK3.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-CKqcdQY1.js → DotsVertical-Ub5HmhJM.js} +1 -1
  15. package/dist/client/assets/{Download01-uHHa4lEe.js → Download01-Cti1tG3M.js} +1 -1
  16. package/dist/client/assets/{Eye-DQbrUXqj.js → Eye-DF8_ZcTD.js} +1 -1
  17. package/dist/client/assets/{FilterLines-FKz5JmaU.js → FilterLines-Du0AyVq8.js} +1 -1
  18. package/dist/client/assets/{Flag01-C7lX_ovT.js → Flag01-inBVZiX0.js} +1 -1
  19. package/dist/client/assets/{Globe01-DUNAdl96.js → Globe01-BkycGCgE.js} +1 -1
  20. package/dist/client/assets/{Globe04-C8-Iz5Ob.js → Globe04-y7iSy_To.js} +1 -1
  21. package/dist/client/assets/{HardDrive-CNNOA8X1.js → HardDrive-Cbjcxk-m.js} +1 -1
  22. package/dist/client/assets/{Key01-CtlUEn-O.js → Key01-haAH_VDS.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-CYW5qBle.js → LinkExternal01-CgEKyQta.js} +1 -1
  24. package/dist/client/assets/{LockUnlocked01-Camlq0iF.js → LockUnlocked01-DiK5Iz2C.js} +1 -1
  25. package/dist/client/assets/{LogOut01-C4vxkvjg.js → LogOut01-E2kdEUrB.js} +1 -1
  26. package/dist/client/assets/{Monitor01-BztQffJ4.js → Monitor01-lD-OxyiV.js} +1 -1
  27. package/dist/client/assets/{Palette-7eulFGyg.js → Palette-DR7lX3pn.js} +1 -1
  28. package/dist/client/assets/{Play-BBuTt-ww.js → Play-CqkwkZ_-.js} +1 -1
  29. package/dist/client/assets/{Plus-CNy9dH9H.js → Plus-CjLpdcmH.js} +1 -1
  30. package/dist/client/assets/{SearchLg-C50f6-iX.js → SearchLg-5ZGRHNDG.js} +1 -1
  31. package/dist/client/assets/{SearchMd-6NHlIJV9.js → SearchMd-B4WVXsSg.js} +1 -1
  32. package/dist/client/assets/{Settings02-Coch6I-s.js → Settings02-BWIBgnXP.js} +1 -1
  33. package/dist/client/assets/{Share07-CxOQdduI.js → Share07-BEb7ZfUu.js} +1 -1
  34. package/dist/client/assets/{Shield01-Bx4JHFe_.js → Shield01-iM0j3TRP.js} +1 -1
  35. package/dist/client/assets/{Stars01-BN2vePFs.js → Stars01-Cvv6NHCU.js} +1 -1
  36. package/dist/client/assets/{Stars02-C-goK6F_.js → Stars02-BXqGEI9t.js} +1 -1
  37. package/dist/client/assets/{Sun-DrW-cZzP.js → Sun-gEB_AVfi.js} +1 -1
  38. package/dist/client/assets/{SwitchHorizontal01-DfXXgPLT.js → SwitchHorizontal01-CoU25efW.js} +1 -1
  39. package/dist/client/assets/{Tag01-B6hNMJxH.js → Tag01-C5aAw6Cw.js} +1 -1
  40. package/dist/client/assets/{ThumbsUp-Cd4kv7sI.js → ThumbsUp-CbyaOU9x.js} +1 -1
  41. package/dist/client/assets/{Tool01-CS1WVbOe.js → Tool01-RVeqlI6_.js} +1 -1
  42. package/dist/client/assets/{Tool02-jZCjY4_C.js → Tool02-BeH-qK4u.js} +1 -1
  43. package/dist/client/assets/{Trash01-Ctsi28Hg.js → Trash01-B7qNZLDY.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-C_nOGhfv.js → TrendUp01-HanaeZo1.js} +1 -1
  45. package/dist/client/assets/{Upload01-BEuKNUVM.js → Upload01-CgYfI0IF.js} +1 -1
  46. package/dist/client/assets/{User01-Ds6h02_-.js → User01-C1MlDYm7.js} +1 -1
  47. package/dist/client/assets/{UserSquare-DVKafobf.js → UserSquare-RWXgNzap.js} +1 -1
  48. package/dist/client/assets/{Users01-bpQBejCA.js → Users01-CTMGsTHJ.js} +1 -1
  49. package/dist/client/assets/{Users03-DlfmNcXb.js → Users03-BsPXbQir.js} +1 -1
  50. package/dist/client/assets/{XCircle-BWzp7_v9.js → XCircle-Ch-rTPae.js} +1 -1
  51. package/dist/client/assets/{XClose-BEkgs57b.js → XClose-SNsEgcxK.js} +1 -1
  52. package/dist/client/assets/{YAxis-D_jomfKr.js → YAxis-pQW5L7Zi.js} +1 -1
  53. package/dist/client/assets/{Zap-CxJvVyr1.js → Zap-BSaUAe49.js} +1 -1
  54. package/dist/client/assets/{ZapSquare-Cx2KzeH8.js → ZapSquare-CCnJPz6U.js} +1 -1
  55. package/dist/client/assets/{access-gate-PCzEBWJ5.js → access-gate-BaqGBtda.js} +1 -1
  56. package/dist/client/assets/{agent-icon-C0NUu0Dv.js → agent-icon-C4iQDDhi.js} +1 -1
  57. package/dist/client/assets/{agents-list-id6I8nWX.js → agents-list-Cn-17_xd.js} +1 -1
  58. package/dist/client/assets/{ai-providers-C9LSA8l7.js → ai-providers-C5SElYFt.js} +1 -1
  59. package/dist/client/assets/{alert-rPfc5Gbc.js → alert-0e0aLDNC.js} +1 -1
  60. package/dist/client/assets/{alert-dialog-B2L8zdte.js → alert-dialog-zxFDb_4-.js} +1 -1
  61. package/dist/client/assets/{api-keys-B5ah8-3a.js → api-keys-DrZiJRx7.js} +1 -1
  62. package/dist/client/assets/{app-editor-DekxMnA4.js → app-editor-Cx3oAgsE.js} +1 -1
  63. package/dist/client/assets/{auth-CyHwgdwm.js → auth-BOaJ5nut.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-op8dXn2Q.js → auth-catchall-YYRz5LwZ.js} +1 -1
  65. package/dist/client/assets/{auth-entry-BoRsB15C.js → auth-entry-k-ynOCuT.js} +1 -1
  66. package/dist/client/assets/{auth-split-layout-CFEAFbWe.js → auth-split-layout-DxK9ThJI.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-PAJ6c4DM.js → authenticate-and-persist-oauth-ByMzEyLt.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-z1ftMX8t.js → automation-list-row-A76srB5C.js} +1 -1
  69. package/dist/client/assets/{automation-runs-BxtzDNBD.js → automation-runs-DZnf-9zL.js} +2 -2
  70. package/dist/client/assets/{automations-B75sZtqk.js → automations-f3L-tUAH.js} +1 -1
  71. package/dist/client/assets/{avatar-vk7RnokO.js → avatar-BgfkuwRB.js} +1 -1
  72. package/dist/client/assets/{badge-CkLXXL_T.js → badge-Ch_ONHF2.js} +1 -1
  73. package/dist/client/assets/{block-document-C4o6tCSR.js → block-document-bPzW9mKv.js} +1 -1
  74. package/dist/client/assets/{breadcrumb-C9h26hV1.js → breadcrumb-BXH4egSF.js} +1 -1
  75. package/dist/client/assets/{buckets--2vuTKGA.js → buckets-qcs3thvR.js} +1 -1
  76. package/dist/client/assets/{bulk-category-panel-vm5kaf3N.js → bulk-category-panel-CmUwQSOp.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-C9xZENFM.js → capability-load-error-CezTFxpc.js} +1 -1
  78. package/dist/client/assets/{cards-DQZf9oFU.js → cards-BansJ4hg.js} +1 -1
  79. package/dist/client/assets/{category-editor-CLzVrD3c.js → category-editor-Dwj7-ITM.js} +1 -1
  80. package/dist/client/assets/{chart-D5ReNvVa.js → chart-u6_W5n2i.js} +1 -1
  81. package/dist/client/assets/{chat-context-Blvo4ZaA.js → chat-context-CIW918kd.js} +1 -1
  82. package/dist/client/assets/{checkbox-359BBv51.js → checkbox-CYFHboNO.js} +1 -1
  83. package/dist/client/assets/{choose-editor-Bi6bQVoz.js → choose-editor-DI_FfPXG.js} +1 -1
  84. package/dist/client/assets/{cli-auth-success-BGMSslSY.js → cli-auth-success-COIiH1IT.js} +1 -1
  85. package/dist/client/assets/{collection-detail-D3XTvjYX.js → collection-detail-384DJk4b.js} +1 -1
  86. package/dist/client/assets/{collection-display-button-D7WXGP5-.js → collection-display-button-BSIIeB-1.js} +1 -1
  87. package/dist/client/assets/{collection-search-CmlhAF0q.js → collection-search-CNiN7_WJ.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-CtTEf-hj.js → collection-table-wrapper-DESOtwDn.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-CQJ6FTtv.js → collection-tabs-CQNJVAAz.js} +1 -1
  90. package/dist/client/assets/{command-B54aL3fS.js → command-BlLeosbi.js} +1 -1
  91. package/dist/client/assets/{commerce-onboarding-9F-L-Nkc.js → commerce-onboarding-nnotuPxX.js} +1 -1
  92. package/dist/client/assets/{config-BktrQTTP.js → config-x7MyaYKx.js} +1 -1
  93. package/dist/client/assets/{connect-BQ2Cd4U6.js → connect-4EgAstDP.js} +1 -1
  94. package/dist/client/assets/{connection-BtMCcF76.js → connection-CUmZGX4o.js} +1 -1
  95. package/dist/client/assets/{connection-card-jdfVPdle.js → connection-card-BE77KM2M.js} +1 -1
  96. package/dist/client/assets/{connection-detail-BDIsUsQx.js → connection-detail-B0Ek8gHD.js} +1 -1
  97. package/dist/client/assets/{connection-form-helpers-w35YzYkJ.js → connection-form-helpers-BI3u_trm.js} +1 -1
  98. package/dist/client/assets/{connections-DfQlN_PP.js → connections-JF3QzcpT.js} +1 -1
  99. package/dist/client/assets/{decopilot-sse-pool-D4oSA7X3.js → decopilot-sse-pool-DPRBorRx.js} +1 -1
  100. package/dist/client/assets/{dialog-BPAi9RC3.js → dialog-Dr0JFHjN.js} +1 -1
  101. package/dist/client/assets/{domain-settings-B0ct-HDu.js → domain-settings-ADY97haU.js} +1 -1
  102. package/dist/client/assets/{drawer-Rb3VMach.js → drawer-CHTd7tLQ.js} +1 -1
  103. package/dist/client/assets/{dropdown-menu-DrLVp347.js → dropdown-menu-CEKKyK2-.js} +1 -1
  104. package/dist/client/assets/{empty-state-B2wH44TC.js → empty-state-CBiHv5h7.js} +1 -1
  105. package/dist/client/assets/{extract-connection-data-Bdjb5ZXD.js → extract-connection-data-DRoFrfak.js} +1 -1
  106. package/dist/client/assets/{file-explorer-6_ZvOUKC.js → file-explorer-Buvt7Jx5.js} +1 -1
  107. package/dist/client/assets/{file-type-icon-Hqh-VGqi.js → file-type-icon-DcJEJkZX.js} +1 -1
  108. package/dist/client/assets/{form-BEmxbAzw.js → form-D77whi9m.js} +1 -1
  109. package/dist/client/assets/{general-BAt-Pp2H.js → general-ZF5faWPg.js} +1 -1
  110. package/dist/client/assets/{github-icon-DHRjGJq9.js → github-icon-C4ja-GnH.js} +1 -1
  111. package/dist/client/assets/{github-repo-picker-BfQZfVQf.js → github-repo-picker-DrUrjUkS.js} +1 -1
  112. package/dist/client/assets/{hooks-OOuw421f.js → hooks-B5_amjoz.js} +1 -1
  113. package/dist/client/assets/index-AlHFSHJa.js +748 -0
  114. package/dist/client/assets/{index-DPGUtnwt.js → index-BDQwfrOa.js} +3 -3
  115. package/dist/client/assets/{index-CQOEZYxM.js → index-C2wKJjGr.js} +1 -1
  116. package/dist/client/assets/{index-_ej3dgt5.js → index-CFKzku9b.js} +1 -1
  117. package/dist/client/assets/{index-u2QXPqsz.js → index-CSwDxW2p.js} +1 -1
  118. package/dist/client/assets/{index-D0lcxq-X.js → index-CvCiTM5m.js} +1 -1
  119. package/dist/client/assets/{index-BL8fuaSm.js → index-DAIr6pIT.js} +1 -1
  120. package/dist/client/assets/{index-D7uXKn4l.js → index-DI9v52-X.js} +1 -1
  121. package/dist/client/assets/index-DkahBV2K.css +1 -0
  122. package/dist/client/assets/index-pLb5aaYO.js +1 -0
  123. package/dist/client/assets/{index-BV64OjK_.js → index-pVQiTPZE.js} +1 -1
  124. package/dist/client/assets/{index-redirect-CcT9RVhJ.js → index-redirect-BJiQK1CE.js} +1 -1
  125. package/dist/client/assets/{infra-billing-bdrx4pLm.js → infra-billing-DPUTsbXW.js} +1 -1
  126. package/dist/client/assets/{input-DKMZUsZA.js → input-tkXOFrYf.js} +1 -1
  127. package/dist/client/assets/{integration-icon-CRsthFhv.js → integration-icon-Czqr9NJo.js} +1 -1
  128. package/dist/client/assets/{invite-member-dialog-xUE-gU0C.js → invite-member-dialog-CGeklCQn.js} +1 -1
  129. package/dist/client/assets/{label-BU9Jjv7s.js → label-fUj9ClwH.js} +1 -1
  130. package/dist/client/assets/{layout-Be_9QfZ8.js → layout-BBcH7LvX.js} +1 -1
  131. package/dist/client/assets/{login-Qn_MjIG7.js → login-BH9TUYGs.js} +1 -1
  132. package/dist/client/assets/{mcp-oauth-DTLy_4G_.js → mcp-oauth-2Pcd3vN4.js} +1 -1
  133. package/dist/client/assets/{members-DWhY3Kne.js → members-HGEkAGWi.js} +1 -1
  134. package/dist/client/assets/{monaco-editor-uC0FBK2U.js → monaco-editor-DhL3ddUA.js} +1 -1
  135. package/dist/client/assets/{monitoring-stats-row-BDgA_2Ej.js → monitoring-stats-row-CItbBR3E.js} +1 -1
  136. package/dist/client/assets/{multi-select-BQqJKDNj.js → multi-select-CHxyqYOg.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-2vMri_0x.js → oauth-callback-DjOSMyhv.js} +1 -1
  138. package/dist/client/assets/{oauth-callback-ai-provider-RZWFAs_V.js → oauth-callback-ai-provider-CxieGga4.js} +1 -1
  139. package/dist/client/assets/{onboarding-BNWf6TW3.js → onboarding-BQeEDsEd.js} +1 -1
  140. package/dist/client/assets/{org-layout-BDGMLzCE.js → org-layout-DLRQ_M2O.js} +1 -1
  141. package/dist/client/assets/{organization-choice-CdvpiUH2.js → organization-choice-Cktc0PlC.js} +1 -1
  142. package/dist/client/assets/{orgs-B2aDDMEf.js → orgs-Crpd8ei1.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-B68YJZBJ.js → page-seo-form-DUh68KII.js} +1 -1
  144. package/dist/client/assets/{popover-C0it1EeO.js → popover-DjgpLaeH.js} +1 -1
  145. package/dist/client/assets/{post-calendar-B523IrUM.js → post-calendar-Bgj5C5Xs.js} +1 -1
  146. package/dist/client/assets/{post-editor-eYS6wget.js → post-editor-DdJ8ItyW.js} +1 -1
  147. package/dist/client/assets/{primitives-DeoLy5zL.js → primitives-cHgQijHE.js} +1 -1
  148. package/dist/client/assets/{profile-U8XK2VXm.js → profile-BwpVPWzk.js} +1 -1
  149. package/dist/client/assets/{project-app-view-Dh8z705d.js → project-app-view-BG8-nnSR.js} +1 -1
  150. package/dist/client/assets/{prompts-Dt_lXCbL.js → prompts-C_nWMi_z.js} +1 -1
  151. package/dist/client/assets/record-editor-C27xFv26.js +1 -0
  152. package/dist/client/assets/redirect-editor-q9UCECQI.js +1 -0
  153. package/dist/client/assets/registry-DY11Hm88.js +2 -0
  154. package/dist/client/assets/{registry-layout-CoVnvVUV.js → registry-layout-OkjMTUFx.js} +1 -1
  155. package/dist/client/assets/{reports-CybfHSA0.js → reports-Dm6R8rr1.js} +1 -1
  156. package/dist/client/assets/{require-capability-BMInjTpq.js → require-capability-DQJ7411V.js} +1 -1
  157. package/dist/client/assets/{required-auth-layout-D1yWxUhZ.js → required-auth-layout-YsYr38eN.js} +1 -1
  158. package/dist/client/assets/{reset-password-DNNEbFuR.js → reset-password-BhAfZXCe.js} +1 -1
  159. package/dist/client/assets/{review-settings-CmCAUMRs.js → review-settings-j2RX7TKZ.js} +1 -1
  160. package/dist/client/assets/{roles-D2xRYUv0.js → roles-SMLYunvV.js} +1 -1
  161. package/dist/client/assets/{scroll-area-B4T29_7m.js → scroll-area-BaCu9Erq.js} +1 -1
  162. package/dist/client/assets/{search-input-Cs87u1XL.js → search-input-B_d2onV1.js} +1 -1
  163. package/dist/client/assets/{secrets-B-ggfMua.js → secrets--tEhMEdB.js} +1 -1
  164. package/dist/client/assets/{sections-editor-BZXQsXK6.js → sections-editor-Q4Hskisl.js} +1 -1
  165. package/dist/client/assets/{select-BY51Huw5.js → select-KvNOZN66.js} +1 -1
  166. package/dist/client/assets/{select-model-BzQbpsB5.js → select-model-DrSe295o.js} +1 -1
  167. package/dist/client/assets/{self-tool-result-CEMUyQFk.js → self-tool-result-D3Lb6Jbg.js} +1 -1
  168. package/dist/client/assets/{seo-editor-X38ED2ap.js → seo-editor-BqS1IWQX.js} +1 -1
  169. package/dist/client/assets/{settings-layout-CG0_SslF.js → settings-layout-BfrOqoIG.js} +1 -1
  170. package/dist/client/assets/{shell-controls-D5GbCcfG.js → shell-controls-DQe6F9nz.js} +1 -1
  171. package/dist/client/assets/{shell-layout-4pJEKgjG.js → shell-layout-DGXTmLep.js} +1 -1
  172. package/dist/client/assets/{spinner-BaYSIBAI.js → spinner-CLUjBH1z.js} +1 -1
  173. package/dist/client/assets/{sso-x3mSKdeE.js → sso-T750OslB.js} +1 -1
  174. package/dist/client/assets/{store-pp1mNlyT.js → store-CGcLokDp.js} +1 -1
  175. package/dist/client/assets/store-registry-CgBS4zc9.js +2 -0
  176. package/dist/client/assets/{super-agent-icon-ChHyJxMq.js → super-agent-icon-OEcl78rY.js} +1 -1
  177. package/dist/client/assets/{switch-CL_wNuTg.js → switch-D_XAP-VR.js} +1 -1
  178. package/dist/client/assets/{synced-repos-CNbFWEV0.js → synced-repos-DEcRdtsc.js} +1 -1
  179. package/dist/client/assets/{tab-id-BJhTpcjb.js → tab-id-Ksgtpkhm.js} +1 -1
  180. package/dist/client/assets/{table-Ch68zFSa.js → table-ebymWD54.js} +1 -1
  181. package/dist/client/assets/{tabs-C_f6Viy6.js → tabs-J6t-1xy5.js} +1 -1
  182. package/dist/client/assets/{task-board-DJY41XW8.js → task-board-YhYj0m6c.js} +1 -1
  183. package/dist/client/assets/{task-filters-CM9aziD7.js → task-filters-a--jprJW.js} +1 -1
  184. package/dist/client/assets/{tasks-qIzDm87v.js → tasks-DUnpKYSO.js} +1 -1
  185. package/dist/client/assets/{textarea-CtFZfz7M.js → textarea-CnYvlpOR.js} +1 -1
  186. package/dist/client/assets/{toggle-group-CGVC-CKF.js → toggle-group-CW6PwHGb.js} +1 -1
  187. package/dist/client/assets/{toolbar-BuFg3wIL.js → toolbar-BFVDxa1z.js} +1 -1
  188. package/dist/client/assets/{track-B8lap1At.js → track-1dgUcOI_.js} +1 -1
  189. package/dist/client/assets/{types-DoWTNUch.js → types-BCm_iyZj.js} +1 -1
  190. package/dist/client/assets/{use-ai-providers-X5gQ6Frj.js → use-ai-providers-BrJYoUgs.js} +1 -1
  191. package/dist/client/assets/{use-api-keys-FrDLuz54.js → use-api-keys-BgHiSrv9.js} +1 -1
  192. package/dist/client/assets/{use-automations-C3qK2rmP.js → use-automations-gY7mK1L9.js} +1 -1
  193. package/dist/client/assets/{use-autosave-D0w2JlYV.js → use-autosave-CufMOJRo.js} +1 -1
  194. package/dist/client/assets/{use-commerce-diagnostic-E_UCqtaW.js → use-commerce-diagnostic-D5GsPjzv.js} +1 -1
  195. package/dist/client/assets/{use-connection-QgnscFuw.js → use-connection-BiFW_cHg.js} +1 -1
  196. package/dist/client/assets/{use-copy-D9URxb5f.js → use-copy-CdoVt82M.js} +1 -1
  197. package/dist/client/assets/{use-create-virtual-mcp-DiYvnCBd.js → use-create-virtual-mcp-BjEls0y2.js} +1 -1
  198. package/dist/client/assets/{use-debounced-autosave-BGhJv3cs.js → use-debounced-autosave--3PwEBvC.js} +1 -1
  199. package/dist/client/assets/{use-debounced-value-C3rowxeM.js → use-debounced-value-jIkPbsOp.js} +1 -1
  200. package/dist/client/assets/{use-decopilot-events-CU_83DHk.js → use-decopilot-events-CapdWR8Q.js} +1 -1
  201. package/dist/client/assets/{use-delete-connection-C1KY0rKH.js → use-delete-connection-DvjMa9k1.js} +1 -1
  202. package/dist/client/assets/{use-deployment-admin-CwbH87x9.js → use-deployment-admin-eZlkTqNx.js} +1 -1
  203. package/dist/client/assets/{use-file-configs-Ox49dnE1.js → use-file-configs-ndjlQHxI.js} +1 -1
  204. package/dist/client/assets/{use-infinite-scroll-DC-w6br5.js → use-infinite-scroll-B9qolsch.js} +1 -1
  205. package/dist/client/assets/{use-join-requests-ZsGlaroJ.js → use-join-requests-UHLAp14h.js} +1 -1
  206. package/dist/client/assets/{use-mcp-auth-status-BuxyzgKj.js → use-mcp-auth-status-BZAPRmOL.js} +1 -1
  207. package/dist/client/assets/{use-mcp-client-BNj8WwX8.js → use-mcp-client-41m5xvE3.js} +1 -1
  208. package/dist/client/assets/{use-mcp-tools-6tuJyt0H.js → use-mcp-tools-uQ6_5oAd.js} +1 -1
  209. package/dist/client/assets/{use-members-Bg_K3VT6.js → use-members-CDcE1HPu.js} +1 -1
  210. package/dist/client/assets/{use-navigate-to-agent-DT_1GDH5.js → use-navigate-to-agent-P1K0kc_y.js} +1 -1
  211. package/dist/client/assets/{use-org-auth-client-YSRXYZJk.js → use-org-auth-client-ChuKLXBf.js} +1 -1
  212. package/dist/client/assets/{use-org-repo-syncs-hB2RbIfF.js → use-org-repo-syncs-BSB4bUfY.js} +1 -1
  213. package/dist/client/assets/{use-org-sso-CRtwFqcf.js → use-org-sso-MHfzksKB.js} +1 -1
  214. package/dist/client/assets/{use-organization-roles-DNf6aAuP.js → use-organization-roles-DjbjXB_I.js} +1 -1
  215. package/dist/client/assets/{use-organization-settings-D_NMX4QF.js → use-organization-settings-DQqbGH5p.js} +1 -1
  216. package/dist/client/assets/{use-registry-connections-BlS_T8ii.js → use-registry-connections-CoPbabB-.js} +1 -1
  217. package/dist/client/assets/{use-secrets-DF0Rg5Ke.js → use-secrets-CUaQOZAO.js} +1 -1
  218. package/dist/client/assets/{use-section-preview-base-Qgv1PNdK.js → use-section-preview-base-BMwP9IX7.js} +1 -1
  219. package/dist/client/assets/{use-status-sounds-DZu3oH6T.js → use-status-sounds-B7xb8CcA.js} +1 -1
  220. package/dist/client/assets/{use-tags-NRFc9Kma.js → use-tags-BEPQVwa6.js} +1 -1
  221. package/dist/client/assets/{use-view-mode-6EqQcurT.js → use-view-mode-BLuUt2zI.js} +1 -1
  222. package/dist/client/assets/{use-virtual-mcp-ClsybENf.js → use-virtual-mcp-CCV4A6AF.js} +1 -1
  223. package/dist/client/assets/useInfiniteQuery-C1ZiiXDY.js +1 -0
  224. package/dist/client/assets/useSuspenseInfiniteQuery-F9QpXYtm.js +1 -0
  225. package/dist/client/assets/{users-BSDqATBn.js → users-Da7f2Dpx.js} +1 -1
  226. package/dist/client/assets/{variant-calendar-DFnlHYZD.js → variant-calendar-B36Wo9EG.js} +1 -1
  227. package/dist/client/assets/{view-mode-toggle-CPKFOFja.js → view-mode-toggle-B6ucBwrs.js} +1 -1
  228. package/dist/client/index.html +2 -2
  229. package/dist/server/cli.js +242 -242
  230. package/dist/server/server.js +230 -230
  231. package/package.json +1 -1
  232. package/dist/client/assets/index-Phl0yjiP.css +0 -1
  233. package/dist/client/assets/index-REjt-P-r.js +0 -1
  234. package/dist/client/assets/index-Y_1Y556f.js +0 -744
  235. package/dist/client/assets/record-editor-DtcqJs15.js +0 -1
  236. package/dist/client/assets/redirect-editor-CHSAyTcV.js +0 -1
  237. package/dist/client/assets/registry-TR-vIGxU.js +0 -2
  238. package/dist/client/assets/store-registry-DyRwz3yf.js +0 -2
  239. package/dist/client/assets/useInfiniteQuery-BSIOCSh6.js +0 -1
  240. package/dist/client/assets/useSuspenseInfiniteQuery-BkFkcqA-.js +0 -1
@@ -1 +1 @@
1
- import{c as Z,H as de,a as ye,p as me,r as H,aU as le,b as ee,j as t,k as X,e as ge,t as te,eQ as Ne,K as ne,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-DPGUtnwt.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-BPAi9RC3.js";import{C as Te}from"./collection-search-CmlhAF0q.js";import{u as _e}from"./use-debounced-value-C3rowxeM.js";import{b as he,u as Ee}from"./use-connection-QgnscFuw.js";import{u as se}from"./use-mcp-client-BNj8WwX8.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-PAJ6c4DM.js";import{i as ue}from"./ArrowLeft-RTJfGYqO.js";import{n as ze}from"./LinkExternal01-CYW5qBle.js";import{n as Le}from"./LockUnlocked01-Camlq0iF.js";import{u as Ge}from"./use-mcp-tools-6tuJyt0H.js";import{e as Oe}from"./extract-connection-data-Bdjb5ZXD.js";import{c as Fe}from"./use-navigate-to-agent-DT_1GDH5.js";import{G as $}from"./github-icon-DHRjGJq9.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ae.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=se(c);let n;i[6]!==C?(n={name:C},i[6]=C,i[7]=n):n=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==n||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:$e},i[8]=o,i[9]=n,i[10]=u,i[11]=k):k=i[11],Ge(k)}function $e(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Qe(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=H.useState("idle"),[o,n]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),n(null);const l=Oe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){n(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),n(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function ft(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,n=ee();let u;e[0]!==o||e[1]!==n||e[2]!==y?(u=y??n(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=n,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx($,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Ie,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),n=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Qe({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=se({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=se({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(s,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(s,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:T}}}}),le(n,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async s=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:s,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:s,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!s||!I){if(le(n,o.id),Ne(n,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(n.setQueryData(ne.collectionItem(p,o.id,"","VIRTUAL_MCP",s),{item:I}),le(n,o.id),j(s,b),y){y({virtualMcpId:s,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(s)},onError:(s,b)=>{console.error("GitHub import failed:",s);const N=s instanceof Error?s.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:c("common.githubRepoPicker.selectConnection")})}),f.map(s=>t.jsxs("button",{type:"button",onClick:()=>v(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx($,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?i?t.jsx(Ke,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,n=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=se(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=ne.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>He(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ve(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const D=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx($,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:D,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const s=l.data;if(!s)return null;if(s.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==n?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let D;e[58]!==n?(D=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=D):D=e[59];let L;e[60]!==D?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:D}),e[60]=D,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let M;e[69]!==U?(M=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=M):M=e[70];let Q;e[71]!==l?(Q=()=>{l.refetch()},e[71]=l,e[72]=Q):Q=e[72];const je=l.isFetching;let q;e[73]!==l.isFetching?(q=l.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[73]=l.isFetching,e[74]=q):q=e[74];let B;e[75]!==n?(B=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=B):B=e[76];let V;e[77]!==l.isFetching||e[78]!==Q||e[79]!==q||e[80]!==B?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,B]}),e[77]=l.isFetching,e[78]=Q,e[79]=q,e[80]=B,e[81]=V):V=e[81];let K;e[82]!==M||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[M,V]}),e[82]=M,e[83]=V,e[84]=K):K=e[84];let J;e[85]!==n?(J=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=J):J=e[86];let W;e[87]!==J?(W=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:J}),e[87]=J,e[88]=W):W=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==K||e[93]!==W?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,K,W]}),e[89]=z,e[90]=L,e[91]=O,e[92]=K,e[93]=W,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==n?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=n,e[101]=b):b=e[101];let N;if(e[102]!==s.installations||e[103]!==r||e[104]!==n){let h;e[106]!==r||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=n,e[108]=h):h=e[108],N=s.installations.map(h),e[102]=s.installations,e[103]=r,e[104]=n,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==n?(T=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=T):T=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==b?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,n=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(H.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let s;return e[20]!==m||e[21]!==x?(s=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=s):s=e[22],s}function Je(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:n}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=se(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=ne.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:s}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=Ce(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let s;e[17]!==x?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=s):s=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==s||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[s,b]}),e[22]=s,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==n||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==n||e[31]!==o||e[32]!==u?(x=s=>t.jsxs("button",{type:"button",onClick:()=>o(s),disabled:n,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx($,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),s.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),s.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},s.fullName),e[30]=n,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=n,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx($,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==r?(F=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=F):F=e[14];let h;e[15]!==y||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=y,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let s;e[45]!==l||e[46]!==j?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=s):s=e[47];let b;return e[48]!==s||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,s]}),e[48]=s,e[49]=f,e[50]=b):b=e[50],b}export{ft as G,Qe as a,De as u};
1
+ import{c as Z,H as de,a as ye,p as me,r as H,aU as le,b as ee,j as t,k as X,e as ge,t as te,eQ as Ne,K as ne,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-BDQwfrOa.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-Dr0JFHjN.js";import{C as Te}from"./collection-search-CNiN7_WJ.js";import{u as _e}from"./use-debounced-value-jIkPbsOp.js";import{b as he,u as Ee}from"./use-connection-BiFW_cHg.js";import{u as se}from"./use-mcp-client-41m5xvE3.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-ByMzEyLt.js";import{i as ue}from"./ArrowLeft-DvpAv4zp.js";import{n as ze}from"./LinkExternal01-CgEKyQta.js";import{n as Le}from"./LockUnlocked01-DiK5Iz2C.js";import{u as Ge}from"./use-mcp-tools-uQ6_5oAd.js";import{e as Oe}from"./extract-connection-data-DRoFrfak.js";import{c as Fe}from"./use-navigate-to-agent-P1K0kc_y.js";import{G as $}from"./github-icon-C4ja-GnH.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ae.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=se(c);let n;i[6]!==C?(n={name:C},i[6]=C,i[7]=n):n=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==n||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:$e},i[8]=o,i[9]=n,i[10]=u,i[11]=k):k=i[11],Ge(k)}function $e(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Qe(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=H.useState("idle"),[o,n]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),n(null);const l=Oe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){n(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),n(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function ft(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,n=ee();let u;e[0]!==o||e[1]!==n||e[2]!==y?(u=y??n(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=n,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx($,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Ie,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),n=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Qe({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=se({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=se({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(s,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(s,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:T}}}}),le(n,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async s=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:s,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:s,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!s||!I){if(le(n,o.id),Ne(n,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(n.setQueryData(ne.collectionItem(p,o.id,"","VIRTUAL_MCP",s),{item:I}),le(n,o.id),j(s,b),y){y({virtualMcpId:s,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(s)},onError:(s,b)=>{console.error("GitHub import failed:",s);const N=s instanceof Error?s.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:c("common.githubRepoPicker.selectConnection")})}),f.map(s=>t.jsxs("button",{type:"button",onClick:()=>v(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx($,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?i?t.jsx(Ke,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,n=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=se(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=ne.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>He(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ve(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const D=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx($,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:D,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const s=l.data;if(!s)return null;if(s.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==n?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let D;e[58]!==n?(D=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=D):D=e[59];let L;e[60]!==D?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:D}),e[60]=D,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let M;e[69]!==U?(M=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=M):M=e[70];let Q;e[71]!==l?(Q=()=>{l.refetch()},e[71]=l,e[72]=Q):Q=e[72];const je=l.isFetching;let q;e[73]!==l.isFetching?(q=l.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[73]=l.isFetching,e[74]=q):q=e[74];let B;e[75]!==n?(B=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=B):B=e[76];let V;e[77]!==l.isFetching||e[78]!==Q||e[79]!==q||e[80]!==B?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,B]}),e[77]=l.isFetching,e[78]=Q,e[79]=q,e[80]=B,e[81]=V):V=e[81];let K;e[82]!==M||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[M,V]}),e[82]=M,e[83]=V,e[84]=K):K=e[84];let J;e[85]!==n?(J=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=J):J=e[86];let W;e[87]!==J?(W=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:J}),e[87]=J,e[88]=W):W=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==K||e[93]!==W?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,K,W]}),e[89]=z,e[90]=L,e[91]=O,e[92]=K,e[93]=W,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==n?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=n,e[101]=b):b=e[101];let N;if(e[102]!==s.installations||e[103]!==r||e[104]!==n){let h;e[106]!==r||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=n,e[108]=h):h=e[108],N=s.installations.map(h),e[102]=s.installations,e[103]=r,e[104]=n,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==n?(T=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=T):T=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==b?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,n=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(H.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let s;return e[20]!==m||e[21]!==x?(s=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=s):s=e[22],s}function Je(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:n}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=se(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=ne.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:s}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=Ce(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let s;e[17]!==x?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=s):s=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==s||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[s,b]}),e[22]=s,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==n||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==n||e[31]!==o||e[32]!==u?(x=s=>t.jsxs("button",{type:"button",onClick:()=>o(s),disabled:n,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx($,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),s.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),s.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},s.fullName),e[30]=n,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=n,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx($,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==r?(F=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=F):F=e[14];let h;e[15]!==y||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=y,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let s;e[45]!==l||e[46]!==j?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=s):s=e[47];let b;return e[48]!==s||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,s]}),e[48]=s,e[49]=f,e[50]=b):b=e[50],b}export{ft as G,Qe as a,De as u};
@@ -1,4 +1,4 @@
1
- import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-DPGUtnwt.js";import{u as Nt}from"./use-mcp-client-BNj8WwX8.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-D4oSA7X3.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
1
+ import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-BDQwfrOa.js";import{u as Nt}from"./use-mcp-client-41m5xvE3.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-DPRBorRx.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r