decocms 4.114.2 → 4.115.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/client/assets/{AlertCircle-CipHnxQG.js → AlertCircle-CPi3N7pa.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CiA5UwW6.js → AreaChart-BDD1pOKw.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-BfCCEiXw.js → ArrowRight-UoO_htto.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Dd8qHOWw.js → ArrowUp-DVWcfTPl.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-C-bgMDQB.js → ArrowUpRight-DvRn4D26.js} +1 -1
  6. package/dist/client/assets/{Check-Bi6FHyg2.js → Check-CUU6x4Pg.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DLD6HZU6.js → CheckCircle-YH42m3Mz.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-MDTOxnPa.js → ChevronDown-C4mQa8_C.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-lPXWWp6Z.js → ChevronRight-DJGqq3yK.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DChualVF.js → ChevronUp-Um8OScqZ.js} +1 -1
  11. package/dist/client/assets/{Copy01-BxOJ450o.js → Copy01-BhI2f81T.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BifNoV_O.js → DotsVertical-BOe_763p.js} +1 -1
  13. package/dist/client/assets/{Eye-BX-_3Qvq.js → Eye-wSNRRH_b.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BY9ubnj_.js → FilterLines-CQgUwot9.js} +1 -1
  15. package/dist/client/assets/{Globe01-D9v9L7Wf.js → Globe01-BM6uUIqK.js} +1 -1
  16. package/dist/client/assets/{Globe04-sniANDmM.js → Globe04-BBwyMdkD.js} +1 -1
  17. package/dist/client/assets/{HardDrive-BIzKhiBj.js → HardDrive-BFC9wU0S.js} +1 -1
  18. package/dist/client/assets/{Image01-CNrE4Upv.js → Image01-BOrAOfff.js} +1 -1
  19. package/dist/client/assets/{Key01-4Mmkv7Z9.js → Key01-B0TDf7aH.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-mvQWrT-n.js → LayoutLeft-b_U4NE5x.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-dBRpR0f2.js → LinkExternal01-DruIIGwr.js} +1 -1
  22. package/dist/client/assets/{LogOut01-D1uyHe1T.js → LogOut01-BOeCqlE_.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Dc9oQ8Df.js → Monitor01-D09G6X-l.js} +1 -1
  24. package/dist/client/assets/{Package-B6y3yaMV.js → Package-5OWeLBp-.js} +1 -1
  25. package/dist/client/assets/{Palette-Cu6r_43s.js → Palette-2GHgQBzC.js} +1 -1
  26. package/dist/client/assets/{Play-Cm41TWaa.js → Play-DAgkAVxh.js} +1 -1
  27. package/dist/client/assets/{Plus-DXLUIBC3.js → Plus-BCUavDPs.js} +1 -1
  28. package/dist/client/assets/{SearchLg-uphfq5IV.js → SearchLg-jqyCXgh3.js} +1 -1
  29. package/dist/client/assets/{SearchMd-diGuIZrR.js → SearchMd-BExZv_-l.js} +1 -1
  30. package/dist/client/assets/{Settings02-BTBQNRAw.js → Settings02-DSsFpJ-f.js} +1 -1
  31. package/dist/client/assets/{Shield01-B9HU-EdC.js → Shield01-DY7x3aC8.js} +1 -1
  32. package/dist/client/assets/{Star01-BVN-I5j_.js → Star01-CrlJSf4a.js} +1 -1
  33. package/dist/client/assets/{Stars01-DQT3b-Y9.js → Stars01-DwU8C-9i.js} +1 -1
  34. package/dist/client/assets/{Stars02-BgQDE-p_.js → Stars02-CXOHu2mW.js} +1 -1
  35. package/dist/client/assets/{Sun-WdZ_ti4D.js → Sun-CkBa4Upo.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-Dh8f5ex4.js → SwitchHorizontal01-DI2SmeRf.js} +1 -1
  37. package/dist/client/assets/{Tool01-CHhZSdz6.js → Tool01-BoZ3l_kJ.js} +1 -1
  38. package/dist/client/assets/{Tool02-C1lPBHHA.js → Tool02-BiJ5Pq7p.js} +1 -1
  39. package/dist/client/assets/{Trash01-DmogTFVy.js → Trash01-B5Hc0LiC.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-_ZdutTHE.js → TrendUp01-Bw4djtnK.js} +1 -1
  41. package/dist/client/assets/{Upload01-gBE_dEpz.js → Upload01-DlxMvv63.js} +1 -1
  42. package/dist/client/assets/{User01-ClWjUGBk.js → User01-XNJOBvnw.js} +1 -1
  43. package/dist/client/assets/{Users01-j_336Q2L.js → Users01-BJfK-12H.js} +1 -1
  44. package/dist/client/assets/{Users03-DuG5rYDe.js → Users03-C6rx6pS7.js} +1 -1
  45. package/dist/client/assets/{X-BOp8gH-p.js → X-BguiaTPZ.js} +1 -1
  46. package/dist/client/assets/{XCircle-DKEw1PFY.js → XCircle-oK-7R4q-.js} +1 -1
  47. package/dist/client/assets/{XClose-2UkR5Pc_.js → XClose-D299BTc_.js} +1 -1
  48. package/dist/client/assets/{Zap-BMWIvUqh.js → Zap-DLUtSnwc.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-1KwaGYcc.js → ZapSquare-gJYZl-fj.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-344erUf9.js → ZoomOut-CoDI3ZhZ.js} +1 -1
  51. package/dist/client/assets/{access-gate-BmXDFrjl.js → access-gate-C5KlK1b-.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-BMeUm1wQ.js → add-section-modal-BPQ-Y3Mw.js} +1 -1
  53. package/dist/client/assets/{agent-icon-XnWAychf.js → agent-icon-Cw51a4Wd.js} +1 -1
  54. package/dist/client/assets/{agents-list-DQclQZWD.js → agents-list-BXCg3Gfc.js} +1 -1
  55. package/dist/client/assets/{ai-providers-BJje2FGB.js → ai-providers-H4WcWnJV.js} +1 -1
  56. package/dist/client/assets/{alert-w50jcc8_.js → alert-B0R2yShA.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-BXwzf-H3.js → alert-dialog-D4myzfEj.js} +1 -1
  58. package/dist/client/assets/{app-editor-Ck3kgQYz.js → app-editor-DybZ61aG.js} +1 -1
  59. package/dist/client/assets/{auth-DSNKOuKd.js → auth-CvqbEBx3.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-BbzgQHZX.js → auth-catchall-BlucYUYY.js} +1 -1
  61. package/dist/client/assets/{auth-entry-DbKIy4Vz.js → auth-entry-DZVQy62Q.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-C5JXou4p.js → auth-split-layout-hs9qXUvd.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-7Xbi0BUL.js → authenticate-and-persist-oauth-IkJ6ZdHi.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-CK3af_hY.js → automation-list-row-CaWop0Wq.js} +1 -1
  65. package/dist/client/assets/{automation-runs-wsjfHpgY.js → automation-runs-ClF4a2Ok.js} +9 -9
  66. package/dist/client/assets/{automations-DOK3c22x.js → automations-X2i_0TrU.js} +1 -1
  67. package/dist/client/assets/{autosend-PQHJ35gl.js → autosend-D2xUEjhC.js} +1 -1
  68. package/dist/client/assets/{avatar-DQ8zWH2j.js → avatar-XaRsthKI.js} +1 -1
  69. package/dist/client/assets/{badge-BoNQRXIs.js → badge-DPTF-wKi.js} +1 -1
  70. package/dist/client/assets/{block-document-BLECqD0-.js → block-document-C7dtSwQc.js} +1 -1
  71. package/dist/client/assets/{brand-context-o2UlRIEy.js → brand-context-Bnj1FmoQ.js} +1 -1
  72. package/dist/client/assets/{buckets-B7fCVJfh.js → buckets-DdMZQEkA.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-DSGHw1IT.js → bulk-category-panel-AQ2eIm3L.js} +1 -1
  74. package/dist/client/assets/{calendar-CnaBJZWH.js → calendar-Bg7_RUR4.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-BTXrFzJR.js → capability-load-error-DpQaU6qf.js} +1 -1
  76. package/dist/client/assets/{card-DpuVySlk.js → card-B-ovK44h.js} +1 -1
  77. package/dist/client/assets/{category-editor-D9KEs8WC.js → category-editor-4LnulWdY.js} +1 -1
  78. package/dist/client/assets/{chat-context-CnIEE4i4.js → chat-context-CIPTEVfg.js} +1 -1
  79. package/dist/client/assets/{checkbox-DJKbictO.js → checkbox-Ca_3gOJh.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-BOmFxlxM.js → cli-auth-success-D14ajzty.js} +1 -1
  81. package/dist/client/assets/{collection-detail-C6LNVCd0.js → collection-detail-BwVxwhOR.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-Dj1CkEP_.js → collection-display-button-oaw0e0-6.js} +1 -1
  83. package/dist/client/assets/{collection-search-C-44JBJr.js → collection-search-Ety0R6a_.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-BxyHCv1f.js → collection-table-wrapper-ClRQY5nA.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-CTfYEPX-.js → collection-tabs-Cfl4NJMK.js} +1 -1
  86. package/dist/client/assets/{command-CGW5sjzB.js → command-BrxZC45e.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-N7RQi-bx.js → commerce-onboarding-CAum8FZO.js} +1 -1
  88. package/dist/client/assets/{companions-core-C8ADabtd.js → companions-core-D1vEH6r4.js} +1 -1
  89. package/dist/client/assets/{connect-DQI807Hj.js → connect-DjFDMaxN.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-DG3UDWuY.js → connect-desktop-dialog-grYv_YKZ.js} +1 -1
  91. package/dist/client/assets/{connection-card-tS_-IMEL.js → connection-card-Ds0duVAZ.js} +1 -1
  92. package/dist/client/assets/{connection-detail-DAtJi3BN.js → connection-detail-O7MnYINZ.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-DpNJ_Ssa.js → connection-form-helpers-BiSBQcRM.js} +1 -1
  94. package/dist/client/assets/{connections-BhsuGDPP.js → connections-B5YPA-bi.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-DNZ4pxqN.js → decopilot-sse-pool-DdaXjmI1.js} +1 -1
  96. package/dist/client/assets/{dialog-CBEhCYac.js → dialog-BV0NI63u.js} +1 -1
  97. package/dist/client/assets/{domain-settings-DAV7oxgy.js → domain-settings-CSetybbP.js} +1 -1
  98. package/dist/client/assets/{drawer-D1dVZTud.js → drawer-DZmyh29S.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-DyYXzcv-.js → dropdown-menu-Cmsfzhn9.js} +1 -1
  100. package/dist/client/assets/{empty-state-BKdsG99F.js → empty-state-CeghgAqf.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-RXmfvFPo.js → extract-connection-data-D42gozmu.js} +1 -1
  102. package/dist/client/assets/{file-explorer-1GZ6szRe.js → file-explorer-wFTFd2PU.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-CbVNz9hF.js → file-type-icon-C0wbwED2.js} +1 -1
  104. package/dist/client/assets/{files-CrY0eVKN.js → files-BXEj50cD.js} +1 -1
  105. package/dist/client/assets/{form-DN66NEfH.js → form-BmCm64Py.js} +1 -1
  106. package/dist/client/assets/{general-CKe5t2vq.js → general-DqEBdSTp.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-Br8fWlUk.js → github-repo-picker-eUXBcKyO.js} +1 -1
  108. package/dist/client/assets/{hooks-DTyZm8TI.js → hooks-ctUqH-63.js} +1 -1
  109. package/dist/client/assets/{index-DXmv3pxp.js → index-B82moHru.js} +5 -5
  110. package/dist/client/assets/{index-BRUk2IG4.js → index-C8H8ZfjH.js} +1 -1
  111. package/dist/client/assets/{index-BhBWDduO.js → index-CNEwA1cH.js} +1 -1
  112. package/dist/client/assets/{index-B8y76arp.js → index-CkiO_TUo.js} +1 -1
  113. package/dist/client/assets/{index-BPELucDi.js → index-Cl6y4imy.js} +3 -3
  114. package/dist/client/assets/{index-BWkYFeZI.js → index-CpYmn4W2.js} +1 -1
  115. package/dist/client/assets/{index-DzFeAmih.js → index-CzbXi8Zw.js} +4 -4
  116. package/dist/client/assets/{index-DAzLegNU.js → index-D8OujxC_.js} +1 -1
  117. package/dist/client/assets/{index-C7GZ96ua.js → index-DOKd2FHU.js} +1 -1
  118. package/dist/client/assets/{index-DtQLpmdp.js → index-QO34cjUr.js} +1 -1
  119. package/dist/client/assets/{index-Bsl8wts7.js → index-n1dZRqhQ.js} +1 -1
  120. package/dist/client/assets/{index-CJTS4CkY.js → index-n9c1oQKW.js} +1 -1
  121. package/dist/client/assets/{index-redirect-BIj3Aayr.js → index-redirect-a1K8DkaZ.js} +1 -1
  122. package/dist/client/assets/{index-BDXkZlbW.js → index-ujtveQDg.js} +1 -1
  123. package/dist/client/assets/{input-DQ4Rrh5G.js → input-Bp-b5oR_.js} +1 -1
  124. package/dist/client/assets/{integration-icon-CAGigShi.js → integration-icon-BikUNVPK.js} +1 -1
  125. package/dist/client/assets/{invite-member-dialog-DBkhfG9n.js → invite-member-dialog-2tvt2eca.js} +1 -1
  126. package/dist/client/assets/{label-DWAEIp3m.js → label-CbH_R1Dq.js} +1 -1
  127. package/dist/client/assets/{layout-DHcYOqWf.js → layout-BIsWut3Z.js} +1 -1
  128. package/dist/client/assets/{login-BVaxWZfC.js → login-C8IdodW0.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-D7xl0855.js → mcp-oauth-N8OU8oSC.js} +1 -1
  130. package/dist/client/assets/{members-CnH7akr0.js → members-QWu_h3Lr.js} +1 -1
  131. package/dist/client/assets/{monaco-editor-BXfB4eXd.js → monaco-editor-UlYG-Jnx.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-DvvHNMme.js → monitoring-stats-row-0Tt9pQ9s.js} +1 -1
  133. package/dist/client/assets/{multi-select-Cl83sTYs.js → multi-select-CApx5_Kj.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-DFXmYbaS.js → oauth-callback-DdELSeAi.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-C95ShHrT.js → oauth-callback-ai-provider-C9IvLwCd.js} +1 -1
  136. package/dist/client/assets/{onboarding-BJbgomMp.js → onboarding-DX-hCZUO.js} +1 -1
  137. package/dist/client/assets/{org-install-D6cNhDM1.js → org-install-DEr66pqw.js} +1 -1
  138. package/dist/client/assets/{org-layout-C8RE_ou4.js → org-layout-CmjaWhn6.js} +1 -1
  139. package/dist/client/assets/{organization-choice-KmbrIwAS.js → organization-choice-Dwt3JIPx.js} +1 -1
  140. package/dist/client/assets/{orgs-qxhCmTlY.js → orgs-CDNIGf9k.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-Bo17wZh5.js → page-seo-form-CaZc-5EY.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-6ZhS3EYs.js +1 -0
  143. package/dist/client/assets/{popover-CB_z6NVK.js → popover-kCpNzTr7.js} +1 -1
  144. package/dist/client/assets/{post-editor--sPRtcMi.js → post-editor-BhKlztwy.js} +1 -1
  145. package/dist/client/assets/{primitives-QQ52JVsZ.js → primitives-DgFw4URK.js} +1 -1
  146. package/dist/client/assets/{profile-BnLWLj3k.js → profile-DNSvv8U6.js} +1 -1
  147. package/dist/client/assets/project-app-view-CAy2x_wM.js +1 -0
  148. package/dist/client/assets/record-editor-BqaZ5apo.js +1 -0
  149. package/dist/client/assets/redirect-editor-Cs_S-gwF.js +1 -0
  150. package/dist/client/assets/registry-CdMDop8o.js +2 -0
  151. package/dist/client/assets/{registry-layout-DEslQFGz.js → registry-layout-BE4NRxc6.js} +1 -1
  152. package/dist/client/assets/{reports-DIb1yjkA.js → reports-DZRXGTjy.js} +1 -1
  153. package/dist/client/assets/{require-capability-BbItz-r9.js → require-capability-Darrxtvr.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-Cv-KlH_2.js → required-auth-layout-CPbUokgR.js} +1 -1
  155. package/dist/client/assets/{reset-password-tEWHXw0y.js → reset-password-CTP15dk4.js} +1 -1
  156. package/dist/client/assets/{roles-DYLXGfDt.js → roles-Cpz02nJf.js} +1 -1
  157. package/dist/client/assets/{search-input-JRbNVWET.js → search-input-b5c86fBz.js} +1 -1
  158. package/dist/client/assets/{secrets-eEdQFL0T.js → secrets-CbsqcbYV.js} +1 -1
  159. package/dist/client/assets/{sections-editor-EaBGxll4.js → sections-editor-D4UwOAKF.js} +1 -1
  160. package/dist/client/assets/{select-Cmnst8wM.js → select-DCdQolmz.js} +1 -1
  161. package/dist/client/assets/{select-model-Da8gBZaG.js → select-model-WkLweew8.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-CkmiUaU8.js → self-tool-result-Deqb0_O4.js} +1 -1
  163. package/dist/client/assets/{seo-editor-BiYJVDgm.js → seo-editor-D6v1g7RW.js} +1 -1
  164. package/dist/client/assets/{settings-layout-BixCu9v3.js → settings-layout-OU4ChI9b.js} +1 -1
  165. package/dist/client/assets/{settings-section-MtpFaw76.js → settings-section-YA5IegES.js} +1 -1
  166. package/dist/client/assets/{shell-controls-gLORp326.js → shell-controls-Ch0wn4Oc.js} +1 -1
  167. package/dist/client/assets/{shell-layout-CnNDsQbe.js → shell-layout-0EoX__iD.js} +1 -1
  168. package/dist/client/assets/{sidebar-C0n_mIde.js → sidebar-BEaUj8qU.js} +1 -1
  169. package/dist/client/assets/{skeleton-D8Za6_Z-.js → skeleton-B9xtgqUU.js} +1 -1
  170. package/dist/client/assets/{sso-CIvgbGDf.js → sso-Q0iKHIKa.js} +1 -1
  171. package/dist/client/assets/{store-BVmMJvQ_.js → store-B4egTj4S.js} +1 -1
  172. package/dist/client/assets/store-registry-BHVKzY44.js +2 -0
  173. package/dist/client/assets/{studio-tools-BCCpujL-.js → studio-tools-ZwaipbPk.js} +1 -1
  174. package/dist/client/assets/{switch-BZCPahy0.js → switch-BWNOrTb9.js} +1 -1
  175. package/dist/client/assets/{table-CGZfBUae.js → table-BmO4Z7Hy.js} +1 -1
  176. package/dist/client/assets/{tabs-kN2Aee2Y.js → tabs-s5sGoI6z.js} +1 -1
  177. package/dist/client/assets/{textarea-DaFOehSQ.js → textarea-DtnL4UXx.js} +1 -1
  178. package/dist/client/assets/{toggle-group-CQFgTXRh.js → toggle-group-KCoX7Pj1.js} +1 -1
  179. package/dist/client/assets/{toolbar-B7dAXzys.js → toolbar-CWeCwmEK.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-C3PRe1bn.js → toolbar-icon-button-BJfS1QoL.js} +1 -1
  181. package/dist/client/assets/{tooltip-kyZcGWQK.js → tooltip-CuAEyPad.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-akLo6hIS.js → use-ai-providers-VWTzUhPE.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-B-Jd0rrl.js → use-api-keys-4hCxu0oR.js} +1 -1
  184. package/dist/client/assets/{use-automations-CFVgKjkB.js → use-automations-CQMUzL5S.js} +1 -1
  185. package/dist/client/assets/{use-autosave-BjvCNXY6.js → use-autosave-eyv1rew-.js} +1 -1
  186. package/dist/client/assets/{use-capability-Yy6u36K4.js → use-capability-BHsBFErv.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-CvOYcwpT.js → use-clock-tick-BwNo2h-e.js} +1 -1
  188. package/dist/client/assets/{use-connection-C4iyQfk3.js → use-connection-B_Mq-hps.js} +1 -1
  189. package/dist/client/assets/{use-copy-D1BaMPjx.js → use-copy-BN_DRLVx.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-KiUFWO7n.js → use-create-virtual-mcp-aLJ9_ULR.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-BOH2Z4BN.js → use-debounced-autosave-BtFlLHBX.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-B2Uhj-R0.js → use-debounced-value-kbzXB7NC.js} +1 -1
  193. package/dist/client/assets/{use-deco-credits-DbGGZhBM.js → use-deco-credits-BVmDoi0l.js} +1 -1
  194. package/dist/client/assets/{use-decopilot-events-Db9Tv8zu.js → use-decopilot-events-E4pGmJuF.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-PLI7FplW.js → use-delete-connection-WbbLQ_kD.js} +1 -1
  196. package/dist/client/assets/{use-deployment-admin-ByryYfNV.js → use-deployment-admin-B-pi5vPe.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-CUbjQkc9.js → use-file-configs-BsINh5FW.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-CTz7i-wg.js → use-infinite-scroll-CMaJbGMq.js} +1 -1
  199. package/dist/client/assets/{use-join-requests-DwRElEH9.js → use-join-requests-yguDnWw6.js} +1 -1
  200. package/dist/client/assets/{use-mcp-auth-status-DycT4MlU.js → use-mcp-auth-status-C7wcL4df.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-BC0h-vMK.js → use-mcp-client-BNOr39vr.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-BDqpuMH6.js → use-mcp-tools-DZYFUyMY.js} +1 -1
  203. package/dist/client/assets/{use-members-Dz8YymNg.js → use-members-DsXVo4sp.js} +1 -1
  204. package/dist/client/assets/{use-mobile-Cx1QZnAF.js → use-mobile-DsyeTCp3.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-5Vu6k7eJ.js → use-navigate-to-agent-C0_dzLMO.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-D6oBqfaK.js → use-org-auth-client-BkO0iab0.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-B6cnBAvZ.js → use-org-sso-CzauXVpI.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-ftXvQgtb.js → use-organization-roles-C8Qkylmq.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-LGdD6tyl.js → use-organization-settings-QvagJlDQ.js} +1 -1
  210. package/dist/client/assets/{use-registry-app-Bh31dq-2.js → use-registry-app-Dd1DTMyp.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-Bj9gUy0P.js → use-registry-connections-DmiHfi09.js} +1 -1
  212. package/dist/client/assets/{use-secrets-BePFkDv2.js → use-secrets-cH80CtAP.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-I37iXMdS.js → use-status-sounds-ZznMZwDa.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-OtXmuQGK.js → use-view-mode-CG7vmPqC.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-sgz-9Lun.js → use-virtual-mcp-DReSesdq.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-BGzADOY3.js +1 -0
  217. package/dist/client/assets/{useQueries-CZxcQqUk.js → useQueries-DW3sLBDe.js} +1 -1
  218. package/dist/client/assets/{useRouterState-DNUcnRIA.js → useRouterState-pOxBdTyW.js} +1 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-DaO69oJM.js +1 -0
  220. package/dist/client/assets/{users-CcvWQBOX.js → users-Bt-LmW_8.js} +1 -1
  221. package/dist/client/assets/{variant-calendar-Db0jzorz.js → variant-calendar-B1cGLbjl.js} +1 -1
  222. package/dist/client/assets/{view-mode-toggle-DI8ozNYs.js → view-mode-toggle-DIC5etL7.js} +1 -1
  223. package/dist/client/index.html +1 -1
  224. package/dist/server/cli.js +375 -365
  225. package/dist/server/server.js +253 -253
  226. package/package.json +1 -1
  227. package/dist/client/assets/page-seo-sheet-D6AVxLeZ.js +0 -1
  228. package/dist/client/assets/project-app-view-BQaHIOi_.js +0 -1
  229. package/dist/client/assets/record-editor-B1TUzHj9.js +0 -1
  230. package/dist/client/assets/redirect-editor-CICrWqOM.js +0 -1
  231. package/dist/client/assets/registry-CJsh3nJ9.js +0 -2
  232. package/dist/client/assets/store-registry-B5Xobcne.js +0 -2
  233. package/dist/client/assets/useInfiniteQuery-BYUWCeUy.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-Pj8MSNh4.js +0 -1
@@ -1 +1 @@
1
- import{c as k,j as t,B as K,k as oe,W as Ye,X as re,b as Q,E as Ee,r as E,F as fe,bb as Ze,bc as Oe,Z as Ge,m as W,bd as et,u as tt,L as te,t as st,f as he,a$ as Re}from"./index-DzFeAmih.js";import{E as Fe}from"./empty-state-BKdsG99F.js";import{u as ge}from"./use-mcp-client-BC0h-vMK.js";import{F as ae,a as lt,b as ce,d as de}from"./form-DN66NEfH.js";import{I as pe}from"./input-DQ4Rrh5G.js";import{T as xe}from"./textarea-DaFOehSQ.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-BhBWDduO.js";import{aA as at,S as ct,aB as dt,_ as mt,a8 as ut,aC as pt,a1 as ye}from"./agent-icon-XnWAychf.js";import{g as xt,M as ft,a as we}from"./index-BWkYFeZI.js";import{A as ht,a as gt,b as jt}from"./alert-w50jcc8_.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-Cmnst8wM.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-kyZcGWQK.js";import{i as Nt}from"./AlertCircle-CipHnxQG.js";import{s as vt}from"./Stars02-BgQDE-p_.js";import{a as St}from"./Copy01-BxOJ450o.js";import{i as yt}from"./Play-Cm41TWaa.js";import{i as wt}from"./ChevronRight-lPXWWp6Z.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-DycT4MlU.js";import{a as ze,u as Me}from"./use-connection-C4iyQfk3.js";import{a as Tt}from"./use-mcp-tools-BDqpuMH6.js";import{M as Pt,c as kt}from"./monaco-editor-BXfB4eXd.js";import{I as De}from"./integration-icon-CAGigShi.js";import{h as At,m as Dt}from"./chat-context-CnIEE4i4.js";import{u as Et}from"./shell-layout-CnNDsQbe.js";import{n as Ot}from"./Tool02-C1lPBHHA.js";import"./auth-DSNKOuKd.js";import"./label-DWAEIp3m.js";import"./index-DtQLpmdp.js";import"./sidebar-C0n_mIde.js";import"./LayoutLeft-mvQWrT-n.js";import"./use-mobile-Cx1QZnAF.js";import"./X-BOp8gH-p.js";import"./ZoomOut-344erUf9.js";import"./Key01-4Mmkv7Z9.js";import"./extract-connection-data-RXmfvFPo.js";import"./use-registry-connections-Bj9gUy0P.js";import"./use-organization-settings-LGdD6tyl.js";import"./studio-tools-BCCpujL-.js";import"./Plus-DXLUIBC3.js";import"./index-Bsl8wts7.js";import"./popover-CB_z6NVK.js";import"./use-virtual-mcp-sgz-9Lun.js";import"./Check-Bi6FHyg2.js";import"./SearchMd-diGuIZrR.js";import"./Users03-DuG5rYDe.js";import"./use-create-virtual-mcp-KiUFWO7n.js";import"./use-navigate-to-agent-5Vu6k7eJ.js";import"./hooks-DTyZm8TI.js";import"./decopilot-sse-pool-DNZ4pxqN.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-CHhZSdz6.js";import"./ArrowUp-Dd8qHOWw.js";import"./Settings02-BTBQNRAw.js";import"./ArrowRight-BfCCEiXw.js";import"./ArrowUpRight-C-bgMDQB.js";import"./TrendUp01-_ZdutTHE.js";import"./ZapSquare-1KwaGYcc.js";import"./CheckCircle-DLD6HZU6.js";import"./ChevronDown-MDTOxnPa.js";import"./ChevronUp-DChualVF.js";import"./DotsVertical-BifNoV_O.js";import"./Globe01-D9v9L7Wf.js";import"./Eye-BX-_3Qvq.js";import"./FilterLines-BY9ubnj_.js";import"./Star01-BVN-I5j_.js";import"./Globe04-sniANDmM.js";import"./SwitchHorizontal01-Dh8f5ex4.js";import"./HardDrive-BIzKhiBj.js";import"./Image01-CNrE4Upv.js";import"./XCircle-DKEw1PFY.js";import"./LinkExternal01-dBRpR0f2.js";import"./LogOut01-D1uyHe1T.js";import"./Monitor01-Dc9oQ8Df.js";import"./Sun-WdZ_ti4D.js";import"./Package-B6y3yaMV.js";import"./Palette-Cu6r_43s.js";import"./SearchLg-uphfq5IV.js";import"./Shield01-B9HU-EdC.js";import"./Stars01-DQT3b-Y9.js";import"./Trash01-DmogTFVy.js";import"./Upload01-gBE_dEpz.js";import"./User01-ClWjUGBk.js";import"./Users01-j_336Q2L.js";import"./XClose-2UkR5Pc_.js";import"./Zap-BMWIvUqh.js";import"./badge-BoNQRXIs.js";import"./mcp-oauth-D7xl0855.js";import"./index-B8y76arp.js";import"./autosend-PQHJ35gl.js";import"./use-ai-providers-akLo6hIS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-Db9Tv8zu.js";import"./avatar-DQ8zWH2j.js";import"./dialog-CBEhCYac.js";import"./required-auth-layout-Cv-KlH_2.js";import"./use-org-sso-B6cnBAvZ.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
1
+ import{c as k,j as t,B as K,k as oe,W as Ye,X as re,b as Q,E as Ee,r as E,F as fe,bb as Ze,bc as Oe,Z as Ge,m as W,bd as et,u as tt,L as te,t as st,f as he,a$ as Re}from"./index-CzbXi8Zw.js";import{E as Fe}from"./empty-state-CeghgAqf.js";import{u as ge}from"./use-mcp-client-BNOr39vr.js";import{F as ae,a as lt,b as ce,d as de}from"./form-BmCm64Py.js";import{I as pe}from"./input-Bp-b5oR_.js";import{T as xe}from"./textarea-DtnL4UXx.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-CNEwA1cH.js";import{aA as at,S as ct,aB as dt,_ as mt,a8 as ut,aC as pt,a1 as ye}from"./agent-icon-Cw51a4Wd.js";import{g as xt,M as ft,a as we}from"./index-CpYmn4W2.js";import{A as ht,a as gt,b as jt}from"./alert-B0R2yShA.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-DCdQolmz.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-CuAEyPad.js";import{i as Nt}from"./AlertCircle-CPi3N7pa.js";import{s as vt}from"./Stars02-CXOHu2mW.js";import{a as St}from"./Copy01-BhI2f81T.js";import{i as yt}from"./Play-DAgkAVxh.js";import{i as wt}from"./ChevronRight-DJGqq3yK.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-C7wcL4df.js";import{a as ze,u as Me}from"./use-connection-B_Mq-hps.js";import{a as Tt}from"./use-mcp-tools-DZYFUyMY.js";import{M as Pt,c as kt}from"./monaco-editor-UlYG-Jnx.js";import{I as De}from"./integration-icon-BikUNVPK.js";import{h as At,m as Dt}from"./chat-context-CIPTEVfg.js";import{u as Et}from"./shell-layout-0EoX__iD.js";import{n as Ot}from"./Tool02-BiJ5Pq7p.js";import"./auth-CvqbEBx3.js";import"./label-CbH_R1Dq.js";import"./index-QO34cjUr.js";import"./sidebar-BEaUj8qU.js";import"./LayoutLeft-b_U4NE5x.js";import"./use-mobile-DsyeTCp3.js";import"./X-BguiaTPZ.js";import"./ZoomOut-CoDI3ZhZ.js";import"./Key01-B0TDf7aH.js";import"./extract-connection-data-D42gozmu.js";import"./use-registry-connections-DmiHfi09.js";import"./use-organization-settings-QvagJlDQ.js";import"./studio-tools-ZwaipbPk.js";import"./Plus-BCUavDPs.js";import"./index-n1dZRqhQ.js";import"./popover-kCpNzTr7.js";import"./use-virtual-mcp-DReSesdq.js";import"./Check-CUU6x4Pg.js";import"./SearchMd-BExZv_-l.js";import"./Users03-C6rx6pS7.js";import"./use-create-virtual-mcp-aLJ9_ULR.js";import"./use-navigate-to-agent-C0_dzLMO.js";import"./hooks-ctUqH-63.js";import"./decopilot-sse-pool-DdaXjmI1.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-BoZ3l_kJ.js";import"./ArrowUp-DVWcfTPl.js";import"./Settings02-DSsFpJ-f.js";import"./ArrowRight-UoO_htto.js";import"./ArrowUpRight-DvRn4D26.js";import"./TrendUp01-Bw4djtnK.js";import"./ZapSquare-gJYZl-fj.js";import"./CheckCircle-YH42m3Mz.js";import"./ChevronDown-C4mQa8_C.js";import"./ChevronUp-Um8OScqZ.js";import"./DotsVertical-BOe_763p.js";import"./Globe01-BM6uUIqK.js";import"./Eye-wSNRRH_b.js";import"./FilterLines-CQgUwot9.js";import"./Star01-CrlJSf4a.js";import"./Globe04-BBwyMdkD.js";import"./SwitchHorizontal01-DI2SmeRf.js";import"./HardDrive-BFC9wU0S.js";import"./Image01-BOrAOfff.js";import"./XCircle-oK-7R4q-.js";import"./LinkExternal01-DruIIGwr.js";import"./LogOut01-BOeCqlE_.js";import"./Monitor01-D09G6X-l.js";import"./Sun-CkBa4Upo.js";import"./Package-5OWeLBp-.js";import"./Palette-2GHgQBzC.js";import"./SearchLg-jqyCXgh3.js";import"./Shield01-DY7x3aC8.js";import"./Stars01-DwU8C-9i.js";import"./Trash01-B5Hc0LiC.js";import"./Upload01-DlxMvv63.js";import"./User01-XNJOBvnw.js";import"./Users01-BJfK-12H.js";import"./XClose-D299BTc_.js";import"./Zap-DLUtSnwc.js";import"./badge-DPTF-wKi.js";import"./mcp-oauth-N8OU8oSC.js";import"./index-CkiO_TUo.js";import"./autosend-D2xUEjhC.js";import"./use-ai-providers-VWTzUhPE.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-E4pGmJuF.js";import"./avatar-XaRsthKI.js";import"./dialog-BV0NI63u.js";import"./required-auth-layout-CPbUokgR.js";import"./use-org-sso-CzauXVpI.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
@@ -1 +1 @@
1
- import{c as $,b as A,j as s,m as z,B as E}from"./index-DzFeAmih.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-DyYXzcv-.js";import{i as R,n as _}from"./ArrowUp-Dd8qHOWw.js";import{i as V}from"./Check-Bi6FHyg2.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-Dh8f5ex4.js";import{T as W,a as q,b as G,c as H}from"./tooltip-kyZcGWQK.js";import{V as J}from"./view-mode-toggle-DI8ozNYs.js";import{B as Q}from"./badge-BoNQRXIs.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
1
+ import{c as $,b as A,j as s,m as z,B as E}from"./index-CzbXi8Zw.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-Cmsfzhn9.js";import{i as R,n as _}from"./ArrowUp-DVWcfTPl.js";import{i as V}from"./Check-CUU6x4Pg.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-DI2SmeRf.js";import{T as W,a as q,b as G,c as H}from"./tooltip-CuAEyPad.js";import{V as J}from"./view-mode-toggle-DIC5etL7.js";import{B as Q}from"./badge-DPTF-wKi.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
@@ -1 +1 @@
1
- import{c as k,m as b,j as n,k as v}from"./index-DzFeAmih.js";import{i as w}from"./SearchMd-diGuIZrR.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
1
+ import{c as k,m as b,j as n,k as v}from"./index-CzbXi8Zw.js";import{i as w}from"./SearchMd-BExZv_-l.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
@@ -1 +1 @@
1
- import{c as k,j as r,m as C,b as S}from"./index-DzFeAmih.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-CGZfBUae.js";import{i as D,n as E}from"./ArrowUp-Dd8qHOWw.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,m as C,b as S}from"./index-CzbXi8Zw.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-BmO4Z7Hy.js";import{i as D,n as E}from"./ArrowUp-DVWcfTPl.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -1 +1 @@
1
- import{c as f,m as u,j as m}from"./index-DzFeAmih.js";import{B as g}from"./badge-BoNQRXIs.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,m as u,j as m}from"./index-CzbXi8Zw.js";import{B as g}from"./badge-DPTF-wKi.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,m as i,j as n}from"./index-DzFeAmih.js";import{_ as m}from"./index-Bsl8wts7.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-CBEhCYac.js";import{i as y}from"./SearchMd-diGuIZrR.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
1
+ import{c as d,m as i,j as n}from"./index-CzbXi8Zw.js";import{_ as m}from"./index-n1dZRqhQ.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-BV0NI63u.js";import{i as y}from"./SearchMd-BExZv_-l.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
@@ -1 +1 @@
1
- import{c as I,b as q,j as o,u as Ke,p as tt,q as Ce,r as H,a as Te,d as rt,s as it,e as Qe,v as Se,w as Ye,Q as ot,E as nt,K as De,x as Ae,B as ze,N as st,m as $e}from"./index-DzFeAmih.js";import{L as at,s as Le,S as Ge,a as He,b as ke,c as Me,i as lt,n as Pe,C as Je,p as Ie}from"./self-tool-result-CkmiUaU8.js";import{A as ct}from"./auth-entry-DbKIy4Vz.js";import{A as mt}from"./auth-split-layout-C5JXou4p.js";import{O as We}from"./organization-choice-KmbrIwAS.js";import{I as ut}from"./input-DQ4Rrh5G.js";import{D as dt,a as qe,b as gt,c as ft}from"./dropdown-menu-DyYXzcv-.js";import{S as pt,u as ht,W as bt,g as xt,a as yt}from"./use-mcp-client-BC0h-vMK.js";import{i as Ct}from"./ArrowRight-BfCCEiXw.js";import"./integration-icon-CAGigShi.js";import"./Tool02-C1lPBHHA.js";import"./agent-icon-XnWAychf.js";import"./AlertCircle-CipHnxQG.js";import"./Tool01-CHhZSdz6.js";import"./ArrowUp-Dd8qHOWw.js";import"./Settings02-BTBQNRAw.js";import"./ArrowUpRight-C-bgMDQB.js";import"./TrendUp01-_ZdutTHE.js";import"./ZapSquare-1KwaGYcc.js";import"./ZoomOut-344erUf9.js";import"./Users03-DuG5rYDe.js";import"./CheckCircle-DLD6HZU6.js";import"./Check-Bi6FHyg2.js";import"./ChevronDown-MDTOxnPa.js";import"./ChevronRight-lPXWWp6Z.js";import"./ChevronUp-DChualVF.js";import"./DotsVertical-BifNoV_O.js";import"./Stars02-BgQDE-p_.js";import"./Copy01-BxOJ450o.js";import"./Globe01-D9v9L7Wf.js";import"./Eye-BX-_3Qvq.js";import"./FilterLines-BY9ubnj_.js";import"./Star01-BVN-I5j_.js";import"./Globe04-sniANDmM.js";import"./SwitchHorizontal01-Dh8f5ex4.js";import"./HardDrive-BIzKhiBj.js";import"./Image01-CNrE4Upv.js";import"./Key01-4Mmkv7Z9.js";import"./LayoutLeft-mvQWrT-n.js";import"./XCircle-DKEw1PFY.js";import"./LinkExternal01-dBRpR0f2.js";import"./LogOut01-D1uyHe1T.js";import"./Monitor01-Dc9oQ8Df.js";import"./Sun-WdZ_ti4D.js";import"./Package-B6y3yaMV.js";import"./Palette-Cu6r_43s.js";import"./Play-Cm41TWaa.js";import"./Plus-DXLUIBC3.js";import"./SearchLg-uphfq5IV.js";import"./SearchMd-diGuIZrR.js";import"./Shield01-B9HU-EdC.js";import"./Stars01-DQT3b-Y9.js";import"./Trash01-DmogTFVy.js";import"./Upload01-gBE_dEpz.js";import"./User01-ClWjUGBk.js";import"./Users01-j_336Q2L.js";import"./XClose-2UkR5Pc_.js";import"./X-BOp8gH-p.js";import"./Zap-BMWIvUqh.js";import"./dialog-CBEhCYac.js";import"./tooltip-kyZcGWQK.js";import"./companions-core-C8ADabtd.js";import"./extract-connection-data-RXmfvFPo.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-DN66NEfH.js";import"./label-DWAEIp3m.js";import"./use-debounced-value-B2Uhj-R0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-CZxcQqUk.js";import"./authenticate-and-persist-oauth-7Xbi0BUL.js";import"./mcp-oauth-D7xl0855.js";import"./auth-DSNKOuKd.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-DQ8zWH2j.js";function Fe(t){const e=I.c(5),{variant:i}=t,n=q();let r;e[0]!==n||e[1]!==i?(r=n(i==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=n,e[1]=i,e[2]=r):r=e[2];const c=r;let a;return e[3]!==c?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(at,{label:c,className:"text-muted-foreground"})}),e[3]=c,e[4]=a):a=e[4],a}function ri(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(_t,{}),t[0]=e):e=t[0],e}const Xe=H.createContext(null),Ze=()=>H.useContext(Xe);function Ot(){const t=I.c(22),[e,i]=Se(),n=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==n?(r=o.jsx(dt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:n})}),t[0]=n,t[1]=r):r=t[1];let c;t[2]!==i?(c=()=>{i(St)},t[2]=i,t[3]=c):c=t[3];const a=e.language==="en"&&"bg-accent";let s;t[4]!==a?(s=$e(a),t[4]=a,t[5]=s):s=t[5];let g;t[6]!==c||t[7]!==s?(g=o.jsx(qe,{onClick:c,className:s,children:"English"}),t[6]=c,t[7]=s,t[8]=g):g=t[8];let f;t[9]!==i?(f=()=>{i(jt)},t[9]=i,t[10]=f):f=t[10];const u=e.language==="pt-BR"&&"bg-accent";let m;t[11]!==u?(m=$e(u),t[11]=u,t[12]=m):m=t[12];let d;t[13]!==f||t[14]!==m?(d=o.jsx(qe,{onClick:f,className:m,children:"Português (Brasil)"}),t[13]=f,t[14]=m,t[15]=d):d=t[15];let p;t[16]!==g||t[17]!==d?(p=o.jsxs(gt,{align:"end",children:[g,d]}),t[16]=g,t[17]=d,t[18]=p):p=t[18];let S;return t[19]!==r||t[20]!==p?(S=o.jsxs(ft,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=S):S=t[21],S}function jt(t){return{...t,language:"pt-BR"}}function St(t){return{...t,language:"en"}}function k(t){const e=I.c(17);let i,n,r;e[0]!==t?({visual:r,children:i,...n}=t,e[0]=t,e[1]=i,e[2]=n,e[3]=r):(i=e[1],n=e[2],r=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/commerce-onboarding"},e[4]=c):c=e[4];const a=Ke(c),{data:s}=Te.useSession(),[g]=Se(),f=s?.user?.email;let u;e[5]!==g.language||e[6]!==a.siteUrl||e[7]!==f?(u=ke({siteUrl:a.siteUrl,email:f,locale:g.language}),e[5]=g.language,e[6]=a.siteUrl,e[7]=f,e[8]=u):u=e[8];const m=u;let d;e[9]!==m||e[10]!==r?(d=r??o.jsx(Me,{href:m}),e[9]=m,e[10]=r,e[11]=d):d=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Ot,{})]}),e[12]=p):p=e[12];let S;return e[13]!==i||e[14]!==n||e[15]!==d?(S=o.jsxs(mt,{...n,visual:d,children:[p,i]}),e[13]=i,e[14]=n,e[15]=d,e[16]=S):S=e[16],S}function vt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Be(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Ve=!1;function _t(){const t=Ke({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=t,n=Le(i);return!Ve&&tt()&&(Ve=!0,Ce("commerce_onboarding_viewed",{site_url:i,domain:n??void 0,...n?{$set:{last_scanned_domain:n}}:{}})),o.jsx(Xe.Provider,{value:n,children:o.jsx(Et,{requestedOrgSlug:e,siteUrl:i})})}function Et(t){const e=I.c(14),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),{data:c,isPending:a}=Te.useSession(),s=Ze();if(a){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(k,{children:o.jsx(Fe,{variant:"generic"})}),e[0]=f):f=e[0],f}if(!c){const f=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let u;e[1]!==r?(u=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=u):u=e[2];let m;e[3]!==s?(m=s?o.jsx(Ge,{host:s}):void 0,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r?(d=vt(r),e[5]=r,e[6]=d):d=e[6];let p;return e[7]!==u||e[8]!==m||e[9]!==d?(p=o.jsx(k,{children:o.jsx(ct,{callbackUrl:f,allowAutoLogin:!1,title:u,subtitle:null,brand:m,copy:d})}),e[7]=u,e[8]=m,e[9]=d,e[10]=p):p=e[10],p}let g;return e[11]!==i||e[12]!==n?(g=o.jsx(Ut,{requestedOrgSlug:i,siteUrl:n}),e[11]=i,e[12]=n,e[13]=g):g=e[13],g}function Ut(t){const e=I.c(95),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),c=rt(),a=it(),[s,g]=H.useState(null),[f,u]=H.useState(null),m=a.data?.map(Nt)??[];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={mutationFn:wt,retry:!1,onSuccess:l=>{u(l)}},e[0]=d):d=e[0];const p=Qe(d);if(a.isPending){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(k,{children:o.jsx(Fe,{variant:"workspace"})}),e[1]=l):l=e[1],l}if(a.error){let l;e[2]!==r?(l=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=l):l=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let C;e[8]!==a?(C=()=>a.refetch(),e[8]=a,e[9]=C):C=e[9];let j;return e[10]!==l||e[11]!==h||e[12]!==x||e[13]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[10]=l,e[11]=h,e[12]=x,e[13]=C,e[14]=j):j=e[14],j}const S=i?m.find(l=>l.slug===i):null;if(S){let l;return e[15]!==S||e[16]!==n?(l=o.jsx(ye,{org:S,initialSiteUrl:n}),e[15]=S,e[16]=n,e[17]=l):l=e[17],l}if(i){let l;e[18]!==r?(l=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=l):l=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let C;e[24]!==a?(C=()=>a.refetch(),e[24]=a,e[25]=C):C=e[25];let j;return e[26]!==l||e[27]!==h||e[28]!==x||e[29]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[26]=l,e[27]=h,e[28]=x,e[29]=C,e[30]=j):j=e[30],j}if(s){let l;return e[31]!==s||e[32]!==n?(l=o.jsx(ye,{org:s,initialSiteUrl:n}),e[31]=s,e[32]=n,e[33]=l):l=e[33],l}if(m.length===1&&m[0]){let l;return e[34]!==m[0]||e[35]!==n?(l=o.jsx(ye,{org:m[0],initialSiteUrl:n}),e[34]=m[0],e[35]=n,e[36]=l):l=e[36],l}if(m.length>1){let l;e[37]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=l):l=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==l||e[42]!==h?(x=o.jsx(W,{title:l,description:h}),e[41]=l,e[42]=h,e[43]=x):x=e[43];let C;e[44]!==r?(C=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=C):C=e[45];let j;e[46]!==c||e[47]!==n?(j=V=>c({to:"/commerce-onboarding",search:{org:V.slug,siteUrl:n}}),e[46]=c,e[47]=n,e[48]=j):j=e[48];let O;e[49]!==m||e[50]!==C||e[51]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:m,selectLabel:C,onSelected:j})}),e[49]=m,e[50]=C,e[51]=j,e[52]=O):O=e[52];let F;return e[53]!==x||e[54]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[53]=x,e[54]=O,e[55]=F):F=e[55],F}if(!f){let l;e[56]!==p?(l=()=>{p.reset(),p.mutate()},e[56]=p,e[57]=l):l=e[57];let h;return e[58]!==p||e[59]!==l?(h=o.jsx(Pt,{mutation:p,onRetry:l}),e[58]=p,e[59]=l,e[60]=h):h=e[60],h}const b=f;if(b?.success&&(b.status==="created"||b.status==="joined"||b.status==="already_has_organization")&&b.organization){let l;return e[61]!==b.organization||e[62]!==n?(l=o.jsx(ye,{org:b.organization,initialSiteUrl:n}),e[61]=b.organization,e[62]=n,e[63]=l):l=e[63],l}if(b?.status==="ambiguous"&&b.organizations&&b.organizations.length>0){let l;e[64]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[64]=r,e[65]=l):l=e[65];let h;e[66]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[66]=r,e[67]=h):h=e[67];let x;e[68]!==l||e[69]!==h?(x=o.jsx(W,{title:l,description:h}),e[68]=l,e[69]=h,e[70]=x):x=e[70];const C=b.domain??void 0;let j;e[71]!==c||e[72]!==n?(j=(V,B)=>{Ye(),g({...V,slug:B}),c({to:"/commerce-onboarding",search:{org:B,siteUrl:n}})},e[71]=c,e[72]=n,e[73]=j):j=e[73];let O;e[74]!==b.organizations||e[75]!==C||e[76]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:b.organizations,domain:C,onJoined:j})}),e[74]=b.organizations,e[75]=C,e[76]=j,e[77]=O):O=e[77];let F;return e[78]!==x||e[79]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[78]=x,e[79]=O,e[80]=F):F=e[80],F}let E;e[81]!==r?(E=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[81]=r,e[82]=E):E=e[82];let U;e[83]!==b?.error||e[84]!==r?(U=b?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[83]=b?.error,e[84]=r,e[85]=U):U=e[85];let N;e[86]!==r?(N=r("routes.commerceOnboarding.retryAgain"),e[86]=r,e[87]=N):N=e[87];let w;e[88]!==p?(w=()=>{u(null),p.reset()},e[88]=p,e[89]=w):w=e[89];let M;return e[90]!==E||e[91]!==U||e[92]!==N||e[93]!==w?(M=o.jsx(Oe,{title:E,description:U,actionLabel:N,onRetry:w}),e[90]=E,e[91]=U,e[92]=N,e[93]=w,e[94]=M):M=e[94],M}async function wt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Ye(),e}function Nt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Pt(t){const e=I.c(16),{mutation:i,onRetry:n}=t,r=q(),c=H.useRef(!1);let a;e[0]!==i?(a=u=>{!u||c.current||(c.current=!0,i.mutate())},e[0]=i,e[1]=a):a=e[1];const s=a;if(i.error){let u;e[2]!==r?(u=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=u):u=e[3];let m;e[4]!==r?(m=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=m):m=e[5];let d;e[6]!==r?(d=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=d):d=e[7];let p;return e[8]!==n||e[9]!==u||e[10]!==m||e[11]!==d?(p=o.jsx(Oe,{title:u,description:m,actionLabel:d,onRetry:n}),e[8]=n,e[9]=u,e[10]=m,e[11]=d,e[12]=p):p=e[12],p}let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Fe,{variant:"generic"}),e[13]=g):g=e[13];let f;return e[14]!==s?(f=o.jsx(k,{children:o.jsx("div",{ref:s,children:g})}),e[14]=s,e[15]=f):f=e[15],f}function W(t){const e=I.c(8),{title:i,description:n}=t,r=Ze();let c;e[0]!==r?(c=r?o.jsx(Ge,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==n||e[3]!==i?(a=(i||n)&&o.jsxs("div",{className:"space-y-2",children:[i&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),n&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=i,e[4]=a):a=e[4];let s;return e[5]!==c||e[6]!==a?(s=o.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=s):s=e[7],s}function Oe(t){const e=I.c(9),{title:i,description:n,actionLabel:r,onRetry:c}=t;let a;e[0]!==n||e[1]!==i?(a=o.jsx(W,{title:i,description:n}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let s;e[3]!==r||e[4]!==c?(s=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:c,children:r}),e[3]=r,e[4]=c,e[5]=s):s=e[5];let g;return e[6]!==a||e[7]!==s?(g=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[a,s]})}),e[6]=a,e[7]=s,e[8]=g):g=e[8],g}function ye(t){const e=I.c(13),{org:i,initialSiteUrl:n}=t,r=q(),{data:c}=Te.useSession(),[a]=Se(),s=c?.user?.email;let g;e[0]!==n||e[1]!==a.language||e[2]!==s?(g=ke({siteUrl:n,email:s,locale:a.language}),e[0]=n,e[1]=a.language,e[2]=s,e[3]=g):g=e[3];const f=g;let u;e[4]!==f||e[5]!==i.id?(u=o.jsx(Me,{href:f,orgId:i.id}),e[4]=f,e[5]=i.id,e[6]=u):u=e[6];const m=u;let d;return e[7]!==n||e[8]!==m||e[9]!==i||e[10]!==c?.user?.email||e[11]!==r?(d=o.jsx(ot,{children:p=>{const{reset:S}=p;return o.jsx(nt,{fallback:b=>{const{error:E,resetError:U}=b;return o.jsx(k,{visual:m,children:o.jsx(It,{orgName:i.name,message:E instanceof Error?E.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{S(),U()}})})},children:o.jsx(H.Suspense,{fallback:o.jsx(et,{visual:m}),children:o.jsx(Rt,{org:i,initialSiteUrl:n,sessionEmail:c?.user?.email},`${i.id}:${n??""}`)})})}}),e[7]=n,e[8]=m,e[9]=i,e[10]=c?.user?.email,e[11]=r,e[12]=d):d=e[12],d}function et(t){const e=I.c(3),{visual:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(W,{}),o.jsx(Je,{})]}),e[0]=n):n=e[0];let r;return e[1]!==i?(r=o.jsx(k,{align:"fill",visual:i,children:n}),e[1]=i,e[2]=r):r=e[2],r}function It(t){const e=I.c(19),{orgName:i,message:n,onRetry:r}=t,c=q();let a;e[0]!==c?(a=c("routes.commerceOnboarding.commerceDiagnostic"),e[0]=c,e[1]=a):a=e[1];let s;e[2]!==i||e[3]!==c?(s=c("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i}),e[2]=i,e[3]=c,e[4]=s):s=e[4];let g;e[5]!==a||e[6]!==s?(g=o.jsx(W,{title:a,description:s}),e[5]=a,e[6]=s,e[7]=g):g=e[7];let f;e[8]!==n?(f=o.jsx(je,{message:n}),e[8]=n,e[9]=f):f=e[9];let u;e[10]!==c?(u=c("routes.commerceOnboarding.retryAgain"),e[10]=c,e[11]=u):u=e[11];let m;e[12]!==r||e[13]!==u?(m=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:r,children:u}),e[12]=r,e[13]=u,e[14]=m):m=e[14];let d;return e[15]!==g||e[16]!==f||e[17]!==m?(d=o.jsxs("div",{className:"grid gap-10",children:[g,f,m]}),e[15]=g,e[16]=f,e[17]=m,e[18]=d):d=e[18],d}function Rt(t){const e=I.c(135),{org:i,initialSiteUrl:n,sessionEmail:r}=t;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:pt,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=ht(c),[s,g]=H.useState(n??""),[f,u]=H.useState(null),m=H.useRef(!1),d=bt.COMMERCE_DISCOVERY(i.id),p=xt(i.id),S=De.commerceDiscoveryConnection(i.id,d);let b;e[3]!==d||e[4]!==a?(b=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return Ie(y)},e[3]=d,e[4]=a,e[5]=b):b=e[5];let E;e[6]!==S||e[7]!==b?(E={queryKey:S,queryFn:b,retry:!1},e[6]=S,e[7]=b,e[8]=E):E=e[8];const U=Ae(E),N=De.commerceDiscoveryVirtualMcp(i.id,p);let w;e[9]!==a||e[10]!==p?(w=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Ie(y)},e[9]=a,e[10]=p,e[11]=w):w=e[11];let M;e[12]!==N||e[13]!==w?(M={queryKey:N,queryFn:w,retry:!1},e[12]=N,e[13]=w,e[14]=M):M=e[14];const l=Ae(M);let h;e[15]!==a?(h=async y=>{const v=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Ie(v)},e[15]=a,e[16]=h):h=e[16];let x;e[17]!==U||e[18]!==i.id||e[19]!==l?(x=(y,v)=>{Ce("commerce_onboarding_setup_succeeded",{domain:Le(v)??void 0,organization_id:i.id}),u(null),U.refetch(),l.refetch()},e[17]=U,e[18]=i.id,e[19]=l,e[20]=x):x=e[20];let C;e[21]!==i.id?(C=(y,v)=>{Ce("commerce_onboarding_setup_failed",{domain:Le(v)??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),u(y instanceof Error?y.message:"__configurationFailed")},e[21]=i.id,e[22]=C):C=e[22];let j;e[23]!==C||e[24]!==h||e[25]!==x?(j={mutationFn:h,retry:!1,onSuccess:x,onError:C},e[23]=C,e[24]=h,e[25]=x,e[26]=j):j=e[26];const O=Qe(j),F=!!U.data.item&&!!l.data.item,V=U.data.item,B=typeof V?.metadata?.siteUrl=="string"?V.metadata.siteUrl:void 0,ve=n||s||"";let ne;e[27]!==B||e[28]!==ve?(ne=lt(ve,B),e[27]=B,e[28]=ve,e[29]=ne):ne=e[29];const se=F&&ne,ae=n||s||B||"",_=q(),[_e]=Se();let le;e[30]!==ae||e[31]!==_e.language||e[32]!==r?(le=ke({siteUrl:ae,email:r,locale:_e.language}),e[30]=ae,e[31]=_e.language,e[32]=r,e[33]=le):le=e[33];const Ee=le;let ce;e[34]!==Ee||e[35]!==i.id?(ce=o.jsx(Me,{href:Ee,orgId:i.id}),e[34]=Ee,e[35]=i.id,e[36]=ce):ce=e[36];const T=ce;let me;e[37]!==f||e[38]!==_?(me=f?Be(_,f):null,e[37]=f,e[38]=_,e[39]=me):me=e[39];const z=me;let ue;e[40]!==O?(ue=y=>{const v=Pe(y);if(!v.ok){u(v.error);return}u(null),O.mutate(v.value)},e[40]=O,e[41]=ue):ue=e[41];const K=ue;let de;e[42]!==n||e[43]!==K||e[44]!==se?(de=y=>{!y||m.current||se||!n||(m.current=!0,K(n))},e[42]=n,e[43]=K,e[44]=se,e[45]=de):de=e[45];const Ue=de;let ge;e[46]!==i.id||e[47]!==K||e[48]!==s?(ge=y=>{y.preventDefault();const v=Pe(s);v.ok&&Ce("commerce_onboarding_site_url_submitted",{domain:new URL(v.value).hostname,organization_id:i.id}),K(s)},e[46]=i.id,e[47]=K,e[48]=s,e[49]=ge):ge=e[49];const D=ge;if(se){const y=i.slug;let v;e[50]===Symbol.for("react.memo_cache_sentinel")?(v=crypto.randomUUID(),e[50]=v):v=e[50];let P;e[51]!==i.slug?(P={org:y,taskId:v},e[51]=i.slug,e[52]=P):P=e[52];let R;e[53]!==i.id?(R=yt(i.id),e[53]=i.id,e[54]=R):R=e[54];const $=ae||void 0;let L;e[55]!==R.id||e[56]!==$?(L={virtualmcpid:R.id,connect:"1",siteUrl:$},e[55]=R.id,e[56]=$,e[57]=L):L=e[57];let A;return e[58]!==P||e[59]!==L?(A=o.jsx(st,{to:"/$org/$taskId",params:P,search:L,replace:!0}),e[58]=P,e[59]=L,e[60]=A):A=e[60],A}if(O.isPending){let y;return e[61]!==T?(y=o.jsx(et,{visual:T}),e[61]=T,e[62]=y):y=e[62],y}if(n){let y,v,P,R,$,L,A,Z;if(e[63]!==T||e[64]!==D||e[65]!==n||e[66]!==i.name||e[67]!==O.isPending||e[68]!==s||e[69]!==_||e[70]!==z||e[71]!==Ue){Z=Symbol.for("react.early_return_sentinel");e:{const we=Pe(n);if(!we.ok){let ie;e[80]!==_?(ie=_("routes.commerceOnboarding.commerceDiagnostic"),e[80]=_,e[81]=ie):ie=e[81];let oe;e[82]!==i.name||e[83]!==_?(oe=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[82]=i.name,e[83]=_,e[84]=oe):oe=e[84];let he;e[85]!==ie||e[86]!==oe?(he=o.jsx(W,{title:ie,description:oe}),e[85]=ie,e[86]=oe,e[87]=he):he=e[87];let be;e[88]!==D||e[89]!==O.isPending||e[90]!==s||e[91]!==z?(be=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[88]=D,e[89]=O.isPending,e[90]=s,e[91]=z,e[92]=be):be=e[92];const Ne=o.jsxs("div",{className:"grid gap-10",children:[he,o.jsx(je,{message:Be(_,we.error)}),be]});let xe;e[93]!==T||e[94]!==Ne?(xe=o.jsx(k,{visual:T,children:Ne}),e[93]=T,e[94]=Ne,e[95]=xe):xe=e[95],Z=xe;break e}v=k,A=T,$=Ue,L="grid gap-10",y=W,e[96]!==_?(P=_("routes.commerceOnboarding.commerceDiagnostic"),e[96]=_,e[97]=P):P=e[97],R=_("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:we.value})}e[63]=T,e[64]=D,e[65]=n,e[66]=i.name,e[67]=O.isPending,e[68]=s,e[69]=_,e[70]=z,e[71]=Ue,e[72]=y,e[73]=v,e[74]=P,e[75]=R,e[76]=$,e[77]=L,e[78]=A,e[79]=Z}else y=e[72],v=e[73],P=e[74],R=e[75],$=e[76],L=e[77],A=e[78],Z=e[79];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let ee;e[98]!==y||e[99]!==P||e[100]!==R?(ee=o.jsx(y,{title:P,description:R}),e[98]=y,e[99]=P,e[100]=R,e[101]=ee):ee=e[101];let te;e[102]!==D||e[103]!==O.isPending||e[104]!==s||e[105]!==z?(te=z?o.jsxs(o.Fragment,{children:[o.jsx(je,{message:z}),o.jsx(Re,{siteUrl:s,error:null,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D})]}):o.jsx(Je,{}),e[102]=D,e[103]=O.isPending,e[104]=s,e[105]=z,e[106]=te):te=e[106];let re;e[107]!==$||e[108]!==L||e[109]!==ee||e[110]!==te?(re=o.jsxs("div",{ref:$,className:L,children:[ee,te]}),e[107]=$,e[108]=L,e[109]=ee,e[110]=te,e[111]=re):re=e[111];let pe;return e[112]!==v||e[113]!==A||e[114]!==re?(pe=o.jsx(v,{visual:A,children:re}),e[112]=v,e[113]=A,e[114]=re,e[115]=pe):pe=e[115],pe}let Q;e[116]!==_?(Q=_("routes.commerceOnboarding.commerceDiagnostic"),e[116]=_,e[117]=Q):Q=e[117];let Y;e[118]!==i.name||e[119]!==_?(Y=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[118]=i.name,e[119]=_,e[120]=Y):Y=e[120];let G;e[121]!==Q||e[122]!==Y?(G=o.jsx(W,{title:Q,description:Y}),e[121]=Q,e[122]=Y,e[123]=G):G=e[123];let J;e[124]!==D||e[125]!==O.isPending||e[126]!==s||e[127]!==z?(J=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[124]=D,e[125]=O.isPending,e[126]=s,e[127]=z,e[128]=J):J=e[128];let X;e[129]!==G||e[130]!==J?(X=o.jsxs("div",{className:"grid gap-10",children:[G,J]}),e[129]=G,e[130]=J,e[131]=X):X=e[131];let fe;return e[132]!==T||e[133]!==X?(fe=o.jsx(k,{visual:T,children:X}),e[132]=T,e[133]=X,e[134]=fe):fe=e[134],fe}function Re(t){const e=I.c(30),{siteUrl:i,error:n,isSubmitting:r,onSiteUrlChange:c,onSubmit:a}=t,s=q();let g;e[0]!==s?(g=s("routes.commerceOnboarding.siteUrlLabel"),e[0]=s,e[1]=g):g=e[1];let f;e[2]!==g?(f=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:g}),e[2]=g,e[3]=f):f=e[3];let u;e[4]!==c?(u=M=>c(M.target.value),e[4]=c,e[5]=u):u=e[5];let m;e[6]!==s?(m=s("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=s,e[7]=m):m=e[7];const d=!!n;let p;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==m||e[12]!==d?(p=o.jsx(ut,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:u,placeholder:m,"aria-invalid":d,disabled:r}),e[8]=r,e[9]=i,e[10]=u,e[11]=m,e[12]=d,e[13]=p):p=e[13];let S;e[14]!==n?(S=n?o.jsx(je,{message:n}):null,e[14]=n,e[15]=S):S=e[15];let b;e[16]!==f||e[17]!==p||e[18]!==S?(b=o.jsxs("div",{className:"grid gap-2",children:[f,p,S]}),e[16]=f,e[17]=p,e[18]=S,e[19]=b):b=e[19];let E;e[20]!==s?(E=s("routes.commerceOnboarding.authCopy.continue"),e[20]=s,e[21]=E):E=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx(Ct,{size:16}),e[22]=U):U=e[22];let N;e[23]!==r||e[24]!==E?(N=o.jsxs(ze,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[E,U]}),e[23]=r,e[24]=E,e[25]=N):N=e[25];let w;return e[26]!==a||e[27]!==N||e[28]!==b?(w=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[b,N]}),e[26]=a,e[27]=N,e[28]=b,e[29]=w):w=e[29],w}function je(t){const e=I.c(2),{message:i}=t;let n;return e[0]!==i?(n=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=n):n=e[1],n}export{ri as default};
1
+ import{c as I,b as q,j as o,u as Ke,p as tt,q as Ce,r as H,a as Te,d as rt,s as it,e as Qe,v as Se,w as Ye,Q as ot,E as nt,K as De,x as Ae,B as ze,N as st,m as $e}from"./index-CzbXi8Zw.js";import{L as at,s as Le,S as Ge,a as He,b as ke,c as Me,i as lt,n as Pe,C as Je,p as Ie}from"./self-tool-result-Deqb0_O4.js";import{A as ct}from"./auth-entry-DZVQy62Q.js";import{A as mt}from"./auth-split-layout-hs9qXUvd.js";import{O as We}from"./organization-choice-Dwt3JIPx.js";import{I as ut}from"./input-Bp-b5oR_.js";import{D as dt,a as qe,b as gt,c as ft}from"./dropdown-menu-Cmsfzhn9.js";import{S as pt,u as ht,W as bt,g as xt,a as yt}from"./use-mcp-client-BNOr39vr.js";import{i as Ct}from"./ArrowRight-UoO_htto.js";import"./integration-icon-BikUNVPK.js";import"./Tool02-BiJ5Pq7p.js";import"./agent-icon-Cw51a4Wd.js";import"./AlertCircle-CPi3N7pa.js";import"./Tool01-BoZ3l_kJ.js";import"./ArrowUp-DVWcfTPl.js";import"./Settings02-DSsFpJ-f.js";import"./ArrowUpRight-DvRn4D26.js";import"./TrendUp01-Bw4djtnK.js";import"./ZapSquare-gJYZl-fj.js";import"./ZoomOut-CoDI3ZhZ.js";import"./Users03-C6rx6pS7.js";import"./CheckCircle-YH42m3Mz.js";import"./Check-CUU6x4Pg.js";import"./ChevronDown-C4mQa8_C.js";import"./ChevronRight-DJGqq3yK.js";import"./ChevronUp-Um8OScqZ.js";import"./DotsVertical-BOe_763p.js";import"./Stars02-CXOHu2mW.js";import"./Copy01-BhI2f81T.js";import"./Globe01-BM6uUIqK.js";import"./Eye-wSNRRH_b.js";import"./FilterLines-CQgUwot9.js";import"./Star01-CrlJSf4a.js";import"./Globe04-BBwyMdkD.js";import"./SwitchHorizontal01-DI2SmeRf.js";import"./HardDrive-BFC9wU0S.js";import"./Image01-BOrAOfff.js";import"./Key01-B0TDf7aH.js";import"./LayoutLeft-b_U4NE5x.js";import"./XCircle-oK-7R4q-.js";import"./LinkExternal01-DruIIGwr.js";import"./LogOut01-BOeCqlE_.js";import"./Monitor01-D09G6X-l.js";import"./Sun-CkBa4Upo.js";import"./Package-5OWeLBp-.js";import"./Palette-2GHgQBzC.js";import"./Play-DAgkAVxh.js";import"./Plus-BCUavDPs.js";import"./SearchLg-jqyCXgh3.js";import"./SearchMd-BExZv_-l.js";import"./Shield01-DY7x3aC8.js";import"./Stars01-DwU8C-9i.js";import"./Trash01-B5Hc0LiC.js";import"./Upload01-DlxMvv63.js";import"./User01-XNJOBvnw.js";import"./Users01-BJfK-12H.js";import"./XClose-D299BTc_.js";import"./X-BguiaTPZ.js";import"./Zap-DLUtSnwc.js";import"./dialog-BV0NI63u.js";import"./tooltip-CuAEyPad.js";import"./companions-core-D1vEH6r4.js";import"./extract-connection-data-D42gozmu.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-BmCm64Py.js";import"./label-CbH_R1Dq.js";import"./use-debounced-value-kbzXB7NC.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-DW3sLBDe.js";import"./authenticate-and-persist-oauth-IkJ6ZdHi.js";import"./mcp-oauth-N8OU8oSC.js";import"./auth-CvqbEBx3.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-XaRsthKI.js";function Fe(t){const e=I.c(5),{variant:i}=t,n=q();let r;e[0]!==n||e[1]!==i?(r=n(i==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=n,e[1]=i,e[2]=r):r=e[2];const c=r;let a;return e[3]!==c?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(at,{label:c,className:"text-muted-foreground"})}),e[3]=c,e[4]=a):a=e[4],a}function ri(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(_t,{}),t[0]=e):e=t[0],e}const Xe=H.createContext(null),Ze=()=>H.useContext(Xe);function Ot(){const t=I.c(22),[e,i]=Se(),n=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==n?(r=o.jsx(dt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:n})}),t[0]=n,t[1]=r):r=t[1];let c;t[2]!==i?(c=()=>{i(St)},t[2]=i,t[3]=c):c=t[3];const a=e.language==="en"&&"bg-accent";let s;t[4]!==a?(s=$e(a),t[4]=a,t[5]=s):s=t[5];let g;t[6]!==c||t[7]!==s?(g=o.jsx(qe,{onClick:c,className:s,children:"English"}),t[6]=c,t[7]=s,t[8]=g):g=t[8];let f;t[9]!==i?(f=()=>{i(jt)},t[9]=i,t[10]=f):f=t[10];const u=e.language==="pt-BR"&&"bg-accent";let m;t[11]!==u?(m=$e(u),t[11]=u,t[12]=m):m=t[12];let d;t[13]!==f||t[14]!==m?(d=o.jsx(qe,{onClick:f,className:m,children:"Português (Brasil)"}),t[13]=f,t[14]=m,t[15]=d):d=t[15];let p;t[16]!==g||t[17]!==d?(p=o.jsxs(gt,{align:"end",children:[g,d]}),t[16]=g,t[17]=d,t[18]=p):p=t[18];let S;return t[19]!==r||t[20]!==p?(S=o.jsxs(ft,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=S):S=t[21],S}function jt(t){return{...t,language:"pt-BR"}}function St(t){return{...t,language:"en"}}function k(t){const e=I.c(17);let i,n,r;e[0]!==t?({visual:r,children:i,...n}=t,e[0]=t,e[1]=i,e[2]=n,e[3]=r):(i=e[1],n=e[2],r=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/commerce-onboarding"},e[4]=c):c=e[4];const a=Ke(c),{data:s}=Te.useSession(),[g]=Se(),f=s?.user?.email;let u;e[5]!==g.language||e[6]!==a.siteUrl||e[7]!==f?(u=ke({siteUrl:a.siteUrl,email:f,locale:g.language}),e[5]=g.language,e[6]=a.siteUrl,e[7]=f,e[8]=u):u=e[8];const m=u;let d;e[9]!==m||e[10]!==r?(d=r??o.jsx(Me,{href:m}),e[9]=m,e[10]=r,e[11]=d):d=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Ot,{})]}),e[12]=p):p=e[12];let S;return e[13]!==i||e[14]!==n||e[15]!==d?(S=o.jsxs(mt,{...n,visual:d,children:[p,i]}),e[13]=i,e[14]=n,e[15]=d,e[16]=S):S=e[16],S}function vt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Be(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Ve=!1;function _t(){const t=Ke({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=t,n=Le(i);return!Ve&&tt()&&(Ve=!0,Ce("commerce_onboarding_viewed",{site_url:i,domain:n??void 0,...n?{$set:{last_scanned_domain:n}}:{}})),o.jsx(Xe.Provider,{value:n,children:o.jsx(Et,{requestedOrgSlug:e,siteUrl:i})})}function Et(t){const e=I.c(14),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),{data:c,isPending:a}=Te.useSession(),s=Ze();if(a){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(k,{children:o.jsx(Fe,{variant:"generic"})}),e[0]=f):f=e[0],f}if(!c){const f=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let u;e[1]!==r?(u=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=u):u=e[2];let m;e[3]!==s?(m=s?o.jsx(Ge,{host:s}):void 0,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r?(d=vt(r),e[5]=r,e[6]=d):d=e[6];let p;return e[7]!==u||e[8]!==m||e[9]!==d?(p=o.jsx(k,{children:o.jsx(ct,{callbackUrl:f,allowAutoLogin:!1,title:u,subtitle:null,brand:m,copy:d})}),e[7]=u,e[8]=m,e[9]=d,e[10]=p):p=e[10],p}let g;return e[11]!==i||e[12]!==n?(g=o.jsx(Ut,{requestedOrgSlug:i,siteUrl:n}),e[11]=i,e[12]=n,e[13]=g):g=e[13],g}function Ut(t){const e=I.c(95),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),c=rt(),a=it(),[s,g]=H.useState(null),[f,u]=H.useState(null),m=a.data?.map(Nt)??[];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={mutationFn:wt,retry:!1,onSuccess:l=>{u(l)}},e[0]=d):d=e[0];const p=Qe(d);if(a.isPending){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(k,{children:o.jsx(Fe,{variant:"workspace"})}),e[1]=l):l=e[1],l}if(a.error){let l;e[2]!==r?(l=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=l):l=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let C;e[8]!==a?(C=()=>a.refetch(),e[8]=a,e[9]=C):C=e[9];let j;return e[10]!==l||e[11]!==h||e[12]!==x||e[13]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[10]=l,e[11]=h,e[12]=x,e[13]=C,e[14]=j):j=e[14],j}const S=i?m.find(l=>l.slug===i):null;if(S){let l;return e[15]!==S||e[16]!==n?(l=o.jsx(ye,{org:S,initialSiteUrl:n}),e[15]=S,e[16]=n,e[17]=l):l=e[17],l}if(i){let l;e[18]!==r?(l=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=l):l=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let C;e[24]!==a?(C=()=>a.refetch(),e[24]=a,e[25]=C):C=e[25];let j;return e[26]!==l||e[27]!==h||e[28]!==x||e[29]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[26]=l,e[27]=h,e[28]=x,e[29]=C,e[30]=j):j=e[30],j}if(s){let l;return e[31]!==s||e[32]!==n?(l=o.jsx(ye,{org:s,initialSiteUrl:n}),e[31]=s,e[32]=n,e[33]=l):l=e[33],l}if(m.length===1&&m[0]){let l;return e[34]!==m[0]||e[35]!==n?(l=o.jsx(ye,{org:m[0],initialSiteUrl:n}),e[34]=m[0],e[35]=n,e[36]=l):l=e[36],l}if(m.length>1){let l;e[37]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=l):l=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==l||e[42]!==h?(x=o.jsx(W,{title:l,description:h}),e[41]=l,e[42]=h,e[43]=x):x=e[43];let C;e[44]!==r?(C=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=C):C=e[45];let j;e[46]!==c||e[47]!==n?(j=V=>c({to:"/commerce-onboarding",search:{org:V.slug,siteUrl:n}}),e[46]=c,e[47]=n,e[48]=j):j=e[48];let O;e[49]!==m||e[50]!==C||e[51]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:m,selectLabel:C,onSelected:j})}),e[49]=m,e[50]=C,e[51]=j,e[52]=O):O=e[52];let F;return e[53]!==x||e[54]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[53]=x,e[54]=O,e[55]=F):F=e[55],F}if(!f){let l;e[56]!==p?(l=()=>{p.reset(),p.mutate()},e[56]=p,e[57]=l):l=e[57];let h;return e[58]!==p||e[59]!==l?(h=o.jsx(Pt,{mutation:p,onRetry:l}),e[58]=p,e[59]=l,e[60]=h):h=e[60],h}const b=f;if(b?.success&&(b.status==="created"||b.status==="joined"||b.status==="already_has_organization")&&b.organization){let l;return e[61]!==b.organization||e[62]!==n?(l=o.jsx(ye,{org:b.organization,initialSiteUrl:n}),e[61]=b.organization,e[62]=n,e[63]=l):l=e[63],l}if(b?.status==="ambiguous"&&b.organizations&&b.organizations.length>0){let l;e[64]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[64]=r,e[65]=l):l=e[65];let h;e[66]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[66]=r,e[67]=h):h=e[67];let x;e[68]!==l||e[69]!==h?(x=o.jsx(W,{title:l,description:h}),e[68]=l,e[69]=h,e[70]=x):x=e[70];const C=b.domain??void 0;let j;e[71]!==c||e[72]!==n?(j=(V,B)=>{Ye(),g({...V,slug:B}),c({to:"/commerce-onboarding",search:{org:B,siteUrl:n}})},e[71]=c,e[72]=n,e[73]=j):j=e[73];let O;e[74]!==b.organizations||e[75]!==C||e[76]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:b.organizations,domain:C,onJoined:j})}),e[74]=b.organizations,e[75]=C,e[76]=j,e[77]=O):O=e[77];let F;return e[78]!==x||e[79]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[78]=x,e[79]=O,e[80]=F):F=e[80],F}let E;e[81]!==r?(E=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[81]=r,e[82]=E):E=e[82];let U;e[83]!==b?.error||e[84]!==r?(U=b?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[83]=b?.error,e[84]=r,e[85]=U):U=e[85];let N;e[86]!==r?(N=r("routes.commerceOnboarding.retryAgain"),e[86]=r,e[87]=N):N=e[87];let w;e[88]!==p?(w=()=>{u(null),p.reset()},e[88]=p,e[89]=w):w=e[89];let M;return e[90]!==E||e[91]!==U||e[92]!==N||e[93]!==w?(M=o.jsx(Oe,{title:E,description:U,actionLabel:N,onRetry:w}),e[90]=E,e[91]=U,e[92]=N,e[93]=w,e[94]=M):M=e[94],M}async function wt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Ye(),e}function Nt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Pt(t){const e=I.c(16),{mutation:i,onRetry:n}=t,r=q(),c=H.useRef(!1);let a;e[0]!==i?(a=u=>{!u||c.current||(c.current=!0,i.mutate())},e[0]=i,e[1]=a):a=e[1];const s=a;if(i.error){let u;e[2]!==r?(u=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=u):u=e[3];let m;e[4]!==r?(m=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=m):m=e[5];let d;e[6]!==r?(d=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=d):d=e[7];let p;return e[8]!==n||e[9]!==u||e[10]!==m||e[11]!==d?(p=o.jsx(Oe,{title:u,description:m,actionLabel:d,onRetry:n}),e[8]=n,e[9]=u,e[10]=m,e[11]=d,e[12]=p):p=e[12],p}let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Fe,{variant:"generic"}),e[13]=g):g=e[13];let f;return e[14]!==s?(f=o.jsx(k,{children:o.jsx("div",{ref:s,children:g})}),e[14]=s,e[15]=f):f=e[15],f}function W(t){const e=I.c(8),{title:i,description:n}=t,r=Ze();let c;e[0]!==r?(c=r?o.jsx(Ge,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==n||e[3]!==i?(a=(i||n)&&o.jsxs("div",{className:"space-y-2",children:[i&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),n&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=i,e[4]=a):a=e[4];let s;return e[5]!==c||e[6]!==a?(s=o.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=s):s=e[7],s}function Oe(t){const e=I.c(9),{title:i,description:n,actionLabel:r,onRetry:c}=t;let a;e[0]!==n||e[1]!==i?(a=o.jsx(W,{title:i,description:n}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let s;e[3]!==r||e[4]!==c?(s=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:c,children:r}),e[3]=r,e[4]=c,e[5]=s):s=e[5];let g;return e[6]!==a||e[7]!==s?(g=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[a,s]})}),e[6]=a,e[7]=s,e[8]=g):g=e[8],g}function ye(t){const e=I.c(13),{org:i,initialSiteUrl:n}=t,r=q(),{data:c}=Te.useSession(),[a]=Se(),s=c?.user?.email;let g;e[0]!==n||e[1]!==a.language||e[2]!==s?(g=ke({siteUrl:n,email:s,locale:a.language}),e[0]=n,e[1]=a.language,e[2]=s,e[3]=g):g=e[3];const f=g;let u;e[4]!==f||e[5]!==i.id?(u=o.jsx(Me,{href:f,orgId:i.id}),e[4]=f,e[5]=i.id,e[6]=u):u=e[6];const m=u;let d;return e[7]!==n||e[8]!==m||e[9]!==i||e[10]!==c?.user?.email||e[11]!==r?(d=o.jsx(ot,{children:p=>{const{reset:S}=p;return o.jsx(nt,{fallback:b=>{const{error:E,resetError:U}=b;return o.jsx(k,{visual:m,children:o.jsx(It,{orgName:i.name,message:E instanceof Error?E.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{S(),U()}})})},children:o.jsx(H.Suspense,{fallback:o.jsx(et,{visual:m}),children:o.jsx(Rt,{org:i,initialSiteUrl:n,sessionEmail:c?.user?.email},`${i.id}:${n??""}`)})})}}),e[7]=n,e[8]=m,e[9]=i,e[10]=c?.user?.email,e[11]=r,e[12]=d):d=e[12],d}function et(t){const e=I.c(3),{visual:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(W,{}),o.jsx(Je,{})]}),e[0]=n):n=e[0];let r;return e[1]!==i?(r=o.jsx(k,{align:"fill",visual:i,children:n}),e[1]=i,e[2]=r):r=e[2],r}function It(t){const e=I.c(19),{orgName:i,message:n,onRetry:r}=t,c=q();let a;e[0]!==c?(a=c("routes.commerceOnboarding.commerceDiagnostic"),e[0]=c,e[1]=a):a=e[1];let s;e[2]!==i||e[3]!==c?(s=c("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i}),e[2]=i,e[3]=c,e[4]=s):s=e[4];let g;e[5]!==a||e[6]!==s?(g=o.jsx(W,{title:a,description:s}),e[5]=a,e[6]=s,e[7]=g):g=e[7];let f;e[8]!==n?(f=o.jsx(je,{message:n}),e[8]=n,e[9]=f):f=e[9];let u;e[10]!==c?(u=c("routes.commerceOnboarding.retryAgain"),e[10]=c,e[11]=u):u=e[11];let m;e[12]!==r||e[13]!==u?(m=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:r,children:u}),e[12]=r,e[13]=u,e[14]=m):m=e[14];let d;return e[15]!==g||e[16]!==f||e[17]!==m?(d=o.jsxs("div",{className:"grid gap-10",children:[g,f,m]}),e[15]=g,e[16]=f,e[17]=m,e[18]=d):d=e[18],d}function Rt(t){const e=I.c(135),{org:i,initialSiteUrl:n,sessionEmail:r}=t;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:pt,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=ht(c),[s,g]=H.useState(n??""),[f,u]=H.useState(null),m=H.useRef(!1),d=bt.COMMERCE_DISCOVERY(i.id),p=xt(i.id),S=De.commerceDiscoveryConnection(i.id,d);let b;e[3]!==d||e[4]!==a?(b=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return Ie(y)},e[3]=d,e[4]=a,e[5]=b):b=e[5];let E;e[6]!==S||e[7]!==b?(E={queryKey:S,queryFn:b,retry:!1},e[6]=S,e[7]=b,e[8]=E):E=e[8];const U=Ae(E),N=De.commerceDiscoveryVirtualMcp(i.id,p);let w;e[9]!==a||e[10]!==p?(w=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Ie(y)},e[9]=a,e[10]=p,e[11]=w):w=e[11];let M;e[12]!==N||e[13]!==w?(M={queryKey:N,queryFn:w,retry:!1},e[12]=N,e[13]=w,e[14]=M):M=e[14];const l=Ae(M);let h;e[15]!==a?(h=async y=>{const v=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Ie(v)},e[15]=a,e[16]=h):h=e[16];let x;e[17]!==U||e[18]!==i.id||e[19]!==l?(x=(y,v)=>{Ce("commerce_onboarding_setup_succeeded",{domain:Le(v)??void 0,organization_id:i.id}),u(null),U.refetch(),l.refetch()},e[17]=U,e[18]=i.id,e[19]=l,e[20]=x):x=e[20];let C;e[21]!==i.id?(C=(y,v)=>{Ce("commerce_onboarding_setup_failed",{domain:Le(v)??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),u(y instanceof Error?y.message:"__configurationFailed")},e[21]=i.id,e[22]=C):C=e[22];let j;e[23]!==C||e[24]!==h||e[25]!==x?(j={mutationFn:h,retry:!1,onSuccess:x,onError:C},e[23]=C,e[24]=h,e[25]=x,e[26]=j):j=e[26];const O=Qe(j),F=!!U.data.item&&!!l.data.item,V=U.data.item,B=typeof V?.metadata?.siteUrl=="string"?V.metadata.siteUrl:void 0,ve=n||s||"";let ne;e[27]!==B||e[28]!==ve?(ne=lt(ve,B),e[27]=B,e[28]=ve,e[29]=ne):ne=e[29];const se=F&&ne,ae=n||s||B||"",_=q(),[_e]=Se();let le;e[30]!==ae||e[31]!==_e.language||e[32]!==r?(le=ke({siteUrl:ae,email:r,locale:_e.language}),e[30]=ae,e[31]=_e.language,e[32]=r,e[33]=le):le=e[33];const Ee=le;let ce;e[34]!==Ee||e[35]!==i.id?(ce=o.jsx(Me,{href:Ee,orgId:i.id}),e[34]=Ee,e[35]=i.id,e[36]=ce):ce=e[36];const T=ce;let me;e[37]!==f||e[38]!==_?(me=f?Be(_,f):null,e[37]=f,e[38]=_,e[39]=me):me=e[39];const z=me;let ue;e[40]!==O?(ue=y=>{const v=Pe(y);if(!v.ok){u(v.error);return}u(null),O.mutate(v.value)},e[40]=O,e[41]=ue):ue=e[41];const K=ue;let de;e[42]!==n||e[43]!==K||e[44]!==se?(de=y=>{!y||m.current||se||!n||(m.current=!0,K(n))},e[42]=n,e[43]=K,e[44]=se,e[45]=de):de=e[45];const Ue=de;let ge;e[46]!==i.id||e[47]!==K||e[48]!==s?(ge=y=>{y.preventDefault();const v=Pe(s);v.ok&&Ce("commerce_onboarding_site_url_submitted",{domain:new URL(v.value).hostname,organization_id:i.id}),K(s)},e[46]=i.id,e[47]=K,e[48]=s,e[49]=ge):ge=e[49];const D=ge;if(se){const y=i.slug;let v;e[50]===Symbol.for("react.memo_cache_sentinel")?(v=crypto.randomUUID(),e[50]=v):v=e[50];let P;e[51]!==i.slug?(P={org:y,taskId:v},e[51]=i.slug,e[52]=P):P=e[52];let R;e[53]!==i.id?(R=yt(i.id),e[53]=i.id,e[54]=R):R=e[54];const $=ae||void 0;let L;e[55]!==R.id||e[56]!==$?(L={virtualmcpid:R.id,connect:"1",siteUrl:$},e[55]=R.id,e[56]=$,e[57]=L):L=e[57];let A;return e[58]!==P||e[59]!==L?(A=o.jsx(st,{to:"/$org/$taskId",params:P,search:L,replace:!0}),e[58]=P,e[59]=L,e[60]=A):A=e[60],A}if(O.isPending){let y;return e[61]!==T?(y=o.jsx(et,{visual:T}),e[61]=T,e[62]=y):y=e[62],y}if(n){let y,v,P,R,$,L,A,Z;if(e[63]!==T||e[64]!==D||e[65]!==n||e[66]!==i.name||e[67]!==O.isPending||e[68]!==s||e[69]!==_||e[70]!==z||e[71]!==Ue){Z=Symbol.for("react.early_return_sentinel");e:{const we=Pe(n);if(!we.ok){let ie;e[80]!==_?(ie=_("routes.commerceOnboarding.commerceDiagnostic"),e[80]=_,e[81]=ie):ie=e[81];let oe;e[82]!==i.name||e[83]!==_?(oe=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[82]=i.name,e[83]=_,e[84]=oe):oe=e[84];let he;e[85]!==ie||e[86]!==oe?(he=o.jsx(W,{title:ie,description:oe}),e[85]=ie,e[86]=oe,e[87]=he):he=e[87];let be;e[88]!==D||e[89]!==O.isPending||e[90]!==s||e[91]!==z?(be=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[88]=D,e[89]=O.isPending,e[90]=s,e[91]=z,e[92]=be):be=e[92];const Ne=o.jsxs("div",{className:"grid gap-10",children:[he,o.jsx(je,{message:Be(_,we.error)}),be]});let xe;e[93]!==T||e[94]!==Ne?(xe=o.jsx(k,{visual:T,children:Ne}),e[93]=T,e[94]=Ne,e[95]=xe):xe=e[95],Z=xe;break e}v=k,A=T,$=Ue,L="grid gap-10",y=W,e[96]!==_?(P=_("routes.commerceOnboarding.commerceDiagnostic"),e[96]=_,e[97]=P):P=e[97],R=_("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:we.value})}e[63]=T,e[64]=D,e[65]=n,e[66]=i.name,e[67]=O.isPending,e[68]=s,e[69]=_,e[70]=z,e[71]=Ue,e[72]=y,e[73]=v,e[74]=P,e[75]=R,e[76]=$,e[77]=L,e[78]=A,e[79]=Z}else y=e[72],v=e[73],P=e[74],R=e[75],$=e[76],L=e[77],A=e[78],Z=e[79];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let ee;e[98]!==y||e[99]!==P||e[100]!==R?(ee=o.jsx(y,{title:P,description:R}),e[98]=y,e[99]=P,e[100]=R,e[101]=ee):ee=e[101];let te;e[102]!==D||e[103]!==O.isPending||e[104]!==s||e[105]!==z?(te=z?o.jsxs(o.Fragment,{children:[o.jsx(je,{message:z}),o.jsx(Re,{siteUrl:s,error:null,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D})]}):o.jsx(Je,{}),e[102]=D,e[103]=O.isPending,e[104]=s,e[105]=z,e[106]=te):te=e[106];let re;e[107]!==$||e[108]!==L||e[109]!==ee||e[110]!==te?(re=o.jsxs("div",{ref:$,className:L,children:[ee,te]}),e[107]=$,e[108]=L,e[109]=ee,e[110]=te,e[111]=re):re=e[111];let pe;return e[112]!==v||e[113]!==A||e[114]!==re?(pe=o.jsx(v,{visual:A,children:re}),e[112]=v,e[113]=A,e[114]=re,e[115]=pe):pe=e[115],pe}let Q;e[116]!==_?(Q=_("routes.commerceOnboarding.commerceDiagnostic"),e[116]=_,e[117]=Q):Q=e[117];let Y;e[118]!==i.name||e[119]!==_?(Y=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[118]=i.name,e[119]=_,e[120]=Y):Y=e[120];let G;e[121]!==Q||e[122]!==Y?(G=o.jsx(W,{title:Q,description:Y}),e[121]=Q,e[122]=Y,e[123]=G):G=e[123];let J;e[124]!==D||e[125]!==O.isPending||e[126]!==s||e[127]!==z?(J=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[124]=D,e[125]=O.isPending,e[126]=s,e[127]=z,e[128]=J):J=e[128];let X;e[129]!==G||e[130]!==J?(X=o.jsxs("div",{className:"grid gap-10",children:[G,J]}),e[129]=G,e[130]=J,e[131]=X):X=e[131];let fe;return e[132]!==T||e[133]!==X?(fe=o.jsx(k,{visual:T,children:X}),e[132]=T,e[133]=X,e[134]=fe):fe=e[134],fe}function Re(t){const e=I.c(30),{siteUrl:i,error:n,isSubmitting:r,onSiteUrlChange:c,onSubmit:a}=t,s=q();let g;e[0]!==s?(g=s("routes.commerceOnboarding.siteUrlLabel"),e[0]=s,e[1]=g):g=e[1];let f;e[2]!==g?(f=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:g}),e[2]=g,e[3]=f):f=e[3];let u;e[4]!==c?(u=M=>c(M.target.value),e[4]=c,e[5]=u):u=e[5];let m;e[6]!==s?(m=s("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=s,e[7]=m):m=e[7];const d=!!n;let p;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==m||e[12]!==d?(p=o.jsx(ut,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:u,placeholder:m,"aria-invalid":d,disabled:r}),e[8]=r,e[9]=i,e[10]=u,e[11]=m,e[12]=d,e[13]=p):p=e[13];let S;e[14]!==n?(S=n?o.jsx(je,{message:n}):null,e[14]=n,e[15]=S):S=e[15];let b;e[16]!==f||e[17]!==p||e[18]!==S?(b=o.jsxs("div",{className:"grid gap-2",children:[f,p,S]}),e[16]=f,e[17]=p,e[18]=S,e[19]=b):b=e[19];let E;e[20]!==s?(E=s("routes.commerceOnboarding.authCopy.continue"),e[20]=s,e[21]=E):E=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx(Ct,{size:16}),e[22]=U):U=e[22];let N;e[23]!==r||e[24]!==E?(N=o.jsxs(ze,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[E,U]}),e[23]=r,e[24]=E,e[25]=N):N=e[25];let w;return e[26]!==a||e[27]!==N||e[28]!==b?(w=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[b,N]}),e[26]=a,e[27]=N,e[28]=b,e[29]=w):w=e[29],w}function je(t){const e=I.c(2),{message:i}=t;let n;return e[0]!==i?(n=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=n):n=e[1],n}export{ri as default};
@@ -1 +1 @@
1
- import{b as m}from"./extract-connection-data-RXmfvFPo.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
1
+ import{b as m}from"./extract-connection-data-D42gozmu.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
@@ -1,4 +1,4 @@
1
- import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-DzFeAmih.js";import{A as J,b as V}from"./alert-w50jcc8_.js";import{C as X}from"./card-DpuVySlk.js";import{c as T,T as L,b as B,a as D}from"./tabs-kN2Aee2Y.js";import{u as O}from"./use-copy-D1BaMPjx.js";import{i as F}from"./Check-Bi6FHyg2.js";import{a as I}from"./Copy01-BxOJ450o.js";import{i as q}from"./Key01-4Mmkv7Z9.js";import{n as Q}from"./LinkExternal01-dBRpR0f2.js";import{s as Z}from"./Trash01-DmogTFVy.js";import{P as z}from"./index-DtQLpmdp.js";import{c as ee}from"./settings-section-MtpFaw76.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-B-Jd0rrl.js";import"./sidebar-C0n_mIde.js";import"./LayoutLeft-mvQWrT-n.js";import"./use-mobile-Cx1QZnAF.js";import"./X-BOp8gH-p.js";import"./tooltip-kyZcGWQK.js";import"./ArrowUpRight-C-bgMDQB.js";import"./use-mcp-client-BC0h-vMK.js";import"./auth-DSNKOuKd.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
1
+ import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-CzbXi8Zw.js";import{A as J,b as V}from"./alert-B0R2yShA.js";import{C as X}from"./card-B-ovK44h.js";import{c as T,T as L,b as B,a as D}from"./tabs-s5sGoI6z.js";import{u as O}from"./use-copy-BN_DRLVx.js";import{i as F}from"./Check-CUU6x4Pg.js";import{a as I}from"./Copy01-BhI2f81T.js";import{i as q}from"./Key01-B0TDf7aH.js";import{n as Q}from"./LinkExternal01-DruIIGwr.js";import{s as Z}from"./Trash01-B5Hc0LiC.js";import{P as z}from"./index-QO34cjUr.js";import{c as ee}from"./settings-section-YA5IegES.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-4hCxu0oR.js";import"./sidebar-BEaUj8qU.js";import"./LayoutLeft-b_U4NE5x.js";import"./use-mobile-DsyeTCp3.js";import"./X-BguiaTPZ.js";import"./tooltip-CuAEyPad.js";import"./ArrowUpRight-DvRn4D26.js";import"./use-mcp-client-BNOr39vr.js";import"./auth-CvqbEBx3.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
2
2
  --header "Authorization: Bearer ${o}"`};if(e==="cursor"){const n={url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}if(e==="codex"){const n=[`[mcp_servers.${l}]`,`url = "${i}"`];return t==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
3
  `)}}if(e==="claude-desktop"){const n={type:"http",url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}return t==="oauth"?{language:"text",code:`${i}
4
4
 
@@ -1 +1 @@
1
- import{c as z,j as t,b as A,r as _,B,m as w}from"./index-DzFeAmih.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-CBEhCYac.js";import{u as P,S as F}from"./chat-context-CnIEE4i4.js";import{i as G}from"./Check-Bi6FHyg2.js";import{a as W}from"./Copy01-BxOJ450o.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=n):n=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=n):n=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:n}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,n=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const o=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==o.hostname||e[3]!==o.machineId||e[4]!==o.online||e[5]!==l||e[6]!==s||e[7]!==n){const c=o.hostname??o.machineId??n("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=o.online?n("chat.connectDesktopDialog.connectedTo",{desktopName:c}):n("chat.connectDesktopDialog.connectYourDesktop"),e[2]=o.hostname,e[3]=o.machineId,e[4]=o.online,e[5]=l,e[6]=s,e[7]=n,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==o.online||e[20]!==n?(D=o.online?n("chat.connectDesktopDialog.machineAgentsDescription"):n("chat.connectDesktopDialog.runCommandDescription"),e[19]=o.online,e[20]=n,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==o.online?(k=!o.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T).then(()=>{M(!0),setTimeout(()=>M(!1),1500)})},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=o.online,e[30]=k):k=e[30];let C;e[31]!==o.capabilities||e[32]!==o.online||e[33]!==n?(C=o.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=o.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:n(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),n("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=o.capabilities,e[32]=o.online,e[33]=n,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
1
+ import{c as z,j as t,b as A,r as _,B,m as w}from"./index-CzbXi8Zw.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-BV0NI63u.js";import{u as P,S as F}from"./chat-context-CIPTEVfg.js";import{i as G}from"./Check-CUU6x4Pg.js";import{a as W}from"./Copy01-BhI2f81T.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=n):n=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=n):n=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:n}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,n=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const o=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==o.hostname||e[3]!==o.machineId||e[4]!==o.online||e[5]!==l||e[6]!==s||e[7]!==n){const c=o.hostname??o.machineId??n("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=o.online?n("chat.connectDesktopDialog.connectedTo",{desktopName:c}):n("chat.connectDesktopDialog.connectYourDesktop"),e[2]=o.hostname,e[3]=o.machineId,e[4]=o.online,e[5]=l,e[6]=s,e[7]=n,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==o.online||e[20]!==n?(D=o.online?n("chat.connectDesktopDialog.machineAgentsDescription"):n("chat.connectDesktopDialog.runCommandDescription"),e[19]=o.online,e[20]=n,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==o.online?(k=!o.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T).then(()=>{M(!0),setTimeout(()=>M(!1),1500)})},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=o.online,e[30]=k):k=e[30];let C;e[31]!==o.capabilities||e[32]!==o.online||e[33]!==n?(C=o.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=o.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:n(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),n("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=o.capabilities,e[32]=o.online,e[33]=n,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
@@ -1 +1 @@
1
- import{c as M,F as $,a_ as L,K as k,m as _,j as I}from"./index-DzFeAmih.js";import{u as D}from"./use-registry-connections-Bj9gUy0P.js";import{c as K}from"./use-organization-settings-LGdD6tyl.js";import{S as w,j as F}from"./use-mcp-client-BC0h-vMK.js";import{u as Q}from"./useInfiniteQuery-BYUWCeUy.js";import{i as H,f as q}from"./extract-connection-data-RXmfvFPo.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as E}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-DpuVySlk.js";import{I as X}from"./integration-icon-CAGigShi.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,T=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:T,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${T} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=E(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=E(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=_("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:_("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};
1
+ import{c as M,F as $,a_ as L,K as k,m as _,j as I}from"./index-CzbXi8Zw.js";import{u as D}from"./use-registry-connections-DmiHfi09.js";import{c as K}from"./use-organization-settings-QvagJlDQ.js";import{S as w,j as F}from"./use-mcp-client-BNOr39vr.js";import{u as Q}from"./useInfiniteQuery-BGzADOY3.js";import{i as H,f as q}from"./extract-connection-data-D42gozmu.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as E}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-B-ovK44h.js";import{I as X}from"./integration-icon-BikUNVPK.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,T=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:T,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${T} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=E(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=E(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=_("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:_("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};