decocms 4.62.0 → 4.63.0

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 (252) hide show
  1. package/dist/client/assets/{AlertCircle-pDwFaZ69.js → AlertCircle-BkrprcoF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CUV8xbg8.js → AreaChart-BeF6Gy1z.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-DtY9ye1M.js → ArrowUp-CbMTR9M0.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BF8RC7lQ.js → ArrowUpRight-L-sW_E0D.js} +1 -1
  5. package/dist/client/assets/{Check-c3mV_Uni.js → Check-DZygR-Fe.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CE_q_EWl.js → CheckCircle-BLRVelyD.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Be1kUurm.js → ChevronDown-DDDop4Os.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-86cbncTU.js → ChevronRight-Cku8WSiq.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-7vDXTQHH.js → ChevronUp-PZzlDplk.js} +1 -1
  10. package/dist/client/assets/{Circle-Jj2lB_OB.js → Circle-CadYWyyA.js} +1 -1
  11. package/dist/client/assets/{Copy01-bnpfrlf8.js → Copy01-ryDblf5m.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Cw_RGd0K.js → DotsVertical-Dg3Xo34T.js} +1 -1
  13. package/dist/client/assets/{Eye-DSKes5cc.js → Eye-Bz-yLlBh.js} +1 -1
  14. package/dist/client/assets/{FilterLines-AFo6zz8G.js → FilterLines-CLgHUAPd.js} +1 -1
  15. package/dist/client/assets/{Globe01-CINqduC_.js → Globe01-JMrbqgtG.js} +1 -1
  16. package/dist/client/assets/{Globe04-Df4bCIam.js → Globe04-MZEsVtUE.js} +1 -1
  17. package/dist/client/assets/{HardDrive-C9RJVCTC.js → HardDrive-P0VrWAsS.js} +1 -1
  18. package/dist/client/assets/{Key01-BufYrbpv.js → Key01-CxVX_Pbg.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-Dg-hdc1o.js → LayoutLeft-Ccrzp7iH.js} +1 -1
  20. package/dist/client/assets/{LinkExternal01-jNsZTUJe.js → LinkExternal01-DNPuUmDD.js} +1 -1
  21. package/dist/client/assets/{List-jTag997N.js → List-CbUCe9_w.js} +1 -1
  22. package/dist/client/assets/{Monitor01-Cgb6dKKW.js → Monitor01-8E0Kd0bb.js} +1 -1
  23. package/dist/client/assets/{Package-Bm7E2eK0.js → Package-0lPNEylQ.js} +1 -1
  24. package/dist/client/assets/{Palette-D0cmCBJm.js → Palette-BMnON_zo.js} +1 -1
  25. package/dist/client/assets/{Play-DL5iVtNY.js → Play-qfGjc7w4.js} +1 -1
  26. package/dist/client/assets/{Plus-SxhLmH-g.js → Plus-cs1N_W6b.js} +1 -1
  27. package/dist/client/assets/{SearchLg-DalS_9no.js → SearchLg-Cpz6OE5G.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DXMQuWHS.js → SearchMd-D4gbfQvO.js} +1 -1
  29. package/dist/client/assets/{Settings02-Ci6H3sb0.js → Settings02-BQIcnVua.js} +1 -1
  30. package/dist/client/assets/{Shield01-CFnvQppZ.js → Shield01-uN7yLkjY.js} +1 -1
  31. package/dist/client/assets/{Star01-ZuQ9gpI3.js → Star01-B61mWKGP.js} +1 -1
  32. package/dist/client/assets/{Stars01-MX3VUC0h.js → Stars01-COCvCNwS.js} +1 -1
  33. package/dist/client/assets/{Stars02-ClT22kUl.js → Stars02-DCivmeGP.js} +1 -1
  34. package/dist/client/assets/{Sun-C2eqMrg3.js → Sun-CN1qXAbA.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-CTbgmfyn.js → SwitchHorizontal01-MT4LDKEV.js} +1 -1
  36. package/dist/client/assets/{Tool01-CcmA_w81.js → Tool01-Beyaqvxk.js} +1 -1
  37. package/dist/client/assets/{Tool02-DsdesO-0.js → Tool02-jYwfK8WU.js} +1 -1
  38. package/dist/client/assets/{Trash01-RuXWiql6.js → Trash01-CgtbhVG5.js} +1 -1
  39. package/dist/client/assets/Trash03-rtk2CmiW.js +1 -0
  40. package/dist/client/assets/{TrendUp01-RmaL7vVA.js → TrendUp01-2mG8Ply8.js} +1 -1
  41. package/dist/client/assets/{Upload01-t4JMvfO4.js → Upload01-CpJQboow.js} +1 -1
  42. package/dist/client/assets/{User01-nY_0gSR5.js → User01-Bnj-cSVO.js} +1 -1
  43. package/dist/client/assets/{Users01-COP9ABdE.js → Users01-0zLYZpC7.js} +1 -1
  44. package/dist/client/assets/{Users03-CwOsvMmx.js → Users03-7mmR4h8P.js} +1 -1
  45. package/dist/client/assets/{X-82Zaa9wO.js → X-BhKPwXx-.js} +1 -1
  46. package/dist/client/assets/{XCircle-DFVEpL7j.js → XCircle-BjlDFDl6.js} +1 -1
  47. package/dist/client/assets/{XClose-DGRyO79b.js → XClose-tZL2IdJO.js} +1 -1
  48. package/dist/client/assets/{Zap-DGilRzov.js → Zap-BPZV9XTy.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-x5bylaAn.js → ZapSquare-C0baTxoC.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-d0pU1jsr.js → ZoomOut-CS3Og5lE.js} +1 -1
  51. package/dist/client/assets/{access-gate-B9Uqf_RZ.js → access-gate-D5TOVD3E.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-F3LoJMj-.js → add-section-modal-tXpF1_lX.js} +1 -1
  53. package/dist/client/assets/agent-icon-DkxLV1fV.js +1 -0
  54. package/dist/client/assets/agents-list-7jGVMclg.js +1 -0
  55. package/dist/client/assets/{ai-providers-_h8FzskN.js → ai-providers-DfYQ_QQL.js} +1 -1
  56. package/dist/client/assets/{alert-D7vvtYHx.js → alert-BGbl-kfx.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-BbUTua7Y.js → alert-dialog-qVVgQZs_.js} +1 -1
  58. package/dist/client/assets/app-editor-B_ZP-aVy.js +1 -0
  59. package/dist/client/assets/{auth-Cduc78Mk.js → auth-D3FIklA5.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-BiGQzMvA.js → auth-catchall-DIcQ-n8K.js} +1 -1
  61. package/dist/client/assets/{auth-entry-B1IjK16Y.js → auth-entry-LhmBIgh6.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-B5WaIo2U.js → auth-split-layout-D1GUoAkz.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-Bsjhlz6M.js → authenticate-and-persist-oauth-C4jnnZWl.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-tfqwgW_l.js → automation-list-row-D0R4MbNV.js} +1 -1
  65. package/dist/client/assets/{automation-runs-HchqpNoW.js → automation-runs-BYtwdZxc.js} +1 -1
  66. package/dist/client/assets/automations--Z24mOUf.js +1 -0
  67. package/dist/client/assets/{autosend-CFSFemh9.js → autosend-D43Y2Wye.js} +1 -1
  68. package/dist/client/assets/{avatar-ChSwYwdc.js → avatar-CEhTtT5Z.js} +1 -1
  69. package/dist/client/assets/{badge-BDCVlL_X.js → badge-BRITDvjk.js} +1 -1
  70. package/dist/client/assets/{block-document-CwHUDj3Z.js → block-document-CHZpIPJn.js} +1 -1
  71. package/dist/client/assets/{brand-context-KxYFeM0J.js → brand-context-DNx2wpN3.js} +1 -1
  72. package/dist/client/assets/{buckets-BB9qHXCG.js → buckets-BBci7RWl.js} +1 -1
  73. package/dist/client/assets/bulk-category-panel-CCrSnxHT.js +1 -0
  74. package/dist/client/assets/calendar-DITgsboQ.js +1 -0
  75. package/dist/client/assets/{capability-load-error-C5KrMr5A.js → capability-load-error-C3U-K2hK.js} +1 -1
  76. package/dist/client/assets/{card-CZ_4AnzZ.js → card-dUi6YgZ6.js} +1 -1
  77. package/dist/client/assets/category-editor-BlBFOzrv.js +1 -0
  78. package/dist/client/assets/{chat-context-DHiffp4D.js → chat-context-Iman-MuU.js} +1 -1
  79. package/dist/client/assets/{checkbox-B0y92ybh.js → checkbox-BvCpvEfo.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-BJQaPA_u.js → cli-auth-success-DyhlAsFy.js} +1 -1
  81. package/dist/client/assets/collection-detail-CXqm_V0F.js +1 -0
  82. package/dist/client/assets/{collection-display-button-CTkls5Hq.js → collection-display-button-IFaJZ5V5.js} +1 -1
  83. package/dist/client/assets/{collection-search-B1ZoXYDP.js → collection-search-B0UfZ-OT.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-CzOELqST.js → collection-table-wrapper-CoEKWaCw.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-DSyyuCu8.js → collection-tabs-CpnfoB9V.js} +1 -1
  86. package/dist/client/assets/{command-NscuxjlL.js → command-cobicZB1.js} +1 -1
  87. package/dist/client/assets/commerce-onboarding-FW4szuTn.js +1 -0
  88. package/dist/client/assets/{connect-desktop-dialog-C_zkxzg2.js → connect-desktop-dialog-DWRyRSkj.js} +1 -1
  89. package/dist/client/assets/{connection-card-DgJ4fCkV.js → connection-card-LUMMlH6G.js} +1 -1
  90. package/dist/client/assets/connection-detail-DoPkmdCs.js +1 -0
  91. package/dist/client/assets/{connection-form-helpers-CoPiWrjw.js → connection-form-helpers-yaifOq7s.js} +1 -1
  92. package/dist/client/assets/connections-4fdav7OM.js +1 -0
  93. package/dist/client/assets/constants-D_FQAPnt.js +1 -0
  94. package/dist/client/assets/decopilot-sse-pool-D5PMEPBF.js +1 -0
  95. package/dist/client/assets/{dialog-BxiPyolh.js → dialog-BzVEcj79.js} +1 -1
  96. package/dist/client/assets/{domain-settings-DixzI7vw.js → domain-settings-DCcEckko.js} +1 -1
  97. package/dist/client/assets/{drawer-HMFyJ4Dn.js → drawer-DTss_--q.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-B8LX4IYo.js → dropdown-menu-DDThFULM.js} +1 -1
  99. package/dist/client/assets/{empty-state-BJyyJcI7.js → empty-state-Bfm4FdaU.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-CgMMiKb9.js → extract-connection-data-B3b_eFbC.js} +1 -1
  101. package/dist/client/assets/file-explorer-D3ekbS0A.js +2 -0
  102. package/dist/client/assets/{file-type-icon-aF4rioSK.js → file-type-icon-Co-9ap-O.js} +1 -1
  103. package/dist/client/assets/{files-DlatlTEv.js → files-nenoVdXA.js} +1 -1
  104. package/dist/client/assets/{form-NWTw1_w9.js → form-BEFBxu79.js} +1 -1
  105. package/dist/client/assets/{general-B6MHlXUW.js → general-DhzgM9yi.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-BgT_NiIP.js → github-repo-picker-Bc5KArQ0.js} +1 -1
  107. package/dist/client/assets/{hooks-7RE64ble.js → hooks-pnrq3avL.js} +1 -1
  108. package/dist/client/assets/{index-C6SqXYAf.js → index-47mQkAxc.js} +1 -1
  109. package/dist/client/assets/{index-CNXl1ql2.js → index-B6vBs0RJ.js} +1 -1
  110. package/dist/client/assets/index-Bjoka7jJ.js +1 -0
  111. package/dist/client/assets/{index-FOhB290E.js → index-C-QXvkc1.js} +1 -1
  112. package/dist/client/assets/{index-CPLWHNIg.js → index-CBuBybHp.js} +28 -28
  113. package/dist/client/assets/{index-Fk54aBQb.js → index-CI_dJNCw.js} +1 -1
  114. package/dist/client/assets/{index-BQNtvMv8.js → index-CX5pjTTE.js} +1 -1
  115. package/dist/client/assets/{index-CGtkbkWC.js → index-CYRx6VZs.js} +1 -1
  116. package/dist/client/assets/index-Ct4UCmlw.css +1 -0
  117. package/dist/client/assets/{index-Cv4TIpz2.js → index-D6481a7y.js} +1 -1
  118. package/dist/client/assets/{index-DX7CG04Y.js → index-DEFe_Ioe.js} +1 -1
  119. package/dist/client/assets/{index-Dz-SEkbI.js → index-Dw17x_vM.js} +1 -1
  120. package/dist/client/assets/{index-w9OsdEvg.js → index-ZeEdh6la.js} +1 -1
  121. package/dist/client/assets/index-ho6IJJiJ.js +1 -0
  122. package/dist/client/assets/{index-redirect-D_1i3wgr.js → index-redirect-CId9LITt.js} +1 -1
  123. package/dist/client/assets/{index-CtlgC1KW.js → index-v1F20B0E.js} +3 -3
  124. package/dist/client/assets/{input-D0-jk8XC.js → input-DoMDIxWk.js} +1 -1
  125. package/dist/client/assets/{integration-icon-BxCXFWwF.js → integration-icon-NHRUL2M2.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-CczkEEVJ.js → invite-member-dialog-DPbJQBPO.js} +1 -1
  127. package/dist/client/assets/{label-CI8zXgUl.js → label-BRpUtjMO.js} +1 -1
  128. package/dist/client/assets/{layout-DsSv6cI0.js → layout-YL1-WGtk.js} +1 -1
  129. package/dist/client/assets/{login-vc557tVg.js → login-mI70aY7y.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-Crm2yFws.js → mcp-oauth-BhDqbGNe.js} +1 -1
  131. package/dist/client/assets/{members-BriZzAKO.js → members-CcmOVZeT.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-BSERZA56.js → monaco-editor-CN68a7_6.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-Bzy4MOqt.js → monitoring-stats-row-g88EsnKJ.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-BweaHAfJ.js → oauth-callback-Dxm8R7-5.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-DGFuYZT6.js → oauth-callback-ai-provider-DoOKE-xx.js} +1 -1
  136. package/dist/client/assets/{onboarding-CGfqD1Pb.js → onboarding-B1NNpnvc.js} +1 -1
  137. package/dist/client/assets/{org-install-C4kxLg_g.js → org-install-BGV7QX9d.js} +1 -1
  138. package/dist/client/assets/{org-layout-DzZAcdj6.js → org-layout-e4sSXc2-.js} +1 -1
  139. package/dist/client/assets/{organization-choice-D69Iyg_P.js → organization-choice-MatHTHWS.js} +1 -1
  140. package/dist/client/assets/{orgs-CvM6zK17.js → orgs-DyYyghqa.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-C8i2PCcW.js → page-seo-form-BdXxVdKh.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-iRiW3JQ1.js +1 -0
  143. package/dist/client/assets/{popover-4SjKIFSf.js → popover-BhTglK_V.js} +1 -1
  144. package/dist/client/assets/post-editor-BhXErJkg.js +1 -0
  145. package/dist/client/assets/{primitives-IUnUzi8K.js → primitives-ENZTjlku.js} +1 -1
  146. package/dist/client/assets/{profile-op77lWAk.js → profile-C8J4RX1p.js} +1 -1
  147. package/dist/client/assets/project-app-view-CLqEVreP.js +1 -0
  148. package/dist/client/assets/record-editor-CHvIMmJ7.js +1 -0
  149. package/dist/client/assets/registry-CmtvdFTb.js +2 -0
  150. package/dist/client/assets/{registry-layout-DPozdEQJ.js → registry-layout-DFPPdTUd.js} +1 -1
  151. package/dist/client/assets/{reports-AOzd79LO.js → reports-B3Fg6jp_.js} +1 -1
  152. package/dist/client/assets/{require-capability-BIrGCy6a.js → require-capability-D-A54-k8.js} +1 -1
  153. package/dist/client/assets/{required-auth-layout-CQN5hr5X.js → required-auth-layout-LPVLIFMc.js} +1 -1
  154. package/dist/client/assets/{reset-password-DyAxea_4.js → reset-password-CVjmIBh9.js} +1 -1
  155. package/dist/client/assets/roles-BxJj-xe3.js +1 -0
  156. package/dist/client/assets/{search-input-DAhQOW8w.js → search-input-B7l4w6Nk.js} +1 -1
  157. package/dist/client/assets/{secrets-Bca-yEgx.js → secrets-9rA0Xv9T.js} +1 -1
  158. package/dist/client/assets/{sections-editor-A9ozMN_I.js → sections-editor-bOiVAtcG.js} +1 -1
  159. package/dist/client/assets/{select-DymbSi1i.js → select-DJ-xJfBd.js} +1 -1
  160. package/dist/client/assets/{select-model-CBmm5efp.js → select-model-wshUAo0W.js} +1 -1
  161. package/dist/client/assets/{self-tool-result-DQZF7wnw.js → self-tool-result-BJKZmspV.js} +1 -1
  162. package/dist/client/assets/seo-editor-3ntseOCn.js +1 -0
  163. package/dist/client/assets/{settings-layout-BbrrKyAB.js → settings-layout-B8wOMjDB.js} +1 -1
  164. package/dist/client/assets/{settings-section-BorHlHtt.js → settings-section-C6yf8yzB.js} +1 -1
  165. package/dist/client/assets/{shell-controls-D4pwQUJp.js → shell-controls-BZMA1sGn.js} +1 -1
  166. package/dist/client/assets/{shell-layout-DSlq9QDA.js → shell-layout-CDHmuxZH.js} +1 -1
  167. package/dist/client/assets/{sidebar-BGBaPTiJ.js → sidebar-DMHBEB3a.js} +1 -1
  168. package/dist/client/assets/{skeleton-Cs7umMol.js → skeleton-CYnpNimL.js} +1 -1
  169. package/dist/client/assets/{sso-CSY_I7_s.js → sso-BzMLp8-J.js} +1 -1
  170. package/dist/client/assets/{store-CbwbkmsP.js → store-BOc0PBwD.js} +1 -1
  171. package/dist/client/assets/store-registry-DIdlXcXO.js +2 -0
  172. package/dist/client/assets/{studio-tools-Dm4swbDJ.js → studio-tools-Dta_1_QR.js} +1 -1
  173. package/dist/client/assets/{switch-DenJ-Rqp.js → switch-CxGmjhpb.js} +1 -1
  174. package/dist/client/assets/{table-6yLqG5BG.js → table-IyQgqCyJ.js} +1 -1
  175. package/dist/client/assets/{tabs-B41R3KT7.js → tabs-DJSveVrG.js} +1 -1
  176. package/dist/client/assets/{textarea-DDx4ded2.js → textarea-D5CZ7ZsG.js} +1 -1
  177. package/dist/client/assets/{toggle-group-DxbzbSVL.js → toggle-group-TzWGQhcY.js} +1 -1
  178. package/dist/client/assets/{toolbar-Dw7sJZzm.js → toolbar-DT9Q65OX.js} +1 -1
  179. package/dist/client/assets/{toolbar-icon-button-DRu94yPg.js → toolbar-icon-button-DCDLCG5U.js} +1 -1
  180. package/dist/client/assets/{tools-list-gF6CK4rd.js → tools-list-CnR-7U8Q.js} +1 -1
  181. package/dist/client/assets/{tooltip-2S76Z1GN.js → tooltip-CwWmycdW.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-BRJFSGox.js → use-ai-providers-jn20SAL8.js} +1 -1
  183. package/dist/client/assets/{use-automations-CtMMZwGK.js → use-automations-BBihr9dY.js} +1 -1
  184. package/dist/client/assets/{use-capability-Cr4AoWjX.js → use-capability-CXLvhLL0.js} +1 -1
  185. package/dist/client/assets/{use-clock-tick-YishFSE2.js → use-clock-tick-GG7JJthC.js} +1 -1
  186. package/dist/client/assets/{use-collections-Bq6tf4lW.js → use-collections-Bw1ej6HH.js} +1 -1
  187. package/dist/client/assets/{use-connection-C0xfUPl-.js → use-connection-DivkmGF9.js} +1 -1
  188. package/dist/client/assets/{use-copy-D7Lvwi_8.js → use-copy-CciEBKiS.js} +1 -1
  189. package/dist/client/assets/{use-create-virtual-mcp-CT3JpXjp.js → use-create-virtual-mcp-DkjEcux9.js} +1 -1
  190. package/dist/client/assets/{use-debounced-autosave-DnYuRWI8.js → use-debounced-autosave-0ivINAXf.js} +1 -1
  191. package/dist/client/assets/{use-debounced-value-LiVhfciY.js → use-debounced-value-D_iu4VB9.js} +1 -1
  192. package/dist/client/assets/{use-deco-credits-DTpKn8hS.js → use-deco-credits-D2VFeHYN.js} +1 -1
  193. package/dist/client/assets/{use-decopilot-events-42PTdhf1.js → use-decopilot-events-BT5pbFoO.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-CKLjJrR4.js → use-delete-connection-j9ShOV4G.js} +1 -1
  195. package/dist/client/assets/{use-deployment-admin-Cfv-0c-V.js → use-deployment-admin-EW9j2pmW.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-DRXMLwD-.js → use-file-configs-CZB3TWDj.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-BkP7H-cz.js → use-infinite-scroll-DRJmUT_7.js} +1 -1
  198. package/dist/client/assets/{use-join-requests-l1azjTjY.js → use-join-requests-DojedTk5.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-8-W_7yBa.js → use-mcp-client-BmyqfqxQ.js} +1 -1
  200. package/dist/client/assets/{use-mcp-tools-CUOQhfsg.js → use-mcp-tools-BH7UZO6u.js} +1 -1
  201. package/dist/client/assets/{use-members-CynVAzPM.js → use-members-B9xQq8Nf.js} +1 -1
  202. package/dist/client/assets/{use-mobile-CcO0QCgb.js → use-mobile-Dyi4jnPJ.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-DNjmGLp3.js → use-navigate-to-agent-CXN_R57g.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-mw0sCxV3.js → use-org-auth-client-DvR9aTwL.js} +1 -1
  205. package/dist/client/assets/{use-org-sso-BjHGhVgE.js → use-org-sso-BpWCWfK7.js} +1 -1
  206. package/dist/client/assets/{use-organization-roles-Cjha62oV.js → use-organization-roles-DrGTxpZM.js} +1 -1
  207. package/dist/client/assets/{use-organization-settings-B3aKfsZI.js → use-organization-settings-JlbwL6sx.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-CVi0ypH7.js → use-registry-connections-DlCFmIUa.js} +1 -1
  209. package/dist/client/assets/{use-secrets-C5knhQtS.js → use-secrets-CZWYXwBu.js} +1 -1
  210. package/dist/client/assets/{use-status-sounds-C434uotZ.js → use-status-sounds-Bw2veslR.js} +1 -1
  211. package/dist/client/assets/{use-view-mode-BeALUlwT.js → use-view-mode-_M46l8bo.js} +1 -1
  212. package/dist/client/assets/{use-virtual-mcp-BjiOjpKa.js → use-virtual-mcp-pJk84Xzr.js} +1 -1
  213. package/dist/client/assets/useInfiniteQuery-DKESjHh5.js +1 -0
  214. package/dist/client/assets/{useRouterState-BRB-iA8I.js → useRouterState-BVrfD4QF.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-DLe2YLWa.js +1 -0
  216. package/dist/client/assets/{users-D2x-LE8o.js → users-BFk7oxwk.js} +1 -1
  217. package/dist/client/assets/variant-calendar-BFmG35Fm.js +1 -0
  218. package/dist/client/assets/{view-mode-toggle-JDik54gp.js → view-mode-toggle-GXZBM6av.js} +1 -1
  219. package/dist/client/index.html +2 -2
  220. package/dist/server/cli.js +605 -601
  221. package/dist/server/migrate.js +75 -75
  222. package/dist/server/server.js +383 -379
  223. package/package.json +1 -1
  224. package/dist/client/assets/Loading02-DXivv_GE.js +0 -1
  225. package/dist/client/assets/agent-icon-Bx7GZZkT.js +0 -1
  226. package/dist/client/assets/agents-list-DA2O4yFI.js +0 -1
  227. package/dist/client/assets/app-editor-Ba6EJE8k.js +0 -1
  228. package/dist/client/assets/automations-3g-k57eu.js +0 -1
  229. package/dist/client/assets/bulk-category-panel-mDoc713s.js +0 -1
  230. package/dist/client/assets/calendar-DkErgVju.js +0 -1
  231. package/dist/client/assets/category-editor-CoE1JSlR.js +0 -1
  232. package/dist/client/assets/collection-detail-B85L8fXv.js +0 -1
  233. package/dist/client/assets/commerce-onboarding-DS2bNsVf.js +0 -1
  234. package/dist/client/assets/connection-detail-BHWNvMoI.js +0 -1
  235. package/dist/client/assets/connections-ByyzNSeZ.js +0 -1
  236. package/dist/client/assets/constants-CaIX_f5U.js +0 -1
  237. package/dist/client/assets/decopilot-sse-pool-jzNdhqzZ.js +0 -1
  238. package/dist/client/assets/file-explorer-B2mELjEV.js +0 -2
  239. package/dist/client/assets/index-6OJYzM5S.js +0 -1
  240. package/dist/client/assets/index-Bn17GDJi.js +0 -1
  241. package/dist/client/assets/index-D6W0Zja4.css +0 -1
  242. package/dist/client/assets/page-seo-sheet-Bj1PQ_T3.js +0 -1
  243. package/dist/client/assets/post-editor-DwhUQfz3.js +0 -1
  244. package/dist/client/assets/project-app-view-Bw5vRwKV.js +0 -1
  245. package/dist/client/assets/record-editor-CO3ZgdGS.js +0 -1
  246. package/dist/client/assets/registry-DasK6zXw.js +0 -2
  247. package/dist/client/assets/roles-Bmag3QoK.js +0 -1
  248. package/dist/client/assets/seo-editor-D8BRx5cO.js +0 -1
  249. package/dist/client/assets/store-registry-3IML_T0w.js +0 -2
  250. package/dist/client/assets/useInfiniteQuery-C5v-SAtB.js +0 -1
  251. package/dist/client/assets/useSuspenseInfiniteQuery-BeixZw8P.js +0 -1
  252. package/dist/client/assets/variant-calendar-BcqsqX_c.js +0 -1
@@ -1 +0,0 @@
1
- import{c as ne,j as s,B as Q,C as de,n as fe,a as he,r as q,m as ge,K as te,d as xe,p as $,t as se,l as je}from"./index-CtlgC1KW.js";import{d as W,c as me,a as oe,D as ie}from"./dropdown-menu-B8LX4IYo.js";import{a as be}from"./Users03-CwOsvMmx.js";import{a as ue,b as Ce,p as ye,G as we}from"./github-repo-picker-BgT_NiIP.js";import{u as _e,b as Ne,c as Se}from"./use-virtual-mcp-BjiOjpKa.js";import{P as Z}from"./index-BQNtvMv8.js";import{i as ve}from"./DotsVertical-Cw_RGd0K.js";import{a as Ie,b as De}from"./Settings02-Ci6H3sb0.js";import{s as Ee}from"./Trash01-RuXWiql6.js";import{A as Ae,aC as Te}from"./agent-icon-Bx7GZZkT.js";import{c as pe}from"./use-navigate-to-agent-DNjmGLp3.js";import{C as ke}from"./card-CZ_4AnzZ.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as Le}from"./use-capability-Cr4AoWjX.js";import{E as Ge}from"./empty-state-BJyyJcI7.js";import{u as Oe}from"./use-create-virtual-mcp-CT3JpXjp.js";import{u as Pe}from"./use-connection-C0xfUPl-.js";import{u as le}from"./use-mcp-client-8-W_7yBa.js";import{S as ze}from"./constants-CaIX_f5U.js";import{a as Me,f as $e,b as He}from"./github-installations-D2vHSx02.js";import{e as Re,d as Fe,D as Ue,a as Be,c as Ve}from"./dialog-BxiPyolh.js";import{C as Ke}from"./collection-search-B1ZoXYDP.js";import{c as qe,b as Qe,d as Je,A as We,e as Ye,g as Xe,a as Ze,f as et}from"./alert-dialog-BbUTua7Y.js";import{S as tt}from"./search-input-DAhQOW8w.js";import{s as ae}from"./Plus-SxhLmH-g.js";import"./Check-c3mV_Uni.js";import"./ChevronRight-86cbncTU.js";import"./Circle-Jj2lB_OB.js";import"./use-debounced-value-LiVhfciY.js";import"./authenticate-and-persist-oauth-Bsjhlz6M.js";import"./mcp-oauth-Crm2yFws.js";import"./auth-Cduc78Mk.js";import"./use-mcp-tools-CUOQhfsg.js";import"./extract-connection-data-CgMMiKb9.js";import"./use-collections-Bq6tf4lW.js";import"./sidebar-BGBaPTiJ.js";import"./LayoutLeft-Dg-hdc1o.js";import"./use-mobile-CcO0QCgb.js";import"./X-82Zaa9wO.js";import"./tooltip-2S76Z1GN.js";import"./AlertCircle-pDwFaZ69.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Tool02-DsdesO-0.js";import"./XCircle-DFVEpL7j.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Loading02-DXivv_GE.js";import"./CheckCircle-CE_q_EWl.js";import"./ChevronDown-Be1kUurm.js";import"./ChevronUp-7vDXTQHH.js";import"./Stars02-ClT22kUl.js";import"./Copy01-bnpfrlf8.js";import"./ZoomOut-d0pU1jsr.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./Key01-BufYrbpv.js";import"./LinkExternal01-jNsZTUJe.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./Play-DL5iVtNY.js";import"./SearchLg-DalS_9no.js";import"./SearchMd-DXMQuWHS.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./Zap-DGilRzov.js";import"./hooks-7RE64ble.js";import"./decopilot-sse-pool-jzNdhqzZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./differenceInSeconds-NQ4PDo0z.js";function ce(t){const e=ne.c(19),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:c,isCreating:C,align:y,side:d,showBetaBadge:g}=t,w=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(be,{size:14}),e[0]=x):x=e[0];let m;e[1]!==C||e[2]!==i?(m=s.jsxs(W,{disabled:C,onClick:i,children:[x,"Create from scratch"]}),e[1]=C,e[2]=i,e[3]=m):m=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{className:"size-3.5"}),e[4]=p):p=e[4];let l;e[5]!==g?(l=g&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[5]=g,e[6]=l):l=e[6];let f;e[7]!==n||e[8]!==l?(f=s.jsxs(W,{onClick:n,children:[p,"Import from GitHub",l]}),e[7]=n,e[8]=l,e[9]=f):f=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[10]=a):a=e[10];let r;e[11]!==c?(r=s.jsxs(W,{onClick:c,children:[a,"Import from deco.cx"]}),e[11]=c,e[12]=r):r=e[12];let u;return e[13]!==w||e[14]!==d||e[15]!==m||e[16]!==f||e[17]!==r?(u=s.jsxs(me,{side:d,align:w,className:"w-48",children:[m,f,r]}),e[13]=w,e[14]=d,e[15]=m,e[16]=f,e[17]=r,e[18]=u):u=e[18],u}function st(t){const e=ne.c(45),{project:i,lastUsedAt:n,onDeleteClick:c}=t,C=pe();let y;e[0]!==C||e[1]!==i.id?(y=()=>C(i.id),e[0]=C,e[1]=i.id,e[2]=y):y=e[2];let d;e[3]!==i.title||e[4]!==y?(d=s.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=y,e[5]=d):d=e[5];let g;e[6]!==i.icon||e[7]!==i.title?(g=s.jsx(Ae,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=g):g=e[8];let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(oe,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(ve,{size:20})})}),e[9]=w):w=e[9];let x;e[10]!==C||e[11]!==i.id?(x=()=>C(i.id,{search:{main:"settings"}}),e[10]=C,e[11]=i.id,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ie,{size:16}),e[13]=m):m=e[13];let p;e[14]!==x?(p=s.jsxs(W,{onClick:x,children:[m,"Settings"]}),e[14]=x,e[15]=p):p=e[15];let l;e[16]!==c?(l=c&&s.jsxs(W,{variant:"destructive",onClick:G=>{G.stopPropagation(),c(G)},children:[s.jsx(Ee,{size:16}),"Delete"]}),e[16]=c,e[17]=l):l=e[17];let f;e[18]!==p||e[19]!==l?(f=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(ie,{children:[w,s.jsxs(me,{align:"end",children:[p,l]})]})}),e[18]=p,e[19]=l,e[20]=f):f=e[20];let a;e[21]!==g||e[22]!==f?(a=s.jsxs("div",{className:"flex items-start justify-between",children:[g,f]}),e[21]=g,e[22]=f,e[23]=a):a=e[23];let r;e[24]!==i.title?(r=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=r):r=e[25];const u=i.description||"No description";let I;e[26]!==u?(I=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:u}),e[26]=u,e[27]=I):I=e[27];let D;e[28]!==r||e[29]!==I?(D=s.jsxs("div",{className:"flex flex-col gap-1",children:[r,I]}),e[28]=r,e[29]=I,e[30]=D):D=e[30];let _;e[31]!==a||e[32]!==D?(_=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[a,D]}),e[31]=a,e[32]=D,e[33]=_):_=e[33];let T;e[34]!==n||e[35]!==i.updated_at?(T=n?`Last used ${re(new Date(n),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=n,e[35]=i.updated_at,e[36]=T):T=e[36];let N;e[37]!==T?(N=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:T})})}),e[37]=T,e[38]=N):N=e[38];let k;e[39]!==_||e[40]!==N?(k=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[_,N]}),e[39]=_,e[40]=N,e[41]=k):k=e[41];let S;return e[42]!==k||e[43]!==d?(S=s.jsxs(ke,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[d,k]}),e[42]=k,e[43]=d,e[44]=S):S=e[44],S}const ot="deco-sites";function it(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function nt(t,e){const i=e?it(e):null,n=i?.owner??ot,c=i?.repo??t;return{owner:n,name:c,url:`https://github.com/${n}/${c}`}}function rt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function lt(t){const e=await fetch(`/api/${t}/deco-sites`);if(!e.ok){const i=await e.json().catch(()=>({}));throw new Error(i.error??`Failed to load sites (${e.status})`)}return e.json()}function at({open:t,onOpenChange:e,onBack:i}){const{org:n}=de(),c=pe(),C=fe(),{data:y}=he.useSession(),[d,g]=q.useState(null),[w,x]=q.useState(null),[m,p]=q.useState(""),l=le({connectionId:ze,orgId:n.id,orgSlug:n.slug}),f=Pe({slug:"mcp-github"}),a=Me(f),r=Ce({enabled:t&&a.length===0}),u=a.length===1?a[0]??null:w,I=a.length>1&&!u,D=le({connectionId:u?.id??"",orgId:n.id,orgSlug:n.slug}),_=t&&a.length===0&&(r.status==="installing"||r.status==="authenticating"||r.status==="idle"),{data:T,isLoading:N,error:k}=ge({queryKey:te.decoSites(y?.user?.email),queryFn:()=>lt(n.slug),enabled:t&&!!y?.user?.email,staleTime:6e4,retry:!1}),S=T?.sites??[],G=o=>{o||(g(null),x(null),p("")),e(o)},P=S.filter(o=>o.name.toLowerCase().includes(m.toLowerCase())||(o.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),R=!d||P.some(o=>o.name===d),O=xe({mutationFn:async o=>{if(!u)throw new Error("GitHub is not connected. Complete GitHub setup and try again.");$("deco_site_import_started",{site_name:o});const{installations:L,appSlug:v}=await $e(b=>l.callTool(b),u.id),E=S.find(b=>b.name===o);if(!E)throw new Error("Selected site is no longer available");const j=nt(o,E.metadata),z=He(L,j.owner);if(!z){const b=v?`https://github.com/apps/${v}/installations/new`:"https://github.com/settings/installations";throw new Error(`Install the GitHub App on the "${j.owner}" organization to import this site. ${b}`)}let V=null,F=null,U=null;const J=async()=>{U&&await l.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:U}}).catch(()=>{}),F&&await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:F,force:!0}}).catch(()=>{}),V&&await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:V,force:!0}}).catch(()=>{})};try{const b=await fetch(`/api/${n.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:o})}),B=await b.json().catch(()=>({}));if(!b.ok)throw new Error(B.error??`Failed to create connection (${b.status})`);const A=B.connId;if(!A)throw new Error("Server did not return a connection ID");V=A;const{childConnectionId:M}=await ye({orgSlug:n.slug,sourceConnection:u,installationId:z.installationId,owner:j.owner,repo:j.name,githubCallTool:ee=>D.callTool(ee),selfCallTool:ee=>l.callTool(ee)});F=M;const H=B.icon??null,K=rt(o),h=o.toLowerCase(),Y=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:o,description:"Imported from deco.cx",pinned:!1,icon:H??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:h,githubRepo:{owner:j.owner,name:j.name,url:j.url,installationId:z.installationId,connectionId:M},ui:{banner:null,bannerColor:"#22C55E",icon:H,themeColor:"#22C55E",slug:K,pinnedViews:[{connectionId:A,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:A,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A},{connection_id:M}]}}}),X=Y.structuredContent??Y;if(!X.item?.id)throw new Error("Failed to create the imported agent");return U=X.item.id,{slug:K,virtualMcpId:X.item.id,connId:A,item:X.item}}catch(b){throw await J(),b}},onSuccess:({slug:o,virtualMcpId:L,item:v})=>{$("deco_site_import_succeeded",{site_name:v.title,virtual_mcp_id:L,slug:o}),C.setQueryData(te.collectionItem(l,n.id,"","VIRTUAL_MCP",L),{item:v}),C.invalidateQueries({predicate:E=>{const j=E.queryKey;return j[1]===n.id&&j[3]==="collection"&&j[4]==="VIRTUAL_MCP"}}),C.invalidateQueries({queryKey:te.projects(n.id)}),se.success(`Imported ${o} from deco.cx`),G(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(L)},onError:o=>{$("deco_site_import_failed",{error:o instanceof Error?o.message:"Unknown error"}),se.error("Import failed: "+(o instanceof Error?o.message:"Unknown error"))}});return s.jsx(Re,{open:t,onOpenChange:G,children:s.jsxs(Fe,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[s.jsx(Ue,{className:"sr-only",children:s.jsx(Be,{children:"Import from deco.cx"})}),s.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:s.jsx(De,{size:18})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"})]}),s.jsx("div",{children:s.jsx(Ke,{value:m,onChange:p,placeholder:"Search sites...",onKeyDown:o=>{o.key==="Escape"&&p("")}})}),s.jsxs("div",{className:"pb-0 min-h-[300px]",children:[r.status==="error"&&s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[s.jsx("p",{className:"text-sm text-destructive",children:r.error??"Failed to connect GitHub"}),s.jsx(Q,{variant:"outline",size:"sm",onClick:r.retry,children:"Retry GitHub setup"})]}),_&&r.status!=="error"&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Setting up GitHub connection..."}),I&&!_&&r.status!=="error"&&s.jsxs("div",{className:"flex flex-col py-2",children:[s.jsx("div",{className:"px-8 py-2",children:s.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a GitHub connection"})}),a.map(o=>s.jsxs("button",{type:"button",onClick:()=>x(o),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[o.icon?s.jsx("img",{src:o.icon,alt:o.title,className:"size-7 rounded-full shrink-0"}):s.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:s.jsx(ue,{className:"size-3.5 text-muted-foreground"})}),s.jsx("span",{className:"text-sm font-medium",children:o.title})]},o.id))]}),N&&!_&&r.status!=="error"&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),!N&&!_&&!I&&r.status!=="error"&&!k&&S.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),!N&&!_&&!I&&r.status!=="error"&&S.length>0&&s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[P.length===0&&s.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",m,"”"]}),P.map(o=>{const L=o.domains?.find(E=>E.production)?.domain??o.domains?.[0]?.domain,v=d===o.name;return s.jsxs("button",{type:"button",onClick:()=>g(o.name),className:je("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",v?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[s.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:o.thumb_url?s.jsx("img",{src:o.thumb_url,alt:o.name,className:"w-full h-full object-cover",loading:"lazy"}):s.jsx("div",{className:"w-full h-full bg-muted"})}),s.jsxs("div",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.name}),L&&s.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:L})]})]},o.name)})]})]}),s.jsxs(Ve,{className:"px-8 py-5 border-t border-border",children:[s.jsx(Q,{variant:"outline",onClick:()=>G(!1),disabled:O.isPending,children:"Cancel"}),s.jsx(Q,{disabled:!d||!R||O.isPending||N||_||I||!u||r.status==="error",onClick:()=>d&&O.mutate(d),children:O.isPending?"Importing...":"Import"})]})]})})}function Rs(){const t=ne.c(46),{org:e}=de(),i=_e(),n=Ne(),[c,C]=q.useState("");let y;t[0]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},t[0]=y):y=t[0];const{createVirtualMCP:d,isCreating:g}=Oe(y),[w,x]=q.useState(null),[m,p]=q.useState(!1),[l,f]=q.useState(!1),{granted:a}=Le("agents:manage"),r=c.toLowerCase(),u=i.filter(h=>h.id!==e.id&&(h.title.toLowerCase().includes(r)||h.description?.toLowerCase().includes(r))),{data:I}=Se(u.map(ct));let D;t[1]!==n||t[2]!==w?(D=async()=>{if(!w)return;const{id:h,title:Y}=w;x(null);try{await n.delete.mutateAsync(h),$("agent_deleted",{agent_id:h,source:"agents_list"}),se.success(`Deleted "${Y}"`)}catch{}},t[1]=n,t[2]=w,t[3]=D):D=t[3];const _=D,T=Z,N=Z,k=Z;let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Z.Title,{children:"Agents"}),t[4]=S):S=t[4];let G;t[5]===Symbol.for("react.memo_cache_sentinel")?(G=h=>{h.key==="Escape"&&(C(""),h.target.blur())},t[5]=G):G=t[5];let P;t[6]!==c?(P=s.jsx(tt,{value:c,onChange:C,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:G}),t[6]=c,t[7]=P):P=t[7];let R;t[8]!==a||t[9]!==d||t[10]!==g?(R=a&&s.jsxs(ie,{children:[s.jsx(oe,{asChild:!0,children:s.jsxs(Q,{size:"sm",children:[s.jsx(ae,{size:14}),"Create Agent"]})}),s.jsx(ce,{onCreateFromScratch:()=>{$("agent_create_clicked",{source:"agents_list",method:"scratch"}),d()},onImportGitHub:()=>{$("agent_create_clicked",{source:"agents_list",method:"github"}),f(!0)},onImportDeco:()=>{$("agent_create_clicked",{source:"agents_list",method:"deco"}),p(!0)},isCreating:g,align:"end"})]}),t[8]=a,t[9]=d,t[10]=g,t[11]=R):R=t[11];let O;t[12]!==P||t[13]!==R?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[S,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[P,R]})]}),t[12]=P,t[13]=R,t[14]=O):O=t[14];const o=u.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ge,{image:s.jsx(Te,{size:48,className:"text-muted-foreground"}),title:c?"No agents found":"No agents yet",description:c?`No agents match "${c}"`:a?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!c&&a&&s.jsxs(ie,{children:[s.jsx(oe,{asChild:!0,children:s.jsxs(Q,{size:"sm",children:[s.jsx(ae,{size:14}),"Create Agent"]})}),s.jsx(ce,{onCreateFromScratch:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),d()},onImportGitHub:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"github"}),f(!0)},onImportDeco:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),p(!0)},isCreating:g,align:"center",showBetaBadge:!0})]})})}),L=u.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:u.map(h=>s.jsx(st,{project:h,lastUsedAt:I?.get(h.id)?.last_used_at,onDeleteClick:a?()=>x({id:h.id,title:h.title}):void 0},h.id))})]});let v;t[15]!==L||t[16]!==k.Body||t[17]!==O||t[18]!==o?(v=s.jsxs(k.Body,{children:[O,o,L]}),t[15]=L,t[16]=k.Body,t[17]=O,t[18]=o,t[19]=v):v=t[19];let E;t[20]!==v||t[21]!==N.Content?(E=s.jsx(N.Content,{children:v}),t[20]=v,t[21]=N.Content,t[22]=E):E=t[22];let j;t[23]!==l?(j=s.jsx(we,{open:l,onOpenChange:f}),t[23]=l,t[24]=j):j=t[24];let z;t[25]!==m?(z=s.jsx(at,{open:m,onOpenChange:p}),t[25]=m,t[26]=z):z=t[26];const V=!!w;let F;t[27]===Symbol.for("react.memo_cache_sentinel")?(F=h=>!h&&x(null),t[27]=F):F=t[27];let U;t[28]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(qe,{children:"Delete Agent?"}),t[28]=U):U=t[28];const J=w?.title;let b;t[29]!==J?(b=s.jsxs(Qe,{children:[U,s.jsxs(Je,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:J}),"."]})]}),t[29]=J,t[30]=b):b=t[30];let B;t[31]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(We,{children:"Cancel"}),t[31]=B):B=t[31];let A;t[32]!==_?(A=s.jsxs(Ye,{children:[B,s.jsx(Xe,{onClick:_,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[32]=_,t[33]=A):A=t[33];let M;t[34]!==b||t[35]!==A?(M=s.jsxs(Ze,{children:[b,A]}),t[34]=b,t[35]=A,t[36]=M):M=t[36];let H;t[37]!==V||t[38]!==M?(H=s.jsx(et,{open:V,onOpenChange:F,children:M}),t[37]=V,t[38]=M,t[39]=H):H=t[39];let K;return t[40]!==T||t[41]!==E||t[42]!==j||t[43]!==z||t[44]!==H?(K=s.jsxs(T,{children:[E,j,z,H]}),t[40]=T,t[41]=E,t[42]=j,t[43]=z,t[44]=H,t[45]=K):K=t[45],K}function ct(t){return t.id}export{Rs as default};
@@ -1 +0,0 @@
1
- import{c as gt,r as w,j as o,l as yt,t as ut,i as St}from"./index-CtlgC1KW.js";import{i as jt}from"./ChevronRight-86cbncTU.js";import{A as kt}from"./automation-runs-HchqpNoW.js";import{A as _t}from"./add-section-modal-F3LoJMj-.js";import{n as Bt,h as wt,j as At,e as Nt,k as Rt,l as Ct,m as Et,o as Kt,S as Tt}from"./index-CPLWHNIg.js";import"./select-DymbSi1i.js";import"./tooltip-2S76Z1GN.js";import"./Check-c3mV_Uni.js";import"./ChevronDown-Be1kUurm.js";import"./ChevronUp-7vDXTQHH.js";import"./useInfiniteQuery-C5v-SAtB.js";import"./use-infinite-scroll-BkP7H-cz.js";import"./use-connection-C0xfUPl-.js";import"./use-collections-Bq6tf4lW.js";import"./use-mcp-client-8-W_7yBa.js";import"./constants-CaIX_f5U.js";import"./auth-Cduc78Mk.js";import"./use-virtual-mcp-BjiOjpKa.js";import"./card-CZ_4AnzZ.js";import"./sidebar-BGBaPTiJ.js";import"./LayoutLeft-Dg-hdc1o.js";import"./use-mobile-CcO0QCgb.js";import"./X-82Zaa9wO.js";import"./table-6yLqG5BG.js";import"./empty-state-BJyyJcI7.js";import"./use-members-CynVAzPM.js";import"./use-org-auth-client-mw0sCxV3.js";import"./use-clock-tick-YishFSE2.js";import"./AlertCircle-pDwFaZ69.js";import"./CheckCircle-CE_q_EWl.js";import"./Circle-Jj2lB_OB.js";import"./agent-icon-Bx7GZZkT.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Settings02-Ci6H3sb0.js";import"./Tool02-DsdesO-0.js";import"./XCircle-DFVEpL7j.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Users03-CwOsvMmx.js";import"./Loading02-DXivv_GE.js";import"./Stars02-ClT22kUl.js";import"./Copy01-bnpfrlf8.js";import"./ZoomOut-d0pU1jsr.js";import"./DotsVertical-Cw_RGd0K.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./Key01-BufYrbpv.js";import"./LinkExternal01-jNsZTUJe.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./Play-DL5iVtNY.js";import"./Plus-SxhLmH-g.js";import"./SearchLg-DalS_9no.js";import"./SearchMd-DXMQuWHS.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Trash01-RuXWiql6.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./Zap-DGilRzov.js";import"./use-automations-CtMMZwGK.js";import"./studio-tools-Dm4swbDJ.js";import"./useSuspenseInfiniteQuery-BeixZw8P.js";import"./badge-BDCVlL_X.js";import"./checkbox-B0y92ybh.js";import"./command-NscuxjlL.js";import"./index-DX7CG04Y.js";import"./dialog-BxiPyolh.js";import"./popover-4SjKIFSf.js";import"./avatar-ChSwYwdc.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D7Lvwi_8.js";import"./file-type-icon-aF4rioSK.js";import"./tab-id-bb-jjgGv.js";import"./monaco-editor-BSERZA56.js";import"./index-CGtkbkWC.js";import"./chat-context-DHiffp4D.js";import"./autosend-CFSFemh9.js";import"./hooks-7RE64ble.js";import"./decopilot-sse-pool-jzNdhqzZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BRJFSGox.js";import"./use-decopilot-events-42PTdhf1.js";import"./use-organization-settings-B3aKfsZI.js";import"./index-FOhB290E.js";import"./shell-layout-DSlq9QDA.js";import"./alert-dialog-BbUTua7Y.js";import"./required-auth-layout-CQN5hr5X.js";import"./use-org-sso-BjHGhVgE.js";import"./integration-icon-BxCXFWwF.js";import"./use-navigate-to-agent-DNjmGLp3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CUV8xbg8.js";import"./form-NWTw1_w9.js";import"./label-CI8zXgUl.js";import"./input-D0-jk8XC.js";import"./drawer-HMFyJ4Dn.js";import"./collection-search-B1ZoXYDP.js";import"./tabs-B41R3KT7.js";import"./toggle-group-DxbzbSVL.js";import"./use-deco-credits-DTpKn8hS.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DgJ4fCkV.js";import"./use-registry-connections-CVi0ypH7.js";import"./extract-connection-data-CgMMiKb9.js";import"./collection-tabs-DSyyuCu8.js";import"./textarea-DDx4ded2.js";import"./connection-form-helpers-CoPiWrjw.js";import"./authenticate-and-persist-oauth-Bsjhlz6M.js";import"./mcp-oauth-Crm2yFws.js";import"./connect-desktop-dialog-C_zkxzg2.js";import"./select-model-CBmm5efp.js";import"./skeleton-Cs7umMol.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BorHlHtt.js";import"./dropdown-menu-B8LX4IYo.js";import"./index-C6SqXYAf.js";import"./toolbar-Dw7sJZzm.js";import"./use-debounced-value-LiVhfciY.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C434uotZ.js";import"./use-mcp-tools-CUOQhfsg.js";import"./use-capability-Cr4AoWjX.js";import"./tools-list-gF6CK4rd.js";import"./switch-DenJ-Rqp.js";import"./use-debounced-autosave-DnYuRWI8.js";import"./index-BQNtvMv8.js";import"./search-input-DAhQOW8w.js";import"./github-repo-picker-BgT_NiIP.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-C5knhQtS.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-Bn17GDJi.js";import"./get-initials-D-f_fDFw.js";import"./calendar-DkErgVju.js";import"./toolbar-icon-button-DRu94yPg.js";import"./use-file-configs-DRXMLwD-.js";import"./automation-list-row-tfqwgW_l.js";function $t(l,t){const s=(l.title||l.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),f=/^[A-Za-z]/.test(s)&&s.length>0?s:"Section",n=Bt(t,f);return{blockKey:n,data:{__resolveType:l.resolveType,name:n}}}function Nr(l){const t=gt.c(77),{orgSlug:s,virtualMcpId:f,branch:n,blockKey:i,block:a,meta:m,decofile:c,title:D,excludeFields:H,schemaPending:nt,previewBaseUrl:at}=l,G=nt===void 0?!1:nt,u=at===void 0?null:at,x=typeof a?.__resolveType=="string"?a.__resolveType:"";let R;t[0]!==H||t[1]!==m||t[2]!==x?(R=wt(x,m,H),t[0]=H,t[1]=m,t[2]=x,t[3]=R):R=t[3];const h=R;let C;t[4]!==h?(C=!!h&&Object.keys(h.properties??{}).length>0,t[4]=h,t[5]=C):C=t[5];const J=C;let E;t[6]!==a||t[7]!==i||t[8]!==m||t[9]!==D?(E=D??(a?At(i,a,m):i),t[6]=a,t[7]=i,t[8]=m,t[9]=D,t[10]=E):E=t[10];const v=E;let K;t[11]!==n||t[12]!==s||t[13]!==f?(K={orgSlug:s,virtualMcpId:f,branch:n},t[11]=n,t[12]=s,t[13]=f,t[14]=K):K=t[14];const{save:b,flush:Q,isPending:W}=Nt(K);let T;t[15]!==n||t[16]!==s||t[17]!==f?(T={orgSlug:s,virtualMcpId:f,branch:n},t[15]=n,t[16]=s,t[17]=f,t[18]=T):T=t[18];const X=Rt(T);let $;t[19]!==b?($=Et((e,r)=>b(e,r)),t[19]=b,t[20]=$):$=t[20];const Y=$,[ht,xt]=w.useState(i),[tt,ct]=w.useState(null),[et,dt]=w.useState(0);let F;t[21]===Symbol.for("react.memo_cache_sentinel")?(F=[],t[21]=F):F=t[21];const[p,ft]=w.useState(F),[ot,rt]=w.useState(!1),P=w.useRef(null);ht!==i&&(xt(i),ct(null),dt(Pt),ft([]));let O;t[22]!==a?(O=a??{},t[22]=a,t[23]=O):O=t[23];const it=O;let g;t[24]!==tt?(g=tt??{},t[24]=tt,t[25]=g):g=t[25];let z;t[26]!==it||t[27]!==g?(z={...it,...g},t[26]=it,t[27]=g,t[28]=z):z=t[28];const mt=z;let L;t[29]!==i||t[30]!==x||t[31]!==b?(L=e=>{const r=e;ct(r),b(i,{...r,__resolveType:x})},t[29]=i,t[30]=x,t[31]=b,t[32]=L):L=t[32];const st=L;let V;t[33]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{ft(e)},t[33]=V):V=t[33];const pt=V;let q;t[34]!==c||t[35]!==Q||t[36]!==X?(q=async(e,r)=>{try{const{blockKey:d,data:N}=$t(e,c);await X.mutateAsync({blockKey:d,data:N}),ut.success(`Created section "${d}"`),r({__resolveType:d}),Q()}catch(d){const N=d,bt=N instanceof Error?N.message:"Could not add section";throw ut.error(bt),N}},t[34]=c,t[35]=Q,t[36]=X,t[37]=q):q=t[37];const y=q;let I;t[38]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{P.current=e.append,rt(!0)},t[38]=I):I=t[38];const vt=I;let U;t[39]!==y?(U=async e=>{const r=P.current;if(r)try{await y(e,d=>{r(d),rt(!1),P.current=null})}catch{}},t[39]=y,t[40]=U):U=t[40];const lt=U;let M;t[41]!==p||t[42]!==v?(M=p.length>0?[v,...p]:[],t[41]=p,t[42]=v,t[43]=M):M=t[43];const A=M;let S;t[44]!==p||t[45]!==A||t[46]!==v?(S=A.length>0?o.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:A.map((e,r)=>{const d=r===A.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(jt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{pt(r===0?[]:Ct(p,r)),dt(Ft)},title:e,className:yt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",d?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:e})]},`${e}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:v}),t[44]=p,t[45]=A,t[46]=v,t[47]=S):S=t[47];let j;t[48]!==W?(j=o.jsx(Kt,{isPending:W,isError:!1}),t[48]=W,t[49]=j):j=t[49];let k;t[50]!==S||t[51]!==j?(k=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[S,j]}),t[50]=S,t[51]=j,t[52]=k):k=t[52];let _;t[53]!==i||t[54]!==p||t[55]!==c||t[56]!==mt||t[57]!==et||t[58]!==y||t[59]!==st||t[60]!==J||t[61]!==m||t[62]!==u||t[63]!==Y||t[64]!==h||t[65]!==G?(_=o.jsx(kt,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:J?o.jsx(Tt,{schema:h,value:mt,onChange:st,basePath:"",breadcrumbPath:p,onBreadcrumbChange:pt,decofile:c,meta:m,onSaveReferencedBlock:Y,previewBaseUrl:u,onAddSectionItem:y,onRequestAddSection:vt},`${i}:${et}`):G?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(St,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[53]=i,t[54]=p,t[55]=c,t[56]=mt,t[57]=et,t[58]=y,t[59]=st,t[60]=J,t[61]=m,t[62]=u,t[63]=Y,t[64]=h,t[65]=G,t[66]=_):_=t[66];let B;t[67]!==ot||t[68]!==c||t[69]!==lt||t[70]!==m||t[71]!==u?(B=u&&o.jsx(_t,{open:ot,onOpenChange:e=>{rt(e),e||(P.current=null)},meta:m,decofile:c,previewBaseUrl:u,onSelect:e=>{lt(e)}}),t[67]=ot,t[68]=c,t[69]=lt,t[70]=m,t[71]=u,t[72]=B):B=t[72];let Z;return t[73]!==k||t[74]!==_||t[75]!==B?(Z=o.jsxs("div",{className:"flex h-full flex-col",children:[k,_,B]}),t[73]=k,t[74]=_,t[75]=B,t[76]=Z):Z=t[76],Z}function Ft(l){return l+1}function Pt(l){return l+1}export{Nr as AppEditor};
@@ -1 +0,0 @@
1
- import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-CtlgC1KW.js";import{s as q}from"./Plus-SxhLmH-g.js";import{i as S}from"./Zap-DGilRzov.js";import{S as D}from"./search-input-DAhQOW8w.js";import{P as l}from"./index-BQNtvMv8.js";import{E as b}from"./empty-state-BJyyJcI7.js";import{c as O}from"./use-automations-CtMMZwGK.js";import{c as V}from"./use-navigate-to-agent-DNjmGLp3.js";import{A as F}from"./automation-list-row-tfqwgW_l.js";import{e as G}from"./constants-CaIX_f5U.js";import{u as H}from"./use-virtual-mcp-BjiOjpKa.js";import{R as J}from"./require-capability-BIrGCy6a.js";import"./SearchMd-DXMQuWHS.js";import"./sidebar-BGBaPTiJ.js";import"./LayoutLeft-Dg-hdc1o.js";import"./use-mobile-CcO0QCgb.js";import"./X-82Zaa9wO.js";import"./tooltip-2S76Z1GN.js";import"./use-mcp-client-8-W_7yBa.js";import"./auth-Cduc78Mk.js";import"./studio-tools-Dm4swbDJ.js";import"./hooks-7RE64ble.js";import"./decopilot-sse-pool-jzNdhqzZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-BbUTua7Y.js";import"./dropdown-menu-B8LX4IYo.js";import"./Check-c3mV_Uni.js";import"./ChevronRight-86cbncTU.js";import"./Circle-Jj2lB_OB.js";import"./Stars02-ClT22kUl.js";import"./DotsVertical-Cw_RGd0K.js";import"./Trash01-RuXWiql6.js";import"./agent-icon-Bx7GZZkT.js";import"./AlertCircle-pDwFaZ69.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Settings02-Ci6H3sb0.js";import"./Tool02-DsdesO-0.js";import"./XCircle-DFVEpL7j.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Users03-CwOsvMmx.js";import"./Loading02-DXivv_GE.js";import"./CheckCircle-CE_q_EWl.js";import"./ChevronDown-Be1kUurm.js";import"./ChevronUp-7vDXTQHH.js";import"./Copy01-bnpfrlf8.js";import"./ZoomOut-d0pU1jsr.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./Key01-BufYrbpv.js";import"./LinkExternal01-jNsZTUJe.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./Play-DL5iVtNY.js";import"./SearchLg-DalS_9no.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./use-collections-Bq6tf4lW.js";import"./use-capability-Cr4AoWjX.js";import"./access-gate-B9Uqf_RZ.js";import"./capability-load-error-C5KrMr5A.js";function K(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function jo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{jo as default};
@@ -1 +0,0 @@
1
- import{c as Q,l as Y,j as t,r as W,B as J,i as le}from"./index-CtlgC1KW.js";import{ab as Z}from"./agent-icon-Bx7GZZkT.js";import{i as ie}from"./X-82Zaa9wO.js";import{L as O}from"./label-CI8zXgUl.js";import{I as oe,R as re,a as ae}from"./index-Cv4TIpz2.js";import{i as ce}from"./Circle-Jj2lB_OB.js";import{S as ne,a as me,b as de,c as pe,d as xe}from"./select-DymbSi1i.js";import{T as fe,a as ue,b as he}from"./tooltip-2S76Z1GN.js";import"./AlertCircle-pDwFaZ69.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Settings02-Ci6H3sb0.js";import"./Tool02-DsdesO-0.js";import"./XCircle-DFVEpL7j.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Users03-CwOsvMmx.js";import"./Loading02-DXivv_GE.js";import"./CheckCircle-CE_q_EWl.js";import"./Check-c3mV_Uni.js";import"./ChevronDown-Be1kUurm.js";import"./ChevronRight-86cbncTU.js";import"./ChevronUp-7vDXTQHH.js";import"./Stars02-ClT22kUl.js";import"./Copy01-bnpfrlf8.js";import"./ZoomOut-d0pU1jsr.js";import"./DotsVertical-Cw_RGd0K.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./Key01-BufYrbpv.js";import"./LayoutLeft-Dg-hdc1o.js";import"./LinkExternal01-jNsZTUJe.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./Play-DL5iVtNY.js";import"./Plus-SxhLmH-g.js";import"./SearchLg-DalS_9no.js";import"./SearchMd-DXMQuWHS.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Trash01-RuXWiql6.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./Zap-DGilRzov.js";function ge(i){const e=Q.c(8);let o,s;e[0]!==i?({className:o,...s}=i,e[0]=i,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=Y("grid gap-3",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=t.jsx(re,{"data-slot":"radio-group",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function X(i){const e=Q.c(9);let o,s;e[0]!==i?({className:o,...s}=i,e[0]=i,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=Y("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:opacity-50",o),e[3]=o,e[4]=r):r=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ae,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(ce,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=l):l=e[5];let c;return e[6]!==s||e[7]!==r?(c=t.jsx(oe,{"data-slot":"radio-group-item",className:r,...s,children:l}),e[6]=s,e[7]=r,e[8]=c):c=e[8],c}function Nt(i){const e=Q.c(69),{posts:o,categories:s,initialSlug:r,isPending:l,onApply:c,onClose:d}=i,[n,ee]=W.useState(r&&s.some(m=>m.slug===r)?r:s[0]?.slug??""),[p,te]=W.useState("add");let T;if(e[0]!==s||e[1]!==n){let m;e[3]!==n?(m=se=>se.slug===n,e[3]=n,e[4]=m):m=e[4],T=s.find(m),e[0]=s,e[1]=n,e[2]=T}else T=e[2];const x=T,a=o.length,K=a===1?"post":"posts";let f;e[5]!==a||e[6]!==K?(f=t.jsxs("span",{className:"truncate text-sm font-medium",children:[a," ",K," selected"]}),e[5]=a,e[6]=K,e[7]=f):f=e[7];let E;e[8]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ie,{size:14}),e[8]=E):E=e[8];let u;e[9]!==l||e[10]!==d?(u=t.jsx(fe,{asChild:!0,children:t.jsx(J,{type:"button",variant:"ghost",size:"icon",disabled:l,onClick:d,"aria-label":"Exit selection",children:E})}),e[9]=l,e[10]=d,e[11]=u):u=e[11];let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ue,{side:"bottom",children:"Exit selection"}),e[12]=I):I=e[12];let h;e[13]!==u?(h=t.jsxs(he,{children:[u,I]}),e[13]=u,e[14]=h):h=e[14];let g;e[15]!==f||e[16]!==h?(g=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[f,h]}),e[15]=f,e[16]=h,e[17]=g):g=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Update category"}),e[18]=A):A=e[18];const M=a===0?"Select posts from the list to choose what this update applies to.":`Choose a category to apply to ${a} ${a===1?"post":"posts"}.`;let j;e[19]!==M?(j=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:M}),e[19]=M,e[20]=j):j=e[20];let B;e[21]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(O,{children:"Category"}),e[21]=B):B=e[21];let b;e[22]!==s||e[23]!==n?(b=t.jsxs("div",{className:"space-y-2",children:[B,s.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:"No categories yet — create one in the Categories collection."}):t.jsxs(ne,{value:n,onValueChange:ee,children:[t.jsx(me,{className:"w-full",children:t.jsx(de,{placeholder:"Select a category"})}),t.jsx(pe,{children:s.map(be)})]})]}),e[22]=s,e[23]=n,e[24]=b):b=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=m=>te(m),e[25]=F):F=e[25];let V;e[26]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(X,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[26]=V):V=e[26];let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsxs(O,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[V,t.jsxs("span",{className:"space-y-0.5",children:[t.jsx("span",{className:"block text-sm font-medium",children:"Add category"}),t.jsx("span",{className:"block text-xs text-muted-foreground",children:"Keep existing categories and add this one."})]})]}),e[27]=G):G=e[27];let L;e[28]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(X,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[28]=L):L=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs(O,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[L,t.jsxs("span",{className:"space-y-0.5",children:[t.jsx("span",{className:"block text-sm font-medium",children:"Replace category"}),t.jsx("span",{className:"block text-xs text-muted-foreground",children:"Remove all current categories and set only this one."})]})]}),e[29]=P):P=e[29];let y;e[30]!==p?(y=t.jsxs(ge,{value:p,onValueChange:F,className:"gap-2",children:[G,P]}),e[30]=p,e[31]=y):y=e[31];let N;e[32]!==l||e[33]!==d?(N=t.jsx(J,{type:"button",variant:"outline",onClick:d,disabled:l,children:"Cancel"}),e[32]=l,e[33]=d,e[34]=N):N=e[34];const D=!x||l||a===0;let v;e[35]!==p||e[36]!==c||e[37]!==x?(v=()=>x&&c(p,{name:x.name,slug:x.slug}),e[35]=p,e[36]=c,e[37]=x,e[38]=v):v=e[38];let S;e[39]!==l?(S=l?t.jsxs(t.Fragment,{children:[t.jsx(le,{size:14,className:"animate-spin"}),"Updating…"]}):"Apply",e[39]=l,e[40]=S):S=e[40];let _;e[41]!==D||e[42]!==v||e[43]!==S?(_=t.jsx(J,{type:"button",disabled:D,onClick:v,children:S}),e[41]=D,e[42]=v,e[43]=S,e[44]=_):_=e[44];let k;e[45]!==N||e[46]!==_?(k=t.jsxs("div",{className:"flex justify-end gap-2",children:[N,_]}),e[45]=N,e[46]=_,e[47]=k):k=e[47];let C;e[48]!==b||e[49]!==y||e[50]!==k?(C=t.jsxs("div",{className:"mt-6 space-y-4",children:[b,y,k]}),e[48]=b,e[49]=y,e[50]=k,e[51]=C):C=e[51];let U;e[52]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Z,{size:16,className:"shrink-0 text-muted-foreground"}),e[52]=U):U=e[52];const H=a===1?"post":"posts";let w;e[53]!==a||e[54]!==H?(w=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[U,t.jsxs("span",{className:"text-sm",children:[a," selected ",H]})]}),e[53]=a,e[54]=H,e[55]=w):w=e[55];let R;e[56]!==a||e[57]!==o?(R=a===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:"No posts selected yet — pick them from the list on the left."}):t.jsx("ul",{className:"divide-y border-t bg-background",children:o.map(je)}),e[56]=a,e[57]=o,e[58]=R):R=e[58];let $;e[59]!==w||e[60]!==R?($=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[w,R]}),e[59]=w,e[60]=R,e[61]=$):$=e[61];let z;e[62]!==j||e[63]!==C||e[64]!==$?(z=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[A,j,C,$]})}),e[62]=j,e[63]=C,e[64]=$,e[65]=z):z=e[65];let q;return e[66]!==z||e[67]!==g?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[g,z]}),e[66]=z,e[67]=g,e[68]=q):q=e[68],q}function je(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(Z,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function be(i){return t.jsx(xe,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{Nt as BulkCategoryPanel};
@@ -1 +0,0 @@
1
- import{r as D,j as u,c as ht,l as H,bQ as Pe}from"./index-CtlgC1KW.js";import{n as mt}from"./Loading02-DXivv_GE.js";import{i as vt}from"./ChevronRight-86cbncTU.js";function w(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function S(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function C(e,t){const n=w(e);return isNaN(t)?S(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function j(e,t){const n=w(e);if(isNaN(t))return S(e,NaN);if(!t)return n;const a=n.getDate(),r=S(e,n.getTime());r.setMonth(n.getMonth()+t+1,0);const o=r.getDate();return a>=o?r:(n.setFullYear(r.getFullYear(),r.getMonth(),a),n)}const ye=6048e5,yt=864e5;let gt={};function z(){return gt}function Y(e,t){const n=z(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=w(e),o=r.getDay(),i=(o<a?7:0)+o-a;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function I(e){return Y(e,{weekStartsOn:1})}function Ie(e){const t=w(e),n=t.getFullYear(),a=S(e,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const r=I(a),o=S(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=I(o);return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function A(e){const t=w(e);return t.setHours(0,0,0,0),t}function Z(e){const t=w(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function T(e,t){const n=A(e),a=A(t),r=+n-Z(n),o=+a-Z(a);return Math.round((r-o)/yt)}function bt(e){const t=Ie(e),n=S(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),I(n)}function me(e,t){const n=t*7;return C(e,n)}function pt(e,t){return j(e,t*12)}function wt(e){let t;return e.forEach(function(n){const a=w(n);(t===void 0||t<a||isNaN(Number(a)))&&(t=a)}),t||new Date(NaN)}function xt(e){let t;return e.forEach(n=>{const a=w(n);(!t||t>a||isNaN(+a))&&(t=a)}),t||new Date(NaN)}function P(e,t){const n=A(e),a=A(t);return+n==+a}function ge(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _t(e){if(!ge(e)&&typeof e!="number")return!1;const t=w(e);return!isNaN(Number(t))}function G(e,t){const n=w(e),a=w(t),r=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return r*12+o}function Dt(e,t,n){const a=Y(e,n),r=Y(t,n),o=+a-Z(a),i=+r-Z(r);return Math.round((o-i)/ye)}function be(e){const t=w(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function O(e){const t=w(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Re(e){const t=w(e),n=S(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function pe(e,t){const n=z(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=w(e),o=r.getDay(),i=(o<a?-7:0)+6-(o-a);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}function Be(e){return pe(e,{weekStartsOn:1})}const Mt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kt=(e,t,n)=>{let a;const r=Mt[e];return typeof r=="string"?a=r:t===1?a=r.one:a=r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function se(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Nt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ct={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ot={date:se({formats:Nt,defaultWidth:"full"}),time:se({formats:Ct,defaultWidth:"full"}),dateTime:se({formats:Pt,defaultWidth:"full"})},St={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jt=(e,t,n,a)=>St[e];function X(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;r=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return r[o]}}const Wt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Tt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Yt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ft={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Et={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},It=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rt={ordinalNumber:It,era:X({values:Wt,defaultWidth:"wide"}),quarter:X({values:Tt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:X({values:Yt,defaultWidth:"wide"}),day:X({values:Ft,defaultWidth:"wide"}),dayPeriod:X({values:Et,defaultWidth:"wide",formattingValues:Lt,defaultFormattingWidth:"wide"})};function V(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;const i=o[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Ht(s,f=>f.test(i)):Bt(s,f=>f.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const l=t.slice(i.length);return{value:d,rest:l}}}function Bt(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ht(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function At(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(r.length);return{value:i,rest:s}}}const qt=/^(\d+)(th|st|nd|rd)?/i,Qt=/\d+/i,Xt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vt={any:[/^b/i,/^(a|c)/i]},Gt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zt={any:[/1/i,/2/i,/3/i,/4/i]},Ut={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Kt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$t={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Zt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},en={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},tn={ordinalNumber:At({matchPattern:qt,parsePattern:Qt,valueCallback:e=>parseInt(e,10)}),era:V({matchPatterns:Xt,defaultMatchWidth:"wide",parsePatterns:Vt,defaultParseWidth:"any"}),quarter:V({matchPatterns:Gt,defaultMatchWidth:"wide",parsePatterns:zt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:V({matchPatterns:Ut,defaultMatchWidth:"wide",parsePatterns:Jt,defaultParseWidth:"any"}),day:V({matchPatterns:Kt,defaultMatchWidth:"wide",parsePatterns:$t,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Zt,defaultMatchWidth:"any",parsePatterns:en,defaultParseWidth:"any"})},He={code:"en-US",formatDistance:kt,formatLong:Ot,formatRelative:jt,localize:Rt,match:tn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nn(e){const t=w(e);return T(t,Re(t))+1}function Ae(e){const t=w(e),n=+I(t)-+bt(t);return Math.round(n/ye)+1}function qe(e,t){const n=w(e),a=n.getFullYear(),r=z(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=S(e,0);i.setFullYear(a+1,0,o),i.setHours(0,0,0,0);const s=Y(i,t),c=S(e,0);c.setFullYear(a,0,o),c.setHours(0,0,0,0);const d=Y(c,t);return n.getTime()>=s.getTime()?a+1:n.getTime()>=d.getTime()?a:a-1}function an(e,t){const n=z(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=qe(e,t),o=S(e,0);return o.setFullYear(r,0,a),o.setHours(0,0,0,0),Y(o,t)}function Qe(e,t){const n=w(e),a=+Y(n,t)-+an(n,t);return Math.round(a/ye)+1}function _(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const E={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return _(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_(n+1,2)},d(e,t){return _(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _(e.getHours()%12||12,t.length)},H(e,t){return _(e.getHours(),t.length)},m(e,t){return _(e.getMinutes(),t.length)},s(e,t){return _(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return _(r,t.length)}},B={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Oe={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return n.ordinalNumber(r,{unit:"year"})}return E.y(e,t)},Y:function(e,t,n,a){const r=qe(e,a),o=r>0?r:1-r;if(t==="YY"){const i=o%100;return _(i,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):_(o,t.length)},R:function(e,t){const n=Ie(e);return _(n,t.length)},u:function(e,t){const n=e.getFullYear();return _(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return _(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return _(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return E.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return _(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const r=Qe(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):_(r,t.length)},I:function(e,t,n){const a=Ae(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):_(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):E.d(e,t)},D:function(e,t,n){const a=nn(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const r=e.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return _(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const r=e.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return _(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),r=a===0?7:a;switch(t){case"i":return String(r);case"ii":return _(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let r;switch(a===12?r=B.noon:a===0?r=B.midnight:r=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let r;switch(a>=17?r=B.evening:a>=12?r=B.afternoon:a>=4?r=B.morning:r=B.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return E.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):E.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):_(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):E.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):E.s(e,t)},S:function(e,t){return E.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return je(a);case"XXXX":case"XX":return L(a);default:return L(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return je(a);case"xxxx":case"xx":return L(a);default:return L(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Se(a,":");default:return"GMT"+L(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Se(a,":");default:return"GMT"+L(a,":")}},t:function(e,t,n){const a=Math.trunc(e.getTime()/1e3);return _(a,t.length)},T:function(e,t,n){const a=e.getTime();return _(a,t.length)}};function Se(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),o=a%60;return o===0?n+String(r):n+String(r)+t+_(o,2)}function je(e,t){return e%60===0?(e>0?"-":"+")+_(Math.abs(e)/60,2):L(e,t)}function L(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=_(Math.trunc(a/60),2),o=_(a%60,2);return n+r+t+o}const We=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Xe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},rn=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return We(e,t);let o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",We(a,t)).replace("{{time}}",Xe(r,t))},on={p:Xe,P:rn},sn=/^D+$/,un=/^Y+$/,ln=["D","DD","YY","YYYY"];function cn(e){return sn.test(e)}function dn(e){return un.test(e)}function fn(e,t,n){const a=hn(e,t,n);if(console.warn(a),ln.includes(e))throw new RangeError(a)}function hn(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yn=/^'([^]*?)'?$/,gn=/''/g,bn=/[a-zA-Z]/;function R(e,t,n){const a=z(),r=n?.locale??a.locale??He,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,s=w(e);if(!_t(s))throw new RangeError("Invalid time value");let c=t.match(vn).map(l=>{const f=l[0];if(f==="p"||f==="P"){const h=on[f];return h(l,r.formatLong)}return l}).join("").match(mn).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:pn(l)};if(Oe[f])return{isToken:!0,value:l};if(f.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});r.localize.preprocessor&&(c=r.localize.preprocessor(s,c));const d={firstWeekContainsDate:o,weekStartsOn:i,locale:r};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!n?.useAdditionalWeekYearTokens&&dn(f)||!n?.useAdditionalDayOfYearTokens&&cn(f))&&fn(f,t,String(e));const h=Oe[f[0]];return h(s,f,r.localize,d)}).join("")}function pn(e){const t=e.match(yn);return t?t[1].replace(gn,"'"):e}function wn(e){const t=w(e),n=t.getFullYear(),a=t.getMonth(),r=S(e,0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function xn(e){return Math.trunc(+w(e)/1e3)}function _n(e){const t=w(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function Dn(e,t){return Dt(_n(e),O(e),t)+1}function ve(e,t){const n=w(e),a=w(t);return n.getTime()>a.getTime()}function Ve(e,t){const n=w(e),a=w(t);return+n<+a}function we(e,t){const n=w(e),a=w(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function Mn(e,t){const n=w(e),a=w(t);return n.getFullYear()===a.getFullYear()}function ue(e,t){return C(e,-t)}function le(e,t){const n=w(e),a=n.getFullYear(),r=n.getDate(),o=S(e,0);o.setFullYear(a,t,15),o.setHours(0,0,0,0);const i=wn(o);return n.setMonth(t,Math.min(r,i)),n}function Te(e,t){const n=w(e);return isNaN(+n)?S(e,NaN):(n.setFullYear(t),n)}var g=function(){return g=Object.assign||function(t){for(var n,a=1,r=arguments.length;a<r;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},g.apply(this,arguments)};function kn(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n}function Ge(e,t,n){for(var a=0,r=t.length,o;a<r;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}function U(e){return e.mode==="multiple"}function J(e){return e.mode==="range"}function te(e){return e.mode==="single"}var Nn={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function Cn(e,t){return R(e,"LLLL y",t)}function Pn(e,t){return R(e,"d",t)}function On(e,t){return R(e,"LLLL",t)}function Sn(e){return"".concat(e)}function jn(e,t){return R(e,"cccccc",t)}function Wn(e,t){return R(e,"yyyy",t)}var Tn=Object.freeze({__proto__:null,formatCaption:Cn,formatDay:Pn,formatMonthCaption:On,formatWeekNumber:Sn,formatWeekdayName:jn,formatYearCaption:Wn}),Yn=function(e,t,n){return R(e,"do MMMM (EEEE)",n)},Fn=function(){return"Month: "},En=function(){return"Go to next month"},Ln=function(){return"Go to previous month"},In=function(e,t){return R(e,"cccc",t)},Rn=function(e){return"Week n. ".concat(e)},Bn=function(){return"Year: "},Hn=Object.freeze({__proto__:null,labelDay:Yn,labelMonthDropdown:Fn,labelNext:En,labelPrevious:Ln,labelWeekNumber:Rn,labelWeekday:In,labelYearDropdown:Bn});function An(){var e="buttons",t=Nn,n=He,a={},r={},o=1,i={},s=new Date;return{captionLayout:e,classNames:t,formatters:Tn,labels:Hn,locale:n,modifiersClassNames:a,modifiers:r,numberOfMonths:o,styles:i,today:s,mode:"default"}}function qn(e){var t=e.fromYear,n=e.toYear,a=e.fromMonth,r=e.toMonth,o=e.fromDate,i=e.toDate;return a?o=O(a):t&&(o=new Date(t,0,1)),r?i=be(r):n&&(i=new Date(n,11,31)),{fromDate:o?A(o):void 0,toDate:i?A(i):void 0}}var ze=D.createContext(void 0);function Qn(e){var t,n=e.initialProps,a=An(),r=qn(n),o=r.fromDate,i=r.toDate,s=(t=n.captionLayout)!==null&&t!==void 0?t:a.captionLayout;s!=="buttons"&&(!o||!i)&&(s="buttons");var c;(te(n)||U(n)||J(n))&&(c=n.onSelect);var d=g(g(g({},a),n),{captionLayout:s,classNames:g(g({},a.classNames),n.classNames),components:g({},n.components),formatters:g(g({},a.formatters),n.formatters),fromDate:o,labels:g(g({},a.labels),n.labels),mode:n.mode||a.mode,modifiers:g(g({},a.modifiers),n.modifiers),modifiersClassNames:g(g({},a.modifiersClassNames),n.modifiersClassNames),onSelect:c,styles:g(g({},a.styles),n.styles),toDate:i});return u.jsx(ze.Provider,{value:d,children:e.children})}function M(){var e=D.useContext(ze);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Ue(e){var t=M(),n=t.locale,a=t.classNames,r=t.styles,o=t.formatters.formatCaption;return u.jsx("div",{className:a.caption_label,style:r.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:o(e.displayMonth,{locale:n})})}function Xn(e){return u.jsx("svg",g({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:u.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Je(e){var t,n,a=e.onChange,r=e.value,o=e.children,i=e.caption,s=e.className,c=e.style,d=M(),l=(n=(t=d.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:Xn;return u.jsxs("div",{className:s,style:c,children:[u.jsx("span",{className:d.classNames.vhidden,children:e["aria-label"]}),u.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:d.classNames.dropdown,style:d.styles.dropdown,value:r,onChange:a,children:o}),u.jsxs("div",{className:d.classNames.caption_label,style:d.styles.caption_label,"aria-hidden":"true",children:[i,u.jsx(l,{className:d.classNames.dropdown_icon,style:d.styles.dropdown_icon})]})]})}function Vn(e){var t,n=M(),a=n.fromDate,r=n.toDate,o=n.styles,i=n.locale,s=n.formatters.formatMonthCaption,c=n.classNames,d=n.components,l=n.labels.labelMonthDropdown;if(!a)return u.jsx(u.Fragment,{});if(!r)return u.jsx(u.Fragment,{});var f=[];if(Mn(a,r))for(var h=O(a),m=a.getMonth();m<=r.getMonth();m++)f.push(le(h,m));else for(var h=O(new Date),m=0;m<=11;m++)f.push(le(h,m));var y=function(p){var N=Number(p.target.value),k=le(O(e.displayMonth),N);e.onChange(k)},x=(t=d?.Dropdown)!==null&&t!==void 0?t:Je;return u.jsx(x,{name:"months","aria-label":l(),className:c.dropdown_month,style:o.dropdown_month,onChange:y,value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:i}),children:f.map(function(p){return u.jsx("option",{value:p.getMonth(),children:s(p,{locale:i})},p.getMonth())})})}function Gn(e){var t,n=e.displayMonth,a=M(),r=a.fromDate,o=a.toDate,i=a.locale,s=a.styles,c=a.classNames,d=a.components,l=a.formatters.formatYearCaption,f=a.labels.labelYearDropdown,h=[];if(!r)return u.jsx(u.Fragment,{});if(!o)return u.jsx(u.Fragment,{});for(var m=r.getFullYear(),y=o.getFullYear(),x=m;x<=y;x++)h.push(Te(Re(new Date),x));var p=function(k){var q=Te(O(n),Number(k.target.value));e.onChange(q)},N=(t=d?.Dropdown)!==null&&t!==void 0?t:Je;return u.jsx(N,{name:"years","aria-label":f(),className:c.dropdown_year,style:s.dropdown_year,onChange:p,value:n.getFullYear(),caption:l(n,{locale:i}),children:h.map(function(k){return u.jsx("option",{value:k.getFullYear(),children:l(k,{locale:i})},k.getFullYear())})})}function zn(e,t){var n=D.useState(e),a=n[0],r=n[1],o=t===void 0?a:t;return[o,r]}function Un(e){var t=e.month,n=e.defaultMonth,a=e.today,r=t||n||a||new Date,o=e.toDate,i=e.fromDate,s=e.numberOfMonths,c=s===void 0?1:s;if(o&&G(o,r)<0){var d=-1*(c-1);r=j(o,d)}return i&&G(r,i)<0&&(r=i),O(r)}function Jn(){var e=M(),t=Un(e),n=zn(t,e.month),a=n[0],r=n[1],o=function(i){var s;if(!e.disableNavigation){var c=O(i);r(c),(s=e.onMonthChange)===null||s===void 0||s.call(e,c)}};return[a,o]}function Kn(e,t){for(var n=t.reverseMonths,a=t.numberOfMonths,r=O(e),o=O(j(r,a)),i=G(o,r),s=[],c=0;c<i;c++){var d=j(r,c);s.push(d)}return n&&(s=s.reverse()),s}function $n(e,t){if(!t.disableNavigation){var n=t.toDate,a=t.pagedNavigation,r=t.numberOfMonths,o=r===void 0?1:r,i=a?o:1,s=O(e);if(!n)return j(s,i);var c=G(n,e);if(!(c<o))return j(s,i)}}function Zn(e,t){if(!t.disableNavigation){var n=t.fromDate,a=t.pagedNavigation,r=t.numberOfMonths,o=r===void 0?1:r,i=a?o:1,s=O(e);if(!n)return j(s,-i);var c=G(s,n);if(!(c<=0))return j(s,-i)}}var Ke=D.createContext(void 0);function ea(e){var t=M(),n=Jn(),a=n[0],r=n[1],o=Kn(a,t),i=$n(a,t),s=Zn(a,t),c=function(f){return o.some(function(h){return we(f,h)})},d=function(f,h){c(f)||(h&&Ve(f,h)?r(j(f,1+t.numberOfMonths*-1)):r(f))},l={currentMonth:a,displayMonths:o,goToMonth:r,goToDate:d,previousMonth:s,nextMonth:i,isDateDisplayed:c};return u.jsx(Ke.Provider,{value:l,children:e.children})}function K(){var e=D.useContext(Ke);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Ye(e){var t,n=M(),a=n.classNames,r=n.styles,o=n.components,i=K().goToMonth,s=function(l){i(j(l,e.displayIndex?-e.displayIndex:0))},c=(t=o?.CaptionLabel)!==null&&t!==void 0?t:Ue,d=u.jsx(c,{id:e.id,displayMonth:e.displayMonth});return u.jsxs("div",{className:a.caption_dropdowns,style:r.caption_dropdowns,children:[u.jsx("div",{className:a.vhidden,children:d}),u.jsx(Vn,{onChange:s,displayMonth:e.displayMonth}),u.jsx(Gn,{onChange:s,displayMonth:e.displayMonth})]})}function ta(e){return u.jsx("svg",g({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function na(e){return u.jsx("svg",g({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var ee=D.forwardRef(function(e,t){var n=M(),a=n.classNames,r=n.styles,o=[a.button_reset,a.button];e.className&&o.push(e.className);var i=o.join(" "),s=g(g({},r.button_reset),r.button);return e.style&&Object.assign(s,e.style),u.jsx("button",g({},e,{ref:t,type:"button",className:i,style:s}))});function aa(e){var t,n,a=M(),r=a.dir,o=a.locale,i=a.classNames,s=a.styles,c=a.labels,d=c.labelPrevious,l=c.labelNext,f=a.components;if(!e.nextMonth&&!e.previousMonth)return u.jsx(u.Fragment,{});var h=d(e.previousMonth,{locale:o}),m=[i.nav_button,i.nav_button_previous].join(" "),y=l(e.nextMonth,{locale:o}),x=[i.nav_button,i.nav_button_next].join(" "),p=(t=f?.IconRight)!==null&&t!==void 0?t:na,N=(n=f?.IconLeft)!==null&&n!==void 0?n:ta;return u.jsxs("div",{className:i.nav,style:s.nav,children:[!e.hidePrevious&&u.jsx(ee,{name:"previous-month","aria-label":h,className:m,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:r==="rtl"?u.jsx(p,{className:i.nav_icon,style:s.nav_icon}):u.jsx(N,{className:i.nav_icon,style:s.nav_icon})}),!e.hideNext&&u.jsx(ee,{name:"next-month","aria-label":y,className:x,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:r==="rtl"?u.jsx(N,{className:i.nav_icon,style:s.nav_icon}):u.jsx(p,{className:i.nav_icon,style:s.nav_icon})})]})}function Fe(e){var t=M().numberOfMonths,n=K(),a=n.previousMonth,r=n.nextMonth,o=n.goToMonth,i=n.displayMonths,s=i.findIndex(function(y){return we(e.displayMonth,y)}),c=s===0,d=s===i.length-1,l=t>1&&(c||!d),f=t>1&&(d||!c),h=function(){a&&o(a)},m=function(){r&&o(r)};return u.jsx(aa,{displayMonth:e.displayMonth,hideNext:l,hidePrevious:f,nextMonth:r,previousMonth:a,onPreviousClick:h,onNextClick:m})}function ra(e){var t,n=M(),a=n.classNames,r=n.disableNavigation,o=n.styles,i=n.captionLayout,s=n.components,c=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Ue,d;return r?d=u.jsx(c,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?d=u.jsx(Ye,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?d=u.jsxs(u.Fragment,{children:[u.jsx(Ye,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),u.jsx(Fe,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):d=u.jsxs(u.Fragment,{children:[u.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Fe,{displayMonth:e.displayMonth,id:e.id})]}),u.jsx("div",{className:a.caption,style:o.caption,children:d})}function oa(e){var t=M(),n=t.footer,a=t.styles,r=t.classNames.tfoot;return n?u.jsx("tfoot",{className:r,style:a.tfoot,children:u.jsx("tr",{children:u.jsx("td",{colSpan:8,children:n})})}):u.jsx(u.Fragment,{})}function ia(e,t,n){for(var a=n?I(new Date):Y(new Date,{locale:e,weekStartsOn:t}),r=[],o=0;o<7;o++){var i=C(a,o);r.push(i)}return r}function sa(){var e=M(),t=e.classNames,n=e.styles,a=e.showWeekNumber,r=e.locale,o=e.weekStartsOn,i=e.ISOWeek,s=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,d=ia(r,o,i);return u.jsxs("tr",{style:n.head_row,className:t.head_row,children:[a&&u.jsx("td",{style:n.head_cell,className:t.head_cell}),d.map(function(l,f){return u.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(l,{locale:r}),children:s(l,{locale:r})},f)})]})}function ua(){var e,t=M(),n=t.classNames,a=t.styles,r=t.components,o=(e=r?.HeadRow)!==null&&e!==void 0?e:sa;return u.jsx("thead",{style:a.head,className:n.head,children:u.jsx(o,{})})}function la(e){var t=M(),n=t.locale,a=t.formatters.formatDay;return u.jsx(u.Fragment,{children:a(e.date,{locale:n})})}var xe=D.createContext(void 0);function ca(e){if(!U(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return u.jsx(xe.Provider,{value:t,children:e.children})}return u.jsx(da,{initialProps:e.initialProps,children:e.children})}function da(e){var t=e.initialProps,n=e.children,a=t.selected,r=t.min,o=t.max,i=function(d,l,f){var h,m;(h=t.onDayClick)===null||h===void 0||h.call(t,d,l,f);var y=!!(l.selected&&r&&a?.length===r);if(!y){var x=!!(!l.selected&&o&&a?.length===o);if(!x){var p=a?Ge([],a):[];if(l.selected){var N=p.findIndex(function(k){return P(d,k)});p.splice(N,1)}else p.push(d);(m=t.onSelect)===null||m===void 0||m.call(t,p,d,l,f)}}},s={disabled:[]};a&&s.disabled.push(function(d){var l=o&&a.length>o-1,f=a.some(function(h){return P(h,d)});return!!(l&&!f)});var c={selected:a,onDayClick:i,modifiers:s};return u.jsx(xe.Provider,{value:c,children:n})}function _e(){var e=D.useContext(xe);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function fa(e,t){var n=t||{},a=n.from,r=n.to;return a&&r?P(r,e)&&P(a,e)?void 0:P(r,e)?{from:r,to:void 0}:P(a,e)?void 0:ve(a,e)?{from:e,to:r}:{from:a,to:e}:r?ve(e,r)?{from:r,to:e}:{from:e,to:r}:a?Ve(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0}}var De=D.createContext(void 0);function ha(e){if(!J(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return u.jsx(De.Provider,{value:t,children:e.children})}return u.jsx(ma,{initialProps:e.initialProps,children:e.children})}function ma(e){var t=e.initialProps,n=e.children,a=t.selected,r=a||{},o=r.from,i=r.to,s=t.min,c=t.max,d=function(m,y,x){var p,N;(p=t.onDayClick)===null||p===void 0||p.call(t,m,y,x);var k=fa(m,a);(N=t.onSelect)===null||N===void 0||N.call(t,k,m,y,x)},l={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(l.range_start=[o],i?(l.range_end=[i],P(o,i)||(l.range_middle=[{after:o,before:i}])):l.range_end=[o]):i&&(l.range_start=[i],l.range_end=[i]),s&&(o&&!i&&l.disabled.push({after:ue(o,s-1),before:C(o,s-1)}),o&&i&&l.disabled.push({after:o,before:C(o,s-1)}),!o&&i&&l.disabled.push({after:ue(i,s-1),before:C(i,s-1)})),c){if(o&&!i&&(l.disabled.push({before:C(o,-c+1)}),l.disabled.push({after:C(o,c-1)})),o&&i){var f=T(i,o)+1,h=c-f;l.disabled.push({before:ue(o,h)}),l.disabled.push({after:C(i,h)})}!o&&i&&(l.disabled.push({before:C(i,-c+1)}),l.disabled.push({after:C(i,c-1)}))}return u.jsx(De.Provider,{value:{selected:a,onDayClick:d,modifiers:l},children:n})}function Me(){var e=D.useContext(De);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function $(e){return Array.isArray(e)?Ge([],e):e!==void 0?[e]:[]}function va(e){var t={};return Object.entries(e).forEach(function(n){var a=n[0],r=n[1];t[a]=$(r)}),t}var W;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(W||(W={}));var ya=W.Selected,F=W.Disabled,ga=W.Hidden,ba=W.Today,ce=W.RangeEnd,de=W.RangeMiddle,fe=W.RangeStart,pa=W.Outside;function wa(e,t,n){var a,r=(a={},a[ya]=$(e.selected),a[F]=$(e.disabled),a[ga]=$(e.hidden),a[ba]=[e.today],a[ce]=[],a[de]=[],a[fe]=[],a[pa]=[],a);return e.fromDate&&r[F].push({before:e.fromDate}),e.toDate&&r[F].push({after:e.toDate}),U(e)?r[F]=r[F].concat(t.modifiers[F]):J(e)&&(r[F]=r[F].concat(n.modifiers[F]),r[fe]=n.modifiers[fe],r[de]=n.modifiers[de],r[ce]=n.modifiers[ce]),r}var $e=D.createContext(void 0);function xa(e){var t=M(),n=_e(),a=Me(),r=wa(t,n,a),o=va(t.modifiers),i=g(g({},r),o);return u.jsx($e.Provider,{value:i,children:e.children})}function Ze(){var e=D.useContext($e);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function _a(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Da(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ma(e){return!!(e&&typeof e=="object"&&"after"in e)}function ka(e){return!!(e&&typeof e=="object"&&"before"in e)}function Na(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ca(e,t){var n,a=t.from,r=t.to;if(a&&r){var o=T(r,a)<0;o&&(n=[r,a],a=n[0],r=n[1]);var i=T(e,a)>=0&&T(r,e)>=0;return i}return r?P(r,e):a?P(a,e):!1}function Pa(e){return ge(e)}function Oa(e){return Array.isArray(e)&&e.every(ge)}function Sa(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(Pa(n))return P(e,n);if(Oa(n))return n.includes(e);if(Da(n))return Ca(e,n);if(Na(n))return n.dayOfWeek.includes(e.getDay());if(_a(n)){var a=T(n.before,e),r=T(n.after,e),o=a>0,i=r<0,s=ve(n.before,n.after);return s?i&&o:o||i}return Ma(n)?T(e,n.after)>0:ka(n)?T(n.before,e)>0:typeof n=="function"?n(e):!1})}function ke(e,t,n){var a=Object.keys(t).reduce(function(o,i){var s=t[i];return Sa(e,s)&&o.push(i),o},[]),r={};return a.forEach(function(o){return r[o]=!0}),n&&!we(e,n)&&(r.outside=!0),r}function ja(e,t){for(var n=O(e[0]),a=be(e[e.length-1]),r,o,i=n;i<=a;){var s=ke(i,t),c=!s.disabled&&!s.hidden;if(!c){i=C(i,1);continue}if(s.selected)return i;s.today&&!o&&(o=i),r||(r=i),i=C(i,1)}return o||r}var Wa=365;function et(e,t){var n=t.moveBy,a=t.direction,r=t.context,o=t.modifiers,i=t.retry,s=i===void 0?{count:0,lastFocused:e}:i,c=r.weekStartsOn,d=r.fromDate,l=r.toDate,f=r.locale,h={day:C,week:me,month:j,year:pt,startOfWeek:function(p){return r.ISOWeek?I(p):Y(p,{locale:f,weekStartsOn:c})},endOfWeek:function(p){return r.ISOWeek?Be(p):pe(p,{locale:f,weekStartsOn:c})}},m=h[n](e,a==="after"?1:-1);a==="before"&&d?m=wt([d,m]):a==="after"&&l&&(m=xt([l,m]));var y=!0;if(o){var x=ke(m,o);y=!x.disabled&&!x.hidden}return y?m:s.count>Wa?s.lastFocused:et(m,{moveBy:n,direction:a,context:r,modifiers:o,retry:g(g({},s),{count:s.count+1})})}var tt=D.createContext(void 0);function Ta(e){var t=K(),n=Ze(),a=D.useState(),r=a[0],o=a[1],i=D.useState(),s=i[0],c=i[1],d=ja(t.displayMonths,n),l=r??(s&&t.isDateDisplayed(s))?s:d,f=function(){c(r),o(void 0)},h=function(p){o(p)},m=M(),y=function(p,N){if(r){var k=et(r,{moveBy:p,direction:N,context:m,modifiers:n});P(r,k)||(t.goToDate(k,r),h(k))}},x={focusedDay:r,focusTarget:l,blur:f,focus:h,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return u.jsx(tt.Provider,{value:x,children:e.children})}function Ne(){var e=D.useContext(tt);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Ya(e,t){var n=Ze(),a=ke(e,n,t);return a}var Ce=D.createContext(void 0);function Fa(e){if(!te(e.initialProps)){var t={selected:void 0};return u.jsx(Ce.Provider,{value:t,children:e.children})}return u.jsx(Ea,{initialProps:e.initialProps,children:e.children})}function Ea(e){var t=e.initialProps,n=e.children,a=function(o,i,s){var c,d,l;if((c=t.onDayClick)===null||c===void 0||c.call(t,o,i,s),i.selected&&!t.required){(d=t.onSelect)===null||d===void 0||d.call(t,void 0,o,i,s);return}(l=t.onSelect)===null||l===void 0||l.call(t,o,o,i,s)},r={selected:t.selected,onDayClick:a};return u.jsx(Ce.Provider,{value:r,children:n})}function nt(){var e=D.useContext(Ce);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function La(e,t){var n=M(),a=nt(),r=_e(),o=Me(),i=Ne(),s=i.focusDayAfter,c=i.focusDayBefore,d=i.focusWeekAfter,l=i.focusWeekBefore,f=i.blur,h=i.focus,m=i.focusMonthBefore,y=i.focusMonthAfter,x=i.focusYearBefore,p=i.focusYearAfter,N=i.focusStartOfWeek,k=i.focusEndOfWeek,q=function(b){var v,re,oe,ie;te(n)?(v=a.onDayClick)===null||v===void 0||v.call(a,e,t,b):U(n)?(re=r.onDayClick)===null||re===void 0||re.call(r,e,t,b):J(n)?(oe=o.onDayClick)===null||oe===void 0||oe.call(o,e,t,b):(ie=n.onDayClick)===null||ie===void 0||ie.call(n,e,t,b)},ne=function(b){var v;h(e),(v=n.onDayFocus)===null||v===void 0||v.call(n,e,t,b)},ae=function(b){var v;f(),(v=n.onDayBlur)===null||v===void 0||v.call(n,e,t,b)},Q=function(b){var v;(v=n.onDayMouseEnter)===null||v===void 0||v.call(n,e,t,b)},at=function(b){var v;(v=n.onDayMouseLeave)===null||v===void 0||v.call(n,e,t,b)},rt=function(b){var v;(v=n.onDayPointerEnter)===null||v===void 0||v.call(n,e,t,b)},ot=function(b){var v;(v=n.onDayPointerLeave)===null||v===void 0||v.call(n,e,t,b)},it=function(b){var v;(v=n.onDayTouchCancel)===null||v===void 0||v.call(n,e,t,b)},st=function(b){var v;(v=n.onDayTouchEnd)===null||v===void 0||v.call(n,e,t,b)},ut=function(b){var v;(v=n.onDayTouchMove)===null||v===void 0||v.call(n,e,t,b)},lt=function(b){var v;(v=n.onDayTouchStart)===null||v===void 0||v.call(n,e,t,b)},ct=function(b){var v;(v=n.onDayKeyUp)===null||v===void 0||v.call(n,e,t,b)},dt=function(b){var v;switch(b.key){case"ArrowLeft":b.preventDefault(),b.stopPropagation(),n.dir==="rtl"?s():c();break;case"ArrowRight":b.preventDefault(),b.stopPropagation(),n.dir==="rtl"?c():s();break;case"ArrowDown":b.preventDefault(),b.stopPropagation(),d();break;case"ArrowUp":b.preventDefault(),b.stopPropagation(),l();break;case"PageUp":b.preventDefault(),b.stopPropagation(),b.shiftKey?x():m();break;case"PageDown":b.preventDefault(),b.stopPropagation(),b.shiftKey?p():y();break;case"Home":b.preventDefault(),b.stopPropagation(),N();break;case"End":b.preventDefault(),b.stopPropagation(),k();break}(v=n.onDayKeyDown)===null||v===void 0||v.call(n,e,t,b)},ft={onClick:q,onFocus:ne,onBlur:ae,onKeyDown:dt,onKeyUp:ct,onMouseEnter:Q,onMouseLeave:at,onPointerEnter:rt,onPointerLeave:ot,onTouchCancel:it,onTouchEnd:st,onTouchMove:ut,onTouchStart:lt};return ft}function Ia(){var e=M(),t=nt(),n=_e(),a=Me(),r=te(e)?t.selected:U(e)?n.selected:J(e)?a.selected:void 0;return r}function Ra(e){return Object.values(W).includes(e)}function Ba(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(a){var r=e.modifiersClassNames[a];if(r)n.push(r);else if(Ra(a)){var o=e.classNames["day_".concat(a)];o&&n.push(o)}}),n}function Ha(e,t){var n=g({},e.styles.day);return Object.keys(t).forEach(function(a){var r;n=g(g({},n),(r=e.modifiersStyles)===null||r===void 0?void 0:r[a])}),n}function Aa(e,t,n){var a,r,o,i=M(),s=Ne(),c=Ya(e,t),d=La(e,c),l=Ia(),f=!!(i.onDayClick||i.mode!=="default");D.useEffect(function(){var Q;c.outside||s.focusedDay&&f&&P(s.focusedDay,e)&&((Q=n.current)===null||Q===void 0||Q.focus())},[s.focusedDay,e,n,f,c.outside]);var h=Ba(i,c).join(" "),m=Ha(i,c),y=!!(c.outside&&!i.showOutsideDays||c.hidden),x=(o=(r=i.components)===null||r===void 0?void 0:r.DayContent)!==null&&o!==void 0?o:la,p=u.jsx(x,{date:e,displayMonth:t,activeModifiers:c}),N={style:m,className:h,children:p,role:"gridcell"},k=s.focusTarget&&P(s.focusTarget,e)&&!c.outside,q=s.focusedDay&&P(s.focusedDay,e),ne=g(g(g({},N),(a={disabled:c.disabled,role:"gridcell"},a["aria-selected"]=c.selected,a.tabIndex=q||k?0:-1,a)),d),ae={isButton:f,isHidden:y,activeModifiers:c,selectedDays:l,buttonProps:ne,divProps:N};return ae}function qa(e){var t=D.useRef(null),n=Aa(e.date,e.displayMonth,t);return n.isHidden?u.jsx("div",{role:"gridcell"}):n.isButton?u.jsx(ee,g({name:"day",ref:t},n.buttonProps)):u.jsx("div",g({},n.divProps))}function Qa(e){var t=e.number,n=e.dates,a=M(),r=a.onWeekNumberClick,o=a.styles,i=a.classNames,s=a.locale,c=a.labels.labelWeekNumber,d=a.formatters.formatWeekNumber,l=d(Number(t),{locale:s});if(!r)return u.jsx("span",{className:i.weeknumber,style:o.weeknumber,children:l});var f=c(Number(t),{locale:s}),h=function(m){r(t,n,m)};return u.jsx(ee,{name:"week-number","aria-label":f,className:i.weeknumber,style:o.weeknumber,onClick:h,children:l})}function Xa(e){var t,n,a=M(),r=a.styles,o=a.classNames,i=a.showWeekNumber,s=a.components,c=(t=s?.Day)!==null&&t!==void 0?t:qa,d=(n=s?.WeekNumber)!==null&&n!==void 0?n:Qa,l;return i&&(l=u.jsx("td",{className:o.cell,style:r.cell,children:u.jsx(d,{number:e.weekNumber,dates:e.dates})})),u.jsxs("tr",{className:o.row,style:r.row,children:[l,e.dates.map(function(f){return u.jsx("td",{className:o.cell,style:r.cell,role:"presentation",children:u.jsx(c,{displayMonth:e.displayMonth,date:f})},xn(f))})]})}function Ee(e,t,n){for(var a=n?.ISOWeek?Be(t):pe(t,n),r=n?.ISOWeek?I(e):Y(e,n),o=T(a,r),i=[],s=0;s<=o;s++)i.push(C(r,s));var c=i.reduce(function(d,l){var f=n?.ISOWeek?Ae(l):Qe(l,n),h=d.find(function(m){return m.weekNumber===f});return h?(h.dates.push(l),d):(d.push({weekNumber:f,dates:[l]}),d)},[]);return c}function Va(e,t){var n=Ee(O(e),be(e),t);if(t?.useFixedWeeks){var a=Dn(e,t);if(a<6){var r=n[n.length-1],o=r.dates[r.dates.length-1],i=me(o,6-a),s=Ee(me(o,1),i,t);n.push.apply(n,s)}}return n}function Ga(e){var t,n,a,r=M(),o=r.locale,i=r.classNames,s=r.styles,c=r.hideHead,d=r.fixedWeeks,l=r.components,f=r.weekStartsOn,h=r.firstWeekContainsDate,m=r.ISOWeek,y=Va(e.displayMonth,{useFixedWeeks:!!d,ISOWeek:m,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),x=(t=l?.Head)!==null&&t!==void 0?t:ua,p=(n=l?.Row)!==null&&n!==void 0?n:Xa,N=(a=l?.Footer)!==null&&a!==void 0?a:oa;return u.jsxs("table",{id:e.id,className:i.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&u.jsx(x,{}),u.jsx("tbody",{className:i.tbody,style:s.tbody,children:y.map(function(k){return u.jsx(p,{displayMonth:e.displayMonth,dates:k.dates,weekNumber:k.weekNumber},k.weekNumber)})}),u.jsx(N,{displayMonth:e.displayMonth})]})}function za(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Ua=za()?D.useLayoutEffect:D.useEffect,he=!1,Ja=0;function Le(){return"react-day-picker-".concat(++Ja)}function Ka(e){var t,n=e??(he?Le():null),a=D.useState(n),r=a[0],o=a[1];return Ua(function(){r===null&&o(Le())},[]),D.useEffect(function(){he===!1&&(he=!0)},[]),(t=e??r)!==null&&t!==void 0?t:void 0}function $a(e){var t,n,a=M(),r=a.dir,o=a.classNames,i=a.styles,s=a.components,c=K().displayMonths,d=Ka(a.id?"".concat(a.id,"-").concat(e.displayIndex):void 0),l=a.id?"".concat(a.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=i.month,m=e.displayIndex===0,y=e.displayIndex===c.length-1,x=!m&&!y;r==="rtl"&&(t=[m,y],y=t[0],m=t[1]),m&&(f.push(o.caption_start),h=g(g({},h),i.caption_start)),y&&(f.push(o.caption_end),h=g(g({},h),i.caption_end)),x&&(f.push(o.caption_between),h=g(g({},h),i.caption_between));var p=(n=s?.Caption)!==null&&n!==void 0?n:ra;return u.jsxs("div",{className:f.join(" "),style:h,children:[u.jsx(p,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Ga,{id:l,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function Za(e){var t=M(),n=t.classNames,a=t.styles;return u.jsx("div",{className:n.months,style:a.months,children:e.children})}function er(e){var t,n,a=e.initialProps,r=M(),o=Ne(),i=K(),s=D.useState(!1),c=s[0],d=s[1];D.useEffect(function(){r.initialFocus&&o.focusTarget&&(c||(o.focus(o.focusTarget),d(!0)))},[r.initialFocus,c,o.focus,o.focusTarget,o]);var l=[r.classNames.root,r.className];r.numberOfMonths>1&&l.push(r.classNames.multiple_months),r.showWeekNumber&&l.push(r.classNames.with_weeknumber);var f=g(g({},r.styles.root),r.style),h=Object.keys(a).filter(function(y){return y.startsWith("data-")}).reduce(function(y,x){var p;return g(g({},y),(p={},p[x]=a[x],p))},{}),m=(n=(t=a.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:Za;return u.jsx("div",g({className:l.join(" "),style:f,dir:r.dir,id:r.id,nonce:a.nonce,title:a.title,lang:a.lang},h,{children:u.jsx(m,{children:i.displayMonths.map(function(y,x){return u.jsx($a,{displayIndex:x,displayMonth:y},x)})})}))}function tr(e){var t=e.children,n=kn(e,["children"]);return u.jsx(Qn,{initialProps:n,children:u.jsx(ea,{children:u.jsx(Fa,{initialProps:n,children:u.jsx(ca,{initialProps:n,children:u.jsx(ha,{initialProps:n,children:u.jsx(xa,{children:u.jsx(Ta,{children:t})})})})})})})}function nr(e){return u.jsx(tr,g({},e,{children:u.jsx(er,{initialProps:e})}))}function ur(e){const t=ht.c(20);let n,a,r,o;t[0]!==e?({className:n,classNames:a,showOutsideDays:o,...r}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=r,t[4]=o):(n=t[1],a=t[2],r=t[3],o=t[4]);const i=o===void 0?!0:o;let s;t[5]!==n?(s=H("p-3",n),t[5]=n,t[6]=s):s=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=H(Pe({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),t[7]=c):c=t[7];const d=r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md";let l;t[8]!==d?(l=H("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",d),t[8]=d,t[9]=l):l=t[9];let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=H(Pe({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),t[10]=f):f=t[10];let h;t[11]!==a||t[12]!==l?(h={months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:c,nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:l,day:f,day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...a},t[11]=a,t[12]=l,t[13]=h):h=t[13];let m;t[14]===Symbol.for("react.memo_cache_sentinel")?(m={IconLeft:rr,IconRight:ar},t[14]=m):m=t[14];let y;return t[15]!==r||t[16]!==i||t[17]!==s||t[18]!==h?(y=u.jsx(nr,{showOutsideDays:i,className:s,classNames:h,components:m,...r}),t[15]=r,t[16]=i,t[17]=s,t[18]=h,t[19]=y):y=t[19],y}function ar(e){const{className:t,...n}=e;return u.jsx(vt,{className:H("size-4",t),...n})}function rr(e){const{className:t,...n}=e;return u.jsx(mt,{className:H("size-4",t),...n})}export{ur as C};
@@ -1 +0,0 @@
1
- import{c as G,r as S,l as Q,j as t,B as U,i as V,t as I}from"./index-CtlgC1KW.js";import{i as X}from"./XCircle-DFVEpL7j.js";import{aH as Y,ab as T}from"./agent-icon-Bx7GZZkT.js";import{n as Z}from"./LinkExternal01-jNsZTUJe.js";import{f as K,a as _,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-BbUTua7Y.js";import{I as H}from"./input-D0-jk8XC.js";import{L}from"./label-CI8zXgUl.js";import{v as at,w as mt,T as nt,o as lt,x as R,y as pt,U as ct}from"./index-CPLWHNIg.js";import{c as dt,B as ut,a as gt}from"./block-document-CwHUDj3Z.js";import{u as xt,s as v,E as ft}from"./primitives-IUnUzi8K.js";import{t as ht}from"./ChevronDown-Be1kUurm.js";import{J as yt,K as jt,I as vt}from"./automation-runs-HchqpNoW.js";import"./AlertCircle-pDwFaZ69.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Settings02-Ci6H3sb0.js";import"./Tool02-DsdesO-0.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Users03-CwOsvMmx.js";import"./Loading02-DXivv_GE.js";import"./CheckCircle-CE_q_EWl.js";import"./Check-c3mV_Uni.js";import"./ChevronRight-86cbncTU.js";import"./ChevronUp-7vDXTQHH.js";import"./Circle-Jj2lB_OB.js";import"./Stars02-ClT22kUl.js";import"./Copy01-bnpfrlf8.js";import"./ZoomOut-d0pU1jsr.js";import"./DotsVertical-Cw_RGd0K.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./Key01-BufYrbpv.js";import"./LayoutLeft-Dg-hdc1o.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./Play-DL5iVtNY.js";import"./Plus-SxhLmH-g.js";import"./SearchLg-DalS_9no.js";import"./SearchMd-DXMQuWHS.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Trash01-RuXWiql6.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./X-82Zaa9wO.js";import"./Zap-DGilRzov.js";import"./chat-context-DHiffp4D.js";import"./autosend-CFSFemh9.js";import"./hooks-7RE64ble.js";import"./use-mcp-client-8-W_7yBa.js";import"./constants-CaIX_f5U.js";import"./auth-Cduc78Mk.js";import"./decopilot-sse-pool-jzNdhqzZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-Dm4swbDJ.js";import"./use-virtual-mcp-BjiOjpKa.js";import"./use-collections-Bq6tf4lW.js";import"./use-ai-providers-BRJFSGox.js";import"./use-decopilot-events-42PTdhf1.js";import"./tab-id-bb-jjgGv.js";import"./use-organization-settings-B3aKfsZI.js";import"./tooltip-2S76Z1GN.js";import"./dialog-BxiPyolh.js";import"./drawer-HMFyJ4Dn.js";import"./collection-search-B1ZoXYDP.js";import"./use-mobile-CcO0QCgb.js";import"./AreaChart-CUV8xbg8.js";import"./index-FOhB290E.js";import"./shell-layout-DSlq9QDA.js";import"./avatar-ChSwYwdc.js";import"./required-auth-layout-CQN5hr5X.js";import"./use-org-sso-BjHGhVgE.js";import"./form-NWTw1_w9.js";import"./select-DymbSi1i.js";import"./tabs-B41R3KT7.js";import"./toggle-group-DxbzbSVL.js";import"./use-deco-credits-DTpKn8hS.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DgJ4fCkV.js";import"./use-registry-connections-CVi0ypH7.js";import"./use-connection-C0xfUPl-.js";import"./useInfiniteQuery-C5v-SAtB.js";import"./use-infinite-scroll-BkP7H-cz.js";import"./extract-connection-data-CgMMiKb9.js";import"./card-CZ_4AnzZ.js";import"./integration-icon-BxCXFWwF.js";import"./collection-tabs-DSyyuCu8.js";import"./badge-BDCVlL_X.js";import"./textarea-DDx4ded2.js";import"./connection-form-helpers-CoPiWrjw.js";import"./authenticate-and-persist-oauth-Bsjhlz6M.js";import"./mcp-oauth-Crm2yFws.js";import"./useSuspenseInfiniteQuery-BeixZw8P.js";import"./connect-desktop-dialog-C_zkxzg2.js";import"./select-model-CBmm5efp.js";import"./checkbox-B0y92ybh.js";import"./skeleton-Cs7umMol.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BorHlHtt.js";import"./command-NscuxjlL.js";import"./index-DX7CG04Y.js";import"./popover-4SjKIFSf.js";import"./dropdown-menu-B8LX4IYo.js";import"./index-C6SqXYAf.js";import"./file-type-icon-aF4rioSK.js";import"./toolbar-Dw7sJZzm.js";import"./use-debounced-value-LiVhfciY.js";import"./index-CGtkbkWC.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C434uotZ.js";import"./empty-state-BJyyJcI7.js";import"./use-mcp-tools-CUOQhfsg.js";import"./use-capability-Cr4AoWjX.js";import"./tools-list-gF6CK4rd.js";import"./switch-DenJ-Rqp.js";import"./use-debounced-autosave-DnYuRWI8.js";import"./index-BQNtvMv8.js";import"./sidebar-BGBaPTiJ.js";import"./search-input-DAhQOW8w.js";import"./github-repo-picker-BgT_NiIP.js";import"./use-navigate-to-agent-DNjmGLp3.js";import"./reusable-new-chat-CouMjkYR.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-C5knhQtS.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./format-time-BnbuEtat.js";import"./use-members-CynVAzPM.js";import"./use-org-auth-client-mw0sCxV3.js";import"./index-Bn17GDJi.js";import"./get-initials-D-f_fDFw.js";import"./calendar-DkErgVju.js";import"./toolbar-icon-button-DRu94yPg.js";import"./use-file-configs-DRXMLwD-.js";import"./monaco-editor-BSERZA56.js";import"./use-automations-CtMMZwGK.js";import"./automation-list-row-tfqwgW_l.js";import"./table-6yLqG5BG.js";import"./use-clock-tick-YishFSE2.js";import"./use-copy-D7Lvwi_8.js";function bt(k){const e=G.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,D=b===void 0?!1:b,[x,A]=S.useState(D);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=Q("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:A,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function gr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:D,onManagePosts:x,onOpenPost:A,previewBaseUrl:l}){const i=at({orgSlug:k,virtualMcpId:e,branch:f}),h=mt(b,"categories"),[r,p,c]=xt(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=dt({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=S.useState(a),[m,C]=S.useState(null),[N,$]=S.useState(!1),z=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=z.length,M=o=>s("slug",o),J=async(o,w)=>{const q=v(r.name);$(!0);try{let g=0;for(const{key:P,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:q,slug:w});F!==O&&(await i.mutateAsync({blockKey:P,data:R(P,"posts",F)}),g+=1)}const E={...r,slug:w};await i.mutateAsync({blockKey:n,data:R(n,"categories",E)}),c(E),I.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){y(o),C(null),I.error(g instanceof Error?g.message:"Rename failed")}finally{$(!1)}},W=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){M(o);return}C({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(U,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Z,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(ft,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-slug",children:"Slug"}),t.jsx(H,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:W,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-description",children:"Description"}),t.jsx(H,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(bt,{icon:Y,title:"Content",defaultOpen:!0,children:t.jsx(ut,{value:gt(r.sections),onChange:o=>s("sections",o),meta:D,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(U,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>A(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(T,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(K,{open:!!m,onOpenChange:o=>{o||N||(y(a),C(null))},children:t.jsxs(_,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&J(m.oldSlug,m.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{gr as CategoryEditor};
@@ -1 +0,0 @@
1
- import{c as y,j as t,B as F,i as Z,H as Ge,I as se,E as Pe,r as T,C as ie,M as Qe,l as V,bd as Ye,u as Ze,L as G,t as Xe,e as ae,aZ as ke}from"./index-CtlgC1KW.js";import{E as Ee}from"./empty-state-BJyyJcI7.js";import{u as et,a as Ae}from"./use-collections-Bq6tf4lW.js";import{u as ce}from"./use-mcp-client-8-W_7yBa.js";import{F as ne,a as tt,b as de,d as me}from"./form-NWTw1_w9.js";import{I as ue}from"./input-D0-jk8XC.js";import{T as le}from"./textarea-DDx4ded2.js";import{a as st,b as nt,V as pe,O as ot,M as rt}from"./index-Fk54aBQb.js";import{ar as lt,L as it,an as at,U as ct,ae as dt,as as mt,Y as be}from"./agent-icon-Bx7GZZkT.js";import{g as ut,M as pt,a as Ne}from"./index-FOhB290E.js";import{A as xt,a as ft,b as ht}from"./alert-D7vvtYHx.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-DymbSi1i.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-2S76Z1GN.js";import{i as jt}from"./AlertCircle-pDwFaZ69.js";import{s as bt}from"./Stars02-ClT22kUl.js";import{a as Nt}from"./Copy01-bnpfrlf8.js";import{i as vt}from"./Play-DL5iVtNY.js";import{i as St}from"./ChevronRight-86cbncTU.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-gF6CK4rd.js";import{a as Oe,u as Re}from"./use-connection-C0xfUPl-.js";import{a as It}from"./use-mcp-tools-CUOQhfsg.js";import{M as $t,c as Tt}from"./monaco-editor-BSERZA56.js";import{I as Te}from"./integration-icon-BxCXFWwF.js";import{h as Pt,m as kt}from"./chat-context-DHiffp4D.js";import{u as Et}from"./shell-layout-DSlq9QDA.js";import{n as At}from"./Tool02-DsdesO-0.js";import"./constants-CaIX_f5U.js";import"./auth-Cduc78Mk.js";import"./label-CI8zXgUl.js";import"./index-BQNtvMv8.js";import"./sidebar-BGBaPTiJ.js";import"./LayoutLeft-Dg-hdc1o.js";import"./use-mobile-CcO0QCgb.js";import"./X-82Zaa9wO.js";import"./ZoomOut-d0pU1jsr.js";import"./Key01-BufYrbpv.js";import"./extract-connection-data-CgMMiKb9.js";import"./use-registry-connections-CVi0ypH7.js";import"./use-organization-settings-B3aKfsZI.js";import"./studio-tools-Dm4swbDJ.js";import"./Plus-SxhLmH-g.js";import"./index-Cv4TIpz2.js";import"./index-DX7CG04Y.js";import"./popover-4SjKIFSf.js";import"./use-virtual-mcp-BjiOjpKa.js";import"./Check-c3mV_Uni.js";import"./SearchMd-DXMQuWHS.js";import"./Users03-CwOsvMmx.js";import"./use-create-virtual-mcp-CT3JpXjp.js";import"./use-navigate-to-agent-DNjmGLp3.js";import"./hooks-7RE64ble.js";import"./decopilot-sse-pool-jzNdhqzZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Settings02-Ci6H3sb0.js";import"./XCircle-DFVEpL7j.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Loading02-DXivv_GE.js";import"./CheckCircle-CE_q_EWl.js";import"./ChevronDown-Be1kUurm.js";import"./ChevronUp-7vDXTQHH.js";import"./Circle-Jj2lB_OB.js";import"./DotsVertical-Cw_RGd0K.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./LinkExternal01-jNsZTUJe.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./SearchLg-DalS_9no.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Trash01-RuXWiql6.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./Zap-DGilRzov.js";import"./mcp-oauth-Crm2yFws.js";import"./badge-BDCVlL_X.js";import"./index-CGtkbkWC.js";import"./autosend-CFSFemh9.js";import"./use-ai-providers-BRJFSGox.js";import"./use-decopilot-events-42PTdhf1.js";import"./tab-id-bb-jjgGv.js";import"./avatar-ChSwYwdc.js";import"./dialog-BxiPyolh.js";import"./alert-dialog-BbUTua7Y.js";import"./required-auth-layout-CQN5hr5X.js";import"./use-org-sso-BjHGhVgE.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:r,isSaving:l,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!r)return null;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(lt,{size:14}),e[0]=p):p=e[0];let m;e[1]!==l||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:l,"aria-label":u,children:[p,u]}),e[1]=l,e[2]=n,e[3]=u,e[4]=m):m=e[4];let x;e[5]!==l?(x=l?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=l,e[6]=x):x=e[6];let f;e[7]!==l||e[8]!==o||e[9]!==i||e[10]!==x?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:l,"aria-label":i,children:[x,i]}),e[7]=l,e[8]=o,e[9]=i,e[10]=x,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function re(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==r||e[8]!==c?(i=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:[r,c]}),e[7]=r,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(le,{...e,value:e.value??"",placeholder:"Write the prompt message…",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"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:r}=ie(),l=o||null;let a;e[0]!==r.id||e[1]!==r.slug||e[2]!==l?(a={connectionId:l,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),p=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:re(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let x;e[6]!==m?(x={values:m},e[6]=m,e[7]=x):x=e[7];const f=Qe(x);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:re(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:re(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.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:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==p||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:p})}),e[25]=f.formState.isDirty,e[26]=p,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(pe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const r=n;if(!r){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=y.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...r}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Y(s){const e=y.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:a}),e[8]=r,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(rt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let p;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==u||e[9]!==o?(p=t.jsx(Vt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},u),e[5]=n,e[6]=l,e[7]=r,e[8]=u,e[9]=o,e[10]=p):p=e[10],p}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Ze({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[h,v]of Object.entries(l))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,p]=T.useState(l?JSON.stringify(l,null,2):"{}"),[m,x]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const xe=j?.inputSchema?.properties,fe=xe?Object.keys(xe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),x(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);x(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{x(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=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:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>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:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(le,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(le,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>p(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):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:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=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:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(xt,{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(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.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:"Loading app..."})]})}),children:t.jsx(pt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{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)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{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(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Ve,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(Te,{icon:k?.icon||null,name:k?.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:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(Z,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.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:"Instance"}),he]}),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:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,a]=T.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(x=>x.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=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:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=x):x=e[3],x}let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=p):p=e[4];let m;return e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:p,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:r})}),e[5]=i,e[6]=r,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:r,description:l,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let p;e[0]!==i?(p=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=p):p=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let x;e[5]!==r?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r}),e[5]=r,e[6]=x):x=e[6];let f;e[7]!==l?(f=l&&t.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=f):f=e[8];let g;e[9]!==x||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[x,f]}),e[9]=x,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==p||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:p,children:[m,g,S,u]}),e[15]=u,e[16]=p,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Re(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let p;return s[5]!==i||s[6]!==r||s[7]!==a?(p=t.jsx(Jt,{itemId:r,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=r,s[7]=a,s[8]=p):p=s[8],p}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,x=m?.id??"",f=x||"no-connection",g=x??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,r,I);let $;s[9]!==R||s[10]!==l?($=async M=>{l&&await R.update.mutateAsync({id:l,data:M})},s[9]=R,s[10]=l,s[11]=$):$=s[11];const E=$;let P;s[12]!==r?(P=r?.toLowerCase(),s[12]=r,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==r?(C=Gt(r),s[14]=r,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==r||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:r},children:m.title})})}),t.jsx(Y,{})]}),s[19]=r,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==l?(M=t.jsx(w,{itemId:l,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=l,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(pe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.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 o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Qt,{}),s[2]=l):l=s[2],l}function Wn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Wn as default};
@@ -1 +0,0 @@
1
- import{c as E,j as n,u as Ie,o as De,p as se,r as M,a as Se,b as Fe,q as qe,d as Te,s as Le,Q as He,E as Ve,K as _e,v as Ue,B as je,N as Be}from"./index-CtlgC1KW.js";import{L as Ke,s as ve,S as Pe,a as Ne,b as Ce,c as be,i as Qe,n as pe,C as we,p as xe}from"./self-tool-result-DQZF7wnw.js";import{A as We}from"./auth-entry-B1IjK16Y.js";import{A as Ge}from"./auth-split-layout-B5WaIo2U.js";import{O as Re}from"./organization-choice-D69Iyg_P.js";import{I as Ye}from"./input-D0-jk8XC.js";import{u as Je}from"./use-mcp-client-8-W_7yBa.js";import{S as Xe,W as Ze,g as et,a as tt}from"./constants-CaIX_f5U.js";import{i as it}from"./XCircle-DFVEpL7j.js";import"./integration-icon-BxCXFWwF.js";import"./Tool02-DsdesO-0.js";import"./agent-icon-Bx7GZZkT.js";import"./AlertCircle-pDwFaZ69.js";import"./Tool01-CcmA_w81.js";import"./ArrowUp-DtY9ye1M.js";import"./Settings02-Ci6H3sb0.js";import"./ArrowUpRight-BF8RC7lQ.js";import"./TrendUp01-RmaL7vVA.js";import"./ZapSquare-x5bylaAn.js";import"./Users03-CwOsvMmx.js";import"./Loading02-DXivv_GE.js";import"./CheckCircle-CE_q_EWl.js";import"./Check-c3mV_Uni.js";import"./ChevronDown-Be1kUurm.js";import"./ChevronRight-86cbncTU.js";import"./ChevronUp-7vDXTQHH.js";import"./Circle-Jj2lB_OB.js";import"./Stars02-ClT22kUl.js";import"./Copy01-bnpfrlf8.js";import"./ZoomOut-d0pU1jsr.js";import"./DotsVertical-Cw_RGd0K.js";import"./Globe01-CINqduC_.js";import"./Eye-DSKes5cc.js";import"./FilterLines-AFo6zz8G.js";import"./Star01-ZuQ9gpI3.js";import"./Globe04-Df4bCIam.js";import"./SwitchHorizontal01-CTbgmfyn.js";import"./HardDrive-C9RJVCTC.js";import"./Key01-BufYrbpv.js";import"./LayoutLeft-Dg-hdc1o.js";import"./LinkExternal01-jNsZTUJe.js";import"./List-jTag997N.js";import"./Monitor01-Cgb6dKKW.js";import"./Sun-C2eqMrg3.js";import"./Package-Bm7E2eK0.js";import"./Palette-D0cmCBJm.js";import"./Play-DL5iVtNY.js";import"./Plus-SxhLmH-g.js";import"./SearchLg-DalS_9no.js";import"./SearchMd-DXMQuWHS.js";import"./Shield01-CFnvQppZ.js";import"./Stars01-MX3VUC0h.js";import"./Trash01-RuXWiql6.js";import"./Upload01-t4JMvfO4.js";import"./User01-nY_0gSR5.js";import"./Users01-COP9ABdE.js";import"./XClose-DGRyO79b.js";import"./X-82Zaa9wO.js";import"./Zap-DGilRzov.js";import"./dialog-BxiPyolh.js";import"./tooltip-2S76Z1GN.js";import"./extract-connection-data-CgMMiKb9.js";import"./github-installations-D2vHSx02.js";import"./form-NWTw1_w9.js";import"./label-CI8zXgUl.js";import"./use-debounced-value-LiVhfciY.js";import"./authenticate-and-persist-oauth-Bsjhlz6M.js";import"./mcp-oauth-Crm2yFws.js";import"./auth-Cduc78Mk.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-ChSwYwdc.js";const nt={workspace:"Preparando seu workspace de commerce...",generic:"Preparando..."};function ot(l){return nt[l]}function ye(l){const e=E.c(4),{variant:i}=l;let t;e[0]!==i?(t=ot(i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:n.jsx(Ke,{label:t,className:"text-muted-foreground"})}),e[2]=t,e[3]=s):s=e[3],s}function Li(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(st,{}),l[0]=e):e=l[0],e}const Me=M.createContext(null),$e=()=>M.useContext(Me);function R(l){const e=E.c(13);let i,t;e[0]!==l?({visual:t,...i}=l,e[0]=l,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/commerce-onboarding"},e[3]=s):s=e[3];const c=Ie(s),{data:a}=Se.useSession(),o=a?.user?.email;let m;e[4]!==c.siteUrl||e[5]!==o?(m=Ce({siteUrl:c.siteUrl,email:o}),e[4]=c.siteUrl,e[5]=o,e[6]=m):m=e[6];const d=m;let u;e[7]!==d||e[8]!==t?(u=t??n.jsx(be,{href:d}),e[7]=d,e[8]=t,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=n.jsx(Ge,{...i,visual:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}const rt={signUpFailed:"Falha ao criar conta",signInFailed:"Falha ao entrar",authenticationFailed:"Falha na autenticação",resetEmailFailed:"Não foi possível enviar o e-mail de redefinição",otpSendFailed:"Não foi possível enviar o código",invalidCode:"Código inválido",invalidEmail:"E-mail inválido",invalidEmailOrPassword:"E-mail ou senha inválidos. Tente novamente.",accountExists:"Já existe uma conta com este e-mail. Tente entrar em vez de criar uma nova conta.",networkError:"Erro de rede. Verifique sua conexão e tente novamente.",tooManyAttempts:"Muitas tentativas. Aguarde um momento e tente novamente.",invalidOrExpiredCode:"Código inválido ou expirado. Tente novamente.",genericError:"Algo deu errado. Tente novamente.",resetPasswordTitle:"Redefinir sua senha",verificationCodeTitle:"Informe o código de verificação",welcomeTitle:"Bem-vindo à deco",resetPasswordSubtitle:"Enviaremos um link de redefinição",codeSentTo:l=>`Código enviado para ${l}`,defaultSubtitle:"Entre ou crie uma nova conta",resetEmailSent:"Verifique seu e-mail para redefinir a senha.",continueWith:l=>`Continuar com ${l}`,divider:"ou",emailLabel:"E-mail",emailPlaceholder:"Endereço de e-mail",sending:"Enviando...",sendCode:"Enviar código",verificationCodeLabel:"Código de verificação",enterCodePlaceholder:"Informe o código",verifying:"Verificando...",verify:"Verificar",useDifferentEmail:"Usar outro e-mail",sendResetLink:"Enviar link de redefinição",nameLabel:"Nome",namePlaceholder:"Seu nome",passwordLabel:"Senha",forgotPassword:"Esqueceu a senha?",creatingAccount:"Criando conta...",signingIn:"Entrando...",continue:"Continuar",backToSignIn:"Voltar para entrar",signInWithPassword:"Entrar com senha",alreadyHaveAccount:"Já tem uma conta? ",dontHaveAccount:"Não tem uma conta? ",signIn:"Entrar",signUp:"Criar conta",signInWithEmailCode:"Entrar com código por e-mail"};function Oe(l){switch(l){case"Enter a website URL.":return"Informe a URL de um site.";case"Use an HTTP or HTTPS website URL.":return"Use uma URL de site HTTP ou HTTPS.";case"Enter a valid website URL.":return"Informe uma URL de site válida.";default:return l}}let ze=!1;function st(){const l=Ie({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=l,t=ve(i);return!ze&&De()&&(ze=!0,se("commerce_onboarding_viewed",{site_url:i,domain:t??void 0,...t?{$set:{last_scanned_domain:t}}:{}})),n.jsx(Me.Provider,{value:t,children:n.jsx(at,{requestedOrgSlug:e,siteUrl:i})})}function at(l){const e=E.c(8),{requestedOrgSlug:i,siteUrl:t}=l,{data:s,isPending:c}=Se.useSession(),a=$e();if(c){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(R,{children:n.jsx(ye,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!s){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==a?(d=a?n.jsx(Pe,{host:a}):void 0,e[1]=a,e[2]=d):d=e[2];let u;return e[3]!==d?(u=n.jsx(R,{children:n.jsx(We,{callbackUrl:m,allowAutoLogin:!1,title:"Desbloqueie seu diagnóstico completo",subtitle:null,brand:d,copy:rt})}),e[3]=d,e[4]=u):u=e[4],u}let o;return e[5]!==i||e[6]!==t?(o=n.jsx(lt,{requestedOrgSlug:i,siteUrl:t}),e[5]=i,e[6]=t,e[7]=o):o=e[7],o}function lt(l){const e=E.c(43),{requestedOrgSlug:i,siteUrl:t}=l,s=Fe(),c=qe(),[a,o]=M.useState(null),[m,d]=M.useState(null),u=c.data?.map(mt)??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:ct,retry:!1,onSuccess:r=>{d(r)}},e[0]=v):v=e[0];const p=Te(v);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(R,{children:n.jsx(ye,{variant:"workspace"})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=n.jsx(ae,{title:"Não foi possível carregar suas organizações",description:"Tente novamente para continuar a configuração de commerce nesta página.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const j=i?u.find(r=>r.slug===i):null;if(j){let r;return e[4]!==j||e[5]!==t?(r=n.jsx(re,{org:j,initialSiteUrl:t}),e[4]=j,e[5]=t,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=n.jsx(ae,{title:"Organização não encontrada",description:"Não conseguimos encontrar essa organização na sua conta.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(a){let r;return e[9]!==a||e[10]!==t?(r=n.jsx(re,{org:a,initialSiteUrl:t}),e[9]=a,e[10]=t,e[11]=r):r=e[11],r}if(u.length===1&&u[0]){let r;return e[12]!==u[0]||e[13]!==t?(r=n.jsx(re,{org:u[0],initialSiteUrl:t}),e[12]=u[0],e[13]=t,e[14]=r):r=e[14],r}if(u.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Selecione onde o diagnóstico de commerce deve continuar."}),e[15]=r):r=e[15];let h;e[16]!==s||e[17]!==t?(h=O=>s({to:"/commerce-onboarding",search:{org:O.slug,siteUrl:t}}),e[16]=s,e[17]=t,e[18]=h):h=e[18];let C;return e[19]!==u||e[20]!==h?(C=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:u,selectLabel:"Continuar",onSelected:h})})]})}),e[19]=u,e[20]=h,e[21]=C):C=e[21],C}if(!m){let r;e[22]!==p?(r=()=>{p.reset(),p.mutate()},e[22]=p,e[23]=r):r=e[23];let h;return e[24]!==p||e[25]!==r?(h=n.jsx(dt,{mutation:p,onRetry:r}),e[24]=p,e[25]=r,e[26]=h):h=e[26],h}const g=m;if(g?.success&&(g.status==="created"||g.status==="joined"||g.status==="already_has_organization")&&g.organization){let r;return e[27]!==g.organization||e[28]!==t?(r=n.jsx(re,{org:g.organization,initialSiteUrl:t}),e[27]=g.organization,e[28]=t,e[29]=r):r=e[29],r}if(g?.status==="ambiguous"&&g.organizations&&g.organizations.length>0){let r;e[30]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Seu e-mail pode acessar mais de uma organização. Escolha onde a configuração de commerce deve continuar."}),e[30]=r):r=e[30];const h=g.domain??void 0;let C;e[31]!==s||e[32]!==t?(C=($,P)=>{Le(),o({...$,slug:P}),s({to:"/commerce-onboarding",search:{org:P,siteUrl:t}})},e[31]=s,e[32]=t,e[33]=C):C=e[33];let O;return e[34]!==g.organizations||e[35]!==h||e[36]!==C?(O=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:g.organizations,domain:h,onJoined:C})})]})}),e[34]=g.organizations,e[35]=h,e[36]=C,e[37]=O):O=e[37],O}const S=g?.error??"Não conseguimos determinar uma organização de commerce para esta conta.";let _;e[38]!==p?(_=()=>{d(null),p.reset()},e[38]=p,e[39]=_):_=e[39];let I;return e[40]!==S||e[41]!==_?(I=n.jsx(ae,{title:"O onboarding de commerce precisa de suporte",description:S,actionLabel:"Tentar novamente",onRetry:_}),e[40]=S,e[41]=_,e[42]=I):I=e[42],I}async function ct(){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&&Le(),e}function mt(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function dt(l){const e=E.c(7),{mutation:i,onRetry:t}=l,s=M.useRef(!1);let c;e[0]!==i?(c=d=>{!d||s.current||(s.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const a=c;if(i.error){let d;return e[2]!==t?(d=n.jsx(ae,{title:"Onboarding de commerce indisponível",description:"Não foi possível preparar uma organização para a configuração de commerce. Tente novamente por esta página ou fale com o suporte.",actionLabel:"Tentar novamente",onRetry:t}),e[2]=t,e[3]=d):d=e[3],d}let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ye,{variant:"generic"}),e[4]=o):o=e[4];let m;return e[5]!==a?(m=n.jsx(R,{children:n.jsx("div",{ref:a,children:o})}),e[5]=a,e[6]=m):m=e[6],m}function k(l){const e=E.c(8),{title:i,description:t}=l,s=$e();let c;e[0]!==s?(c=s?n.jsx(Pe,{host:s}):n.jsxs("div",{children:[n.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),n.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==i?(a=(i||t)&&n.jsxs("div",{className:"space-y-2",children:[i&&n.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),t&&n.jsx("p",{className:"text-base text-muted-foreground leading-6",children:t})]}),e[2]=t,e[3]=i,e[4]=a):a=e[4];let o;return e[5]!==c||e[6]!==a?(o=n.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=o):o=e[7],o}function ae(l){const e=E.c(9),{title:i,description:t,actionLabel:s,onRetry:c}=l;let a;e[0]!==t||e[1]!==i?(a=n.jsx(k,{title:i,description:t}),e[0]=t,e[1]=i,e[2]=a):a=e[2];let o;e[3]!==s||e[4]!==c?(o=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:c,children:s}),e[3]=s,e[4]=c,e[5]=o):o=e[5];let m;return e[6]!==a||e[7]!==o?(m=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[a,o]})}),e[6]=a,e[7]=o,e[8]=m):m=e[8],m}function re(l){const e=E.c(11),{org:i,initialSiteUrl:t}=l,{data:s}=Se.useSession(),c=s?.user?.email;let a;e[0]!==t||e[1]!==c?(a=Ce({siteUrl:t,email:c}),e[0]=t,e[1]=c,e[2]=a):a=e[2];const o=a;let m;e[3]!==o||e[4]!==i.id?(m=n.jsx(be,{href:o,orgId:i.id}),e[3]=o,e[4]=i.id,e[5]=m):m=e[5];const d=m;let u;return e[6]!==t||e[7]!==d||e[8]!==i||e[9]!==s?.user?.email?(u=n.jsx(He,{children:v=>{const{reset:p}=v;return n.jsx(Ve,{fallback:j=>{const{error:g,resetError:S}=j;return n.jsx(R,{visual:d,children:n.jsx(ut,{orgName:i.name,message:g instanceof Error?g.message:"Não foi possível verificar a configuração do Commerce Discovery.",onRetry:()=>{p(),S()}})})},children:n.jsx(M.Suspense,{fallback:n.jsx(ke,{visual:d}),children:n.jsx(ft,{org:i,initialSiteUrl:t,sessionEmail:s?.user?.email},`${i.id}:${t??""}`)})})}}),e[6]=t,e[7]=d,e[8]=i,e[9]=s?.user?.email,e[10]=u):u=e[10],u}function ke(l){const e=E.c(3),{visual:i}=l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[n.jsx(k,{}),n.jsx(we,{})]}),e[0]=t):t=e[0];let s;return e[1]!==i?(s=n.jsx(R,{align:"fill",visual:i,children:t}),e[1]=i,e[2]=s):s=e[2],s}function ut(l){const e=E.c(10),{orgName:i,message:t,onRetry:s}=l,c=`A configuração de commerce continuará em ${i}.`;let a;e[0]!==c?(a=n.jsx(k,{title:"Diagnóstico de commerce",description:c}),e[0]=c,e[1]=a):a=e[1];let o;e[2]!==t?(o=n.jsx(le,{message:t}),e[2]=t,e[3]=o):o=e[3];let m;e[4]!==s?(m=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:s,children:"Tentar novamente"}),e[4]=s,e[5]=m):m=e[5];let d;return e[6]!==a||e[7]!==o||e[8]!==m?(d=n.jsxs("div",{className:"grid gap-10",children:[a,o,m]}),e[6]=a,e[7]=o,e[8]=m,e[9]=d):d=e[9],d}function ft(l){const e=E.c(109),{org:i,initialSiteUrl:t,sessionEmail:s}=l;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Xe,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=Je(c),[o,m]=M.useState(t??""),[d,u]=M.useState(null),v=M.useRef(!1),p=Ze.COMMERCE_DISCOVERY(i.id),j=et(i.id),g=_e.commerceDiscoveryConnection(i.id,p);let S;e[3]!==p||e[4]!==a?(S=async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:p}});return xe(f)},e[3]=p,e[4]=a,e[5]=S):S=e[5];let _;e[6]!==g||e[7]!==S?(_={queryKey:g,queryFn:S,retry:!1},e[6]=g,e[7]=S,e[8]=_):_=e[8];const I=Ue(_),r=_e.commerceDiscoveryVirtualMcp(i.id,j);let h;e[9]!==a||e[10]!==j?(h=async()=>{const f=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:j}});return xe(f)},e[9]=a,e[10]=j,e[11]=h):h=e[11];let C;e[12]!==r||e[13]!==h?(C={queryKey:r,queryFn:h,retry:!1},e[12]=r,e[13]=h,e[14]=C):C=e[14];const O=Ue(C);let $;e[15]!==a?($=async f=>{const x=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}});return xe(x)},e[15]=a,e[16]=$):$=e[16];let P;e[17]!==I||e[18]!==i.id||e[19]!==O?(P=(f,x)=>{se("commerce_onboarding_setup_succeeded",{domain:ve(x)??void 0,organization_id:i.id}),u(null),I.refetch(),O.refetch()},e[17]=I,e[18]=i.id,e[19]=O,e[20]=P):P=e[20];let A;e[21]!==i.id?(A=(f,x)=>{se("commerce_onboarding_setup_failed",{domain:ve(x)??void 0,organization_id:i.id,error:f instanceof Error?f.message:String(f)}),u(f instanceof Error?f.message:"A configuração do Commerce Discovery falhou.")},e[21]=i.id,e[22]=A):A=e[22];let Q;e[23]!==A||e[24]!==$||e[25]!==P?(Q={mutationFn:$,retry:!1,onSuccess:P,onError:A},e[23]=A,e[24]=$,e[25]=P,e[26]=Q):Q=e[26];const b=Te(Q),Ae=!!I.data.item&&!!O.data.item,Ee=I.data.item,W=typeof Ee?.metadata?.siteUrl=="string"?Ee.metadata.siteUrl:void 0,ce=t||o||"";let G;e[27]!==W||e[28]!==ce?(G=Qe(ce,W),e[27]=W,e[28]=ce,e[29]=G):G=e[29];const Y=Ae&&G,J=t||o||W||"";let X;e[30]!==J||e[31]!==s?(X=Ce({siteUrl:J,email:s}),e[30]=J,e[31]=s,e[32]=X):X=e[32];const me=X;let Z;e[33]!==me||e[34]!==i.id?(Z=n.jsx(be,{href:me,orgId:i.id}),e[33]=me,e[34]=i.id,e[35]=Z):Z=e[35];const y=Z;let ee;e[36]!==b?(ee=f=>{const x=pe(f);if(!x.ok){u(Oe(x.error));return}u(null),b.mutate(x.value)},e[36]=b,e[37]=ee):ee=e[37];const D=ee;let te;e[38]!==t||e[39]!==D||e[40]!==Y?(te=f=>{!f||v.current||Y||!t||(v.current=!0,D(t))},e[38]=t,e[39]=D,e[40]=Y,e[41]=te):te=e[41];const de=te;let ie;e[42]!==i.id||e[43]!==D||e[44]!==o?(ie=f=>{f.preventDefault();const x=pe(o);x.ok&&se("commerce_onboarding_site_url_submitted",{domain:new URL(x.value).hostname,organization_id:i.id}),D(o)},e[42]=i.id,e[43]=D,e[44]=o,e[45]=ie):ie=e[45];const z=ie;if(Y){const f=i.slug;let x;e[46]===Symbol.for("react.memo_cache_sentinel")?(x=crypto.randomUUID(),e[46]=x):x=e[46];let T;e[47]!==i.slug?(T={org:f,taskId:x},e[47]=i.slug,e[48]=T):T=e[48];let U;e[49]!==i.id?(U=tt(i.id),e[49]=i.id,e[50]=U):U=e[50];const L=J||void 0;let N;e[51]!==U.id||e[52]!==L?(N={virtualmcpid:U.id,connect:"1",siteUrl:L},e[51]=U.id,e[52]=L,e[53]=N):N=e[53];let w;return e[54]!==T||e[55]!==N?(w=n.jsx(Be,{to:"/$org/$taskId",params:T,search:N,replace:!0}),e[54]=T,e[55]=N,e[56]=w):w=e[56],w}if(b.isPending){let f;return e[57]!==y?(f=n.jsx(ke,{visual:y}),e[57]=y,e[58]=f):f=e[58],f}if(t){let f,x;if(e[59]!==y||e[60]!==z||e[61]!==t||e[62]!==d||e[63]!==i.name||e[64]!==b.isPending||e[65]!==o){x=Symbol.for("react.early_return_sentinel");e:if(f=pe(t),!f.ok){const fe=`A configuração de commerce continuará em ${i.name}.`;let V;e[68]!==fe?(V=n.jsx(k,{title:"Diagnóstico de commerce",description:fe}),e[68]=fe,e[69]=V):V=e[69];const ge=n.jsx(le,{message:Oe(f.error)});let B;e[70]!==z||e[71]!==d||e[72]!==b.isPending||e[73]!==o?(B=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[70]=z,e[71]=d,e[72]=b.isPending,e[73]=o,e[74]=B):B=e[74];let K;e[75]!==V||e[76]!==ge||e[77]!==B?(K=n.jsxs("div",{className:"grid gap-10",children:[V,ge,B]}),e[75]=V,e[76]=ge,e[77]=B,e[78]=K):K=e[78];let oe;e[79]!==y||e[80]!==K?(oe=n.jsx(R,{visual:y,children:K}),e[79]=y,e[80]=K,e[81]=oe):oe=e[81],x=oe;break e}e[59]=y,e[60]=z,e[61]=t,e[62]=d,e[63]=i.name,e[64]=b.isPending,e[65]=o,e[66]=f,e[67]=x}else f=e[66],x=e[67];if(x!==Symbol.for("react.early_return_sentinel"))return x;const T=`O Commerce Discovery está sendo preparado para ${f.value}.`;let U;e[82]!==T?(U=n.jsx(k,{title:"Diagnóstico de commerce",description:T}),e[82]=T,e[83]=U):U=e[83];let L;e[84]!==z||e[85]!==d||e[86]!==b.isPending||e[87]!==o?(L=d?n.jsxs(n.Fragment,{children:[n.jsx(le,{message:d}),n.jsx(he,{siteUrl:o,error:null,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z})]}):n.jsx(we,{}),e[84]=z,e[85]=d,e[86]=b.isPending,e[87]=o,e[88]=L):L=e[88];let N;e[89]!==U||e[90]!==L||e[91]!==de?(N=n.jsxs("div",{ref:de,className:"grid gap-10",children:[U,L]}),e[89]=U,e[90]=L,e[91]=de,e[92]=N):N=e[92];let w;return e[93]!==y||e[94]!==N?(w=n.jsx(R,{visual:y,children:N}),e[93]=y,e[94]=N,e[95]=w):w=e[95],w}const ue=`A configuração de commerce continuará em ${i.name}.`;let F;e[96]!==ue?(F=n.jsx(k,{title:"Diagnóstico de commerce",description:ue}),e[96]=ue,e[97]=F):F=e[97];let q;e[98]!==z||e[99]!==d||e[100]!==b.isPending||e[101]!==o?(q=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[98]=z,e[99]=d,e[100]=b.isPending,e[101]=o,e[102]=q):q=e[102];let H;e[103]!==F||e[104]!==q?(H=n.jsxs("div",{className:"grid gap-10",children:[F,q]}),e[103]=F,e[104]=q,e[105]=H):H=e[105];let ne;return e[106]!==y||e[107]!==H?(ne=n.jsx(R,{visual:y,children:H}),e[106]=y,e[107]=H,e[108]=ne):ne=e[108],ne}function he(l){const e=E.c(20),{siteUrl:i,error:t,isSubmitting:s,onSiteUrlChange:c,onSubmit:a}=l;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"URL do site"}),e[0]=o):o=e[0];let m;e[1]!==c?(m=_=>c(_.target.value),e[1]=c,e[2]=m):m=e[2];const d=!!t;let u;e[3]!==s||e[4]!==i||e[5]!==m||e[6]!==d?(u=n.jsx(Ye,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":d,disabled:s}),e[3]=s,e[4]=i,e[5]=m,e[6]=d,e[7]=u):u=e[7];let v;e[8]!==t?(v=t?n.jsx(le,{message:t}):null,e[8]=t,e[9]=v):v=e[9];let p;e[10]!==u||e[11]!==v?(p=n.jsxs("div",{className:"grid gap-2",children:[o,u,v]}),e[10]=u,e[11]=v,e[12]=p):p=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(it,{size:16}),e[13]=j):j=e[13];let g;e[14]!==s?(g=n.jsxs(je,{type:"submit",size:"xl",className:"w-full",disabled:s,children:["Continuar",j]}),e[14]=s,e[15]=g):g=e[15];let S;return e[16]!==a||e[17]!==p||e[18]!==g?(S=n.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[p,g]}),e[16]=a,e[17]=p,e[18]=g,e[19]=S):S=e[19],S}function le(l){const e=E.c(2),{message:i}=l;let t;return e[0]!==i?(t=n.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=t):t=e[1],t}export{Li as default};